@foxy.io/elements 1.39.0-beta.6 → 1.39.0-beta.8

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.
Files changed (27) hide show
  1. package/dist/cdn/foxy-customer-api.js +1 -1
  2. package/dist/cdn/foxy-customer-portal.js +14 -14
  3. package/dist/cdn/foxy-store-form.js +1 -1
  4. package/dist/cdn/shared-d0363ae9.js +1 -0
  5. package/dist/cdn/translations/country/zh-CN.json +248 -0
  6. package/dist/cdn/translations/country/zh-HK.json +245 -0
  7. package/dist/cdn/translations/customer-portal/de.json +1 -0
  8. package/dist/cdn/translations/customer-portal/en.json +1 -0
  9. package/dist/cdn/translations/customer-portal/es.json +1 -0
  10. package/dist/cdn/translations/customer-portal/fr.json +1 -0
  11. package/dist/cdn/translations/customer-portal/nl.json +1 -0
  12. package/dist/cdn/translations/customer-portal/pl.json +1 -0
  13. package/dist/cdn/translations/customer-portal/sv.json +1 -0
  14. package/dist/cdn/translations/customer-portal/zh-HK.json +1182 -0
  15. package/dist/cdn/translations/customer-portal/zh-hk.json +1 -0
  16. package/dist/elements/public/CustomerApi/CustomerApi.d.ts +9 -3
  17. package/dist/elements/public/CustomerApi/CustomerApi.js +3 -1
  18. package/dist/elements/public/CustomerApi/CustomerApi.js.map +1 -1
  19. package/dist/elements/public/CustomerPortal/CustomerPortal.d.ts +36 -0
  20. package/dist/elements/public/CustomerPortal/CustomerPortal.js +23 -9
  21. package/dist/elements/public/CustomerPortal/CustomerPortal.js.map +1 -1
  22. package/dist/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.js +9 -0
  23. package/dist/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.js.map +1 -1
  24. package/dist/elements/public/StoreForm/StoreForm.js +2 -2
  25. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
  26. package/package.json +1 -1
  27. package/dist/cdn/shared-1d0839af.js +0 -1
