{"version":3,"sources":["webpack:///./src/components/EntryStatus.ts","webpack:///./src/util/model.ts","webpack:///./src/web-api/entry-service.ts","webpack:///C:/a/3/s/Cognito.Web.Client/libs/types/server-types/forms/model/view-type.ts","webpack:///./src/util/helpers.ts","webpack:///./src/util/random.ts","webpack:///./src/framework/model/core.ts","webpack:///./src/util/base62.ts","webpack:///./src/util/combined-number.ts","webpack:///./src/framework/admin/admin-form-handle.ts","webpack:///./src/web-api/diff-patch/CognitoJsonPatchFormatter.ts","webpack:///./src/web-api/diff-patch/custom-patch-pipes.ts","webpack:///./src/web-api/diff-patch/CognitoJsonDiffPatcher.ts","webpack:///./src/web-api/concurrent-entry-service.ts","webpack:///C:/a/3/s/Cognito.Web.Client/libs/types/server-types/forms/model/index-type.ts","webpack:///./src/style/_toast-message.scss?1810","webpack:///./src/components/ToastMessageEx.vue?f914","webpack:///./src/components/ToastMessageEx.vue?d193","webpack:///src/components/ToastMessageEx.vue","webpack:///./src/components/ToastMessageEx.vue","webpack:///./src/components/ToastMessage.ts","webpack:///./src/web-api/entry-views/entry-set-filtering.ts","webpack:///./src/web-api/entry-views/entry-set.ts","webpack:///./src/web-api/base-service.ts","webpack:///./src/framework/logging/error.ts","webpack:///./src/web-api/custom-response-error.ts","webpack:///./src/framework/model/serialization/converters/date-converter.ts","webpack:///./src/framework/model/serialization/converters/time-converter.ts","webpack:///./src/framework/model/serialization/converters/order-converter.ts","webpack:///./src/framework/model/serialization/converters/enum-converter.ts","webpack:///./src/framework/model/serialization/converters/ignore-circular-reference-converter.ts","webpack:///./src/framework/model/serialization/converters/initialize-back-references-converter.ts","webpack:///./src/framework/model/serialization/injectors/storage-property-injector.ts","webpack:///./src/framework/model/countries.ts","webpack:///./src/framework/model/extensions/address-extensions.ts","webpack:///./src/framework/model/extensions/name-extensions.ts","webpack:///./src/framework/model/extensions/signature-extensions.ts","webpack:///./src/framework/model/serialization/converters/calculation-converter.ts","webpack:///./src/framework/model/serialization/converters/date-time-converter.ts","webpack:///./src/framework/model/serialization/converters/lookup-converter.ts","webpack:///./src/framework/model/serialization/converters/yesno-converter.ts","webpack:///./src/framework/model/serialization/converters/entry-extension-converter.ts","webpack:///./src/framework/model/extensions/entity-init-extensions.ts","webpack:///./src/framework/model/serialization/converters/ignore-fileupload-converter.ts","webpack:///./src/framework/model/serialization/converters/ignore-signature-properties-converter.ts","webpack:///./src/framework/model/extensions/workflow-action-extensions.ts","webpack:///./src/framework/model/serialization/converters/entry-meta-converter.ts","webpack:///./src/framework/forms-model.ts","webpack:///./src/framework/model/extensions/payment-extensions.ts","webpack:///./src/framework/model/extensions/lookup-field/lookup-model-extension.ts","webpack:///./src/mixins/form-status.ts","webpack:///./src/framework/payment/order-builder.ts","webpack:///./src/framework/payment/helpers.ts","webpack:///./src/framework/model/extensions/lookup-field/lookup-manager.ts","webpack:///./src/framework/model/extensions/lookup-field/cascade-filter-manager.ts","webpack:///./src/framework/model/extensions/form-entry-extensions.ts","webpack:///./src/style/_toast-message.scss","webpack:///./src/framework/admin/form-view-form-handle.ts","webpack:///C:/a/3/s/Cognito.Web.Client/libs/element-ui/lib/utils/dom.js","webpack:///./src/assets/ex.svg","webpack:///./src/framework/logging/log.ts","webpack:///C:/a/3/s/Cognito.Web.Client/libs/element-ui/lib/message.js","webpack:///./src/framework/admin/task-dashboard-form-handle.ts","webpack:///C:/a/3/s/Cognito.Web.Client/libs/element-ui/lib/utils/util.js","webpack:///C:/a/3/s/Cognito.Web.Client/libs/element-ui/lib/utils/types.js","webpack:///C:/a/3/s/Cognito.Web.Client/libs/element-ui/lib/utils/popup/index.js","webpack:///C:/a/3/s/Cognito.Web.Client/libs/element-ui/lib/utils/scrollbar-width.js","webpack:///C:/a/3/s/Cognito.Web.Client/libs/element-ui/lib/utils/merge.js","webpack:///C:/a/3/s/Cognito.Web.Client/libs/element-ui/lib/utils/popup/popup-manager.js","webpack:///C:/a/3/s/Cognito.Web.Client/libs/element-ui/lib/utils/vdom.js","webpack:///./src/localization/resources lazy ^\\.\\/.*$ namespace object","webpack:///./src/localization/countries lazy ^\\.\\/.*\\.json$ namespace object","webpack:///./src/web-api/entry-views/entry-view-util.ts"],"names":["EntryStatus","isLookupField","property","type","isEntityType","propertyType","meta","name","baseType","fullName","FORM_ENTRY_TYPE_NAME","visitEntity","entity","callback","options","visited","Set","visit","parentProperty","arguments","length","undefined","has","add","_step","_iterator","_createForOfIteratorHelper","properties","_loop","p","value","followCircularProperties","containingType","followLookups","isList","forEach","item","s","n","done","err","e","f","visitType","path","_step2","_iterator2","substring","lastIndexOf","unregisterEntity","instance","key","id","toLowerCase","t","pool","__pool__","known","__known__","indexOfEntity","indexOf","splice","_regeneratorRuntime","exports","Op","Object","prototype","hasOwn","hasOwnProperty","defineProperty","obj","desc","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","enumerable","configurable","writable","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","fn","arg","call","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","method","_invoke","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","resolve","reject","invoke","record","result","_typeof","__await","then","unwrapped","error","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","methodName","return","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","i","displayName","isGeneratorFunction","genFun","ctor","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","o","allowArrayLike","it","Array","isArray","minLen","_arrayLikeToArray","toString","from","test","_unsupportedIterableToArray","F","_e","normalCompletion","didErr","step","_e2","arr","len","arr2","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","apply","_defineProperties","target","props","descriptor","input","hint","prim","toPrimitive","res","String","Number","_toPrimitive","_classCallCheck","Constructor","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","_possibleConstructorReturn","ReferenceError","_assertThisInitialized","bind","_wrapRegExp","re","groups","BabelRegExp","_super","RegExp","_groups","WeakMap","flags","_this","set","get","_setPrototypeOf","buildGroups","g","reduce","k","_inherits","exec","str","indices","replace","substitution","_","group","join","subClass","superClass","entryTokenRegex","entryToken","tryParseEntryToken","token","match","decodeURIComponent","success","ResumeMode","SubmissionResultStatus","EntryService","_ServiceWithSession","protoProps","staticProps","_super2","ServiceWithSession","generateReverseMapping","Page_Index","1","map","reverseMap","_i","_Object$keys","field","pageNum","validateProperty","_x","_x2","_x3","_x4","_validateProperty","_callee","prop","parent","parentHidden","isFieldShown","isLookup","lookupManager","conditions","relevantConditions","child","fieldShown","_iterator3","_step3","_p","_context","pageNumber","pageVisibleProp","concat","ready","filter","condition","find","some","c","code","endsWith","t0","t1","t2","validateByPage","_x5","_x6","_x7","_validateByPage","_callee2","startingPage","endingPage","maxPage","fields","_iterator4","_step4","_ret","_context3","Math","max","propName","_context2","v","validateEntry","_x8","_validateEntry","_callee3","_iterator5","_step5","_context4","parseStoreResult","responseData","sr","submissionResult","Status","status","message","exceptionMessage","Message","order","Data","auditRecordId","AuditRecordId","confirmationMessage","ConfirmationMessage","ViewType","hasValue","trim","$format","template","_len","_key","source","p1","index","parseInt","hasProp","removeEmptyProps","getFormatPrecision","format","precision","startsWith","capitalizeKeys","newObj","data","z","toUpperCase","substr","removeExtraSpace","text","escapeHtml","randomInt","scaleFactor","floor","random","randomText","includeDigits","remainingLength","chunk","chunkLength","min","isFormEntry","isSectionOrTable","isSignature","setBackReferenceProperties","ParentSection","Form","getProperty","changed","subscribeOne","newValue","propagateFormProperty","generateListItemId","version","listItemIndex","number","remainder","toBase62","n1","n2","randomByte1","randomByte2","n1Bytes","n2Bytes","randomByte","headerByte","combineUInt16sWithPadding","getListItemIdMap","list","idMap","Id","ensureListLength","itemType","isInteger","newItems","createSync","getFormEntry","ensureChildProperties","propertyName","formEntry","_unused","isNew","currentEntryVersion","Entry","Version","attempts","itemForId","ensureUniqueListItemId","getInitialSectionItems","container","count","itemInitializer","items","assign","ensureEnumInstances","enumValues","instances","EnumType","jstype","Name","DisplayName","getEnumInstance","Type","getEnumInstanceById","getEnumInstanceByName","AdminFormHandle","_FormHandle","formId","owner","form","formDef","_formAvailable","Deferred","this","promise","_get","$destroy","$el","remove","actionName","_this$form","actions","a","ActionName","Confirmation","FormHandle","isMoveOp","_ref","op","isRemoveOp","_ref2","last","opsByDescendingOrder","removeOps","pred","b","indexA","indexB","lastA","lastB","splitA","split","splitB","sort","CognitoJsonPatchFormatter","_formatters$jsonpatch","diff","_formatters$jsonpatch3","_slicedToArray","formatters","jsonpatch","partitionOps","moveOps","removedOps","restOps","removeOpsReverse","_toConsumableArray","delta","left","reorderOps","leftKey","movedFrom","isLast","default","compare","PatchContext","_Context2","pipe","nested","_createClass","hasResult","exiting","nextPipe","root","children","nextAfterChildren","Pipe","childName","addIdsToRepeatingSectionObjects","leftIsArray","_t","setResult","exit","right","includes","$id","filterName","arrayFilterPreventModificationsFromMissingItems","array","toRemove","toInsert","toModify","indexDiff","itemIndex","findIndex","objectHash","toInsertLength","insertion","toModifyLength","_loop2","modification","leftSide","arraysCollectPreventDuplicateCollections","applyTrivialPatch","nonNestedDelta","regexArgs","diffPatcher","propertyFilter","textDiff","minLength","MAX_SAFE_INTEGER","JSON","stringify","arrays","detectMove","processor","pipes","patch","_wrapNativeSuper","Class","_cache","Map","Function","Wrapper","_construct","Parent","jsonPatchFormatter","ConcurrentEntryConflict","_Error","ConcurrentEntryService","_EntryService","_resume","_emailResumeLink","_save","_submit","session","isAdmin","_this2","initialEntryJson","viewId","viewType","embedUrl","entryJson","diffPatch","_this3","serialize","force","useAliases","Order","performActionForNewEntry","Action","performActionForExistingEntry","PaymentToken","Role","User","response","Success","CardDeclined","OrderMismatch","PaymentDeclined","entryDocuments","documents","doc","link","encodeURIComponent","sessionToken","parseSubmissionError","resumePage","saveResult","postSaveEntryJson","saveAndResume","saveNewEntry","saveExistingEntry","clone","emailAddress","saveAndResumeRecipients","emailMessage","entryId","recipient","serviceRequest","endpoint","parseError","_x9","_x10","_x11","_callee4","params","parse","_x12","_x13","Table","action","role","CustomResponseError","patchedEntry","entryVersion","paymentToken","user","isCognitoJson","headers","getValidationHeaders","FormId","EntryId","EntryVersion","Patch","EntryToken","EmbedUrl","OrderAmount","UserInfo","IsStoragePatch","ViewId","IsFormView","EntryJson","AccessToken","accessToken","LastPageViewed","GenerateAssignment","IndexType","render","locals","_c","_self","_withStripped","components","IEx","ExClass","Vue","extend","toastListeners","messagesDisplayed","onClose","messageInstance","delete","customClass","_Message","_objectSpread","duration","showClose","exInstance","$mount","document","querySelector","appendChild","onToastMessageRequested","closeAllToastMessages","close","compileExpression","Cognito","expression","exportFn","Exports","Body","compile","matchesKeyword","keyword","_entity$meta$type$bas","getKeywordFunction","keywordFn","Keyword","keywordRegex","keywords","getStatusFunction","entryType","statusFn","PaymentStatus","_Cognito$Forms$EntryS","entryStatus","paymentStatus","Forms","EntryStatuses","entryStatuses","statusId","getEntryStatusById","_form$Order","defaultSort","ak","SortKey","bk","EntrySet","viewService","view","userShort","filterCriteria","unfilteredParent","service","indexes","entries","timestamp","sortCriteria","indexList","entryPosition","refreshPromise","pollEntryPromise","filterPromise","_getEntryJson","_loadEntryData","_getEntryByKey","_getEntry","_constructEntry","_loadAllEntries","_sort","_getFilterFunction","_filter2","_initializeFromCache","_cacheIndexes","_pollEntry","_refresh","isUserSpecific","roleId","progressCallback","task","getIndex","userSpecificSettings","compileTransactionalIndexes","cacheIndexes","getSpecificIndex","cachedIndexes","loadCachedIndexes","getEntryId","latestTimestamp","atobErrorLogged","getTimestamp","Checkpoint","Flush","clear","Add","Update","atob","console","log","validateCachedEntry","Delete","_callee5","filteredSet","filterTask","filterFn","_step2$value","_context5","getFilterFunction","refresh","pollEntry","loadAllEntries","getEntry","_callee6","filterExpression","customFilter","_context6","Invalid","Expression","getFilter","model","modelOptions","$namespace","fieldInfos","formEntryType","resolveType","fieldInfo","propertyPath","getPath","Path","size","_callee7","_context7","rebuildEntryPosition","index1","index2","getCachedEntry","idx","pos","entryIndex","entryIndexAt","keyFromIndex","typeCacheEntry","_callee8","entryPromises","_context8","all","cachedEntry","$etag","EntryETag","resetEntry","types","warn","_callee9","_context9","initialized","_callee10","_context10","markEntryInitialized","getEntryJson","constructEntry","_callee11","entryKey","_args11","_context11","_callee12","entryKeys","_this$service","_this$role","_args12","_context12","loadEntryData","_callee13","entryData","_args13","_context13","_callee14","_context14","initializeFromCache","_x14","_x15","_x16","_x17","_x18","_x19","_toPropertyKey","RequestCancelledError","innerError","CaptchaError","_Error2","InvalidSharedLinkError","_Error3","_super3","notAvailableMessage","PublicLinksDisabledError","_Error4","_super4","_this4","StripePaymentIntentError","_Error5","_super5","_this5","InternalServerError","_Error6","_super6","_this6","ForbiddenError","_Error7","_super7","_this7","isAxiosError","getAxiosError","hasInnerError","error2","error3","BaseService","apiKey","baseUrl","client","axios","baseURL","getSiteUrl","window","location","origin","xsrfCookieName","defaults","post","common","interceptors","request","use","modelSerialization","receiveServerTime","href","receiveSessionToken","_serviceRequest","_transformServiceRequestOptions","config","isAbsoluteURL","url","combineUrls","buildURL","paramsSerializer","passive","transformServiceRequestOptions","isCancel","transformErrorFromResponse","statusText","serverTime","FormsModel","serverTimeOffset","Date","getTime","event","CustomEvent","dispatchEvent","VueModel","Entity","_BaseService2","_super8","_this8","receiveAccessToken","addOrganizationHeader","validationMethod","validationToken","botValidation","organizationId","errorHeading","getResource","ToastMessage","parseSvcError","WrappedError","underlyingError","ensureError","defaultErrorMessage","CError","stack","additionalProperties","FriendlyError","_CError2","errorInfo","DateConverter","_PropertyConverter","specifier","getFullYear","getMonth","getDate","parseDate","date","parts","PropertyConverter","TimeConverter","getHours","getMinutes","getSeconds","fullDate","OrderConverter","ORDER_TYPE_NAME","IgnoreProperty","EnumConverter","propModelType","enum","IgnoreCircularReferenceConverter","InitializeBackReferencesConverter","shouldConvert","deserialize","isEntity","StoragePropertyInjector","results","countryNameWithParensExpr","countryNameWithCommaExpr","AddressExtensions","Country","country","CountryCode","locale","countryCode","countries","getAlpha2Code","cleansedName","nameWithoutSpaces","replaceAll","getCountryCode","$locale","validateRequiredAddress","enforceableFields","countryLabelUS","errorCount","label","validateZipCode","PostalCode","NameExtensions","validateRequiredName","firstIsMissing","First","lastIsMissing","Last","SignatureExtensions","validateRequiredSignature","Svg","CalculationConverter","isCalculated","DateTimeConverter","LookupConverter","lookupValue","YesNoConverter","defaultValue","convertFromString","exceptionRegex","EntryExtensionConverter","applyEntityInitExtensions","_Object$values","referenceProperties","isName","isAddress","initExisting","subscribe","update","ensurePropertyInitialized","IgnoreFileUploadConverter","entryTypeName","IgnoreSignaturePropertiesConverter","getActiveEntryStatus","statusIdOrName","newStatus","Entry_Statuses","ReplacementId","applyWorkflowActionExtensions","formsModel","actionDataMap","Action_IsLocked","Attempted_Action","Workflow_Actions","actionType","actionData","Allowed_Actions","function","IsAllowed","IsArchived","dependsOn","entryMetaType","initDefaultAction","firstAllowedAction","addRule","execute","Form_ReadOnly","onChangeOf","getPaths","register","addWorkflowActionsProperty","Next_Status","entryMeta","nextStatus","NewStatus","addWorkflowNextStatusProperty","EntryMetaConverter","statuses","isEntryIncomplete","DateSubmitted","getDefaultStatus","_arrayWithHoles","_s","_r","_arr","_n","_d","_iterableToArrayLimit","_nonIterableRest","localeResources","cultureInfo","lookupValueResolver","preventVueObservability","captureEnumValues","preprocessOptions","autogeneratePropertyLabels","maxEventScopeDepth","maxExitingEventScopeTransferCount","configureSerialization","applyCustomTypeExtensions","Address","Signature","$disableWorkflowActions","captureActionData","Require_Payment","Require_Payment_Expression","Save_Card_Agreement","required","newOrderState","IsOpen","orderType","Rebuild_Count","SubTotal","LineItems","subtotal","Amount","AdditionalFees","Fees","fee","IsProcessingFee","total","ProcessingFees","AmountDue","AmountPaid","OrderSummary","AmountDeclined","applyPaymentExtensions","postprocessModel","_createModel","_constructAsync","lookupMappings","_Object$entries","_Object$entries$_i","typeName","typeDef","$storageProperties","alias","serializer","registerPropertyAlias","_i2","_Object$entries2","_Object$entries2$_i","propDef","$lookupFieldInfo","registerValueResolver","initialValueResolver","registerPropertyConverter","registerPropertyInjector","_args","getIdFromState","constructAsync","modelType","_args2","formatNumber","formatDate","parseNumber","expandDateFormat","$version","entryViewService","getLookupManager","getCascadeFilterManager","pseudoLoadDeleted","suppressLookupLoadingErrors","extendModelWithLookups","resourceName","$resources","lookup","$enum","$extends","$data","utcOffset","$utcOffset","$culture","CultureInfo","typeExtensions","typeExtension","enumTypeName","enumJsType","getJsType","enumType","originalGet","countriesModule","registerLocale","definedLocales","defineResources","importOptionalModule","_importOptionalModule","pendingModules","modulePromise","_args4","isRootLookupProperty","isNestedLookupProperty","isCascadeFilterProperty","getManagerPropName","lookupProperty","isIncluded","isIncludedMethod","getIsIncludedMethodName","addLookupFilterRules","lookupInfo","manager","whenReady","clearInvalidValues","updateFilteredIndexes","filterPaths","isDefaulted","AdditionalValues","FieldId","Value","isDefaultedMethod","getIsDefaultedMethodName","addLookupDefaultRules","isInited","Property$pendingInit","updateDefaultIndexes","onInit","defaultPaths","onInitExisting","addLookupManagerProperty","_defineProperty","indexType","indexTypeName","LookupManager","addCascadeFilterManagerProperty","cascadeProperty","filterInfo","cascadeManagerProp","lookupPropertyName","indexProperty","indexPropertyName","priorFilters","CascadeFilterManager","lookupViews","currentType","cascadeManagersToInitialize","currentProperty","$disableLookupFiltering","addCascadeFilterManager","ids","loaded","unloadedIds","dataLoaded","lookupEntries","reason","networkError","_networkError$config","_networkError$config2","_networkError$config3","timeout","unloaded","trace","Source","Unloaded","FormStatus","FormStatusProp","Default","validator","OrderBuilder","requirePayment","lineItemMetaData","transactionFees","processingFees","applicationFee","domesticCountryCode","processingFeeDescription","processorName","europeanCountries","processorFeeModes","$resource","idIndex","cardData","additionalFees","processorFee","Line_Item_Metadata","Transaction_Fees","Processing_Fees","Application_Fee","Domestic_Country_Code","Processing_Fee_Description","European_Countries","Processor_Fee_Modes","billingFieldPaths","billingField","paths","parentEntity","Billing_Name_Field","Email","Billing_Email_Field","Billing_Address_Field","Phone","Billing_Phone_Field","sum","lineItems","fees","tFee","Description","amount","FixedAmount","PercentageAmount","roundCurrency","processingFee","calculateProcessingFee","updateLineItems","orderInfo","billingFields","orderAmount","lineItemData","lst","propertyList","propertyLineItems","generateLineItems","item1","item2","idCompare","GroupId","gLineItem","Group","i1","i2","groupId","isConstant","visibleProp","createLineItems","createListLineItems","entityList","containerLineItems","listProp","itemLabel","groupIdLastHalf","ItemNumber","itemGroupId","parentType","getLineItemName","lineItem","createLineItem","selectedChoicesProperty","selectedChoices","createLookupCheckboxLineItems","createChoiceCheckboxLineItems","amountProperty","description","getLineItemDescription","lineItemIsNegative","allowNegatives","zeroDollarLineItem","hasUnspecifiedQuantity","quantitySelected","choiceOrLookupHasNoValue","yesNoHasFalseValue","lookupEntry","labelFormat","pricePath","choicesProperty","choiceOptions","choiceOption","Label","Price","descriptionProperty","quantityValue","nameProperty","labelIsFormat","isWithinTable","Save_Customer_Card","Card","getCardFee","getMaximumFee","percent","fixed","feeAmt","totalWithFees","maxFee","maxFeeAmount","feeAmount","isAmex","Brand","isEuropean","isInternational","Modes","getFlags","Mode","priorityFees","k1","k2","num","digits","multiplier","pow","nFixed","toFixed","nInt","nDecimals","round","roundToPrecision","numberFormat","CurrencyDecimalDigits","f1","f2","rebuildOrder","rebuildOrderOptions","_order$LineItems","_order$Fees","Fee","Payment","LineItem","orderBuilder","d","_initializerDefineProperty","initializer","_applyDecoratedDescriptor","decorators","decorator","findLookupManagers","managers","pooledIndex","getPooledIndex","av","_dec","Prop","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","Component","_class2","_Vue","_setDefaultValue","_initialize","_created","_descriptor","_descriptor2","_descriptor3","_descriptor4","_descriptor5","_descriptor6","_descriptor7","entrySet","initializing","isValid","syntheticIndexes","filteredIndexes","defaultIndexes","readyTask","isUpdatingFilter","recursionDepth","lastSetDefaultValueId","isValidView","initialize","missing","syntheticIndex","listIndex","listValue","getIndexItem","Summary","summaryFormat","descriptionFormat","unshift","$emit","$nextTick","fromRule","setTimeout","setLookupValue","oldDefaultIndexes","setDefaultValue","previouslyHadDefaultIndexes","setDefaultValueId","getEntryById","ignoreFilter","_class","propsData","Watch","$once","valueFromFilterField","prerequisites","fromEntries","prior","filterField","requiredFunc","every","priorFormat","priorValue","indexValueFormatted","indexValue","allowedStrings","flatMap","extract","isAllowed","setFieldValue","batchUpdate","updateArray","convertToString","getOwnPropertyDescriptor","isEntryWithOrder","module","receiver","base","_superPropBase","FormViewFormHandle","_AdminFormHandle","_setNewEntry","_setCorrectFormAvailability","_disableChangeDetection","_enableChangeDetection","_addChangesDetected","_afterSubmit","_changeView","_isFormAvailable","changeHandler","publicRoleUnavailable","afterSubmitEventData","isPublic","showPageBreaks","roleName","formAvailable","on","FormEvents","AfterSubmit","afterSubmit","BeforeSubmit","beforeSubmit","AfterSave","setNoChanges","once","Ready","componentEl","__vue__","disableChangeDetection","available","registerViewToken","entryService","registerView","formViewComponent","redirecting","redirectingToEntryView","redirectUrl","RedirectUrl","convertedMessage","showConfirmationMessage","showConfirmationPage","handler","enableChangeDetection","afterPropertySet","listChanged","emit","FormEvent","ActivityPerformed","entryInstance","userInfo","Pending","setCorrectFormAvailability","activityPerformed","quantityService","hasInitialState","updateInitialEntryJson","allowedActions","withTransitionsDisabled","registerEntry","showConfirmation","showReceipt","submitStatus","readonly","$source","ResetEntry","__esModule","addClass","el","cls","curClass","className","classes","j","clsName","classList","hasClass","getStyle","getScrollContainer","off","isScroll","isInContainer","removeClass","setStyle","element","styleName","camelCase","ieVersion","style","isServer","$isServer","SPECIAL_CHARS_REGEXP","MOZ_HACK_REGEXP","documentMode","separator","letter","offset","addEventListener","attachEvent","removeEventListener","detachEvent","contains","listener","filters","opacity","currentStyle","computed","defaultView","getComputedStyle","vertical","documentElement","parentNode","elRect","getBoundingClientRect","containerRect","top","innerWidth","bottom","innerHeight","functional","_h","_vm","_v","class","classNames","staticClass","staticStyle","attrs","rest","ownKeys","enumerableOnly","getOwnPropertySymbols","symbols","sym","getOwnPropertyDescriptors","defineProperties","ignoredExceptions","Log","isEnabled","appInsights","mod","AppInsightsCtor","addTelemetryInitializer","ignoreUselessErrors","iKey","baseData","metadata","uri","cleanseUrl","responseCode","errorHandler","onError","warnHandler","onWarning","_trace","_metric","_customEvent","_warn","_stopTrackEvent","_startTrackEvent","_pageLoad","InternalName","_error","cError","pageView","eventName","customEvent","metricName","metric","_yield$Log$appInsight","startTrackEvent","measurements","_yield$Log$appInsight2","stopTrackEvent","formName","_error2","isWarning","logCustomEvent","logMetric","_x20","_x21","logTrace","_x22","_x23","_x24","patterns","blankOut","$root","$vm","getInstance","modules","installedModules","__webpack_require__","moduleId","l","m","getter","r","mode","ns","0","__webpack_exports__","normalizeComponent","scriptExports","staticRenderFns","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","_compiled","_scopeId","$vnode","ssrContext","__VUE_SSR_CONTEXT__","_registeredComponents","_ssrRegister","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","16","24","6","76","external_vue_","external_vue_default","handleAfterLeave","directives","rawName","visible","iconClass","center","positionStyle","mouseenter","clearTimer","mouseleave","startTimer","typeClass","dangerouslyUseHTMLString","domProps","innerHTML","click","typeMap","warning","src_mainvue_type_script_lang_js","closed","verticalOffset","timer","watch","newVal","methods","removeChild","clearTimeout","keyCode","keydown","componentNormalizer","main","popup_","vdom_","MessageConstructor","seed","userOnClose","$slots","body","offsetHeight","zIndex","nextZIndex","removedHeight","dom","closeAll","src_main","TaskDashboardFormHandle","_performAction","_setEntry","_setExistingEntry","_entrySetAvailable","augmentSubmitEvent","entrySetAvailable","workflowRoles","workflowRole","setEntry","loadingComplete","_args7","submission","submit","resourceMessage","getConfirmationMessage","generateId","escapeRegexpString","coerceTruthyValueToArray","capitalize","autoprefixer","arrayFindIndex","arrayFind","arrayEquals","getPropByPath","strict","tempObj","keyArr","getValueByPath","looseEqual","kebabCase","isIOS","isIE","isFirefox","isEqual","isEmpty","isEdge","noop","objToArray","rafThrottle","locked","requestAnimationFrame","toObject","valueEquals","_vue","_types","to","_from","current","navigator","userAgent","platform","maxTouchPoints","prefixes","rule","prefix","hyphenateRE","isString","isObjectA","isObject","isObjectB","arrayA","arrayB","value1","value2","isFunction","isDefined","isHtmlElement","node","nodeType","Node","ELEMENT_NODE","isUndefined","functionToCheck","_interopRequireDefault","_merge","_popupManager","PopupManager","_scrollbarWidth","_dom","scrollBarWidth","idSeed","openDelay","closeDelay","modal","modalFade","modalClass","modalAppendToBody","lockScroll","closeOnPressEscape","closeOnClickModal","_popupId","deregister","closeModal","restoreBodyStyle","opened","bodyPaddingRight","computedBodyPaddingRight","withoutHiddenClass","rendered","_opening","open","nextTick","$props","_closeTimer","_openTimer","doOpen","willOpen","_closing","openModal","hasAttribute","paddingRight","bodyHasOverflow","clientHeight","scrollHeight","bodyOverflowY","setAttribute","position","onOpen","doAfterOpen","willClose","doClose","doAfterClose","removeAttribute","outer","createElement","visibility","width","widthNoScroll","offsetWidth","overflow","inner","widthWithScroll","hasModal","hasInitZIndex","getModal","modalDom","preventDefault","stopPropagation","doOnModalClick","modalStack","topItem","tabIndex","display","$ELEMENT","topPopup","getTopPopup","handleClose","handleAction","isVNode","_util","webpackAsyncContext","req","OrderETag","OrderId","Scope","dot"],"mappings":"gGAAA,kCAAO,IAAKA,EAAW,SAAXA,GAAW,OAAXA,EAAW,kBAAXA,EAAW,cAAXA,EAAW,kBAAXA,EAAW,M,6zC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,KAK5B,OAJIw2D,EAAM,IACTD,EAAQ7vC,EAAQnR,OAAOihD,EAAM,GAC7B9vC,EAAUA,EAAQnR,OAAO,EAAGihD,IAEtB,CACN9vC,UACA6vC,QACA5kC,YACA0kC,YACAC","file":"155.a0e18eb6317c86c31b17.js","sourcesContent":["export enum EntryStatus {\r\n\tDefault = 'default',\r\n\tReady = 'ready',\r\n\tPending = 'pending'\r\n}","import type { ObservableArray, Type, Entity, Property } from '@cognitoforms/model.js';\r\nimport { isEntityType } from '@cognitoforms/model.js';\r\nimport { FORM_ENTRY_TYPE_NAME } from 'src/framework/forms-model';\r\n\r\n/**\r\n * Determine if the field is a lookup based off property name and type.\r\n * @param property\r\n * @returns boolean\r\n */\r\nexport function isLookupField(property: Property): boolean {\r\n\tconst type = isEntityType(property.propertyType) && property.propertyType.meta;\r\n\treturn property.name !== 'ParentSection' && property.name !== 'Form' && type && type.baseType && type.baseType.fullName === FORM_ENTRY_TYPE_NAME;\r\n}\r\n\r\n/**\r\n * Recursively visit all model properties of the provided entity.\r\n */\r\nexport function visitEntity(\r\n\tentity: Entity,\r\n\tcallback: (entity: Entity, property: Property, parentProperty: Property | null) => void,\r\n\toptions: { followCircularProperties: boolean, followLookups: boolean }\r\n) {\r\n\tconst visited = new Set();\r\n\r\n\tfunction visit(entity: Entity, parentProperty: Property = null) {\r\n\t\tif (entity === null || entity === undefined || visited.has(entity))\r\n\t\t\treturn;\r\n\r\n\t\tvisited.add(entity);\r\n\r\n\t\tfor (const p of entity.meta.type.properties) {\r\n\t\t\t// Don't visit circular properties\r\n\t\t\tif (!options.followCircularProperties && (p.name === 'ParentSection' || (p.name === 'Form' && p.containingType.fullName !== FORM_ENTRY_TYPE_NAME)))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tcallback(entity, p, parentProperty);\r\n\r\n\t\t\tif (!options.followLookups && isLookupField(p))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (isEntityType(p.propertyType)) {\r\n\t\t\t\tif (p.isList)\r\n\t\t\t\t\t(p.value(entity) as Entity[] || []).forEach(item => visit(item, p));\r\n\t\t\t\telse\r\n\t\t\t\t\tvisit(p.value(entity), p);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvisit(entity);\r\n}\r\n\r\nexport function visitType(type: Type, callback: (type: Type, path: string) => void) {\r\n\tconst visited = new Set();\r\n\tlet path = '';\r\n\tfunction visit(type: Type) {\r\n\t\tif (type === null || type === undefined || visited.has(type))\r\n\t\t\treturn;\r\n\r\n\t\tvisited.add(type);\r\n\t\tcallback(type, path);\r\n\r\n\t\tfor (const p of type.properties) {\r\n\t\t\tif (isEntityType(p.propertyType)) {\r\n\t\t\t\tif (path.length)\r\n\t\t\t\t\tpath += '.';\r\n\r\n\t\t\t\tpath += p.name;\r\n\t\t\t\tvisit(p.propertyType.meta);\r\n\t\t\t\tpath = path.substring(0, path.lastIndexOf('.'));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tvisit(type);\r\n}\r\n\r\n/**\r\n * Remove the given entity from the model.js instance pool and known objects array\r\n */\r\nexport function unregisterEntity(instance: Entity): void {\r\n\tconst key = instance.meta.id.toLowerCase();\r\n\tfor (let t: Type = instance.meta.type; t; t = t.baseType) {\r\n\t\t// Remove the entity from the pool\r\n\t\tconst pool = (t as any).__pool__ as { [id: string]: Entity };\r\n\t\tif (pool && key in pool) {\r\n\t\t\tdelete pool[key];\r\n\t\t}\r\n\r\n\t\t// Remove the entity from the known entities list\r\n\t\tconst known = (t as any).__known__ as ObservableArray;\r\n\t\tif (known) {\r\n\t\t\tconst indexOfEntity = known.indexOf(instance);\r\n\t\t\tif (indexOfEntity)\r\n\t\t\t\tknown.splice(indexOfEntity, 1);\r\n\t\t}\r\n\t}\r\n}\r\n","import { ServiceWithSession } from './base-service';\r\nimport type { FormEntry } from '@cognitoforms/types/server-types/forms/model/form-entry';\r\nimport type { QuantityData } from './quantity-service';\r\nimport type { Entity, EntityOfType, Property } from '@cognitoforms/model.js';\r\nimport { isLookupField } from 'src/util/model';\r\nimport type { FormEntryExtensions } from 'src/framework/model/extensions/form-entry-extensions';\r\n\r\n// Regex for an entry token\r\nconst entryTokenRegex = /#?(?.{44}[*!])/;\r\n\r\nexport function tryParseEntryToken(token: string): { success: boolean; entryToken?: string; } {\r\n\ttoken = decodeURIComponent(token);\r\n\tconst match = token.match(entryTokenRegex);\r\n\tif (match)\r\n\t\treturn {\r\n\t\t\tsuccess: true,\r\n\t\t\tentryToken: match.groups.entryToken\r\n\t\t};\r\n\telse\r\n\t\treturn { success: false };\r\n}\r\n\r\ntype BaseEntryStoreResult = {\r\n\tstatus: SubmissionResultStatus,\r\n\tentry?: any,\r\n\torder?: any,\r\n\tmessage?: string,\r\n\tdata?: any\r\n}\r\n\r\nexport type EntryDocument = {\r\n\tlink: string;\r\n\ttitle: string;\r\n\ttype: string;\r\n}\r\n\r\nexport type EntrySubmissionResult = BaseEntryStoreResult & {\r\n\tdocuments?: EntryDocument[],\r\n\tentryToken?: string,\r\n\tauditRecordId?: string,\r\n\tconfirmationMessage?: string\r\n}\r\n\r\nexport type EntrySaveResult = BaseEntryStoreResult & {\r\n\temailAddress: string;\r\n\temailMessage: string;\r\n\tlink: string;\r\n\tentryToken: string;\r\n\tenableSend: boolean;\r\n}\r\n\r\nexport enum ResumeMode {\r\n\tView = 'View',\r\n\tEdit = 'Edit'\r\n}\r\n\r\nexport enum SubmissionResultStatus {\r\n\tSuccess = 'Success',\r\n\tAlreadyPaid = 'AlreadyPaid',\r\n\tQuantityLimitExceeded = 'QuantityLimitExceeded',\r\n\tPaymentDeclined = 'PaymentDeclined',\r\n\tCardDeclined = 'CardDeclined',\r\n\tOrderMismatch = 'OrderMismatch',\r\n\tAlreadySubmitted = 'AlreadySubmitted',\r\n\tUnknown = 'Unknown',\r\n\tError = 'Error'\r\n}\r\n\r\nexport type ResumeEntryResult = {\r\n\tentry: any;\r\n\torder?: any;\r\n\tmode: ResumeMode;\r\n\tlastPageViewed?: string;\r\n\tuserEmail?: string;\r\n\trole?: string;\r\n}\r\n\r\nexport abstract class EntryService extends ServiceWithSession {\r\n\tabstract submit(entry: EntityOfType, embedUrl: string, entryToken: string): Promise;\r\n\r\n\tabstract save(entry: EntityOfType, embedUrl: string, entryToken: string, resumePage?: number): Promise;\r\n\r\n\tabstract emailResumeLink(entryId: string, recipient: string, message: string, link: string): void;\r\n\r\n\tabstract resume(formId: string, entryToken: string): Promise;\r\n};\r\n\r\nfunction generateReverseMapping(entry: EntityOfType) {\r\n\tif (!entry.Page_Index)\r\n\t\treturn { 1: entry.meta.type.properties.map(p => p.name) };\r\n\r\n\tconst reverseMap = {};\r\n\tfor (const field of Object.keys(entry.Page_Index)) {\r\n\t\tconst pageNum = entry.Page_Index[field];\r\n\r\n\t\tif (!reverseMap[pageNum])\r\n\t\t\treverseMap[pageNum] = [];\r\n\r\n\t\treverseMap[pageNum].push(field);\r\n\t}\r\n\r\n\treturn reverseMap;\r\n}\r\n\r\nasync function validateProperty(entity: Entity, prop: Property, parent: Entity, parentHidden: boolean): Promise {\r\n\t// If this isn't an entity type, return\r\n\tif (!entity || !entity.meta || !entity.meta.conditions)\r\n\t\treturn true;\r\n\r\n\t// Only validate fields that are visible on entry\r\n\tconst isFieldShown = (property: any) => {\r\n\t\tif (entity[property.name] === undefined)\r\n\t\t\treturn false;\r\n\r\n\t\t// Skip over fields on hidden pages\r\n\t\tif (!parent && (entity as EntityOfType).Page_Index) {\r\n\t\t\tconst pageNumber = (entity as EntityOfType).Page_Index[property.name];\r\n\t\t\tconst pageVisibleProp = `Page${pageNumber}Visible`;\r\n\t\t\tif (entity[pageVisibleProp] === false)\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Skip fields that are hidden\r\n\t\tif (entity[property.name + '_Visible'] === false)\r\n\t\t\treturn false;\r\n\r\n\t\t// Skip payment since suppressed here\r\n\t\tif (property.name === 'Save_Card_Agreement')\r\n\t\t\treturn false;\r\n\r\n\t\tif (parentHidden)\r\n\t\t\treturn false;\r\n\r\n\t\treturn true;\r\n\t};\r\n\r\n\tconst isLookup = isLookupField(prop);\r\n\tif (isLookup) {\r\n\t\tconst lookupManager = entity[prop.name + '_LookupManager'];\r\n\t\tif (lookupManager)\r\n\t\t\tawait lookupManager.ready;\r\n\t}\r\n\r\n\t// If the specified property has a condition that isn't met, return false\r\n\tconst conditions = entity.meta.conditions;\r\n\tconst relevantConditions = conditions.filter(condition => {\r\n\t\treturn condition.properties.find(p => p.name === prop.name);\r\n\t});\r\n\tif (isFieldShown(prop)) {\r\n\t\tif (relevantConditions.some(c => c.properties.some(p => p.name === prop.name)))\r\n\t\t\treturn false;\r\n\t}\r\n\t// Need to always validate hidden quantity limits\r\n\telse if (entity[prop.name + '_QuantityLimit'] !== undefined) {\r\n\t\tif (relevantConditions.some(c => c.condition.type.code.endsWith('.QuantityValidation')))\r\n\t\t\treturn false;\r\n\t}\r\n\r\n\t// Recursively check sections and repeating sections for unmet conditions\r\n\t// Avoid recursively validating invisible children, lookups, and 'entity.Form'\r\n\tif (!isLookup && prop.name !== 'Form') {\r\n\t\tconst child = entity[prop.name];\r\n\r\n\t\t// Rating scales reference their parent section, skip this property\r\n\t\tif (child === parent)\r\n\t\t\treturn true;\r\n\r\n\t\tconst fieldShown = isFieldShown(prop);\r\n\r\n\t\t// Recursively check each element in repeating sections and tables\r\n\t\tif (prop.isList) {\r\n\t\t\tif (!Array.isArray(child))\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tfor (const item of child) {\r\n\t\t\t\tif (!item || !item.meta)\r\n\t\t\t\t\treturn true;\r\n\r\n\t\t\t\tfor (const p of item.meta.type.properties) {\r\n\t\t\t\t\tif (!await validateProperty(item, p, entity, !fieldShown))\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Recursively check sections\r\n\t\telse if (typeof child === 'object') {\r\n\t\t\tif (!child || !child.meta)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tfor (const p of child.meta.type.properties) {\r\n\t\t\t\tif (!await validateProperty(child, p, entity, !fieldShown))\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nexport async function validateByPage(entry: EntityOfType, startingPage?: number, endingPage?: number): Promise {\r\n\tconst reverseMap = generateReverseMapping(entry);\r\n\tconst maxPage = Math.max.apply(undefined, Object.keys(reverseMap));\r\n\tfor (let i = 1; i < maxPage + 1; i++) {\r\n\t\t// Need this for blank pages\r\n\t\tif (reverseMap[i]) {\r\n\t\t\t// Get all fields on page 'i'\r\n\t\t\tconst fields = reverseMap[i] as string[];\r\n\t\t\tfor (const propName of fields) {\r\n\t\t\t\tconst property = entry.meta.type.properties.find(p => p.name === propName);\r\n\r\n\t\t\t\t// This should only evaluate QLs on unavailable pages\r\n\t\t\t\tif (startingPage && endingPage && (i < startingPage || i > endingPage)) {\r\n\t\t\t\t\tif (!await validateProperty(entry, property, null, true))\r\n\t\t\t\t\t\treturn i;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// If this field is not valid, return the page number\r\n\t\t\t\tif (!await validateProperty(entry, property, null, false))\r\n\t\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nexport async function validateEntry(entity: Entity): Promise {\r\n\tfor (const prop of entity.meta.type.properties) {\r\n\t\tif (!await validateProperty(entity, prop, null, false))\r\n\t\t\treturn false;\r\n\t}\r\n\treturn true;\r\n}\r\n\r\n// TODO: Do we need to transform the result? It seems like it would be easier to reason about if the data the client worked with was the same shape as the data the server responded with.\r\nexport function parseStoreResult(responseData: any) {\r\n\tconst sr = responseData.submissionResult || { Status: 'Unknown' };\r\n\r\n\t// Return the entry submission result\r\n\treturn {\r\n\t\tstatus: SubmissionResultStatus[sr.Status as string],\r\n\t\tmessage: responseData.exceptionMessage || sr.Message,\r\n\t\tentry: responseData.entry,\r\n\t\torder: responseData.order,\r\n\t\tresponseData: sr.Data as QuantityData[],\r\n\t\tentryToken: responseData.entryToken,\r\n\t\tauditRecordId: sr.AuditRecordId,\r\n\t\tconfirmationMessage: sr.ConfirmationMessage\r\n\t};\r\n}","/**\r\n * This is a TypeGen auto-generated file.\r\n * Any changes made to this file can be lost when this file is regenerated.\r\n */\r\n\r\nexport enum ViewType {\r\n\tTable = 'Table',\r\n\tForm = 'Form',\r\n}\r\n","/**\r\n * Determine whether the given value satisfies \"required\" validation\r\n * NOTE: Taken from 'RequiredRule.hasVavlue' in ExoWeb\r\n * @param val The value to test for requiredness\r\n */\r\nexport function hasValue(val: any): boolean {\r\n\treturn val !== undefined && val !== null && (typeof val !== 'string' || val.trim() !== '') && (!(val instanceof Array) || val.length > 0);\r\n}\r\n\r\n/**\r\n * Evaluates a numerical index based format string, akin to `String.format()` in .NET.\r\n * NOTE: Take from $format in ExoWeb...\r\n * @param template The format template string\r\n * @param values The values to insert for tokens in the template string\r\n */\r\nexport function $format(template: string): string;\r\nexport function $format(template: string, values: unknown[]): string;\r\nexport function $format(template: string, ...values: unknown[]): string;\r\nexport function $format(template: string, ...args: unknown[]): string {\r\n\tif (!args || args.length === 0) return template;\r\n\r\n\tconst source = args.length === 1 && (args[0] instanceof Array)\r\n\t\t? args[0]\r\n\t\t: args;\r\n\r\n\treturn template.replace(/\\{([0-9]+)\\}/ig, function (match: string, p1: string): string {\r\n\t\tconst index = parseInt(p1, 10);\r\n\t\tlet result = source[index];\r\n\r\n\t\tif (result !== null && result !== undefined && typeof result !== 'string') {\r\n\t\t\t// Convert non string values to string\r\n\t\t\tresult = result.toString();\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t});\r\n}\r\n\r\n/**\r\n * Shorthand for `Object.hasOwnProperty`\r\n */\r\n// todo: necessary?\r\nexport function hasProp(obj: any, prop: string): boolean {\r\n\treturn Object.prototype.hasOwnProperty.call(obj, prop);\r\n}\r\n\r\n/**\r\n * Clones the top-level own properties of an object\r\n * @param obj The object to clone\r\n */\r\n// todo: necessary? Object.assign() accomplishes the same\r\nexport function shallowClone(obj: T): T {\r\n\tconst result: any = {};\r\n\tfor (const prop in obj) {\r\n\t\tif (hasProp(obj, prop)) {\r\n\t\t\tresult[prop] = obj[prop];\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}\r\n\r\n/**\r\n * Performs a deep removal of null and undefined properties from an object.\r\n * @param obj The object from which to remove properties\r\n */\r\nexport function removeEmptyProps(obj) {\r\n\tObject.keys(obj).forEach(k => {\r\n\t\tif (obj[k] && typeof obj[k] === 'object')\r\n\t\t\tremoveEmptyProps(obj[k]);\r\n\t\telse if (obj[k] === null || obj[k] === undefined)\r\n\t\t\tdelete obj[k];\r\n\t});\r\n\treturn obj;\r\n};\r\n\r\n/**\r\n * Gets the precision of the format\r\n * @param format String of the format ex. \"C\", \"P1\", \"N0\"\r\n * @returns Number\r\n */\r\nexport function getFormatPrecision(format: string) {\r\n\tif (format === 'C')\r\n\t\treturn 2;\r\n\r\n\tlet precision = parseInt(format.replace(/[^0-9]/, '')) || 0;\r\n\r\n\tif (format.startsWith('P'))\r\n\t\tprecision += 2;\r\n\r\n\treturn precision;\r\n}\r\n\r\n/**\r\n * Returns a string with the first letter Capitalized\r\n * @param val\r\n * @returns String\r\n */\r\nexport function capitalizeString(val: string) {\r\n\tif (!val)\r\n\t\treturn val;\r\n\telse\r\n\t\treturn val.charAt(0).toUpperCase() + val.substr(1);\r\n}\r\n\r\n/**\r\n * Recursively capitalizes property keys within an object. Does not modify the provided object.\r\n * @param obj The object on which to recursively capitalize property keys.\r\n * @returns Object\r\n */\r\nexport function capitalizeKeys(obj) {\r\n\tif (!obj)\r\n\t\treturn;\r\n\telse if (typeof obj === 'string')\r\n\t\treturn obj;\r\n\r\n\tconst keys = Object.keys(obj);\r\n\tlet n = keys.length;\r\n\tconst newObj = {};\r\n\twhile (n--) {\r\n\t\tconst key: string = keys[n];\r\n\t\tlet data;\r\n\t\tif (Array.isArray(obj[key]))\r\n\t\t\tdata = obj[key].map(z => {\r\n\t\t\t\treturn capitalizeKeys(z);\r\n\t\t\t});\r\n\t\telse if (typeof(obj[key]) === 'object')\r\n\t\t\tdata = capitalizeKeys(obj[key]);\r\n\t\telse\r\n\t\t\tdata = obj[key];\r\n\r\n\t\tnewObj[capitalizeString(key)] = data;\r\n\t}\r\n\treturn newObj;\r\n};\r\n\r\nexport function removeExtraSpace(text: string): string {\r\n\treturn text.replace(/ {2,}/g, ' ').trim();\r\n};\r\n\r\nexport function escapeHtml(value: string) {\r\n\treturn value ? value\r\n\t\t.replace(/&/g, '&')\r\n\t\t.replace(/\"\"/g, '"')\r\n\t\t.replace(/'/g, ''')\r\n\t\t.replace(//g, '>')\r\n\t\t: value;\r\n}\r\n","export function randomInt(max: number = 9) {\r\n\t// https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-with-javascript/\r\n\tconst scaleFactor = max + 1;\r\n\treturn Math.floor(Math.random() * scaleFactor);\r\n}\r\n\r\nexport function randomText(length: number = 1, includeDigits: boolean = false): string {\r\n\tlet str: string = '';\r\n\twhile (str.length < length) {\r\n\t\tconst remainingLength = length - str.length;\r\n\t\t// https://gist.github.com/6174/6062387\r\n\t\tlet chunk = Math.random().toString(36).substring(2);\r\n\t\tif (!includeDigits) chunk = chunk.replace(/[0-9]/g, '');\r\n\t\tconst chunkLength = Math.min(chunk.length, remainingLength);\r\n\t\tstr += chunk.substr(0, chunkLength);\r\n\t}\r\n\treturn str;\r\n}\r\n","import type { Entity, EntityOfType, EntityConstructorForType, Type } from '@cognitoforms/model.js';\r\nimport type { FormEntry } from '@cognitoforms/types/server-types/forms/model/form-entry';\r\nimport type { Signature } from '@cognitoforms/types/server-types/model/signature';\r\nimport { randomText, randomInt } from 'src/util/random';\r\nimport { combineUInt16sWithPadding } from 'src/util/combined-number';\r\nimport { toBase62 } from 'src/util/base62';\r\nimport type { ObjectLookup } from '@cognitoforms/model.js/@types/helpers';\r\n\r\nexport type DynamicEntity = {\r\n\tId: string;\r\n};\r\n\r\nexport type RepeatingSectionOrTable = DynamicEntity & {\r\n\tItemNumber: number;\r\n};\r\n\r\nexport type SectionOrTable = DynamicEntity & {\r\n\tForm: FormEntry;\r\n};\r\n\r\nexport type NestedSectionOrTable = SectionOrTable & {\r\n\tParentSection: DynamicEntity | FormEntry;\r\n};\r\n\r\nfunction isFormEntry(entity: Entity): entity is EntityOfType {\r\n\treturn entity.meta.type.baseType && entity.meta.type.baseType.fullName === 'Forms.FormEntry';\r\n}\r\n\r\nfunction isSectionOrTable(entity: Entity): entity is EntityOfType {\r\n\treturn !isFormEntry(entity) && 'Form' in entity;\r\n}\r\n\r\nfunction isNestedSectionOrTable(entity: Entity): entity is EntityOfType {\r\n\treturn 'ParentSection' in entity;\r\n}\r\n\r\nexport function isSignature(entity: Entity): entity is EntityOfType {\r\n\treturn entity.meta.type.fullName === 'Signature';\r\n}\r\n\r\n/**\r\n * Either set the child's `Form` property, or propogate it from the parent when it is set\r\n * @param parent The parent entity (either a FormEntry or Section/RepeatingSection/TableRow entity)\r\n * @param child The child entity\r\n */\r\nfunction propagateFormProperty(parent: EntityOfType, child: EntityOfType) {\r\n\t// In case the parent's Form property is not yet set, propagate when it is set\r\n\tif (isSectionOrTable(parent) && parent.Form)\r\n\t\tchild.Form = parent.Form;\r\n\telse\r\n\t\tparent.meta.type.getProperty('Form').changed.subscribeOne(e => (child.Form = e.newValue));\r\n}\r\n\r\n/**\r\n * Set \"backreference\" properties (i.e. `Form` and `ParentSection`) on a child entity\r\n * @param parent The parent entity (either a FormEntry or Section/RepeatingSection/TableRow entity)\r\n * @param child The child entity\r\n */\r\nfunction setBackReferenceProperties(parent: EntityOfType, child: EntityOfType) {\r\n\tif (isNestedSectionOrTable(child)) {\r\n\t\tchild.ParentSection = parent;\r\n\t\tpropagateFormProperty(parent, child);\r\n\t}\r\n\telse\r\n\t\tchild.Form = parent as EntityOfType;\r\n}\r\n\r\n/**\r\n * Generate an id based on the given entry version and list item index\r\n * @param {number} version The form entry version to be saved\r\n * @param {number} listItemIndex The item's index in the list\r\n * @returns {string} The generated list item Id\r\n */\r\nfunction generateListItemId(version: number, listItemIndex: number): string {\r\n\tif (version > 0xffff)\r\n\t\tthrow new Error('Value ' + version + ' exceeds maximum unsigned short value of ' + 0xffff + '.');\r\n\r\n\tif (listItemIndex > 0xffff)\r\n\t\tthrow new Error('Value ' + listItemIndex + ' exceeds maximum unsigned short value of ' + 0xffff + '.');\r\n\r\n\tconst randomByte1 = randomInt(255);\r\n\tconst randomByte2 = randomInt(255);\r\n\tconst num = combineUInt16sWithPadding(version, listItemIndex, randomByte1, randomByte2);\r\n\tconst id = toBase62(num);\r\n\t// console.log(`generateListItemId(${version}, ${listItemIndex}) => ${id}`);\r\n\treturn id;\r\n}\r\n\r\n/**\r\n * Get a map of list item ids to their index in the list\r\n * @param list The list of entities which have an Id property\r\n * @returns A map of id to entity for all of the items in the list\r\n */\r\nfunction getListItemIdMap(list: EntityOfType[]): { [id: string]: EntityOfType } {\r\n\tconst idMap = {};\r\n\tfor (let i = 0; i < list.length; i++) {\r\n\t\tif (list[i]) {\r\n\t\t\tconst id = list[i].Id;\r\n\t\t\tif (id && !idMap.hasOwnProperty(id)) {\r\n\t\t\t\tidMap[id] = list[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn idMap;\r\n}\r\n\r\n/**\r\n * Ensures that the given id is unique to the list,\r\n * and returns a unique pseudo-random id if it is not\r\n * @param list The list of items\r\n * @param item The item in the list who's Id is being validated\r\n * @param id The id to check for uniqueness\r\n * @param incorporateOriginal Whether to incorporate the original id when generating a unique id\r\n * @param idMap An optional pre-built map of ids to items\r\n * @returns The unique list item Id to use\r\n */\r\nfunction ensureUniqueListItemId(list: EntityOfType[], item: EntityOfType, id: string, idMap: { [id: string]: EntityOfType } = null): string {\r\n\t// Generate the id map on-demand if needed\r\n\tif (!idMap) {\r\n\t\tidMap = getListItemIdMap(list);\r\n\t}\r\n\r\n\tlet itemForId = idMap[id];\r\n\r\n\t// If the Id isn't used or is used by the item being checked, then return it\r\n\tif (!itemForId || itemForId === item) {\r\n\t\treturn id;\r\n\t}\r\n\r\n\t// Otherwise, fall back to a pseudo-random string\r\n\tfor (let attempts = 0; attempts < 10; attempts++) {\r\n\t\tid = 'U-' + randomText(5 + attempts, true);\r\n\t\titemForId = idMap[id];\r\n\t\tif (!itemForId) {\r\n\t\t\treturn id;\r\n\t\t}\r\n\t}\r\n\r\n\t// Don't assign an id rather than knowingly use a duplicate\r\n\treturn null;\r\n}\r\n\r\n/**\r\n * Ensures the list has the specified number of items when min and max are the same.\r\n * @param list The list to update\r\n * @param min The minimum number of items\r\n * @param max The maximum number of items\r\n */\r\nexport function ensureListLength(list: Entity[], itemType: Type, min: number, max: number) {\r\n\tif (Number.isInteger(min) && Number.isInteger(max) && min === max) {\r\n\t\t// Add items if less than min\r\n\t\tif (list.length < min) {\r\n\t\t\tconst newItems = [];\r\n\t\t\twhile (newItems.length < min - list.length)\r\n\t\t\t\tnewItems.push(itemType.createSync({}));\r\n\t\t\tlist.splice(list.length, 0, ...newItems);\r\n\t\t}\r\n\r\n\t\t// Remove items if greater than max\r\n\t\telse if (list.length > Math.max(max, 0))\r\n\t\t\tlist.splice(max);\r\n\t}\r\n}\r\n\r\n/**\r\n * Get the form entry for the given entity (either a descendant of the form entry or the form entry itself)\r\n * @param entity Either a descendant of the form entry, or the form entry itself\r\n */\r\nexport function getFormEntry(entity: Entity): EntityOfType {\r\n\tif (!entity)\r\n\t\tthrow new Error('Can\\'t get form entry for a null entity.');\r\n\tif (isFormEntry(entity))\r\n\t\treturn entity;\r\n\tif (isSectionOrTable(entity))\r\n\t\treturn entity.Form;\r\n\tthrow new Error(`Can't get form entry for entity '${entity.meta.type.fullName}|${entity.meta.id || '?'}'.`);\r\n}\r\n\r\n/**\r\n * Initializes common properties of child entities: `Form`, `ParentSection`, and `Id`\r\n * @param parent The parent object that owns the child entity or entities\r\n * @param propertyName The property of the parent that contains the child entity or entities\r\n */\r\nexport function ensureChildProperties(parent: EntityOfType, propertyName: string): void {\r\n\tconst value = parent.get(propertyName);\r\n\tif (Array.isArray(value)) {\r\n\t\tvalue.forEach(item => setBackReferenceProperties(parent, item));\r\n\t}\r\n\telse if (value) {\r\n\t\tsetBackReferenceProperties(parent, value);\r\n\t}\r\n\r\n\tif (Array.isArray(value)) {\r\n\t\t// Attempt to get the form entry from the parent object\r\n\t\tlet formEntry: EntityOfType;\r\n\t\ttry {\r\n\t\t\tformEntry = getFormEntry(parent);\r\n\t\t}\r\n\t\tcatch {\r\n\t\t\t// TODO: Log error to App Insights?\r\n\t\t}\r\n\r\n\t\t// Build a map of Ids once so that the list doesn't have to be traversed repeatedly to ensure unique Ids\r\n\t\t// NOTE: Store the id map on the list so that the id for an item that is deleted doesn't get reused, since it could have been referenced\r\n\t\tconst idMap: { [id: string]: EntityOfType } = value['__idMap'] || (value['__idMap'] = getListItemIdMap(value));\r\n\r\n\t\t// TODO: Make this more efficient by only processing added items?\r\n\t\tvalue.forEach((item, index) => {\r\n\t\t\t// Only generate Ids for new objects, or objects that don't already have an id\r\n\t\t\tif (item.meta.isNew || !item.Id) {\r\n\t\t\t\tlet id: string;\r\n\t\t\t\tif (formEntry) {\r\n\t\t\t\t\t// Generate an encoded id based on the entry version and the items index in the list\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tconst currentEntryVersion = formEntry.Entry ? (formEntry.Entry.Version || 0) : 0;\r\n\t\t\t\t\t\tlet attempts = 0;\r\n\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\tid = generateListItemId(currentEntryVersion + 1, index);\r\n\t\t\t\t\t\t} while (idMap[id] && ++attempts <= 10);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (e) {\r\n\t\t\t\t\t\t// If an error occurs, fall back to a pseudo-random string\r\n\t\t\t\t\t\t// TODO: Log error to App Insights?\r\n\t\t\t\t\t\tid = 'E-' + randomText(5, true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// Fall back to generate a random id\r\n\t\t\t\t\tid = 'F-' + randomText(5, true);\r\n\t\t\t\t}\r\n\t\t\t\t// Ensure that the list item's Id will be unique, generating a psuedo random Id if necessary\r\n\t\t\t\tid = ensureUniqueListItemId(value, item, id, idMap);\r\n\t\t\t\t// Assign the item's Id property\r\n\t\t\t\titem.Id = id;\r\n\t\t\t\t// Update the id map for future use\r\n\t\t\t\tidMap[id] = item;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\nexport function getInitialSectionItems(container: Entity, itemType: Type, count: number, itemInitializer: ObjectLookup) {\r\n\tconst items = [];\r\n\tif (container.meta.isNew) {\r\n\t\tfor (let i = 0; i < count; i++)\r\n\t\t\titems.push(Object.assign({}, itemInitializer));\r\n\t}\r\n\treturn items;\r\n}\r\n\r\ntype EnumReferenceType = {\r\n\t// TODO: Is this type definition correct (Id: number)?\r\n\tId: number;\r\n\tName: string;\r\n\tDisplayName: string;\r\n};\r\n\r\n/**\r\n * Ensures that enum instances are created for the given enum type\r\n */\r\nfunction ensureEnumInstances(type: Type, enumValues: ObjectLookup | string[]): EntityOfType[] {\r\n\tconst instances = type.known().reduce((obj, v) => { obj[v.meta.id] = v; return obj; }, {});\r\n\tconst EnumType = type.jstype as EntityConstructorForType;\r\n\tif (Array.isArray(enumValues)) {\r\n\t\treturn enumValues.map((name: string) => {\r\n\t\t\treturn instances[name] || new EnumType(name, {\r\n\t\t\t\tName: name,\r\n\t\t\t\tDisplayName: name\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\telse {\r\n\t\treturn Object.keys(enumValues).map((value: string) => {\r\n\t\t\treturn instances[value] || new EnumType(value, {\r\n\t\t\t\tId: parseInt(value, 10),\r\n\t\t\t\tName: enumValues[value],\r\n\t\t\t\tDisplayName: enumValues[value]\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n}\r\n\r\n/**\r\n * Override of `Type.get` that ensure that enum values are created\r\n */\r\nexport function getEnumInstance(type: Type, ...args: any[]): Entity {\r\n\tconst enumValues = type['enum'];\r\n\tif (!enumValues) {\r\n\t\t// TODO: Warn about an invalid call to `ensureEnumInstances`?\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Ensure that all enum instances are created\r\n\tensureEnumInstances(type, enumValues);\r\n\r\n\t// Call the original Type.get prototype method\r\n\tconst Type = type.constructor;\r\n\treturn Type.prototype.get.apply(type, args);\r\n}\r\n\r\nexport function getEnumInstanceById(type: Type, id: string) {\r\n\tconst enumValues = type['enum'];\r\n\tif (!enumValues) {\r\n\t\t// TODO: Warn about an invalid call to `ensureEnumInstances`?\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Ensure that all enum instances are created\r\n\tconst instances = ensureEnumInstances(type, enumValues);\r\n\r\n\t// Get the first instance with the matching id\r\n\treturn instances.filter(i => i.Id === id)[0] || null;\r\n}\r\n\r\nexport function getEnumInstanceByName(type: Type, name: string) {\r\n\tconst enumValues = type['enum'];\r\n\tif (!enumValues) {\r\n\t\t// TODO: Warn about an invalid call to `ensureEnumInstances`?\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Ensure that all enum instances are created\r\n\tconst instances = ensureEnumInstances(type, enumValues);\r\n\r\n\t// Get the first instance with the matching name\r\n\treturn instances.filter(i => i.Name === name)[0] || null;\r\n}\r\n","export function toBase62(number: number): string {\r\n\tif (typeof number === 'undefined' || number === null) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\tif (typeof number !== 'number') {\r\n\t\tthrow new Error('Function `toBase62` recieved invalid \\'number\\' parameter of type \\'' + (typeof number) + '\\'.');\r\n\t}\r\n\telse if (number === 0) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\tconst digits = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n\r\n\tlet text = '';\r\n\r\n\tlet value = number;\r\n\r\n\twhile (value > 0) {\r\n\t\tconst remainder = value % 62;\r\n\t\tvalue = Math.floor(value / 62);\r\n\t\ttext = digits.charAt(remainder) + text;\r\n\t}\r\n\r\n\treturn text;\r\n}\r\n\r\nexport function fromBase62(text: string): number {\r\n\tif (typeof text === 'undefined' || text === null) {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\tif (typeof text !== 'string') {\r\n\t\tthrow new Error('Function `fromBase62` recieved invalid \\'text\\' parameter of type \\'' + (typeof text) + '\\'.');\r\n\t}\r\n\telse if (text.length === 0) {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\tconst digits = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n\r\n\tlet number = 0;\r\n\r\n\tfor (let i = text.length - 1; i >= 0; i--) {\r\n\t\tconst c = text[i];\r\n\t\tconst idx = digits.indexOf(c);\r\n\t\tconst b = text.length - 1 - i;\r\n\t\tconst pow = Math.pow(62, b);\r\n\t\tnumber += pow * idx;\r\n\t}\r\n\r\n\treturn number;\r\n}\r\n","export function combineUInt16sWithPadding(n1: number, n2: number, randomByte1: number, randomByte2: number): number {\r\n\tif (n1 > 0xffff) {\r\n\t\tthrow new Error('Value ' + n1 + ' exceeds maximum unsigned short value of ' + 0xffff + '.');\r\n\t}\r\n\r\n\tconst n1Bytes = n1 > 0xff ? 2 : 1;\r\n\r\n\tif (n2 > 0xffff) {\r\n\t\tthrow new Error('Value ' + n2 + ' exceeds maximum unsigned short value of ' + 0xffff + '.');\r\n\t}\r\n\r\n\tconst n2Bytes = n2 > 0xff ? 2 : 1;\r\n\r\n\tif (n1Bytes > 1 && n2Bytes > 1) {\r\n\t\tthrow new Error('Both values ' + n1 + ' and ' + n2 + ' exceeds maximum byte value of ' + 0xff + '.');\r\n\t}\r\n\r\n\tlet result = 0;\r\n\r\n\tlet randomByte: number;\r\n\r\n\tif (arguments.length > 2 && typeof randomByte1 === 'number') {\r\n\t\trandomByte = randomByte1;\r\n\t}\r\n\telse {\r\n\t\trandomByte = Math.floor(Math.random() * 255);\r\n\t}\r\n\r\n\trandomByte = randomByte & 0xff;\r\n\r\n\t// Bytes for n2\r\n\tresult += n2;\r\n\r\n\t// Bytes for n1\r\n\tresult += ((n1 << (n2Bytes === 2 ? 16 : 8))) >>> 0;\r\n\r\n\tif (n1Bytes === 1 && n2Bytes === 1) {\r\n\t\t// Random byte\r\n\t\tresult += randomByte << 16;\r\n\r\n\t\t// Generate another random byte for the header\r\n\t\tif (arguments.length > 3 && typeof randomByte2 === 'number') {\r\n\t\t\trandomByte = randomByte2;\r\n\t\t}\r\n\t\telse {\r\n\t\t\trandomByte = Math.floor(Math.random() * 255);\r\n\t\t}\r\n\r\n\t\trandomByte = randomByte & 0xff;\r\n\t}\r\n\r\n\t// Header byte: n1 and n2 byte size, and random bits\r\n\tlet headerByte = 0;\r\n\theaderByte += n2Bytes;\r\n\theaderByte += n1Bytes << 2;\r\n\theaderByte += (randomByte << 4) & 0x000000f0;\r\n\tresult += (headerByte << 24) >>> 0;\r\n\r\n\treturn result;\r\n}\r\n\r\nexport function splitUInt32WithPadding(i: number): [number, number] {\r\n\tconst headerByte = (i & 0xff000000) >>> 24;\r\n\r\n\tlet n2: number;\r\n\tconst n2Bytes = (headerByte & 0x07) & 0x3;\r\n\tif (n2Bytes === 2) {\r\n\t\tn2 = i & 0x0000ffff;\r\n\t}\r\n\telse {\r\n\t\tn2 = i & 0x000000ff;\r\n\t}\r\n\r\n\tlet n1: number;\r\n\tconst n1Bytes = ((headerByte & 0x0f) >> 2) & 0x3;\r\n\tif (n2Bytes === 2) {\r\n\t\tn1 = (i >>> 16) & 0xff;\r\n\t}\r\n\telse if (n1Bytes === 2) {\r\n\t\tn1 = (i >>> 8) & 0xffff;\r\n\t}\r\n\telse {\r\n\t\tn1 = (i >>> 8) & 0xff;\r\n\t}\r\n\r\n\treturn [n1, n2];\r\n}\r\n","import type { FormOwner } from '../public/form-handle';\r\nimport { FormHandle } from '../public/form-handle';\r\nimport type FormBase from 'src/components/FormBase';\r\nimport type FormDefinition from '../form-definition';\r\nimport { Deferred } from 'src/util/deferred';\r\n\r\n/**\r\n * Admin API for interacting with a form in the admin experience\r\n */\r\nexport class AdminFormHandle extends FormHandle {\r\n\tform: FormBase = null;\r\n\tformDef: FormDefinition = null;\r\n\r\n\tprivate _formAvailable = new Deferred();\r\n\r\n\tconstructor(formId: string, owner: FormOwner, ready: Promise) {\r\n\t\tsuper(formId, owner, ready);\r\n\t}\r\n\r\n\tattach(form: FormBase) {\r\n\t\tthis.form = form;\r\n\t\tthis._formAvailable.resolve();\r\n\t}\r\n\r\n\tprotected get formAvailable() {\r\n\t\treturn this._formAvailable.promise;\r\n\t}\r\n\r\n\tdestroy() {\r\n\t\tsuper.destroy();\r\n\r\n\t\tthis.formDef = null;\r\n\r\n\t\tif (this.form) {\r\n\t\t\ttry {\r\n\t\t\t\t// Destroy the component\r\n\t\t\t\tthis.form.$destroy();\r\n\t\t\t}\r\n\t\t\tcatch (e) {\r\n\t\t\t\t// Ignore errors when destroying the form\r\n\t\t\t}\r\n\r\n\t\t\t// Remove the element from the DOM\r\n\t\t\tif (this.form.$el)\r\n\t\t\t\tthis.form.$el.remove();\r\n\t\t}\r\n\t}\r\n\r\n\tpublic getConfirmationMessage(actionName: string) : string {\r\n\t\tif (!this.form?.actions)\r\n\t\t\treturn null;\r\n\r\n\t\tconst action = this.form.actions.find(a => a.ActionName === actionName);\r\n\t\tconst confirmationMessage = action.Confirmation.Message;\r\n\t\tconst formEntry = this.form.entry;\r\n\t\tconst convertedMessage = formEntry.toString(confirmationMessage);\r\n\r\n\t\treturn convertedMessage;\r\n\t}\r\n}\r\n","import { formatters } from 'jsondiffpatch';\r\n\r\n// Copied from https://github.com/benjamine/jsondiffpatch/blob/master/src/formatters/jsonpatch.js\r\nconst isMoveOp = ({ op }) => op === 'move';\r\nconst isRemoveOp = ({ op }) => op === 'remove';\r\nconst last = arr => arr[arr.length - 1];\r\n\r\nconst sortBy = (arr, pred) => {\r\n\tarr.sort(pred);\r\n\treturn arr;\r\n};\r\n\r\nconst compareByIndexDesc = (indexA, indexB) => {\r\n\tconst lastA = parseInt(indexA, 10);\r\n\tconst lastB = parseInt(indexB, 10);\r\n\tif (!(isNaN(lastA) || isNaN(lastB))) {\r\n\t\treturn lastB - lastA;\r\n\t}\r\n\telse {\r\n\t\treturn 0;\r\n\t}\r\n};\r\n\r\nconst opsByDescendingOrder = removeOps => sortBy(removeOps, (a, b) => {\r\n\tconst splitA = a.path.split('/');\r\n\tconst splitB = b.path.split('/');\r\n\tif (splitA.length !== splitB.length) {\r\n\t\treturn splitA.length - splitB.length;\r\n\t}\r\n\telse {\r\n\t\treturn compareByIndexDesc(last(splitA), last(splitB));\r\n\t}\r\n});\r\n// end copied code\r\n\r\nexport class CognitoJsonPatchFormatter extends formatters.jsonpatch.default {\r\n\tprivate static reorderOps(diff) {\r\n\t\tconst [moveOps, removedOps, restOps] = formatters.jsonpatch.partitionOps(diff, [isMoveOp, isRemoveOp]);\r\n\t\tconst removeOpsReverse = opsByDescendingOrder(removedOps);\r\n\t\treturn [...removeOpsReverse, ...moveOps, ...restOps];\r\n\t}\r\n\r\n\tformat(delta, left) {\r\n\t\treturn CognitoJsonPatchFormatter.reorderOps(super.format(delta, left));\r\n\t}\r\n\r\n\trecurse(context, delta, left, key, leftKey, movedFrom, isLast) {\r\n\t\tif (key !== '$id')\r\n\t\t\tsuper.recurse(context, delta, left, key, leftKey, movedFrom, isLast);\r\n\t}\r\n}\r\n","import type { Delta } from 'jsondiffpatch';\r\nimport { Pipe } from 'jsondiffpatch';\r\n\r\nconst compare = {\r\n\tnumerically(a, b) {\r\n\t\treturn a - b;\r\n\t},\r\n\tnumericallyBy(name) {\r\n\t\treturn (a, b) => a[name] - b[name];\r\n\t}\r\n};\r\n\r\n// https://github.com/benjamine/jsondiffpatch/blob/master/packages/jsondiffpatch/src/contexts/context.ts\r\n// Added properties for intelisense\r\nclass Context {\r\n\tresult: any;\r\n\thasResult: boolean;\r\n\texiting: boolean;\r\n\tnext: any;\r\n\tnextPipe: any;\r\n\troot: any;\r\n\tchildren: any;\r\n\tnextAfterChildren: any;\r\n\toptions: any;\r\n\tsetResult(result) {\r\n\t\tthis.result = result;\r\n\t\tthis.hasResult = true;\r\n\t\treturn this;\r\n\t}\r\n\r\n\texit() {\r\n\t\tthis.exiting = true;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tswitchTo(next, pipe) {\r\n\t\tif (typeof next === 'string' || next instanceof Pipe) {\r\n\t\t\tthis.nextPipe = next;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.next = next;\r\n\t\t\tif (pipe) {\r\n\t\t\t\tthis.nextPipe = pipe;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\tpush(child, name) {\r\n\t\tchild.parent = this;\r\n\t\tif (typeof name !== 'undefined') {\r\n\t\t\tchild.childName = name;\r\n\t\t}\r\n\t\tchild.root = this.root || this;\r\n\t\tchild.options = child.options || this.options;\r\n\t\tif (!this.children) {\r\n\t\t\tthis.children = [child];\r\n\t\t\tthis.nextAfterChildren = this.next || null;\r\n\t\t\tthis.next = child;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.children[this.children.length - 1].next = child;\r\n\t\t\tthis.children.push(child);\r\n\t\t}\r\n\t\tchild.next = this;\r\n\t\treturn this;\r\n\t}\r\n}\r\n\r\n// https://github.com/benjamine/jsondiffpatch/blob/master/packages/jsondiffpatch/src/contexts/patch.ts\r\n// Added properties for intelisense\r\nclass PatchContext extends Context {\r\n\tleft;\r\n\tdelta: Delta;\r\n\tpipe: string;\r\n\tnested: boolean;\r\n\r\n\tconstructor(left, delta) {\r\n\t\tsuper();\r\n\t\tthis.left = left;\r\n\t\tthis.delta = delta;\r\n\t\tthis.pipe = 'patch';\r\n\t}\r\n}\r\n\r\n// https://github.com/benjamine/jsondiffpatch/blob/master/packages/jsondiffpatch/src/filters/nested.ts\r\n// collectChildrenDiffFilter()\r\n// Add ids to the delta if the object contains an Id\r\nexport const addIdsToRepeatingSectionObjects = (context) => {\r\n\tif (!context || !context.children) {\r\n\t\treturn;\r\n\t}\r\n\tconst length = context.children.length;\r\n\tlet child;\r\n\tlet result = context.result;\r\n\tfor (let index = 0; index < length; index++) {\r\n\t\tchild = context.children[index];\r\n\t\tif (typeof child.result === 'undefined') {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tresult = result || {};\r\n\t\tresult[child.childName] = child.result;\r\n\t}\r\n\tif (result && context.leftIsArray) {\r\n\t\tresult._t = 'a';\r\n\t}\r\n\tcontext.setResult(result).exit();\r\n\r\n\t// Start Cognito-specific patching logic for repeating sections\r\n\t// Add ids to the delta if the object contains an Id\r\n\tif (context.hasResult && context.result && (context.right.Id || context.left.Id) && !(context.right.Id || context.left.Id).includes('-')) {\r\n\t\tcontext.result.$id = context.right.Id || context.left.Id;\r\n\t}\r\n\t// End Cognito-specific patching logic for repeating sections\r\n};\r\naddIdsToRepeatingSectionObjects.filterName = 'addIdsToRepeatingSectionObjects';\r\n\r\n// https://github.com/benjamine/jsondiffpatch/blob/master/packages/jsondiffpatch/src/filters/arrays.ts\r\n// nestedPatchFilter()\r\nexport const arrayFilterPreventModificationsFromMissingItems = (context) => {\r\n\tif (!context.nested) {\r\n\t\treturn;\r\n\t}\r\n\tif (context.delta._t !== 'a') {\r\n\t\treturn;\r\n\t}\r\n\tlet index;\r\n\r\n\tconst ARRAY_MOVE = 3;\r\n\tconst delta = context.delta;\r\n\tconst array = context.left;\r\n\r\n\tif (!array)\r\n\t\treturn;\r\n\r\n\t// first, separate removals, insertions and modifications\r\n\tlet toRemove = [];\r\n\tlet toInsert = [];\r\n\tconst toModify = [];\r\n\tfor (index in delta) {\r\n\t\tif (index !== '_t') {\r\n\t\t\tif (index[0] === '_') {\r\n\t\t\t\t// removed item from original array\r\n\t\t\t\tif (delta[index][2] === 0 || delta[index][2] === ARRAY_MOVE) {\r\n\t\t\t\t\ttoRemove.push(parseInt(index.slice(1), 10));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthrow new Error(\r\n\t\t\t\t\t\t'only removal or move can be applied at original array indices,' +\r\n ` invalid diff type: ${delta[index][2]}`\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (delta[index].length === 1) {\r\n\t\t\t\t\t// added item at new array\r\n\t\t\t\t\ttoInsert.push({\r\n\t\t\t\t\t\tindex: parseInt(index, 10),\r\n\t\t\t\t\t\tvalue: delta[index][0]\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// modified item at new array\r\n\t\t\t\t\ttoModify.push({\r\n\t\t\t\t\t\tindex: parseInt(index, 10),\r\n\t\t\t\t\t\tdelta: delta[index]\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// remove items, in reverse order to avoid sawing our own floor\r\n\ttoRemove = toRemove.sort(compare.numerically);\r\n\tfor (index = toRemove.length - 1; index >= 0; index--) {\r\n\t\tconst indexDiff = delta[`_${toRemove[index]}`];\r\n\t\tconst itemIndex = array.findIndex(item => context.options.objectHash(indexDiff[0]) === context.options.objectHash(item));\r\n\t\tif (itemIndex !== -1) {\r\n\t\t\tarray.splice(itemIndex, 1);\r\n\r\n\t\t\tif (indexDiff && indexDiff[2] === ARRAY_MOVE) {\r\n\t\t\t\t// reinsert later\r\n\t\t\t\ttoInsert.push({\r\n\t\t\t\t\tindex: array.length + toInsert.length,\r\n\t\t\t\t\tvalue: indexDiff[0]\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// insert items, in reverse order to avoid moving our own floor\r\n\ttoInsert = toInsert.sort(compare.numericallyBy('index'));\r\n\tconst toInsertLength = toInsert.length;\r\n\tfor (index = 0; index < toInsertLength; index++) {\r\n\t\tconst insertion = toInsert[index];\r\n\t\tarray.splice(insertion.index, 0, insertion.value);\r\n\t}\r\n\r\n\t// apply modifications\r\n\tconst toModifyLength = toModify.length;\r\n\tlet child;\r\n\tif (toModifyLength > 0) {\r\n\t\tfor (index = 0; index < toModifyLength; index++) {\r\n\t\t\tconst modification = toModify[index];\r\n\t\t\t// Start Cognito-specific patching logic for repeating sections\r\n\t\t\tif (modification.delta.$id != null) {\r\n\t\t\t\t// Prevent modifications to objects that are not in the array\r\n\t\t\t\tconst leftSide = context.left.find((left) => left.Id === modification.delta.$id);\r\n\t\t\t\tif (leftSide) {\r\n\t\t\t\t\tdelete modification.delta.$id;\r\n\t\t\t\t\tchild = new PatchContext(\r\n\t\t\t\t\t\tleftSide,\r\n\t\t\t\t\t\tmodification.delta\r\n\t\t\t\t\t);\r\n\t\t\t\t\tcontext.push(child, modification.index);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// End Cognito-specific patching logic for repeating sections\r\n\t\t\telse {\r\n\t\t\t\tchild = new PatchContext(\r\n\t\t\t\t\tcontext.left[modification.index],\r\n\t\t\t\t\tmodification.delta\r\n\t\t\t\t);\r\n\t\t\t\tcontext.push(child, modification.index);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (!context.children) {\r\n\t\tcontext.setResult(context.left).exit();\r\n\t\treturn;\r\n\t}\r\n\tcontext.exit();\r\n};\r\narrayFilterPreventModificationsFromMissingItems.filterName = 'arrayFilterPreventModificationsFromMissingItems';\r\n\r\n// https://github.com/benjamine/jsondiffpatch/blob/master/packages/jsondiffpatch/src/filters/arrays.ts\r\n// collectChildrenPatchFilter()\r\nexport const arraysCollectPreventDuplicateCollections = (context) => {\r\n\tif (!context || !context.children) {\r\n\t\treturn;\r\n\t}\r\n\tif (context.delta._t !== 'a') {\r\n\t\treturn;\r\n\t}\r\n\r\n\tconst length = context.children.length;\r\n\tfor (let index = 0; index < length; index++) {\r\n\t\tconst child = context.children[index];\r\n\t\t// Start Cognito-specific patching logic for repeating sections\r\n\t\t// Prevent adding results that are already in the array\r\n\t\tif (context.left.map(left => left.Id).indexOf(child.result.Id) === -1)\r\n\t\t\tcontext.left[child.childName] = child.result;\r\n\t\t// End Cognito-specific patching logic for repeating sections\r\n\t}\r\n\tcontext.setResult(context.left).exit();\r\n};\r\narraysCollectPreventDuplicateCollections.filterName = 'arraysCollectPreventDuplicateCollections';\r\n\r\n// https://github.com/benjamine/jsondiffpatch/blob/master/packages/jsondiffpatch/src/filters/trivial.ts\r\n// trivialMatchesPatchFilter()\r\nexport const applyTrivialPatch = (context) => {\r\n\tif (typeof context.delta === 'undefined') {\r\n\t\tcontext.setResult(context.left).exit();\r\n\t\treturn;\r\n\t}\r\n\tcontext.nested = !Array.isArray(context.delta);\r\n\tif (context.nested) {\r\n\t\treturn;\r\n\t}\r\n\tconst nonNestedDelta = context.delta;\r\n\tif (nonNestedDelta.length === 1) {\r\n\t\t// Start Cognito-specific patching logic\r\n\t\t// Prevent overwriting an existing array with the array intialization patch\r\n\t\tif (Array.isArray(context.left) && context.left.length) {\r\n\t\t\tlet result = context.left;\r\n\t\t\tif (Array.isArray(context.delta[0]))\r\n\t\t\t\tresult = context.delta[0].concat(result);\r\n\r\n\t\t\tcontext.setResult(result).exit();\r\n\t\t}\r\n\t\telse\r\n\t\t// End Cognito-specific patching logic\r\n\t\t\tcontext.setResult(nonNestedDelta[0]).exit();\r\n\t\treturn;\r\n\t}\r\n\tif (nonNestedDelta.length === 2) {\r\n\t\tif (context.left instanceof RegExp) {\r\n\t\t\tconst regexArgs = /^\\/(.*)\\/([gimyu]+)$/.exec(\r\n\t\t\t\tnonNestedDelta[1] as string\r\n\t\t\t);\r\n\t\t\tif (regexArgs) {\r\n\t\t\t\tcontext.setResult(new RegExp(regexArgs[1], regexArgs[2])).exit();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Start Cognito-specific patching logic\r\n\t\t// Prevent overwriting an existing array with the array intialization patch\r\n\t\tif (Array.isArray(context.left) && context.left.length) {\r\n\t\t\tlet result = context.left;\r\n\t\t\tif (Array.isArray(context.delta[1]))\r\n\t\t\t\tresult = context.delta[1].concat(result);\r\n\r\n\t\t\tcontext.setResult(result).exit();\r\n\t\t}\r\n\t\telse\r\n\t\t// End Cognito-specific patching logic\r\n\t\t\tcontext.setResult(nonNestedDelta[1]).exit();\r\n\t\treturn;\r\n\t}\r\n\tif (nonNestedDelta.length === 3 && nonNestedDelta[2] === 0) {\r\n\t\tcontext.setResult(undefined).exit();\r\n\t}\r\n};\r\napplyTrivialPatch.filterName = 'applyTrivialPatch';","import type { DiffContext } from 'jsondiffpatch';\r\nimport { create } from 'jsondiffpatch';\r\nimport { addIdsToRepeatingSectionObjects, applyTrivialPatch, arrayFilterPreventModificationsFromMissingItems, arraysCollectPreventDuplicateCollections } from './custom-patch-pipes';\r\n\r\nconst diffPatcher = create({\r\n\tpropertyFilter: (propertyName: string, context: DiffContext) => {\r\n\t\t// Don't include changes from null to null\r\n\t\t// eslint-disable-next-line eqeqeq\r\n\t\tif (context.left[propertyName] == null && context.right[propertyName] == null)\r\n\t\t\treturn false;\r\n\t\telse if (propertyName.startsWith('$'))\r\n\t\t\treturn false;\r\n\t\t// Remove pseudo properties like Choice_Price since they never get serialized by model.js\r\n\t\t// eslint-disable-next-line eqeqeq\r\n\t\telse if (propertyName.lastIndexOf('_') > 0)\r\n\t\t\treturn false;\r\n\t\t// root properties don't have a child name\r\n\t\t// eslint-disable-next-line eqeqeq\r\n\t\telse if (context.childName == null && ['Entry', 'Form', 'Id', 'Order'].includes(propertyName))\r\n\t\t\treturn false;\r\n\t\telse if (['ItemNumber'].includes(propertyName))\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn true;\r\n\t},\r\n\t// Formatters don't support textDiff\r\n\ttextDiff: {\r\n\t\tminLength: Number.MAX_SAFE_INTEGER\r\n\t},\r\n\t// Used to differentiate between array objects\r\n\tobjectHash: (obj: any) => {\r\n\t\treturn obj.Id || JSON.stringify(obj);\r\n\t},\r\n\tarrays: {\r\n\t\tdetectMove: false\r\n\t}\r\n});\r\n\r\ndiffPatcher.processor.pipes.diff.replace('collectChildren', addIdsToRepeatingSectionObjects);\r\ndiffPatcher.processor.pipes.patch.replace('trivial', applyTrivialPatch);\r\ndiffPatcher.processor.pipes.patch.replace('arrays', arrayFilterPreventModificationsFromMissingItems);\r\ndiffPatcher.processor.pipes.patch.replace('arraysCollectChildren', arraysCollectPreventDuplicateCollections);\r\n\r\nexport { diffPatcher };","import type { EntrySaveResult, EntrySubmissionResult, ResumeEntryResult } from './entry-service';\r\nimport { EntryService, parseStoreResult, SubmissionResultStatus } from './entry-service';\r\nimport type { FormEntryWithOptionalOrder } from 'src/framework/model/extensions/form-entry-extensions';\r\nimport type { Delta } from 'jsondiffpatch';\r\nimport type { ServiceRequestError, ServiceRequestResult } from './base-service';\r\nimport { CustomResponseError } from './custom-response-error';\r\nimport type { PaymentToken } from '@cognitoforms/types/server-types/payment/model/payment-token';\r\nimport { CognitoJsonPatchFormatter } from './diff-patch/CognitoJsonPatchFormatter';\r\nimport { diffPatcher } from './diff-patch/CognitoJsonDiffPatcher';\r\nimport type { ObjectLookup } from 'src/util';\r\nimport { ViewType } from '@cognitoforms/types/server-types/forms/model/view-type';\r\nimport type { EntityOfType } from '@cognitoforms/model.js';\r\n\r\nconst jsonPatchFormatter = new CognitoJsonPatchFormatter();\r\nexport class ConcurrentEntryConflict extends Error {\r\n\tentry: any;\r\n\torder: any;\r\n\r\n\tconstructor(entry: any, order: any) {\r\n\t\tsuper('Entry Conflict');\r\n\t\tthis.entry = entry;\r\n\t\tthis.order = order;\r\n\t}\r\n}\r\n\r\nexport default class ConcurrentEntryService extends EntryService {\r\n\tinitialEntryJson: any = {};\r\n\tprivate isAdmin: boolean = false;\r\n\tprivate viewId: string = undefined;\r\n\tprivate viewType: ViewType = undefined;\r\n\r\n\tget diffPatcher() {\r\n\t\treturn diffPatcher;\r\n\t}\r\n\r\n\tget jsonPatchFormatter() {\r\n\t\treturn jsonPatchFormatter;\r\n\t}\r\n\r\n\tconstructor(session: any, isAdmin: boolean) {\r\n\t\tsuper(session);\r\n\t\tthis.isAdmin = isAdmin;\r\n\t}\r\n\r\n\tasync submit(entry: EntityOfType, embedUrl: string, entryToken: string): Promise {\r\n\t\tlet result;\r\n\t\tlet delta;\r\n\t\tconst entryJson = entry.serialize({ force: false, useAliases: true }) as any;\r\n\t\tconst order = entry.Order;\r\n\r\n\t\tif (entry.meta.isNew)\r\n\t\t\tresult = await this.performActionForNewEntry(entry.Entry.Action, entryJson, order, embedUrl);\r\n\t\telse {\r\n\t\t\tdelta = this.diffPatcher.diff(this.initialEntryJson, entryJson);\r\n\t\t\tconst diffPatch = this.jsonPatchFormatter.format(delta);\r\n\t\t\tresult = await this.performActionForExistingEntry(entry.Id, entry.Entry.Version, entry.Entry.Action, diffPatch, order, entryJson.Entry.PaymentToken, embedUrl, entryToken, entry.Entry.Role, entryJson.Entry.User);\r\n\t\t}\r\n\r\n\t\tif (result.response && result.response.data) {\r\n\t\t\tconst data = result.response.data;\r\n\t\t\tconst submissionResult = parseStoreResult(data) as EntrySubmissionResult;\r\n\r\n\t\t\t// In the following submission results, the server stored the submitted entry data\r\n\t\t\tif (submissionResult.status === SubmissionResultStatus.Success\r\n\t\t\t\t|| submissionResult.status === SubmissionResultStatus.CardDeclined\r\n\t\t\t\t|| submissionResult.status === SubmissionResultStatus.OrderMismatch\r\n\t\t\t\t|| submissionResult.status === SubmissionResultStatus.PaymentDeclined)\r\n\t\t\t\tthis.initialEntryJson = submissionResult.entry;\r\n\r\n\t\t\tsubmissionResult.entry.Entry.Action = entry.Entry.Action;\r\n\t\t\tsubmissionResult.entry.Entry.Role = entry.Entry.Role;\r\n\r\n\t\t\t// Add the session token to document links to support downloads on the public form confirmation page\r\n\t\t\tif (data.entryDocuments) {\r\n\t\t\t\tsubmissionResult.documents = data.entryDocuments.map(doc => {\r\n\t\t\t\t\tdoc.link = doc.link + (this.isAdmin ? '' : '&sessionToken=' + encodeURIComponent(this.sessionToken));\r\n\t\t\t\t\treturn doc;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\treturn submissionResult;\r\n\t\t}\r\n\r\n\t\tthrow this.parseSubmissionError(result.error, delta, entry.Entry.Action, entry.Entry.Role);\r\n\t}\r\n\r\n\tasync save(entry: EntityOfType, embedUrl: string, entryToken: string, resumePage?: number): Promise {\r\n\t\tif (!this.session.flags.saveAndResume)\r\n\t\t\tthrow new Error('Entry saving is unsupported.');\r\n\r\n\t\tlet result;\r\n\t\tlet delta;\r\n\t\tconst entryJson = entry.serialize({ force: false, useAliases: true }) as any;\r\n\t\tconst order = entry.Order;\r\n\r\n\t\tif (entry.meta.isNew)\r\n\t\t\tresult = await this.saveNewEntry(entryJson, order, embedUrl, resumePage);\r\n\t\telse {\r\n\t\t\tdelta = this.diffPatcher.diff(this.initialEntryJson, entryJson);\r\n\t\t\tconst diffPatch = this.jsonPatchFormatter.format(delta);\r\n\t\t\tresult = await this.saveExistingEntry(entry.Id, entry.Entry.Version, diffPatch, order, embedUrl, entryToken, resumePage, entryJson.Entry.User, entryJson.Entry.Role);\r\n\t\t}\r\n\r\n\t\tif (result.response && result.response.data) {\r\n\t\t\tconst data = result.response.data;\r\n\t\t\tconst saveResult = parseStoreResult(data) as unknown as EntrySaveResult;\r\n\r\n\t\t\tthis.initialEntryJson = this.diffPatcher.clone(saveResult.entry);\r\n\r\n\t\t\tsaveResult.emailAddress = data.saveAndResumeRecipients;\r\n\t\t\tsaveResult.emailMessage = data.emailMessage;\r\n\t\t\tsaveResult.link = data.link;\r\n\t\t\tsaveResult.entry.Entry.Action = entry.Entry.Action;\r\n\t\t\tsaveResult.entry.Entry.Role = entry.Entry.Role;\r\n\t\t\t// Avoid loss of changes made while save request was in flight\r\n\t\t\tconst postSaveEntryJson = entry.serialize({ force: false, useAliases: true });\r\n\t\t\tdelta = this.diffPatcher.diff(this.initialEntryJson, postSaveEntryJson);\r\n\t\t\tif (delta)\r\n\t\t\t\tsaveResult.entry = this.diffPatcher.patch(saveResult.entry, delta);\r\n\t\t\treturn saveResult;\r\n\t\t}\r\n\r\n\t\tthrow this.parseSubmissionError(result.error, delta, entry.Entry.Action, entry.Entry.Role);\r\n\t}\r\n\r\n\tasync emailResumeLink(entryId: string, recipient: string, message: string, embedUrl: string) {\r\n\t\tconst result = await this.serviceRequest({\r\n\t\t\tmethod: 'post',\r\n\t\t\tendpoint: 'svc/save-resume/send-email',\r\n\t\t\tdata: { entryId, recipient, message, embedUrl }\r\n\t\t});\r\n\r\n\t\tif (result.error)\r\n\t\t\tthrow this.parseError(result.error);\r\n\t}\r\n\r\n\tasync resume(formId: string, entryToken: string): Promise {\r\n\t\tconst result = await this.serviceRequest({\r\n\t\t\tmethod: 'get',\r\n\t\t\tendpoint: 'svc/resume-entry',\r\n\t\t\tparams: { formId, entryToken }\r\n\t\t});\r\n\r\n\t\tif (result.response && result.response.data) {\r\n\t\t\t// Parse entry JSON into POJO\r\n\t\t\tresult.response.data.entry = JSON.parse(result.response.data.entryJson);\r\n\t\t\tdelete result.response.data.entryJson;\r\n\t\t\tthis.initialEntryJson = result.response.data.entry;\r\n\t\t\treturn result.response.data;\r\n\t\t}\r\n\r\n\t\tthrow this.parseError(result.error);\r\n\t}\r\n\r\n\tupdateInitialEntryJson(entryJson: ObjectLookup) {\r\n\t\tthis.initialEntryJson = entryJson;\r\n\t}\r\n\r\n\tregisterView(viewId: string, viewType: ViewType = ViewType.Table) {\r\n\t\tthis.viewId = viewId;\r\n\t\tthis.viewType = viewType;\r\n\t}\r\n\r\n\tparseSubmissionError(error: ServiceRequestError, delta: Delta, action: string, role: string): Error {\r\n\t\tif (error instanceof CustomResponseError && error.data && error.data.Type === 'Entry Conflict') {\r\n\t\t\tthis.initialEntryJson = error.data.Data.entry;\r\n\r\n\t\t\tconst patchedEntry = this.diffPatcher.patch(this.diffPatcher.clone(this.initialEntryJson), delta);\r\n\t\t\tpatchedEntry.Entry.Action = action;\r\n\t\t\tpatchedEntry.Entry.Role = role;\r\n\t\t\treturn new ConcurrentEntryConflict(patchedEntry, error.data.Data.order);\r\n\t\t}\r\n\t\treturn this.parseError(error);\r\n\t}\r\n\r\n\tprivate performActionForExistingEntry(entryId: string, entryVersion: number, action: string, patch: any[], order: any, paymentToken: PaymentToken, embedUrl: string, entryToken: string, role?: string, user?:object): Promise {\r\n\t\treturn this.serviceRequest({\r\n\t\t\tmethod: 'post',\r\n\t\t\tendpoint: 'svc/update-entry/perform-action' + (this.isAdmin ? '/admin' : ''),\r\n\t\t\tisCognitoJson: true,\r\n\t\t\theaders: this.getValidationHeaders(),\r\n\t\t\tdata: {\r\n\t\t\t\tFormId: this.session.formId,\r\n\t\t\t\tEntryId: entryId,\r\n\t\t\t\tEntryVersion: entryVersion,\r\n\t\t\t\tAction: action,\r\n\t\t\t\tPatch: patch,\r\n\t\t\t\tEntryToken: entryToken,\r\n\t\t\t\tEmbedUrl: embedUrl,\r\n\t\t\t\tOrderAmount: order ? order.OrderAmount : null,\r\n\t\t\t\tPaymentToken: paymentToken || null,\r\n\t\t\t\tRole: this.isAdmin && role ? role : null,\r\n\t\t\t\tUserInfo: user,\r\n\t\t\t\tIsStoragePatch: true,\r\n\t\t\t\tViewId: this.viewId,\r\n\t\t\t\tIsFormView: this.viewType === ViewType.Form\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprivate performActionForNewEntry(action: string, entry: object, order: any, embedUrl: string): Promise {\r\n\t\treturn this.serviceRequest({\r\n\t\t\tmethod: 'post',\r\n\t\t\tendpoint: 'svc/update-entry/perform-action/new-entry' + (this.isAdmin ? '/admin' : ''),\r\n\t\t\tisCognitoJson: true,\r\n\t\t\theaders: this.getValidationHeaders(),\r\n\t\t\tdata: {\r\n\t\t\t\tFormId: this.session.formId,\r\n\t\t\t\tAction: action,\r\n\t\t\t\tEntryJson: JSON.stringify(entry),\r\n\t\t\t\tAccessToken: this.session.accessToken,\r\n\t\t\t\tEmbedUrl: embedUrl,\r\n\t\t\t\tOrderAmount: order ? order.OrderAmount : null,\r\n\t\t\t\tIsStoragePatch: true,\r\n\t\t\t\tViewId: this.viewId,\r\n\t\t\t\tIsFormView: this.viewType === ViewType.Form\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprivate saveNewEntry(entry: object, order: any, embedUrl: string, resumePage?: number): Promise {\r\n\t\treturn this.serviceRequest({\r\n\t\t\tmethod: 'post',\r\n\t\t\tendpoint: 'svc/update-entry/save/new-entry' + (this.isAdmin ? '/admin' : ''),\r\n\t\t\tisCognitoJson: true,\r\n\t\t\theaders: this.getValidationHeaders(),\r\n\t\t\tdata: {\r\n\t\t\t\tFormId: this.session.formId,\r\n\t\t\t\tEntryJson: JSON.stringify(entry),\r\n\t\t\t\tAccessToken: this.session.accessToken,\r\n\t\t\t\tEmbedUrl: embedUrl,\r\n\t\t\t\tOrderAmount: order ? order.OrderAmount : null,\r\n\t\t\t\tLastPageViewed: resumePage,\r\n\t\t\t\tIsStoragePatch: true,\r\n\t\t\t\tViewId: this.viewId,\r\n\t\t\t\tGenerateAssignment: this.isAdmin && this.viewType === ViewType.Form\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprivate saveExistingEntry(entryId: string, entryVersion: number, patch: any[], order: any, embedUrl: string, entryToken: string, resumePage?: number, user?: object, role?: string): Promise {\r\n\t\treturn this.serviceRequest({\r\n\t\t\tmethod: 'post',\r\n\t\t\tendpoint: 'svc/update-entry/save' + (this.isAdmin ? '/admin' : ''),\r\n\t\t\tisCognitoJson: true,\r\n\t\t\theaders: this.getValidationHeaders(),\r\n\t\t\tdata: {\r\n\t\t\t\tFormId: this.session.formId,\r\n\t\t\t\tEntryId: entryId,\r\n\t\t\t\tEntryVersion: entryVersion,\r\n\t\t\t\tPatch: patch,\r\n\t\t\t\tEntryToken: entryToken,\r\n\t\t\t\tEmbedUrl: embedUrl,\r\n\t\t\t\tOrderAmount: order ? order.OrderAmount : null,\r\n\t\t\t\tLastPageViewed: resumePage,\r\n\t\t\t\tUserInfo: user,\r\n\t\t\t\tRole: role,\r\n\t\t\t\tIsStoragePatch: true,\r\n\t\t\t\tViewId: this.viewId,\r\n\t\t\t\tGenerateAssignment: this.isAdmin && this.viewType === ViewType.Form\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}","/**\r\n * This is a TypeGen auto-generated file.\r\n * Any changes made to this file can be lost when this file is regenerated.\r\n */\r\n\r\nexport enum IndexType {\r\n\tAdd = 'Add',\r\n\tUpdate = 'Update',\r\n\tDelete = 'Delete',\r\n\tBatch = 'Batch',\r\n\tCheckpoint = 'Checkpoint',\r\n\tLock = 'Lock',\r\n\tFlush = 'Flush',\r\n}\r\n","import api from \"!../../../../node_modules/.pnpm/style-loader@2.0.0_webpack@4.46.0/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../node_modules/.pnpm/css-loader@3.2.0_webpack@4.46.0/node_modules/css-loader/dist/cjs.js!../../../../node_modules/.pnpm/sass-loader@10.1.1_sass@1.44.0_webpack@4.46.0/node_modules/sass-loader/dist/cjs.js!../../../../node_modules/.pnpm/sass-resources-loader@2.0.1/node_modules/sass-resources-loader/lib/loader.js??ref--5-oneOf-1-3!./_toast-message.scss\";\n\nvar options = {\"attributes\":{\"class\":\"cog-style\"}};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","var render = function render() {\n var _vm = this,\n _c = _vm._self._c\n return _c(\"i-ex\")\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/.pnpm/babel-loader@8.0.5_@babel+core@7.22.6_webpack@4.46.0/node_modules/babel-loader/lib/index.js??ref--3!../../../../node_modules/.pnpm/vue-loader@15.10.0_css-loader@3.2.0_lodash@4.17.21_vue-template-compiler@2.7.15_webpack@4.46.0/node_modules/vue-loader/lib/index.js??vue-loader-options!./ToastMessageEx.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/.pnpm/babel-loader@8.0.5_@babel+core@7.22.6_webpack@4.46.0/node_modules/babel-loader/lib/index.js??ref--3!../../../../node_modules/.pnpm/vue-loader@15.10.0_css-loader@3.2.0_lodash@4.17.21_vue-template-compiler@2.7.15_webpack@4.46.0/node_modules/vue-loader/lib/index.js??vue-loader-options!./ToastMessageEx.vue?vue&type=script&lang=js&\"","\r\n\r\n","import { render, staticRenderFns } from \"./ToastMessageEx.vue?vue&type=template&id=63851eae&\"\nimport script from \"./ToastMessageEx.vue?vue&type=script&lang=js&\"\nexport * from \"./ToastMessageEx.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/.pnpm/vue-loader@15.10.0_css-loader@3.2.0_lodash@4.17.21_vue-template-compiler@2.7.15_webpack@4.46.0/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import 'src/style/_toast-message.scss';\r\n\r\nimport { Message } from '@cognitoforms/element-ui';\r\nimport type { ElMessageComponent, ElMessageOptions } from '@cognitoforms/element-ui/types/message';\r\nimport IEx from './ToastMessageEx.vue';\r\nimport type { VNode } from 'vue';\r\nimport Vue from 'vue';\r\n\r\nconst ExClass = Vue.extend(IEx);\r\ninterface ElMessageComponentInternals extends ElMessageComponent\r\n{\r\n\tmessage: '';\r\n\tcloseAll: () => void;\r\n}\r\n\r\ntype MessageComponent = ElMessageComponentInternals & ElMessageComponent;\r\n\r\ntype ToastListener = (formId: string, message: string | VNode) => void;\r\nconst toastListeners: ToastListener[] = [];\r\nconst messagesDisplayed = new Set();\r\nexport default function(formId: string, options: ElMessageOptions) {\r\n\tfor (const callback of toastListeners)\r\n\t\tcallback(formId, options.message);\r\n\r\n\tif (typeof options.message === 'string') {\r\n\t\tfor (const messageInstance of messagesDisplayed) {\r\n\t\t\tif (messageInstance.message === options.message)\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t\toptions.onClose = (messageInstance: MessageComponent) => {\r\n\t\t\tmessagesDisplayed.delete(messageInstance);\r\n\t\t};\r\n\t}\r\n\r\n\toptions.customClass = `cog-cognito cog-${formId} ` + (options.customClass || '');\r\n\tconst messageInstance = Message({ duration: options.type === 'success' ? 3000 : 0, showClose: true, ...options });\r\n\r\n\tif (messageInstance.showClose) {\r\n\t\tconst exInstance = new ExClass();\r\n\t\texInstance.$mount();\r\n\t\tdocument.querySelector('.el-message:last-child .el-message__closeBtn').appendChild(exInstance.$el);\r\n\t}\r\n\r\n\tif (typeof options.message === 'string')\r\n\t\tmessagesDisplayed.add(messageInstance);\r\n\r\n\treturn messageInstance;\r\n};\r\n\r\nexport function onToastMessageRequested(callback: ToastListener) {\r\n\tconst unsubscribe = () => {\r\n\t\tconst index = toastListeners.indexOf(callback);\r\n\t\tif (index >= 0)\r\n\t\t\ttoastListeners.splice(index, 1);\r\n\t};\r\n\ttoastListeners.push(callback);\r\n\treturn unsubscribe;\r\n}\r\n\r\nexport function closeAllToastMessages() {\r\n\tmessagesDisplayed.forEach((message: MessageComponent) => {\r\n\t\tif (message.showClose)\r\n\t\t\tmessage.close();\r\n\t});\r\n}","import { isEntityType, type Entity } from '@cognitoforms/model.js';\r\nimport type { EntryViewFilter } from '@cognitoforms/types/server-types/forms/model/entry-view-filter';\r\nimport type { CognitoGlobals } from './entry-view-types';\r\n\r\n// temporary type declaration for accessing entry statuses, see getStatusFunction\r\ndeclare let Cognito: CognitoGlobals;\r\n\r\n// Compile a Javascript function from a custom filter expression\r\nexport function compileExpression(fn: {Exports: object, Body: string}, Cognito: object): any {\r\n\tlet expression = '';\r\n\tfor (const exportFn in fn.Exports) {\r\n\t\tif (Object.prototype.hasOwnProperty.call(fn.Exports, exportFn)) {\r\n\t\t\texpression += `const ${exportFn}=${fn.Exports[exportFn]};`;\r\n\t\t}\r\n\t}\r\n\tif (expression) {\r\n\t\texpression += `return function() { return ${fn.Body}; }`;\r\n\t\t// eslint-disable-next-line no-new-func\r\n\t\tconst compile = Function('Cognito', expression);\r\n\t\treturn compile(Cognito);\r\n\t}\r\n\telse {\r\n\t\t// eslint-disable-next-line no-new-func\r\n\t\treturn Function(`return ${fn.Body};`);\r\n\t}\r\n}\r\n\r\n// Determines whether the entity contains the specified keyword\r\nfunction matchesKeyword(entity: Entity, keyword: string, visited: Set): boolean {\r\n\t// If entity is null or is an instance of EntryMeta, break\r\n\tif (entity == null || entity.meta.type.baseType?.fullName === 'Forms.EntryMeta') return false;\r\n\r\n\t// Push the entity onto the stack to prevent recursive visitation of the same entity\r\n\tvisited.add(entity);\r\n\r\n\t// Search all instance properties of the entity\r\n\tconst properties = entity.meta.type.properties;\r\n\tfor (const property of properties) {\r\n\t\t// If property produces value of type FormRef/FormEntry or is an internal property, break\r\n\t\tif (property.name === 'Form' || property.name === 'ParentSection' || property.name.indexOf('_') > 0)\r\n\t\t\tcontinue;\r\n\r\n\t\tconst value = property.value(entity);\r\n\t\tif (value != null) {\r\n\t\t\t// Perform a case-insensitive search of value properties\r\n\t\t\tif (!isEntityType(property.propertyType)) {\r\n\t\t\t\tif (value.toString().toLowerCase().indexOf(keyword) > -1)\r\n\t\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\t// Recursively search child entities and entity lists\r\n\t\t\telse {\r\n\t\t\t\tif (value instanceof Array) {\r\n\t\t\t\t\tfor (let i = 0; i < value.length; i++) {\r\n\t\t\t\t\t\tif (!visited.has(value[i]) && matchesKeyword(value[i], keyword, visited))\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if (!visited.has(value) && matchesKeyword(value, keyword, visited))\r\n\t\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nexport function getKeywordFunction(filter: EntryViewFilter): () => boolean {\r\n\tlet keywordFn: () => boolean;\r\n\tif (filter.Keyword) {\r\n\t\tconst keywordRegex = /\"(.+?)\"|(\\S+)/g;\r\n\t\tconst keywords = [];\r\n\t\tlet keyword: string[];\r\n\t\twhile ((keyword = keywordRegex.exec(filter.Keyword)) !== null)\r\n\t\t\tkeywords.push((keyword[1] || keyword[2]).toLowerCase());\r\n\r\n\t\tkeywordFn = function (this: Entity) {\r\n\t\t\tfor (let k = 0; k < keywords.length; k++)\r\n\t\t\t\tif (!matchesKeyword(this, keywords[k], new Set()))\r\n\t\t\t\t\treturn false;\r\n\t\t\treturn true;\r\n\t\t};\r\n\t}\r\n\treturn keywordFn;\r\n}\r\n\r\nexport function getStatusFunction(filter: EntryViewFilter, entryType: string): () => boolean {\r\n\tlet statusFn: () => boolean;\r\n\tif (filter.EntryStatus.length > 0 || filter.PaymentStatus.length > 0) {\r\n\t\tlet entryStatus = filter.EntryStatus.length > 0 ? filter.EntryStatus : null;\r\n\t\tconst paymentStatus = filter.PaymentStatus.length > 0 ? filter.PaymentStatus : null;\r\n\t\t// If an entry status filter is present, map status id filters to status names if necessary\r\n\t\tif (entryStatus && Cognito.Forms.EntryStatuses?.[entryType]?.length) {\r\n\t\t\tconst entryStatuses = Cognito.Forms.EntryStatuses[entryType];\r\n\r\n\t\t\tentryStatus = entryStatus.map(function (statusId) {\r\n\t\t\t\tif (isNaN(statusId))\r\n\t\t\t\t\treturn statusId;\r\n\r\n\t\t\t\treturn Cognito.Forms.getEntryStatusById(entryStatuses, statusId).Name;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tstatusFn = function (this: Entity) {\r\n\t\t\tconst form = this['ItemNumber'] ? this['Form'] : this;\r\n\t\t\treturn (!entryStatus || entryStatus.indexOf(form.Entry.Status) > -1) && (!paymentStatus || (form.Order?.PaymentStatus && paymentStatus.indexOf(form.Order.PaymentStatus.Name) > -1));\r\n\t\t};\r\n\t}\r\n\treturn statusFn;\r\n}\r\n","import type { EntityOfType, Entity, PropertyPath } from '@cognitoforms/model.js';\r\nimport type { FormEntryIndex } from '@cognitoforms/types/server-types/forms/model/form-entry-index';\r\nimport type { FormEntry } from '@cognitoforms/types/server-types/forms/model/form-entry';\r\nimport type EntryViewService from './entry-view-service';\r\nimport { getEntryId, getTimestamp, keyFromIndex } from './entry-view-util';\r\nimport type { EntryData, EntryKey, UserSpecificViewSettings } from './entry-view-types';\r\nimport type { UserInfo } from '@cognitoforms/types/server-types/forms/model/user-info';\r\nimport { isEntityType } from '@cognitoforms/model.js';\r\nimport { compileExpression, getKeywordFunction, getStatusFunction } from './entry-set-filtering';\r\nimport type { EntryViewFilter } from '@cognitoforms/types/server-types/forms/model/entry-view-filter';\r\nimport type { FieldInfo } from '@cognitoforms/types/server-types/model/field-info';\r\nimport { Deferred } from 'src/util/deferred';\r\nimport type { WorkflowRole } from '@cognitoforms/types/server-types/forms/model/workflow-role';\r\nimport { IndexType } from '@cognitoforms/types/server-types/forms/model/index-type';\r\n\r\ntype FieldInfoExtensions = { property: PropertyPath };\r\ntype SortFunction = (entry1: EntityOfType, entry2: EntityOfType) => number;\r\n\r\ntype EntrySetFormEntry = EntityOfType & { $etag: string };\r\n\r\n// Default sorting by server-side sort key\r\nfunction defaultSort(a: FormEntryIndex, b: FormEntryIndex) {\r\n\tconst ak = a.SortKey;\r\n\tconst bk = b.SortKey;\r\n\treturn ak === bk ? 0 : ak < bk ? -1 : 1;\r\n}\r\n\r\nexport default class EntrySet {\r\n\tprivate readonly service: EntryViewService;\r\n\tprivate readonly entryType: string;\r\n\tprivate indexes = new Map();\r\n\tprivate entries = new Map();\r\n\treadonly formId: string;\r\n\treadonly view: string;\r\n\treadonly userShort: string;\r\n\treadonly role: WorkflowRole;\r\n\treadonly user: UserInfo;\r\n\tprivate timestamp: string = '';\r\n\tprivate filterCriteria: EntryViewFilter;\r\n\tprivate sortCriteria: SortFunction;\r\n\t/**\r\n\t * Array of FormEntryIndex objects that this entry set contains, order matches that of Grid UI.\r\n\t */\r\n\tprivate indexList: FormEntryIndex[];\r\n\t/**\r\n\t * Mapping of entry ID to the corresponding entry's position in `indexList`.\r\n\t */\r\n\tprivate entryPosition: Map;\r\n\t/**\r\n\t * An optional entry set. Used to fetch the full unfiltered set of entries,\r\n\t * and to determine if current entry set is filtered: If `unfilteredParent` is defined, `this` entry set is filtered.\r\n\t */\r\n\tunfilteredParent: EntrySet;\r\n\r\n\tprivate constructor(\r\n\t\tviewService: EntryViewService,\r\n\t\tentryType: string,\r\n\t\tview: string,\r\n\t\trole?: WorkflowRole,\r\n\t\tuser?: UserInfo,\r\n\t\tuserShort?: string,\r\n\t\tfilterCriteria?: EntryViewFilter,\r\n\t\tunfilteredParent?: EntrySet\r\n\t) {\r\n\t\tthis.service = viewService;\r\n\t\tthis.entryType = entryType;\r\n\t\tthis.formId = view.split('-')[0];\r\n\t\tthis.view = view;\r\n\t\tthis.role = role;\r\n\t\tthis.user = user;\r\n\t\tthis.userShort = userShort;\r\n\t\tthis.filterCriteria = filterCriteria;\r\n\t\tthis.unfilteredParent = unfilteredParent;\r\n\t}\r\n\r\n\tprivate static instances = new Map();\r\n\tstatic async get(viewService: EntryViewService, entryType: string, view: string, role?: WorkflowRole, user?: UserInfo, userShort?: string) {\r\n\t\tlet key = `${viewService.id}::${view}`;\r\n\t\tif (userShort && role)\r\n\t\t\tkey += `::${userShort}::${role.Id}`;\r\n\t\tconst instance = EntrySet.instances.get(key) || new EntrySet(viewService, entryType, view, role, user, userShort);\r\n\t\tthis.instances.set(key, instance);\r\n\t\tawait instance.initializeFromCache();\r\n\t\treturn instance;\r\n\t}\r\n\r\n\tprivate get isUserSpecific() {\r\n\t\treturn !!this.userShort;\r\n\t}\r\n\r\n\tprivate get userSpecificSettings(): UserSpecificViewSettings {\r\n\t\treturn this.isUserSpecific\r\n\t\t\t? { userShort: this.userShort, roleId: this.role.Id }\r\n\t\t\t: null;\r\n\t}\r\n\r\n\tprivate refreshPromise: Promise;\r\n\r\n\t// Refresh entry set\r\n\tasync refresh(progressCallback?: (progress: number, interval: number) => void): Promise {\r\n\t\tif (this.refreshPromise)\r\n\t\t\treturn this.refreshPromise;\r\n\r\n\t\tconst task = new Deferred();\r\n\t\tthis.refreshPromise = task.promise;\r\n\r\n\t\t// If current instance is a filtered set, refresh will fetch indexes unnecessarily\r\n\t\tif (this.unfilteredParent) {\r\n\t\t\t// Refresh the parent, refilter it, and return the filtered child entry set\r\n\t\t\ttask.resolve(await this.unfilteredParent.filter(this.filterCriteria, this.sortCriteria));\r\n\t\t}\r\n\t\t// If current instance uses a server-side filter or is unfiltered, refresh without refiltering\r\n\t\telse {\r\n\t\t\tconst indexes = await this.service.getIndex(this.formId, this.view, this.userSpecificSettings, this.timestamp, progressCallback);\r\n\t\t\tthis.compileTransactionalIndexes(indexes);\r\n\t\t\tawait this.cacheIndexes();\r\n\t\t\tawait this.sort(this.sortCriteria);\r\n\t\t\ttask.resolve();\r\n\t\t}\r\n\t\tthis.refreshPromise = null;\r\n\t\treturn task.promise;\r\n\t}\r\n\r\n\tprivate pollEntryPromise: Promise;\r\n\r\n\t// Poll for entry changes\r\n\tasync pollEntry(entryId: string): Promise {\r\n\t\tif (this.pollEntryPromise)\r\n\t\t\treturn this.pollEntryPromise;\r\n\r\n\t\tconst task = new Deferred();\r\n\t\tthis.pollEntryPromise = task.promise;\r\n\r\n\t\t// If current instance is a filtered set, poll entry in parent and return refiltered child\r\n\t\tif (this.unfilteredParent) {\r\n\t\t\tawait this.unfilteredParent.filter(this.filterCriteria, this.sortCriteria, this, entryId);\r\n\t\t}\r\n\t\t// If current instance uses a server-side filter or is unfiltered, refresh without refiltering\r\n\t\telse {\r\n\t\t\tconst indexes = await this.service.getSpecificIndex(entryId, this.formId, this.view, this.userSpecificSettings, this.timestamp);\r\n\t\t\tthis.compileTransactionalIndexes(indexes);\r\n\t\t\tawait this.cacheIndexes();\r\n\t\t\tawait this.sort(this.sortCriteria);\r\n\t\t}\r\n\t\ttask.resolve();\r\n\t\tthis.pollEntryPromise = null;\r\n\t\treturn task.promise;\r\n\t}\r\n\r\n\tprivate async cacheIndexes() {\r\n\t\treturn this.service.cacheIndexes(\r\n\t\t\tthis.formId,\r\n\t\t\tthis.view,\r\n\t\t\tArray.from(this.indexes.values()),\r\n\t\t\tthis.timestamp,\r\n\t\t\tthis.userSpecificSettings);\r\n\t}\r\n\r\n\tprivate async initializeFromCache() {\r\n\t\tconst cachedIndexes = await this.service.loadCachedIndexes(this.formId, this.view, this.userSpecificSettings);\r\n\t\tif (cachedIndexes) {\r\n\t\t\tthis.indexes = new Map(cachedIndexes.entries.map(index => [getEntryId(index), index]));\r\n\t\t\tthis.timestamp = cachedIndexes.timestamp;\r\n\t\t}\r\n\t}\r\n\r\n\t// Compiles \"transactional\" (add/update/delete/etc.) indexes into the actual list of indexes representing entries which are in this entry set\r\n\tprivate compileTransactionalIndexes(indexes: FormEntryIndex[]) {\r\n\t\tlet latestTimestamp = this.timestamp;\r\n\t\tlet atobErrorLogged = false;\r\n\r\n\t\tfor (const index of indexes) {\r\n\t\t\tconst id = getEntryId(index);\r\n\r\n\t\t\t// Track the most recent timestamp\r\n\t\t\tif (getTimestamp(index) > latestTimestamp) {\r\n\t\t\t\tlatestTimestamp = getTimestamp(index);\r\n\t\t\t}\r\n\r\n\t\t\t// Clear the cache and start over when a checkpoint is encountered\r\n\t\t\tif (index.Type === IndexType.Checkpoint || index.Type === IndexType.Flush) {\r\n\t\t\t\tthis.indexes.clear();\r\n\t\t\t}\r\n\t\t\t// Add items to the index that are being added or updated\r\n\t\t\telse if (index.Type === IndexType.Add || index.Type === IndexType.Update) {\r\n\t\t\t\t// Decode the sort key\r\n\t\t\t\tif (!index['sortDecoded'] && index.SortKey !== undefined) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tindex.SortKey = atob(index.SortKey);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (e) {\r\n\t\t\t\t\t\t!atobErrorLogged && console.log(`Client-side atob error - error: ${e}, sortKey: ${index.SortKey}`);\r\n\t\t\t\t\t\tatobErrorLogged = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tindex['sortDecoded'] = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.indexes.set(id, index);\r\n\t\t\t\tthis.validateCachedEntry(id, index);\r\n\t\t\t}\r\n\t\t\telse if (index.Type === IndexType.Delete) {\r\n\t\t\t\tthis.indexes.delete(id);\r\n\t\t\t\tthis.entries.delete(id);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.timestamp = latestTimestamp;\r\n\t}\r\n\r\n\tprivate filterPromise: Promise;\r\n\r\n\t/**\r\n\t * Apply filter to an unfiltered entry set.\r\n\t * The caller (`this`) must contain a full set of entries (view `{formId}-0`) to remove effect of server-side filters.\r\n\t * @param filter Plain JS object representing the filter\r\n\t * @param sortCriteria Sort criteria to apply to the filtered set\r\n\t * @param entryId Entry to poll for changes to (only applicable when polling a filtered set)\r\n\t * @returns An entry set containing a filtered subset of the caller entry set\r\n\t */\r\n\tasync filter(filter: EntryViewFilter, sortCriteria: SortFunction, filteredSet?: EntrySet, entryId?: string): Promise {\r\n\t\t// Use filterPromise as a \"lock\" to queue multiple filter calls\r\n\t\tconst filterTask = new Deferred();\r\n\t\twhile (this.filterPromise)\r\n\t\t\tawait this.filterPromise;\r\n\r\n\t\tthis.filterPromise = filterTask.promise;\r\n\r\n\t\tconst filterFn = await this.getFilterFunction(filter);\r\n\r\n\t\t// If filterFn is undefined, return the current unfiltered entry set\r\n\t\tif (!filterFn) {\r\n\t\t\tthis.sortCriteria = sortCriteria;\r\n\t\t\tawait this.refresh();\r\n\t\t\tthis.filterPromise = null;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\t// Store and clear the original sort criteria to avoid sorting the original entry set before applying the filter\r\n\t\tthis.sortCriteria = null;\r\n\t\tif (entryId) {\r\n\t\t\tawait this.pollEntry(entryId);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tawait this.refresh();\r\n\t\t}\r\n\t\tawait this.loadAllEntries();\r\n\r\n\t\tif (!filteredSet)\r\n\t\t\tfilteredSet = new EntrySet(this.service, this.entryType, this.view, this.role, this.user, this.userShort, filter, this);\r\n\r\n\t\tfilteredSet.timestamp = null;\r\n\t\tfilteredSet.entries.clear();\r\n\t\tfilteredSet.indexes.clear();\r\n\r\n\t\t// Add entries that match the filter\r\n\t\tfor (const [id, index] of this.indexes) {\r\n\t\t\tif (filterFn.call(await this.getEntry(index))) {\r\n\t\t\t\tfilteredSet.indexes.set(id, index);\r\n\t\t\t\tif (this.entries.has(id))\r\n\t\t\t\t\tfilteredSet.entries.set(id, this.entries.get(id));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Restore the sort criteria for the original entry set\r\n\t\tthis.sortCriteria = sortCriteria;\r\n\r\n\t\t// Sort the filtered set\r\n\t\tawait filteredSet.sort(sortCriteria);\r\n\r\n\t\t// Release the filter promise \"lock\"\r\n\t\tfilterTask.resolve(filteredSet);\r\n\t\tthis.filterPromise = null;\r\n\t\treturn filteredSet;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a Javascript function that can be used to filter entries on the client\r\n\t */\r\n\tprivate async getFilterFunction(filter: EntryViewFilter) {\r\n\t\tif (filter.Invalid)\r\n\t\t\treturn function () { return false; };\r\n\r\n\t\t// Keyword Filter\r\n\t\tconst keywordFn = getKeywordFunction(filter);\r\n\r\n\t\t// Custom Filter\r\n\t\tif (filter.Expression) {\r\n\t\t\tconst fn = await this.service.getFilter(this.formId, filter);\r\n\t\t\tconst filterExpression = compileExpression(fn, this.service.model.modelOptions.$namespace);\r\n\t\t\tconst customFilter = function (this: Entity) {\r\n\t\t\t\ttry { return filterExpression.call(this); }\r\n\t\t\t\tcatch (e) { return false; }\r\n\t\t\t};\r\n\t\t\tif (keywordFn)\r\n\t\t\t\treturn function (this: Entity) { return customFilter.call(this) && keywordFn.call(this); };\r\n\t\t\telse\r\n\t\t\t\treturn customFilter;\r\n\t\t}\r\n\r\n\t\t// Entry/Payment Status Filter\r\n\t\tconst statusFn = getStatusFunction(filter, `Cognito.${this.entryType}`);\r\n\r\n\t\t// Combine keyword and status filter functions, as appropriate\r\n\t\tif (keywordFn && statusFn)\r\n\t\t\treturn function (this: Entity) { return statusFn.call(this) && keywordFn.call(this); };\r\n\t\telse if (keywordFn)\r\n\t\t\treturn keywordFn;\r\n\t\telse if (statusFn)\r\n\t\t\treturn statusFn;\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds `model.js` property chains to model `fieldInfos`\r\n\t */\r\n\tgetPropertyChains(fieldInfos: (EntityOfType & Partial)[]): (EntityOfType & FieldInfoExtensions)[] {\r\n\t\tconst formEntryType = this.service.model.resolveType(this.entryType);\r\n\t\tfieldInfos.forEach(fieldInfo => {\r\n\t\t\tconst propertyPath = formEntryType.getPath(fieldInfo.Path);\r\n\t\t\tfieldInfo.property = propertyPath;\r\n\t\t});\r\n\t\treturn fieldInfos as (EntityOfType & FieldInfoExtensions)[];\r\n\t}\r\n\r\n\tsize(): number {\r\n\t\treturn this.indexes.size;\r\n\t}\r\n\r\n\tget length() {\r\n\t\treturn this.size();\r\n\t}\r\n\r\n\t// Exists to provide access to isEntityType to gridview.js\r\n\tisEntityType(propertyType: any): boolean {\r\n\t\treturn isEntityType(propertyType);\r\n\t}\r\n\r\n\t/**\r\n\t * Sorts the entry set using the specified criteria\r\n\t * @param sortCriteria JS function representing the sort criteria, parameter is optional (for unsorted entry sets)\r\n\t */\r\n\tasync sort(sortCriteria?: SortFunction): Promise {\r\n\t\tthis.indexList = Array.from(this.indexes.values());\r\n\t\t// If no sortCriteria, sort immediately using the server sort key\r\n\t\tif (!sortCriteria) {\r\n\t\t\tthis.indexList.sort(defaultSort);\r\n\t\t\tthis.rebuildEntryPosition();\r\n\t\t}\r\n\t\t// Otherwise, sort asynchronously using client sort criteria\r\n\t\telse {\r\n\t\t\tthis.sortCriteria = sortCriteria;\r\n\t\t\tawait this.loadAllEntries();\r\n\t\t\tthis.indexList.sort((index1, index2) => {\r\n\t\t\t\treturn this.sortCriteria(this.getCachedEntry(getEntryId(index1)), this.getCachedEntry(getEntryId(index2)));\r\n\t\t\t});\r\n\t\t\tthis.rebuildEntryPosition();\r\n\t\t}\r\n\t}\r\n\r\n\tgetSortCriteria() {\r\n\t\treturn this.sortCriteria;\r\n\t}\r\n\r\n\t/**\r\n\t * Reconciles `entryPosition` (map of entry => grid row) with the newly sorted `indexList`\r\n\t */\r\n\tprivate rebuildEntryPosition() {\r\n\t\tthis.entryPosition = new Map(this.indexList.map((idx, pos) => [getEntryId(idx), pos]));\r\n\t}\r\n\r\n\tlistIndex(): FormEntryIndex[] {\r\n\t\treturn this.indexList;\r\n\t}\r\n\r\n\tindexOfEntryId(entryId: string): number {\r\n\t\treturn this.entryPosition.get(entryId);\r\n\t}\r\n\r\n\tprivate entryIndexAt(index: number): FormEntryIndex {\r\n\t\treturn this.indexList[index];\r\n\t}\r\n\r\n\t/**\r\n\t * Fetches entry key located at a specified row in the entries grid\r\n\t */\r\n\tentryKeyAt(index: number): EntryKey {\r\n\t\tconst entryIndex = this.entryIndexAt(index);\r\n\t\treturn keyFromIndex(entryIndex);\r\n\t}\r\n\r\n\t/**\r\n\t * Fetches entry located at a specified row in the entries grid\r\n\t */\r\n\tentryAt(index: number, callback: (entry: EntityOfType) => void): EntityOfType | null {\r\n\t\tconst entryIndex = this.entryIndexAt(index);\r\n\t\tconst id = keyFromIndex(entryIndex).EntryId;\r\n\t\tconst typeCacheEntry = this.getCachedEntry(id);\r\n\t\t// If entry is cached, it can be fetched synchronously for SlickGrid use\r\n\t\tif (typeCacheEntry) {\r\n\t\t\treturn typeCacheEntry;\r\n\t\t}\r\n\t\t// If asynchronous then after promise resolves, perform callback to rerender SlickGrid row\r\n\t\telse {\r\n\t\t\tthis.getEntry(entryIndex).then(callback);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\r\n\tgetIndexItem(id: string): FormEntryIndex {\r\n\t\treturn this.indexes.get(id);\r\n\t}\r\n\r\n\tprivate async loadAllEntries(): Promise {\r\n\t\tconst entryPromises = [];\r\n\t\tfor (const index of this.indexes.values()) {\r\n\t\t\tentryPromises.push(this.getEntry(index));\r\n\t\t}\r\n\t\treturn Promise.all(entryPromises);\r\n\t}\r\n\r\n\tprivate validateCachedEntry(entryId: string, index: FormEntryIndex) {\r\n\t\t// for filtered sets, this.entries is empty because the entries were pulled from type cache.\r\n\t\t// deserialized entry instances don't have an $etag property with which to compare.\r\n\t\tconst cachedEntry = this.entries.get(entryId) || this.getCachedEntry(entryId);\r\n\t\tif (cachedEntry && cachedEntry.$etag !== index.EntryETag) {\r\n\t\t\tthis.entries.delete(entryId);\r\n\t\t\tthis.service.model.resetEntry('Forms.FormEntry', entryId);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate getCachedEntry(id: string): EntrySetFormEntry {\r\n\t\tconst entry = this.service.model.model.types['Forms.FormEntry'].get(id) as EntrySetFormEntry;\r\n\r\n\t\tif (entry && !entry.$etag)\r\n\t\t\tconsole.warn('A FormEntry is cached in the model without an $etag. This could lead to interaction with stale data. Id=', id);\r\n\r\n\t\t// if the cached entry has a different role than the current entry set, it needs to be reconstructed\r\n\t\tif (entry && this.role && this.role.Name !== entry.Entry.Role)\r\n\t\t\treturn null;\r\n\r\n\t\treturn entry;\r\n\t}\r\n\r\n\tprivate async constructEntry(state: EntryData): Promise {\r\n\t\tconst id = state.Id;\r\n\t\tconst typeCacheEntry = this.getCachedEntry(id);\r\n\t\tlet entry: EntityOfType = null;\r\n\r\n\t\tif (typeCacheEntry) {\r\n\t\t\tentry = typeCacheEntry;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// use sync construction to ensure we can mark the entry with an etag before anyone else pulls it from the type cache\r\n\t\t\tentry = this.service.model.construct(this.entryType, state as any, true);\r\n\t\t\t(entry as EntrySetFormEntry).$etag = state.$etag;\r\n\t\t}\r\n\r\n\t\tawait entry.initialized;\r\n\t\treturn entry as EntrySetFormEntry;\r\n\t}\r\n\r\n\tasync getEntry(index: EntityOfType | FormEntryIndex): Promise> {\r\n\t\tconst id = getEntryId(index);\r\n\t\tconst typeCacheEntry = this.getCachedEntry(id);\r\n\t\tif (typeCacheEntry && typeCacheEntry.$etag === index.EntryETag) {\r\n\t\t\tawait typeCacheEntry.initialized;\r\n\t\t\tthis.markEntryInitialized(typeCacheEntry);\r\n\t\t\treturn typeCacheEntry;\r\n\t\t}\r\n\r\n\t\tconst entryJson = await this.getEntryJson(keyFromIndex(index));\r\n\t\tconst entry = await this.constructEntry(entryJson);\r\n\t\tthis.markEntryInitialized(entry);\r\n\t\treturn entry;\r\n\t}\r\n\r\n\tasync getEntryByKey(entryKey: EntryKey, isAdmin: boolean = false): Promise> {\r\n\t\tconst entryJson = await this.getEntryJson(entryKey, isAdmin);\r\n\t\treturn this.constructEntry(entryJson);\r\n\t}\r\n\r\n\tprivate async loadEntryData(entryKeys: EntryKey[], isAdmin: boolean = false) {\r\n\t\tconst entries = await this.service.loadEntryData(this.view, isAdmin, ...entryKeys);\r\n\r\n\t\tfor (const e of entries) {\r\n\t\t\tif (e.Entry) {\r\n\t\t\t\te.Entry.User = this.user;\r\n\t\t\t\te.Entry.Role = this.role?.Name;\r\n\t\t\t}\r\n\t\t\tthis.entries.set(e.Id, e);\r\n\t\t}\r\n\t}\r\n\r\n\tasync getEntryJson(entryKey: EntryKey, isAdmin: boolean = false): Promise {\r\n\t\tconst id = entryKey.EntryId;\r\n\t\tconst entryData = this.entries.get(id);\r\n\t\tif (entryData && entryData.$etag === entryKey.EntryETag)\r\n\t\t\treturn entryData;\r\n\r\n\t\tawait this.loadEntryData([entryKey], isAdmin);\r\n\t\treturn this.entries.get(id);\r\n\t}\r\n\r\n\tprivate markEntryInitialized(entry: EntityOfType) {\r\n\t\tentry['__initialized__'] = true;\r\n\t}\r\n\r\n\tisEntryInitialized(entry: EntityOfType): boolean {\r\n\t\treturn entry['__initialized__'] === true;\r\n\t}\r\n}","import type { AxiosInstance, AxiosRequestConfig, AxiosError, AxiosResponse } from 'axios';\r\nimport axios from 'axios';\r\nimport VueModel from '@cognitoforms/vuemodel';\r\nimport { FormsModel } from '../framework/forms-model';\r\nimport combineUrls from 'axios/lib/helpers/combineURLs';\r\nimport buildURL from 'axios/lib/helpers/buildURL';\r\nimport isAbsoluteURL from 'axios/lib/helpers/isAbsoluteURL';\r\nimport type { FormSession } from './form-session';\r\nimport type { JsonErrorInfo } from './custom-response-error';\r\nimport { CustomResponseError } from './custom-response-error';\r\nimport ToastMessage from '../components/ToastMessage';\r\nimport { getSiteUrl } from 'src/util/site-url';\r\nimport { hasInnerError } from 'src/framework/logging/error';\r\n\r\nexport interface ServiceRequestOptions extends AxiosRequestConfig {\r\n\tendpoint: string;\r\n\tdata?: any;\r\n\tisCognitoJson?: boolean;\r\n\tpassive?: boolean;\r\n}\r\n\r\nexport type ServiceRequestError = Error | AxiosError | RequestCancelledError | CustomResponseError;\r\n\r\nexport type ServiceRequestResult = {\r\n\tresponse?: AxiosResponse;\r\n\terror?: ServiceRequestError;\r\n};\r\n\r\nexport class RequestCancelledError extends Error {\r\n\tinnerError: Error;\r\n\tconstructor(innerError?: Error) {\r\n\t\tsuper('cancelled');\r\n\t\tthis.innerError = innerError;\r\n\t}\r\n}\r\n\r\nexport class CaptchaError extends Error {\r\n\tinnerError: Error;\r\n\tconstructor(innerError?: Error) {\r\n\t\tsuper('Captcha validation required.');\r\n\t\tthis.innerError = innerError;\r\n\t}\r\n}\r\n\r\nexport class InvalidSharedLinkError extends Error {\r\n\tnotAvailableMessage: string;\r\n\tinnerError: Error;\r\n\tconstructor(notAvailableMessage?: string, innerError?: Error) {\r\n\t\tsuper('Invalid Shared Link');\r\n\t\tthis.notAvailableMessage = notAvailableMessage;\r\n\t\tthis.innerError = innerError;\r\n\t}\r\n}\r\n\r\nexport class PublicLinksDisabledError extends Error {\r\n\tinnerError: Error;\r\n\tconstructor(innerError?: Error) {\r\n\t\tsuper('Public Links Disabled');\r\n\t\tthis.innerError = innerError;\r\n\t}\r\n}\r\n\r\nexport class StripePaymentIntentError extends Error {\r\n\tinnerError: Error;\r\n\tconstructor(innerError?: Error) {\r\n\t\tsuper('Stripe PaymentIntent Failure');\r\n\t\tthis.innerError = innerError;\r\n\t}\r\n}\r\n\r\nexport class InternalServerError extends Error {\r\n\tinnerError: Error;\r\n\tconstructor(innerError?: Error) {\r\n\t\tsuper('Internal server error.');\r\n\t\tthis.innerError = innerError;\r\n\t}\r\n}\r\n\r\nexport class ForbiddenError extends Error {\r\n\tinnerError: Error;\r\n\tconstructor(innerError?: Error) {\r\n\t\tsuper('You do not have permission to edit this entry.');\r\n\t\tthis.innerError = innerError;\r\n\t}\r\n}\r\n\r\nfunction isJsonErrorInfo(data: any): data is JsonErrorInfo {\r\n\treturn typeof data === 'object' && data.hasOwnProperty('Type') && data.hasOwnProperty('Message') && data.hasOwnProperty('Data');\r\n}\r\n\r\nexport function isAxiosError(error: ServiceRequestError): error is AxiosError {\r\n\treturn error instanceof Error && (error as any).isAxiosError;\r\n}\r\n\r\nexport function getAxiosError(error: Error): AxiosError | undefined {\r\n\tif (isAxiosError(error))\r\n\t\treturn error;\r\n\tif (hasInnerError(error)) {\r\n\t\tconst error2 = error.innerError;\r\n\t\tif (isAxiosError(error2))\r\n\t\t\treturn error2;\r\n\t\tif (error2 instanceof CustomResponseError) {\r\n\t\t\tconst error3 = error2.innerError;\r\n\t\t\tif (isAxiosError(error3))\r\n\t\t\t\treturn error3;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport class BaseService {\r\n\tprotected readonly apiKey: string;\r\n\tprotected sessionToken: string;\r\n\tprotected readonly client: AxiosInstance;\r\n\r\n\tconstructor(apiKey: string, sessionToken?: string, baseUrl?: string) {\r\n\t\tthis.apiKey = apiKey;\r\n\t\tthis.sessionToken = sessionToken;\r\n\r\n\t\tthis.client = axios.create({\r\n\t\t\tbaseURL: baseUrl || getSiteUrl() || window.location.origin,\r\n\t\t\tmethod: 'GET',\r\n\t\t\txsrfCookieName: null\t// prevent axios from reading document.cookies (https://github.com/axios/axios/pull/406)\r\n\t\t});\r\n\r\n\t\tthis.client.defaults.headers.post['Content-Type'] = 'application/json; charset=utf-8';\r\n\t\tthis.client.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';\r\n\t\tthis.client.interceptors.request.use(BaseService.modelSerialization);\r\n\t\tthis.client.interceptors.response.use(this.receiveServerTime.bind(this));\r\n\t\tif (location.href.startsWith(getSiteUrl()))\r\n\t\t\tthis.client.interceptors.response.use(this.receiveSessionToken.bind(this));\r\n\t}\r\n\r\n\t/**\r\n\t * Generates the URI that the service would use to make a request with the provided configuration.\r\n\t * @param config request configuration used to generate a URI.\r\n\t */\r\n\tprotected getUri(config: AxiosRequestConfig) {\r\n\t\tconfig = Object.assign({}, this.client.defaults, config);\r\n\r\n\t\tif (config.baseURL && !isAbsoluteURL(config.url))\r\n\t\t\tconfig.url = combineUrls(config.baseURL, config.url);\r\n\r\n\t\treturn buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\r\n\t}\r\n\r\n\t/**\r\n\t * Use custom serialization on model instances\r\n\t */\r\n\tprivate static modelSerialization(config: AxiosRequestConfig) {\r\n\t\tif (config.data instanceof VueModel.Entity) {\r\n\t\t\tconfig.headers['Content-Type'] = 'application/json+cognito; charset=utf-8';\r\n\t\t\tconfig.data = config.data.serialize();\r\n\t\t}\r\n\t\treturn config;\r\n\t}\r\n\r\n\tprivate async transformServiceRequestOptions(options: ServiceRequestOptions) {\r\n\t\tconst config = options;\r\n\t\tconfig.url = options.endpoint;\r\n\t\tconfig.params = config.params || {};\r\n\t\tconfig.headers = config.headers || {};\r\n\r\n\t\tif (this.sessionToken)\r\n\t\t\tconfig.headers['X-SessionToken'] = this.sessionToken;\r\n\r\n\t\tif (options.isCognitoJson)\r\n\t\t\tconfig.headers['Content-Type'] = 'application/json+cognito, charset=utf-8';\r\n\r\n\t\tif (options.passive === true)\r\n\t\t\tconfig.headers['X-Passive-Request'] = 1;\r\n\r\n\t\treturn config;\r\n\t}\r\n\r\n\tasync serviceRequest(options: ServiceRequestOptions | string): Promise {\r\n\t\tconst config = await this.transformServiceRequestOptions(typeof options === 'string'\r\n\t\t\t? { endpoint: options, method: 'get' }\r\n\t\t\t: options);\r\n\r\n\t\tconst result: ServiceRequestResult = { response: null, error: null };\r\n\r\n\t\t// Handle the response\r\n\t\ttry {\r\n\t\t\tresult.response = await this.client.request(config);\r\n\t\t}\r\n\t\t// Handle the error\r\n\t\tcatch (err) {\r\n\t\t\tif (isAxiosError(err) || axios.isCancel(err)) {\r\n\t\t\t\tresult.error = this.transformErrorFromResponse(err);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tresult.error = err;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tprivate transformErrorFromResponse(err: AxiosError): ServiceRequestError {\r\n\t\tif (axios.isCancel(err))\r\n\t\t\treturn new RequestCancelledError(err);\r\n\r\n\t\t// Check for a failure that returns a response of type object, i.e. 'JsonErrorInfo'\r\n\t\tif (err.response && err.response.data && isJsonErrorInfo(err.response.data))\r\n\t\t\treturn new CustomResponseError(err.response.data, err.response.status, err.response.statusText, err);\r\n\r\n\t\treturn err;\r\n\t}\r\n\r\n\t/**\r\n\t * Determine the server time offset relative to the client time during posts\r\n\t */\r\n\tprivate receiveServerTime(res: AxiosResponse) {\r\n\t\tconst serverTime = res.headers['x-server-time'];\r\n\t\tif (serverTime) {\r\n\t\t\ttry {\r\n\t\t\t\tFormsModel.config.serverTimeOffset = new Date(serverTime).getTime() - new Date().getTime();\r\n\t\t\t}\r\n\t\t\tcatch (e) { }\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\r\n\tprivate receiveSessionToken(res: AxiosResponse) {\r\n\t\tconst sessionToken = res.headers['x-sessiontoken'];\r\n\t\tif (sessionToken) {\r\n\t\t\ttry {\r\n\t\t\t\tconst event = new CustomEvent('received-session-token');\r\n\t\t\t\tevent['token'] = sessionToken;\r\n\t\t\t\tdocument.dispatchEvent(event);\r\n\t\t\t}\r\n\t\t\tcatch (e) { }\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n}\r\n\r\nexport class ServiceWithSession extends BaseService {\r\n\tsession: FormSession;\r\n\r\n\tconstructor(session: FormSession) {\r\n\t\tsuper(session.apiKey, session.token);\r\n\t\tthis.session = session;\r\n\t\tthis.client.interceptors.response.use(this.receiveAccessToken.bind(this));\r\n\t\tthis.client.interceptors.request.use(this.addOrganizationHeader.bind(this));\r\n\t}\r\n\r\n\tprotected getValidationHeaders(): object {\r\n\t\tlet validationMethod = null;\r\n\t\tlet validationToken = null;\r\n\t\tif (this.session && this.session.botValidation && this.session.botValidation.method && this.session.botValidation.token) {\r\n\t\t\tvalidationMethod = this.session.botValidation.method;\r\n\t\t\tvalidationToken = this.session.botValidation.token;\r\n\t\t}\r\n\r\n\t\treturn validationMethod && validationToken ? { [validationMethod]: validationToken } : null;\r\n\t}\r\n\r\n\tprivate receiveAccessToken(res: AxiosResponse) {\r\n\t\t// capture fresh accessToken\r\n\t\tif (res.data && res.data['accessToken'])\r\n\t\t\tthis.session.accessToken = res.data['accessToken'];\r\n\t\treturn res;\r\n\t}\r\n\r\n\tprivate addOrganizationHeader(config: AxiosRequestConfig) {\r\n\t\tif (this.session.organizationId)\r\n\t\t\tconfig.headers['X-Organization'] = this.session.organizationId;\r\n\t\treturn config;\r\n\t}\r\n\r\n\tparseError(error: ServiceRequestError): Error {\r\n\t\tif (isAxiosError(error) && error.response && error.response.data === 'captcha')\r\n\t\t\treturn new CaptchaError(error);\r\n\t\telse if (isAxiosError(error) && error.response && error.response.data.error === 'Invalid Shared Link')\r\n\t\t\treturn new InvalidSharedLinkError('Invalid Shared Link', error);\r\n\t\telse if (isAxiosError(error) && error.response && error.response.data.error === 'Public Links Disabled')\r\n\t\t\treturn new PublicLinksDisabledError(error);\r\n\t\telse if (isAxiosError(error) && error.response && error.response.data.error === 'Stripe PaymentIntent Failure')\r\n\t\t\treturn new StripePaymentIntentError(error);\r\n\t\telse if (isAxiosError(error) && error.response && error.response.status === 500) {\r\n\t\t\tconst errorHeading = this.session.getResource('entry-submission-error-heading');\r\n\t\t\tToastMessage(this.session.formId, {\r\n\t\t\t\ttype: 'error',\r\n\t\t\t\tmessage: errorHeading || 'Internal server error'\r\n\t\t\t});\r\n\t\t\treturn new InternalServerError(error);\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn this.parseSvcError(error);\r\n\t}\r\n\r\n\tparseSvcError(error: ServiceRequestError): Error {\r\n\t\tif (error instanceof CustomResponseError) {\r\n\t\t\tif (error.type === 'Forbidden')\r\n\t\t\t\treturn new ForbiddenError(error);\r\n\t\t\telse if (error.data.error === 'Invalid Shared Link')\r\n\t\t\t\treturn new InvalidSharedLinkError(error.data.message, error);\r\n\t\t\telse if (error.data.error === 'Public Links Disabled')\r\n\t\t\t\treturn new PublicLinksDisabledError(error);\r\n\t\t\telse if (error.data.error === 'Stripe PaymentIntent Failure')\r\n\t\t\t\treturn new StripePaymentIntentError(error);\r\n\t\t}\r\n\t\treturn error;\r\n\t}\r\n}\r\n","import type { ObjectLookup } from 'src/util';\r\n\r\n/**\r\n * An Error subclass which wraps an underlying error object of unknown type.\r\n */\r\nexport class WrappedError extends Error {\r\n\tunderlyingError: unknown;\r\n\r\n\tconstructor(message: string, underlyingError: unknown) {\r\n\t\tsuper(message);\r\n\r\n\t\tthis.underlyingError = underlyingError;\r\n\t}\r\n}\r\n\r\nexport type ErrorWithInnerError = Error & {\r\n\tinnerError: Error;\r\n};\r\n\r\nexport function hasInnerError(e: Error): e is ErrorWithInnerError {\r\n\treturn e instanceof Error && e['innerError'] && e['innerError'] instanceof Error;\r\n}\r\n\r\n/**\r\n * Takes in an \"error-like\" object and returns an Error object\r\n * - If the input is an Error object, it is returned\r\n * - If the input is a non-zero length string, a new Error is constructed with the input as the message\r\n * - Otherwise, a new Error object is contructed with a default message\r\n * @param err The input object, which may or may not be an Error object\r\n * @param defaultErrorMessage The default message to use when constructing an Error\r\n * @returns An Error object\r\n */\r\nexport function ensureError(err: unknown, defaultErrorMessage: string = 'Unknown error'): Error {\r\n\tif (err instanceof Error)\r\n\t\treturn err;\r\n\telse if (typeof err === 'string' && err.length > 0)\r\n\t\treturn new Error(err);\r\n\telse\r\n\t\treturn new WrappedError(defaultErrorMessage || 'Unknown error', err);\r\n}\r\n\r\n/**\r\n\t * An extension of Error, allows for adding additional properties\r\n\t * to the error object and a flag denoting whether or not to track\r\n\t * the error\r\n\t */\r\nexport class CError extends Error {\r\n\tname: string;\r\n\tmessage: string;\r\n\t// An error is not logged when `log` is exactly false\r\n\tlog?: boolean;\r\n\tstack?: string;\r\n\tadditionalProperties?: ObjectLookup;\r\n\r\n\tconstructor(message: string, log: boolean = true, name?: string, stack?: string, additionalProperties?: ObjectLookup) {\r\n\t\tsuper(message);\r\n\r\n\t\tthis.message = message;\r\n\t\tthis.log = log;\r\n\t\tthis.name = name || this.name;\r\n\t\tthis.stack = stack || this.stack;\r\n\t\tthis.additionalProperties = additionalProperties;\r\n\t}\r\n}\r\n\r\n/**\r\n\t * A version of CError that by default, doesn't log the error\r\n\t * to the server. Used for errors consumed by the end-user.\r\n\t */\r\nexport class FriendlyError extends CError {\r\n\tconstructor(message: string, name?: string) {\r\n\t\tsuper(message, false, name);\r\n\t}\r\n}","export class CustomResponseError extends Error {\r\n\ttype: string;\r\n\tdata: any;\r\n\tstatus: number;\r\n\tstatusText: string;\r\n\tinnerError: Error;\r\n\tconstructor(errorInfo: JsonErrorInfo, status: number, statusText: string, innerError?: Error) {\r\n\t\tsuper(errorInfo.Message);\r\n\t\tthis.type = errorInfo.Type;\r\n\t\tthis.data = errorInfo.Data;\r\n\t\tthis.status = status;\r\n\t\tthis.statusText = statusText;\r\n\t\tthis.innerError = innerError;\r\n\t}\r\n}\r\n\r\nexport type JsonErrorInfo = {\r\n\tType?: string;\r\n\tMessage?: string;\r\n\tData?: any;\r\n}","import type { Property, PropertySerializationResult, Entity } from '@cognitoforms/model.js';\r\nimport { PropertyConverter } from '@cognitoforms/model.js';\r\n\r\nexport default class DateConverter extends PropertyConverter {\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\treturn prop.propertyType === Date && prop.format.specifier === 'd';\r\n\t}\r\n\r\n\tserialize(context: Entity, value: any, prop: Property): PropertySerializationResult {\r\n\t\treturn {\r\n\t\t\tkey: prop.name,\r\n\t\t\tvalue: value ? ((value.getFullYear())\r\n\t\t\t\t+ (value.getMonth() < 9 ? '-0' : '-') + (value.getMonth() + 1)\r\n\t\t\t\t+ (value.getDate() < 10 ? '-0' : '-') + value.getDate())\r\n\t\t\t\t: null\r\n\t\t};\r\n\t}\r\n\r\n\tdeserialize(context: Entity, value: any, prop: Property) {\r\n\t\tif (typeof value === 'string')\r\n\t\t\treturn this.parseDate(value);\r\n\t\treturn value;\r\n\t}\r\n\r\n\tprivate parseDate(date: string) {\r\n\t\tconst parts = date.split('-').map(Number);\r\n\t\treturn new Date(parts[0], parts[1] - 1, parts[2]);\r\n\t}\r\n}","import type { Property, PropertySerializationResult, Entity } from '@cognitoforms/model.js';\r\nimport { PropertyConverter } from '@cognitoforms/model.js';\r\n\r\nexport default class TimeConverter extends PropertyConverter {\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\treturn prop.propertyType === Date && prop.format.specifier === 't';\r\n\t}\r\n\r\n\tserialize(context: Entity, value: any, prop: Property): PropertySerializationResult {\r\n\t\treturn {\r\n\t\t\tkey: prop.name,\r\n\t\t\tvalue: value ? ((value.getHours() < 10 ? '0' : '') + value.getHours()\r\n\t\t\t\t+ (value.getMinutes() < 10 ? ':0' : ':') + value.getMinutes()\r\n\t\t\t\t+ (value.getSeconds() < 10 ? ':0' : ':') + value.getSeconds())\r\n\t\t\t\t: null\r\n\t\t};\r\n\t}\r\n\r\n\tdeserialize(context: Entity, value: any, prop: Property) {\r\n\t\tif (typeof value === 'string') {\r\n\t\t\tconst fullDate = new Date(value);\r\n\r\n\t\t\t// if a date could not be created from the time data provided, then assume the value is only the time component and\r\n\t\t\t// deserialize to a common date\r\n\t\t\tif (isNaN(fullDate.getDate()))\r\n\t\t\t\treturn new Date(1970, 0, 1, Number(value.substr(0, 2)), Number(value.substr(3, 2)), Number(value.substr(6, 2)));\r\n\t\t\telse\r\n\t\t\t\treturn fullDate;\r\n\t\t}\r\n\t\treturn value;\r\n\t}\r\n}","import type { Property, PropertySerializationResult, Entity } from '@cognitoforms/model.js';\r\nimport { PropertyConverter, IgnoreProperty, isEntityType } from '@cognitoforms/model.js';\r\nimport { ORDER_TYPE_NAME } from 'src/framework/forms-model';\r\n\r\n/**\r\n * Prevents the order off the entry from being serialized or deserialized.\r\n */\r\nexport default class OrderConverter extends PropertyConverter {\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\treturn prop.name === 'Order' && isEntityType(prop.propertyType) && prop.propertyType.meta.fullName === ORDER_TYPE_NAME;\r\n\t}\r\n\r\n\tserialize(): PropertySerializationResult {\r\n\t\treturn IgnoreProperty;\r\n\t}\r\n\r\n\tdeserialize(context: Entity, value: any, property: Property): any {\r\n\t\treturn super.deserialize(context, value, property);\r\n\t}\r\n}","import type { Property, Entity, PropertySerializationResult } from '@cognitoforms/model.js';\r\nimport { PropertyConverter } from '@cognitoforms/model.js';\r\nimport { getEnumInstanceById, getEnumInstanceByName } from '../../core';\r\n\r\n/**\r\n * Handles serialization/deserialization of enum values\r\n */\r\nexport default class EnumConverter extends PropertyConverter {\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\tconst propModelType = prop.propertyType && prop.propertyType['meta'];\r\n\r\n\t\t// Not a model type\r\n\t\tif (!propModelType)\r\n\t\t\treturn false;\r\n\r\n\t\t// Convert if the model type is an enum\r\n\t\treturn propModelType.enum != null;\r\n\t}\r\n\r\n\tserialize(context: Entity, value: any, prop: Property): PropertySerializationResult {\r\n\t\tif (value) {\r\n\t\t\tconst propModelType = prop.propertyType && prop.propertyType['meta'];\r\n\t\t\treturn {\r\n\t\t\t\tkey: prop.name,\r\n\t\t\t\tvalue: Array.isArray(propModelType.enum) ? value.Name : value.Id\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tdeserialize(context: Entity, value: any, prop: Property) {\r\n\t\tif (value) {\r\n\t\t\tif (typeof value === 'string') {\r\n\t\t\t\treturn getEnumInstanceById(prop.propertyType['meta'], value) || getEnumInstanceByName(prop.propertyType['meta'], value);\r\n\t\t\t}\r\n\t\t\telse if (typeof value === 'object') {\r\n\t\t\t\tif (value.Id) {\r\n\t\t\t\t\treturn getEnumInstanceById(prop.propertyType['meta'], value.Id);\r\n\t\t\t\t}\r\n\t\t\t\telse if (value.Name) {\r\n\t\t\t\t\treturn getEnumInstanceByName(prop.propertyType['meta'], value.Name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n}\r\n","import type { Property, PropertySerializationResult, Entity } from '@cognitoforms/model.js';\r\nimport { PropertyConverter, IgnoreProperty } from '@cognitoforms/model.js';\r\nimport { FORM_ENTRY_TYPE_NAME } from 'src/framework/forms-model';\r\n\r\n/**\r\n * Excludes certain properties from serialization because they represent circular references.\r\n */\r\nexport default class IgnoreCircularReferenceConverter extends PropertyConverter {\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\tif (prop.name === 'ParentSection')\r\n\t\t\treturn true;\r\n\t\t// Convert any 'Form' property that is not the FormEntry's FormRef property\r\n\t\tif (prop.name === 'Form' && prop.containingType.fullName !== FORM_ENTRY_TYPE_NAME)\r\n\t\t\treturn true;\r\n\t}\r\n\r\n\tserialize(): PropertySerializationResult {\r\n\t\treturn IgnoreProperty;\r\n\t}\r\n}","import { isEntity, PropertyConverter, isEntityType } from '@cognitoforms/model.js';\r\nimport type { Property, Entity } from '@cognitoforms/model.js';\r\nimport { FORM_ENTRY_TYPE_NAME } from 'src/framework/forms-model';\r\n\r\n/**\r\n * Even though we generate rules to ensure the back references are set when entities\r\n * are initialized, we need this converter to prevent default value rules from being\r\n * triggered during the initialization of existing entries.\r\n */\r\nexport default class InitializeBackReferencesConverter extends PropertyConverter {\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\tconst shouldConvert = prop.name !== 'ParentSection' && prop.name !== 'Form'\r\n\t\t\t&& isEntityType(prop.propertyType)\r\n\t\t\t&& (!!prop.propertyType.meta.getProperty('ParentSection') || !!prop.propertyType.meta.getProperty('Form'));\r\n\r\n\t\treturn shouldConvert;\r\n\t}\r\n\r\n\tdeserialize(context: Entity, value: any, prop: Property) {\r\n\t\tconst type = isEntityType(prop.propertyType) && prop.propertyType.meta;\r\n\t\tif (value) {\r\n\t\t\tif (Array.isArray(value))\r\n\t\t\t\tvalue = value.map(item => this.deserialize(context, item, prop));\r\n\t\t\telse {\r\n\t\t\t\t// avoid modifying the provided object\r\n\t\t\t\tif (!isEntity(value))\r\n\t\t\t\t\tvalue = Object.assign({}, value);\r\n\r\n\t\t\t\tif (type.getProperty('ParentSection'))\r\n\t\t\t\t\tvalue.ParentSection = context;\r\n\t\t\t\tif (type.getProperty('Form'))\r\n\t\t\t\t\tvalue.Form = context.meta.type.baseType.fullName === FORM_ENTRY_TYPE_NAME\r\n\t\t\t\t\t\t? context\r\n\t\t\t\t\t\t: context.Form;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n}\r\n","import type { PropertyInjector, PropertySerializationResult, Entity } from '@cognitoforms/model.js';\r\n/**\r\n * Adds properties specific to Cognito storage layer.\r\n */\r\nexport default class StoragePropertyInjector implements PropertyInjector {\r\n\tinject(entity: Entity): PropertySerializationResult[] {\r\n\t\tconst results = [];\r\n\t\tif (entity.meta.type.baseType)\r\n\t\t\tresults.push({ key: '$type', value: 'Cognito.' + entity.meta.type.fullName });\r\n\t\tif (entity['$version'])\r\n\t\t\tresults.push({ key: '$version', value: entity['$version'] });\r\n\t\tif (entity['$etag'])\r\n\t\t\tresults.push({ key: '$etag', value: entity['$etag'] });\r\n\t\treturn results;\r\n\t}\r\n}","import countries from 'i18n-iso-countries';\r\n\r\nconst countryNameWithParensExpr = /^([^(]+)\\s+[((]([^)]+)[))]\\s*$/g;\r\nconst countryNameWithCommaExpr = /^([^,]+),\\s+([^)]+)\\s*$/g;\r\n\r\nexport function getCountryCode(name: string, locale: string): string {\r\n\tlet countryCode = countries.getAlpha2Code(name, locale);\r\n\tif (countryCode)\r\n\t\treturn countryCode;\r\n\r\n\t// If the country name has an alternative name or some other text in parentheses,\r\n\t// then remove the parenthesized value and try again.\r\n\tif (countryNameWithParensExpr.test(name)) {\r\n\t\tconst cleansedName = name.replace(countryNameWithParensExpr, '$1');\r\n\t\tcountryCode = countries.getAlpha2Code(cleansedName, locale);\r\n\t\tif (countryCode)\r\n\t\t\treturn countryCode;\r\n\t}\r\n\r\n\t// If the country name has an alternative name after a comma,\r\n\t// then exclude the portion after the comma and try again.\r\n\tif (countryNameWithCommaExpr.test(name)) {\r\n\t\tconst cleansedName = name.replace(countryNameWithCommaExpr, '$1');\r\n\t\tcountryCode = countries.getAlpha2Code(cleansedName, locale);\r\n\t\tif (countryCode)\r\n\t\t\treturn countryCode;\r\n\t}\r\n\r\n\t// Try to find the country by replacing spaces with dashes\r\n\tif (name.includes(' ')) {\r\n\t\tconst nameWithoutSpaces = name.replaceAll(' ', '-');\r\n\t\tcountryCode = countries.getAlpha2Code(nameWithoutSpaces, locale);\r\n\t\tif (countryCode)\r\n\t\t\treturn countryCode;\r\n\t}\r\n\r\n\treturn null;\r\n}\r\n","import type { EntityOfType, TypeExtensionOptionsForType } from '@cognitoforms/model.js';\r\nimport { hasValue, $format } from '../../../util/helpers';\r\nimport type { Address } from '@cognitoforms/types/server-types/model/address';\r\nimport { getCountryCode } from '../countries';\r\n\r\nexport interface AddressMethods {\r\n\tvalidateRequiredAddress(this: EntityOfType
, enforceableFields: string[]): string;\r\n\tvalidateZipCode(this: EntityOfType
): string;\r\n}\r\n\r\nexport const AddressExtensions: TypeExtensionOptionsForType & AddressMethods = {\r\n\tCountry: {\r\n\t\ttype: String,\r\n\t\tset: function(this: EntityOfType
, country: string) {\r\n\t\t\tconst model = this.meta.type.model;\r\n\t\t\tif (country)\r\n\t\t\t\tthis.CountryCode = getCountryCode(country.trim(), model.$locale || 'en');\r\n\t\t\telse\r\n\t\t\t\tthis.CountryCode = null;\r\n\t\t}\r\n\t},\r\n\tvalidateRequiredAddress: function(this: EntityOfType
, enforceableFields: string[]): string {\r\n\t\t// Store the model to use for localization when building the error message\r\n\t\tconst model = this.meta.type.model;\r\n\r\n\t\tconst countryLabelUS = model.getResource('united-states');\r\n\r\n\t\tlet error = '';\r\n\t\tlet errorCount = 0;\r\n\r\n\t\t// NOTE: Iterate through the list in reverse in order to avoid an Oxford comma in the error message...\r\n\t\tfor (let f = enforceableFields.length - 1; f >= 0; f--) {\r\n\t\t\tconst field = enforceableFields[f];\r\n\r\n\t\t\t// Skip this field if it has a value\r\n\t\t\tconst value = this.get(field);\r\n\t\t\tif (hasValue(value)) continue;\r\n\r\n\t\t\t// Rename Postal Code to Zip Code if US Address\r\n\t\t\tlet label = model.getResource('address-' + field.toLowerCase());\r\n\t\t\tif (field === 'PostalCode' && this.Country === countryLabelUS) label = model.getResource('address-zip-code');\r\n\r\n\t\t\tif (errorCount === 0) error = label;\r\n\t\t\telse if (errorCount === 1) error = $format(model.getResource('this-and-that'), label, error);\r\n\t\t\telse error = $format(model.getResource('this-comma-that'), label, error);\r\n\r\n\t\t\terrorCount++;\r\n\t\t}\r\n\r\n\t\tif (errorCount > 0)\r\n\t\t\terror = $format(errorCount === 1 ? model.getResource('required-one') : model.getResource('required-many'), error);\r\n\r\n\t\treturn error;\r\n\t},\r\n\tvalidateZipCode: function(this: EntityOfType
): string {\r\n\t\t// Store the model to use for localization when building the error message\r\n\t\tconst model = this.meta.type.model;\r\n\r\n\t\tconst countryLabelUS = model.getResource('united-states');\r\n\r\n\t\tif (this.Country === countryLabelUS) {\r\n\t\t\t// Make sure that a US zip code is used if United States is chosen as the country\r\n\t\t\tif (hasValue(this.PostalCode) && !/^\\s*(\\d{5})(-\\d{4})?\\s*$/.test(this.PostalCode)) {\r\n\t\t\t\treturn model.getResource('address-zip-code-invalid');\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n","import type { EntityOfType } from '@cognitoforms/model.js';\r\nimport { hasValue } from '../../../util/helpers';\r\nimport type { Name } from '@cognitoforms/types/server-types/model/name';\r\n\r\nexport type NameMethods = {\r\n\tvalidateRequiredName(this: EntityOfType & NameMethods): string;\r\n};\r\n\r\nexport const NameExtensions: NameMethods = {\r\n\tvalidateRequiredName: function(this: EntityOfType) {\r\n\t\t// Store the model to use for localization when building the error message\r\n\t\tconst model = this.meta.type.model;\r\n\r\n\t\tlet error = '';\r\n\r\n\t\tconst firstIsMissing = !hasValue(this.First);\r\n\t\tconst lastIsMissing = !hasValue(this.Last);\r\n\t\tif (firstIsMissing && lastIsMissing) {\r\n\t\t\terror = model.getResource('required-name-first-and-last');\r\n\t\t}\r\n\t\telse if (firstIsMissing) {\r\n\t\t\terror = model.getResource('required-name-first');\r\n\t\t}\r\n\t\telse if (lastIsMissing) {\r\n\t\t\terror = model.getResource('required-name-last');\r\n\t\t}\r\n\r\n\t\treturn error;\r\n\t}\r\n};\r\n","import type { EntityOfType } from '@cognitoforms/model.js';\r\nimport { hasValue } from '../../../util/helpers';\r\nimport type { Signature } from '@cognitoforms/types/server-types/model/signature';\r\n\r\nexport interface SignatureMethods {\r\n\tvalidateRequiredSignature(this: EntityOfType): string;\r\n}\r\n\r\nexport const SignatureExtensions: SignatureMethods = {\r\n\tvalidateRequiredSignature(this: EntityOfType) {\r\n\t\t// Store the model to use for localization when building the error message\r\n\t\tconst model = this.meta.type.model;\r\n\r\n\t\tlet error = '';\r\n\r\n\t\tif (!hasValue(this.Svg)) {\r\n\t\t\terror = model.getResource('required');\r\n\t\t}\r\n\r\n\t\treturn error;\r\n\t}\r\n};\r\n","import type { Property, PropertySerializationResult, Entity } from '@cognitoforms/model.js';\r\nimport { PropertyConverter, IgnoreProperty } from '@cognitoforms/model.js';\r\n\r\n/**\r\n * Prevents calculated properties from being serialized or deserialized.\r\n */\r\nexport default class CalculationConverter extends PropertyConverter {\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\treturn prop.isCalculated;\r\n\t}\r\n\r\n\tserialize(): PropertySerializationResult {\r\n\t\t// no need to serialize calculated properties\r\n\t\treturn IgnoreProperty;\r\n\t}\r\n\r\n\tdeserialize() {\r\n\t\t// disallow deserializing calculated properties\r\n\t\treturn IgnoreProperty;\r\n\t}\r\n}","import type { Property, Entity } from '@cognitoforms/model.js';\r\nimport { PropertyConverter } from '@cognitoforms/model.js';\r\n\r\n/**\r\n * Handles deserialization of JSON date strings\r\n */\r\nexport default class DateTimeConverter extends PropertyConverter {\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\treturn prop.propertyType === Date && !['d', 't'].includes(prop.format.specifier);\r\n\t}\r\n\r\n\tdeserialize(context: Entity, value: any, prop: Property) {\r\n\t\tif (typeof value === 'string')\r\n\t\t\treturn new Date(value);\r\n\t\treturn value;\r\n\t}\r\n}","import type { Property, PropertySerializationResult, Entity, EntityOfType } from '@cognitoforms/model.js';\r\nimport { PropertyConverter } from '@cognitoforms/model.js';\r\nimport type { FormEntry } from '@cognitoforms/types/server-types/forms/model/form-entry';\r\nimport { isLookupField } from 'src/util/model';\r\n\r\n/**\r\n * Prevents calculated properties from being serialized or deserialized.\r\n */\r\nexport default class LookupConverter extends PropertyConverter {\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\treturn isLookupField(prop);\r\n\t}\r\n\r\n\tserialize(context: Entity, value: any, property: Property): PropertySerializationResult {\r\n\t\tif (Array.isArray(value)) {\r\n\t\t\tconst lookupValue = value as EntityOfType[];\r\n\t\t\treturn { key: property.name, value: lookupValue.map(e => e.Id) };\r\n\t\t}\r\n\t\telse if (value) {\r\n\t\t\tconst lookupValue = value as EntityOfType;\r\n\t\t\treturn { key: property.name, value: lookupValue.Id };\r\n\t\t}\r\n\t\treturn { key: property.name, value: null };\r\n\t}\r\n\r\n\tdeserialize(context: Entity, value: any, property: Property): any {\r\n\t\treturn value;\r\n\t}\r\n}","import type { Property, Entity } from '@cognitoforms/model.js';\r\nimport { PropertyConverter } from '@cognitoforms/model.js';\r\n\r\n/**\r\n * Preserves legacy prefill options for Yes/No fields\r\n */\r\nexport default class YesNoConverter extends PropertyConverter {\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\treturn prop.propertyType === Boolean;\r\n\t}\r\n\r\n\tdeserialize(context: Entity, value: any, prop: Property) {\r\n\t\t// Needed to handle legacy string \"true\" and \"false\" variants\r\n\t\tif (typeof value === 'string') {\r\n\t\t\tif (value.toLowerCase() === 'true')\r\n\t\t\t\tvalue = true;\r\n\t\t\telse if (value.toLowerCase() === 'false')\r\n\t\t\t\tvalue = false;\r\n\t\t\telse if (prop.defaultValue !== undefined) {\r\n\t\t\t\tvalue = prop.format.convertFromString(value);\r\n\t\t\t\tif (value === null)\r\n\t\t\t\t\tvalue = prop.defaultValue;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn value;\r\n\t}\r\n}","import type { Property, PropertySerializationResult, Entity } from '@cognitoforms/model.js';\r\nimport { PropertyConverter, IgnoreProperty } from '@cognitoforms/model.js';\r\n\r\n// Certain properties are \"extensions\" but still need to be persisted/deserialized.\r\nconst exceptionRegex = /(_QuantityLimit)|(_QuantityUsed)$/i;\r\n\r\n/**\r\n * Prevents entry pseudo-properties from being serialized/deserialized.\r\n */\r\nexport default class EntryExtensionConverter extends PropertyConverter {\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\t// do not filter properties on entry index types\r\n\t\tif (prop.containingType.fullName === 'Forms.FormEntryIndex'\r\n\t\t|| (prop.containingType.baseType && prop.containingType.baseType.fullName === 'Forms.FormEntryIndex'))\r\n\t\t\treturn false;\r\n\t\telse if (!context || !context.meta.type.model)\r\n\t\t\treturn false;\r\n\t\t// Property name must look like 'SomeProperty_PseudoProperty'\r\n\t\telse\r\n\t\t\treturn /([A-Z][a-z]+_)[A-Z][a-z]+/g.test(prop.name) && !exceptionRegex.test(prop.name);\r\n\t}\r\n\r\n\tserialize(): PropertySerializationResult {\r\n\t\treturn IgnoreProperty;\r\n\t}\r\n\r\n\tdeserialize() {\r\n\t\treturn IgnoreProperty;\r\n\t}\r\n}","import type { Entity, Property } from '@cognitoforms/model.js';\r\nimport { isEntityType } from '@cognitoforms/model.js';\r\nimport type { FormsModel } from 'src/framework/forms-model';\r\n\r\nfunction ensurePropertyInitialized(property: Property, entity: Entity) {\r\n\tif (!property.value(entity))\r\n\t\tentity.update(property.name, {});\r\n}\r\n\r\nfunction isDynamicEntity(property: Property) {\r\n\treturn isEntityType(property.propertyType)\r\n\t\t&& property.propertyType.meta.baseType\r\n\t\t&& property.propertyType.meta.baseType.fullName === 'DynamicEntity';\r\n}\r\n\r\nfunction isName(property: Property) {\r\n\treturn isEntityType(property.propertyType)\r\n\t\t&& property.propertyType.meta.fullName === 'Name';\r\n}\r\n\r\nfunction isAddress(property: Property) {\r\n\treturn isEntityType(property.propertyType)\r\n\t\t&& property.propertyType.meta.fullName === 'Address';\r\n}\r\n\r\n/**\r\n * Ensures properties of type Name, Address, and DynamicEntity subtypes are initialized for existing entities.\r\n * These properties are initialized using default value rules for new entities.\r\n */\r\nexport function applyEntityInitExtensions(model: FormsModel) {\r\n\tfor (const type of Object.values(model.model.types)) {\r\n\t\tconst referenceProperties = type.properties.filter(p => !p.isList && (isDynamicEntity(p) || isName(p) || isAddress(p)));\r\n\t\tif (referenceProperties.length)\r\n\t\t\ttype.initExisting.subscribe(e => referenceProperties.forEach(property => ensurePropertyInitialized(property, e.entity)));\r\n\t}\r\n}","import type { Property, Entity } from '@cognitoforms/model.js';\r\nimport { PropertyConverter, IgnoreProperty } from '@cognitoforms/model.js';\r\n\r\n/**\r\n * Prevents FileData properties from being deserialized into new entries.\r\n */\r\nexport default class IgnoreFileUploadConverter extends PropertyConverter {\r\n\tprivate entryTypeName: string;\r\n\r\n\tconstructor(entryTypeName: string) {\r\n\t\tsuper();\r\n\t\tthis.entryTypeName = entryTypeName;\r\n\t}\r\n\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\tif (!context || prop.propertyType.name !== 'FileDataRef')\r\n\t\t\treturn false;\r\n\r\n\t\tconst entry = context.meta.type.fullName === this.entryTypeName ? context : context.Form;\r\n\t\treturn entry && entry.meta.isNew;\r\n\t}\r\n\r\n\tdeserialize(context: Entity, value: any, prop: Property) {\r\n\t\treturn IgnoreProperty;\r\n\t}\r\n}","import type { Entity, Property } from '@cognitoforms/model.js';\r\nimport { IgnoreProperty, PropertyConverter } from '@cognitoforms/model.js';\r\n\r\nexport default class IgnoreSignaturePropertiesConverter extends PropertyConverter {\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\treturn prop.containingType.fullName === 'Signature' && context.meta.isNew;\r\n\t}\r\n\r\n\t/**\r\n\t * Prevents deserializing Signature sub-properties (Svg/Png/etc) for new instances.\r\n\t */\r\n\tdeserialize(context: Entity, value: any, prop: Property) {\r\n\t\treturn IgnoreProperty;\r\n\t}\r\n}","import type { EntityConstructor, EntityOfType, Type, TypeOfType } from '@cognitoforms/model.js';\r\nimport { isEntityType } from '@cognitoforms/model.js';\r\nimport type { FormsModel } from 'src/framework/forms-model';\r\nimport type { FormEntry } from '@cognitoforms/types/server-types/forms/model/form-entry';\r\nimport type { WorkflowAction } from '@cognitoforms/types/server-types/forms/model/workflow-action';\r\nimport type { FormEntryWorkflowExtensions } from 'src/framework/model/extensions/form-entry-extensions';\r\n\r\nexport interface WorkflowActionExtensions {\r\n\tIsAllowed: boolean;\r\n\tForm: FormEntry;\r\n}\r\n\r\nfunction addWorkflowActionsProperty(entryType: Type, actionDataMap: { [type: string]: WorkflowAction; }, formsModel: FormsModel) {\r\n\tentryType.extend({\r\n\t\tAction_IsLocked: Boolean,\r\n\t\tAttempted_Action: String,\r\n\t\tWorkflow_Actions: {\r\n\t\t\ttype: 'Forms.WorkflowAction[]',\r\n\t\t\tget(this: EntityOfType) {\r\n\t\t\t\treturn Object.keys(actionDataMap)\r\n\t\t\t\t\t.map(actionType => {\r\n\t\t\t\t\t\tconst actionData = actionDataMap[actionType];\r\n\t\t\t\t\t\tif (actionData)\r\n\t\t\t\t\t\t\treturn formsModel.construct(actionType, { ...actionData, Form: this });\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.filter(a => a !== null);\r\n\t\t\t}\r\n\t\t},\r\n\t\tAllowed_Actions: {\r\n\t\t\ttype: 'Forms.WorkflowAction[]',\r\n\t\t\tget: {\r\n\t\t\t\tfunction(this: EntityOfType) {\r\n\t\t\t\t\treturn this.Workflow_Actions.filter(a => a.IsAllowed && !a.IsArchived);\r\n\t\t\t\t},\r\n\t\t\t\tdependsOn: 'Workflow_Actions{IsAllowed,IsArchived}'\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tconst entryMetaType = entryType.getProperty('Entry').propertyType as EntityConstructor;\r\n\tif (isEntityType(entryMetaType) && entryMetaType.meta.getProperty('Action')) {\r\n\t\tentryType.extend({\r\n\t\t\tinitDefaultAction(this: EntityOfType) {\r\n\t\t\t\t// Use setTimeout to ensure that setting the default action occurs after all other initialization\r\n\t\t\t\t// events and rules have occurred. Setting the default action is the first \"change\" to the entry and\r\n\t\t\t\t// may rely on some other initialization logic (ex: lookup initialization).\r\n\t\t\t\tconst firstAllowedAction = this['Allowed_Actions'][0];\r\n\t\t\t\tif (firstAllowedAction)\r\n\t\t\t\t\tthis.Entry.Action = firstAllowedAction.ActionName;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tentryType.addRule({\r\n\t\t\tname: 'UpdateDefaultAction',\r\n\t\t\texecute(this: EntityOfType) {\r\n\t\t\t\tconst firstAllowedAction = this['Allowed_Actions'][0];\r\n\t\t\t\tif (!this.Action_IsLocked && !this.Form_ReadOnly) {\r\n\t\t\t\t\tif (this.Attempted_Action && !this.Allowed_Actions.find(a => a.ActionName === this.Attempted_Action))\r\n\t\t\t\t\t\tthis.Attempted_Action = null;\r\n\r\n\t\t\t\t\tif (!this.Attempted_Action) {\r\n\t\t\t\t\t\tif (firstAllowedAction)\r\n\t\t\t\t\t\t\tthis.Entry.Action = firstAllowedAction.ActionName;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tthis.Entry.Action = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// this rule intentionally only runs in response to allowed actions changing\r\n\t\t\tonChangeOf: entryType.getPaths('{Allowed_Actions}')\r\n\t\t}).register();\r\n\t}\r\n}\r\n\r\nfunction getActiveEntryStatus(entry: EntityOfType, statusIdOrName) {\r\n\tconst newStatus = entry.Entry_Statuses.find(s => s.Id === Number(statusIdOrName) || s.Name === statusIdOrName);\r\n\tif (newStatus == null || newStatus.ReplacementId == null)\r\n\t\treturn newStatus;\r\n\telse\r\n\t\treturn getActiveEntryStatus(entry, newStatus.ReplacementId);\r\n}\r\n\r\nfunction addWorkflowNextStatusProperty(entryType: Type) {\r\n\tentryType.extend({\r\n\t\tNext_Status: {\r\n\t\t\ttype: String,\r\n\t\t\tget: {\r\n\t\t\t\tfunction(this: EntityOfType) {\r\n\t\t\t\t\tconst entryMeta = this.Entry;\r\n\t\t\t\t\tconst action = this.Workflow_Actions.find(a => a.ActionName === entryMeta.Action) as WorkflowAction;\r\n\t\t\t\t\tlet nextStatus = entryMeta.Status;\r\n\r\n\t\t\t\t\tif (typeof nextStatus !== 'string')\r\n\t\t\t\t\t\tnextStatus = getActiveEntryStatus(this, nextStatus).Name;\r\n\r\n\t\t\t\t\tif (action && action.NewStatus !== null)\r\n\t\t\t\t\t\tnextStatus = getActiveEntryStatus(this, action.NewStatus).Name || nextStatus;\r\n\r\n\t\t\t\t\treturn nextStatus;\r\n\t\t\t\t},\r\n\t\t\t\tdependsOn: '{Entry{Action,Status}, Workflow_Actions{NewStatus}, Entry_Statuses}'\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\nexport function applyWorkflowActionExtensions(formsModel: FormsModel, entryType: TypeOfType, actionDataMap: { [type: string]: WorkflowAction }) {\r\n\tif (formsModel.resolveType('Forms.WorkflowAction')) {\r\n\t\taddWorkflowActionsProperty(entryType, actionDataMap, formsModel);\r\n\r\n\t\tif (entryType.getProperty('Entry_Statuses')) {\r\n\t\t\taddWorkflowNextStatusProperty(entryType);\r\n\t\t}\r\n\t}\r\n}\r\n","import { Entity, isEntityType, PropertyConverter } from '@cognitoforms/model.js';\r\nimport type { Property } from '@cognitoforms/model.js';\r\nimport type { FormEntryStatus } from '@cognitoforms/types/server-types/forms/model/form-entry-status';\r\n\r\nfunction getActiveEntryStatus(statuses: FormEntryStatus[], statusIdOrName) {\r\n\tlet newStatus = statuses.filter(s => !s.IsArchived).find(s => s.Id === Number(statusIdOrName) || s.Name === statusIdOrName);\r\n\tif (!newStatus)\r\n\t\tnewStatus = statuses.find(s => s.Id === Number(statusIdOrName) || s.Name === statusIdOrName);\r\n\tif (newStatus == null || newStatus.ReplacementId == null)\r\n\t\treturn newStatus;\r\n\telse\r\n\t\treturn getActiveEntryStatus(statuses, newStatus.ReplacementId);\r\n}\r\n\r\nconst INCOMPLETE_STATUS_ID = 0;\r\n\r\n// If the status list is missing the entry's status for some reason, pick either the incomplete status, or the first non-incomplete status\r\n// based on whether or not the entry is incomplete.\r\nfunction getDefaultStatus(statuses: FormEntryStatus[], isEntryIncomplete: boolean): any {\r\n\treturn statuses.find(s => isEntryIncomplete ? s.Id === INCOMPLETE_STATUS_ID : s.Id !== INCOMPLETE_STATUS_ID && !s.IsArchived);\r\n}\r\n\r\n/**\r\n * Handles deserialization of entry status ids into status names.\r\n */\r\nexport default class EntryMetaConverter extends PropertyConverter {\r\n\tshouldConvert(context: Entity, prop: Property): boolean {\r\n\t\treturn prop.name === 'Entry'\r\n\t\t\t&& isEntityType(prop.propertyType)\r\n\t\t\t&& (prop.propertyType.meta.baseType || prop.propertyType.meta).fullName === 'Forms.EntryMeta';\r\n\t}\r\n\r\n\tdeserialize(context: Entity, value: any, prop: Property) {\r\n\t\tconst entryMeta = value;\r\n\t\tconst statuses = context['Entry_Statuses'];\r\n\t\t// if the EntryMeta object is already an entity instance, its status will already be correct\r\n\t\tif (statuses && entryMeta && !(entryMeta instanceof Entity)) {\r\n\t\t\tconst isEntryIncomplete = !entryMeta.DateSubmitted;\r\n\r\n\t\t\tlet status = null;\r\n\t\t\tif (entryMeta.Status !== null && entryMeta.Status !== undefined)\r\n\t\t\t\tstatus = getActiveEntryStatus(statuses, entryMeta.Status);\r\n\r\n\t\t\tstatus = status || getDefaultStatus(statuses, isEntryIncomplete);\r\n\r\n\t\t\tentryMeta.Status = status.Name;\r\n\t\t}\r\n\r\n\t\treturn super.deserialize(context, value, prop);\r\n\t}\r\n}","import Vue from 'vue';\r\nimport type { Entity, TypeExtensionOptionsForType, CultureInfo, ModelOptions, ModelLocalizationOptions, AsyncValueResolver, Property, EntityOfType, TypeOfType, EntityConstructorForType, EntityArgsOfType } from '@cognitoforms/model.js';\r\nimport VueModel, { preventVueObservability } from '@cognitoforms/vuemodel';\r\nimport DateConverter from './model/serialization/converters/date-converter';\r\nimport TimeConverter from './model/serialization/converters/time-converter';\r\nimport OrderConverter from './model/serialization/converters/order-converter';\r\nimport EnumConverter from './model/serialization/converters/enum-converter';\r\nimport IgnoreCircularReferenceConverter from './model/serialization/converters/ignore-circular-reference-converter';\r\nimport InitializeBackReferencesConverter from './model/serialization/converters/initialize-back-references-converter';\r\nimport StoragePropertyInjector from './model/serialization/injectors/storage-property-injector';\r\nimport { AddressExtensions } from './model/extensions/address-extensions';\r\nimport { NameExtensions } from './model/extensions/name-extensions';\r\nimport { SignatureExtensions } from './model/extensions/signature-extensions';\r\nimport CalculationConverter from './model/serialization/converters/calculation-converter';\r\nimport DateTimeConverter from './model/serialization/converters/date-time-converter';\r\nimport type { ObjectLookup } from 'src/util';\r\nimport LookupConverter from './model/serialization/converters/lookup-converter';\r\nimport type EntryViewService from 'src/web-api/entry-views/entry-view-service';\r\nimport { getIdFromState } from '@cognitoforms/model.js';\r\nimport type { FormEntry } from '@cognitoforms/types/server-types/forms/model/form-entry';\r\nimport type { FormEntryRuleMethods } from './model/extensions/form-entry-extensions';\r\nimport type { WorkflowAction } from '@cognitoforms/types/server-types/forms/model/workflow-action';\r\nimport YesNoConverter from './model/serialization/converters/yesno-converter';\r\nimport EntryExtensionConverter from './model/serialization/converters/entry-extension-converter';\r\nimport { getEnumInstance } from './model/core';\r\nimport { applyPaymentExtensions } from './model/extensions/payment-extensions';\r\nimport type { LookupManagerFactory } from './model/extensions/lookup-field/lookup-manager';\r\nimport type { CascadeFilterManagerFactory } from './model/extensions/lookup-field/cascade-filter-manager';\r\nimport { applyEntityInitExtensions } from './model/extensions/entity-init-extensions';\r\nimport { extendModelWithLookups } from './model/extensions/lookup-field/lookup-model-extension';\r\nimport IgnoreFileUploadConverter from './model/serialization/converters/ignore-fileupload-converter';\r\nimport IgnoreSignaturePropertiesConverter from './model/serialization/converters/ignore-signature-properties-converter';\r\nimport { applyWorkflowActionExtensions } from './model/extensions/workflow-action-extensions';\r\nimport EntryMetaConverter from './model/serialization/converters/entry-meta-converter';\r\nimport type { EntryMeta } from '@cognitoforms/types/server-types/forms/model/entry-meta';\r\nimport countries from 'i18n-iso-countries';\r\nimport { unregisterEntity } from 'src/util/model';\r\nimport type Log from './logging/log';\r\n\r\nexport const FORM_ENTRY_TYPE_NAME = 'Forms.FormEntry';\r\nexport const ORDER_TYPE_NAME = 'Payment.Order';\r\n\r\ntype PropertyLookupViewMapping = {\r\n\ttypeName: string;\r\n\tpropName: string;\r\n\tviewId: string;\r\n}\r\n\r\ntype EnumIntegerValues = { [key: number]: string };\r\ntype EnumStringValues = string[];\r\ntype EnumValuesLookup = ObjectLookup;\r\n\r\nexport type FormsModelOptions = ModelOptions & {\r\n\t$locale?: string;\r\n\t$culture?: string | CultureInfo;\r\n\t$namespace: object;\r\n\t$version: number;\r\n\t$utcOffset: number;\r\n\t$disableWorkflowActions?: boolean;\r\n\t$disableLookupFiltering?: boolean;\r\n}\r\n\r\nexport type PublicFormsModelOptions = Pick;\r\n\r\nexport class FormsModel {\r\n\treadonly entryTypeName: string;\r\n\treadonly modelOptions: FormsModelOptions;\r\n\tprivate lookupValueResolver: AsyncValueResolver;\r\n\tmodel: VueModel;\r\n\r\n\tprivate static definedLocales = new Set();\r\n\r\n\tprivate constructor(entryTypeName: string, modelOptions: FormsModelOptions, locale: string, localeResources: ObjectLookup, cultureInfo: any) {\r\n\t\t// Prevent Vue from making the model options observable, since it will have a cascading effect\r\n\t\tif (modelOptions)\r\n\t\t\tpreventVueObservability(modelOptions);\r\n\t\tthis.entryTypeName = entryTypeName;\r\n\t\tthis.modelOptions = modelOptions;\r\n\t\tconst enumValues = FormsModel.captureEnumValues(modelOptions);\r\n\t\tconst model = this.model = new VueModel(FormsModel.preprocessOptions(modelOptions, locale, localeResources, cultureInfo), {\r\n\t\t\tautogeneratePropertyLabels: false,\r\n\t\t\tmaxEventScopeDepth: 100,\r\n\t\t\tmaxExitingEventScopeTransferCount: 500\r\n\t\t});\r\n\t\tthis.configureSerialization(modelOptions);\r\n\t\tFormsModel.applyCustomTypeExtensions(model, { Address: AddressExtensions, Name: NameExtensions, Signature: SignatureExtensions });\r\n\r\n\t\tif (!modelOptions.$disableWorkflowActions)\r\n\t\t\tapplyWorkflowActionExtensions(this, this.resolveType(this.entryTypeName), FormsModel.captureActionData(this.modelOptions));\r\n\r\n\t\tapplyPaymentExtensions(this, this.resolveType(this.entryTypeName));\r\n\t\tapplyEntityInitExtensions(this);\r\n\t\tthis.model.ready(() => FormsModel.postprocessModel(model, enumValues));\r\n\t}\r\n\r\n\t/**\r\n\t * The global config object shared by form models\r\n\t * NOTE: This is currently only needed to provide the `serverTimeOffset` required by the `Cognito_now` export used in model extensions\r\n\t */\r\n\tstatic config: any = {};\r\n\r\n\t/**\r\n\t * Detect model options that are types that appear to be enums and capture their enum values\r\n\t */\r\n\tprivate static captureEnumValues(modelOptions: FormsModelOptions): EnumValuesLookup {\r\n\t\treturn Object.keys(modelOptions).reduce((lookup, key) => {\r\n\t\t\tconst value = modelOptions[key];\r\n\t\t\tif (typeof value === 'object' && value.$enum)\r\n\t\t\t\tlookup[key] = value.$enum as EnumIntegerValues | EnumStringValues;\r\n\t\t\treturn lookup;\r\n\t\t}, {});\r\n\t}\r\n\r\n\t/**\r\n\t * Capture the workflow actions configuration for the form from the '$data' field on each WorkflowAction sub-type\r\n\t */\r\n\tprivate static captureActionData(modelOptions: FormsModelOptions): { [type: string]: WorkflowAction } {\r\n\t\treturn Object.keys(modelOptions).reduce((lookup, key) => {\r\n\t\t\tconst value = modelOptions[key];\r\n\t\t\tif (typeof value === 'object' && value.$extends && value.$extends === 'Forms.WorkflowAction') {\r\n\t\t\t\tlookup[key] = value.$data;\r\n\t\t\t}\r\n\t\t\treturn lookup;\r\n\t\t}, {});\r\n\t}\r\n\r\n\t/**\r\n\t * Preprocess model options before passing them to the model constructor\r\n\t */\r\n\tprivate static preprocessOptions(options: FormsModelOptions, locale: string, localeResources: { [name: string]: string }, cultureInfo: CultureInfo): ModelOptions & ModelLocalizationOptions {\r\n\t\tconst modelOptions: ModelOptions & ModelLocalizationOptions = options;\r\n\t\t// Set the 'Cognito.config' reference to a shared config object\r\n\t\tmodelOptions.$namespace['config'] = FormsModel.config;\r\n\t\t(modelOptions.$namespace as any)['session'] = { utcOffset: options.$utcOffset };\r\n\r\n\t\t// Copy the resources object for internal use by the model\r\n\t\tmodelOptions.$resources = { [locale]: Object.assign({}, localeResources) };\r\n\r\n\t\t// Parse the culture object\r\n\t\tif (cultureInfo)\r\n\t\t\tmodelOptions.$culture = VueModel.CultureInfo.parse(cultureInfo);\r\n\r\n\t\treturn modelOptions;\r\n\t}\r\n\r\n\t/**\r\n\t * Configures the given model's serializer\r\n\t * @param model The model to configure\r\n\t */\r\n\tprivate configureSerialization(modelOptions: ObjectLookup): void {\r\n\t\tconst model = this.model;\r\n\t\tconst lookupMappings: PropertyLookupViewMapping[] = [];\r\n\t\tfor (const [typeName, typeDef] of Object.entries(modelOptions)) {\r\n\t\t\tif (!typeName.startsWith('$')) {\r\n\t\t\t\tif (typeDef.$storageProperties) {\r\n\t\t\t\t\tfor (const alias in typeDef.$storageProperties)\r\n\t\t\t\t\t\tmodel.serializer.registerPropertyAlias(typeName, alias, typeDef.$storageProperties[alias]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (const [propName, propDef] of Object.entries(modelOptions)) {\r\n\t\t\t\t\tif (typeof propDef === 'object' && propDef.$lookupFieldInfo)\r\n\t\t\t\t\t\tlookupMappings.push({ typeName, propName, viewId: propDef.$lookupFieldInfo.viewId });\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tmodel.serializer.registerValueResolver(this.initialValueResolver.bind(this));\r\n\r\n\t\t// Order matters\r\n\t\tmodel.serializer.registerPropertyConverter(new EntryMetaConverter());\r\n\t\tmodel.serializer.registerPropertyConverter(new IgnoreSignaturePropertiesConverter());\r\n\t\tmodel.serializer.registerPropertyConverter(new IgnoreFileUploadConverter(this.entryTypeName));\r\n\t\tmodel.serializer.registerPropertyConverter(new DateConverter());\r\n\t\tmodel.serializer.registerPropertyConverter(new YesNoConverter());\r\n\t\tmodel.serializer.registerPropertyConverter(new TimeConverter());\r\n\t\tmodel.serializer.registerPropertyConverter(new DateTimeConverter());\r\n\t\tmodel.serializer.registerPropertyConverter(new CalculationConverter());\r\n\t\tmodel.serializer.registerPropertyConverter(new IgnoreCircularReferenceConverter());\r\n\t\tmodel.serializer.registerPropertyConverter(new InitializeBackReferencesConverter());\r\n\t\tmodel.serializer.registerPropertyConverter(new LookupConverter());\r\n\t\tmodel.serializer.registerPropertyConverter(new OrderConverter());\r\n\t\tmodel.serializer.registerPropertyConverter(new EntryExtensionConverter());\r\n\t\tmodel.serializer.registerPropertyConverter(new EnumConverter());\r\n\r\n\t\tmodel.serializer.registerPropertyInjector(FORM_ENTRY_TYPE_NAME, new StoragePropertyInjector());\r\n\t}\r\n\r\n\t/**\r\n\t * Applies custom type extensions for any of the given types that are in the given model\r\n\t * @param model The model to extend\r\n\t * @param typeExtensions The custom type extensions to apply\r\n\t */\r\n\tprivate static applyCustomTypeExtensions(model: VueModel, typeExtensions: { [typeName: string]: TypeExtensionOptionsForType }): void {\r\n\t\t// Apply custom type extensions for types that are included in the model\r\n\t\tObject.keys(typeExtensions).forEach((typeName) => {\r\n\t\t\tconst type = model.types[typeName];\r\n\t\t\tif (type) {\r\n\t\t\t\tconst typeExtension = typeExtensions[typeName];\r\n\t\t\t\ttype.extend(typeExtension);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Perform post-processing logic on the model after it has been created and is ready\r\n\t */\r\n\tprivate static postprocessModel(model: VueModel, enumValues: EnumValuesLookup): void {\r\n\t\t// Preprocess enum types\r\n\t\tObject.keys(enumValues).forEach(enumTypeName => {\r\n\t\t\tconst enumJsType = model.getJsType(enumTypeName);\r\n\t\t\tif (enumJsType && enumJsType['meta']) {\r\n\t\t\t\tconst enumType = enumJsType['meta'];\r\n\t\t\t\t// Store the enum lookup on the type\r\n\t\t\t\tenumType.enum = enumValues[enumTypeName];\r\n\t\t\t\t// Override the enum's get function to ensure that enums are created\r\n\t\t\t\tconst originalGet = enumType.get;\r\n\t\t\t\tenumType.get = getEnumInstance.bind(null, enumType, originalGet);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new forms model using the given entry type and model options\r\n\t * @param entryTypeName The full type name of the root entry type\r\n\t * @param options The model options object\r\n\t */\r\n\tstatic async createModel(entryTypeName: string, options: FormsModelOptions): Promise {\r\n\t\t// Ensure VueModel is installed\r\n\t\tVue.use(VueModel);\r\n\r\n\t\toptions.$locale = options.$locale || 'en';\r\n\t\tconst locale = options.$locale;\r\n\t\tconst cultureInfo = options.$culture as CultureInfo;\r\n\t\tlet localeResources: { [name: string]: string } = options.$locale as any;\r\n\r\n\t\t// Load resources\r\n\t\tif (typeof options.$locale !== 'object')\r\n\t\t\tlocaleResources = (await import(/* webpackChunkName: '[request]' */ `../localization/resources/${locale}`)).default;\r\n\r\n\t\tif (Object.keys(options).includes('Address')) {\r\n\t\t\tconst countriesModule = (await import(/* webpackChunkName: '[request]' */ `../localization/countries/${locale}.json`)).default;\r\n\t\t\tcountries.registerLocale(countriesModule);\r\n\t\t}\r\n\r\n\t\t// Globally define resources for the model's locale\r\n\t\tif (locale && localeResources && !FormsModel.definedLocales.has(locale)) {\r\n\t\t\tVueModel.defineResources(locale, localeResources);\r\n\t\t\tFormsModel.definedLocales.add(locale);\r\n\t\t}\r\n\r\n\t\treturn new FormsModel(entryTypeName, options, locale, localeResources, cultureInfo);\r\n\t}\r\n\r\n\t/**\r\n\t * Creates an instance of the model's root form entry type\r\n\t * @param state The property values to initialize the object with\r\n\t */\r\n\tasync constructEntry(state: any = {}, reset: boolean = false): Promise> {\r\n\t\tif (reset) {\r\n\t\t\tconst id = getIdFromState(this.resolveType(this.entryTypeName), state);\r\n\t\t\tthis.resetEntry(this.entryTypeName, id);\r\n\t\t}\r\n\r\n\t\tconst entry = await this.constructAsync(this.entryTypeName, state, reset);\r\n\r\n\t\tif (!this.modelOptions.$disableWorkflowActions)\r\n\t\t\t(entry as EntityOfType & FormEntryRuleMethods).initDefaultAction();\r\n\r\n\t\treturn entry;\r\n\t}\r\n\r\n\tconstructEntryMeta(state: EntityArgsOfType = {}): Promise> {\r\n\t\tconst entryType = this.resolveType(this.entryTypeName);\r\n\t\tconst entryMetaType = entryType.getProperty('Entry').propertyType as EntityConstructorForType;\r\n\t\treturn entryMetaType.meta.create(state);\r\n\t}\r\n\r\n\tresetEntry(type: string, id: string) {\r\n\t\t// Get the model type with the given name\r\n\t\tconst modelType = this.resolveType(type);\r\n\t\tif (!modelType)\r\n\t\t\tthrow new Error(`Could not construct instance of type '${type}'. Type not found.`);\r\n\r\n\t\tif (id) {\r\n\t\t\tconst instance = modelType.get(id);\r\n\t\t\tif (instance) {\r\n\t\t\t\tunregisterEntity(instance);\r\n\t\t\t\tif ((instance as any).Order)\r\n\t\t\t\t\tunregisterEntity((instance as any).Order);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Constructs a new entity of the given type asynchronously\r\n\t * Can be used to create entities with lookup references.\r\n\t * @param type The type of entity to construct\r\n\t * @param state The optional state to assign to the entity\r\n\t */\r\n\tasync constructAsync(type: string, state: EntityArgsOfType = {}, reset: boolean = false): Promise> {\r\n\t\t// Get the model type with the given name\r\n\t\tconst modelType = this.resolveType(type);\r\n\r\n\t\tif (!modelType)\r\n\t\t\tthrow new Error(`Could not construct instance of type '${type}'. Type not found.`);\r\n\r\n\t\tconst id = getIdFromState(modelType, state);\r\n\t\tif (id) {\r\n\t\t\tconst instance = modelType.get(id) as EntityOfType;\r\n\t\t\tif (instance) {\r\n\t\t\t\tif (reset) {\r\n\t\t\t\t\tunregisterEntity(instance);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tawait instance.update(state);\r\n\t\t\t\t\treturn Promise.resolve(instance);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn modelType.create(state) as Promise>;\r\n\t}\r\n\r\n\tresolveType(type: string) {\r\n\t\treturn this.model.types[type] as TypeOfType;\r\n\t}\r\n\r\n\t/**\r\n\t * Constructs a new entity of the given type\r\n\t * Should only be used if you know the entity in question has no lookup references.\r\n\t * @param type The type of entity to construct\r\n\t * @param state The optional state to assign to the entity\r\n\t * @deprecated This method should only be used if it is not possible to use `constructAsync`\r\n\t */\r\n\tconstruct(type: string, state: EntityArgsOfType = {}, reset: boolean = false): EntityOfType {\r\n\t\t// Get the model type with the given name\r\n\t\tconst modelType = this.resolveType(type);\r\n\t\tif (!modelType)\r\n\t\t\tthrow new Error(`Could not construct instance of type '${type}'. Type not found.`);\r\n\r\n\t\tconst id = getIdFromState(modelType, state);\r\n\t\tif (id) {\r\n\t\t\tconst instance = modelType.get(id) as EntityOfType;\r\n\t\t\tif (instance) {\r\n\t\t\t\tif (reset) {\r\n\t\t\t\t\tunregisterEntity(instance);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tinstance.update(state);\r\n\t\t\t\t\treturn instance;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Call the type's `createSync()` factory method\r\n\t\treturn modelType.createSync(state) as EntityOfType;\r\n\t}\r\n\r\n\tinitialValueResolver(instance: Entity, property: Property, value: any): Promise | void {\r\n\t\t// Resolve lookup data\r\n\t\tif (this.lookupValueResolver)\r\n\t\t\treturn this.lookupValueResolver(instance, property, value);\r\n\t}\r\n\r\n\tformat(value: number | Date, format: string) {\r\n\t\treturn typeof (value) === 'number'\r\n\t\t\t? this.model.formatNumber(value, format)\r\n\t\t\t: this.model.formatDate(value, format);\r\n\t}\r\n\r\n\tparse(type: NumberConstructor | DateConstructor, value: string, format?: string): number | Date {\r\n\t\tif (type === Number) {\r\n\t\t\treturn this.model.parseNumber(value, format);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn this.model.parseDate(value, format ? [format] : null);\r\n\t\t}\r\n\t}\r\n\r\n\texpandDateFormat(format: string): string {\r\n\t\treturn this.model.expandDateFormat(format);\r\n\t}\r\n\r\n\tget version() {\r\n\t\treturn this.modelOptions.$version;\r\n\t}\r\n\r\n\tenableLookups(entryViewService: EntryViewService, getLookupManager: LookupManagerFactory, getCascadeFilterManager: CascadeFilterManagerFactory, log: Log, pseudoLoadDeleted = false, suppressLookupLoadingErrors = true) {\r\n\t\tif (!this.lookupValueResolver)\r\n\t\t\tthis.lookupValueResolver = extendModelWithLookups(this, this.modelOptions, entryViewService, getLookupManager, getCascadeFilterManager, log, pseudoLoadDeleted, suppressLookupLoadingErrors);\r\n\t}\r\n\r\n\toverrideResource(resourceName: string, value: string) {\r\n\t\tthis.model.$resources[this.model.$locale][resourceName] = value;\r\n\t}\r\n}\r\n\r\n/**\r\n * Provide optional modules available to the form's model definition\r\n * @param name The name of the module to import\r\n * @param pendingModules The list of modules that are currently pending\r\n */\r\nexport async function importOptionalModule(name: string, pendingModules: Promise[] = null): Promise {\r\n\t// Async load the module\r\n\tlet modulePromise: Promise;\r\n\tswitch (name) {\r\n\t\tcase 'time-span':\r\n\t\t\tmodulePromise = import(/* webpackChunkName: \"time-span\" */ './model/time-span');\r\n\t\t\tbreak;\r\n\t\tcase 'order-builder':\r\n\t\t\tmodulePromise = import(/* webpackChunkName: \"order-builder\" */ './payment/order-builder');\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tthrow new Error('Cannot dynamically load module \\'' + name + '\\'.');\r\n\t}\r\n\r\n\tif (pendingModules) {\r\n\t\t// Store the requested module promise so that we can detect when it has loaded\r\n\t\tpendingModules.push(modulePromise);\r\n\t}\r\n\r\n\t// Return the module promise to the caller\r\n\treturn modulePromise;\r\n}\r\n","import type { Order } from '@cognitoforms/types/server-types/payment/model/order';\r\nimport type { FormsModel } from 'src/framework/forms-model';\r\nimport type { EntityOfType, Type } from '@cognitoforms/model.js';\r\nimport type { FormEntryWithOrder, FormEntryWorkflowExtensions } from './form-entry-extensions';\r\n\r\nexport function applyPaymentExtensions(model: FormsModel, entryType: Type) {\r\n\t// If the entry does not have an Order property, no payment extensions should be applied\r\n\tif (entryType.getProperty('Order')) {\r\n\t\tif (entryType.getProperty('Next_Status')) {\r\n\t\t\tentryType.extend({\r\n\t\t\t\t// For workflow forms, payment is only truly required if the next status is not Incomplete\r\n\t\t\t\tRequire_Payment: {\r\n\t\t\t\t\ttype: Boolean,\r\n\t\t\t\t\tget: {\r\n\t\t\t\t\t\tfunction(this: EntityOfType) {\r\n\t\t\t\t\t\t\treturn this.Require_Payment_Expression && this.Next_Status !== 'Incomplete';\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tdependsOn: '{Require_Payment_Expression, Next_Status}'\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\telse {\r\n\t\t\tentryType.extend({\r\n\t\t\t\tRequire_Payment: {\r\n\t\t\t\t\ttype: Boolean,\r\n\t\t\t\t\tget: {\r\n\t\t\t\t\t\tfunction(this: EntityOfType) {\r\n\t\t\t\t\t\t\treturn this.Require_Payment_Expression;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tdependsOn: 'Require_Payment_Expression'\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// conditionally add Save_Card_Agreement property for checkbox\r\n\t\tif (entryType.getProperty('Save_Customer_Card')) {\r\n\t\t\tentryType.extend({\r\n\t\t\t\tSave_Card_Agreement: {\r\n\t\t\t\t\ttype: Boolean,\r\n\t\t\t\t\trequired: {\r\n\t\t\t\t\t\tmessage: model.model.getResource('card-on-file-agreement-validation'),\r\n\t\t\t\t\t\tfunction() { return true; }\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// default the order property if present\r\n\t\tconst newOrderState = {\r\n\t\t\tIsOpen: true\r\n\t\t};\r\n\r\n\t\tentryType.initExisting.subscribeOne(e => {\r\n\t\t\tif (!e.entity['Order'])\r\n\t\t\t\te.entity.update('Order', newOrderState);\r\n\t\t});\r\n\r\n\t\tentryType.extend({\r\n\t\t\tOrder: {\r\n\t\t\t\tdefault() {\r\n\t\t\t\t\treturn model.construct('Payment.Order', newOrderState);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tconst orderType = model.model.types['Payment.Order'];\r\n\r\n\t\tif (orderType)\r\n\t\t\torderType.extend({\r\n\t\t\t\tRebuild_Count: {\r\n\t\t\t\t\ttype: Number,\r\n\t\t\t\t\tdefault: 0\r\n\t\t\t\t},\r\n\t\t\t\tSubTotal: {\r\n\t\t\t\t\tget: {\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\treturn this.LineItems.reduce((subtotal, item) => subtotal + item.Amount, 0);\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tdependsOn: 'LineItems{Amount}'\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tAdditionalFees: {\r\n\t\t\t\t\tget: {\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\treturn this.Fees.filter(fee => !fee.IsProcessingFee).reduce((total, fee) => total + fee.Amount, 0);\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tdependsOn: 'Fees{IsProcessingFee,Amount}'\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tProcessingFees: {\r\n\t\t\t\t\tget: {\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\treturn this.Fees.filter(fee => fee.IsProcessingFee).reduce((total, fee) => total + fee.Amount, 0);\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tdependsOn: 'Fees{IsProcessingFee,Amount}'\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tOrderAmount: {\r\n\t\t\t\t\tget: {\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\treturn this.SubTotal + this.AdditionalFees + this.ProcessingFees;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tdependsOn: '{SubTotal,AdditionalFees,ProcessingFees}'\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tAmountDue: {\r\n\t\t\t\t\tget: {\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\treturn this.OrderAmount - this.AmountPaid;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tdependsOn: '{OrderAmount,AmountPaid}'\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tOrderSummary: {\r\n\t\t\t\t\tget: {\r\n\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\tconst status = this.PaymentStatus.DisplayName;\r\n\t\t\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\t\t\tcase 'Paid':\r\n\t\t\t\t\t\t\t\t\treturn this.toString('[AmountPaid] [PaymentStatus.Name]');\r\n\t\t\t\t\t\t\t\tcase 'Refunded':\r\n\t\t\t\t\t\t\t\t\treturn this.toString('[RefundAmount] [PaymentStatus.Name]');\r\n\t\t\t\t\t\t\t\tcase 'Declined':\r\n\t\t\t\t\t\t\t\t\t// if AmountDeclined is falsy, OrderSummary should show OrderAmount\r\n\t\t\t\t\t\t\t\t\tif (this.AmountDeclined)\r\n\t\t\t\t\t\t\t\t\t\treturn this.toString('[AmountDeclined] [PaymentStatus.Name]');\r\n\t\t\t\t\t\t\t\t// eslint-disable-next-line no-fallthrough\r\n\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\treturn this.toString('[OrderAmount] [PaymentStatus.Name]');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tdependsOn: '{PaymentStatus,AmountPaid,RefundAmount,OrderAmount,AmountDeclined}'\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n}\r\n\r\nexport type OrderExtensions = {\r\n\tRebuild_Count: number;\r\n}\r\n","import type { Property, Entity, AsyncValueResolver, Type, EntityOfType } from '@cognitoforms/model.js';\r\nimport { Property$pendingInit, isEntityType } from '@cognitoforms/model.js';\r\nimport type { FormsModel, FormsModelOptions } from 'src/framework/forms-model';\r\nimport type { ObjectLookup } from 'src/util';\r\nimport type EntryViewService from 'src/web-api/entry-views/entry-view-service';\r\nimport type { CascadeFilterInfo, CascadeFilterManagerFactory } from './cascade-filter-manager';\r\nimport CascadeFilterManager from './cascade-filter-manager';\r\nimport type { LookupIndexInfo, LookupManagerFactory } from './lookup-manager';\r\nimport LookupManager from './lookup-manager';\r\nimport { getFormEntry } from '../../core';\r\nimport type { FormEntryIndex } from '@cognitoforms/types/server-types/forms/model/form-entry-index';\r\nimport { getAxiosError } from 'src/web-api/base-service';\r\nimport type Log from 'src/framework/logging/log';\r\nimport { ensureError } from 'src/framework/logging/error';\r\nimport type { EntryData } from 'src/web-api/entry-views/entry-view-types';\r\n\r\nfunction isRootLookupProperty(propDef: any) {\r\n\treturn typeof propDef === 'object' && propDef['$lookupFieldInfo'];\r\n}\r\n\r\nfunction isNestedLookupProperty(propDef: any) {\r\n\treturn typeof propDef === 'object' && propDef['$lookupViewId'];\r\n}\r\n\r\nfunction isCascadeFilterProperty(propDef: any) {\r\n\treturn typeof propDef === 'object' && propDef['$cascadeFilterInfo'];\r\n}\r\n\r\nfunction getManagerPropName(lookupProperty: Property) {\r\n\treturn `${lookupProperty.name}_LookupManager`;\r\n}\r\n\r\nfunction getIsIncludedMethodName(lookupProperty: Property) {\r\n\treturn `${lookupProperty.name}_IsIncluded`;\r\n}\r\n\r\n/**\r\n * Determines whether a lookup index should be included - either there is no filter,\r\n * or the index passes the filter.\r\n * @param container The object that contains the lookup field\r\n * @param lookupProperty The property for the lookup field\r\n * @param index The index option to test\r\n * @returns True, if the index should be an included option for the lookup\r\n */\r\nexport function isIncluded(container: Entity, lookupProperty: Property, index: EntityOfType) {\r\n\ttry {\r\n\t\tconst isIncludedMethod = getIsIncludedMethodName(lookupProperty);\r\n\r\n\t\t// Include the index if there is no filter\r\n\t\tif (!container[isIncludedMethod])\r\n\t\t\treturn true;\r\n\r\n\t\t// Invoke the \"InIncluded\" expression\r\n\t\treturn container[isIncludedMethod](index);\r\n\t}\r\n\tcatch (e) {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\n/**\r\n * Adds a rule to the specified type which ensures a lookup manager's filtered indexes are\r\n * kept up to date as dependent model properties change.\r\n */\r\nfunction addLookupFilterRules(type: Type, lookupProperty: Property, lookupInfo: LookupIndexInfo): void {\r\n\t// Don't allow a lookup to be prefilled with invalid values\r\n\tlookupProperty.changed.subscribe(function () {\r\n\t\tconst entry = getFormEntry(this);\r\n\t\tif (entry.meta.isNew) {\r\n\t\t\tconst manager = this[getManagerPropName(lookupProperty)] as LookupManager;\r\n\t\t\tif (manager)\r\n\t\t\t\tmanager.whenReady(() => manager.clearInvalidValues());\r\n\t\t}\r\n\t});\r\n\r\n\t// Ensure that lookup value(s) is/are valid when a filter predicate changes\r\n\ttype.addRule({\r\n\t\tname: `${lookupProperty.containingType.fullName}.${lookupProperty.name}.UpdateFilteredIndexes`,\r\n\t\texecute() {\r\n\t\t\tconst manager = this[getManagerPropName(lookupProperty)] as LookupManager;\r\n\t\t\tif (manager)\r\n\t\t\t\tmanager.whenReady(() => manager.updateFilteredIndexes(true));\r\n\t\t},\r\n\t\tonChangeOf: type.getPaths(`{${lookupInfo.filterPaths.join(',')}}`)\r\n\t}).register();\r\n}\r\n\r\nfunction getIsDefaultedMethodName(lookupProperty: Property) {\r\n\treturn `${lookupProperty.name}_IsDefaulted`;\r\n}\r\n\r\n/**\r\n * Determines if the index should be a default option based solely on static data on the index itself\r\n */\r\nfunction isStaticallyDefaulted(option: EntityOfType) {\r\n\treturn option.AdditionalValues.some(v => v.FieldId === 'Default' && v.Value === 'True');\r\n}\r\n\r\n/**\r\n * Determines whether a lookup index should be a default, based on either static\r\n * default criteria on the index, or the dynamic IsDefaulted expression.\r\n * @param container The object that contains the lookup field\r\n * @param lookupProperty The property for the lookup field\r\n * @param index The index option to test\r\n * @returns True, if the index should be a default value for the lookup\r\n */\r\nexport function isDefaulted(container: Entity, lookupProperty: Property, index: EntityOfType) {\r\n\tif (isStaticallyDefaulted(index))\r\n\t\treturn true;\r\n\r\n\ttry {\r\n\t\tconst isDefaultedMethod = getIsDefaultedMethodName(lookupProperty);\r\n\r\n\t\tif (!container[isDefaultedMethod])\r\n\t\t\treturn false;\r\n\r\n\t\treturn container[isDefaultedMethod](index);\r\n\t}\r\n\tcatch (e) {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\n/**\r\n * Adds rules to the specified type which ensures a lookup manager's default indexes are\r\n * established and default filter is applied initially, and as as dependent model properties change.\r\n */\r\nfunction addLookupDefaultRules(type: Type, lookupProperty: Property, lookupInfo: LookupIndexInfo): void {\r\n\t// Apply the default filter when the entry is initialized\r\n\t// - for new entries if the value has not been prefilled\r\n\t// - for existing entries when there is no persisted value\r\n\ttype.addRule({\r\n\t\tname: `${lookupProperty.containingType.fullName}.${lookupProperty.name}.SetInitialDefaultValue`,\r\n\t\texecute() {\r\n\t\t\tconst manager = this[getManagerPropName(lookupProperty)] as LookupManager;\r\n\t\t\tif (manager) {\r\n\t\t\t\tmanager.whenReady(() => {\r\n\t\t\t\t\t// Wait for the entry to initialize to ensure that prefilled or persisted lookup values have been resolved\r\n\t\t\t\t\tgetFormEntry(this).initialized.then(() => {\r\n\t\t\t\t\t\tconst isInited = lookupProperty.isInited(this) && !Property$pendingInit(this, lookupProperty);\r\n\t\t\t\t\t\tif (!isInited)\r\n\t\t\t\t\t\t\tmanager.updateDefaultIndexes(true);\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}).onInit().register();\r\n\r\n\t// Apply the default filter whenever one of the default filter predicates changes\r\n\ttype.addRule({\r\n\t\tname: `${lookupProperty.containingType.fullName}.${lookupProperty.name}.UpdateDefaultIndexesAndSetDefaultValue`,\r\n\t\texecute() {\r\n\t\t\tconst manager = this[getManagerPropName(lookupProperty)] as LookupManager;\r\n\t\t\tif (manager)\r\n\t\t\t\tmanager.whenReady(() => manager.updateDefaultIndexes(true));\r\n\t\t},\r\n\t\tonChangeOf: type.getPaths(`{${lookupInfo.defaultPaths.join(',')}}`)\r\n\t}).register();\r\n\r\n\t// Ensure that a default filter rule will run if a calculation that it depends on is changed.\r\n\t// A property with a default value rule may have a persisted value, in which case it will not run unless one of its predicates\r\n\t// fires a change event. A calculation will not fire a change event the first time it runs if it didn't previously have a value,\r\n\t// which may be the case for existing instances if the calculation is never accessed (ex: a hidden field), or is not accessed\r\n\t// prior to the event that would trigger it to change (i.e. setting the default action). So, in order to ensure that the default\r\n\t// filter's calculated predicates fire a change event, we must ensure that the calculation is accessed when the object is initialized.\r\n\ttype.addRule({\r\n\t\tname: `${lookupProperty.containingType.fullName}.${lookupProperty.name}.AccessDefaultValuePredicates`,\r\n\t\texecute() {\r\n\t\t\ttype.getPaths(`{${lookupInfo.defaultPaths.join(',')}}`).forEach(p => p.value(this));\r\n\t\t}\r\n\t}).onInitExisting().register();\r\n}\r\n\r\nexport function extendModelWithLookups(\r\n\tmodel: FormsModel,\r\n\toptions: FormsModelOptions,\r\n\tentryViewService: EntryViewService,\r\n\tgetLookupManager: LookupManagerFactory,\r\n\tgetCascadeFilterManager: CascadeFilterManagerFactory,\r\n\tlog: Log,\r\n\tpseudoLoadDeleted: boolean,\r\n\tsuppressLookupLoadingErrors: boolean\r\n): AsyncValueResolver {\r\n\t/**\r\n\t * Adds the LookupManger property to the lookup manager's containingType.\r\n\t */\r\n\tfunction addLookupManagerProperty(lookupProperty: Property, lookupInfo: LookupIndexInfo, entryViewService: EntryViewService, getLookupManager: LookupManagerFactory) {\r\n\t\tlookupProperty.containingType.extend({\r\n\t\t\t[getManagerPropName(lookupProperty)]: {\r\n\t\t\t\tget: function(this: Entity) {\r\n\t\t\t\t\treturn getLookupManager({\r\n\t\t\t\t\t\tlookupInfo,\r\n\t\t\t\t\t\tindexType: model.resolveType(lookupInfo.indexTypeName),\r\n\t\t\t\t\t\tentryViewService,\r\n\t\t\t\t\t\tlookupProperty,\r\n\t\t\t\t\t\tcontainer: this\r\n\t\t\t\t\t});\r\n\t\t\t\t},\r\n\t\t\t\ttype: LookupManager as any\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tlookupProperty.containingType.addRule(function autoCreateLookupManager(this: Entity) {\r\n\t\t\t// force the manager to be created by accessing the property\r\n\t\t\tthis.get(getManagerPropName(lookupProperty));\r\n\t\t}).onInit().register();\r\n\t}\r\n\r\n\t/**\r\n\t * Adds the CascadeFilterManager property to the cascade filter manager's containingType.\r\n\t */\r\n\tfunction addCascadeFilterManagerProperty(cascadeProperty: Property, filterInfo: CascadeFilterInfo, getCascadeFilterManager: CascadeFilterManagerFactory) {\r\n\t\tconst cascadeManagerProp = `${cascadeProperty.name}_CascadeFilterManager`;\r\n\t\tcascadeProperty.containingType.extend({\r\n\t\t\t[cascadeManagerProp]: {\r\n\t\t\t\tget: {\r\n\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\treturn getCascadeFilterManager({\r\n\t\t\t\t\t\t\tlookupManager: this[`${filterInfo.lookupPropertyName}_LookupManager`],\r\n\t\t\t\t\t\t\tcascadeProperty,\r\n\t\t\t\t\t\t\tindexProperty: model.resolveType(filterInfo.indexTypeName).getProperty(filterInfo.indexPropertyName),\r\n\t\t\t\t\t\t\tpriorFilters: filterInfo.priorFilters\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t},\r\n\t\t\t\t\tdependsOn: `${filterInfo.lookupPropertyName}_LookupManager`\r\n\t\t\t\t},\r\n\t\t\t\ttype: CascadeFilterManager as any\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tcascadeProperty.containingType.addRule(function autoCreateCascadeManager() {\r\n\t\t\t// force the manager to be created by accessing the property\r\n\t\t\tthis.get(cascadeManagerProp);\r\n\t\t}).onInit().register();\r\n\t}\r\n\r\n\tconst lookupViews = new Map();\r\n\r\n\t/**\r\n\t * Traverse the model definition and do the following:\r\n\t * - harvest lookup view ids for all lookup fields\r\n\t * - create rules to update filtered/default options for lookup fields\r\n\t * - create rules to initialize lookup/cascade filter managers for any type containing a lookup field\r\n\t */\r\n\tfor (const [typeName, typeDef] of Object.entries(options)) {\r\n\t\tif (!typeName.startsWith('$')) {\r\n\t\t\tconst currentType = model.resolveType(typeName);\r\n\t\t\tconst cascadeManagersToInitialize = [];\r\n\t\t\tfor (const [propName, propDef] of Object.entries(typeDef)) {\r\n\t\t\t\tconst currentProperty = currentType.getProperty(propName);\r\n\r\n\t\t\t\t// lookups on secondary forms (not the root) only need the viewId to load entries\r\n\t\t\t\tif (isNestedLookupProperty(propDef))\r\n\t\t\t\t\tlookupViews.set(currentProperty, propDef['$lookupViewId']);\r\n\t\t\t\telse if (isCascadeFilterProperty(propDef)) {\r\n\t\t\t\t\tif (!options.$disableLookupFiltering)\r\n\t\t\t\t\t\tcascadeManagersToInitialize.push(() => addCascadeFilterManagerProperty(currentProperty, propDef['$cascadeFilterInfo'] as CascadeFilterInfo, getCascadeFilterManager));\r\n\t\t\t\t}\r\n\t\t\t\t// lookups on the root form need more metadata to describe the index type for displaying options\r\n\t\t\t\telse if (isRootLookupProperty(propDef)) {\r\n\t\t\t\t\tconst lookupInfo = propDef['$lookupFieldInfo'] as LookupIndexInfo;\r\n\r\n\t\t\t\t\tlookupViews.set(currentProperty, lookupInfo.viewId);\r\n\r\n\t\t\t\t\tif (!options.$disableLookupFiltering) {\r\n\t\t\t\t\t\taddLookupManagerProperty(currentProperty, lookupInfo, entryViewService, getLookupManager);\r\n\r\n\t\t\t\t\t\tif (lookupInfo.filterPaths)\r\n\t\t\t\t\t\t\taddLookupFilterRules(currentType, currentProperty, lookupInfo);\r\n\r\n\t\t\t\t\t\tif (lookupInfo.defaultPaths)\r\n\t\t\t\t\t\t\taddLookupDefaultRules(currentType, currentProperty, lookupInfo);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (cascadeManagersToInitialize.length)\r\n\t\t\t\tcascadeManagersToInitialize.forEach(addCascadeFilterManager => addCascadeFilterManager());\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Attempts to load form entries for lookup properties with a corresponding lookup view using the configured EntryViewService.\r\n\t */\r\n\tfunction lookupEntryResolver(instance: Entity, property: Property, value: any): Promise | null {\r\n\t\tconst viewId = lookupViews.get(property);\r\n\t\tconst isList = Array.isArray(value);\r\n\t\tif (viewId && value && isEntityType(property.propertyType)) {\r\n\t\t\tconst ids = isList ? value as any[] : [value];\r\n\t\t\tconst loaded: ObjectLookup = {};\r\n\r\n\t\t\t// determine which entries are already in memory\r\n\t\t\tfor (const id of ids) {\r\n\t\t\t\tconst entry = property.propertyType.meta.get(id);\r\n\t\t\t\tif (entry)\r\n\t\t\t\t\tloaded[id] = entry;\r\n\t\t\t}\r\n\r\n\t\t\tconst unloadedIds = ids.filter(id => !loaded[id]);\r\n\t\t\tlet dataLoaded: Promise = Promise.resolve();\r\n\r\n\t\t\t// load remote entry data if necessary\r\n\t\t\tif (unloadedIds.length)\r\n\t\t\t\tdataLoaded = entryViewService.lookupEntries(viewId, unloadedIds)\r\n\t\t\t\t\t.then(entryData => entryData.forEach(data => (loaded[data.Id] = data)))\r\n\t\t\t\t\t.catch(reason => {\r\n\t\t\t\t\t\t// Capture Axios error if the cause of the failure is a network request error of some kind\r\n\t\t\t\t\t\tconst networkError = getAxiosError(reason);\r\n\r\n\t\t\t\t\t\tif (log) {\r\n\t\t\t\t\t\t\tconst additionalProperties: Record = {};\r\n\t\t\t\t\t\t\tadditionalProperties['Source'] = 'lookupEntryResolver';\r\n\t\t\t\t\t\t\tadditionalProperties['Value'] = value;\r\n\t\t\t\t\t\t\tif (networkError) {\r\n\t\t\t\t\t\t\t\tadditionalProperties['Url'] = networkError.config?.url;\r\n\t\t\t\t\t\t\t\tadditionalProperties['Method'] = networkError.config?.method;\r\n\t\t\t\t\t\t\t\tadditionalProperties['Timeout'] = networkError.config?.timeout;\r\n\t\t\t\t\t\t\t\tadditionalProperties['Code'] = networkError.code;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tlog.error(ensureError(reason, 'An unknown error occurred resolving lookup values'), additionalProperties);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (!suppressLookupLoadingErrors && networkError)\r\n\t\t\t\t\t\t\tthrow reason;\r\n\r\n\t\t\t\t\t\tconsole.warn('Unable to resolve lookup value:', value, reason);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t// return all entries in order based on provided value\r\n\t\t\treturn dataLoaded.then(() => {\r\n\t\t\t\tfor (const unloaded of unloadedIds) {\r\n\t\t\t\t\tif (!loaded[unloaded]) {\r\n\t\t\t\t\t\tif (pseudoLoadDeleted)\r\n\t\t\t\t\t\t\tloaded[unloaded] = { Id: 'Deleted|' + unloaded } as any;\r\n\t\t\t\t\t\tif (log) {\r\n\t\t\t\t\t\t\tlog.trace('Lookup entry not loaded.', {\r\n\t\t\t\t\t\t\t\tSource: 'lookupEntryResolver',\r\n\t\t\t\t\t\t\t\tUnloaded: unloaded\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn ids.map(id => loaded[id]);\r\n\t\t\t}).then(entries => isList ? entries.filter(entry => entry !== undefined) : (entries[0] !== undefined ? entries[0] : null));\r\n\t\t}\r\n\r\n\t\t// return null so the framework knows there is no async resolution for this value\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}\r\n\r\n\treturn lookupEntryResolver;\r\n}\r\n","export enum FormStatus {\r\n\tDefault = 'default',\r\n\tSuccess = 'success',\r\n\tInProgress = 'validating',\r\n\tError = 'error',\r\n\tCaptcha = 'captcha',\r\n\tAuthenticating = 'authenticating'\r\n}\r\n\r\nexport const FormStatusProp = {\r\n\ttype: String,\r\n\tdefault: FormStatus.Default,\r\n\tvalidator: value => {\r\n\t\treturn Object.values(FormStatus).includes(value);\r\n\t}\r\n};","import type { OrderInfo } from './payment-types';\r\nimport type { CardInformation } from '@cognitoforms/types/server-types/payment/model/card-information';\r\nimport type { CultureInfo, Entity, Property, EntityOfType, Type, EntityConstructorForType, EntityDynamicPropertiesOfType } from '@cognitoforms/model.js';\r\nimport type { Fee } from '@cognitoforms/types/server-types/payment/model/fee';\r\nimport type { TransactionFee } from '@cognitoforms/types/server-types/payment/model/transaction-fee';\r\nimport type { LineItem } from '@cognitoforms/types/server-types/payment/model/line-item';\r\nimport type { Order } from '@cognitoforms/types/server-types/payment/model/order';\r\nimport type { FormEntryWithOrder, LineItemMetaData } from 'src/framework/model/extensions/form-entry-extensions';\r\nimport type { Country } from '@cognitoforms/types/server-types/model/country';\r\nimport { roundToPrecision } from './helpers';\r\nimport type { Choice } from '@cognitoforms/types/server-types/model/choice';\r\nimport type { CustomerInformation } from '@cognitoforms/types/server-types/model/customer-information';\r\nimport type { RepeatingSectionOrTable } from '../model/core';\r\nimport type { OrderExtensions } from '../model/extensions/payment-extensions';\r\n\r\ninterface GroupedLineItem extends LineItem {\r\n\tGroupId: string;\r\n}\r\n\r\ninterface StripeProcessorFeeProperties extends TransactionFee {\r\n\tCountry?: Country;\r\n\tMode?: number;\r\n}\r\n\r\ntype BillingFieldMap = {\r\n\t[P in keyof CustomerInformation]?: string;\r\n}\r\n\r\ntype LineItemMetadataExtensions = {\r\n\tpropertyList?: Property[];\r\n}\r\n\r\ntype RebuildOrderOptions = {\r\n\trequirePayment?: boolean;\r\n}\r\n\r\nexport default class OrderBuilder {\r\n\t// -------------- Properties --------------\r\n\tentry: EntityOfType;\r\n\r\n\tlineItemMetaData: (LineItemMetaData & LineItemMetadataExtensions)[] = [];\r\n\r\n\ttransactionFees: TransactionFee[] = [];\r\n\r\n\tprocessingFees: (TransactionFee & StripeProcessorFeeProperties & { Modes?: string[] })[] = [];\r\n\r\n\tapplicationFee: TransactionFee = null;\r\n\r\n\trequirePayment: boolean;\r\n\r\n\tdomesticCountryCode: string = 'US';\r\n\r\n\tprocessingFeeDescription: string = null;\r\n\r\n\tprocessorName: string = null;\r\n\r\n\teuropeanCountries: string[];\r\n\r\n\tprocessorFeeModes: { [key: string]: number };\r\n\r\n\t// -------------- Injections --------------\r\n\t$culture: CultureInfo;\r\n\r\n\t$resource: (name: string) => string;\r\n\r\n\t$namespace: any;\r\n\r\n\t// -------------- Data --------------\r\n\tidIndex: number = 0;\r\n\r\n\tcardData: CardInformation = null;\r\n\r\n\tadditionalFees: number = 0;\r\n\r\n\tprocessorFee: number = 0;\r\n\r\n\tconstructor(entry: EntityOfType, requirePayment?: boolean) {\r\n\t\tconst model = entry.meta.type.model;\r\n\t\tthis.$namespace = model.$namespace;\r\n\t\tthis.$culture = model.$culture;\r\n\t\tthis.$resource = model.getResource.bind(model);\r\n\r\n\t\tthis.entry = entry;\r\n\t\tthis.lineItemMetaData = entry.Line_Item_Metadata;\r\n\t\tthis.transactionFees = entry.Transaction_Fees;\r\n\t\tthis.processingFees = entry.Processing_Fees;\r\n\t\tthis.applicationFee = entry.Application_Fee;\r\n\t\tthis.requirePayment = requirePayment;\r\n\t\tthis.domesticCountryCode = entry.Domestic_Country_Code;\r\n\t\tthis.processingFeeDescription = entry.Processing_Fee_Description;\r\n\t\tthis.europeanCountries = entry.European_Countries;\r\n\t\tthis.processorFeeModes = entry.Processor_Fee_Modes;\r\n\t}\r\n\r\n\t// -------------- Computed --------------\r\n\tget billingFields(): EntityDynamicPropertiesOfType {\r\n\t\tif (!this.billingFieldPaths)\r\n\t\t\treturn null;\r\n\r\n\t\tconst values = {};\r\n\r\n\t\tObject.keys(this.billingFieldPaths).forEach((billingField: keyof EntityDynamicPropertiesOfType) => {\r\n\t\t\tconst path = this.billingFieldPaths[billingField];\r\n\t\t\tif (!path)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tconst paths = path.split('.');\r\n\t\t\tlet parentEntity = this.entry;\r\n\t\t\tlet property = null;\r\n\r\n\t\t\t// Find the property and the parent instance\r\n\t\t\tfor (let i = 0; i < paths.length; i++) {\r\n\t\t\t\tconst p = paths[i];\r\n\t\t\t\t// Can not be in a dynamic container\r\n\t\t\t\tproperty = parentEntity.meta.type.getPath(p);\r\n\r\n\t\t\t\tif (i !== paths.length - 1)\r\n\t\t\t\t\tparentEntity = parentEntity ? parentEntity[p] : null;\r\n\r\n\t\t\t\t// If the parent is unset/empty (Lookup), return\r\n\t\t\t\tif (!parentEntity)\r\n\t\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst val = property.value(parentEntity);\r\n\t\t\tif (val)\r\n\t\t\t\tvalues[billingField] = val;\r\n\t\t});\r\n\r\n\t\treturn values as EntityDynamicPropertiesOfType;\r\n\t};\r\n\r\n\tget billingFieldPaths(): BillingFieldMap {\r\n\t\treturn {\r\n\t\t\tName: this.entry.Billing_Name_Field,\r\n\t\t\tEmail: this.entry.Billing_Email_Field,\r\n\t\t\tAddress: this.entry.Billing_Address_Field,\r\n\t\t\tPhone: this.entry.Billing_Phone_Field\r\n\t\t};\r\n\t}\r\n\r\n\tget subtotal(): number {\r\n\t\treturn this.sum(this.lineItems, 'Amount');\r\n\t};\r\n\r\n\tget fees(): Fee[] {\r\n\t\tif (!this.transactionFees && !this.processingFees)\r\n\t\t\treturn null;\r\n\r\n\t\tconst subtotal = this.subtotal;\r\n\r\n\t\t// Fees should not be present if there is no money due\r\n\t\tif (subtotal <= 0)\r\n\t\t\treturn [];\r\n\r\n\t\t// Parse the transaction fees list\r\n\t\tconst fees = [] as Fee[];\r\n\r\n\t\t// Calculate the amount for each fee and the display value\r\n\t\tthis.transactionFees.forEach((tFee) => {\r\n\t\t\tif (!tFee.Description)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tlet amount = tFee.FixedAmount || 0;\r\n\t\t\tif (tFee.PercentageAmount) {\r\n\t\t\t\tamount += this.roundCurrency(subtotal * tFee.PercentageAmount);\r\n\t\t\t}\r\n\t\t\tfees.push({\r\n\t\t\t\tName: tFee.Description,\r\n\t\t\t\tAmount: amount,\r\n\t\t\t\tDescription: tFee.Description,\r\n\t\t\t\tIsProcessingFee: false\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\tthis.additionalFees = this.sum(fees, 'Amount');\r\n\r\n\t\t// Calculate the amount for each processing fee, the display value, and set the description\r\n\t\tconst processingFee = this.calculateProcessingFee();\r\n\t\tif (processingFee) {\r\n\t\t\tfees.push(processingFee);\r\n\t\t}\r\n\r\n\t\treturn fees;\r\n\t};\r\n\r\n\tget orderAmount(): number {\r\n\t\treturn this.subtotal + this.sum(this.fees, 'Amount');\r\n\t};\r\n\r\n\tget lineItems() : LineItem[] {\r\n\t\treturn this.updateLineItems();\r\n\t}\r\n\r\n\t// -------------- Methods --------------\r\n\tgetOrderInfo() : OrderInfo {\r\n\t\tconst orderInfo = {} as OrderInfo;\r\n\r\n\t\tObject.keys(this.billingFields).forEach((key) => {\r\n\t\t\torderInfo[key] = this.billingFields[key];\r\n\t\t});\r\n\r\n\t\torderInfo.Amount = this.orderAmount;\r\n\r\n\t\treturn orderInfo;\r\n\t}\r\n\r\n\tupdateLineItems() : LineItem[] {\r\n\t\tlet lineItems = [] as GroupedLineItem[];\r\n\r\n\t\tthis.lineItemMetaData.forEach((lineItemData) => {\r\n\t\t\tconst lst = this.entry.meta.type.getPath(lineItemData.path);\r\n\t\t\tlineItemData.propertyList = lst['properties'] ? lst['properties'] as Property[] : [lst as Property];\r\n\t\t});\r\n\r\n\t\tthis.lineItemMetaData.forEach((lineItemData) => {\r\n\t\t\tconst propertyList: Property[] = lineItemData.propertyList.slice();\r\n\r\n\t\t\tthis.idIndex = 0;\r\n\r\n\t\t\t// Create the line items for the property\r\n\t\t\tconst propertyLineItems = this.generateLineItems(lineItemData, propertyList, this.entry, '', '');\r\n\r\n\t\t\t// If line items were created, add the line items to the list\r\n\t\t\tif (propertyLineItems) {\r\n\t\t\t\tlineItems = lineItems.concat(propertyLineItems);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tlineItems = lineItems.sort((item1, item2) => { return this.idCompare(item1.GroupId.split('-'), item2.GroupId.split('-')); });\r\n\r\n\t\t// Line items should appear in the order they appear on the form unless they have a group\r\n\t\t// Grouped line items should appear in the order they appear on the form\r\n\t\t// The group is placed where it is first encountered\r\n\t\treturn lineItems.map((gLineItem) => {\r\n\t\t\treturn {\r\n\t\t\t\tName: gLineItem.Name,\r\n\t\t\t\tDescription: gLineItem.Description,\r\n\t\t\t\tGroup: gLineItem.Group,\r\n\t\t\t\tAmount: gLineItem.Amount ? gLineItem.Amount : 0\r\n\t\t\t};\r\n\t\t});\r\n\t}\r\n\r\n\tidCompare(item1: string[], item2: string[]) : number {\r\n\t\tconst i1 = parseInt(item1[0]) || -1;\r\n\t\tconst i2 = parseInt(item2[0]) || -1;\r\n\t\tif (i1 === i2)\r\n\t\t\treturn i1 === -1 ? 0 : this.idCompare(item1.slice(1), item2.slice(1));\r\n\t\treturn i1 > i2 ? 1 : -1;\r\n\t}\r\n\r\n\t// Create line items for the given property list\r\n\tgenerateLineItems(lineItemData: LineItemMetaData, propertyList: Property[], parentEntity: Entity, group: string, groupId: string) : GroupedLineItem[] {\r\n\t\tconst property = propertyList[0];\r\n\r\n\t\t// If the field is always hidden, its value should be constant to differentiate it from conditionally visible fields\r\n\t\tlet isConstant = false;\r\n\t\tconst visibleProp = parentEntity.meta.type.getProperty(`${property.path}_Visible`);\r\n\t\tif (visibleProp)\r\n\t\t\tisConstant = visibleProp.isConstant;\r\n\r\n\t\t// Conditionally hidden fields do not generate line items\r\n\t\tif (parentEntity[`${property.path}_Visible`] === false && !isConstant && !parentEntity[`${property.path}_IncludeInInvoice`])\r\n\t\t\treturn [];\r\n\r\n\t\t// Non-container, leaf property\r\n\t\tif (propertyList.length === 1) {\r\n\t\t\t// TODO: For choice checkboxes, amount property doesn't look right\r\n\t\t\treturn this.createLineItems(lineItemData, propertyList, parentEntity, group, groupId);\r\n\t\t}\r\n\r\n\t\tthis.idIndex++;\r\n\t\tconst instance = parentEntity[property.path];\r\n\t\tlet lineItems = [] as GroupedLineItem[];\r\n\r\n\t\t// Dynamic container (ie: repeating section)\r\n\t\tif (Array.isArray(instance)) {\r\n\t\t\tlineItems = this.createListLineItems(instance, lineItemData, propertyList, parentEntity, group, groupId);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tpropertyList = propertyList.slice(1);\r\n\t\t\t// Non-dynamic container (ie: section)\r\n\t\t\tlineItems = this.generateLineItems(lineItemData, propertyList, instance, group, groupId);\r\n\t\t}\r\n\t\tthis.idIndex--;\r\n\t\treturn lineItems;\r\n\t}\r\n\r\n\t// Create line items for a dynamic container (ie: repeating section)\r\n\tcreateListLineItems(entityList: EntityOfType[], lineItemData: LineItemMetaData, propertyList: Property[], parentEntity: Entity, group: string, groupId: any) : GroupedLineItem[] {\r\n\t\tlet containerLineItems = [] as GroupedLineItem[];\r\n\t\tconst listProp = propertyList[0];\r\n\t\tconst itemLabel = parentEntity[`${listProp.path}_ItemLabel`];\r\n\r\n\t\tif (!groupId)\r\n\t\t\tgroupId = lineItemData.id.slice();\r\n\r\n\t\tconst groupIdLastHalf = groupId.splice(this.idIndex);\r\n\t\tthis.idIndex++;\r\n\r\n\t\t// Create line items for each item in the container\r\n\t\tfor (const instance of entityList) {\r\n\t\t\tgroup = (itemLabel || 'Item') + ' ' + instance.ItemNumber;\r\n\t\t\t// Add the item number to the group id so that sorting will factor in the item number\r\n\t\t\tconst itemGroupId = groupId.concat([instance.ItemNumber]).concat(groupIdLastHalf);\r\n\t\t\tconst lineItems = this.generateLineItems(lineItemData, propertyList.slice(1), instance, group, itemGroupId);\r\n\t\t\tif (lineItems) {\r\n\t\t\t\tcontainerLineItems = containerLineItems.concat(lineItems);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.idIndex--;\r\n\r\n\t\treturn containerLineItems;\r\n\t}\r\n\r\n\t// Create line items for a single property\r\n\tcreateLineItems(lineItemData: LineItemMetaData, propertyList: Property[], parentEntity: Entity, group: string, groupId: any) : GroupedLineItem[] {\r\n\t\tconst property = propertyList[0];\r\n\r\n\t\tconst parentType = parentEntity.meta.type;\r\n\t\t// Get the name property if it exists\r\n\t\tconst name = this.getLineItemName(lineItemData, property, parentEntity, parentType);\r\n\r\n\t\tif (!groupId) {\r\n\t\t\tgroupId = lineItemData.id;\r\n\t\t}\r\n\r\n\t\tgroupId = groupId.join('-');\r\n\r\n\t\tif (!property.isList) {\r\n\t\t\tconst lineItem = this.createLineItem(property, lineItemData, name, group, groupId, parentEntity, parentType);\r\n\t\t\treturn lineItem ? [lineItem] : [];\r\n\t\t}\r\n\r\n\t\tconst selectedChoicesProperty = parentEntity.meta.type.getProperty(property.path);\r\n\t\tif (!selectedChoicesProperty)\r\n\t\t\treturn;\r\n\r\n\t\tconst selectedChoices = selectedChoicesProperty.value(parentEntity) as any[];\r\n\r\n\t\tif (lineItemData.type === 'Lookup') {\r\n\t\t\treturn this.createLookupCheckboxLineItems(lineItemData, selectedChoices, name, group, groupId);\r\n\t\t}\r\n\t\telse if (lineItemData.type === 'Choice') {\r\n\t\t\treturn this.createChoiceCheckboxLineItems(lineItemData, selectedChoices, name, group, groupId, parentEntity, parentType);\r\n\t\t}\r\n\t}\r\n\r\n\tcreateLineItem(property: Property, lineItemData: LineItemMetaData, name: string, group: string, groupId: string, parentEntity: Entity, parentType: Type): GroupedLineItem {\r\n\t\tconst amountProperty = lineItemData.amountProperty ? parentType.getProperty(lineItemData.amountProperty) : property;\r\n\t\tconst amount = amountProperty.value(parentEntity);\r\n\r\n\t\t// Create the description\r\n\t\tconst description = this.getLineItemDescription(lineItemData, property, parentEntity, parentType);\r\n\r\n\t\t// Negative line items should not be created (unless allowed)\r\n\t\tconst lineItemIsNegative = (amount < 0 && !lineItemData.allowNegatives);\r\n\r\n\t\t// $0 line items should not be created for non-Choice/Lookup/YesNo fields\r\n\t\tconst zeroDollarLineItem = (!amount && !['Choice', 'Lookup', 'YesNo'].includes(lineItemData.type));\r\n\r\n\t\t// For quantity-specified line items, if the quantity isn't specified don't create the line item\r\n\t\tconst hasUnspecifiedQuantity = lineItemData.quantitySelected && (!description || description.indexOf('(') === -1);\r\n\r\n\t\t// Choice/Lookups with no value selected should not have line items\r\n\t\tconst choiceOrLookupHasNoValue = ['Choice', 'Lookup'].includes(lineItemData.type) && property.value(parentEntity) === null;\r\n\r\n\t\t// YesNo fields with a false value should not have line items.\r\n\t\tconst yesNoHasFalseValue = ['YesNo'].includes(lineItemData.type) && property.value(parentEntity) === false;\r\n\r\n\t\tif (zeroDollarLineItem || lineItemIsNegative || hasUnspecifiedQuantity || choiceOrLookupHasNoValue || yesNoHasFalseValue)\r\n\t\t\treturn null;\r\n\r\n\t\t// Return the line item\r\n\t\treturn {\r\n\t\t\tAmount: this.roundCurrency(amount),\r\n\t\t\tName: name,\r\n\t\t\tGroup: group,\r\n\t\t\tDescription: description,\r\n\t\t\tGroupId: groupId\r\n\t\t};\r\n\t}\r\n\r\n\tcreateLookupCheckboxLineItems(lineItemData: LineItemMetaData, selectedChoices: Entity[], name: string, group: string, groupId: string): GroupedLineItem[] {\r\n\t\treturn selectedChoices.map(lookupEntry => {\r\n\t\t\tconst description = lookupEntry.toString(lineItemData.lookup.labelFormat);\r\n\t\t\tlet parent = lookupEntry;\r\n\r\n\t\t\tif (!lineItemData.lookup.pricePath || !parent.meta.type.getPath(lineItemData.lookup.pricePath))\r\n\t\t\t\treturn null;\r\n\r\n\t\t\tconst paths = lineItemData.lookup.pricePath.split('.');\r\n\r\n\t\t\t// Note: The price path can not be in a repeating section\r\n\t\t\tpaths.slice(0, -1).forEach((path) => {\r\n\t\t\t\tparent = parent[path];\r\n\t\t\t});\r\n\r\n\t\t\tconst price = parent[paths.slice(-1)[0]];\r\n\r\n\t\t\treturn {\r\n\t\t\t\tAmount: price,\r\n\t\t\t\tName: name,\r\n\t\t\t\tGroup: group,\r\n\t\t\t\tDescription: description,\r\n\t\t\t\tGroupId: groupId\r\n\t\t\t} as GroupedLineItem;\r\n\t\t}).filter(lineItem => !!lineItem);\r\n\t}\r\n\r\n\tcreateChoiceCheckboxLineItems(lineItemData: LineItemMetaData & LineItemMetadataExtensions, selectedChoices: string[], name: string, group: string, groupId: string, parentEntity: Entity, parentType: Type) : GroupedLineItem[] {\r\n\t\tconst property = lineItemData.propertyList[lineItemData.propertyList.length - 1];\r\n\t\tconst choicesProperty = parentEntity.meta.type.getProperty(property.path + '_Choices');\r\n\r\n\t\tif (!choicesProperty)\r\n\t\t\treturn [];\r\n\r\n\t\tconst choiceOptions = choicesProperty.value(parentEntity) as Choice[];\r\n\r\n\t\treturn selectedChoices.map(label => {\r\n\t\t\tconst choiceOption = choiceOptions.find(c => c.Label === label);\r\n\r\n\t\t\tif (choiceOption)\r\n\t\t\t\treturn {\r\n\t\t\t\t\tAmount: choiceOption.Price,\r\n\t\t\t\t\tName: name,\r\n\t\t\t\t\tGroup: group,\r\n\t\t\t\t\tDescription: label,\r\n\t\t\t\t\tGroupId: groupId\r\n\t\t\t\t};\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}).filter(item => !!item);\r\n\t}\r\n\r\n\t// Get the description for a line item\r\n\tgetLineItemDescription(lineItemData: LineItemMetaData, property: Property, parentEntity: Entity, parentType: Type): string {\r\n\t\tlet description = '';\r\n\r\n\t\tif (lineItemData.descriptionProperty)\r\n\t\t\tdescription = parentEntity[lineItemData.descriptionProperty] || '';\r\n\t\telse if (lineItemData.type === 'Choice' || lineItemData.type === 'Lookup')\r\n\t\t\tdescription = parentEntity.toString(`[${property.path}]`);\r\n\r\n\t\tif (lineItemData.quantitySelected) {\r\n\t\t\tconst quantitySelected = parentType.getProperty(lineItemData.quantitySelected);\r\n\t\t\tconst quantityValue = quantitySelected ? quantitySelected.value(parentEntity) : null;\r\n\t\t\tif (quantityValue)\r\n\t\t\t\tdescription += ' (' + quantityValue + ')';\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\treturn description.trim();\r\n\t}\r\n\r\n\tgetLineItemName(lineItemData: LineItemMetaData, property: Property, parentEntity: Entity, parentType: Type): string {\r\n\t\tif (lineItemData.nameProperty) {\r\n\t\t\tconst nameProperty = parentType.getProperty(lineItemData.nameProperty);\r\n\t\t\tif (nameProperty)\r\n\t\t\t\treturn nameProperty.value(parentEntity);\r\n\t\t}\r\n\r\n\t\tif (property.label) {\r\n\t\t\tif (property.labelIsFormat) {\r\n\t\t\t\tif (lineItemData.isWithinTable) {\r\n\t\t\t\t\t// Labels for fields in tables are evaulated in the table's parent context (since the labels are used as column headers)\r\n\t\t\t\t\tconst tableParentEntity = parentEntity['ParentSection'] || parentEntity['Form'];\r\n\t\t\t\t\treturn tableParentEntity.toString(property.label);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn parentEntity.toString(property.label);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn property.label;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcalculateProcessingFee(): Fee {\r\n\t\tconst subtotal = this.roundCurrency(this.subtotal + this.additionalFees);\r\n\t\tlet processingFees = [] as TransactionFee[];\r\n\r\n\t\tif (!subtotal || !this.processingFees || !(this.requirePayment || this.entry.Require_Payment || this.entry.Save_Customer_Card))\r\n\t\t\treturn null;\r\n\r\n\t\tconst processingFeeDescription = this.processingFeeDescription ? this.processingFeeDescription : this.$resource('payment-processing-fees');\r\n\r\n\t\tconst fee: Fee = {\r\n\t\t\tName: processingFeeDescription,\r\n\t\t\tAmount: 0,\r\n\t\t\tDescription: processingFeeDescription,\r\n\t\t\tIsProcessingFee: true\r\n\t\t};\r\n\r\n\t\tif (this.processingFees.length > 1) {\r\n\t\t\tconst cardData = this.entry.Entry.PaymentToken ? this.entry.Entry.PaymentToken.Card as CardInformation : null;\r\n\t\t\tif (!cardData) {\r\n\t\t\t\t// If there is no card data when using the Stripe Element, assume the largest of the fees\r\n\t\t\t\tprocessingFees.push(this.getMaximumFee());\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tprocessingFees.push(this.getCardFee(cardData));\r\n\t\t}\r\n\t\telse\r\n\t\t\tprocessingFees = this.processingFees;\r\n\r\n\t\tif (!processingFees.length && !this.applicationFee)\r\n\t\t\treturn null;\r\n\r\n\t\tconst fees = {\r\n\t\t\tprocessing: {\r\n\t\t\t\tpercent: this.sum(processingFees, 'PercentageAmount'),\r\n\t\t\t\tfixed: this.sum(processingFees, 'FixedAmount')\r\n\t\t\t},\r\n\t\t\tapplication: {\r\n\t\t\t\tpercent: this.applicationFee ? (this.applicationFee.PercentageAmount || 0) : 0,\r\n\t\t\t\tfixed: this.applicationFee ? (this.applicationFee.FixedAmount || 0) : 0\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tlet feeAmt = this.roundCurrency(subtotal + fees.processing.fixed + fees.application.fixed);\r\n\t\tfeeAmt = this.roundCurrency(feeAmt / (1 - (fees.processing.percent + fees.application.percent))) - subtotal;\r\n\t\tconst totalWithFees = subtotal + feeAmt;\r\n\r\n\t\tconst processorFee = this.roundCurrency(totalWithFees * fees.processing.percent + fees.processing.fixed);\r\n\t\tconst applicationFee = this.applicationFee ? this.roundCurrency(totalWithFees * fees.application.percent + fees.application.fixed) : 0;\r\n\r\n\t\tfee.Amount = applicationFee + processorFee;\r\n\r\n\t\tthis.processorFee = fee.Amount;\r\n\r\n\t\t// Calculate the amount for each processing fee, the display value, and set the description\r\n\t\treturn fee;\r\n\t}\r\n\r\n\tgetMaximumFee() {\r\n\t\tconst subtotal = this.roundCurrency(this.subtotal + this.additionalFees);\r\n\r\n\t\tlet maxFee = null;\r\n\t\tlet maxFeeAmount = 0;\r\n\r\n\t\tthis.processingFees.forEach(fee => {\r\n\t\t\tconst feeAmount = fee.FixedAmount + fee.PercentageAmount * subtotal;\r\n\r\n\t\t\tif (feeAmount > maxFeeAmount) {\r\n\t\t\t\tmaxFee = fee;\r\n\t\t\t\tmaxFeeAmount = feeAmount;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn maxFee;\r\n\t}\r\n\r\n\tgetCardFee(cardData: CardInformation): TransactionFee {\r\n\t\tif (!this.processingFees)\r\n\t\t\treturn null;\r\n\r\n\t\tconst isAmex = cardData.Brand === 'amex';\r\n\t\tconst isEuropean = this.europeanCountries.indexOf(cardData.Country) >= 0;\r\n\t\tconst isInternational = this.domesticCountryCode !== cardData.Country;\r\n\r\n\t\tconst fees = this.processingFees.filter((fee) => {\r\n\t\t\tif (!fee.Modes)\r\n\t\t\t\tfee.Modes = this.getFlags(fee.Mode, this.processorFeeModes);\r\n\r\n\t\t\tif (fee.Modes.indexOf('Any') >= 0)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tif (isAmex && fee.Modes.indexOf('AMEX') >= 0)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tif (!isAmex && fee.Modes.indexOf('NonAMEX') >= 0)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tif (isEuropean && fee.Modes.indexOf('EuropeanCards') >= 0)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tif (!isEuropean && fee.Modes.indexOf('NonEuropeanCards') >= 0)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tif (isInternational && fee.Modes.indexOf('International') >= 0)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tif (!isInternational && fee.Modes.indexOf('Domestic') >= 0)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\treturn false;\r\n\t\t});\r\n\r\n\t\tif (fees.length === 1)\r\n\t\t\treturn fees[0];\r\n\r\n\t\t// These fees take priority over other fees. For example, if the card is AMEX and Domestic, there will be two fees. However,\r\n\t\t// the AMEX fee is higher priority than the Domestic fee\r\n\t\tconst priorityFees = fees.filter((fee) => { return fee.Modes.indexOf('AMEX') >= 0 || fee.Modes.indexOf('International') >= 0 || fee.Modes.indexOf('EuropeanCards') >= 0;});\r\n\r\n\t\treturn priorityFees.length >= 1 ? priorityFees[0] : fees[0];\r\n\t}\r\n\r\n\tgetFlags(value: number, options: { [key: string]: number }): string[] {\r\n\t\tconst flags = [];\r\n\t\tif (value === 0)\r\n\t\t\treturn flags;\r\n\r\n\t\t// Keys from smallest value to largest value\r\n\t\tconst keys = Object.keys(options).sort((k1, k2) => { return options[k1] > options[k2] ? 1 : -1; });\r\n\r\n\t\tfor (let i = keys.length - 1; i >= 0; i--) {\r\n\t\t\tconst key = keys[i];\r\n\t\t\tconst val = options[key];\r\n\t\t\tif (value >= val) {\r\n\t\t\t\tflags.push(key);\r\n\t\t\t\tvalue -= val;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn flags;\r\n\t}\r\n\r\n\troundCurrency(num: number): number {\r\n\t\treturn roundToPrecision(num, this.$culture.numberFormat.CurrencyDecimalDigits);\r\n\t}\r\n\r\n\tsum(lst: any[], property: string): number {\r\n\t\tif (lst.length === 0)\r\n\t\t\treturn 0;\r\n\r\n\t\treturn lst.length === 1 ? lst[0][property] : lst.map((f) => { return f[property];}).reduce((f1, f2) => { return f1 + f2;}, 0);\r\n\t}\r\n}\r\n\r\nexport function rebuildOrder(entry: EntityOfType, order: EntityOfType, rebuildOrderOptions?: RebuildOrderOptions) {\r\n\tif (!order || order.AmountPaid) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tconst Fee = (entry.meta.type.model.$namespace as any).Payment.Fee as EntityConstructorForType;\r\n\tconst LineItem = (entry.meta.type.model.$namespace as any).Payment.LineItem as EntityConstructorForType;\r\n\r\n\tconst orderBuilder = new OrderBuilder(entry, rebuildOrderOptions?.requirePayment);\r\n\r\n\torder.LineItems.splice(\r\n\t\t0,\r\n\t\torder.LineItems.length,\r\n\t\t...orderBuilder.lineItems.map(d => new LineItem(d))\r\n\t);\r\n\r\n\torder.Fees.splice(0, order.Fees.length, ...orderBuilder.fees.map(d => new Fee(d)));\r\n\r\n\tconst billingFields = orderBuilder.billingFields;\r\n\torder.update('BillingName', billingFields.Name);\r\n\torder.update('EmailAddress', billingFields.Email);\r\n\torder.update('BillingAddress', billingFields.Address);\r\n\torder.update('PhoneNumber', billingFields.Phone);\r\n\r\n\torder.Rebuild_Count += 1;\r\n\r\n\treturn true;\r\n}\r\n","/**\r\n * Rounds the given number to a particular number of digits\r\n * NOTE: Ported from 'Cognito.Forms.roundToEven'\r\n * @param num The number to rund\r\n * @param digits The number of digits to round to\r\n */\r\nexport function roundToPrecision(num: number, digits: number) : number {\r\n\tdigits = digits || 0;\r\n\tconst multiplier = Math.pow(10, digits);\r\n\tconst nFixed = + (digits ? num * multiplier : num).toFixed(8);\r\n\tconst nInt = Math.floor(nFixed);\r\n\tconst nDecimals = nFixed - nInt;\r\n\tconst e = 1e-8;\r\n\tconst remainder = (nDecimals > 0.5 - e && nDecimals < 0.5 + e) ? ((nInt % 2 === 0) ? nInt : nInt + 1) : Math.round(nFixed);\r\n\r\n\treturn digits ? remainder / multiplier : remainder;\r\n}\r\n","import type { Entity, Property, Type, EntityOfType, TypeOfType, EntityConstructor } from '@cognitoforms/model.js';\r\nimport { Property$pendingInit } from '@cognitoforms/model.js';\r\nimport type { FormEntry } from '@cognitoforms/types/server-types/forms/model/form-entry';\r\nimport type { FormEntryIndex } from '@cognitoforms/types/server-types/forms/model/form-entry-index';\r\nimport { Deferred } from 'src/util/deferred';\r\nimport { visitEntity } from 'src/util/model';\r\nimport EntrySet from 'src/web-api/entry-views/entry-set';\r\nimport type EntryViewService from 'src/web-api/entry-views/entry-view-service';\r\nimport { getEntryId } from 'src/web-api/entry-views/entry-view-util';\r\nimport Vue from 'vue';\r\nimport Component from 'vue-class-component';\r\nimport { Prop } from 'vue-property-decorator';\r\nimport type { FormsModel } from '../../../forms-model';\r\nimport { isIncluded, isDefaulted } from './lookup-model-extension';\r\n\r\nconst FILTER_RECURSION_LIMIT = 12;\r\n\r\nexport type LookupIndexInfo = {\r\n\tviewId: string;\r\n\tindexTypeName: string;\r\n\tsummaryFormat: string;\r\n\tdescriptionFormat: string;\r\n\tfilterPaths: string[];\r\n\tdefaultPaths: string[];\r\n};\r\n\r\nexport type LookupEntryIndex = FormEntryIndex & {\r\n\tDefault?: boolean;\r\n}\r\n\r\nexport type LookupEntryIndexMethods = {\r\n\tIsIncluded(container: Entity): boolean;\r\n\tIsDefaulted(container: Entity): boolean;\r\n}\r\n\r\n/**\r\n * It is currently possible for two lookup fields to have different index types,\r\n * but share a lookup view. This results in trying to construct an index with an\r\n * already-pooled id. The long term fix is to ensure these fields use the same type,\r\n * but for compatibility reasons it is currently simpler to handle this edge case\r\n * by obtaining the pooled instance via the baseType.\r\n */\r\nfunction getPooledIndex(type: Type, id: string): EntityOfType | null {\r\n\twhile (type) {\r\n\t\tconst instance = type.get(id);\r\n\t\tif (instance)\r\n\t\t\treturn instance as EntityOfType;\r\n\t\ttype = type.baseType;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\nexport function findLookupManagers(entity: Entity) {\r\n\tconst managers: LookupManager[] = [];\r\n\tvisitEntity(entity, (e, p) => {\r\n\t\tconst lookupManager = e[p.name + '_LookupManager'];\r\n\t\tif (lookupManager)\r\n\t\t\tmanagers.push(lookupManager);\r\n\t}, { followCircularProperties: false, followLookups: true });\r\n\treturn managers;\r\n}\r\n\r\nexport function getIndex(model: FormsModel, indexType: Type, state: FormEntryIndex): EntityOfType & LookupEntryIndexMethods {\r\n\tif (state.Id) {\r\n\t\tconst pooledIndex = getPooledIndex(indexType, state.Id);\r\n\t\tif (pooledIndex)\r\n\t\t\treturn pooledIndex as EntityOfType & LookupEntryIndexMethods;\r\n\t}\r\n\r\n\tif (state.AdditionalValues) {\r\n\t\tfor (const av of state.AdditionalValues) {\r\n\t\t\tlet val: any = av.Value;\r\n\t\t\tconst prop = indexType.getProperty(av.FieldId);\r\n\r\n\t\t\tif (prop) {\r\n\t\t\t\tif (prop.isList && typeof val === 'string')\r\n\t\t\t\t\tval = JSON.parse(val);\r\n\t\t\t\telse if (prop.propertyType === Boolean)\r\n\t\t\t\t\tval = val === 'True';\r\n\t\t\t\telse if (prop.propertyType === Number)\r\n\t\t\t\t\tval = Number(val);\r\n\t\t\t}\r\n\r\n\t\t\tstate[av.FieldId] = val;\r\n\t\t}\r\n\t}\r\n\r\n\treturn model.construct(indexType.fullName, state) as EntityOfType & LookupEntryIndexMethods;\r\n}\r\n\r\n@Component\r\nexport default class LookupManager extends Vue {\r\n\t@Prop()\r\n\tviewId: string;\r\n\r\n\t@Prop()\r\n\tindexType: Type;\r\n\r\n\t@Prop()\r\n\tsummaryFormat: string;\r\n\r\n\t@Prop()\r\n\tdescriptionFormat: string;\r\n\r\n\t@Prop()\r\n\tcontainer: Entity;\r\n\r\n\t@Prop()\r\n\tlookupProperty: Property;\r\n\r\n\t@Prop()\r\n\tentryViewService: EntryViewService;\r\n\r\n\tentrySet: EntrySet;\r\n\tindexes: (EntityOfType & LookupEntryIndexMethods)[] = [];\r\n\tinitializing = false;\r\n\tisValid = true;\r\n\t// Indexes that are no longer part of the entry set, but represent the current value for the lookup field\r\n\tsyntheticIndexes = new Set>();\r\n\tfilteredIndexes: (EntityOfType & LookupEntryIndexMethods)[] = [];\r\n\tdefaultIndexes: (EntityOfType & LookupEntryIndexMethods)[] = [];\r\n\tprivate readyTask: Deferred;\r\n\r\n\tasync created() {\r\n\t\tif (this.entryViewService.isValidView(this.viewId))\r\n\t\t\tthis.initialize();\r\n\t\telse\r\n\t\t\tthis.isValid = false;\r\n\t}\r\n\r\n\tasync initialize() {\r\n\t\tthis.initializing = true;\r\n\t\tthis.readyTask = new Deferred();\r\n\t\tthis.entrySet = await EntrySet.get(this.entryViewService, this.entryType.fullName, this.viewId);\r\n\t\tawait this.entrySet.refresh();\r\n\r\n\t\tconst indexes = this.entrySet.listIndex().map(o => getIndex(this.entryViewService.model, this.indexType, o));\r\n\r\n\t\tif (!this.container.meta.isNew) {\r\n\t\t\tconst missing = ((this.lookupProperty.isList ? this.listValue : [this.value])).filter(e => e && !this.entrySet.getIndexItem(e.Id));\r\n\r\n\t\t\tfor (const entry of missing) {\r\n\t\t\t\tconst syntheticIndex = getIndex(this.entryViewService.model, this.indexType, {\r\n\t\t\t\t\tId: `${this.entrySet.view}|fake|${entry.Id}`,\r\n\t\t\t\t\tSummary: entry.toString(this.summaryFormat),\r\n\t\t\t\t\tDescription: this.descriptionFormat ? '- ' + entry.toString(this.descriptionFormat) : ''\r\n\t\t\t\t} as any);\r\n\r\n\t\t\t\tthis.syntheticIndexes.add(syntheticIndex);\r\n\t\t\t\tindexes.unshift(syntheticIndex);\r\n\t\t\t}\r\n\t\t\tthis.$emit('synthetic-indexes-changed', this.syntheticIndexes);\r\n\t\t}\r\n\r\n\t\tthis.indexes = indexes;\r\n\r\n\t\t// allow computed/watchers to run before setting loading to false\r\n\t\tawait this.$nextTick();\r\n\t\tawait this.container.initialized;\r\n\r\n\t\tthis.updateFilteredIndexes();\r\n\r\n\t\tthis.initializing = false;\r\n\r\n\t\tthis.readyTask.resolve();\r\n\t}\r\n\r\n\twhenReady(callback: () => void): void {\r\n\t\tif (this.initializing)\r\n\t\t\tthis.ready.then(callback);\r\n\t\telse\r\n\t\t\tcallback();\r\n\t}\r\n\r\n\tget allowUnknownEntry() {\r\n\t\treturn !this.container.meta.isNew;\r\n\t}\r\n\r\n\tget entryType() {\r\n\t\treturn (this.lookupProperty.propertyType as EntityConstructor).meta as TypeOfType;\r\n\t}\r\n\r\n\tget ready() {\r\n\t\treturn this.readyTask.promise;\r\n\t}\r\n\r\n\tget isList() {\r\n\t\treturn this.lookupProperty.isList;\r\n\t}\r\n\r\n\tget value() {\r\n\t\treturn this.lookupProperty.value(this.container) as EntityOfType;\r\n\t}\r\n\r\n\tget listValue() {\r\n\t\treturn this.lookupProperty.value(this.container) as EntityOfType[];\r\n\t}\r\n\r\n\tget hasValue() {\r\n\t\treturn this.isList ? this.listValue.length > 0 : !!this.value;\r\n\t}\r\n\r\n\tprivate isUpdatingFilter = false;\r\n\tprivate recursionDepth = 0;\r\n\r\n\tupdateFilteredIndexes(fromRule: boolean = false) {\r\n\t\t// prevent recursion due to defaulting triggering filter evaluation\r\n\t\tif (this.isUpdatingFilter) {\r\n\t\t\tthis.recursionDepth++;\r\n\t\t\tif (this.recursionDepth > FILTER_RECURSION_LIMIT)\r\n\t\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this.indexes)\r\n\t\t\tthis.filteredIndexes = [];\r\n\t\telse\r\n\t\t\tthis.filteredIndexes = this.indexes.filter(o => {\r\n\t\t\t\treturn isIncluded(this.container, this.lookupProperty, o);\r\n\t\t\t});\r\n\r\n\t\tif (fromRule)\r\n\t\t\tthis.clearInvalidValues();\r\n\r\n\t\tthis.isUpdatingFilter = true;\r\n\t\ttry {\r\n\t\t\tthis.updateDefaultIndexes(fromRule);\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.isUpdatingFilter = false;\r\n\t\t\t\tthis.recursionDepth = 0;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * When the filtered options no longer include the currently selected value, clear the value.\r\n\t */\r\n\tclearInvalidValues() {\r\n\t\tconst filteredIndexes = this.filteredIndexes;\r\n\t\tif (this.isList) {\r\n\t\t\tif (this.listValue && this.listValue.some(entry => !filteredIndexes.some(o => getEntryId(o) === entry.Id)))\r\n\t\t\t\tthis.setLookupValue(this.listValue.filter(entry => filteredIndexes.some(o => getEntryId(o) === entry.Id)));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (this.value && !filteredIndexes.some(o => getEntryId(o) === this.value.Id))\r\n\t\t\t\tthis.setLookupValue(null);\r\n\t\t}\r\n\t}\r\n\r\n\tupdateDefaultIndexes(fromRule: boolean = false) {\r\n\t\tconst oldDefaultIndexes = this.defaultIndexes;\r\n\r\n\t\tif (!this.indexes)\r\n\t\t\tthis.defaultIndexes = [];\r\n\t\telse\r\n\t\t\tthis.defaultIndexes = this.filteredIndexes.filter(o => {\r\n\t\t\t\treturn isDefaulted(this.container, this.lookupProperty, o);\r\n\t\t\t});\r\n\r\n\t\tif (fromRule)\r\n\t\t\tthis.setDefaultValue(oldDefaultIndexes.length !== 0);\r\n\t}\r\n\r\n\t// used to represent the most current \"id\" of the invocation of the function defaultChanged\r\n\tprivate lastSetDefaultValueId = 0;\r\n\r\n\t/**\r\n\t * Sets a default value (or values) for the lookup using the given default indexes.\r\n\t */\r\n\tasync setDefaultValue(previouslyHadDefaultIndexes: boolean) {\r\n\t\tthis.lastSetDefaultValueId++;\r\n\t\tconst setDefaultValueId = this.lastSetDefaultValueId;\r\n\r\n\t\tconst defaultIndexes = this.defaultIndexes;\r\n\t\tif (defaultIndexes.length) {\r\n\t\t\tif (this.isList) {\r\n\t\t\t\tconst entries = await Promise.all(defaultIndexes.map(o => getEntryId(o)).map(id => this.getEntryById(id)));\r\n\t\t\t\tif (setDefaultValueId === this.lastSetDefaultValueId)\r\n\t\t\t\t\tthis.setLookupValue(entries);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tconst entry = await this.getEntryById(getEntryId(defaultIndexes[0]));\r\n\t\t\t\tif (setDefaultValueId === this.lastSetDefaultValueId)\r\n\t\t\t\t\tthis.setLookupValue(entry);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Only clear out selected values due to no default indexes if there previously were default indexes.\r\n\t\telse if (previouslyHadDefaultIndexes) {\r\n\t\t\tthis.setLookupValue(this.isList ? [] : null);\r\n\t\t}\r\n\t}\r\n\r\n\tgetEntryById(id: string, ignoreFilter: boolean = false): Promise> {\r\n\t\treturn this.entrySet.getEntry(ignoreFilter ? this.indexes.find(o => getEntryId(o) === id) : this.filteredIndexes.find(o => getEntryId(o) === id));\r\n\t}\r\n\r\n\tsetLookupValue(value: EntityOfType | EntityOfType[]) {\r\n\t\tconst isInited = this.lookupProperty.isInited(this.container) && !Property$pendingInit(this.container, this.lookupProperty);\r\n\t\tthis.lookupProperty.value(this.container, value, {\r\n\t\t\tisInited\r\n\t\t});\r\n\t}\r\n}\r\n\r\nexport type LookupManagerOptions = {\r\n\tlookupInfo: LookupIndexInfo,\r\n\tindexType: Type;\r\n\tlookupProperty: Property;\r\n\tcontainer: Entity;\r\n\tentryViewService: EntryViewService;\r\n};\r\n\r\nexport type LookupManagerFactory = (options: LookupManagerOptions) => LookupManager;\r\n\r\nexport function getLookupManager({ lookupInfo, indexType, lookupProperty, container, entryViewService }: LookupManagerOptions) {\r\n\treturn new LookupManager({\r\n\t\tpropsData: {\r\n\t\t\tentryViewService,\r\n\t\t\tviewId: lookupInfo.viewId,\r\n\t\t\tindexType,\r\n\t\t\tcontainer,\r\n\t\t\tlookupProperty,\r\n\t\t\tsummaryFormat: lookupInfo.summaryFormat,\r\n\t\t\tdescriptionFormat: lookupInfo.descriptionFormat\r\n\t\t}\r\n\t});\r\n}","import type { EntityOfType, Format, ObservableArray, Property } from '@cognitoforms/model.js';\r\nimport { updateArray } from '@cognitoforms/model.js';\r\nimport Vue from 'vue';\r\nimport Component from 'vue-class-component';\r\nimport { Prop, Watch } from 'vue-property-decorator';\r\nimport type { LookupEntryIndex } from './lookup-manager';\r\nimport type LookupManager from './lookup-manager';\r\n\r\nexport type CascadeFilterInfo = {\r\n\tlookupPropertyName: string;\r\n\tindexTypeName: string;\r\n\tindexPropertyName: string;\r\n\tpriorFilters: { filterField: string, indexProperty: string }[];\r\n}\r\n\r\n@Component\r\nexport default class CascadeFilterManager extends Vue {\r\n\t@Prop()\r\n\tlookupManager: LookupManager;\r\n\r\n\t@Prop()\r\n\tcascadeProperty: Property;\r\n\r\n\t@Prop()\r\n\tindexProperty: Property;\r\n\r\n\t@Prop()\r\n\tpriorFilters: { filterField: string, indexProperty: string }[];\r\n\r\n\tcreated() {\r\n\t\tthis.lookupManager.$once('synthetic-indexes-changed', () => {\r\n\t\t\t// ensure synthetic index properties are initialized based on the initial value of the cascade property\r\n\t\t\tfor (const index of this.lookupManager.syntheticIndexes) {\r\n\t\t\t\tconst valueFromFilterField = this.isList ? this.listValue[0] : this.value;\r\n\t\t\t\tif (this.indexProperty.isList)\r\n\t\t\t\t\tthis.indexProperty.value(index).push(valueFromFilterField);\r\n\t\t\t\telse\r\n\t\t\t\t\tthis.indexProperty.value(index, valueFromFilterField);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tget ready() {\r\n\t\treturn this.lookupManager.ready;\r\n\t}\r\n\r\n\tget value() {\r\n\t\treturn this.cascadeProperty.value(this.container) as any;\r\n\t}\r\n\r\n\tget listValue() {\r\n\t\treturn this.cascadeProperty.value(this.container) as any[];\r\n\t}\r\n\r\n\tget isList() {\r\n\t\treturn Array.isArray(this.value);\r\n\t}\r\n\r\n\tget container() {\r\n\t\treturn this.lookupManager.container;\r\n\t}\r\n\r\n\tget indexes() {\r\n\t\treturn this.lookupManager.indexes;\r\n\t}\r\n\r\n\tget format() {\r\n\t\treturn this.cascadeProperty.format;\r\n\t}\r\n\r\n\tget filteredIndexes(): EntityOfType[] {\r\n\t\tconst prerequisites = Object.fromEntries(this.priorFilters.map(prior => {\r\n\t\t\tconst prop = this.container.meta.type.getProperty(prior.filterField);\r\n\t\t\tconst requiredFunc = typeof prop.required === 'function'\r\n\t\t\t\t? prop.required\r\n\t\t\t\t: typeof prop.required === 'object'\r\n\t\t\t\t\t? prop.required.function\r\n\t\t\t\t\t: null;\r\n\t\t\treturn [\r\n\t\t\t\tprior.filterField,\r\n\t\t\t\tprop.required === true || (requiredFunc && requiredFunc.bind(this.container)())\r\n\t\t\t];\r\n\t\t}));\r\n\r\n\t\tif (this.indexProperty === null)\r\n\t\t\treturn [];\r\n\t\telse\r\n\t\t\treturn this.indexes\r\n\t\t\t\t.filter(idx => this.stringify(this.indexProperty.value(idx)) !== '')\r\n\t\t\t\t.filter(idx => this.priorFilters.every(prior => {\r\n\t\t\t\t\tconst priorFormat = this.container.meta.type.getProperty(prior.filterField).format || null;\r\n\t\t\t\t\tconst priorValue = this.container[prior.filterField];\r\n\t\t\t\t\tconst indexValueFormatted = this.stringify(idx[prior.indexProperty], priorFormat);\r\n\t\t\t\t\tconst indexValue = idx[prior.indexProperty];\r\n\r\n\t\t\t\t\tif (Array.isArray(indexValue) && Array.isArray(priorValue))\r\n\t\t\t\t\t\treturn (!prerequisites[prior.filterField] && !priorValue.length) || priorValue.some(v => indexValue.includes(this.stringify(v, priorFormat)));\r\n\t\t\t\t\telse if (Array.isArray(indexValue))\r\n\t\t\t\t\t\treturn (!prerequisites[prior.filterField] && priorValue === null) || indexValue.some(v => priorValue === this.stringify(v, priorFormat));\r\n\t\t\t\t\telse if (Array.isArray(priorValue))\r\n\t\t\t\t\t\treturn (!prerequisites[prior.filterField] && !priorValue.length) || priorValue.some(v => indexValueFormatted === this.stringify(v, priorFormat));\r\n\r\n\t\t\t\t\treturn (!prerequisites[prior.filterField] && priorValue === null) || indexValueFormatted === this.stringify(priorValue, priorFormat);\r\n\t\t\t\t}));\r\n\t}\r\n\r\n\t/**\r\n\t * When the filtered options no longer include the currently selected value, clear the value.\r\n\t * @param indexes The new set of filtered options.\r\n\t */\r\n\t@Watch('filteredIndexes')\r\n\tfilteredIndexesChanged(indexes: EntityOfType[]) {\r\n\t\tconst allowedStrings = indexes.flatMap(this.extract).map(val => this.stringify(val));\r\n\t\tconst isAllowed = (val: any) => allowedStrings.includes(this.stringify(val));\r\n\r\n\t\tif (this.isList)\r\n\t\t\tthis.setFieldValue(this.listValue.filter(isAllowed));\r\n\t\telse if (!isAllowed(this.value))\r\n\t\t\tthis.setFieldValue(null);\r\n\t}\r\n\r\n\tsetFieldValue(value: any | any[]) {\r\n\t\tif (this.isList) {\r\n\t\t\tconst list = (this.listValue as ObservableArray);\r\n\t\t\tlist.batchUpdate(() => updateArray(list, value as any[]));\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.cascadeProperty.value(this.container, value);\r\n\t}\r\n\r\n\tparse(value: string) {\r\n\t\treturn this.format ? this.format.convertFromString(value) : value;\r\n\t}\r\n\r\n\tstringify(value: any, format: Format = this.format) {\r\n\t\tif (value === null)\r\n\t\t\treturn '';\r\n\t\treturn format ? format.convertToString(value) : '' + value;\r\n\t}\r\n\r\n\textract(index: EntityOfType) {\r\n\t\treturn this.indexProperty.value(index);\r\n\t}\r\n}\r\n\r\nexport type CascadeFilterManagerOptions = {\r\n\tlookupManager: LookupManager;\r\n\tcascadeProperty: Property;\r\n\tindexProperty: Property;\r\n\tpriorFilters: { filterField: string, indexProperty: string }[];\r\n};\r\n\r\nexport type CascadeFilterManagerFactory = (options: CascadeFilterManagerOptions) => CascadeFilterManager;\r\n\r\nexport function getCascadeFilterManager({ lookupManager, cascadeProperty, indexProperty, priorFilters }: CascadeFilterManagerOptions) {\r\n\treturn new CascadeFilterManager({\r\n\t\tpropsData: {\r\n\t\t\tlookupManager,\r\n\t\t\tcascadeProperty,\r\n\t\t\tindexProperty,\r\n\t\t\tpriorFilters\r\n\t\t}\r\n\t});\r\n}","import type { WorkflowAction } from '@cognitoforms/types/server-types/forms/model/workflow-action';\r\nimport type { Order } from '@cognitoforms/types/server-types/payment/model/order';\r\nimport type { TransactionFee } from '@cognitoforms/types/server-types/payment/model/transaction-fee';\r\nimport type { WorkflowActionExtensions } from './workflow-action-extensions';\r\nimport type { FormEntryStatus } from '@cognitoforms/types/server-types/forms/model/form-entry-status';\r\nimport type { FormEntry } from '@cognitoforms/types/server-types/forms/model/form-entry';\r\nimport type { EntityOfType } from '@cognitoforms/model.js';\r\nimport type { OrderExtensions } from 'src/framework/model/extensions/payment-extensions';\r\n\r\nexport interface FormEntryExtensions {\r\n\tPage_Index: { [key: string]: number };\r\n}\r\n\r\ntype FormEntryOrderProperty = {\r\n\tOrder: TOrder\r\n};\r\n\r\nexport type FormEntryWithOrder = FormEntry & FormEntryOrderProperty & FormEntryOrderPsuedoProperties;\r\n\r\nexport interface FormEntryPsuedoProperties {\r\n\tForm_Available: boolean;\r\n}\r\n\r\nexport interface FormEntryRuleMethods {\r\n\tinitDefaultAction(): void;\r\n}\r\n\r\nexport type FormEntryWithOptionalOrder = FormEntry & Partial & FormEntryOrderPsuedoProperties>;\r\n\r\nexport function isEntryWithOrder(entry: EntityOfType): entry is EntityOfType {\r\n\treturn !!entry.Order;\r\n}\r\n\r\nexport interface FormEntryWorkflowExtensions {\r\n\tForm_ReadOnly: boolean;\r\n\tWorkflow_Actions: (WorkflowAction & WorkflowActionExtensions)[];\r\n\tAction_IsLocked: boolean;\r\n\tAttempted_Action: string;\r\n\tAllowed_Actions: (WorkflowAction & WorkflowActionExtensions)[];\r\n\tEntry_Statuses: FormEntryStatus[];\r\n\tNext_Status: string;\r\n\tAllow_Workflow_Links: boolean;\r\n\tAllow_Workflow_Links_Role_Dependent: boolean;\r\n}\r\n\r\nexport interface FormEntryOrderPsuedoProperties {\r\n\tSave_Customer_Card: boolean;\r\n\tSave_Card_Agreement: boolean;\r\n\tRequire_Payment: boolean;\r\n\tRequire_Payment_Expression: boolean;\r\n\tBilling_Address_Field: string;\r\n\tBilling_Email_Field: string;\r\n\tBilling_Name_Field: string;\r\n\tBilling_Phone_Field: string;\r\n\tTransaction_Fees: TransactionFee[];\r\n\tProcessing_Fees: TransactionFee[];\r\n\tDomestic_Country_Code: string;\r\n\tApplication_Fee: TransactionFee;\r\n\tPayment_Processor_Name: string;\r\n\tLine_Item_Metadata: LineItemMetaData[];\r\n\tProcessing_Fee_Description: string;\r\n\tEuropean_Countries: string[];\r\n\tProcessor_Fee_Modes: { [key: string]: number };\r\n}\r\n\r\nexport type LineItemMetaData = {\r\n\tid: number[];\r\n\tpath: string;\r\n\tquantitySelected: string;\r\n\tallowNegatives: boolean;\r\n\tdescriptionProperty: string;\r\n\tnameProperty: string;\r\n\tamountProperty: string;\r\n\ttype: string;\r\n\tisWithinTable: boolean;\r\n\tlookup?: LookupLineItemMetaData;\r\n}\r\n\r\ntype LookupLineItemMetaData = {\r\n\tpricePath: string;\r\n\tlabelFormat: string;\r\n}\r\n","exports = module.exports = require(\"../../../../node_modules/.pnpm/css-loader@3.2.0_webpack@4.46.0/node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"html .cog-cognito.el-message,:root:root:root:root:root .cog-cognito.el-message{display:flex;position:fixed;left:50%;top:20px;align-items:center;justify-content:space-between;width:95%;min-width:280px;max-width:500px;border-width:var(--input__border-width);border-style:solid;border-color:#fff;border-radius:var(--border-radius);box-shadow:1px 1px 1px 0 rgba(0,0,0,.1),1px 1px 6px 0 rgba(0,0,0,.15);box-sizing:border-box;overflow:hidden;padding-right:calc(var(--gutter)/2);padding-left:calc(var(--gutter)/2);transform:translateX(-50%);transition:opacity calc(var(--speed)/4),transform calc(var(--speed)/2)}html .cog-cognito.el-message--info,:root:root:root:root:root .cog-cognito.el-message--info{background-image:linear-gradient(to top, hsla(var(--background-hsl), 0.12), hsla(var(--background-hsl), 0.12) 100%),linear-gradient(to top, var(--form__background-color), var(--form__background-color) 100%),linear-gradient(to top, white, white 100%)}html .cog-cognito.el-message--success,:root:root:root:root:root .cog-cognito.el-message--success{background-color:var(--success, #e7f9d2);color:var(--success-reverse, #314d00)}html .cog-cognito.el-message--warning,:root:root:root:root:root .cog-cognito.el-message--warning{background-color:var(--warning, yellow);color:var(--warning-reverse, black)}html .cog-cognito.el-message--error,:root:root:root:root:root .cog-cognito.el-message--error{background-color:var(--negative);border-color:var(--negative-reverse);color:var(--negative-reverse)}html .cog-cognito.el-message-fade-enter,html .cog-cognito.el-message-fade-leave-to,:root:root:root:root:root .cog-cognito.el-message-fade-enter,:root:root:root:root:root .cog-cognito.el-message-fade-leave-to{opacity:0;transform:translate(-50%, -100%)}html .cog-cognito .el-message__icon,:root:root:root:root:root .cog-cognito .el-message__icon{display:none}html .cog-cognito .el-message__closeBtn,:root:root:root:root:root .cog-cognito .el-message__closeBtn{flex-shrink:0;margin-right:-0.8em;padding:.8em;cursor:pointer}html .cog-cognito .el-message__content,:root:root:root:root:root .cog-cognito .el-message__content{margin:1em 0}\", \"\"]);\n","import { AdminFormHandle } from './admin-form-handle';\r\nimport type Vue from 'vue';\r\nimport type { FormOwner } from '../public/form-handle';\r\nimport ConcurrentEntryService from 'src/web-api/concurrent-entry-service';\r\nimport type { EntryData } from 'src/web-api/entry-views/entry-view-types';\r\nimport { closeAllToastMessages } from 'src/components/ToastMessage';\r\nimport type { Entity, EntityChangeEventArgs, EntityOfType } from '@cognitoforms/model.js';\r\nimport type { EventHandler } from '@cognitoforms/model.js/@types/events';\r\nimport { FormEvent } from '../eventing/form-event';\r\nimport type { AfterSubmitEvent, AfterSubmitEventData } from '../public/events';\r\nimport { FormEvents } from '../public/events';\r\nimport { EntryStatus } from 'src/components/EntryStatus';\r\nimport { FormStatus } from 'src/mixins/form-status';\r\nimport { ViewType } from '@cognitoforms/types/server-types/forms/model/view-type';\r\nimport type { FormEntryExtensions, FormEntryWithOptionalOrder, FormEntryWorkflowExtensions } from '../model/extensions/form-entry-extensions';\r\n\r\nexport class FormViewFormHandle extends AdminFormHandle {\r\n\tprivate changeHandler: EventHandler;\r\n\tprivate publicRoleUnavailable: boolean;\r\n\tprivate afterSubmitEventData: AfterSubmitEventData;\r\n\tprivate isPublic: boolean;\r\n\tprivate showPageBreaks: boolean;\r\n\tprivate roleName: string;\r\n\r\n\tprivate get formViewComponent(): Vue & { showConfirmationMessage(message: string): void } {\r\n\t\tconst componentEl = document.querySelector('.entries-form-view');\r\n\t\tif (componentEl)\r\n\t\t\treturn (componentEl as unknown as { __vue__: Vue & Record }).__vue__ as any;\r\n\t}\r\n\r\n\tconstructor(formId: string, owner: FormOwner, ready: Promise) {\r\n\t\tsuper(formId, owner, ready);\r\n\r\n\t\tthis.formAvailable.then(() => {\r\n\t\t\tthis.on(FormEvents.AfterSubmit, (event: AfterSubmitEvent) => this.afterSubmit(event));\r\n\t\t\tthis.on(FormEvents.BeforeSubmit, () => this.beforeSubmit());\r\n\t\t\tthis.on(FormEvents.AfterSave, () => this.setNoChanges());\r\n\t\t\tthis.once(FormEvents.Ready, () => this.setNoChanges());\r\n\t\t});\r\n\t}\r\n\r\n\tdestroy() {\r\n\t\tthis.disableChangeDetection();\r\n\t\tsuper.destroy();\r\n\t}\r\n\r\n\tasync isFormAvailable() {\r\n\t\tawait this.formAvailable;\r\n\t\treturn this.form.available;\r\n\t}\r\n\r\n\thasChangeHandler() {\r\n\t\treturn this.changeHandler !== null && this.changeHandler !== undefined;\r\n\t}\r\n\r\n\tasync changeView(viewId: string, token: string): Promise {\r\n\t\tawait this.formAvailable;\r\n\t\tif (!this.form || !this.form.entryViewService) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tawait this.disableChangeDetection();\r\n\r\n\t\tthis.form.entryViewService.registerViewToken(viewId, token);\r\n\t\tif (this.form.entryService instanceof ConcurrentEntryService) {\r\n\t\t\tthis.form.entryService.registerView(viewId, ViewType.Form);\r\n\t\t}\r\n\r\n\t\tthis.setNoChanges();\r\n\t}\r\n\r\n\tprivate beforeSubmit() {\r\n\t\t// The event handler calls setRedirectingToView based on the view potentially being redirected to\r\n\t\tthis.formViewComponent.$emit('before-submit');\r\n\t}\r\n\r\n\tpublic setIsPublic(isPublic: boolean) {\r\n\t\tthis.isPublic = isPublic;\r\n\t}\r\n\r\n\tpublic getIsPublic() {\r\n\t\treturn this.isPublic;\r\n\t}\r\n\r\n\tpublic setRoleName(roleName: string) {\r\n\t\tthis.roleName = roleName;\r\n\t}\r\n\r\n\tpublic getRoleName() {\r\n\t\treturn this.roleName;\r\n\t}\r\n\r\n\tpublic setShowPageBreaks(showPageBreaks: boolean) {\r\n\t\tthis.showPageBreaks = showPageBreaks;\r\n\t}\r\n\r\n\tpublic getShowPageBreaks() {\r\n\t\treturn this.showPageBreaks;\r\n\t}\r\n\r\n\tpublic setRedirectingToView(redirecting: boolean) {\r\n\t\tthis.form.redirectingToEntryView = redirecting;\r\n\t}\r\n\r\n\tprivate async afterSubmit(event: AfterSubmitEvent) {\r\n\t\t// We don't want to show save changes dialog if the entry is submitted\r\n\t\tawait this.disableChangeDetection();\r\n\t\tthis.setNoChanges();\r\n\r\n\t\tthis.afterSubmitEventData = event.data;\r\n\t\tthis.formViewComponent.$emit('form-view-submitted');\r\n\t}\r\n\r\n\tpublic showConfirmationMessage() {\r\n\t\tconst actionName = this.afterSubmitEventData.entry.Entry.Action;\r\n\t\tconst action = this.form.actions.find(a => a.ActionName === actionName);\r\n\t\tconst confirmationMessage = action.Confirmation.Message;\r\n\t\tconst redirectUrl = action.Confirmation.RedirectUrl;\r\n\r\n\t\tconst formEntry = this.form.entry;\r\n\t\tconst convertedMessage = formEntry.toString(confirmationMessage);\r\n\r\n\t\tif (confirmationMessage && !redirectUrl)\r\n\t\t\tthis.formViewComponent.showConfirmationMessage(convertedMessage);\r\n\t}\r\n\r\n\tpublic showConfirmationPage() {\r\n\t\tthis.form.showConfirmationPage(this.afterSubmitEventData.documents);\r\n\t}\r\n\r\n\tprivate setNoChanges() {\r\n\t\tif (this.formViewComponent) {\r\n\t\t\tthis.formViewComponent.$emit('set-no-changes');\r\n\t\t}\r\n\t}\r\n\r\n\tasync addChangesDetected(handler: EventHandler) {\r\n\t\tawait this.disableChangeDetection();\r\n\t\tthis.changeHandler = handler;\r\n\t\tawait this.enableChangeDetection();\r\n\t}\r\n\r\n\tprivate async enableChangeDetection() {\r\n\t\tawait this.formAvailable;\r\n\t\tif (this.changeHandler) {\r\n\t\t\tthis.form.formsModel.model.afterPropertySet.subscribe(this.changeHandler);\r\n\t\t\tthis.form.formsModel.model.listChanged.subscribe(this.changeHandler);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate async disableChangeDetection() {\r\n\t\tawait this.formAvailable;\r\n\r\n\t\t// Clear the list of subscriptions\r\n\t\tthis.form.formsModel.model.afterPropertySet.clear();\r\n\t\tthis.form.formsModel.model.listChanged.clear();\r\n\t\tthis.setNoChanges();\r\n\t}\r\n\r\n\tactivityPerformed() {\r\n\t\tthis.emit(new FormEvent(FormEvents.ActivityPerformed));\r\n\t}\r\n\r\n\tasync setCorrectFormAvailability(isPublic: boolean) {\r\n\t\tawait this.formAvailable;\r\n\t\tif (!isPublic && !this.form.available) {\r\n\t\t\tthis.publicRoleUnavailable = true;\r\n\t\t\tthis.form.available = true;\r\n\t\t}\r\n\t\t// If we were previously in a non-public form view and switch to the\r\n\t\t// public role, respect availability settings\r\n\t\telse if (isPublic && this.form.available && this.publicRoleUnavailable) {\r\n\t\t\tthis.form.available = false;\r\n\t\t}\r\n\t}\r\n\r\n\tasync setNewEntry(roleName: string, isPublic: boolean): Promise {\r\n\t\t// Wait for the form to be available and disable change detection\r\n\t\tawait this.disableChangeDetection();\r\n\t\tconst entryJson = {\r\n\t\t\tEntry: {\r\n\t\t\t\tRole: roleName,\r\n\t\t\t\tUser: this.form.session.userInfo,\r\n\t\t\t\tStatus: 'Incomplete'\r\n\t\t\t}\r\n\t\t} as EntryData;\r\n\r\n\t\tthis.form.entryStatus = EntryStatus.Pending;\r\n\t\tthis.form.startingPage = 1;\r\n\t\tconst entryInstance = await this.form.formsModel.constructEntry(entryJson, true) as EntityOfType;\r\n\r\n\t\tthis.form.entry.Entry.LastPageViewed = null;\r\n\t\tthis.form.entry.Entry.Role = roleName;\r\n\r\n\t\tawait this.setCorrectFormAvailability(isPublic);\r\n\r\n\t\tawait this.reset(entryInstance, entryJson);\r\n\r\n\t\t// Re-enable change detection\r\n\t\tawait this.enableChangeDetection();\r\n\r\n\t\tawait this.form.$nextTick();\r\n\r\n\t\tthis.form.entryStatus = EntryStatus.Ready;\r\n\r\n\t\tthis.activityPerformed();\r\n\t}\r\n\r\n\tprivate reset(entry: EntityOfType, initialEntryJson: Record) {\r\n\t\tif (this.form.quantityService) {\r\n\t\t\tconst hasInitialState = !entry.meta.isNew && entry.Entry.Status !== 'Incomplete';\r\n\t\t\tthis.form.quantityService.reset({ hasInitialState: hasInitialState, root: entry });\r\n\t\t}\r\n\r\n\t\tif (this.form.entryService instanceof ConcurrentEntryService)\r\n\t\t\tthis.form.entryService.updateInitialEntryJson(initialEntryJson);\r\n\r\n\t\t// Set the current action to the first allowed action, if any\r\n\t\tif (this.form.allowedActions.length)\r\n\t\t\tthis.form.entry.Entry.Action = this.form.allowedActions[0].ActionName;\r\n\t\telse\r\n\t\t\tthis.form.entry.Entry.Action = null;\r\n\r\n\t\tcloseAllToastMessages();\r\n\r\n\t\treturn new Promise(resolve => {\r\n\t\t\tthis.form.withTransitionsDisabled(async (form) => {\r\n\t\t\t\tform.log.registerEntry(entry);\r\n\t\t\t\tform.showConfirmation = false;\r\n\t\t\t\tform.showReceipt = false;\r\n\t\t\t\tform.submitStatus = FormStatus.Default;\r\n\t\t\t\tform.pageNumber = this.form.startingPage;\r\n\t\t\t\tform.readonly = form.$source.readonly = form.entry.Form_ReadOnly;\r\n\t\t\t\tif (form.quantityService)\r\n\t\t\t\t\tawait form.quantityService.refresh();\r\n\t\t\t\tform.entry = entry;\r\n\t\t\t\tawait this.emit(new FormEvent(FormEvents.ResetEntry));\r\n\t\t\t\tresolve(entry);\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.addClass = addClass;\nexports.getStyle = exports.getScrollContainer = void 0;\nexports.hasClass = hasClass;\nexports.once = exports.on = exports.off = exports.isScroll = exports.isInContainer = void 0;\nexports.removeClass = removeClass;\nexports.setStyle = setStyle;\nvar _vue = _interopRequireDefault(require(\"vue\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n/* istanbul ignore next */\n\nconst isServer = _vue.default.prototype.$isServer;\nconst SPECIAL_CHARS_REGEXP = /([\\:\\-\\_]+(.))/g;\nconst MOZ_HACK_REGEXP = /^moz([A-Z])/;\nconst ieVersion = isServer ? 0 : Number(document.documentMode);\n\n/* istanbul ignore next */\nconst trim = function (string) {\n return (string || '').replace(/^[\\s\\uFEFF]+|[\\s\\uFEFF]+$/g, '');\n};\n/* istanbul ignore next */\nconst camelCase = function (name) {\n return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {\n return offset ? letter.toUpperCase() : letter;\n }).replace(MOZ_HACK_REGEXP, 'Moz$1');\n};\n\n/* istanbul ignore next */\nconst on = exports.on = function () {\n if (!isServer && document.addEventListener) {\n return function (element, event, handler) {\n if (element && event && handler) {\n element.addEventListener(event, handler, false);\n }\n };\n } else {\n return function (element, event, handler) {\n if (element && event && handler) {\n element.attachEvent('on' + event, handler);\n }\n };\n }\n}();\n\n/* istanbul ignore next */\nconst off = exports.off = function () {\n if (!isServer && document.removeEventListener) {\n return function (element, event, handler) {\n if (element && event) {\n element.removeEventListener(event, handler, false);\n }\n };\n } else {\n return function (element, event, handler) {\n if (element && event) {\n element.detachEvent('on' + event, handler);\n }\n };\n }\n}();\n\n/* istanbul ignore next */\nconst once = function (el, event, fn) {\n var listener = function () {\n if (fn) {\n fn.apply(this, arguments);\n }\n off(el, event, listener);\n };\n on(el, event, listener);\n};\n\n/* istanbul ignore next */\nexports.once = once;\nfunction hasClass(el, cls) {\n if (!el || !cls) return false;\n if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');\n if (el.classList) {\n return el.classList.contains(cls);\n } else {\n return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;\n }\n}\n;\n\n/* istanbul ignore next */\nfunction addClass(el, cls) {\n if (!el) return;\n var curClass = el.className;\n var classes = (cls || '').split(' ');\n for (var i = 0, j = classes.length; i < j; i++) {\n var clsName = classes[i];\n if (!clsName) continue;\n if (el.classList) {\n el.classList.add(clsName);\n } else if (!hasClass(el, clsName)) {\n curClass += ' ' + clsName;\n }\n }\n if (!el.classList) {\n el.className = curClass;\n }\n}\n;\n\n/* istanbul ignore next */\nfunction removeClass(el, cls) {\n if (!el || !cls) return;\n var classes = cls.split(' ');\n var curClass = ' ' + el.className + ' ';\n for (var i = 0, j = classes.length; i < j; i++) {\n var clsName = classes[i];\n if (!clsName) continue;\n if (el.classList) {\n el.classList.remove(clsName);\n } else if (hasClass(el, clsName)) {\n curClass = curClass.replace(' ' + clsName + ' ', ' ');\n }\n }\n if (!el.classList) {\n el.className = trim(curClass);\n }\n}\n;\n\n/* istanbul ignore next */\nconst getStyle = exports.getStyle = ieVersion < 9 ? function (element, styleName) {\n if (isServer) return;\n if (!element || !styleName) return null;\n styleName = camelCase(styleName);\n if (styleName === 'float') {\n styleName = 'styleFloat';\n }\n try {\n switch (styleName) {\n case 'opacity':\n try {\n return element.filters.item('alpha').opacity / 100;\n } catch (e) {\n return 1.0;\n }\n default:\n return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;\n }\n } catch (e) {\n return element.style[styleName];\n }\n} : function (element, styleName) {\n if (isServer) return;\n if (!element || !styleName) return null;\n styleName = camelCase(styleName);\n if (styleName === 'float') {\n styleName = 'cssFloat';\n }\n try {\n var computed = document.defaultView.getComputedStyle(element, '');\n return element.style[styleName] || computed ? computed[styleName] : null;\n } catch (e) {\n return element.style[styleName];\n }\n};\n\n/* istanbul ignore next */\nfunction setStyle(element, styleName, value) {\n if (!element || !styleName) return;\n if (typeof styleName === 'object') {\n for (var prop in styleName) {\n if (styleName.hasOwnProperty(prop)) {\n setStyle(element, prop, styleName[prop]);\n }\n }\n } else {\n styleName = camelCase(styleName);\n if (styleName === 'opacity' && ieVersion < 9) {\n element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';\n } else {\n element.style[styleName] = value;\n }\n }\n}\n;\nconst isScroll = (el, vertical) => {\n if (isServer) return;\n const determinedDirection = vertical !== null || vertical !== undefined;\n const overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');\n return overflow.match(/(scroll|auto)/);\n};\nexports.isScroll = isScroll;\nconst getScrollContainer = (el, vertical) => {\n if (isServer) return;\n let parent = el;\n while (parent) {\n if ([window, document, document.documentElement].includes(parent)) {\n return window;\n }\n if (isScroll(parent, vertical)) {\n return parent;\n }\n parent = parent.parentNode;\n }\n return parent;\n};\nexports.getScrollContainer = getScrollContainer;\nconst isInContainer = (el, container) => {\n if (isServer || !el || !container) return false;\n const elRect = el.getBoundingClientRect();\n let containerRect;\n if ([window, document, document.documentElement, null, undefined].includes(container)) {\n containerRect = {\n top: 0,\n right: window.innerWidth,\n bottom: window.innerHeight,\n left: 0\n };\n } else {\n containerRect = container.getBoundingClientRect();\n }\n return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;\n};\nexports.isInContainer = isInContainer;","\n export default {\n functional: true,\n render(_h, _vm) {\n const { _c, _v, data, children = [] } = _vm;\n\n const {\n class: classNames,\n staticClass,\n style,\n staticStyle,\n attrs = {},\n ...rest\n } = data;\n\n return _c(\n 'svg',\n {\n class: [\"cog-icon cog-i-ex\",classNames,staticClass],\n style: [style,staticStyle],\n attrs: Object.assign({\"viewBox\":\"0 0 18 18\",\"focusable\":\"false\",\"class\":\"cog-icon cog-i-ex\"}, attrs),\n ...rest,\n },\n children.concat([_c('defs'),_c('g',[_c('path',{attrs:{\"d\":\"M4.2 4.2l9.6 9.6M13.8 4.2l-9.6 9.6\"}})])])\n )\n }\n }\n ","import Vue from 'vue';\r\nimport { CError } from './error';\r\nimport type { EntityOfType } from '@cognitoforms/model.js';\r\nimport type FormBase from 'src/components/FormBase';\r\nimport type { FormSession } from 'src/web-api/form-session';\r\nimport type { FormEntry } from '@cognitoforms/types/server-types/forms/model/form-entry';\r\nimport type AppInsights from './app-insights';\r\n\r\nconst ignoredExceptions = new Set([\r\n\t'ResizeObserver loop limit exceeded',\r\n\t'ResizeObserver loop completed with undelivered notifications.',\r\n\t'Script error.'\r\n]);\r\n\r\nconst FAUX_KEY = 'faux-key';\r\n\r\nexport interface ILogger {\r\n\terror(error: CError | Error, additionalProperties?: Record) : void;\r\n\twarn(message: string, trace?: string, additionalProperties?: Record): void;\r\n\tcustomEvent(eventName: string, additionalProperties?: Record): void;\r\n\tmetric(metricName: string, amount: number, additionalProperties?: Record): void;\r\n\ttrace(message: string, additionalProperties?: Record): void;\r\n}\r\n\r\nexport default class Log implements ILogger {\r\n\tconstructor(session: FormSession) {\r\n\t\tthis.session = session;\r\n\t\tif (!this.isEnabled)\r\n\t\t\treturn;\r\n\r\n\t\tif (!Log.appInsights) {\r\n\t\t\tLog.appInsights = import(/* webpackChunkName: \"app-insights\" */ './app-insights').then(mod => {\r\n\t\t\t\tconst AppInsightsCtor = mod.default;\r\n\t\t\t\tconst appInsights = new AppInsightsCtor(FAUX_KEY, '/svc/log');\r\n\r\n\t\t\t\tappInsights.addTelemetryInitializer(Log.ignoreUselessErrors.bind(this));\r\n\r\n\t\t\t\tappInsights.addTelemetryInitializer(function ignoreItemsWithRealKey(item) {\r\n\t\t\t\t\t// when the admin site's global app insights instance is available, sometimes we\r\n\t\t\t\t\t// get telemetry items with the real instrumentation key\r\n\t\t\t\t\treturn item.iKey === FAUX_KEY;\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// append metadata to telemetry\r\n\t\t\t\tappInsights.addTelemetryInitializer(item => {\r\n\t\t\t\t\tif (item.baseData) {\r\n\t\t\t\t\t\titem.baseData.properties = item.baseData.properties || {};\r\n\t\t\t\t\t\tObject.assign(item.baseData.properties, this.metadata);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// This logic is repeated in CleanseTelemetryProcessor.cs and ai.js (and ai.min.js)\r\n\t\t\t\tappInsights.addTelemetryInitializer(function cleanseUrls(item) {\r\n\t\t\t\t\tif (item.baseType === 'PageviewData') {\r\n\t\t\t\t\t\titem.baseData.uri = Log.cleanseUrl(item.baseData.uri);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (item.baseType === 'RemoteDependencyData') {\r\n\t\t\t\t\t\titem.baseData.name = Log.cleanseUrl(item.baseData.name);\r\n\t\t\t\t\t\titem.baseData.target = Log.cleanseUrl(item.baseData.target);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tappInsights.addTelemetryInitializer(function filterSuccessful(item) {\r\n\t\t\t\t\tif (item.baseType === 'RemoteDependencyData') {\r\n\t\t\t\t\t\tconst data = item.baseData;\r\n\t\t\t\t\t\tif (data) {\r\n\t\t\t\t\t\t\tif (data.responseCode.toString().startsWith('2') && data.duration < 10000)\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t// ignore GA requests (likely caused by blocker extensions)\r\n\t\t\t\t\t\t\telse if (data.name.includes('google-analytics.com/g/collect') || data.name.includes('analytics.google.com/g/collect'))\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t});\r\n\t\t\t\treturn appInsights;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// eslint-disable-line no-use-before-define\r\n\t\tVue.config.errorHandler = Log.onError;\r\n\t\tVue.config.warnHandler = Log.onWarning;\r\n\t}\r\n\r\n\t// -------------- Properties --------------\r\n\tprivate entry: EntityOfType;\r\n\tprivate session: FormSession;\r\n\tprivate static appInsights: Promise;\r\n\r\n\t// -------------- Computed --------------\r\n\tget isEnabled(): boolean {\r\n\t\treturn this.session.flags.log;\r\n\t}\r\n\r\n\tget organizationId(): string {\r\n\t\treturn this.session.organizationId;\r\n\t}\r\n\r\n\tget formName(): string {\r\n\t\treturn this.entry && this.entry.Form ? this.entry.Form.InternalName : null;\r\n\t}\r\n\r\n\tget formId(): string {\r\n\t\treturn this.session.formId;\r\n\t}\r\n\r\n\tget entryId(): string {\r\n\t\treturn this.entry ? this.entry.Id : null;\r\n\t}\r\n\r\n\t// -------------- Methods --------------\r\n\r\n\terror(error: CError | Error, additionalProperties?: Record) : void {\r\n\t\tconst cError = error as CError;\r\n\t\tif (additionalProperties) {\r\n\t\t\tcError.additionalProperties = {\r\n\t\t\t\t...cError.additionalProperties,\r\n\t\t\t\t...additionalProperties\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tLog.error(error as CError, this);\r\n\t}\r\n\r\n\twarn(message: string, trace?: string, additionalProperties?: Record): void {\r\n\t\tLog.warn(message, this, trace, additionalProperties);\r\n\t}\r\n\r\n\tasync pageLoad() {\r\n\t\tif (!this.isEnabled)\r\n\t\t\treturn;\r\n\r\n\t\t(await Log.appInsights).pageView();\r\n\t}\r\n\r\n\tregisterEntry(entry: EntityOfType) {\r\n\t\tthis.entry = entry;\r\n\t}\r\n\r\n\tcustomEvent(eventName: string, additionalProperties?: Record) {\r\n\t\tLog.customEvent(eventName, this, additionalProperties);\r\n\t}\r\n\r\n\tmetric(metricName: string, amount: number, additionalProperties?: Record) {\r\n\t\tLog.metric(metricName, amount, this, additionalProperties);\r\n\t}\r\n\r\n\ttrace(message: string, additionalProperties?: Record) {\r\n\t\tLog.trace(message, this, additionalProperties);\r\n\t}\r\n\r\n\tasync startTrackEvent(name: string) {\r\n\t\t(await Log.appInsights)?.startTrackEvent(name);\r\n\t}\r\n\r\n\tasync stopTrackEvent(name: string, properties?: { [key: string]: string }, measurements?: { [key: string]: number }) {\r\n\t\t(await Log.appInsights)?.stopTrackEvent(name, properties, measurements);\r\n\t}\r\n\r\n\tprivate static async error(error: CError, log: Log) {\r\n\t\tconsole.error(error.message, error);\r\n\r\n\t\t// Some errors are only for the end-user. A more detailed error was probably already logged\r\n\t\tif (!log || !log.isEnabled || error.log === false)\r\n\t\t\treturn;\r\n\r\n\t\t(await Log.appInsights).log(error, error.additionalProperties);\r\n\r\n\t\t// Prevent the error from being logged again by additional throws or subsequent calls to `logError`\r\n\t\terror.log = false;\r\n\t}\r\n\r\n\tprivate static async warn(message: string, log: Log, trace?: string, additionalProperties?: Record) {\r\n\t\tif (!log || !log.isEnabled)\r\n\t\t\treturn;\r\n\r\n\t\tconst error = new CError(message);\r\n\t\terror.stack = trace;\r\n\r\n\t\t(await Log.appInsights).log(error, { isWarning: 'true', ...additionalProperties });\r\n\r\n\t\tconsole.warn(error);\r\n\t}\r\n\r\n\tprivate static async customEvent(eventName: string, log: Log, additionalProperties: Record) {\r\n\t\tif (!log || !log.isEnabled)\r\n\t\t\treturn;\r\n\r\n\t\t(await Log.appInsights).logCustomEvent(eventName, additionalProperties);\r\n\t}\r\n\r\n\tprivate static async metric(metricName: string, amount: number, log: Log, additionalProperties: Record) {\r\n\t\tif (!log || !log.isEnabled)\r\n\t\t\treturn;\r\n\r\n\t\t(await Log.appInsights).logMetric(metricName, amount, additionalProperties);\r\n\t}\r\n\r\n\tprivate static async trace(message: string, log: Log, additionalProperties: Record) {\r\n\t\tif (!log || !log.isEnabled)\r\n\t\t\treturn;\r\n\r\n\t\t(await Log.appInsights).logTrace(message, additionalProperties);\r\n\t}\r\n\r\n\tprivate get metadata() {\r\n\t\treturn {\r\n\t\t\t'OrganizationId': this.organizationId,\r\n\t\t\t'FormName': this.formName,\r\n\t\t\t'FormId': this.formId,\r\n\t\t\t'EntryId': this.entryId,\r\n\t\t\t'FormClient': true\r\n\t\t};\r\n\t}\r\n\r\n\tprivate static patterns = [\r\n\t\t/(\\?|&)token(=[^&]*)?|^token(=[^&]*)?&?/ig, // Remove session tokens\r\n\t\t/[=#:](.{44})[*!]/ig, // Remove save & resume tokens\r\n\t\t/F-[!$0-9a-zA-Z]{22}/ig // Remove file ID references\r\n\t];\r\n\r\n\tprivate static blankOut = '*****';\r\n\r\n\tpublic static cleanseUrl(url: string) {\r\n\t\tif (!url.toLowerCase().includes('http') || url === '') {\r\n\t\t\treturn url;\r\n\t\t}\r\n\r\n\t\t// Replace all sensitive information before reporting to AI\r\n\t\tfor (let i = 0; i < this.patterns.length; i++) {\r\n\t\t\turl = url.replaceAll(this.patterns[i], this.blankOut);\r\n\t\t}\r\n\r\n\t\treturn url;\r\n\t}\r\n\r\n\tpublic static ignoreUselessErrors(item: any): boolean {\r\n\t\tif (item.baseType === 'ExceptionData' && ignoredExceptions.has(item.data.message)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static getInstance(obj: Vue | FormBase): Log {\r\n\t\treturn obj ? (obj.$root as FormBase).log as Log : null;\r\n\t}\r\n\r\n\tprivate static onError(error: Error, $vm: Vue): void {\r\n\t\tif (ignoredExceptions.has(error.message))\r\n\t\t\treturn;\r\n\r\n\t\tLog.error(error, Log.getInstance($vm));\r\n\t}\r\n\r\n\tprivate static onWarning(message: string, $vm: Vue, trace: string): void {\r\n\t\tLog.warn(message, Log.getInstance($vm), trace);\r\n\t}\r\n}","module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/dist/\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 76);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return normalizeComponent; });\n/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nfunction normalizeComponent(\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */,\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options =\n typeof scriptExports === 'function' ? scriptExports.options : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) {\n // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection(h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n\n\n/***/ }),\n\n/***/ 16:\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"./utils/popup\");\n\n/***/ }),\n\n/***/ 24:\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"./utils/vdom\");\n\n/***/ }),\n\n/***/ 6:\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"vue\");\n\n/***/ }),\n\n/***/ 76:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXTERNAL MODULE: external \"vue\"\nvar external_vue_ = __webpack_require__(6);\nvar external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);\n\n// CONCATENATED MODULE: C:/a/3/s/Cognito.Web.Client/node_modules/.pnpm/vue-loader@15.11.1_css-loader@5.2.7_prettier@1.18.2_vue-template-compiler@2.7.15_webpack@4.46.0/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!C:/a/3/s/Cognito.Web.Client/node_modules/.pnpm/vue-loader@15.11.1_css-loader@5.2.7_prettier@1.18.2_vue-template-compiler@2.7.15_webpack@4.46.0/node_modules/vue-loader/lib??vue-loader-options!./packages/message/src/main.vue?vue&type=template&id=50aa567c\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c\n return _c(\n \"transition\",\n {\n attrs: { name: \"el-message-fade\" },\n on: { \"after-leave\": _vm.handleAfterLeave }\n },\n [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.visible,\n expression: \"visible\"\n }\n ],\n class: [\n \"el-message\",\n _vm.type && !_vm.iconClass ? `el-message--${_vm.type}` : \"\",\n _vm.center ? \"is-center\" : \"\",\n _vm.showClose ? \"is-closable\" : \"\",\n _vm.customClass\n ],\n style: _vm.positionStyle,\n attrs: { role: \"alert\" },\n on: { mouseenter: _vm.clearTimer, mouseleave: _vm.startTimer }\n },\n [\n _vm.iconClass\n ? _c(\"i\", { class: _vm.iconClass })\n : _c(\"i\", { class: _vm.typeClass }),\n _vm._t(\"default\", function() {\n return [\n !_vm.dangerouslyUseHTMLString\n ? _c(\"p\", { staticClass: \"el-message__content\" }, [\n _vm._v(_vm._s(_vm.message))\n ])\n : _c(\"p\", {\n staticClass: \"el-message__content\",\n domProps: { innerHTML: _vm._s(_vm.message) }\n })\n ]\n }),\n _vm.showClose\n ? _c(\"i\", {\n staticClass: \"el-message__closeBtn el-icon-close\",\n on: { click: _vm.close }\n })\n : _vm._e()\n ],\n 2\n )\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n// CONCATENATED MODULE: ./packages/message/src/main.vue?vue&type=template&id=50aa567c\n\n// CONCATENATED MODULE: C:/a/3/s/Cognito.Web.Client/node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.25.2_webpack@4.46.0/node_modules/babel-loader/lib!C:/a/3/s/Cognito.Web.Client/node_modules/.pnpm/vue-loader@15.11.1_css-loader@5.2.7_prettier@1.18.2_vue-template-compiler@2.7.15_webpack@4.46.0/node_modules/vue-loader/lib??vue-loader-options!./packages/message/src/main.vue?vue&type=script&lang=js\nconst typeMap = {\n success: 'success',\n info: 'info',\n warning: 'warning',\n error: 'error'\n};\n/* harmony default export */ var mainvue_type_script_lang_js = ({\n data() {\n return {\n visible: false,\n message: '',\n duration: 3000,\n type: 'info',\n iconClass: '',\n customClass: '',\n onClose: null,\n showClose: false,\n closed: false,\n verticalOffset: 20,\n timer: null,\n dangerouslyUseHTMLString: false,\n center: false\n };\n },\n computed: {\n typeClass() {\n return this.type && !this.iconClass ? `el-message__icon el-icon-${typeMap[this.type]}` : '';\n },\n positionStyle() {\n return {\n 'top': `${this.verticalOffset}px`\n };\n }\n },\n watch: {\n closed(newVal) {\n if (newVal) {\n this.visible = false;\n }\n }\n },\n methods: {\n handleAfterLeave() {\n this.$destroy(true);\n this.$el.parentNode.removeChild(this.$el);\n },\n close() {\n this.closed = true;\n if (typeof this.onClose === 'function') {\n this.onClose(this);\n }\n },\n clearTimer() {\n clearTimeout(this.timer);\n },\n startTimer() {\n if (this.duration > 0) {\n this.timer = setTimeout(() => {\n if (!this.closed) {\n this.close();\n }\n }, this.duration);\n }\n },\n keydown(e) {\n if (e.keyCode === 27) {\n // esc关闭消息\n if (!this.closed) {\n this.close();\n }\n }\n }\n },\n mounted() {\n this.startTimer();\n document.addEventListener('keydown', this.keydown);\n },\n beforeDestroy() {\n document.removeEventListener('keydown', this.keydown);\n }\n});\n// CONCATENATED MODULE: ./packages/message/src/main.vue?vue&type=script&lang=js\n /* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js); \n// EXTERNAL MODULE: C:/a/3/s/Cognito.Web.Client/node_modules/.pnpm/vue-loader@15.11.1_css-loader@5.2.7_prettier@1.18.2_vue-template-compiler@2.7.15_webpack@4.46.0/node_modules/vue-loader/lib/runtime/componentNormalizer.js\nvar componentNormalizer = __webpack_require__(0);\n\n// CONCATENATED MODULE: ./packages/message/src/main.vue\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(componentNormalizer[\"a\" /* default */])(\n src_mainvue_type_script_lang_js,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* harmony default export */ var main = (component.exports);\n// EXTERNAL MODULE: external \"./utils/popup\"\nvar popup_ = __webpack_require__(16);\n\n// EXTERNAL MODULE: external \"./utils/vdom\"\nvar vdom_ = __webpack_require__(24);\n\n// CONCATENATED MODULE: ./packages/message/src/main.js\n\n\n\n\nlet MessageConstructor = external_vue_default.a.extend(main);\nlet instance;\nlet instances = [];\nlet seed = 1;\nconst Message = function (options) {\n if (external_vue_default.a.prototype.$isServer) return;\n options = options || {};\n if (typeof options === 'string') {\n options = {\n message: options\n };\n }\n let userOnClose = options.onClose;\n let id = 'message_' + seed++;\n options.onClose = function () {\n Message.close(id, userOnClose);\n };\n instance = new MessageConstructor({\n data: options\n });\n instance.id = id;\n if (Object(vdom_[\"isVNode\"])(instance.message)) {\n instance.$slots.default = [instance.message];\n instance.message = null;\n }\n instance.$mount();\n document.body.appendChild(instance.$el);\n let verticalOffset = options.offset || 20;\n instances.forEach(item => {\n verticalOffset += item.$el.offsetHeight + 16;\n });\n instance.verticalOffset = verticalOffset;\n instance.visible = true;\n instance.$el.style.zIndex = popup_[\"PopupManager\"].nextZIndex();\n instances.push(instance);\n return instance;\n};\n['success', 'warning', 'info', 'error'].forEach(type => {\n Message[type] = options => {\n if (typeof options === 'string') {\n options = {\n message: options\n };\n }\n options.type = type;\n return Message(options);\n };\n});\nMessage.close = function (id, userOnClose) {\n let len = instances.length;\n let index = -1;\n let removedHeight;\n for (let i = 0; i < len; i++) {\n if (id === instances[i].id) {\n removedHeight = instances[i].$el.offsetHeight;\n index = i;\n if (typeof userOnClose === 'function') {\n userOnClose(instances[i]);\n }\n instances.splice(i, 1);\n break;\n }\n }\n if (len <= 1 || index === -1 || index > instances.length - 1) return;\n for (let i = index; i < len - 1; i++) {\n let dom = instances[i].$el;\n dom.style['top'] = parseInt(dom.style['top'], 10) - removedHeight - 16 + 'px';\n }\n};\nMessage.closeAll = function () {\n for (let i = instances.length - 1; i >= 0; i--) {\n instances[i].close();\n }\n};\n/* harmony default export */ var src_main = (Message);\n// CONCATENATED MODULE: ./packages/message/index.js\n\n/* harmony default export */ var message = __webpack_exports__[\"default\"] = (src_main);\n\n/***/ })\n\n/******/ });","import { AdminFormHandle } from './admin-form-handle';\r\nimport type { FormOwner } from '../public/form-handle';\r\nimport type { FormEntryExtensions, FormEntryWithOptionalOrder, FormEntryWorkflowExtensions } from 'src/framework/model/extensions/form-entry-extensions';\r\nimport type { EntityOfType, Entity, EntityChangeEventArgs } from '@cognitoforms/model.js';\r\nimport type { ObjectLookup } from '@cognitoforms/model.js/@types/helpers';\r\nimport { isEntryWithOrder } from 'src/framework/model/extensions/form-entry-extensions';\r\nimport { FormEvent } from '../eventing/form-event';\r\nimport { FormEvents } from '../public/events';\r\nimport type { EventHandler } from '@cognitoforms/model.js/@types/events';\r\nimport { closeAllToastMessages } from 'src/components/ToastMessage';\r\nimport { rebuildOrder } from 'src/framework/payment/order-builder';\r\nimport ConcurrentEntryService from 'src/web-api/concurrent-entry-service';\r\nimport EntrySet from 'src/web-api/entry-views/entry-set';\r\nimport type { EntryData, EntryKey } from 'src/web-api/entry-views/entry-view-types';\r\nimport { Deferred } from 'src/util/deferred';\r\nimport { EntryStatus } from 'src/components/EntryStatus';\r\nimport { ViewType } from '@cognitoforms/types/server-types/forms/model/view-type';\r\nimport type { AfterSubmitEvent } from '../public/events';\r\nimport type { WorkflowRoleMeta } from 'src/web-api/form-session';\r\nimport type { EntrySubmissionResult } from 'src/web-api/entry-service';\r\nimport { SubmissionResultStatus } from 'src/web-api/entry-service';\r\n\r\n/**\r\n * Admin API for interacting with a form on the task dashboard\r\n */\r\nexport class TaskDashboardFormHandle extends AdminFormHandle {\r\n\tpublic entrySet: EntrySet;\r\n\tprivate _entrySetAvailable = new Deferred();\r\n\tprivate changeHandler: EventHandler;\r\n\r\n\tconstructor(formId: string, owner: FormOwner, ready: Promise) {\r\n\t\tsuper(formId, owner, ready);\r\n\t\tthis.on(FormEvents.AfterSubmit, (event: AfterSubmitEvent) => this.augmentSubmitEvent(event));\r\n\t}\r\n\r\n\tprivate get entrySetAvailable() {\r\n\t\treturn this._entrySetAvailable.promise;\r\n\t}\r\n\r\n\tget entry(): EntityOfType {\r\n\t\treturn this.form ? this.form.entry : null;\r\n\t}\r\n\r\n\tset entry(value: EntityOfType) {\r\n\t\tthis.form.entry = value;\r\n\t}\r\n\r\n\tasync addChangesDetected(handler: EventHandler) {\r\n\t\tthis.changeHandler = handler;\r\n\t\tawait this.enableChangeDetection();\r\n\t}\r\n\r\n\tprivate async enableChangeDetection() {\r\n\t\tawait this.formAvailable;\r\n\t\tif (this.changeHandler) {\r\n\t\t\tthis.form.formsModel.model.afterPropertySet.subscribe(this.changeHandler);\r\n\t\t\tthis.form.formsModel.model.listChanged.subscribe(this.changeHandler);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate async disableChangeDetection() {\r\n\t\tawait this.formAvailable;\r\n\r\n\t\t// Clear the list of subscriptions\r\n\t\tthis.form.formsModel.model.afterPropertySet.clear();\r\n\t\tthis.form.formsModel.model.listChanged.clear();\r\n\t}\r\n\r\n\tprivate async getEntryJson(entryKey: EntryKey): Promise {\r\n\t\tawait this.formAvailable;\r\n\t\tawait this.entrySetAvailable;\r\n\t\treturn this.entrySet.getEntryJson(entryKey, true);\r\n\t}\r\n\r\n\tasync setExistingEntry(entryKey: EntryKey, roleId: number) : Promise {\r\n\t\tconst entryJson = await this.getEntryJson(entryKey);\r\n\r\n\t\tentryJson.Entry.User = this.form.session.userInfo;\r\n\t\tconst roleName = (this.form.session.workflowRoles as WorkflowRoleMeta[]).find(workflowRole => workflowRole.Id === roleId).Name;\r\n\t\tentryJson.Entry.Role = roleName;\r\n\t\treturn this.setEntry(entryJson);\r\n\t}\r\n\r\n\tprivate async setEntry(entryJson: EntryData) : Promise {\r\n\t\t// Wait for the form to be available and disable change detection\r\n\t\tawait this.disableChangeDetection();\r\n\r\n\t\tthis.form.entryStatus = EntryStatus.Pending;\r\n\r\n\t\tconst entryInstance = await this.form.formsModel.constructEntry(entryJson, true);\r\n\t\tif (!entryInstance.meta.isNew && isEntryWithOrder(entryInstance)) {\r\n\t\t\t// Rebuild existing orders to ensure the order is up-to-date\r\n\t\t\trebuildOrder(entryInstance, entryInstance.Order);\r\n\t\t}\r\n\r\n\t\tawait this.reset(entryInstance, entryJson);\r\n\r\n\t\t// Wait for lookups to load before detecting changes\r\n\t\tawait this.form.entryViewService.loadingComplete;\r\n\r\n\t\t// Re-enable change detection\r\n\t\tawait this.enableChangeDetection();\r\n\r\n\t\tawait this.form.$nextTick();\r\n\r\n\t\tthis.form.entryStatus = EntryStatus.Ready;\r\n\t}\r\n\r\n\tpublic async changeView(viewId: string, token: string, refresh: boolean = true): Promise {\r\n\t\tawait this.formAvailable;\r\n\t\tif (!this.form || !this.form.entryViewService) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.form.entryViewService.registerViewToken(viewId, token);\r\n\r\n\t\tif (this.form.entryService instanceof ConcurrentEntryService)\r\n\t\t\tthis.form.entryService.registerView(viewId, ViewType.Form);\r\n\r\n\t\tthis.entrySet = await EntrySet.get(this.form.entryViewService, this.form.formsModel.entryTypeName, viewId);\r\n\t\tthis._entrySetAvailable.resolve(this.entrySet);\r\n\t\tif (refresh) this.entrySet.refresh();\r\n\t}\r\n\r\n\tprivate reset(entry: EntityOfType, initialEntryJson: ObjectLookup) {\r\n\t\tif (this.form.quantityService) {\r\n\t\t\tconst hasInitialState = !entry.meta.isNew && entry.Entry.Status !== 'Incomplete';\r\n\t\t\tthis.form.quantityService.reset({ hasInitialState: hasInitialState, root: entry });\r\n\t\t}\r\n\r\n\t\tif (this.form.entryService instanceof ConcurrentEntryService)\r\n\t\t\tthis.form.entryService.updateInitialEntryJson(initialEntryJson);\r\n\r\n\t\t// Set the current action to the first allowed action, if any\r\n\t\tif (this.form.allowedActions.length)\r\n\t\t\tthis.form.entry.Entry.Action = this.form.allowedActions[0].ActionName;\r\n\t\telse\r\n\t\t\tthis.form.entry.Entry.Action = null;\r\n\r\n\t\tcloseAllToastMessages();\r\n\r\n\t\treturn new Promise(resolve => {\r\n\t\t\tthis.form.withTransitionsDisabled(async () => {\r\n\t\t\t\tthis.entry = entry;\r\n\t\t\t\tthis.form.log.registerEntry(entry);\r\n\t\t\t\tawait this.emit(new FormEvent(FormEvents.ResetEntry));\r\n\t\t\t\tif (this.form.quantityService)\r\n\t\t\t\t\tawait this.form.quantityService.refresh();\r\n\t\t\t\tresolve(entry);\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tasync performAction(action: string) {\r\n\t\tawait this.formAvailable;\r\n\t\tconst submission = this.form.submit({ action });\r\n\t\tsubmission.then((res: EntrySubmissionResult) => {\r\n\t\t\tif (res && res.status === SubmissionResultStatus.Success)\r\n\t\t\t\tthis.reset(this.entry, res.entry);\r\n\t\t});\r\n\t\treturn submission;\r\n\t}\r\n\r\n\tpublic getLocalizedError(resourceMessage) {\r\n\t\treturn this.form.$resource(resourceMessage);\r\n\t}\r\n\r\n\tprivate augmentSubmitEvent(event: AfterSubmitEvent) {\r\n\t\tconst actionName = event.data.entry.Entry.Action;\r\n\t\tevent.data.convertedMessage = this.getConfirmationMessage(actionName);\r\n\t}\r\n}\r\n","\"use strict\";\n\nexports.__esModule = true;\nexports.generateId = exports.escapeRegexpString = exports.coerceTruthyValueToArray = exports.capitalize = exports.autoprefixer = exports.arrayFindIndex = exports.arrayFind = exports.arrayEquals = void 0;\nexports.getPropByPath = getPropByPath;\nexports.getValueByPath = void 0;\nexports.hasOwn = hasOwn;\nexports.looseEqual = exports.kebabCase = exports.isIOS = exports.isIE = exports.isFirefox = exports.isEqual = exports.isEmpty = exports.isEdge = void 0;\nexports.noop = noop;\nexports.objToArray = objToArray;\nexports.rafThrottle = rafThrottle;\nexports.toObject = toObject;\nexports.valueEquals = void 0;\nvar _vue = _interopRequireDefault(require(\"vue\"));\nvar _types = require(\"../../lib/utils/types\");\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction noop() {}\n;\nfunction hasOwn(obj, key) {\n return hasOwnProperty.call(obj, key);\n}\n;\nfunction extend(to, _from) {\n for (let key in _from) {\n to[key] = _from[key];\n }\n return to;\n}\n;\nfunction toObject(arr) {\n var res = {};\n for (let i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res;\n}\n;\nconst getValueByPath = function (object, prop) {\n prop = prop || '';\n const paths = prop.split('.');\n let current = object;\n let result = null;\n for (let i = 0, j = paths.length; i < j; i++) {\n const path = paths[i];\n if (!current) break;\n if (i === j - 1) {\n result = current[path];\n break;\n }\n current = current[path];\n }\n return result;\n};\nexports.getValueByPath = getValueByPath;\nfunction getPropByPath(obj, path, strict) {\n let tempObj = obj;\n path = path.replace(/\\[(\\w+)\\]/g, '.$1');\n path = path.replace(/^\\./, '');\n let keyArr = path.split('.');\n let i = 0;\n for (let len = keyArr.length; i < len - 1; ++i) {\n if (!tempObj && !strict) break;\n let key = keyArr[i];\n if (key in tempObj) {\n tempObj = tempObj[key];\n } else {\n if (strict) {\n throw new Error('please transfer a valid prop path to form item!');\n }\n break;\n }\n }\n return {\n o: tempObj,\n k: keyArr[i],\n v: tempObj ? tempObj[keyArr[i]] : null\n };\n}\n;\nconst generateId = function () {\n return Math.floor(Math.random() * 10000);\n};\nexports.generateId = generateId;\nconst valueEquals = (a, b) => {\n // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript\n if (a === b) return true;\n if (!(a instanceof Array)) return false;\n if (!(b instanceof Array)) return false;\n if (a.length !== b.length) return false;\n for (let i = 0; i !== a.length; ++i) {\n if (a[i] !== b[i]) return false;\n }\n return true;\n};\nexports.valueEquals = valueEquals;\nconst escapeRegexpString = function (value) {\n if (value === void 0) {\n value = '';\n }\n return String(value).replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n};\n\n// TODO: use native Array.find, Array.findIndex when IE support is dropped\nexports.escapeRegexpString = escapeRegexpString;\nconst arrayFindIndex = function (arr, pred) {\n for (let i = 0; i !== arr.length; ++i) {\n if (pred(arr[i])) {\n return i;\n }\n }\n return -1;\n};\nexports.arrayFindIndex = arrayFindIndex;\nconst arrayFind = function (arr, pred) {\n const idx = arrayFindIndex(arr, pred);\n return idx !== -1 ? arr[idx] : undefined;\n};\n\n// coerce truthy value to array\nexports.arrayFind = arrayFind;\nconst coerceTruthyValueToArray = function (val) {\n if (Array.isArray(val)) {\n return val;\n } else if (val) {\n return [val];\n } else {\n return [];\n }\n};\nexports.coerceTruthyValueToArray = coerceTruthyValueToArray;\nconst isIE = function () {\n return !_vue.default.prototype.$isServer && !isNaN(Number(document.documentMode));\n};\nexports.isIE = isIE;\nconst isEdge = function () {\n return !_vue.default.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;\n};\nexports.isEdge = isEdge;\nconst isFirefox = function () {\n return !_vue.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);\n};\nexports.isFirefox = isFirefox;\nconst isIOS = function () {\n // https://stackoverflow.com/a/58064481/2836695\n return !_vue.default.prototype.$isServer && (/iPad|iPhone|iPod/.test(navigator.platform) || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);\n};\nexports.isIOS = isIOS;\nconst autoprefixer = function (style) {\n if (typeof style !== 'object') return style;\n const rules = ['transform', 'transition', 'animation'];\n const prefixes = ['ms-', 'webkit-'];\n rules.forEach(rule => {\n const value = style[rule];\n if (rule && value) {\n prefixes.forEach(prefix => {\n style[prefix + rule] = value;\n });\n }\n });\n return style;\n};\nexports.autoprefixer = autoprefixer;\nconst kebabCase = function (str) {\n const hyphenateRE = /([^-])([A-Z])/g;\n return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();\n};\nexports.kebabCase = kebabCase;\nconst capitalize = function (str) {\n if (!(0, _types.isString)(str)) return str;\n return str.charAt(0).toUpperCase() + str.slice(1);\n};\nexports.capitalize = capitalize;\nconst looseEqual = function (a, b) {\n const isObjectA = (0, _types.isObject)(a);\n const isObjectB = (0, _types.isObject)(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b);\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b);\n } else {\n return false;\n }\n};\nexports.looseEqual = looseEqual;\nconst arrayEquals = function (arrayA, arrayB) {\n arrayA = arrayA || [];\n arrayB = arrayB || [];\n if (arrayA.length !== arrayB.length) {\n return false;\n }\n for (let i = 0; i < arrayA.length; i++) {\n if (!looseEqual(arrayA[i], arrayB[i])) {\n return false;\n }\n }\n return true;\n};\nexports.arrayEquals = arrayEquals;\nconst isEqual = function (value1, value2) {\n if (Array.isArray(value1) && Array.isArray(value2)) {\n return arrayEquals(value1, value2);\n }\n return looseEqual(value1, value2);\n};\nexports.isEqual = isEqual;\nconst isEmpty = function (val) {\n // null or undefined\n if (val == null) return true;\n if (typeof val === 'boolean') return false;\n if (typeof val === 'number') return !val;\n if (val instanceof Error) return val.message === '';\n switch (Object.prototype.toString.call(val)) {\n // String or Array\n case '[object String]':\n case '[object Array]':\n return !val.length;\n\n // Map or Set or File\n case '[object File]':\n case '[object Map]':\n case '[object Set]':\n {\n return !val.size;\n }\n // Plain Object\n case '[object Object]':\n {\n return !Object.keys(val).length;\n }\n }\n return false;\n};\nexports.isEmpty = isEmpty;\nfunction rafThrottle(fn) {\n let locked = false;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (locked) return;\n locked = true;\n window.requestAnimationFrame(_ => {\n fn.apply(this, args);\n locked = false;\n });\n };\n}\nfunction objToArray(obj) {\n if (Array.isArray(obj)) {\n return obj;\n }\n return isEmpty(obj) ? [] : [obj];\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.isFunction = exports.isDefined = void 0;\nexports.isHtmlElement = isHtmlElement;\nexports.isObject = isObject;\nexports.isString = isString;\nexports.isUndefined = void 0;\nfunction isString(obj) {\n return Object.prototype.toString.call(obj) === '[object String]';\n}\nfunction isObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n}\nfunction isHtmlElement(node) {\n return node && node.nodeType === Node.ELEMENT_NODE;\n}\nconst isFunction = functionToCheck => {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n};\nexports.isFunction = isFunction;\nconst isUndefined = val => {\n return val === void 0;\n};\nexports.isUndefined = isUndefined;\nconst isDefined = val => {\n return val !== undefined && val !== null;\n};\nexports.isDefined = isDefined;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _vue = _interopRequireDefault(require(\"vue\"));\nvar _merge = _interopRequireDefault(require(\"../../../lib/utils/merge\"));\nvar _popupManager = _interopRequireDefault(require(\"../../../lib/utils/popup/popup-manager\"));\nexports.PopupManager = _popupManager.default;\nvar _scrollbarWidth = _interopRequireDefault(require(\"../scrollbar-width\"));\nvar _dom = require(\"../dom\");\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nlet idSeed = 1;\nlet scrollBarWidth;\nvar _default = exports.default = {\n props: {\n visible: {\n type: Boolean,\n default: false\n },\n openDelay: {},\n closeDelay: {},\n zIndex: {},\n modal: {\n type: Boolean,\n default: false\n },\n modalFade: {\n type: Boolean,\n default: true\n },\n modalClass: {},\n modalAppendToBody: {\n type: Boolean,\n default: false\n },\n lockScroll: {\n type: Boolean,\n default: true\n },\n closeOnPressEscape: {\n type: Boolean,\n default: false\n },\n closeOnClickModal: {\n type: Boolean,\n default: false\n }\n },\n beforeMount() {\n this._popupId = 'popup-' + idSeed++;\n _popupManager.default.register(this._popupId, this);\n },\n beforeDestroy() {\n _popupManager.default.deregister(this._popupId);\n _popupManager.default.closeModal(this._popupId);\n this.restoreBodyStyle();\n },\n data() {\n return {\n opened: false,\n bodyPaddingRight: null,\n computedBodyPaddingRight: 0,\n withoutHiddenClass: true,\n rendered: false\n };\n },\n watch: {\n visible(val) {\n if (val) {\n if (this._opening) return;\n if (!this.rendered) {\n this.rendered = true;\n _vue.default.nextTick(() => {\n this.open();\n });\n } else {\n this.open();\n }\n } else {\n this.close();\n }\n }\n },\n methods: {\n open(options) {\n if (!this.rendered) {\n this.rendered = true;\n }\n const props = (0, _merge.default)({}, this.$props || this, options);\n if (this._closeTimer) {\n clearTimeout(this._closeTimer);\n this._closeTimer = null;\n }\n clearTimeout(this._openTimer);\n const openDelay = Number(props.openDelay);\n if (openDelay > 0) {\n this._openTimer = setTimeout(() => {\n this._openTimer = null;\n this.doOpen(props);\n }, openDelay);\n } else {\n this.doOpen(props);\n }\n },\n doOpen(props) {\n if (this.$isServer) return;\n if (this.willOpen && !this.willOpen()) return;\n if (this.opened) return;\n this._opening = true;\n const dom = this.$el;\n const modal = props.modal;\n const zIndex = props.zIndex;\n if (zIndex) {\n _popupManager.default.zIndex = zIndex;\n }\n if (modal) {\n if (this._closing) {\n _popupManager.default.closeModal(this._popupId);\n this._closing = false;\n }\n _popupManager.default.openModal(this._popupId, _popupManager.default.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);\n if (props.lockScroll) {\n this.withoutHiddenClass = !document.body.hasAttribute('data-el-popup-parent--hidden');\n if (this.withoutHiddenClass) {\n this.bodyPaddingRight = document.body.style.paddingRight;\n this.computedBodyPaddingRight = parseInt((0, _dom.getStyle)(document.body, 'paddingRight'), 10);\n }\n scrollBarWidth = (0, _scrollbarWidth.default)();\n let bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;\n let bodyOverflowY = (0, _dom.getStyle)(document.body, 'overflowY');\n if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {\n document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';\n }\n document.body.setAttribute('data-el-popup-parent--hidden', '');\n }\n }\n requestAnimationFrame(() => {\n if (getComputedStyle(dom).position === 'static') {\n dom.style.position = 'absolute';\n }\n dom.style.zIndex = _popupManager.default.nextZIndex();\n this.opened = true;\n this.onOpen && this.onOpen();\n this.doAfterOpen();\n });\n },\n doAfterOpen() {\n this._opening = false;\n },\n close() {\n if (this.willClose && !this.willClose()) return;\n if (this._openTimer !== null) {\n clearTimeout(this._openTimer);\n this._openTimer = null;\n }\n clearTimeout(this._closeTimer);\n const closeDelay = Number(this.closeDelay);\n if (closeDelay > 0) {\n this._closeTimer = setTimeout(() => {\n this._closeTimer = null;\n this.doClose();\n }, closeDelay);\n } else {\n this.doClose();\n }\n },\n doClose() {\n this._closing = true;\n this.onClose && this.onClose();\n if (this.lockScroll) {\n setTimeout(this.restoreBodyStyle, 200);\n }\n this.opened = false;\n this.doAfterClose();\n },\n doAfterClose() {\n _popupManager.default.closeModal(this._popupId);\n this._closing = false;\n },\n restoreBodyStyle() {\n if (this.modal && this.withoutHiddenClass) {\n document.body.style.paddingRight = this.bodyPaddingRight;\n document.body.removeAttribute('data-el-popup-parent--hidden');\n }\n this.withoutHiddenClass = true;\n }\n }\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.default = _default;\nvar _vue = _interopRequireDefault(require(\"vue\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nlet scrollBarWidth;\nfunction _default() {\n if (_vue.default.prototype.$isServer) return 0;\n if (scrollBarWidth !== undefined) return scrollBarWidth;\n const outer = document.createElement('div');\n outer.className = 'el-scrollbar__wrap';\n outer.style.visibility = 'hidden';\n outer.style.width = '100px';\n outer.style.position = 'absolute';\n outer.style.top = '-9999px';\n document.body.appendChild(outer);\n const widthNoScroll = outer.offsetWidth;\n outer.style.overflow = 'scroll';\n const inner = document.createElement('div');\n inner.style.width = '100%';\n outer.appendChild(inner);\n const widthWithScroll = inner.offsetWidth;\n outer.parentNode.removeChild(outer);\n scrollBarWidth = widthNoScroll - widthWithScroll;\n return scrollBarWidth;\n}\n;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = _default;\nfunction _default(target) {\n for (let i = 1, j = arguments.length; i < j; i++) {\n let source = arguments[i] || {};\n for (let prop in source) {\n if (source.hasOwnProperty(prop)) {\n let value = source[prop];\n if (value !== undefined) {\n target[prop] = value;\n }\n }\n }\n }\n return target;\n}\n;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _vue = _interopRequireDefault(require(\"vue\"));\nvar _dom = require(\"../../../lib/utils/dom\");\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nlet hasModal = false;\nlet hasInitZIndex = false;\nlet zIndex;\nconst getModal = function () {\n if (_vue.default.prototype.$isServer) return;\n let modalDom = PopupManager.modalDom;\n if (modalDom) {\n hasModal = true;\n } else {\n hasModal = false;\n modalDom = document.createElement('div');\n PopupManager.modalDom = modalDom;\n modalDom.addEventListener('touchmove', function (event) {\n event.preventDefault();\n event.stopPropagation();\n });\n modalDom.addEventListener('click', function () {\n PopupManager.doOnModalClick && PopupManager.doOnModalClick();\n });\n }\n return modalDom;\n};\nconst instances = {};\nconst PopupManager = {\n modalFade: true,\n getInstance: function (id) {\n return instances[id];\n },\n register: function (id, instance) {\n if (id && instance) {\n instances[id] = instance;\n }\n },\n deregister: function (id) {\n if (id) {\n instances[id] = null;\n delete instances[id];\n }\n },\n nextZIndex: function () {\n return PopupManager.zIndex++;\n },\n modalStack: [],\n doOnModalClick: function () {\n const topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];\n if (!topItem) return;\n const instance = PopupManager.getInstance(topItem.id);\n if (instance && instance.closeOnClickModal) {\n instance.close();\n }\n },\n openModal: function (id, zIndex, dom, modalClass, modalFade) {\n if (_vue.default.prototype.$isServer) return;\n if (!id || zIndex === undefined) return;\n this.modalFade = modalFade;\n const modalStack = this.modalStack;\n for (let i = 0, j = modalStack.length; i < j; i++) {\n const item = modalStack[i];\n if (item.id === id) {\n return;\n }\n }\n const modalDom = getModal();\n (0, _dom.addClass)(modalDom, 'v-modal');\n if (this.modalFade && !hasModal) {\n (0, _dom.addClass)(modalDom, 'v-modal-enter');\n }\n if (modalClass) {\n let classArr = modalClass.trim().split(/\\s+/);\n classArr.forEach(item => (0, _dom.addClass)(modalDom, item));\n }\n setTimeout(() => {\n (0, _dom.removeClass)(modalDom, 'v-modal-enter');\n }, 200);\n if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {\n dom.parentNode.appendChild(modalDom);\n } else {\n document.body.appendChild(modalDom);\n }\n if (zIndex) {\n modalDom.style.zIndex = zIndex;\n }\n modalDom.tabIndex = 0;\n modalDom.style.display = '';\n this.modalStack.push({\n id: id,\n zIndex: zIndex,\n modalClass: modalClass\n });\n },\n closeModal: function (id) {\n const modalStack = this.modalStack;\n const modalDom = getModal();\n if (modalStack.length > 0) {\n const topItem = modalStack[modalStack.length - 1];\n if (topItem.id === id) {\n if (topItem.modalClass) {\n let classArr = topItem.modalClass.trim().split(/\\s+/);\n classArr.forEach(item => (0, _dom.removeClass)(modalDom, item));\n }\n modalStack.pop();\n if (modalStack.length > 0) {\n modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;\n }\n } else {\n for (let i = modalStack.length - 1; i >= 0; i--) {\n if (modalStack[i].id === id) {\n modalStack.splice(i, 1);\n break;\n }\n }\n }\n }\n if (modalStack.length === 0) {\n if (this.modalFade) {\n (0, _dom.addClass)(modalDom, 'v-modal-leave');\n }\n setTimeout(() => {\n if (modalStack.length === 0) {\n if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);\n modalDom.style.display = 'none';\n PopupManager.modalDom = undefined;\n }\n (0, _dom.removeClass)(modalDom, 'v-modal-leave');\n }, 200);\n }\n }\n};\nObject.defineProperty(PopupManager, 'zIndex', {\n configurable: true,\n get() {\n if (!hasInitZIndex) {\n zIndex = zIndex || (_vue.default.prototype.$ELEMENT || {}).zIndex || 2000;\n hasInitZIndex = true;\n }\n return zIndex;\n },\n set(value) {\n zIndex = value;\n }\n});\nconst getTopPopup = function () {\n if (_vue.default.prototype.$isServer) return;\n if (PopupManager.modalStack.length > 0) {\n const topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];\n if (!topPopup) return;\n const instance = PopupManager.getInstance(topPopup.id);\n return instance;\n }\n};\nif (!_vue.default.prototype.$isServer) {\n // handle `esc` key when the popup is shown\n window.addEventListener('keydown', function (event) {\n if (event.keyCode === 27) {\n const topPopup = getTopPopup();\n if (topPopup && topPopup.closeOnPressEscape) {\n topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();\n }\n }\n });\n}\nvar _default = exports.default = PopupManager;","\"use strict\";\n\nexports.__esModule = true;\nexports.isVNode = isVNode;\nvar _util = require(\"../../lib/utils/util\");\nfunction isVNode(node) {\n return node !== null && typeof node === 'object' && (0, _util.hasOwn)(node, 'componentOptions');\n}\n;","var map = {\n\t\"./bg\": [\n\t\t401,\n\t\t37\n\t],\n\t\"./bg.js\": [\n\t\t401,\n\t\t37\n\t],\n\t\"./da\": [\n\t\t402,\n\t\t40\n\t],\n\t\"./da.js\": [\n\t\t402,\n\t\t40\n\t],\n\t\"./de\": [\n\t\t403,\n\t\t41\n\t],\n\t\"./de.js\": [\n\t\t403,\n\t\t41\n\t],\n\t\"./el\": [\n\t\t404,\n\t\t44\n\t],\n\t\"./el.js\": [\n\t\t404,\n\t\t44\n\t],\n\t\"./en\": [\n\t\t405,\n\t\t45\n\t],\n\t\"./en.js\": [\n\t\t405,\n\t\t45\n\t],\n\t\"./es\": [\n\t\t406,\n\t\t47\n\t],\n\t\"./es.js\": [\n\t\t406,\n\t\t47\n\t],\n\t\"./fi\": [\n\t\t407,\n\t\t50\n\t],\n\t\"./fi.js\": [\n\t\t407,\n\t\t50\n\t],\n\t\"./fr\": [\n\t\t408,\n\t\t51\n\t],\n\t\"./fr.js\": [\n\t\t408,\n\t\t51\n\t],\n\t\"./hi\": [\n\t\t409,\n\t\t53\n\t],\n\t\"./hi.js\": [\n\t\t409,\n\t\t53\n\t],\n\t\"./hr\": [\n\t\t410,\n\t\t54\n\t],\n\t\"./hr.js\": [\n\t\t410,\n\t\t54\n\t],\n\t\"./hu\": [\n\t\t411,\n\t\t55\n\t],\n\t\"./hu.js\": [\n\t\t411,\n\t\t55\n\t],\n\t\"./it\": [\n\t\t412,\n\t\t59\n\t],\n\t\"./it.js\": [\n\t\t412,\n\t\t59\n\t],\n\t\"./ja\": [\n\t\t413,\n\t\t60\n\t],\n\t\"./ja.js\": [\n\t\t413,\n\t\t60\n\t],\n\t\"./nb\": [\n\t\t414,\n\t\t69\n\t],\n\t\"./nb.js\": [\n\t\t414,\n\t\t69\n\t],\n\t\"./nl\": [\n\t\t415,\n\t\t71\n\t],\n\t\"./nl.js\": [\n\t\t415,\n\t\t71\n\t],\n\t\"./pl\": [\n\t\t416,\n\t\t72\n\t],\n\t\"./pl.js\": [\n\t\t416,\n\t\t72\n\t],\n\t\"./pt\": [\n\t\t417,\n\t\t73\n\t],\n\t\"./pt.js\": [\n\t\t417,\n\t\t73\n\t],\n\t\"./sv\": [\n\t\t418,\n\t\t80\n\t],\n\t\"./sv.js\": [\n\t\t418,\n\t\t80\n\t],\n\t\"./th\": [\n\t\t419,\n\t\t83\n\t],\n\t\"./th.js\": [\n\t\t419,\n\t\t83\n\t],\n\t\"./tl\": [\n\t\t420,\n\t\t85\n\t],\n\t\"./tl.js\": [\n\t\t420,\n\t\t85\n\t],\n\t\"./tr\": [\n\t\t421,\n\t\t86\n\t],\n\t\"./tr.js\": [\n\t\t421,\n\t\t86\n\t],\n\t\"./zh\": [\n\t\t422,\n\t\t94\n\t],\n\t\"./zh.js\": [\n\t\t422,\n\t\t94\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = 468;\nmodule.exports = webpackAsyncContext;","var map = {\n\t\"./bg.json\": [\n\t\t511,\n\t\t140\n\t],\n\t\"./da.json\": [\n\t\t512,\n\t\t141\n\t],\n\t\"./de.json\": [\n\t\t513,\n\t\t142\n\t],\n\t\"./el.json\": [\n\t\t514,\n\t\t144\n\t],\n\t\"./en.json\": [\n\t\t515,\n\t\t145\n\t],\n\t\"./es.json\": [\n\t\t516,\n\t\t147\n\t],\n\t\"./fi.json\": [\n\t\t517,\n\t\t148\n\t],\n\t\"./fr.json\": [\n\t\t518,\n\t\t149\n\t],\n\t\"./hi.json\": [\n\t\t519,\n\t\t150\n\t],\n\t\"./hr.json\": [\n\t\t520,\n\t\t151\n\t],\n\t\"./hu.json\": [\n\t\t521,\n\t\t152\n\t],\n\t\"./it.json\": [\n\t\t522,\n\t\t156\n\t],\n\t\"./ja.json\": [\n\t\t523,\n\t\t157\n\t],\n\t\"./nb.json\": [\n\t\t524,\n\t\t159\n\t],\n\t\"./nl.json\": [\n\t\t525,\n\t\t160\n\t],\n\t\"./pl.json\": [\n\t\t526,\n\t\t161\n\t],\n\t\"./pt.json\": [\n\t\t527,\n\t\t162\n\t],\n\t\"./sv.json\": [\n\t\t528,\n\t\t166\n\t],\n\t\"./th.json\": [\n\t\t529,\n\t\t167\n\t],\n\t\"./tr.json\": [\n\t\t530,\n\t\t169\n\t],\n\t\"./zh.json\": [\n\t\t531,\n\t\t177\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__.t(id, 3);\n\t});\n}\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = 469;\nmodule.exports = webpackAsyncContext;","import type { EntityOfType } from '@cognitoforms/model.js';\r\nimport type { FormEntryIndex } from '@cognitoforms/types/server-types/forms/model/form-entry-index';\r\nimport type { EntryKey } from './entry-view-types';\r\n\r\nexport function getViewId(index: EntityOfType | FormEntryIndex) {\r\n\treturn index.Id.split('|')[0];\r\n}\r\n\r\nexport function getTimestamp(index: EntityOfType | FormEntryIndex) {\r\n\treturn index.Id.split('|')[1];\r\n}\r\n\r\nexport function getEntryId(index: EntityOfType | FormEntryIndex) {\r\n\treturn index.Id.split('|')[2];\r\n}\r\n\r\nexport function keyFromIndex({ Id, EntryETag, OrderETag, OrderId }: EntityOfType | FormEntryIndex): EntryKey {\r\n\tlet EntryId = Id.split('|')[2];\r\n\tlet Scope = '';\r\n\tconst dot = EntryId.indexOf('.');\r\n\tif (dot > 0) {\r\n\t\tScope = EntryId.substr(dot + 1);\r\n\t\tEntryId = EntryId.substr(0, dot);\r\n\t}\r\n\treturn {\r\n\t\tEntryId,\r\n\t\tScope,\r\n\t\tEntryETag,\r\n\t\tOrderETag,\r\n\t\tOrderId\r\n\t};\r\n}\r\n"],"sourceRoot":""}