@spiffcommerce/core 26.16.0 → 26.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
14
|
- `Fixed` for any bug fixes.
|
|
15
15
|
- `Security` in case of vulnerabilities.
|
|
16
16
|
|
|
17
|
+
## [26.16.1] - 18-03-2025
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- If both the partner and workflow have terms and conditions, the workflow wins.
|
|
22
|
+
|
|
17
23
|
## [26.15.0] - 03-03-2025
|
|
18
24
|
|
|
19
25
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -2239,7 +2239,7 @@
|
|
|
2239
2239
|
}
|
|
2240
2240
|
}
|
|
2241
2241
|
}
|
|
2242
|
-
`,Vl=async(r,t)=>{var n;const e=await b.getShadowGraphqlClient().query({query:ns(((n=t==null?void 0:t.assets)==null?void 0:n.metadata)||!1),errorPolicy:"all",variables:{ids:r}});if(e.error)throw e.error;if(e.errors)throw e.errors.forEach(i=>console.error(i)),new Error("Unable to read workflows. Consult GraphQL errors.");const a=e.data.workflows;if(a===void 0||a.length!==r.length)throw new Error(`Unable to read workflows: ${e.errors??"Length mismatch in response"}`);return a.forEach(i=>{i.steps.forEach(s=>{var o,l,c;delete s.data.__typename,(o=s.option)!=null&&o.id&&((l=s.option.defaultVariant)!=null&&l.asset&&U.cacheAsset(s.option.defaultVariant.asset),s.option.colorProfile&&U.cacheAsset(s.option.colorProfile),(c=s.option.variants)==null||c.forEach(d=>{d.asset&&U.cacheAsset(d.asset),d.thumbnail&&U.cacheAsset(d.thumbnail),d.material&&U.cacheMaterial(d.material)}),Ot.set({id:s.option.id},Promise.resolve(s.option)))}),i.finalizeStepConfig||(i.finalizeStepConfig={}),i.finalizeStepConfig.termsMarkdown=i.partner.termsMarkdown||i.finalizeStepConfig.termsMarkdown}),a},zl=async(r,t)=>{const a=(await t).find(n=>n.id===r);if(!a)throw new Error(`Workflow not found: ${r}`);return a},$a=async(r,t)=>{const e=r.map(o=>Ot.get({id:o,options:t})),a=r.filter((o,l)=>e[l]===void 0);if(a.length===0)return Promise.all(e);const n=Vl(a,t),i=a.map(o=>Ot.set({id:o,options:t},zl(o,n))),s=e.filter(o=>o!==void 0);return await Promise.all(s.concat(i))},Gl=async(r,t)=>(await $a([r],t))[0],ql=r=>r.sort((t,e)=>t.index-e.index).map(t=>({id:Q(),panelId:t.name,name:t.name,index:t.index,createdAt:new Date,updatedAt:new Date,transparentBackground:t.transparentBackground,height:t.height,width:t.width,previewRegion:t.previewRegion,useEditableArea:t.useEditableArea,editableArea:t.editableArea})),Wl=(r,t)=>{const e=r.workflowState,a=e?JSON.parse(e):void 0;return a?Object.values(a.layouts).map(n=>n.layout):ql(t.panels)};class jl{constructor(t){this.activeIntegration=void 0,this.updateTransactionState=async e=>{try{return b.getShadowGraphqlClient().mutate({...e,mutation:Wi})}catch(a){throw console.error(a),new ut("Critical - Unable to synchronize workflow state with server.")}},this.options=t,this.options.applicationKey&&ci(this.options.applicationKey),console.debug("------------------------"),console.debug("Spiff Commerce Core SDK"),console.debug("Version: 26.16.0"),console.debug(`Application Key Provided: ${!!this.options.applicationKey}`),console.debug("------------------------")}configure(t){gt.setHubUrl(t.hubUrl),gt.setServerUrl(t.serverUrl),gt.setServicesApiUrl(t.servicesApiUrl),this.marketplaceThemeInstallId=t.marketplaceThemeInstallId,this.marketplaceThemeInstallConfigurationId=t.marketplaceThemeInstallConfigurationId,t.bearerAuthenticationToken&&Pn(t.bearerAuthenticationToken),this.options.applicationKey&&this.getIntegration()}getAssetManager(){return U}getCurrencyCode(){if(this.currencyCode===void 0)throw new Error("No currency code set.");return this.currencyCode}getFlowService(){if(!di())throw new Error("Application key required to use Flow Service.");return new kr}async getIntegration(){if(this.activeIntegration)return this.activeIntegration;if(!this.options.applicationKey)throw new Error("Cannot get current Integration without specifying an Application Key.");return this.activeIntegration=Qr(this.options.applicationKey),this.activeIntegration}async canUseAddon(t){var e;try{return((e=(await this.getIntegration()).partner.activeAddons)==null?void 0:e.includes(t))??!1}catch(a){return console.error(a),!1}}async authenticateBundleFromLocalStorage(t){var n,i;const e=k.getMap("bundleOwnerIds");if(e!=null&&e.has(t))return Promise.resolve({success:!0,stakeholderType:Kt.Owner});const a=k.getMap("bundlePartnerIds")||new Map;if(a.has(t)){const s=a.get(t),l=(k.getMap("partnerCustomerIds")||new Map).get(s);if(l&&await this.authenticateCustomerId(l)){const d=(i=(n=this.customer)==null?void 0:n.bundleStakeholders)==null?void 0:i.find(A=>{var u;return((u=A.bundle)==null?void 0:u.id)===t});if(d)return Promise.resolve({success:!0,stakeholderType:d.type})}}return Promise.resolve({success:!1})}async authenticateTransactionFromLocalStorage(t){var d,A,u,h,g,m;const e=b.getShadowGraphqlClient(),a=await e.query({query:rs,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:t}});if(!a.data.transactions||a.data.transactions.length===0)throw new Error(`Transaction not found: ${t}`);const n=a.data.transactions[0];if(!((A=(d=n.product)==null?void 0:d.partner)==null?void 0:A.id))throw new Error(`Unable to read transaction: ${t}`);if(n.isOrdered)return Promise.resolve({success:!1,transactionReadOnly:!0});const s=k.getMap("transactionOwnerIds");if(s!=null&&s.has(t))return Promise.resolve({success:!0,stakeholderType:Kt.Owner});const o=k.getMap("transactionCustomerIds");if(o!=null&&o.has(t)){const f=o.get(t);if(f&&await this.authenticateCustomerId(f)){const C=((h=(u=this.customer)==null?void 0:u.bundleStakeholders)==null?void 0:h.find(w=>{var v,S;return(S=(v=w.bundle)==null?void 0:v.transactions)==null?void 0:S.some(B=>B.id===t)}))||((m=(g=this.customer)==null?void 0:g.stakeholders)==null?void 0:m.find(w=>{var v;return((v=w.transaction)==null?void 0:v.id)===t}));if(C)return Promise.resolve({success:!0,stakeholderType:C.type})}}const c=(await e.query({query:is,errorPolicy:"all",variables:{id:n.workflowId}})).data.workflow;if(!c)throw new Error(`Unable to read workflow: ${n.workflowId}`);return Promise.resolve({success:!1,theme:c.overrideTheme,customLogoLink:n.customLogoLink})}clearCustomer(){this.customer=void 0}clearCustomerForTransaction(t){const e=k.getMap("transactionCustomerIds");e!=null&&e.has(t)&&(e.delete(t),k.setMap("transactionCustomerIds",e))}async customerHasBundleTemplates(t){const n=(await b.getShadowGraphqlClient().query({query:rn,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:t}})).data.customer;return n.id?n.hasBundleTemplates??!1:!1}getStakeholderTypeForTransaction(t){var a,n;const e=(n=(a=this.customer)==null?void 0:a.stakeholders)==null?void 0:n.find(i=>{var s;return((s=i.transaction)==null?void 0:s.id)===t});if(e)return e.type}async getOrCreateCustomer(t){var s;this.customer=void 0;const e=b.getShadowGraphqlClient(),n=(await e.query({query:rn,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:t}})).data.customer;if(!n.id){const l=(s=(await e.mutate({mutation:Rl,errorPolicy:"all",fetchPolicy:"no-cache",variables:{details:{emailAddress:t}}})).data)==null?void 0:s.customerCreate;if(!l)throw new Error("Unable to create customer.");return this.storeCustomer(l),this.customer=l,{customer:l,isAuthenticated:!1}}this.storeCustomer(n);const i=await this.authenticateCustomerId(n.id);return{customer:this.customer||n,isAuthenticated:i}}getCustomer(){return this.customer}async authenticateCustomerId(t){var o;const e=b.getShadowGraphqlClient(),a=k.getMap("customerTokens");if(!(a!=null&&a.has(t)))return!1;const n=a.get(t);if(!n)return!1;const s=(o=(await e.mutate({mutation:Ol,errorPolicy:"all",fetchPolicy:"no-cache",variables:{loginToken:n}})).data)==null?void 0:o.customerAuthenticate;return s?(this.storeCustomer(s),Ha(n),this.customer=s,!0):!1}async generateVerificationCode(t){await b.getShadowGraphqlClient().mutate({mutation:Ul,variables:{emailAddress:t}})}async verifyCode(t,e){var i,s;const n=(i=(await b.getShadowGraphqlClient().mutate({mutation:Ll,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:t,verificationCode:e}})).data)==null?void 0:i.customerVerifyCode;if(n!=null&&n.loginToken){if(!((s=n.partner)!=null&&s.id))throw new Error(`Unable to find customer: ${t}`);const o=k.getMap("customerTokens")||new Map;return o.set(n.id,n.loginToken),k.setMap("customerTokens",o),this.storeCustomer(n),Ha(n.loginToken),this.customer={...n,loginToken:void 0},!0}return!1}async getCustomerMetafields(){var e;if(!((e=this.customer)!=null&&e.id))throw new Error("Customer must be logged in before calling this function.");return(await b.getShadowGraphqlClient().query({query:$l,variables:{id:this.customer.id}})).data.metafields}async getNewBundle(t,e,a){var c,d,A,u,h;const i=(A=(await b.getShadowGraphqlClient().mutate({mutation:Mo(((d=(c=a==null?void 0:a.graphql)==null?void 0:c.productCollection)==null?void 0:d.eagerFetchProducts)||!1),variables:{collectionId:t,initialMetadata:e?Object.entries(e).map((g,m)=>({key:g[0],value:g[1]})):void 0,marketplaceThemeInstallId:this.marketplaceThemeInstallId,marketplaceThemeInstallConfigurationId:this.marketplaceThemeInstallConfigurationId},fetchPolicy:"no-cache"})).data)==null?void 0:A.bundleCreate;if(!(i!=null&&i.id))throw new Error("Unable to create bundle");const s=k.getMap("bundlePartnerIds")||new Map;s.set(i.id,i.partner.id),k.setMap("bundlePartnerIds",s);const o=k.getMap("bundleOwnerIds")||new Map;o.set(i.id,i.bundleOwnerId),k.setMap("bundleOwnerIds",o);const l=new He(this,i,void 0,void 0,i.bundleOwnerId,{eagerFetchProducts:(h=(u=a==null?void 0:a.graphql)==null?void 0:u.productCollection)==null?void 0:h.eagerFetchProducts});return await l.getInitializationPromise(),l}async getExistingBundle(t,e,a,n){var f,p,C,w,v,S,B,E,I,P,F;const i=k.getMap("bundleOwnerIds"),s=i==null?void 0:i.get(t),l=((f=Object.entries(localStorage).find(([M,N])=>M.startsWith("CognitoIdentityServiceProvider")&&M.endsWith("idToken")))==null?void 0:f[0])||"",c=localStorage.getItem(l),d={};c&&!Ee(c)&&(d.Authorization=`Bearer ${c}`);const A={bundleOwnerId:s,...d,...(p=n==null?void 0:n.graphql)==null?void 0:p.additionalHeaders},u=await b.getShadowGraphqlClient().query({query:Do(((w=(C=n==null?void 0:n.graphql)==null?void 0:C.productCollection)==null?void 0:w.eagerFetchProducts)||!1),variables:{id:t},fetchPolicy:"no-cache",context:{headers:A}});if(!((v=u.data)!=null&&v.bundles)||((S=u.data)==null?void 0:S.bundles.length)===0||!((B=u.data)!=null&&B.bundles[0]))throw new Error(`Unable to find bundle: ${t}`);const h=(E=u.data)==null?void 0:E.bundles[0],g=k.getMap("bundlePartnerIds")||new Map;g.set(h.id,h.partner.id),k.setMap("bundlePartnerIds",g);const m=new He(this,h,e,a,s,{additionalHeaders:(I=n==null?void 0:n.graphql)==null?void 0:I.additionalHeaders,eagerFetchProducts:(F=(P=n==null?void 0:n.graphql)==null?void 0:P.productCollection)==null?void 0:F.eagerFetchProducts,existingGlobalPropertyState:u.data.globalPropertyState,readonly:n==null?void 0:n.readonly});return await m.getInitializationPromise(),m}async duplicateBundle(t,e,a,n){var f,p,C,w,v,S,B,E;const i=(f=k.getMap("bundleOwnerIds"))==null?void 0:f.get(t),o=((p=Object.entries(localStorage).find(([I,P])=>I.startsWith("CognitoIdentityServiceProvider")&&I.endsWith("idToken")))==null?void 0:p[0])||"",l=localStorage.getItem(o),c={};l&&!Ee(l)&&(c.Authorization=`Bearer ${l}`);const d={bundleOwnerId:i,...c,...(C=n==null?void 0:n.graphql)==null?void 0:C.additionalHeaders},u=(S=(await b.getShadowGraphqlClient().mutate({mutation:To(((v=(w=n==null?void 0:n.graphql)==null?void 0:w.productCollection)==null?void 0:v.eagerFetchProducts)||!1),variables:{id:t,template:e,marketplaceThemeInstallId:this.marketplaceThemeInstallId,marketplaceThemeInstallConfigurationId:this.marketplaceThemeInstallConfigurationId,duplicateTransactions:a},context:{headers:d},fetchPolicy:"no-cache"})).data)==null?void 0:S.bundleDuplicate;if(!(u!=null&&u.id))throw new Error("Unable to duplicate bundle");const h=k.getMap("bundlePartnerIds")||new Map;h.set(u.id,u.partner.id),k.setMap("bundlePartnerIds",h);const g=k.getMap("bundleOwnerIds")||new Map;g.set(u.id,u.bundleOwnerId),k.setMap("bundleOwnerIds",g);const m=new He(this,u,void 0,void 0,u.bundleOwnerId,{eagerFetchProducts:(E=(B=n==null?void 0:n.graphql)==null?void 0:B.productCollection)==null?void 0:E.eagerFetchProducts});return await m.getInitializationPromise(),m}async getBundlesForCustomer(t){var i;if(!((i=this.customer)!=null&&i.id))throw new Error("Customer not authenticated.");const{includeMetadata:e,...a}=t;return(await b.getShadowGraphqlClient().query({query:Wo(e??!1),variables:{...a,id:this.customer.id},fetchPolicy:"no-cache"})).data.customerBundlesFeed}async getBundleStakeholders(){var i;if(!this.customer)throw new Error("Customer not authenticated.");const t=await b.getShadowGraphqlClient().query({query:xo,variables:{id:this.customer.id},fetchPolicy:"no-cache"});if(!((i=t.data)!=null&&i.customers)||t.data.customers.length===0)throw new Error("Unable to find customer.");const a=t.data.customers[0].bundleStakeholders||[],n=k.getMap("bundlePartnerIds")||new Map;return a.forEach(s=>{var o,l;(o=s.bundle)!=null&&o.id&&((l=s.bundle.partner)!=null&&l.id)&&n.set(s.bundle.id,s.bundle.partner.id)}),k.setMap("bundlePartnerIds",n),a}async getWorkflowExperience(t,e){if(!t)throw new Error("getWorkflowExperience has been called without an options object! This is not supported.");const a=await this.getWorkflowExperiences([t],t.graphql),n=a[0];return e&&await n.getWorkflowManager().injectIntoPreviewService(e(n.getWorkflowManager().getWorkflow())),a[0]}async getWorkflowExperiences(t,e){if(t.length===0)throw new ut("No options provided!");const a=b.getShadowGraphqlClient(),n=async S=>{var P,F,M;if(S.length===0)return[];const B=S.map(N=>N.option.transactionId),E=await a.query({query:qi,variables:{ids:B},errorPolicy:"all",fetchPolicy:"no-cache"}),I=E.data.transactions;if(I.length!==S.length){const N=((F=(P=E.errors)==null?void 0:P[0])==null?void 0:F.message)||"Unknown error";throw new ut(`Not all transactions were found: ${N}`)}return!this.activeIntegration&&((M=I[0].integrationProduct)!=null&&M.integration)&&(this.activeIntegration=Promise.resolve(I[0].integrationProduct.integration)),I.map((N,z)=>{var W;return{transaction:N,workflowId:N.workflowId,readOnly:((W=S.find(q=>q.option.transactionId===N.id))==null?void 0:W.option.readOnly)??!1,index:S[z].index}})},i=async S=>{var I,P,F;if(S.length===0)return[];const B=await a.mutate({mutation:Gi,variables:{inputs:S.map(M=>({integrationProductId:M.option.type==="integration"?M.option.integrationProductId:void 0,externalIntegrationId:M.option.type==="external"?M.option.externalIntegrationId:void 0,externalProductId:M.option.type==="external"?M.option.externalProductId:void 0,workflowId:M.option.workflowId,designName:M.option.designName,claim:!0})),marketplaceThemeInstallId:this.marketplaceThemeInstallId,marketplaceThemeInstallConfigurationId:this.marketplaceThemeInstallConfigurationId},errorPolicy:"all",fetchPolicy:"no-cache"}),E=(I=B.data)==null?void 0:I.transactionCreateMany;if(!E||E.length===0){const M=((F=(P=B.errors)==null?void 0:P[0])==null?void 0:F.message)||"Unknown error";throw new ut(`Failed to create transactions: ${M}`)}return E.map((M,N)=>({transaction:M,workflowId:M.workflowId,readOnly:!1,index:S[N].index}))},s=t.map((S,B)=>({option:S,index:B})),o=s.filter(S=>S.option.type==="transaction"),l=s.filter(S=>S.option.type==="integration"||S.option.type==="external"),c=za(o,10),d=za(l,10),A=(await Promise.all([...c.map(n),...d.map(i)])).flat(),u=[...new Set(A.map(S=>S.workflowId))],h=await $a(u,e),g=new Map(h.map(S=>[S.id,S])),m=k.getMap("transactionOwnerIds")||new Map,f=A.map(async S=>{var W;const{transaction:B,workflowId:E,readOnly:I,index:P}=S,F=g.get(E),M=t[P];!m.get(B.id)&&B.transactionOwnerId&&m.set(B.id,B.transactionOwnerId);const N=m.get(B.id)||void 0,z={product:B.product,transaction:B,layouts:[],singleVariantsRenderable:(W=M==null?void 0:M.workflowConfiguration)==null?void 0:W.singleVariantsRenderable,stateMutationFunc:I?async()=>{throw new $("State mutation is forbidden in read only mode!")}:async q=>this.updateTransactionState({...q,context:{transactionOwnerId:N,bundleOwnerId:e==null?void 0:e.bundleOwnerId}}),readOnly:I,workflow:F,isReloadedTransaction:M.type==="transaction"};if(M.type==="transaction"&&B.workflowState){const q=JSON.parse(B.workflowState);z.layouts=Object.values(q.layouts||{}).map(rt=>rt.layout),await oa(q),z.reloadedState=q}else if(!I&&M.workflowState){const q=JSON.parse(M.workflowState);z.layouts=Object.values(q.layouts||{}).map(rt=>rt.layout),await oa(q),z.reloadedState=q}else z.layouts=Wl(z.transaction,z.workflow);return z.renderableContextService=new wl(z.layouts),z.delayWorkflowStateSync=!0,{experienceOptions:z,index:P,options:M}}),p=await Promise.all(f);k.setMap("transactionOwnerIds",m);const w=p.sort((S,B)=>S.index-B.index).map(async S=>{const{experienceOptions:B,options:E}=S,I=new Br(this,B);return await I.getWorkflowManager().getInitializationPromise(),E.type!=="transaction"&&this.customer&&await I.attachCustomerDetails({email:this.customer.emailAddress}),I}),v=await Promise.all(w);return v.forEach(S=>S.getWorkflowManager().setWorkflowStateSyncEnabled(!0)),v}storeCustomer(t){const e=k.getMap("partnerCustomerIds")||new Map;e.set(t.partner.id,t.id),k.setMap("partnerCustomerIds",e)}async getIntegrationProductById(t){var i,s;const n=(i=(await b.getShadowGraphqlClient().query({query:Ji,variables:{ids:[t]},fetchPolicy:"no-cache",errorPolicy:"all"})).data)==null?void 0:i.integrationProducts;if(!n||n.length===0||!((s=n[0])!=null&&s.id))throw new Error("Integration product not found.");return new ha(n[0])}async getIntegrationProductFromExternalIds(t,e){var s;const i=(s=(await b.getShadowGraphqlClient().query({query:Ki,variables:{externalProductId:e,externalIntegrationId:t},fetchPolicy:"no-cache",errorPolicy:"all"})).data)==null?void 0:s.integrationProductFromExternalIds;if(!(i!=null&&i.id))throw new Error("Integration product not found.");return new ha(i)}async getIntegrationProduct(t){return t.type==="integration"?this.getIntegrationProductById(t.integrationProductId):this.getIntegrationProductFromExternalIds(t.externalIntegrationId,t.externalProductId)}async getShareActionsForTransaction(t){const a=(k.getMap("transactionOwnerIds")||new Map).get(t)||void 0,n=await b.getShadowGraphqlClient().query({query:Yi,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:t},context:{transactionOwnerId:a}});if(!n.data.transactions||n.data.transactions.length!==1)throw new Error(`Failed to fetch share actions for transaction: ${t}`);return n.data.transactions[0].transactionShareActions}async placeOrder(t){const e=await b.getShadowGraphqlClient().mutate({mutation:ds,variables:{orderItems:t}});if(e.errors)throw new Error(e.errors[0].message);if(!e.data)throw new Error("Failed to create order: No order data in response.");return{id:e.data.orderCreate.id,internalId:e.data.orderCreate.internalId}}}const Qr=async(r,t)=>(await b.getShadowGraphqlClient().query({query:os,errorPolicy:"all",fetchPolicy:"no-cache",context:{headers:{"x-application-key":r}},variables:{themeConfigurationId:t}})).data.currentIntegration,Hl=async r=>{const e=await b.getShadowGraphqlClient().query({query:Hi,errorPolicy:"all",fetchPolicy:"network-only",variables:{id:r}});if(e.data.transactions.length!==0)return e.data.transactions[0]},Yl=async(r,t)=>{var a;return(a=(await b.getShadowGraphqlClient().query({query:ss,errorPolicy:"all",variables:{themeConfigurationId:r,themeInstallId:t}})).data)==null?void 0:a.marketplaceThemeInstallConfiguration},Jl=async r=>{var e,a,n;return(n=(a=(e=(await b.getShadowGraphqlClient().query({query:cs,errorPolicy:"all",variables:{id:r}})).data)==null?void 0:e.bundles)==null?void 0:a[0])==null?void 0:n.marketplaceThemeInstallConfiguration},Kl=async r=>{var e,a,n;return(n=(a=(e=(await b.getShadowGraphqlClient().query({query:ls,errorPolicy:"all",variables:{id:r}})).data)==null?void 0:e.transactions)==null?void 0:a[0])==null?void 0:n.marketplaceThemeInstallConfiguration};function Nr(r,t,e,a){const n=e.width*r.zoom,i=e.height*r.zoom;if(a){const o=r,l=Math.max(t.width/e.width,t.height/e.height);o.zoom=Math.max(l,r.zoom);const c=e.width*o.zoom,d=e.height*o.zoom;return o.x=me(r.x,t.width-c,0),o.y=me(r.y,t.height-d,0),o}const s=r;return s.x=me(s.x,-n,t.width),s.y=me(s.y,-i,t.height),s}function me(r,t,e){return Math.min(Math.max(r,t),e)}class Rr{constructor(t,e){this.minZoomScale=[.03],this.maxZoomScale=[20],this._debouncedUpdateFrameOffsets=fn(this.updateFrameOffsets,200),this.targetElements=[],this.onFrameDataChangeListeners=[],this.onZoomChangeListeners=[],this.forceImageCover=t,this.initialZoom=e,this.thresholdSettings={useThreshold:!1,invertThreshold:!1,threshold:128,thresholdSaturation:.5}}connectWorkflowManager(t,e){e&&t.addStepSpecificStorageCallback(async a=>{if(a){const n=a;if(n.currentFrameSources){let i=!1;for(let s=0;s<n.currentFrameSources.length;s++){const o=n.currentFrameSources[s],l=await ce(o),c=this.frameData?this.frameData[s]:void 0;mn(l,c)||(this.frameData||(this.frameData=new Array(n.currentFrameSources.length)),this.frameData[s]=l,i=!0)}i&&(this.onFrameDataChangeListeners.forEach(s=>s(this.frameData)),this.frameData&&this.imageData&&(this.recalculateOffsets(this.imageData),this.updateOffsets(this.offsets),this.recalculateZoomLimits(this.imageData,this.frameData)))}}},e),this.workflowManager=t,this.stepName=e}setTargetElements(t){this.targetElements=t}getFrameData(){return this.frameData}setFrameData(t){if(!t){this.frameData=void 0;return}t.forEach((e,a)=>{const n=Pt.get(e);n&&(this.frameData||(this.frameData=new Array(t.length)),this.frameData[a]=n)})}getImageData(){return this.imageData}getImageSrc(){if(this.imageData){if(this.imageData.svg){const t=Sa(this.imageData.svg,this.imageData.colors||{},!1);return fa(t)}return this.imageData.src}}getOffsets(){return this.offsets}setOffsets(t){this.offsets=t}setZoom(t,e,a,n){if(this.imageData&&this.offsets&&this.frameData){(!this.offsets||this.offsets.length!==this.frameData.length)&&(this.offsets=new Array(this.frameData.length));const i=this.frameData.map((s,o)=>{const l=(e[o]-this.offsets[o].x)/this.offsets[o].zoom,c=(a[o]-this.offsets[o].y)/this.offsets[o].zoom,d=e[o]-l*t[o],A=a[o]-c*t[o];return{x:d,y:A,zoom:this.imageData.width*t[o]/this.imageData.width}});this.updateOffsets(i,n),this.onZoomChangeListeners.forEach(s=>s(t))}}setPatternData(t,e=!0){this.imageData=t,t&&this.frameData&&((e||!this.offsets)&&this.recalculateOffsets(t),this.updateOffsets(this.offsets,void 0,!0)),this.imageData&&this.frameData&&this.recalculateZoomLimits(this.imageData,this.frameData)}updateOffsets(t,e,a){const n=this.imageData;if(!n||!this.frameData)return;if(this.frameData.length!==t.length)throw new $("Frame data and offsets are not the same length. This is a bug. Please report it.");if(!this.offsets.some((s,o)=>!(t[o].x===s.x&&t[o].y===s.y&&t[o].zoom===s.zoom))&&!a){e&&e();return}(!this.offsets||this.offsets.length!==this.frameData.length)&&(this.offsets=new Array(this.frameData.length)),this.frameData.forEach((s,o)=>{this.offsets[o]=Nr(t[o],s,this.imageData,this.forceImageCover)}),this._debouncedUpdateFrameOffsets(this.offsets,n,this.frameData,this.thresholdSettings,e)}getThresholdSettings(){return this.thresholdSettings}setThresholdSettings(t){this.thresholdSettings=t,this.imageData&&this.frameData&&this._debouncedUpdateFrameOffsets(this.offsets,this.imageData,this.frameData,t)}onFrameDataChanged(t){t(this.frameData),this.onFrameDataChangeListeners.push(t)}onZoom(t){this.onZoomChangeListeners.push(t)}updateFrameOffsets(t,e,a,n,i){if(!a||a.length===0||a.some(o=>!o))throw new $("Frame data not set. This is a bug");if(!this.workflowManager)throw new $("No workflow manager set, cannot update offsets.");const s=this.workflowManager.getCommandDispatcher();this.targetElements.forEach((o,l)=>{s(new O([new Ys(o,e,t[l]),new Js(o,n.useThreshold,n.invertThreshold,n.threshold,n.thresholdSaturation)]))}),this.stepName&&this.workflowManager.updateStorage(this.stepName,{frameOffsetsList:t}),i&&i()}recalculateZoomLimits(t,e){(this.minZoomScale.length!==e.length||this.maxZoomScale.length!==e.length)&&(this.minZoomScale=new Array(e.length),this.maxZoomScale=new Array(e.length)),e.forEach((a,n)=>{const i=Math.max(a.width/t.width,a.height/t.height);this.forceImageCover?(this.minZoomScale[n]=i,this.maxZoomScale[n]=i*2.5):(this.minZoomScale[n]=i/10,this.maxZoomScale[n]=i*2.5)})}recalculateOffsets(t){this.frameData&&((!this.offsets||this.offsets.length!==this.frameData.length)&&(this.offsets=new Array(this.frameData.length)),this.frameData.forEach((e,a)=>{this.offsets[a]=Da(t,e,this.initialZoom&&!this.forceImageCover?{scale:this.initialZoom}:void 0,this.forceImageCover)}),this._debouncedUpdateFrameOffsets(this.offsets,t,this.frameData,this.thresholdSettings))}}class _l{approveTransaction(t){throw new Error("Method not implemented.")}rejectTransaction(t){throw new Error("Method not implemented.")}getClient(){return this.client??{}}getWorkflowExperience(){return{}}setClient(t){this.client=t}getInitializationPromise(){return Promise.resolve()}isInitialized(){return!0}getInformationResults(){return[]}async reset(){}updateStateWithServer(t){}async outstandingRequestsPromise(){}async updateStateWithServerImmediate(t){}addPoller(t){}addConfirmCallback(t){}addEditedCallback(t){}addElementsCallback(t){}addInformationResultCallback(t){}addInitCallback(t){}addMakingAdjustmentsCallback(t){}addMandatoryCallback(t){}addMetadataCallback(t){}addSelectionCallback(t){}addStepSpecificStorageCallback(t,e){}addStorageCallback(t){}getCommandDispatcher(){return t=>{}}getLayouts(){return[]}getLayoutPreviewService(){return{getAll:()=>new Map}}getPreviewService(){}getModelContainer(){}getProfanities(){return[]}getRegionElements(t){return[]}getSerializedStep(t,e){}getStepSpecificServices(t){}getTransaction(){return{id:""}}getTransactionCustomer(){}setTransactionCustomer(){}setTransactionCustomerDetails(){}getWorkflow(){return{id:"",name:"",panels:[],steps:[],showModelOnFinishStep:!1,allowProofDownload:!1,introduction:"",stepGroups:[]}}markStepsAsInitialised(t){}markUpdateCompleted(t){}markUpdatePending(){return"123"}getWorkflowSelections(){return{}}getStepSelections(){return{}}setCurrentAdjustingStepId(t){}setEditedStatus(t,e){}setInformationResults(t){}setMandatoryFulfilled(t,e){}async setSelectionsAndElements(t,e,a){}toggleDesignConfirmed(){}updateMetadata(t,e){}async updateStorage(t,e){}injectIntoPreviewService(t){return Promise.resolve()}ejectFromPreviewService(){}setWorkflowStateSyncEnabled(t){}async updateTransactionShareActions(){}addValidationCallback(t){}setStepError(t,e,a){}getStepErrors(t){}getValidationErrors(){return{steps:new Map}}async updateTransactionStakeholders(){}getStepTags(t){return[]}}var Or=(r=>(r.SelectFrame="SelectFrame",r.SelectImage="SelectImage",r.Position="Position",r))(Or||{});class Ur extends nt{constructor(t,e,a){super(t,e,a);const n=e.data;this.frameService=new Rr(n.forceImageCover,n.initialZoomLevel),this.frameService.connectWorkflowManager(t,e.stepName)}selectVariant(t){const e=this.manager.getRegionElements(this.step.stepName);return dt.selectVariant(this.step,t.getResource(),e,this.manager,a=>this.setUpdateState(a))}onFrameDataChanged(t){this.frameService&&this.frameService.onFrameDataChanged(e=>{e&&t(e)})}async selectImage(t,e=!0,a=!0){var n;if(await dt.selectImage(this.step,t,this.manager,a),e){const i=((n=this.manager.getStepStorage(this.step.stepName))==null?void 0:n.framePatternData)||{};this.manager.updateStorage(this.step.stepName,{framePatternData:{...i,originalAssetKey:t.key,backgroundRemovedAssetKey:void 0,useOriginalAsset:void 0}})}}async canUseBackgroundRemover(){return this.manager.getClient().canUseAddon(Be.BackgroundRemover)}async canRemoveBackground(){var t,e,a,n;return await this.canUseBackgroundRemover()&&this.hasOriginalImageSelection()&&!!((e=(t=this.frameService)==null?void 0:t.getImageData())!=null&&e.src)&&!((n=(a=this.frameService)==null?void 0:a.getImageData())!=null&&n.svg)}async removeBackgroundFromImageSelection(t=!0){var i;if(!await this.canUseBackgroundRemover())throw new Error("The current Integration does not have access to the Background Remover. Please call canUseBackgroundRemover to ensure you disable this feature when appropriate.");const e=await this.getOriginalImageSelection();if(!e)throw new Error("You must supply an image selection before attempting to remove the background.");const a=await U.removeBackgroundFromAsset(e);t&&await dt.selectImage(this.step,a,this.manager,!1);const n=((i=this.manager.getStepStorage(this.step.stepName))==null?void 0:i.framePatternData)||{};return this.manager.updateStorage(this.step.stepName,{framePatternData:{...n,backgroundRemovedAssetKey:a.key,useOriginalAsset:!t}}),a}changeColors(t){dt.changeColors(this.step,this.manager,t)}getImageData(){if(this.frameService)return this.frameService.getImageData()}async getColorOption(){return this.step.data.colorOption}getAvailableColors(){return this.step.data.colorPickerEnabled?dt.availableColors(this.step,this.manager):Promise.resolve([])}isColorPickerEnabled(){return this.step.data.colorPickerEnabled??!1}async getOriginalImageColors(){const t=this.getImageData();return t!=null&&t.svg?(await lt(t.svg)).colors:void 0}getMaxAllowedColors(){return this.step.data.maxColors}getUniqueColorCount(){return dt.getUniqueColorCount(this.step,this.manager)}getCurrentFrameStep(t,e,a,n){return n&&n.length>1&&t===void 0?"SelectFrame":e||a||this.getImageData()?"Position":"SelectImage"}getFrameService(){return this.frameService}hasOverlayImageKey(){return this.step.data.overlayImageKey}hasOverlayImageUrl(){return this.step.data.overlayImageUrl}getWhitelistedExtensions(){return[...this.step.data.whitelistedExtensions,...this.step.data.whitelistedExtensions.includes(".jpg")?[".jpeg"]:[]]}async getOriginalImageSelection(){var e,a;const t=(a=(e=this.manager.getStepStorage(this.step.stepName))==null?void 0:e.framePatternData)==null?void 0:a.originalAssetKey;if(t)return U.getLocalOrFromServer(t)}async getBackgroundRemovedImageSelection(){var e,a;const t=(a=(e=this.manager.getStepStorage(this.step.stepName))==null?void 0:e.framePatternData)==null?void 0:a.backgroundRemovedAssetKey;if(t)return U.getLocalOrFromServer(t)}hasOriginalImageSelection(){var t,e;return!!((e=(t=this.manager.getStepStorage(this.step.stepName))==null?void 0:t.framePatternData)!=null&&e.originalAssetKey)}hasBackgroundRemovedImageSelection(){var t,e;return!!((e=(t=this.getFrameStepStorage())==null?void 0:t.framePatternData)!=null&&e.backgroundRemovedAssetKey)}getUseOriginalImageSelection(){var t,e;return((e=(t=this.getFrameStepStorage())==null?void 0:t.framePatternData)==null?void 0:e.useOriginalAsset)??!1}async setUseOriginalImageSelection(t){var n;const e=((n=this.getFrameStepStorage())==null?void 0:n.framePatternData)||{};if(e.useOriginalAsset===t)return;const a=await this.getOriginalImageSelection();if(!a)throw new Error("You must provide an image selection before calling setUseOriginalImageSelection");if(t)await this.selectImage(a,!1,!1);else{const i=await this.getBackgroundRemovedImageSelection();if(!i)throw new Error("You must call removeBackgroundFromImageSelection before attempting to apply the image.");await this.selectImage(i,!1,!1)}this.manager.updateStorage(this.step.stepName,{framePatternData:{...e,useOriginalAsset:t}})}getFrameStepStorage(){return this.manager.getStepStorage(this.step.stepName)}}const Xl=y.gql`
|
|
2242
|
+
`,Vl=async(r,t)=>{var n;const e=await b.getShadowGraphqlClient().query({query:ns(((n=t==null?void 0:t.assets)==null?void 0:n.metadata)||!1),errorPolicy:"all",variables:{ids:r}});if(e.error)throw e.error;if(e.errors)throw e.errors.forEach(i=>console.error(i)),new Error("Unable to read workflows. Consult GraphQL errors.");const a=e.data.workflows;if(a===void 0||a.length!==r.length)throw new Error(`Unable to read workflows: ${e.errors??"Length mismatch in response"}`);return a.forEach(i=>{i.steps.forEach(s=>{var o,l,c;delete s.data.__typename,(o=s.option)!=null&&o.id&&((l=s.option.defaultVariant)!=null&&l.asset&&U.cacheAsset(s.option.defaultVariant.asset),s.option.colorProfile&&U.cacheAsset(s.option.colorProfile),(c=s.option.variants)==null||c.forEach(d=>{d.asset&&U.cacheAsset(d.asset),d.thumbnail&&U.cacheAsset(d.thumbnail),d.material&&U.cacheMaterial(d.material)}),Ot.set({id:s.option.id},Promise.resolve(s.option)))}),i.finalizeStepConfig||(i.finalizeStepConfig={}),i.finalizeStepConfig.termsMarkdown=i.finalizeStepConfig.termsMarkdown||i.partner.termsMarkdown}),a},zl=async(r,t)=>{const a=(await t).find(n=>n.id===r);if(!a)throw new Error(`Workflow not found: ${r}`);return a},$a=async(r,t)=>{const e=r.map(o=>Ot.get({id:o,options:t})),a=r.filter((o,l)=>e[l]===void 0);if(a.length===0)return Promise.all(e);const n=Vl(a,t),i=a.map(o=>Ot.set({id:o,options:t},zl(o,n))),s=e.filter(o=>o!==void 0);return await Promise.all(s.concat(i))},Gl=async(r,t)=>(await $a([r],t))[0],ql=r=>r.sort((t,e)=>t.index-e.index).map(t=>({id:Q(),panelId:t.name,name:t.name,index:t.index,createdAt:new Date,updatedAt:new Date,transparentBackground:t.transparentBackground,height:t.height,width:t.width,previewRegion:t.previewRegion,useEditableArea:t.useEditableArea,editableArea:t.editableArea})),Wl=(r,t)=>{const e=r.workflowState,a=e?JSON.parse(e):void 0;return a?Object.values(a.layouts).map(n=>n.layout):ql(t.panels)};class jl{constructor(t){this.activeIntegration=void 0,this.updateTransactionState=async e=>{try{return b.getShadowGraphqlClient().mutate({...e,mutation:Wi})}catch(a){throw console.error(a),new ut("Critical - Unable to synchronize workflow state with server.")}},this.options=t,this.options.applicationKey&&ci(this.options.applicationKey),console.debug("------------------------"),console.debug("Spiff Commerce Core SDK"),console.debug("Version: 26.16.2"),console.debug(`Application Key Provided: ${!!this.options.applicationKey}`),console.debug("------------------------")}configure(t){gt.setHubUrl(t.hubUrl),gt.setServerUrl(t.serverUrl),gt.setServicesApiUrl(t.servicesApiUrl),this.marketplaceThemeInstallId=t.marketplaceThemeInstallId,this.marketplaceThemeInstallConfigurationId=t.marketplaceThemeInstallConfigurationId,t.bearerAuthenticationToken&&Pn(t.bearerAuthenticationToken),this.options.applicationKey&&this.getIntegration()}getAssetManager(){return U}getCurrencyCode(){if(this.currencyCode===void 0)throw new Error("No currency code set.");return this.currencyCode}getFlowService(){if(!di())throw new Error("Application key required to use Flow Service.");return new kr}async getIntegration(){if(this.activeIntegration)return this.activeIntegration;if(!this.options.applicationKey)throw new Error("Cannot get current Integration without specifying an Application Key.");return this.activeIntegration=Qr(this.options.applicationKey),this.activeIntegration}async canUseAddon(t){var e;try{return((e=(await this.getIntegration()).partner.activeAddons)==null?void 0:e.includes(t))??!1}catch(a){return console.error(a),!1}}async authenticateBundleFromLocalStorage(t){var n,i;const e=k.getMap("bundleOwnerIds");if(e!=null&&e.has(t))return Promise.resolve({success:!0,stakeholderType:Kt.Owner});const a=k.getMap("bundlePartnerIds")||new Map;if(a.has(t)){const s=a.get(t),l=(k.getMap("partnerCustomerIds")||new Map).get(s);if(l&&await this.authenticateCustomerId(l)){const d=(i=(n=this.customer)==null?void 0:n.bundleStakeholders)==null?void 0:i.find(A=>{var u;return((u=A.bundle)==null?void 0:u.id)===t});if(d)return Promise.resolve({success:!0,stakeholderType:d.type})}}return Promise.resolve({success:!1})}async authenticateTransactionFromLocalStorage(t){var d,A,u,h,g,m;const e=b.getShadowGraphqlClient(),a=await e.query({query:rs,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:t}});if(!a.data.transactions||a.data.transactions.length===0)throw new Error(`Transaction not found: ${t}`);const n=a.data.transactions[0];if(!((A=(d=n.product)==null?void 0:d.partner)==null?void 0:A.id))throw new Error(`Unable to read transaction: ${t}`);if(n.isOrdered)return Promise.resolve({success:!1,transactionReadOnly:!0});const s=k.getMap("transactionOwnerIds");if(s!=null&&s.has(t))return Promise.resolve({success:!0,stakeholderType:Kt.Owner});const o=k.getMap("transactionCustomerIds");if(o!=null&&o.has(t)){const f=o.get(t);if(f&&await this.authenticateCustomerId(f)){const C=((h=(u=this.customer)==null?void 0:u.bundleStakeholders)==null?void 0:h.find(w=>{var v,S;return(S=(v=w.bundle)==null?void 0:v.transactions)==null?void 0:S.some(B=>B.id===t)}))||((m=(g=this.customer)==null?void 0:g.stakeholders)==null?void 0:m.find(w=>{var v;return((v=w.transaction)==null?void 0:v.id)===t}));if(C)return Promise.resolve({success:!0,stakeholderType:C.type})}}const c=(await e.query({query:is,errorPolicy:"all",variables:{id:n.workflowId}})).data.workflow;if(!c)throw new Error(`Unable to read workflow: ${n.workflowId}`);return Promise.resolve({success:!1,theme:c.overrideTheme,customLogoLink:n.customLogoLink})}clearCustomer(){this.customer=void 0}clearCustomerForTransaction(t){const e=k.getMap("transactionCustomerIds");e!=null&&e.has(t)&&(e.delete(t),k.setMap("transactionCustomerIds",e))}async customerHasBundleTemplates(t){const n=(await b.getShadowGraphqlClient().query({query:rn,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:t}})).data.customer;return n.id?n.hasBundleTemplates??!1:!1}getStakeholderTypeForTransaction(t){var a,n;const e=(n=(a=this.customer)==null?void 0:a.stakeholders)==null?void 0:n.find(i=>{var s;return((s=i.transaction)==null?void 0:s.id)===t});if(e)return e.type}async getOrCreateCustomer(t){var s;this.customer=void 0;const e=b.getShadowGraphqlClient(),n=(await e.query({query:rn,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:t}})).data.customer;if(!n.id){const l=(s=(await e.mutate({mutation:Rl,errorPolicy:"all",fetchPolicy:"no-cache",variables:{details:{emailAddress:t}}})).data)==null?void 0:s.customerCreate;if(!l)throw new Error("Unable to create customer.");return this.storeCustomer(l),this.customer=l,{customer:l,isAuthenticated:!1}}this.storeCustomer(n);const i=await this.authenticateCustomerId(n.id);return{customer:this.customer||n,isAuthenticated:i}}getCustomer(){return this.customer}async authenticateCustomerId(t){var o;const e=b.getShadowGraphqlClient(),a=k.getMap("customerTokens");if(!(a!=null&&a.has(t)))return!1;const n=a.get(t);if(!n)return!1;const s=(o=(await e.mutate({mutation:Ol,errorPolicy:"all",fetchPolicy:"no-cache",variables:{loginToken:n}})).data)==null?void 0:o.customerAuthenticate;return s?(this.storeCustomer(s),Ha(n),this.customer=s,!0):!1}async generateVerificationCode(t){await b.getShadowGraphqlClient().mutate({mutation:Ul,variables:{emailAddress:t}})}async verifyCode(t,e){var i,s;const n=(i=(await b.getShadowGraphqlClient().mutate({mutation:Ll,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:t,verificationCode:e}})).data)==null?void 0:i.customerVerifyCode;if(n!=null&&n.loginToken){if(!((s=n.partner)!=null&&s.id))throw new Error(`Unable to find customer: ${t}`);const o=k.getMap("customerTokens")||new Map;return o.set(n.id,n.loginToken),k.setMap("customerTokens",o),this.storeCustomer(n),Ha(n.loginToken),this.customer={...n,loginToken:void 0},!0}return!1}async getCustomerMetafields(){var e;if(!((e=this.customer)!=null&&e.id))throw new Error("Customer must be logged in before calling this function.");return(await b.getShadowGraphqlClient().query({query:$l,variables:{id:this.customer.id}})).data.metafields}async getNewBundle(t,e,a){var c,d,A,u,h;const i=(A=(await b.getShadowGraphqlClient().mutate({mutation:Mo(((d=(c=a==null?void 0:a.graphql)==null?void 0:c.productCollection)==null?void 0:d.eagerFetchProducts)||!1),variables:{collectionId:t,initialMetadata:e?Object.entries(e).map((g,m)=>({key:g[0],value:g[1]})):void 0,marketplaceThemeInstallId:this.marketplaceThemeInstallId,marketplaceThemeInstallConfigurationId:this.marketplaceThemeInstallConfigurationId},fetchPolicy:"no-cache"})).data)==null?void 0:A.bundleCreate;if(!(i!=null&&i.id))throw new Error("Unable to create bundle");const s=k.getMap("bundlePartnerIds")||new Map;s.set(i.id,i.partner.id),k.setMap("bundlePartnerIds",s);const o=k.getMap("bundleOwnerIds")||new Map;o.set(i.id,i.bundleOwnerId),k.setMap("bundleOwnerIds",o);const l=new He(this,i,void 0,void 0,i.bundleOwnerId,{eagerFetchProducts:(h=(u=a==null?void 0:a.graphql)==null?void 0:u.productCollection)==null?void 0:h.eagerFetchProducts});return await l.getInitializationPromise(),l}async getExistingBundle(t,e,a,n){var f,p,C,w,v,S,B,E,I,P,F;const i=k.getMap("bundleOwnerIds"),s=i==null?void 0:i.get(t),l=((f=Object.entries(localStorage).find(([M,N])=>M.startsWith("CognitoIdentityServiceProvider")&&M.endsWith("idToken")))==null?void 0:f[0])||"",c=localStorage.getItem(l),d={};c&&!Ee(c)&&(d.Authorization=`Bearer ${c}`);const A={bundleOwnerId:s,...d,...(p=n==null?void 0:n.graphql)==null?void 0:p.additionalHeaders},u=await b.getShadowGraphqlClient().query({query:Do(((w=(C=n==null?void 0:n.graphql)==null?void 0:C.productCollection)==null?void 0:w.eagerFetchProducts)||!1),variables:{id:t},fetchPolicy:"no-cache",context:{headers:A}});if(!((v=u.data)!=null&&v.bundles)||((S=u.data)==null?void 0:S.bundles.length)===0||!((B=u.data)!=null&&B.bundles[0]))throw new Error(`Unable to find bundle: ${t}`);const h=(E=u.data)==null?void 0:E.bundles[0],g=k.getMap("bundlePartnerIds")||new Map;g.set(h.id,h.partner.id),k.setMap("bundlePartnerIds",g);const m=new He(this,h,e,a,s,{additionalHeaders:(I=n==null?void 0:n.graphql)==null?void 0:I.additionalHeaders,eagerFetchProducts:(F=(P=n==null?void 0:n.graphql)==null?void 0:P.productCollection)==null?void 0:F.eagerFetchProducts,existingGlobalPropertyState:u.data.globalPropertyState,readonly:n==null?void 0:n.readonly});return await m.getInitializationPromise(),m}async duplicateBundle(t,e,a,n){var f,p,C,w,v,S,B,E;const i=(f=k.getMap("bundleOwnerIds"))==null?void 0:f.get(t),o=((p=Object.entries(localStorage).find(([I,P])=>I.startsWith("CognitoIdentityServiceProvider")&&I.endsWith("idToken")))==null?void 0:p[0])||"",l=localStorage.getItem(o),c={};l&&!Ee(l)&&(c.Authorization=`Bearer ${l}`);const d={bundleOwnerId:i,...c,...(C=n==null?void 0:n.graphql)==null?void 0:C.additionalHeaders},u=(S=(await b.getShadowGraphqlClient().mutate({mutation:To(((v=(w=n==null?void 0:n.graphql)==null?void 0:w.productCollection)==null?void 0:v.eagerFetchProducts)||!1),variables:{id:t,template:e,marketplaceThemeInstallId:this.marketplaceThemeInstallId,marketplaceThemeInstallConfigurationId:this.marketplaceThemeInstallConfigurationId,duplicateTransactions:a},context:{headers:d},fetchPolicy:"no-cache"})).data)==null?void 0:S.bundleDuplicate;if(!(u!=null&&u.id))throw new Error("Unable to duplicate bundle");const h=k.getMap("bundlePartnerIds")||new Map;h.set(u.id,u.partner.id),k.setMap("bundlePartnerIds",h);const g=k.getMap("bundleOwnerIds")||new Map;g.set(u.id,u.bundleOwnerId),k.setMap("bundleOwnerIds",g);const m=new He(this,u,void 0,void 0,u.bundleOwnerId,{eagerFetchProducts:(E=(B=n==null?void 0:n.graphql)==null?void 0:B.productCollection)==null?void 0:E.eagerFetchProducts});return await m.getInitializationPromise(),m}async getBundlesForCustomer(t){var i;if(!((i=this.customer)!=null&&i.id))throw new Error("Customer not authenticated.");const{includeMetadata:e,...a}=t;return(await b.getShadowGraphqlClient().query({query:Wo(e??!1),variables:{...a,id:this.customer.id},fetchPolicy:"no-cache"})).data.customerBundlesFeed}async getBundleStakeholders(){var i;if(!this.customer)throw new Error("Customer not authenticated.");const t=await b.getShadowGraphqlClient().query({query:xo,variables:{id:this.customer.id},fetchPolicy:"no-cache"});if(!((i=t.data)!=null&&i.customers)||t.data.customers.length===0)throw new Error("Unable to find customer.");const a=t.data.customers[0].bundleStakeholders||[],n=k.getMap("bundlePartnerIds")||new Map;return a.forEach(s=>{var o,l;(o=s.bundle)!=null&&o.id&&((l=s.bundle.partner)!=null&&l.id)&&n.set(s.bundle.id,s.bundle.partner.id)}),k.setMap("bundlePartnerIds",n),a}async getWorkflowExperience(t,e){if(!t)throw new Error("getWorkflowExperience has been called without an options object! This is not supported.");const a=await this.getWorkflowExperiences([t],t.graphql),n=a[0];return e&&await n.getWorkflowManager().injectIntoPreviewService(e(n.getWorkflowManager().getWorkflow())),a[0]}async getWorkflowExperiences(t,e){if(t.length===0)throw new ut("No options provided!");const a=b.getShadowGraphqlClient(),n=async S=>{var P,F,M;if(S.length===0)return[];const B=S.map(N=>N.option.transactionId),E=await a.query({query:qi,variables:{ids:B},errorPolicy:"all",fetchPolicy:"no-cache"}),I=E.data.transactions;if(I.length!==S.length){const N=((F=(P=E.errors)==null?void 0:P[0])==null?void 0:F.message)||"Unknown error";throw new ut(`Not all transactions were found: ${N}`)}return!this.activeIntegration&&((M=I[0].integrationProduct)!=null&&M.integration)&&(this.activeIntegration=Promise.resolve(I[0].integrationProduct.integration)),I.map((N,z)=>{var W;return{transaction:N,workflowId:N.workflowId,readOnly:((W=S.find(q=>q.option.transactionId===N.id))==null?void 0:W.option.readOnly)??!1,index:S[z].index}})},i=async S=>{var I,P,F;if(S.length===0)return[];const B=await a.mutate({mutation:Gi,variables:{inputs:S.map(M=>({integrationProductId:M.option.type==="integration"?M.option.integrationProductId:void 0,externalIntegrationId:M.option.type==="external"?M.option.externalIntegrationId:void 0,externalProductId:M.option.type==="external"?M.option.externalProductId:void 0,workflowId:M.option.workflowId,designName:M.option.designName,claim:!0})),marketplaceThemeInstallId:this.marketplaceThemeInstallId,marketplaceThemeInstallConfigurationId:this.marketplaceThemeInstallConfigurationId},errorPolicy:"all",fetchPolicy:"no-cache"}),E=(I=B.data)==null?void 0:I.transactionCreateMany;if(!E||E.length===0){const M=((F=(P=B.errors)==null?void 0:P[0])==null?void 0:F.message)||"Unknown error";throw new ut(`Failed to create transactions: ${M}`)}return E.map((M,N)=>({transaction:M,workflowId:M.workflowId,readOnly:!1,index:S[N].index}))},s=t.map((S,B)=>({option:S,index:B})),o=s.filter(S=>S.option.type==="transaction"),l=s.filter(S=>S.option.type==="integration"||S.option.type==="external"),c=za(o,10),d=za(l,10),A=(await Promise.all([...c.map(n),...d.map(i)])).flat(),u=[...new Set(A.map(S=>S.workflowId))],h=await $a(u,e),g=new Map(h.map(S=>[S.id,S])),m=k.getMap("transactionOwnerIds")||new Map,f=A.map(async S=>{var W;const{transaction:B,workflowId:E,readOnly:I,index:P}=S,F=g.get(E),M=t[P];!m.get(B.id)&&B.transactionOwnerId&&m.set(B.id,B.transactionOwnerId);const N=m.get(B.id)||void 0,z={product:B.product,transaction:B,layouts:[],singleVariantsRenderable:(W=M==null?void 0:M.workflowConfiguration)==null?void 0:W.singleVariantsRenderable,stateMutationFunc:I?async()=>{throw new $("State mutation is forbidden in read only mode!")}:async q=>this.updateTransactionState({...q,context:{transactionOwnerId:N,bundleOwnerId:e==null?void 0:e.bundleOwnerId}}),readOnly:I,workflow:F,isReloadedTransaction:M.type==="transaction"};if(M.type==="transaction"&&B.workflowState){const q=JSON.parse(B.workflowState);z.layouts=Object.values(q.layouts||{}).map(rt=>rt.layout),await oa(q),z.reloadedState=q}else if(!I&&M.workflowState){const q=JSON.parse(M.workflowState);z.layouts=Object.values(q.layouts||{}).map(rt=>rt.layout),await oa(q),z.reloadedState=q}else z.layouts=Wl(z.transaction,z.workflow);return z.renderableContextService=new wl(z.layouts),z.delayWorkflowStateSync=!0,{experienceOptions:z,index:P,options:M}}),p=await Promise.all(f);k.setMap("transactionOwnerIds",m);const w=p.sort((S,B)=>S.index-B.index).map(async S=>{const{experienceOptions:B,options:E}=S,I=new Br(this,B);return await I.getWorkflowManager().getInitializationPromise(),E.type!=="transaction"&&this.customer&&await I.attachCustomerDetails({email:this.customer.emailAddress}),I}),v=await Promise.all(w);return v.forEach(S=>S.getWorkflowManager().setWorkflowStateSyncEnabled(!0)),v}storeCustomer(t){const e=k.getMap("partnerCustomerIds")||new Map;e.set(t.partner.id,t.id),k.setMap("partnerCustomerIds",e)}async getIntegrationProductById(t){var i,s;const n=(i=(await b.getShadowGraphqlClient().query({query:Ji,variables:{ids:[t]},fetchPolicy:"no-cache",errorPolicy:"all"})).data)==null?void 0:i.integrationProducts;if(!n||n.length===0||!((s=n[0])!=null&&s.id))throw new Error("Integration product not found.");return new ha(n[0])}async getIntegrationProductFromExternalIds(t,e){var s;const i=(s=(await b.getShadowGraphqlClient().query({query:Ki,variables:{externalProductId:e,externalIntegrationId:t},fetchPolicy:"no-cache",errorPolicy:"all"})).data)==null?void 0:s.integrationProductFromExternalIds;if(!(i!=null&&i.id))throw new Error("Integration product not found.");return new ha(i)}async getIntegrationProduct(t){return t.type==="integration"?this.getIntegrationProductById(t.integrationProductId):this.getIntegrationProductFromExternalIds(t.externalIntegrationId,t.externalProductId)}async getShareActionsForTransaction(t){const a=(k.getMap("transactionOwnerIds")||new Map).get(t)||void 0,n=await b.getShadowGraphqlClient().query({query:Yi,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:t},context:{transactionOwnerId:a}});if(!n.data.transactions||n.data.transactions.length!==1)throw new Error(`Failed to fetch share actions for transaction: ${t}`);return n.data.transactions[0].transactionShareActions}async placeOrder(t){const e=await b.getShadowGraphqlClient().mutate({mutation:ds,variables:{orderItems:t}});if(e.errors)throw new Error(e.errors[0].message);if(!e.data)throw new Error("Failed to create order: No order data in response.");return{id:e.data.orderCreate.id,internalId:e.data.orderCreate.internalId}}}const Qr=async(r,t)=>(await b.getShadowGraphqlClient().query({query:os,errorPolicy:"all",fetchPolicy:"no-cache",context:{headers:{"x-application-key":r}},variables:{themeConfigurationId:t}})).data.currentIntegration,Hl=async r=>{const e=await b.getShadowGraphqlClient().query({query:Hi,errorPolicy:"all",fetchPolicy:"network-only",variables:{id:r}});if(e.data.transactions.length!==0)return e.data.transactions[0]},Yl=async(r,t)=>{var a;return(a=(await b.getShadowGraphqlClient().query({query:ss,errorPolicy:"all",variables:{themeConfigurationId:r,themeInstallId:t}})).data)==null?void 0:a.marketplaceThemeInstallConfiguration},Jl=async r=>{var e,a,n;return(n=(a=(e=(await b.getShadowGraphqlClient().query({query:cs,errorPolicy:"all",variables:{id:r}})).data)==null?void 0:e.bundles)==null?void 0:a[0])==null?void 0:n.marketplaceThemeInstallConfiguration},Kl=async r=>{var e,a,n;return(n=(a=(e=(await b.getShadowGraphqlClient().query({query:ls,errorPolicy:"all",variables:{id:r}})).data)==null?void 0:e.transactions)==null?void 0:a[0])==null?void 0:n.marketplaceThemeInstallConfiguration};function Nr(r,t,e,a){const n=e.width*r.zoom,i=e.height*r.zoom;if(a){const o=r,l=Math.max(t.width/e.width,t.height/e.height);o.zoom=Math.max(l,r.zoom);const c=e.width*o.zoom,d=e.height*o.zoom;return o.x=me(r.x,t.width-c,0),o.y=me(r.y,t.height-d,0),o}const s=r;return s.x=me(s.x,-n,t.width),s.y=me(s.y,-i,t.height),s}function me(r,t,e){return Math.min(Math.max(r,t),e)}class Rr{constructor(t,e){this.minZoomScale=[.03],this.maxZoomScale=[20],this._debouncedUpdateFrameOffsets=fn(this.updateFrameOffsets,200),this.targetElements=[],this.onFrameDataChangeListeners=[],this.onZoomChangeListeners=[],this.forceImageCover=t,this.initialZoom=e,this.thresholdSettings={useThreshold:!1,invertThreshold:!1,threshold:128,thresholdSaturation:.5}}connectWorkflowManager(t,e){e&&t.addStepSpecificStorageCallback(async a=>{if(a){const n=a;if(n.currentFrameSources){let i=!1;for(let s=0;s<n.currentFrameSources.length;s++){const o=n.currentFrameSources[s],l=await ce(o),c=this.frameData?this.frameData[s]:void 0;mn(l,c)||(this.frameData||(this.frameData=new Array(n.currentFrameSources.length)),this.frameData[s]=l,i=!0)}i&&(this.onFrameDataChangeListeners.forEach(s=>s(this.frameData)),this.frameData&&this.imageData&&(this.recalculateOffsets(this.imageData),this.updateOffsets(this.offsets),this.recalculateZoomLimits(this.imageData,this.frameData)))}}},e),this.workflowManager=t,this.stepName=e}setTargetElements(t){this.targetElements=t}getFrameData(){return this.frameData}setFrameData(t){if(!t){this.frameData=void 0;return}t.forEach((e,a)=>{const n=Pt.get(e);n&&(this.frameData||(this.frameData=new Array(t.length)),this.frameData[a]=n)})}getImageData(){return this.imageData}getImageSrc(){if(this.imageData){if(this.imageData.svg){const t=Sa(this.imageData.svg,this.imageData.colors||{},!1);return fa(t)}return this.imageData.src}}getOffsets(){return this.offsets}setOffsets(t){this.offsets=t}setZoom(t,e,a,n){if(this.imageData&&this.offsets&&this.frameData){(!this.offsets||this.offsets.length!==this.frameData.length)&&(this.offsets=new Array(this.frameData.length));const i=this.frameData.map((s,o)=>{const l=(e[o]-this.offsets[o].x)/this.offsets[o].zoom,c=(a[o]-this.offsets[o].y)/this.offsets[o].zoom,d=e[o]-l*t[o],A=a[o]-c*t[o];return{x:d,y:A,zoom:this.imageData.width*t[o]/this.imageData.width}});this.updateOffsets(i,n),this.onZoomChangeListeners.forEach(s=>s(t))}}setPatternData(t,e=!0){this.imageData=t,t&&this.frameData&&((e||!this.offsets)&&this.recalculateOffsets(t),this.updateOffsets(this.offsets,void 0,!0)),this.imageData&&this.frameData&&this.recalculateZoomLimits(this.imageData,this.frameData)}updateOffsets(t,e,a){const n=this.imageData;if(!n||!this.frameData)return;if(this.frameData.length!==t.length)throw new $("Frame data and offsets are not the same length. This is a bug. Please report it.");if(!this.offsets.some((s,o)=>!(t[o].x===s.x&&t[o].y===s.y&&t[o].zoom===s.zoom))&&!a){e&&e();return}(!this.offsets||this.offsets.length!==this.frameData.length)&&(this.offsets=new Array(this.frameData.length)),this.frameData.forEach((s,o)=>{this.offsets[o]=Nr(t[o],s,this.imageData,this.forceImageCover)}),this._debouncedUpdateFrameOffsets(this.offsets,n,this.frameData,this.thresholdSettings,e)}getThresholdSettings(){return this.thresholdSettings}setThresholdSettings(t){this.thresholdSettings=t,this.imageData&&this.frameData&&this._debouncedUpdateFrameOffsets(this.offsets,this.imageData,this.frameData,t)}onFrameDataChanged(t){t(this.frameData),this.onFrameDataChangeListeners.push(t)}onZoom(t){this.onZoomChangeListeners.push(t)}updateFrameOffsets(t,e,a,n,i){if(!a||a.length===0||a.some(o=>!o))throw new $("Frame data not set. This is a bug");if(!this.workflowManager)throw new $("No workflow manager set, cannot update offsets.");const s=this.workflowManager.getCommandDispatcher();this.targetElements.forEach((o,l)=>{s(new O([new Ys(o,e,t[l]),new Js(o,n.useThreshold,n.invertThreshold,n.threshold,n.thresholdSaturation)]))}),this.stepName&&this.workflowManager.updateStorage(this.stepName,{frameOffsetsList:t}),i&&i()}recalculateZoomLimits(t,e){(this.minZoomScale.length!==e.length||this.maxZoomScale.length!==e.length)&&(this.minZoomScale=new Array(e.length),this.maxZoomScale=new Array(e.length)),e.forEach((a,n)=>{const i=Math.max(a.width/t.width,a.height/t.height);this.forceImageCover?(this.minZoomScale[n]=i,this.maxZoomScale[n]=i*2.5):(this.minZoomScale[n]=i/10,this.maxZoomScale[n]=i*2.5)})}recalculateOffsets(t){this.frameData&&((!this.offsets||this.offsets.length!==this.frameData.length)&&(this.offsets=new Array(this.frameData.length)),this.frameData.forEach((e,a)=>{this.offsets[a]=Da(t,e,this.initialZoom&&!this.forceImageCover?{scale:this.initialZoom}:void 0,this.forceImageCover)}),this._debouncedUpdateFrameOffsets(this.offsets,t,this.frameData,this.thresholdSettings))}}class _l{approveTransaction(t){throw new Error("Method not implemented.")}rejectTransaction(t){throw new Error("Method not implemented.")}getClient(){return this.client??{}}getWorkflowExperience(){return{}}setClient(t){this.client=t}getInitializationPromise(){return Promise.resolve()}isInitialized(){return!0}getInformationResults(){return[]}async reset(){}updateStateWithServer(t){}async outstandingRequestsPromise(){}async updateStateWithServerImmediate(t){}addPoller(t){}addConfirmCallback(t){}addEditedCallback(t){}addElementsCallback(t){}addInformationResultCallback(t){}addInitCallback(t){}addMakingAdjustmentsCallback(t){}addMandatoryCallback(t){}addMetadataCallback(t){}addSelectionCallback(t){}addStepSpecificStorageCallback(t,e){}addStorageCallback(t){}getCommandDispatcher(){return t=>{}}getLayouts(){return[]}getLayoutPreviewService(){return{getAll:()=>new Map}}getPreviewService(){}getModelContainer(){}getProfanities(){return[]}getRegionElements(t){return[]}getSerializedStep(t,e){}getStepSpecificServices(t){}getTransaction(){return{id:""}}getTransactionCustomer(){}setTransactionCustomer(){}setTransactionCustomerDetails(){}getWorkflow(){return{id:"",name:"",panels:[],steps:[],showModelOnFinishStep:!1,allowProofDownload:!1,introduction:"",stepGroups:[]}}markStepsAsInitialised(t){}markUpdateCompleted(t){}markUpdatePending(){return"123"}getWorkflowSelections(){return{}}getStepSelections(){return{}}setCurrentAdjustingStepId(t){}setEditedStatus(t,e){}setInformationResults(t){}setMandatoryFulfilled(t,e){}async setSelectionsAndElements(t,e,a){}toggleDesignConfirmed(){}updateMetadata(t,e){}async updateStorage(t,e){}injectIntoPreviewService(t){return Promise.resolve()}ejectFromPreviewService(){}setWorkflowStateSyncEnabled(t){}async updateTransactionShareActions(){}addValidationCallback(t){}setStepError(t,e,a){}getStepErrors(t){}getValidationErrors(){return{steps:new Map}}async updateTransactionStakeholders(){}getStepTags(t){return[]}}var Or=(r=>(r.SelectFrame="SelectFrame",r.SelectImage="SelectImage",r.Position="Position",r))(Or||{});class Ur extends nt{constructor(t,e,a){super(t,e,a);const n=e.data;this.frameService=new Rr(n.forceImageCover,n.initialZoomLevel),this.frameService.connectWorkflowManager(t,e.stepName)}selectVariant(t){const e=this.manager.getRegionElements(this.step.stepName);return dt.selectVariant(this.step,t.getResource(),e,this.manager,a=>this.setUpdateState(a))}onFrameDataChanged(t){this.frameService&&this.frameService.onFrameDataChanged(e=>{e&&t(e)})}async selectImage(t,e=!0,a=!0){var n;if(await dt.selectImage(this.step,t,this.manager,a),e){const i=((n=this.manager.getStepStorage(this.step.stepName))==null?void 0:n.framePatternData)||{};this.manager.updateStorage(this.step.stepName,{framePatternData:{...i,originalAssetKey:t.key,backgroundRemovedAssetKey:void 0,useOriginalAsset:void 0}})}}async canUseBackgroundRemover(){return this.manager.getClient().canUseAddon(Be.BackgroundRemover)}async canRemoveBackground(){var t,e,a,n;return await this.canUseBackgroundRemover()&&this.hasOriginalImageSelection()&&!!((e=(t=this.frameService)==null?void 0:t.getImageData())!=null&&e.src)&&!((n=(a=this.frameService)==null?void 0:a.getImageData())!=null&&n.svg)}async removeBackgroundFromImageSelection(t=!0){var i;if(!await this.canUseBackgroundRemover())throw new Error("The current Integration does not have access to the Background Remover. Please call canUseBackgroundRemover to ensure you disable this feature when appropriate.");const e=await this.getOriginalImageSelection();if(!e)throw new Error("You must supply an image selection before attempting to remove the background.");const a=await U.removeBackgroundFromAsset(e);t&&await dt.selectImage(this.step,a,this.manager,!1);const n=((i=this.manager.getStepStorage(this.step.stepName))==null?void 0:i.framePatternData)||{};return this.manager.updateStorage(this.step.stepName,{framePatternData:{...n,backgroundRemovedAssetKey:a.key,useOriginalAsset:!t}}),a}changeColors(t){dt.changeColors(this.step,this.manager,t)}getImageData(){if(this.frameService)return this.frameService.getImageData()}async getColorOption(){return this.step.data.colorOption}getAvailableColors(){return this.step.data.colorPickerEnabled?dt.availableColors(this.step,this.manager):Promise.resolve([])}isColorPickerEnabled(){return this.step.data.colorPickerEnabled??!1}async getOriginalImageColors(){const t=this.getImageData();return t!=null&&t.svg?(await lt(t.svg)).colors:void 0}getMaxAllowedColors(){return this.step.data.maxColors}getUniqueColorCount(){return dt.getUniqueColorCount(this.step,this.manager)}getCurrentFrameStep(t,e,a,n){return n&&n.length>1&&t===void 0?"SelectFrame":e||a||this.getImageData()?"Position":"SelectImage"}getFrameService(){return this.frameService}hasOverlayImageKey(){return this.step.data.overlayImageKey}hasOverlayImageUrl(){return this.step.data.overlayImageUrl}getWhitelistedExtensions(){return[...this.step.data.whitelistedExtensions,...this.step.data.whitelistedExtensions.includes(".jpg")?[".jpeg"]:[]]}async getOriginalImageSelection(){var e,a;const t=(a=(e=this.manager.getStepStorage(this.step.stepName))==null?void 0:e.framePatternData)==null?void 0:a.originalAssetKey;if(t)return U.getLocalOrFromServer(t)}async getBackgroundRemovedImageSelection(){var e,a;const t=(a=(e=this.manager.getStepStorage(this.step.stepName))==null?void 0:e.framePatternData)==null?void 0:a.backgroundRemovedAssetKey;if(t)return U.getLocalOrFromServer(t)}hasOriginalImageSelection(){var t,e;return!!((e=(t=this.manager.getStepStorage(this.step.stepName))==null?void 0:t.framePatternData)!=null&&e.originalAssetKey)}hasBackgroundRemovedImageSelection(){var t,e;return!!((e=(t=this.getFrameStepStorage())==null?void 0:t.framePatternData)!=null&&e.backgroundRemovedAssetKey)}getUseOriginalImageSelection(){var t,e;return((e=(t=this.getFrameStepStorage())==null?void 0:t.framePatternData)==null?void 0:e.useOriginalAsset)??!1}async setUseOriginalImageSelection(t){var n;const e=((n=this.getFrameStepStorage())==null?void 0:n.framePatternData)||{};if(e.useOriginalAsset===t)return;const a=await this.getOriginalImageSelection();if(!a)throw new Error("You must provide an image selection before calling setUseOriginalImageSelection");if(t)await this.selectImage(a,!1,!1);else{const i=await this.getBackgroundRemovedImageSelection();if(!i)throw new Error("You must call removeBackgroundFromImageSelection before attempting to apply the image.");await this.selectImage(i,!1,!1)}this.manager.updateStorage(this.step.stepName,{framePatternData:{...e,useOriginalAsset:t}})}getFrameStepStorage(){return this.manager.getStepStorage(this.step.stepName)}}const Xl=y.gql`
|
|
2243
2243
|
query GetLoggedInCustomer($email: String!) {
|
|
2244
2244
|
customer(emailAddress: $email) {
|
|
2245
2245
|
id
|
|
@@ -2357,5 +2357,5 @@
|
|
|
2357
2357
|
total
|
|
2358
2358
|
}
|
|
2359
2359
|
}
|
|
2360
|
-
`,sc=async(r,t,e)=>await b.getShadowGraphqlClient().mutate({mutation:nc,errorPolicy:"all",variables:{id:r,name:t},context:e}),oc=async(r,t)=>await b.getShadowGraphqlClient().mutate({mutation:Zl,errorPolicy:"all",variables:{id:r,name:t}}),lc=async(r,t)=>await b.getShadowGraphqlClient().mutate({mutation:rc,errorPolicy:"all",variables:{id:r,template:t}}),cc=async(r,t)=>await b.getShadowGraphqlClient().mutate({mutation:tc,errorPolicy:"all",variables:{id:r,template:t}}),dc=async r=>(await b.getShadowGraphqlClient().query({query:Xl,errorPolicy:"all",variables:{email:r}})).data.customer,Ac=async(r,t,e)=>await b.getShadowGraphqlClient().query({query:ec,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,offset:e,limit:t}}),uc=async(r,t)=>await b.getShadowGraphqlClient().query({query:ac,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r},context:t}),hc=async(r,t,e)=>{var n;const a=await b.getShadowGraphqlClient().query({query:Va,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,quicksearch:"",filters:{link:"and",status:{operator:"isAnyOf",values:["Created","DesignCompleted","ExternallyOrdered"]},template:{value:"false"}},offset:e,limit:t}});return((n=a==null?void 0:a.data.customerTransactionsFeed)==null?void 0:n.items)||[]},gc=async(r,t,e)=>{var n;const a=await b.getShadowGraphqlClient().query({query:Va,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,quicksearch:"",filters:{link:"and",status:{operator:"equals",value:"Ordered"},template:{value:"false"}},offset:e,limit:t}});return((n=a==null?void 0:a.data.customerTransactionsFeed)==null?void 0:n.items)||[]},mc=async(r,t,e)=>{var n;const a=await b.getShadowGraphqlClient().query({query:Va,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,quicksearch:"",filters:{link:"and",template:{value:"true"}},offset:e,limit:t}});return((n=a==null?void 0:a.data.customerTransactionsFeed)==null?void 0:n.items)||[]},fc=async(r,t,e)=>{var n;const a=await b.getShadowGraphqlClient().query({query:ic,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,offset:e,limit:t}});return((n=a==null?void 0:a.data.customerBundlesFeed)==null?void 0:n.items)||[]};(function(){try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode("#spiffThemeWrapper{width:100%;height:100%}")),document.head.appendChild(r)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();var Lr=(r=>(r.Manual="Manual",r.OnStart="OnStart",r.OnQuit="OnQuit",r.OnEnd="OnEnd",r))(Lr||{}),$r=(r=>(r.Email="Email",r.FirstName="FirstName",r.LastName="LastName",r.Phone="Phone",r.Apartment="Apartment",r.City="City",r.Country="Country",r.OrganizationName="OrganizationName",r.PostCode="PostCode",r.State="State",r.StreetAddress="StreetAddress",r))($r||{}),K;K={__e:function(r,t,e,a){for(var n,i,s;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(r)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(r,a||{}),s=n.__d),s)return n.__E=n}catch(o){r=o}throw r}},typeof Promise=="function"&&Promise.prototype.then.bind(Promise.resolve());var st,Ye,sn,Vr=[],Je=[],on=K.__b,ln=K.__r,cn=K.diffed,dn=K.__c,An=K.unmount;function pc(){for(var r;r=Vr.shift();)if(r.__P&&r.__H)try{r.__H.__h.forEach(Ce),r.__H.__h.forEach(ga),r.__H.__h=[]}catch(t){r.__H.__h=[],K.__e(t,r.__v)}}K.__b=function(r){st=null,on&&on(r)},K.__r=function(r){ln&&ln(r);var t=(st=r.__c).__H;t&&(Ye===st?(t.__h=[],st.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=Je,e.__N=e.i=void 0})):(t.__h.forEach(Ce),t.__h.forEach(ga),t.__h=[])),Ye=st},K.diffed=function(r){cn&&cn(r);var t=r.__c;t&&t.__H&&(t.__H.__h.length&&(Vr.push(t)!==1&&sn===K.requestAnimationFrame||((sn=K.requestAnimationFrame)||Cc)(pc)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==Je&&(e.__=e.__V),e.i=void 0,e.__V=Je})),Ye=st=null},K.__c=function(r,t){t.some(function(e){try{e.__h.forEach(Ce),e.__h=e.__h.filter(function(a){return!a.__||ga(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],K.__e(a,e.__v)}}),dn&&dn(r,t)},K.unmount=function(r){An&&An(r);var t,e=r.__c;e&&e.__H&&(e.__H.__.forEach(function(a){try{Ce(a)}catch(n){t=n}}),e.__H=void 0,t&&K.__e(t,e.__v))};var un=typeof requestAnimationFrame=="function";function Cc(r){var t,e=function(){clearTimeout(a),un&&cancelAnimationFrame(t),setTimeout(r)},a=setTimeout(e,100);un&&(t=requestAnimationFrame(e))}function Ce(r){var t=st,e=r.__c;typeof e=="function"&&(r.__c=void 0,e()),st=t}function ga(r){var t=st;r.__c=r.__(),st=t}exports.AddonHandle=Be;exports.ArrayInput=Nl;exports.AspectType=tt;exports.AssetNotFoundError=mt;exports.AssetType=Jt;exports.BringForwardCommand=to;exports.BringToBackCommand=Zs;exports.BringToFrontCommand=Xs;exports.CanvasCommand=R;exports.CollectionProduct=Wt;exports.ColorOptionGlobalPropertyHandle=ua;exports.CommandContext=Jn;exports.ConversionDataType=$r;exports.ConversionLocation=Lr;exports.CreateElementCommand=G;exports.CreateLayoutCommand=Pa;exports.DeleteElementCommand=Ct;exports.DigitalContentStepHandle=pr;exports.FileUploadGlobalPropertyHandle=Ir;exports.FlowExecutionNodeResult=jt;exports.FlowExecutionResult=Mr;exports.FlowService=kr;exports.FontAlignmentCommand=ar;exports.FontColorCommand=tr;exports.FontSizeCommand=er;exports.FontSourceCommand=la;exports.FrameService=Rr;exports.FrameStep=Or;exports.FrameStepHandle=Ur;exports.GlobalPropertyHandle=Qe;exports.GroupCommand=O;exports.IllustrationStepHandle=cr;exports.InformationMessageType=de;exports.InformationStepHandle=fr;exports.IntegrationProduct=ha;exports.IntegrationType=wn;exports.LayoutElementFactory=qs;exports.LayoutElementType=T;exports.LayoutNotFoundError=Y;exports.LayoutRenderingPurpose=Tt;exports.MaterialStepHandle=dr;exports.MisconfigurationError=Xt;exports.MockWorkflowManager=_l;exports.ModelStepHandle=Ar;exports.ModuleStepHandle=Cr;exports.MoveCommand=Ws;exports.ObjectInput=La;exports.ObjectInputType=Tr;exports.OptionGlobalPropertyHandle=Oa;exports.OptionNotFoundError=_t;exports.ParseError=St;exports.PictureStepHandle=ur;exports.ProductCameraRig=yn;exports.ProductCollection=xr;exports.ProductWorkflow=Mt;exports.PromiseCache=Ot;exports.PromiseQueue=Ba;exports.QuestionStepHandle=hr;exports.QueueablePromise=Ea;exports.ResizeCommand=Hs;exports.ResourceNotFoundError=Qt;exports.RotateCommand=js;exports.ScaleAxis=j;exports.SendBackwardsCommand=eo;exports.ShapeStepHandle=gr;exports.ShareActionType=Cn;exports.SpiffCommerceClient=jl;exports.StakeholderType=Kt;exports.StepAspectType=pn;exports.StepHandle=nt;exports.StepType=D;exports.TextAlgorithm=Bt;exports.TextChangeCommand=nr;exports.TextGlobalPropertyHandle=Dr;exports.TextInput=Ql;exports.TextStepHandle=mr;exports.Transform=Fr;exports.TransformCollection=Pr;exports.UnhandledBehaviorError=$;exports.UnitOfMeasurement=Sn;exports.UpdateImageSourceCommand=Ks;exports.Variant=it;exports.WorkflowExperienceEventType=Er;exports.WorkflowExperienceImpl=Br;exports.assetService=U;exports.browserColorToHex=Mn;exports.cmPerPixel=Ds;exports.createDesign=vr;exports.currentDirection=Bs;exports.dataUrlFromExternalUrl=ii;exports.designService=pe;exports.determineCorrectFontSizeAndLines=Yt;exports.digitalContentStepService=Fa;exports.domParser=ot;exports.duplicateBundle=lc;exports.duplicateTransaction=cc;exports.fetchAsString=at;exports.findAngle=ps;exports.findElement=L;exports.findPmsColors=vi;exports.frameDataCache=Pt;exports.frameStepService=dt;exports.generate=Q;exports.generateCommands=br;exports.generateSVGWithUnknownColors=lt;exports.generateStateFromDesignInputSteps=bl;exports.getAttributesFromArrayBuffer=ie;exports.getAxisAlignedBoundingBox=fs;exports.getBoundedOffsets=Nr;exports.getBundleThemeConfiguration=Jl;exports.getCustomer=dc;exports.getCustomerBundles=Ac;exports.getElementVertices=bs;exports.getFrameData=ce;exports.getIntegration=Qr;exports.getNEPoint=vs;exports.getNWPoint=Ss;exports.getOrderedTransactions=gc;exports.getOverrideThemeConfiguration=Yl;exports.getPointOfRotation=ys;exports.getSEPoint=Es;exports.getSvgElement=ke;exports.getTemplateBundles=fc;exports.getTemplateTransactions=mc;exports.getTransaction=Hl;exports.getTransactionThemeConfiguration=Kl;exports.getTransactionsForBundle=uc;exports.getTrueCoordinates=ws;exports.getUnorderedTransactions=hc;exports.getWorkflow=Gl;exports.getWorkflows=$a;exports.graphQlManager=b;exports.illustrationStepService=Ht;exports.isCloseToValue=Cs;exports.loadFont=bt;exports.matchHexToPms=wi;exports.materialStepService=ka;exports.mmPerPixel=Is;exports.modelStepService=Ma;exports.modifySVGColors=Sa;exports.moduleStepService=Ta;exports.nameBundle=sc;exports.nameTransaction=oc;exports.optionService=X;exports.outlineFontsInSvg=Ms;exports.patternImageDataCache=At;exports.persistenceService=k;exports.pictureStepService=Qa;exports.pmsToRgb=Ci;exports.questionStepService=Na;exports.registerFetchImplementation=ti;exports.registerWindowImplementation=Zr;exports.rehydrateSerializedLayout=oa;exports.rgbToPms=kn;exports.rotateAroundPoint=qt;exports.sanitizeSvgTree=xe;exports.setBearerAuthenticationToken=Pn;exports.setCanvasModule=Ca;exports.shapeStepService=Ft;exports.shortenUrl=rr;exports.spiffCoreConfiguration=gt;exports.stepAspectValuesToDesignInputSteps=Bl;exports.svgColorValueToDefinition=aa;exports.svgStringDimensions=xa;exports.svgToDataUrl=fa;exports.textStepService=H;exports.toast=sr;exports.xmlSerializer=wt;
|
|
2360
|
+
`,sc=async(r,t,e)=>await b.getShadowGraphqlClient().mutate({mutation:nc,errorPolicy:"all",variables:{id:r,name:t},context:e}),oc=async(r,t)=>await b.getShadowGraphqlClient().mutate({mutation:Zl,errorPolicy:"all",variables:{id:r,name:t}}),lc=async(r,t)=>await b.getShadowGraphqlClient().mutate({mutation:rc,errorPolicy:"all",variables:{id:r,template:t}}),cc=async(r,t)=>await b.getShadowGraphqlClient().mutate({mutation:tc,errorPolicy:"all",variables:{id:r,template:t}}),dc=async r=>(await b.getShadowGraphqlClient().query({query:Xl,errorPolicy:"all",variables:{email:r}})).data.customer,Ac=async(r,t,e)=>await b.getShadowGraphqlClient().query({query:ec,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,offset:e,limit:t}}),uc=async(r,t)=>await b.getShadowGraphqlClient().query({query:ac,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r},context:t}),hc=async(r,t,e)=>{var n;const a=await b.getShadowGraphqlClient().query({query:Va,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,quicksearch:"",filters:{link:"and",status:{operator:"isAnyOf",values:["Created","DesignCompleted","ExternallyOrdered"]},template:{value:"false"}},offset:e,limit:t}});return((n=a==null?void 0:a.data.customerTransactionsFeed)==null?void 0:n.items)||[]},gc=async(r,t,e)=>{var n;const a=await b.getShadowGraphqlClient().query({query:Va,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,quicksearch:"",filters:{link:"and",status:{operator:"equals",value:"Ordered"},template:{value:"false"}},offset:e,limit:t}});return((n=a==null?void 0:a.data.customerTransactionsFeed)==null?void 0:n.items)||[]},mc=async(r,t,e)=>{var n;const a=await b.getShadowGraphqlClient().query({query:Va,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,quicksearch:"",filters:{link:"and",template:{value:"true"}},offset:e,limit:t}});return((n=a==null?void 0:a.data.customerTransactionsFeed)==null?void 0:n.items)||[]},fc=async(r,t,e)=>{var n;const a=await b.getShadowGraphqlClient().query({query:ic,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,offset:e,limit:t}});return((n=a==null?void 0:a.data.customerBundlesFeed)==null?void 0:n.items)||[]};(function(){try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode("#spiffThemeWrapper{width:100%;height:100%}")),document.head.appendChild(r)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();var Lr=(r=>(r.Manual="Manual",r.OnStart="OnStart",r.OnQuit="OnQuit",r.OnEnd="OnEnd",r))(Lr||{}),$r=(r=>(r.Email="Email",r.FirstName="FirstName",r.LastName="LastName",r.Phone="Phone",r.Apartment="Apartment",r.City="City",r.Country="Country",r.OrganizationName="OrganizationName",r.PostCode="PostCode",r.State="State",r.StreetAddress="StreetAddress",r.DesignName="DesignName",r.PurchaseOrder="PurchaseOrder",r.DispatchDate="DispatchDate",r.Stakeholders="Stakeholders",r))($r||{}),K;K={__e:function(r,t,e,a){for(var n,i,s;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(r)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(r,a||{}),s=n.__d),s)return n.__E=n}catch(o){r=o}throw r}},typeof Promise=="function"&&Promise.prototype.then.bind(Promise.resolve());var st,Ye,sn,Vr=[],Je=[],on=K.__b,ln=K.__r,cn=K.diffed,dn=K.__c,An=K.unmount;function pc(){for(var r;r=Vr.shift();)if(r.__P&&r.__H)try{r.__H.__h.forEach(Ce),r.__H.__h.forEach(ga),r.__H.__h=[]}catch(t){r.__H.__h=[],K.__e(t,r.__v)}}K.__b=function(r){st=null,on&&on(r)},K.__r=function(r){ln&&ln(r);var t=(st=r.__c).__H;t&&(Ye===st?(t.__h=[],st.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=Je,e.__N=e.i=void 0})):(t.__h.forEach(Ce),t.__h.forEach(ga),t.__h=[])),Ye=st},K.diffed=function(r){cn&&cn(r);var t=r.__c;t&&t.__H&&(t.__H.__h.length&&(Vr.push(t)!==1&&sn===K.requestAnimationFrame||((sn=K.requestAnimationFrame)||Cc)(pc)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==Je&&(e.__=e.__V),e.i=void 0,e.__V=Je})),Ye=st=null},K.__c=function(r,t){t.some(function(e){try{e.__h.forEach(Ce),e.__h=e.__h.filter(function(a){return!a.__||ga(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],K.__e(a,e.__v)}}),dn&&dn(r,t)},K.unmount=function(r){An&&An(r);var t,e=r.__c;e&&e.__H&&(e.__H.__.forEach(function(a){try{Ce(a)}catch(n){t=n}}),e.__H=void 0,t&&K.__e(t,e.__v))};var un=typeof requestAnimationFrame=="function";function Cc(r){var t,e=function(){clearTimeout(a),un&&cancelAnimationFrame(t),setTimeout(r)},a=setTimeout(e,100);un&&(t=requestAnimationFrame(e))}function Ce(r){var t=st,e=r.__c;typeof e=="function"&&(r.__c=void 0,e()),st=t}function ga(r){var t=st;r.__c=r.__(),st=t}exports.AddonHandle=Be;exports.ArrayInput=Nl;exports.AspectType=tt;exports.AssetNotFoundError=mt;exports.AssetType=Jt;exports.BringForwardCommand=to;exports.BringToBackCommand=Zs;exports.BringToFrontCommand=Xs;exports.CanvasCommand=R;exports.CollectionProduct=Wt;exports.ColorOptionGlobalPropertyHandle=ua;exports.CommandContext=Jn;exports.ConversionDataType=$r;exports.ConversionLocation=Lr;exports.CreateElementCommand=G;exports.CreateLayoutCommand=Pa;exports.DeleteElementCommand=Ct;exports.DigitalContentStepHandle=pr;exports.FileUploadGlobalPropertyHandle=Ir;exports.FlowExecutionNodeResult=jt;exports.FlowExecutionResult=Mr;exports.FlowService=kr;exports.FontAlignmentCommand=ar;exports.FontColorCommand=tr;exports.FontSizeCommand=er;exports.FontSourceCommand=la;exports.FrameService=Rr;exports.FrameStep=Or;exports.FrameStepHandle=Ur;exports.GlobalPropertyHandle=Qe;exports.GroupCommand=O;exports.IllustrationStepHandle=cr;exports.InformationMessageType=de;exports.InformationStepHandle=fr;exports.IntegrationProduct=ha;exports.IntegrationType=wn;exports.LayoutElementFactory=qs;exports.LayoutElementType=T;exports.LayoutNotFoundError=Y;exports.LayoutRenderingPurpose=Tt;exports.MaterialStepHandle=dr;exports.MisconfigurationError=Xt;exports.MockWorkflowManager=_l;exports.ModelStepHandle=Ar;exports.ModuleStepHandle=Cr;exports.MoveCommand=Ws;exports.ObjectInput=La;exports.ObjectInputType=Tr;exports.OptionGlobalPropertyHandle=Oa;exports.OptionNotFoundError=_t;exports.ParseError=St;exports.PictureStepHandle=ur;exports.ProductCameraRig=yn;exports.ProductCollection=xr;exports.ProductWorkflow=Mt;exports.PromiseCache=Ot;exports.PromiseQueue=Ba;exports.QuestionStepHandle=hr;exports.QueueablePromise=Ea;exports.ResizeCommand=Hs;exports.ResourceNotFoundError=Qt;exports.RotateCommand=js;exports.ScaleAxis=j;exports.SendBackwardsCommand=eo;exports.ShapeStepHandle=gr;exports.ShareActionType=Cn;exports.SpiffCommerceClient=jl;exports.StakeholderType=Kt;exports.StepAspectType=pn;exports.StepHandle=nt;exports.StepType=D;exports.TextAlgorithm=Bt;exports.TextChangeCommand=nr;exports.TextGlobalPropertyHandle=Dr;exports.TextInput=Ql;exports.TextStepHandle=mr;exports.Transform=Fr;exports.TransformCollection=Pr;exports.UnhandledBehaviorError=$;exports.UnitOfMeasurement=Sn;exports.UpdateImageSourceCommand=Ks;exports.Variant=it;exports.WorkflowExperienceEventType=Er;exports.WorkflowExperienceImpl=Br;exports.assetService=U;exports.browserColorToHex=Mn;exports.cmPerPixel=Ds;exports.createDesign=vr;exports.currentDirection=Bs;exports.dataUrlFromExternalUrl=ii;exports.designService=pe;exports.determineCorrectFontSizeAndLines=Yt;exports.digitalContentStepService=Fa;exports.domParser=ot;exports.duplicateBundle=lc;exports.duplicateTransaction=cc;exports.fetchAsString=at;exports.findAngle=ps;exports.findElement=L;exports.findPmsColors=vi;exports.frameDataCache=Pt;exports.frameStepService=dt;exports.generate=Q;exports.generateCommands=br;exports.generateSVGWithUnknownColors=lt;exports.generateStateFromDesignInputSteps=bl;exports.getAttributesFromArrayBuffer=ie;exports.getAxisAlignedBoundingBox=fs;exports.getBoundedOffsets=Nr;exports.getBundleThemeConfiguration=Jl;exports.getCustomer=dc;exports.getCustomerBundles=Ac;exports.getElementVertices=bs;exports.getFrameData=ce;exports.getIntegration=Qr;exports.getNEPoint=vs;exports.getNWPoint=Ss;exports.getOrderedTransactions=gc;exports.getOverrideThemeConfiguration=Yl;exports.getPointOfRotation=ys;exports.getSEPoint=Es;exports.getSvgElement=ke;exports.getTemplateBundles=fc;exports.getTemplateTransactions=mc;exports.getTransaction=Hl;exports.getTransactionThemeConfiguration=Kl;exports.getTransactionsForBundle=uc;exports.getTrueCoordinates=ws;exports.getUnorderedTransactions=hc;exports.getWorkflow=Gl;exports.getWorkflows=$a;exports.graphQlManager=b;exports.illustrationStepService=Ht;exports.isCloseToValue=Cs;exports.loadFont=bt;exports.matchHexToPms=wi;exports.materialStepService=ka;exports.mmPerPixel=Is;exports.modelStepService=Ma;exports.modifySVGColors=Sa;exports.moduleStepService=Ta;exports.nameBundle=sc;exports.nameTransaction=oc;exports.optionService=X;exports.outlineFontsInSvg=Ms;exports.patternImageDataCache=At;exports.persistenceService=k;exports.pictureStepService=Qa;exports.pmsToRgb=Ci;exports.questionStepService=Na;exports.registerFetchImplementation=ti;exports.registerWindowImplementation=Zr;exports.rehydrateSerializedLayout=oa;exports.rgbToPms=kn;exports.rotateAroundPoint=qt;exports.sanitizeSvgTree=xe;exports.setBearerAuthenticationToken=Pn;exports.setCanvasModule=Ca;exports.shapeStepService=Ft;exports.shortenUrl=rr;exports.spiffCoreConfiguration=gt;exports.stepAspectValuesToDesignInputSteps=Bl;exports.svgColorValueToDefinition=aa;exports.svgStringDimensions=xa;exports.svgToDataUrl=fa;exports.textStepService=H;exports.toast=sr;exports.xmlSerializer=wt;
|
|
2361
2361
|
//# sourceMappingURL=index.js.map
|