@@ -1 +1 @@
1
- import{C as s}from"./shared-1d0839af.js";export{C as CustomerApi}from"./shared-1d0839af.js";import"./shared-cb58dfcd.js";import"./shared-ba5c42c7.js";import"./shared-99a8889a.js";import"./shared-673d668a.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";customElements.define("foxy-customer-api",s);
1
+ import{C as s}from"./shared-d0363ae9.js";export{C as CustomerApi}from"./shared-d0363ae9.js";import"./shared-cb58dfcd.js";import"./shared-ba5c42c7.js";import"./shared-99a8889a.js";import"./shared-673d668a.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";customElements.define("foxy-customer-api",s);
@@ -1,4 +1,4 @@
1
- import"./foxy-customer.js";import"./shared-8ef0ca65.js";import"./shared-c18f681b.js";import"./shared-37348820.js";import"./shared-4a4f6eb9.js";import"./shared-5212ef4f.js";import{I as e}from"./shared-5b4e2567.js";import"./foxy-access-recovery-form.js";import"./foxy-payment-method-card.js";import{TransactionsTable as t}from"./foxy-transactions-table.js";import"./foxy-subscription-card.js";import"./foxy-subscription-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import{u as s}from"./shared-2508187b.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import"./shared-4d32d19e.js";import{_ as r,B as o,aH as i}from"./shared-cb58dfcd.js";import{h as a,L as n,c as d}from"./shared-ba5c42c7.js";import{A as l}from"./shared-99a8889a.js";import"./shared-673d668a.js";import{C as c}from"./shared-1d0839af.js";import{a as m,T as u}from"./shared-11351c00.js";import{U as p}from"./shared-cd96ff03.js";import{i as h}from"./shared-53e42a77.js";import{c as f}from"./shared-4e709717.js";import{A as g}from"./shared-5592ec6e.js";import{C as y}from"./shared-5afb584d.js";import{I as $}from"./shared-2aa23b5f.js";import"./shared-21e68b72.js";import"./foxy-update-payment-method-form.js";import"./shared-27cfa174.js";import"./shared-0c134ce7.js";import"./shared-f9ac8763.js";import"./shared-315d7620.js";import"./shared-6957b8e6.js";import"./shared-3556f4b7.js";import"./shared-7dc9c80b.js";import"./shared-c25538f1.js";import"./shared-80a1bf6f.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-f83207fb.js";import"./shared-343d1fd7.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-e5546d55.js";import"./shared-048d5cae.js";import"./foxy-copy-to-clipboard.js";import"./shared-d807cb20.js";import"./shared-360d6a20.js";import"./foxy-nucleon-element.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./foxy-template-set-card.js";import"./shared-0df46275.js";import"./shared-f1a70f51.js";import"./foxy-payment-card-embed.js";import"./shared-be442f26.js";import"./shared-8b0f00fa.js";import"./shared-c1e86ea4.js";import"./shared-f989c70e.js";import"./shared-bd5285ff.js";import"./shared-5fd5805c.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-cc7e1dc6.js";import"./shared-3a952968.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./shared-9e8ed3af.js";import"./shared-eea8debb.js";import"./shared-243456aa.js";import"./shared-651c44fa.js";import"./shared-edeeb089.js";import"./shared-1c355fac.js";import"./shared-cf12f33b.js";import"./shared-afe24913.js";import"./shared-d0aed1c1.js";import"./foxy-table.js";import"./shared-e3421ca1.js";import"./shared-c46affa4.js";import"./shared-b65d169b.js";import"./shared-83c5e004.js";import"./shared-495860b4.js";import"./shared-6683daed.js";import"./shared-a03facdf.js";import"./shared-a587fd4b.js";import"./shared-84eb85dd.js";import"./shared-230dee11.js";import"./shared-8eeddc22.js";import"./shared-ada5e9f5.js";import"./shared-cf613436.js";import"./shared-c05643e6.js";import"./shared-f69aacbc.js";import"./shared-43e2c3f6.js";import"./shared-79d0699c.js";import"./foxy-transaction-card.js";import"./shared-3661a086.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-eb963ba3.js";import"./shared-a6b2bd14.js";import"./shared-8b25a098.js";import"./shared-b738ee96.js";import"./shared-f1033d78.js";
1
+ import"./foxy-customer.js";import"./shared-8ef0ca65.js";import"./shared-c18f681b.js";import"./shared-37348820.js";import"./shared-4a4f6eb9.js";import"./shared-5212ef4f.js";import{I as e}from"./shared-5b4e2567.js";import"./foxy-access-recovery-form.js";import"./foxy-payment-method-card.js";import{TransactionsTable as t}from"./foxy-transactions-table.js";import"./foxy-subscription-card.js";import"./foxy-subscription-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import{u as s}from"./shared-2508187b.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import"./shared-4d32d19e.js";import{_ as r,B as o,aH as i}from"./shared-cb58dfcd.js";import{h as a,L as n,c as d}from"./shared-ba5c42c7.js";import{A as l}from"./shared-99a8889a.js";import"./shared-673d668a.js";import{C as c}from"./shared-d0363ae9.js";import{a as m,T as u}from"./shared-11351c00.js";import{U as p}from"./shared-cd96ff03.js";import{i as h}from"./shared-53e42a77.js";import{c as f}from"./shared-4e709717.js";import{A as g}from"./shared-5592ec6e.js";import{C as y}from"./shared-5afb584d.js";import{I as $}from"./shared-2aa23b5f.js";import"./shared-21e68b72.js";import"./foxy-update-payment-method-form.js";import"./shared-27cfa174.js";import"./shared-0c134ce7.js";import"./shared-f9ac8763.js";import"./shared-315d7620.js";import"./shared-6957b8e6.js";import"./shared-3556f4b7.js";import"./shared-7dc9c80b.js";import"./shared-c25538f1.js";import"./shared-80a1bf6f.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-f83207fb.js";import"./shared-343d1fd7.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-e5546d55.js";import"./shared-048d5cae.js";import"./foxy-copy-to-clipboard.js";import"./shared-d807cb20.js";import"./shared-360d6a20.js";import"./foxy-nucleon-element.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./foxy-template-set-card.js";import"./shared-0df46275.js";import"./shared-f1a70f51.js";import"./foxy-payment-card-embed.js";import"./shared-be442f26.js";import"./shared-8b0f00fa.js";import"./shared-c1e86ea4.js";import"./shared-f989c70e.js";import"./shared-bd5285ff.js";import"./shared-5fd5805c.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-cc7e1dc6.js";import"./shared-3a952968.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./shared-9e8ed3af.js";import"./shared-eea8debb.js";import"./shared-243456aa.js";import"./shared-651c44fa.js";import"./shared-edeeb089.js";import"./shared-1c355fac.js";import"./shared-cf12f33b.js";import"./shared-afe24913.js";import"./shared-d0aed1c1.js";import"./foxy-table.js";import"./shared-e3421ca1.js";import"./shared-c46affa4.js";import"./shared-b65d169b.js";import"./shared-83c5e004.js";import"./shared-495860b4.js";import"./shared-6683daed.js";import"./shared-a03facdf.js";import"./shared-a587fd4b.js";import"./shared-84eb85dd.js";import"./shared-230dee11.js";import"./shared-8eeddc22.js";import"./shared-ada5e9f5.js";import"./shared-cf613436.js";import"./shared-c05643e6.js";import"./shared-f69aacbc.js";import"./shared-43e2c3f6.js";import"./shared-79d0699c.js";import"./foxy-transaction-card.js";import"./shared-3661a086.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-eb963ba3.js";import"./shared-a6b2bd14.js";import"./shared-8b25a098.js";import"./shared-b738ee96.js";import"./shared-f1033d78.js";
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,7 +12,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function v(e,t,s){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,s),s}let b,x,S,_=e=>e;var j;class w extends(m(u(c),"customer-portal")){constructor(){super(...arguments),this.transactionsTableColumns=[t.priceColumn,t.summaryColumn,t.statusColumn,t.idColumn,t.dateColumn,t.receiptColumn],j.set(this,null),this.skipPasswordReset=!1,this.embedUrl=null,this.group=""}static get properties(){return r(r({},super.properties),{},{transactionsTableColumns:{attribute:!1},skipPasswordReset:{type:Boolean,attribute:"skip-password-reset"},embedUrl:{attribute:"embed-url"},group:{type:String}})}render(){var e,t;let s;try{s=new URL("./customer_portal_settings",this.base)}catch(e){s=void 0}return this.api.storage.getItem(l.SESSION)?!this.skipPasswordReset&&this.api.usesTemporaryPassword?a(b||(b=_` <foxy-internal-customer-portal-password-reset-view password-old="${0}" infer="password-reset" href="${0}" @update="${0}"> </foxy-internal-customer-portal-password-reset-view> `),h(null!==(e=function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}(this,j))&&void 0!==e?e:void 0),this.base,(e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.result)===p.UpdateResult.ResourceUpdated&&(this.api.usesTemporaryPassword=!1,v(this,j,null),this.requestUpdate())})):a(x||(x=_` <foxy-internal-customer-portal-logged-in-view embed-url="${0}" customer="${0}" class="h-full" infer="" href="${0}" .transactionsTableColumns="${0}"> </foxy-internal-customer-portal-logged-in-view> `),h(null!==(t=this.embedUrl)&&void 0!==t?t:void 0),this.base,h(null==s?void 0:s.toString()),this.transactionsTableColumns):a(S||(S=_` <foxy-internal-customer-portal-logged-out-view class="h-full" infer="" href="${0}" @password="${0}"> </foxy-internal-customer-portal-logged-out-view> `),h(null==s?void 0:s.toString()),(e=>{v(this,j,e.detail)}))}updated(e){super.updated(e);!(null!==this.api.storage.getItem(l.SESSION))||!this.skipPasswordReset&&this.api.usesTemporaryPassword||v(this,j,null)}}j=new WeakMap;let T,k,O,R,U=e=>e;class z extends(u(n)){constructor(){super(...arguments),this.disabled=!1,this.href="",this.icon=""}static get properties(){return r(r({},super.properties),{},{disabled:{type:Boolean},href:{type:String},icon:{type:String}})}render(){const e=f({"flex-auto leading-m font-medium tracking-wide text-m rounded-s transition-colors":!0,"text-primary hover-underline hover-cursor-pointer":!this.disabled,"focus-outline-none focus-ring-2 ring-primary-50 ring-offset-2":!this.disabled,"text-disabled cursor-default":this.disabled}),t=a(T||(T=U` ${0} <slot></slot> `),this.icon?a(k||(k=U`<iron-icon icon="${0}" class="icon-inline"></iron-icon>`),this.icon):"");return this.disabled?a(O||(O=U`<button class="${0}" disabled="disabled">${0}</button>`),e,t):a(R||(R=U` <a class="${0}" href="${0}" rel="nofollow noopener">${0}</a> `),e,this.href,t)}}let E,N,A,C,H,I,P,F,q=e=>e;const L=m(e);let B,D,G,J,M,W,K,Q,V,X,Y,Z,ee,te,se,re=e=>e;const oe=m(e);const ie=["html"],ae=["html"];let ne,de,le,ce,me,ue,pe,he,fe,ge,ye,$e,ve=e=>e;const be=m(y(u($(n))));let xe,Se,_e,je=e=>e;const we=y(u(m($(n),"customer-portal")));let Te,ke,Oe=e=>e;const Re=s.passwordStrength;class Ue extends(m(e)){constructor(){super(...arguments),this.passwordOld=null,this.__generatorOptions={checkStrength:e=>Re(e).id>=2}}static get properties(){return r(r({},super.properties),{},{passwordOld:{attribute:"password-old"}})}static get styles(){return[super.styles,d(Te||(Te=Oe`.max-w-25rem{max-width:25rem}`))]}static get v8n(){return[({password:e})=>!!e||"password:v8n_required",({password:e})=>!e||e.length<=50||"password:v8n_too_long",({password:e})=>!e||Re(e).id>=2||"password:v8n_too_weak"]}renderBody(){return a(ke||(ke=Oe` <div class="m-auto max-w-25rem leading-s"> <p class="text-xxl font-medium ${0}"> <foxy-i18n infer="" key="title"></foxy-i18n> </p> <p class="text-l ${0}"> <foxy-i18n infer="" key="subtitle"></foxy-i18n> </p> <foxy-internal-password-control infer="password" class="mt-m" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> <vaadin-button class="w-full mt-l" theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="submit"></foxy-i18n> </vaadin-button> </div> `),this.in("busy")?"text-disabled":"text-body",this.in("busy")?"text-disabled":"text-secondary",this.__generatorOptions,this.disabled||!this.in("idle"),(()=>this.submit()))}submit(){var e;this.edit({password_old:null!==(e=this.passwordOld)&&void 0!==e?e:""}),super.submit()}async _fetch(...e){const t=new Request(...e);if("PATCH"!==t.method)return super._fetch(...e);const s=await t.json(),r=await super._fetch(...e);return r.password_old=s.password_old,r.password=s.password,r}}customElements.define("foxy-internal-customer-portal-logged-in-view",class extends L{constructor(){var e;super(...arguments),e=this,this.customer="",this.embedUrl=null,this.loggingOutState="idle",this.transactionsTableColumns=[],this.loggingOutStateResetTimeout=null,this.__renderHeaderActionsSignOut=()=>{var t,s,r,o,i;const n="customer:header:actions:sign-out",d=this.loggingOutState,l=this.disabledSelector.matches(n)||!(null===(t=this.__customerElement)||void 0===t?void 0:t.in({idle:"snapshot"}))||"idle"!==d,c={"border-radius":"100%",padding:"var(--lumo-space-xs)",display:"flex",margin:"0",cursor:l?"default":"pointer"};return a(E||(E=q` <div style="display:flex;margin-left:var(--lumo-space-m)"> ${0} <vaadin-button data-testid="sign-out" aria-label="${0}" style="${0}" theme="icon" ?disabled="${0}" @click="${0}"> ${0} </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot(`${n}:before`),this.t("sign_out").toString(),Object.entries(c).reduce(((e,[t,s])=>`${e}${t}:${s};`),""),l,(async function(){try{e.loggingOutState="busy",await new g(e).fetch("foxy://customer-api/session",{method:"DELETE"}),e.loggingOutState="idle"}catch(t){e.loggingOutState="fail",e.loggingOutStateResetTimeout=setTimeout((()=>{e.loggingOutState="idle",e.loggingOutStateResetTimeout=null}),1e3)}}),"idle"===d?a(N||(N=q`<iron-icon icon="icons:exit-to-app"></iron-icon>`)):a(A||(A=q` <foxy-spinner layout="no-label" state="${0}" style="margin:auto" lang="${0}" ns="${0}"> </foxy-spinner> `),"fail"===d?"error":"busy",this.lang,[this.ns,null!==(r=null===(s=customElements.get("foxy-customer"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",null!==(i=null===(o=customElements.get("foxy-spinner"))||void 0===o?void 0:o.defaultNS)&&void 0!==i?i:""].join(" ")),this.renderTemplateOrSlot(`${n}:after`))},this.__renderSubscriptions=(e,t)=>{const s="customer:subscriptions";return e(C||(C=q`
15
+ ***************************************************************************** */function v(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function b(e,t,s){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,s),s}let x,S,_,j=e=>e;var w;class T extends(m(u(c),"customer-portal")){constructor(){super(...arguments),this.transactionsTableColumns=[t.priceColumn,t.summaryColumn,t.statusColumn,t.idColumn,t.dateColumn,t.receiptColumn],w.set(this,null),this.skipPasswordReset=!1,this.embedUrl=null,this.group=""}static get properties(){return r(r({},super.properties),{},{transactionsTableColumns:{attribute:!1},skipPasswordReset:{type:Boolean,attribute:"skip-password-reset"},embedUrl:{attribute:"embed-url"},group:{type:String}})}render(){var e,t;let s;try{s=new URL("./customer_portal_settings",this.base)}catch(e){s=void 0}return this.api.storage.getItem(l.SESSION)?!this.skipPasswordReset&&this.api.usesTemporaryPassword&&v(this,w)?a(x||(x=j` <foxy-internal-customer-portal-password-reset-view password-old="${0}" infer="password-reset" href="${0}" @update="${0}" @skip="${0}"> </foxy-internal-customer-portal-password-reset-view> `),h(null!==(e=v(this,w))&&void 0!==e?e:void 0),this.base,this.__handlePasswordResetUpdate,this.__handlePasswordResetSkip):a(S||(S=j` <foxy-internal-customer-portal-logged-in-view embed-url="${0}" customer="${0}" class="h-full" infer="" href="${0}" .transactionsTableColumns="${0}"> </foxy-internal-customer-portal-logged-in-view> `),h(null!==(t=this.embedUrl)&&void 0!==t?t:void 0),this.base,h(null==s?void 0:s.toString()),this.transactionsTableColumns):a(_||(_=j` <foxy-internal-customer-portal-logged-out-view class="h-full" infer="" href="${0}" @password="${0}"> </foxy-internal-customer-portal-logged-out-view> `),h(null==s?void 0:s.toString()),(e=>{b(this,w,e.detail)}))}updated(e){super.updated(e);!(null!==this.api.storage.getItem(l.SESSION))||!this.skipPasswordReset&&this.api.usesTemporaryPassword||b(this,w,null)}__handlePasswordResetUpdate(e){var t;(null===(t=e.detail)||void 0===t?void 0:t.result)===p.UpdateResult.ResourceUpdated&&(this.api.usesTemporaryPassword=!1,b(this,w,null),this.requestUpdate(),this.dispatchEvent(new T.PasswordResetEvent("passwordreset",{detail:{result:"completed"}})))}__handlePasswordResetSkip(){b(this,w,null),this.requestUpdate(),this.dispatchEvent(new T.PasswordResetEvent("passwordreset",{detail:{result:"skipped"}}))}}w=new WeakMap,T.PasswordResetEvent=class extends CustomEvent{};let k,O,R,E,U=e=>e;class z extends(u(n)){constructor(){super(...arguments),this.disabled=!1,this.href="",this.icon=""}static get properties(){return r(r({},super.properties),{},{disabled:{type:Boolean},href:{type:String},icon:{type:String}})}render(){const e=f({"flex-auto leading-m font-medium tracking-wide text-m rounded-s transition-colors":!0,"text-primary hover-underline hover-cursor-pointer":!this.disabled,"focus-outline-none focus-ring-2 ring-primary-50 ring-offset-2":!this.disabled,"text-disabled cursor-default":this.disabled}),t=a(k||(k=U` ${0} <slot></slot> `),this.icon?a(O||(O=U`<iron-icon icon="${0}" class="icon-inline"></iron-icon>`),this.icon):"");return this.disabled?a(R||(R=U`<button class="${0}" disabled="disabled">${0}</button>`),e,t):a(E||(E=U` <a class="${0}" href="${0}" rel="nofollow noopener">${0}</a> `),e,this.href,t)}}let N,P,C,A,H,I,q,F,L=e=>e;const B=m(e);let D,G,J,M,W,K,Q,V,X,Y,Z,ee,te,se,re,oe=e=>e;const ie=m(e);const ae=["html"],ne=["html"];let de,le,ce,me,ue,pe,he,fe,ge,ye,$e,ve,be=e=>e;const xe=m(y(u($(n))));let Se,_e,je,we=e=>e;const Te=y(u(m($(n),"customer-portal")));let ke,Oe,Re=e=>e;const Ee=s.passwordStrength;class Ue extends(m(e)){constructor(){super(...arguments),this.passwordOld=null,this.__generatorOptions={checkStrength:e=>Ee(e).id>=2}}static get properties(){return r(r({},super.properties),{},{passwordOld:{attribute:"password-old"}})}static get styles(){return[super.styles,d(ke||(ke=Re`.max-w-25rem{max-width:25rem}`))]}static get v8n(){return[({password:e})=>!!e||"password:v8n_required",({password:e})=>!e||e.length<=50||"password:v8n_too_long",({password:e})=>!e||Ee(e).id>=2||"password:v8n_too_weak"]}renderBody(){return a(Oe||(Oe=Re` <div class="m-auto max-w-25rem leading-s"> <p class="text-xxl font-medium ${0}"> <foxy-i18n infer="" key="title"></foxy-i18n> </p> <p class="text-l ${0}"> <foxy-i18n infer="" key="subtitle"></foxy-i18n> </p> <foxy-internal-password-control infer="password" class="mt-m" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> <vaadin-button class="w-full mt-l" theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="submit"></foxy-i18n> </vaadin-button> <vaadin-button class="w-full mt-s" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="skip"></foxy-i18n> </vaadin-button> </div> `),this.in("busy")?"text-disabled":"text-body",this.in("busy")?"text-disabled":"text-secondary",this.__generatorOptions,this.disabled||!this.in("idle"),(()=>this.submit()),this.disabled||!this.in("idle"),(()=>this.dispatchEvent(new CustomEvent("skip"))))}submit(){var e;this.edit({password_old:null!==(e=this.passwordOld)&&void 0!==e?e:""}),super.submit()}async _fetch(...e){const t=new Request(...e);if("PATCH"!==t.method)return super._fetch(...e);const s=await t.json(),r=await super._fetch(...e);return r.password_old=s.password_old,r.password=s.password,r}}customElements.define("foxy-internal-customer-portal-logged-in-view",class extends B{constructor(){var e;super(...arguments),e=this,this.customer="",this.embedUrl=null,this.loggingOutState="idle",this.transactionsTableColumns=[],this.loggingOutStateResetTimeout=null,this.__renderHeaderActionsSignOut=()=>{var t,s,r,o,i;const n="customer:header:actions:sign-out",d=this.loggingOutState,l=this.disabledSelector.matches(n)||!(null===(t=this.__customerElement)||void 0===t?void 0:t.in({idle:"snapshot"}))||"idle"!==d,c={"border-radius":"100%",padding:"var(--lumo-space-xs)",display:"flex",margin:"0",cursor:l?"default":"pointer"};return a(N||(N=L` <div style="display:flex;margin-left:var(--lumo-space-m)"> ${0} <vaadin-button data-testid="sign-out" aria-label="${0}" style="${0}" theme="icon" ?disabled="${0}" @click="${0}"> ${0} </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot(`${n}:before`),this.t("sign_out").toString(),Object.entries(c).reduce(((e,[t,s])=>`${e}${t}:${s};`),""),l,(async function(){try{e.loggingOutState="busy",await new g(e).fetch("foxy://customer-api/session",{method:"DELETE"}),e.loggingOutState="idle"}catch(t){e.loggingOutState="fail",e.loggingOutStateResetTimeout=setTimeout((()=>{e.loggingOutState="idle",e.loggingOutStateResetTimeout=null}),1e3)}}),"idle"===d?a(P||(P=L`<iron-icon icon="icons:exit-to-app"></iron-icon>`)):a(C||(C=L` <foxy-spinner layout="no-label" state="${0}" style="margin:auto" lang="${0}" ns="${0}"> </foxy-spinner> `),"fail"===d?"error":"busy",this.lang,[this.ns,null!==(r=null===(s=customElements.get("foxy-customer"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",null!==(i=null===(o=customElements.get("foxy-spinner"))||void 0===o?void 0:o.defaultNS)&&void 0!==i?i:""].join(" ")),this.renderTemplateOrSlot(`${n}:after`))},this.__renderSubscriptions=(e,t)=>{const s="customer:subscriptions";return e(A||(A=L`
16
16
  ${0}
17
17
 
18
18
  <foxy-internal-customer-portal-subscriptions
@@ -29,7 +29,7 @@ PERFORMANCE OF THIS SOFTWARE.
29
29
  </foxy-internal-customer-portal-subscriptions>
30
30
 
31
31
  ${0}
32
- `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),this.hiddenSelector.zoom(s).toString(),t.group,t.lang,t.ns,this.getNestedTemplates(s),this.data,t.data,this.renderTemplateOrSlot(`${s}:after`))},this.__renderTransactions=(e,t)=>{const s="customer:transactions";return e(H||(H=q`
32
+ `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),this.hiddenSelector.zoom(s).toString(),t.group,t.lang,t.ns,this.getNestedTemplates(s),this.data,t.data,this.renderTemplateOrSlot(`${s}:after`))},this.__renderTransactions=(e,t)=>{const s="customer:transactions";return e(H||(H=L`
33
33
  ${0}
34
34
 
35
35
  <foxy-internal-customer-portal-transactions
@@ -46,12 +46,12 @@ PERFORMANCE OF THIS SOFTWARE.
46
46
  </foxy-internal-customer-portal-transactions>
47
47
 
48
48
  ${0}
49
- `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),this.hiddenSelector.zoom(s).toString(),t.group,t.lang,t.ns,this.getNestedTemplates(s),t.data,this.transactionsTableColumns,this.renderTemplateOrSlot(`${s}:after`))}}static get properties(){return r(r({},super.properties),{},{customer:{type:String},embedUrl:{attribute:"embed-url"},loggingOutState:{attribute:!1},transactionsTableColumns:{attribute:!1},loggingOutStateResetTimeout:{attribute:!1}})}renderBody(){var e,t,s;const r=this.hiddenSelector.zoom("customer"),i=new o(["attributes","transactions","subscriptions","addresses:actions:create","addresses:list:form:header","addresses:list:form:ignore-address-restrictions","payment-methods:list:card:actions:update:form:template-set","header:actions:edit:form:header","header:actions:edit:form:is-anonymous","header:actions:edit:form:forgot-password","header:actions:edit:form:create","header:actions:edit:form:delete",r.toString()].join(" ")).toString(),n=this.getNestedTemplates("customer"),d=n["header:actions:after"],l=n.default;return n["header:actions:after"]=(e,t)=>{const s=r.matches("header:actions:sign-out",!0);return e(I||(I=q`
49
+ `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),this.hiddenSelector.zoom(s).toString(),t.group,t.lang,t.ns,this.getNestedTemplates(s),t.data,this.transactionsTableColumns,this.renderTemplateOrSlot(`${s}:after`))}}static get properties(){return r(r({},super.properties),{},{customer:{type:String},embedUrl:{attribute:"embed-url"},loggingOutState:{attribute:!1},transactionsTableColumns:{attribute:!1},loggingOutStateResetTimeout:{attribute:!1}})}renderBody(){var e,t,s;const r=this.hiddenSelector.zoom("customer"),i=new o(["attributes","transactions","subscriptions","addresses:actions:create","addresses:list:form:header","addresses:list:form:ignore-address-restrictions","payment-methods:list:card:actions:update:form:template-set","header:actions:edit:form:header","header:actions:edit:form:is-anonymous","header:actions:edit:form:forgot-password","header:actions:edit:form:create","header:actions:edit:form:delete",r.toString()].join(" ")).toString(),n=this.getNestedTemplates("customer"),d=n["header:actions:after"],l=n.default;return n["header:actions:after"]=(e,t)=>{const s=r.matches("header:actions:sign-out",!0);return e(I||(I=L`
50
50
  <div style="display:flex">
51
51
  ${0}
52
52
  ${0}
53
53
  </div>
54
- `),s?"":this.__renderHeaderActionsSignOut(),null==d?void 0:d(e,t))},n.default=(e,t)=>{const s=this.__renderSubscriptions,o=this.__renderTransactions;return e(P||(P=q`
54
+ `),s?"":this.__renderHeaderActionsSignOut(),null==d?void 0:d(e,t))},n.default=(e,t)=>{const s=this.__renderSubscriptions,o=this.__renderTransactions;return e(q||(q=L`
55
55
  <style>
56
56
  .space-y-m > :not([hidden]) ~ :not([hidden]) {
57
57
  --tw-space-y-reverse: 0;
@@ -66,7 +66,7 @@ PERFORMANCE OF THIS SOFTWARE.
66
66
  ${0}
67
67
  ${0}
68
68
  </div>
69
- `),r.matches("default",!0)?"":null==l?void 0:l(e,t),r.matches("subscriptions",!0)?"":s(e,t),r.matches("transactions",!0)?"":o(e,t))},a(F||(F=q` <foxy-customer readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="customer" embed-url="${0}" group="${0}" href="${0}" lang="${0}" ns="${0} ${0}" id="customer" .templates="${0}" .settings="${0}" @update="${0}"> </foxy-customer> `),this.readonlySelector.zoom("customer").toString(),this.disabledSelector.zoom("customer").toString(),i,h(null!==(e=this.embedUrl)&&void 0!==e?e:void 0),this.group,this.customer,this.lang,this.ns,null!==(s=null===(t=customElements.get("foxy-customer"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"",n,this.data,(()=>this.requestUpdate()))}disconnectedCallback(){super.disconnectedCallback(),this.loggingOutStateResetTimeout&&clearTimeout(this.loggingOutStateResetTimeout)}get __customerElement(){return this.renderRoot.querySelector("#customer")}}),customElements.define("foxy-internal-customer-portal-logged-out-view",class extends oe{constructor(){super(...arguments),this.page="sign-in",this.__renderAccessRecoveryHeader=()=>{var e,t,s,r;const{lang:o,ns:i}=this,n=this.renderRoot.querySelector("#access-recovery-form"),d=!!(null==n?void 0:n.in("busy"));return a(B||(B=re` <div class="flex flex-col leading-s font-lumo" data-testid="access-recovery:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="recover_access" ns="${0} ${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="recover_access_hint" ns="${0} ${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:header:before"),d?"text-disabled":"text-body",o,i,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",d?"text-disabled":"text-secondary",o,i,null!==(r=null===(s=customElements.get("foxy-access-recovery-form"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",this.renderTemplateOrSlot("access-recovery:header:after"))},this.__renderAccessRecoveryBack=()=>{var e,t;const s=this.renderRoot.querySelector("#access-recovery-form"),r=this.disabledSelector.zoom("access-recovery");return a(D||(D=re` <div> ${0} <vaadin-button data-testid="access-recovery:back" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="back" ns="${0} ${0}"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:back:before"),!!(null==s?void 0:s.in("busy"))||r.matches("back",!0),(()=>this.page="sign-in"),this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.renderTemplateOrSlot("access-recovery:back:after"))},this.__renderAccessRecoveryForm=()=>{var e,t;const s="access-recovery:form",r=this.hiddenSelector.zoom(s);return a(G||(G=re` <div> ${0} <foxy-access-recovery-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="access-recovery:form" parent="foxy://customer-api/recover" group="${0}" lang="${0}" ns="${0} ${0}" id="access-recovery-form" .templates="${0}" @update="${0}"> </foxy-access-recovery-form> ${0} </div> `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),r.toString(),this.group,this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.getNestedTemplates(s),(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${s}:after`))},this.__renderAccessRecovery=()=>{const e="access-recovery",t=this.hiddenSelector.zoom(e);return a(J||(J=re` <div class="h-full flex" data-testid="access-recovery"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} <div class="space-y-s"> ${0} ${0} </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${e}:before`),t.matches("header",!0)?"":this.__renderAccessRecoveryHeader(),t.matches("form",!0)?"":this.__renderAccessRecoveryForm(),t.matches("back",!0)?"":this.__renderAccessRecoveryBack(),this.renderTemplateOrSlot(`${e}:after`))},this.__renderSignInHeader=()=>{var e,t,s,r;const{lang:o,ns:i}=this,n=this.renderRoot.querySelector("#sign-in-form"),d=!!(null==n?void 0:n.in("busy"));return a(M||(M=re` <div class="flex flex-col leading-s font-lumo" data-testid="sign-in:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="sign_in" ns="${0} ${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="sign_in_hint" ns="${0} ${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("sign-in:header:before"),d?"text-disabled":"text-body",o,i,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",d?"text-disabled":"text-secondary",o,i,null!==(r=null===(s=customElements.get("foxy-sign-in-form"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",this.renderTemplateOrSlot("sign-in:header:after"))},this.__renderSignInRecover=()=>{var e,t;const s=this.renderRoot.querySelector("#sign-in-form"),r=this.disabledSelector.zoom("sign-in");return a(W||(W=re` <div> ${0} <vaadin-button data-testid="sign-in:recover" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="recover_access" ns="${0} ${0}"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-in:recover:before"),!!(null==s?void 0:s.in("busy"))||r.matches("recover",!0),(()=>this.page="access-recovery"),this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.renderTemplateOrSlot("sign-in:recover:after"))},this.__renderSignInSignUp=()=>{const e=this.renderRoot.querySelector("#sign-in-form"),t=this.disabledSelector.zoom("sign-in");return a(K||(K=re` <div> ${0} <vaadin-button data-testid="sign-in:signup" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="sign_up" ns="${0} sign-in-form"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-in:signup:before"),!!(null==e?void 0:e.in("busy"))||t.matches("signup",!0),(()=>this.page="sign-up"),this.lang,this.ns,this.renderTemplateOrSlot("sign-in:signup:after"))},this.__renderSignInForm=()=>{var e,t;const s="sign-in:form",r=this.hiddenSelector.zoom(s);return a(Q||(Q=re` <div> ${0} <foxy-sign-in-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="sign-in:form" parent="foxy://customer-api/session" group="${0}" lang="${0}" id="sign-in-form" ns="${0} ${0}" .templates="${0}" @update="${0}"> </foxy-sign-in-form> ${0} </div> `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),r.toString(),this.group,this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.getNestedTemplates("sign-in:form"),(e=>{var t,s;const r=null!==(s=null===(t=e.currentTarget.form.credential)||void 0===t?void 0:t.password)&&void 0!==s?s:null;this.dispatchEvent(new CustomEvent("password",{detail:r})),this.requestUpdate()}),this.renderTemplateOrSlot(`${s}:after`))},this.__renderSignIn=()=>{var e,t;const s="sign-in",r=this.hiddenSelector.zoom(s),o=!0===(null===(t=null===(e=this.data)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.enabled),i=r.matches("signup",!0)||!o;return a(V||(V=re` <div class="h-full flex" data-testid="sign-in"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} <div class="space-y-s"> ${0} <div class="flex justify-center gap-s"> ${0} ${0} </div> </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${s}:before`),r.matches("header",!0)?"":this.__renderSignInHeader(),r.matches("form",!0)?"":this.__renderSignInForm(),i?"":this.__renderSignInSignUp(),r.matches("recover",!0)?"":this.__renderSignInRecover(),this.renderTemplateOrSlot(`${s}:after`))},this.__renderSignUpHeader=()=>{const{lang:e,ns:t}=this,s=this.renderRoot.querySelector("#sign-up-form"),r=!!(null==s?void 0:s.in("busy"));return a(X||(X=re` <div class="flex flex-col leading-s font-lumo" data-testid="sign-up:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="sign_up" ns="${0} sign-up-form"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="sign_up_hint" ns="${0} sign-up-form"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("sign-up:header:before"),r?"text-disabled":"text-body",e,t,r?"text-disabled":"text-secondary",e,t,this.renderTemplateOrSlot("sign-up:header:after"))},this.__renderSignUpGoBack=()=>{const e=this.renderRoot.querySelector("#sign-up-form"),t=this.disabledSelector.zoom("sign-up");return a(Y||(Y=re` <div> ${0} <vaadin-button data-testid="sign-up:go-back" class="w-full" theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="go_back" ns="${0} sign-up-form"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-up:go-back:before"),!!(null==e?void 0:e.in("busy"))||t.matches("go-back",!0),(()=>this.page="sign-in"),this.lang,this.ns,this.renderTemplateOrSlot("sign-up:go-back:after"))},this.__renderSignUpForm=()=>{const e="sign-up:form",t=["header","tax-id","is-anonymous","password-old","forgot-password","timestamps","delete",this.hiddenSelector.zoom(e).toString()];return a(Z||(Z=re` <div> ${0} <foxy-customer-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="sign-up:form" parent="foxy://customer-api/signup" group="${0}" lang="${0}" id="sign-up-form" ns="${0} sign-up-form" .templates="${0}" .settings="${0}" @update="${0}"> </foxy-customer-form> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),this.readonlySelector.zoom(e).toString(),this.disabledSelector.zoom(e).toString(),new o(t.join(" ").trim()),this.group,this.lang,this.ns,this.getNestedTemplates("sign-up:form"),this.data,(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${e}:after`))},this.__renderSignUp=()=>{const e="sign-up",t=this.hiddenSelector.zoom(e);return a(ee||(ee=re` <div class="h-full flex" data-testid="sign-up"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} ${0} ${0} </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${e}:before`),t.matches("header",!0)?"":this.__renderSignUpHeader(),t.matches("form",!0)?"":this.__renderSignUpForm(),t.matches("go-back",!0)?"":this.__renderSignUpGoBack(),this.renderTemplateOrSlot(`${e}:after`))}}static get properties(){return r(r({},super.properties),{},{group:{type:String},page:{type:String}})}static get styles(){return[super.styles,d(te||(te=re`.max-w-25rem{max-width:25rem}`))]}renderBody(){const{page:e,hiddenSelector:t}=this;return"access-recovery"!==e||t.matches("access-recovery",!0)?"sign-in"!==e||t.matches("sign-in",!0)?"sign-up"!==e||t.matches("sign-up",!0)?a(se||(se=re``)):this.__renderSignUp():this.__renderSignIn():this.__renderAccessRecovery()}}),customElements.define("foxy-internal-customer-portal-password-reset-view",Ue),customElements.define("foxy-internal-customer-portal-subscriptions",class extends be{constructor(){super(...arguments),this.settings=null,this.customer=null,this.group="",this.__renderFormHeaderActionsUpdate=(e,t)=>{var s;const r=!!(null===(s=t.data)||void 0===s?void 0:s.end_date)&&new Date(t.data.end_date).getTime()<=Date.now();let o="";if(!r&&t.in({idle:"snapshot"})){const e=t.data._links["fx:sub_token_url"].href,s=new URL(e);s.searchParams.set("cart","checkout"),s.searchParams.set("sub_restart","auto"),o=s.toString()}return e(ne||(ne=ve`
69
+ `),r.matches("default",!0)?"":null==l?void 0:l(e,t),r.matches("subscriptions",!0)?"":s(e,t),r.matches("transactions",!0)?"":o(e,t))},a(F||(F=L` <foxy-customer readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="customer" embed-url="${0}" group="${0}" href="${0}" lang="${0}" ns="${0} ${0}" id="customer" .templates="${0}" .settings="${0}" @update="${0}"> </foxy-customer> `),this.readonlySelector.zoom("customer").toString(),this.disabledSelector.zoom("customer").toString(),i,h(null!==(e=this.embedUrl)&&void 0!==e?e:void 0),this.group,this.customer,this.lang,this.ns,null!==(s=null===(t=customElements.get("foxy-customer"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"",n,this.data,(()=>this.requestUpdate()))}disconnectedCallback(){super.disconnectedCallback(),this.loggingOutStateResetTimeout&&clearTimeout(this.loggingOutStateResetTimeout)}get __customerElement(){return this.renderRoot.querySelector("#customer")}}),customElements.define("foxy-internal-customer-portal-logged-out-view",class extends ie{constructor(){super(...arguments),this.page="sign-in",this.__renderAccessRecoveryHeader=()=>{var e,t,s,r;const{lang:o,ns:i}=this,n=this.renderRoot.querySelector("#access-recovery-form"),d=!!(null==n?void 0:n.in("busy"));return a(D||(D=oe` <div class="flex flex-col leading-s font-lumo" data-testid="access-recovery:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="recover_access" ns="${0} ${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="recover_access_hint" ns="${0} ${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:header:before"),d?"text-disabled":"text-body",o,i,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",d?"text-disabled":"text-secondary",o,i,null!==(r=null===(s=customElements.get("foxy-access-recovery-form"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",this.renderTemplateOrSlot("access-recovery:header:after"))},this.__renderAccessRecoveryBack=()=>{var e,t;const s=this.renderRoot.querySelector("#access-recovery-form"),r=this.disabledSelector.zoom("access-recovery");return a(G||(G=oe` <div> ${0} <vaadin-button data-testid="access-recovery:back" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="back" ns="${0} ${0}"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:back:before"),!!(null==s?void 0:s.in("busy"))||r.matches("back",!0),(()=>this.page="sign-in"),this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.renderTemplateOrSlot("access-recovery:back:after"))},this.__renderAccessRecoveryForm=()=>{var e,t;const s="access-recovery:form",r=this.hiddenSelector.zoom(s);return a(J||(J=oe` <div> ${0} <foxy-access-recovery-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="access-recovery:form" parent="foxy://customer-api/recover" group="${0}" lang="${0}" ns="${0} ${0}" id="access-recovery-form" .templates="${0}" @update="${0}"> </foxy-access-recovery-form> ${0} </div> `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),r.toString(),this.group,this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.getNestedTemplates(s),(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${s}:after`))},this.__renderAccessRecovery=()=>{const e="access-recovery",t=this.hiddenSelector.zoom(e);return a(M||(M=oe` <div class="h-full flex" data-testid="access-recovery"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} <div class="space-y-s"> ${0} ${0} </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${e}:before`),t.matches("header",!0)?"":this.__renderAccessRecoveryHeader(),t.matches("form",!0)?"":this.__renderAccessRecoveryForm(),t.matches("back",!0)?"":this.__renderAccessRecoveryBack(),this.renderTemplateOrSlot(`${e}:after`))},this.__renderSignInHeader=()=>{var e,t,s,r;const{lang:o,ns:i}=this,n=this.renderRoot.querySelector("#sign-in-form"),d=!!(null==n?void 0:n.in("busy"));return a(W||(W=oe` <div class="flex flex-col leading-s font-lumo" data-testid="sign-in:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="sign_in" ns="${0} ${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="sign_in_hint" ns="${0} ${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("sign-in:header:before"),d?"text-disabled":"text-body",o,i,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",d?"text-disabled":"text-secondary",o,i,null!==(r=null===(s=customElements.get("foxy-sign-in-form"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",this.renderTemplateOrSlot("sign-in:header:after"))},this.__renderSignInRecover=()=>{var e,t;const s=this.renderRoot.querySelector("#sign-in-form"),r=this.disabledSelector.zoom("sign-in");return a(K||(K=oe` <div> ${0} <vaadin-button data-testid="sign-in:recover" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="recover_access" ns="${0} ${0}"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-in:recover:before"),!!(null==s?void 0:s.in("busy"))||r.matches("recover",!0),(()=>this.page="access-recovery"),this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.renderTemplateOrSlot("sign-in:recover:after"))},this.__renderSignInSignUp=()=>{const e=this.renderRoot.querySelector("#sign-in-form"),t=this.disabledSelector.zoom("sign-in");return a(Q||(Q=oe` <div> ${0} <vaadin-button data-testid="sign-in:signup" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="sign_up" ns="${0} sign-in-form"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-in:signup:before"),!!(null==e?void 0:e.in("busy"))||t.matches("signup",!0),(()=>this.page="sign-up"),this.lang,this.ns,this.renderTemplateOrSlot("sign-in:signup:after"))},this.__renderSignInForm=()=>{var e,t;const s="sign-in:form",r=this.hiddenSelector.zoom(s);return a(V||(V=oe` <div> ${0} <foxy-sign-in-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="sign-in:form" parent="foxy://customer-api/session" group="${0}" lang="${0}" id="sign-in-form" ns="${0} ${0}" .templates="${0}" @update="${0}"> </foxy-sign-in-form> ${0} </div> `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),r.toString(),this.group,this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.getNestedTemplates("sign-in:form"),(e=>{var t,s;const r=null!==(s=null===(t=e.currentTarget.form.credential)||void 0===t?void 0:t.password)&&void 0!==s?s:null;this.dispatchEvent(new CustomEvent("password",{detail:r})),this.requestUpdate()}),this.renderTemplateOrSlot(`${s}:after`))},this.__renderSignIn=()=>{var e,t;const s="sign-in",r=this.hiddenSelector.zoom(s),o=!0===(null===(t=null===(e=this.data)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.enabled),i=r.matches("signup",!0)||!o;return a(X||(X=oe` <div class="h-full flex" data-testid="sign-in"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} <div class="space-y-s"> ${0} <div class="flex justify-center gap-s"> ${0} ${0} </div> </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${s}:before`),r.matches("header",!0)?"":this.__renderSignInHeader(),r.matches("form",!0)?"":this.__renderSignInForm(),i?"":this.__renderSignInSignUp(),r.matches("recover",!0)?"":this.__renderSignInRecover(),this.renderTemplateOrSlot(`${s}:after`))},this.__renderSignUpHeader=()=>{const{lang:e,ns:t}=this,s=this.renderRoot.querySelector("#sign-up-form"),r=!!(null==s?void 0:s.in("busy"));return a(Y||(Y=oe` <div class="flex flex-col leading-s font-lumo" data-testid="sign-up:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="sign_up" ns="${0} sign-up-form"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="sign_up_hint" ns="${0} sign-up-form"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("sign-up:header:before"),r?"text-disabled":"text-body",e,t,r?"text-disabled":"text-secondary",e,t,this.renderTemplateOrSlot("sign-up:header:after"))},this.__renderSignUpGoBack=()=>{const e=this.renderRoot.querySelector("#sign-up-form"),t=this.disabledSelector.zoom("sign-up");return a(Z||(Z=oe` <div> ${0} <vaadin-button data-testid="sign-up:go-back" class="w-full" theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="go_back" ns="${0} sign-up-form"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-up:go-back:before"),!!(null==e?void 0:e.in("busy"))||t.matches("go-back",!0),(()=>this.page="sign-in"),this.lang,this.ns,this.renderTemplateOrSlot("sign-up:go-back:after"))},this.__renderSignUpForm=()=>{const e="sign-up:form",t=["header","tax-id","is-anonymous","password-old","forgot-password","timestamps","delete",this.hiddenSelector.zoom(e).toString()];return a(ee||(ee=oe` <div> ${0} <foxy-customer-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="sign-up:form" parent="foxy://customer-api/signup" group="${0}" lang="${0}" id="sign-up-form" ns="${0} sign-up-form" .templates="${0}" .settings="${0}" @update="${0}"> </foxy-customer-form> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),this.readonlySelector.zoom(e).toString(),this.disabledSelector.zoom(e).toString(),new o(t.join(" ").trim()),this.group,this.lang,this.ns,this.getNestedTemplates("sign-up:form"),this.data,(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${e}:after`))},this.__renderSignUp=()=>{const e="sign-up",t=this.hiddenSelector.zoom(e);return a(te||(te=oe` <div class="h-full flex" data-testid="sign-up"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} ${0} ${0} </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${e}:before`),t.matches("header",!0)?"":this.__renderSignUpHeader(),t.matches("form",!0)?"":this.__renderSignUpForm(),t.matches("go-back",!0)?"":this.__renderSignUpGoBack(),this.renderTemplateOrSlot(`${e}:after`))}}static get properties(){return r(r({},super.properties),{},{group:{type:String},page:{type:String}})}static get styles(){return[super.styles,d(se||(se=oe`.max-w-25rem{max-width:25rem}`))]}renderBody(){const{page:e,hiddenSelector:t}=this;return"access-recovery"!==e||t.matches("access-recovery",!0)?"sign-in"!==e||t.matches("sign-in",!0)?"sign-up"!==e||t.matches("sign-up",!0)?a(re||(re=oe``)):this.__renderSignUp():this.__renderSignIn():this.__renderAccessRecovery()}}),customElements.define("foxy-internal-customer-portal-password-reset-view",Ue),customElements.define("foxy-internal-customer-portal-subscriptions",class extends xe{constructor(){super(...arguments),this.settings=null,this.customer=null,this.group="",this.__renderFormHeaderActionsUpdate=(e,t)=>{var s;const r=!!(null===(s=t.data)||void 0===s?void 0:s.end_date)&&new Date(t.data.end_date).getTime()<=Date.now();let o="";if(!r&&t.in({idle:"snapshot"})){const e=t.data._links["fx:sub_token_url"].href,s=new URL(e);s.searchParams.set("cart","checkout"),s.searchParams.set("sub_restart","auto"),o=s.toString()}return e(de||(de=be`
70
70
  ${0}
71
71
 
72
72
  <foxy-internal-customer-portal-link
@@ -78,7 +78,7 @@ PERFORMANCE OF THIS SOFTWARE.
78
78
  </foxy-internal-customer-portal-link>
79
79
 
80
80
  ${0}
81
- `),t.renderTemplateOrSlot("header:actions:update:before"),o,r||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("header:actions:update:after"))},this.__renderFormHeaderActionsEnd=(e,t)=>{var s;const r=!!(null===(s=t.data)||void 0===s?void 0:s.end_date)&&"0000-00-00"!==t.data.end_date;let o="";if(!r&&t.in({idle:"snapshot"})){const e=new URL(t.data._links["fx:sub_token_url"].href);e.searchParams.set("sub_cancel","true"),o=e.toString()}return e(de||(de=ve`
81
+ `),t.renderTemplateOrSlot("header:actions:update:before"),o,r||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("header:actions:update:after"))},this.__renderFormHeaderActionsEnd=(e,t)=>{var s;const r=!!(null===(s=t.data)||void 0===s?void 0:s.end_date)&&"0000-00-00"!==t.data.end_date;let o="";if(!r&&t.in({idle:"snapshot"})){const e=new URL(t.data._links["fx:sub_token_url"].href);e.searchParams.set("sub_cancel","true"),o=e.toString()}return e(le||(le=be`
82
82
  ${0}
83
83
 
84
84
  <foxy-internal-customer-portal-link
@@ -90,7 +90,7 @@ PERFORMANCE OF THIS SOFTWARE.
90
90
  </foxy-internal-customer-portal-link>
91
91
 
92
92
  ${0}
93
- `),t.renderTemplateOrSlot("header:actions:end:before"),o,r||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("header:actions:end:after"))},this.__renderFormHeaderActions=(e,t)=>{const s=t.hiddenSelector.matches("header:actions:update"),r=t.hiddenSelector.matches("header:actions:end");return e(le||(le=ve`
93
+ `),t.renderTemplateOrSlot("header:actions:end:before"),o,r||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("header:actions:end:after"))},this.__renderFormHeaderActions=(e,t)=>{const s=t.hiddenSelector.matches("header:actions:update"),r=t.hiddenSelector.matches("header:actions:end");return e(ce||(ce=be`
94
94
  <style>
95
95
  main {
96
96
  display: flex;
@@ -107,7 +107,7 @@ PERFORMANCE OF THIS SOFTWARE.
107
107
  </main>
108
108
 
109
109
  ${0}
110
- `),t.renderTemplateOrSlot("header:actions:before"),s?"":this.__renderFormHeaderActionsUpdate(e,t),r?"":this.__renderFormHeaderActionsEnd(e,t),t.renderTemplateOrSlot("header:actions:after"))},this.__renderFormItemsActionsUpdate=(e,t)=>{var s,r,o,i;const a=null!==(o=null===(r=null===(s=t.data)||void 0===s?void 0:s._links["fx:sub_modification_url"])||void 0===r?void 0:r.href)&&void 0!==o?o:"",n=!!(null===(i=t.data)||void 0===i?void 0:i.end_date)&&new Date(t.data.end_date).getTime()<=Date.now();return e(ce||(ce=ve`
110
+ `),t.renderTemplateOrSlot("header:actions:before"),s?"":this.__renderFormHeaderActionsUpdate(e,t),r?"":this.__renderFormHeaderActionsEnd(e,t),t.renderTemplateOrSlot("header:actions:after"))},this.__renderFormItemsActionsUpdate=(e,t)=>{var s,r,o,i;const a=null!==(o=null===(r=null===(s=t.data)||void 0===s?void 0:s._links["fx:sub_modification_url"])||void 0===r?void 0:r.href)&&void 0!==o?o:"",n=!!(null===(i=t.data)||void 0===i?void 0:i.end_date)&&new Date(t.data.end_date).getTime()<=Date.now();return e(me||(me=be`
111
111
  ${0}
112
112
 
113
113
  <foxy-internal-customer-portal-link
@@ -120,13 +120,13 @@ PERFORMANCE OF THIS SOFTWARE.
120
120
  </foxy-internal-customer-portal-link>
121
121
 
122
122
  ${0}
123
- `),t.renderTemplateOrSlot("items:actions:update:before"),a,n||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("items:actions:update:after"))},this.__renderForm=e=>{var t,s;const i=r({},e.dialog.templates),n=i["header:after"],d=i["items:actions:after"];return i["header:after"]=(e,t)=>{const s=t.hiddenSelector.matches("header:actions",!0);return e(me||(me=ve`
123
+ `),t.renderTemplateOrSlot("items:actions:update:before"),a,n||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("items:actions:update:after"))},this.__renderForm=e=>{var t,s;const i=r({},e.dialog.templates),n=i["header:after"],d=i["items:actions:after"];return i["header:after"]=(e,t)=>{const s=t.hiddenSelector.matches("header:actions",!0);return e(ue||(ue=be`
124
124
  ${0}
125
125
  ${0}
126
- `),s?"":this.__renderFormHeaderActions(e,t),null==n?void 0:n(e,t))},i["items:actions:after"]=(e,t)=>{var s;const r=!!(null===(s=t.data)||void 0===s?void 0:s._links["fx:sub_modification_url"]),o=t.hiddenSelector.matches("items:actions:update",!0);return e(ue||(ue=ve`
126
+ `),s?"":this.__renderFormHeaderActions(e,t),null==n?void 0:n(e,t))},i["items:actions:after"]=(e,t)=>{var s;const r=!!(null===(s=t.data)||void 0===s?void 0:s._links["fx:sub_modification_url"]),o=t.hiddenSelector.matches("items:actions:update",!0);return e(pe||(pe=be`
127
127
  ${0}
128
128
  ${0}
129
- `),r&&!o?this.__renderFormItemsActionsUpdate(e,t):"",null==d?void 0:d(e,t))},a(pe||(pe=ve` <foxy-subscription-form disabledcontrols="${0}" readonlycontrols="${0}" hiddencontrols="${0}" settings="${0}" parent="${0}" group="${0}" lang="${0}" href="${0}" ns="${0} ${0}" id="form" .templates="${0}" @update="${0}" @fetch="${0}"> </foxy-subscription-form> `),e.dialog.disabledControls.toString(),e.dialog.readonlyControls.toString(),new o(`attributes timestamps start-date past-due-amount customer ${e.dialog.hiddenSelector}`),JSON.stringify(this.settings),e.dialog.parent,e.dialog.group,e.dialog.lang,e.dialog.href,e.dialog.ns,null!==(s=null===(t=customElements.get("foxy-subscription-form"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"",i,e.handleUpdate,e.handleFetch)},this.__renderPageItem=e=>{let{html:t}=e,s=i(e,ie);var r,o;return t(he||(he=ve`
129
+ `),r&&!o?this.__renderFormItemsActionsUpdate(e,t):"",null==d?void 0:d(e,t))},a(he||(he=be` <foxy-subscription-form disabledcontrols="${0}" readonlycontrols="${0}" hiddencontrols="${0}" settings="${0}" parent="${0}" group="${0}" lang="${0}" href="${0}" ns="${0} ${0}" id="form" .templates="${0}" @update="${0}" @fetch="${0}"> </foxy-subscription-form> `),e.dialog.disabledControls.toString(),e.dialog.readonlyControls.toString(),new o(`attributes timestamps start-date past-due-amount customer ${e.dialog.hiddenSelector}`),JSON.stringify(this.settings),e.dialog.parent,e.dialog.group,e.dialog.lang,e.dialog.href,e.dialog.ns,null!==(s=null===(t=customElements.get("foxy-subscription-form"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"",i,e.handleUpdate,e.handleFetch)},this.__renderPageItem=e=>{let{html:t}=e,s=i(e,ae);var r,o;return t(fe||(fe=be`
130
130
  <button
131
131
  class=${0}
132
132
  ?disabled=${0}
@@ -144,7 +144,7 @@ PERFORMANCE OF THIS SOFTWARE.
144
144
  >
145
145
  </foxy-subscription-card>
146
146
  </button>
147
- `),f({"block w-full border border-contrast-10 p-m rounded-t-l rounded-b-l":!0,"focus-outline-none focus-border-primary":!0,"hover-border-contrast-30":null!==s.data}),null===s.data,(e=>{const t=new URL(s.href);t.searchParams.set("zoom","transaction_template:items"),this.__subscriptionDialog.href=t.toString(),this.__subscriptionDialog.show(e.currentTarget)}),JSON.stringify(this.settings),s.parent,s.group,s.lang,s.href,s.ns,null!==(o=null===(r=customElements.get("foxy-subscription-card"))||void 0===r?void 0:r.defaultNS)&&void 0!==o?o:"",s.templates)},this.__renderPage=e=>{let{html:t}=e,s=i(e,ae);return t(fe||(fe=ve`
147
+ `),f({"block w-full border border-contrast-10 p-m rounded-t-l rounded-b-l":!0,"focus-outline-none focus-border-primary":!0,"hover-border-contrast-30":null!==s.data}),null===s.data,(e=>{const t=new URL(s.href);t.searchParams.set("zoom","transaction_template:items"),this.__subscriptionDialog.href=t.toString(),this.__subscriptionDialog.show(e.currentTarget)}),JSON.stringify(this.settings),s.parent,s.group,s.lang,s.href,s.ns,null!==(o=null===(r=customElements.get("foxy-subscription-card"))||void 0===r?void 0:r.defaultNS)&&void 0!==o?o:"",s.templates)},this.__renderPage=e=>{let{html:t}=e,s=i(e,ne);return t(ge||(ge=be`
148
148
  <foxy-collection-page
149
149
  ns=${0}
150
150
  href=${0}
@@ -155,4 +155,4 @@ PERFORMANCE OF THIS SOFTWARE.
155
155
  .templates=${0}
156
156
  >
157
157
  </foxy-collection-page>
158
- `),s.ns,s.href,s.lang,s.group,this.__renderPageItem,s.templates)},this.__renderHeader=()=>a(ge||(ge=ve` ${0} <foxy-i18n class="block text-l font-medium" lang="${0}" key="subscription_plural" ns="${0}"> </foxy-i18n> ${0} `),this.renderTemplateOrSlot("header:before"),this.lang,this.ns,this.renderTemplateOrSlot("header:after")),this.__renderList=()=>{var e;const t=this.disabledSelector.zoom("list"),s=this.readonlySelector.zoom("list"),r=[this.hiddenSelector.zoom("list").zoom("form").toString(),"end-date"];return a(ye||(ye=ve` ${0} <foxy-form-dialog readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" header="update" parent="${0}" group="${0}" lang="${0}" ns="${0}" id="subscription-dialog" alert .form="${0}" .templates="${0}"> </foxy-form-dialog> <foxy-collection-pages class="block space-y-m" first="${0}" group="${0}" lang="${0}" ns="${0}" manual .page="${0}" .templates="${0}"> </foxy-collection-pages> ${0} `),this.renderTemplateOrSlot("list:before"),s.zoom("form").toString(),t.zoom("form").toString(),r.join(" ").trim(),h(null===(e=this.customer)||void 0===e?void 0:e._links["fx:subscriptions"].href),this.group,this.lang,this.ns,this.__renderForm,this.getNestedTemplates("list:form"),this.__activeSubscriptionsLink,this.group,this.lang,this.ns,this.__renderPage,this.getNestedTemplates("list:card"),this.renderTemplateOrSlot("list:after"))}}static get properties(){return r(r({},super.properties),{},{settings:{attribute:!1},customer:{attribute:!1},group:{type:String}})}render(){return a($e||($e=ve` <div class="space-y-s" data-testid="subscriptions"> ${0} ${0} </div> `),this.hiddenSelector.matches("header",!0)?"":this.__renderHeader(),this.hiddenSelector.matches("list",!0)?"":this.__renderList())}get __subscriptionDialog(){return this.renderRoot.querySelector("#subscription-dialog")}get __activeSubscriptionsLink(){try{const e=new URL(this.customer._links["fx:subscriptions"].href);return e.searchParams.set("zoom","transaction_template:items"),e.toString()}catch(e){return""}}}),customElements.define("foxy-internal-customer-portal-transactions",class extends we{constructor(){super(...arguments),this.customer=null,this.columns=[],this.group="",this.__renderHeader=()=>a(xe||(xe=je` <div> ${0} <foxy-i18n class="text-l font-medium" lang="${0}" key="transaction_plural" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("header:before"),this.lang,this.ns,this.renderTemplateOrSlot("header:after")),this.__renderList=()=>{let e="";if(this.customer){const t=new URL(this.customer._links["fx:transactions"].href);t.searchParams.set("zoom","items"),e=t.toString()}return a(Se||(Se=je` <div> ${0} <foxy-collection-pages spinner="foxy-spinner" group="${0}" first="${0}" class="block divide-y divide-contrast-10 px-m border border-contrast-10 rounded-t-l rounded-b-l" page="foxy-transactions-table" lang="${0}" ns="${0}" manual .templates="${0}" .props="${0}"> </foxy-collection-pages> ${0} </div> `),this.renderTemplateOrSlot("list:before"),this.group,e,this.lang,this.ns,this.getNestedTemplates("table"),{".columns":this.columns},this.renderTemplateOrSlot("list:after"))}}static get properties(){return r(r({},super.properties),{},{customer:{attribute:!1},columns:{attribute:!1},group:{type:String}})}render(){return a(_e||(_e=je` <div class="space-y-s" data-testid="transactions"> ${0} ${0} </div> `),this.hiddenSelector.matches("header")?"":this.__renderHeader(),this.hiddenSelector.matches("list")?"":this.__renderList())}}),customElements.define("foxy-internal-customer-portal-link",z),customElements.define("foxy-customer-portal",w);export{w as CustomerPortal};
158
+ `),s.ns,s.href,s.lang,s.group,this.__renderPageItem,s.templates)},this.__renderHeader=()=>a(ye||(ye=be` ${0} <foxy-i18n class="block text-l font-medium" lang="${0}" key="subscription_plural" ns="${0}"> </foxy-i18n> ${0} `),this.renderTemplateOrSlot("header:before"),this.lang,this.ns,this.renderTemplateOrSlot("header:after")),this.__renderList=()=>{var e;const t=this.disabledSelector.zoom("list"),s=this.readonlySelector.zoom("list"),r=[this.hiddenSelector.zoom("list").zoom("form").toString(),"end-date"];return a($e||($e=be` ${0} <foxy-form-dialog readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" header="update" parent="${0}" group="${0}" lang="${0}" ns="${0}" id="subscription-dialog" alert .form="${0}" .templates="${0}"> </foxy-form-dialog> <foxy-collection-pages class="block space-y-m" first="${0}" group="${0}" lang="${0}" ns="${0}" manual .page="${0}" .templates="${0}"> </foxy-collection-pages> ${0} `),this.renderTemplateOrSlot("list:before"),s.zoom("form").toString(),t.zoom("form").toString(),r.join(" ").trim(),h(null===(e=this.customer)||void 0===e?void 0:e._links["fx:subscriptions"].href),this.group,this.lang,this.ns,this.__renderForm,this.getNestedTemplates("list:form"),this.__activeSubscriptionsLink,this.group,this.lang,this.ns,this.__renderPage,this.getNestedTemplates("list:card"),this.renderTemplateOrSlot("list:after"))}}static get properties(){return r(r({},super.properties),{},{settings:{attribute:!1},customer:{attribute:!1},group:{type:String}})}render(){return a(ve||(ve=be` <div class="space-y-s" data-testid="subscriptions"> ${0} ${0} </div> `),this.hiddenSelector.matches("header",!0)?"":this.__renderHeader(),this.hiddenSelector.matches("list",!0)?"":this.__renderList())}get __subscriptionDialog(){return this.renderRoot.querySelector("#subscription-dialog")}get __activeSubscriptionsLink(){try{const e=new URL(this.customer._links["fx:subscriptions"].href);return e.searchParams.set("zoom","transaction_template:items"),e.toString()}catch(e){return""}}}),customElements.define("foxy-internal-customer-portal-transactions",class extends Te{constructor(){super(...arguments),this.customer=null,this.columns=[],this.group="",this.__renderHeader=()=>a(Se||(Se=we` <div> ${0} <foxy-i18n class="text-l font-medium" lang="${0}" key="transaction_plural" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("header:before"),this.lang,this.ns,this.renderTemplateOrSlot("header:after")),this.__renderList=()=>{let e="";if(this.customer){const t=new URL(this.customer._links["fx:transactions"].href);t.searchParams.set("zoom","items"),e=t.toString()}return a(_e||(_e=we` <div> ${0} <foxy-collection-pages spinner="foxy-spinner" group="${0}" first="${0}" class="block divide-y divide-contrast-10 px-m border border-contrast-10 rounded-t-l rounded-b-l" page="foxy-transactions-table" lang="${0}" ns="${0}" manual .templates="${0}" .props="${0}"> </foxy-collection-pages> ${0} </div> `),this.renderTemplateOrSlot("list:before"),this.group,e,this.lang,this.ns,this.getNestedTemplates("table"),{".columns":this.columns},this.renderTemplateOrSlot("list:after"))}}static get properties(){return r(r({},super.properties),{},{customer:{attribute:!1},columns:{attribute:!1},group:{type:String}})}render(){return a(je||(je=we` <div class="space-y-s" data-testid="transactions"> ${0} ${0} </div> `),this.hiddenSelector.matches("header")?"":this.__renderHeader(),this.hiddenSelector.matches("list")?"":this.__renderList())}}),customElements.define("foxy-internal-customer-portal-link",z),customElements.define("foxy-customer-portal",T);export{T as CustomerPortal};