@foxy.io/elements 1.42.0-beta.4 → 1.42.0-beta.5

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 (80) hide show
  1. package/dist/cdn/foxy-address-form.js +1 -1
  2. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  3. package/dist/cdn/foxy-api-browser.js +1 -1
  4. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  5. package/dist/cdn/foxy-attribute-form.js +1 -1
  6. package/dist/cdn/foxy-cart-form.js +1 -1
  7. package/dist/cdn/foxy-client-form.js +1 -1
  8. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  9. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  10. package/dist/cdn/foxy-coupon-form.js +1 -1
  11. package/dist/cdn/foxy-custom-field-form.js +1 -1
  12. package/dist/cdn/foxy-customer-form.js +1 -1
  13. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  14. package/dist/cdn/foxy-customer-portal.js +1 -1
  15. package/dist/cdn/foxy-customer.js +1 -1
  16. package/dist/cdn/foxy-downloadable-form.js +1 -1
  17. package/dist/cdn/foxy-email-template-form.js +1 -1
  18. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  19. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  20. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  21. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  22. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  23. package/dist/cdn/foxy-gift-card-form.js +1 -1
  24. package/dist/cdn/foxy-integration-form.js +1 -1
  25. package/dist/cdn/foxy-item-category-form.js +1 -1
  26. package/dist/cdn/foxy-item-form.js +1 -1
  27. package/dist/cdn/foxy-item-option-form.js +1 -1
  28. package/dist/cdn/foxy-native-integration-form.js +1 -1
  29. package/dist/cdn/foxy-pagination.js +1 -1
  30. package/dist/cdn/foxy-passkey-form.js +1 -1
  31. package/dist/cdn/foxy-payment-method-card.js +1 -1
  32. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  33. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  34. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  35. package/dist/cdn/foxy-store-form.js +1 -1
  36. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  37. package/dist/cdn/foxy-subscription-form.js +1 -1
  38. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  39. package/dist/cdn/foxy-tax-form.js +1 -1
  40. package/dist/cdn/foxy-template-config-form.js +1 -1
  41. package/dist/cdn/foxy-template-form.js +1 -1
  42. package/dist/cdn/foxy-template-set-form.js +1 -1
  43. package/dist/cdn/foxy-transaction.js +1 -1
  44. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  45. package/dist/cdn/foxy-user-form.js +1 -1
  46. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  47. package/dist/cdn/foxy-users-table.js +1 -1
  48. package/dist/cdn/foxy-webhook-form.js +1 -1
  49. package/dist/cdn/{shared-f15af5d1.js → shared-076f086a.js} +1 -1
  50. package/dist/cdn/{shared-6286efb1.js → shared-0e1ad508.js} +1 -1
  51. package/dist/cdn/shared-21fba20d.js +1 -0
  52. package/dist/cdn/{shared-63b647a8.js → shared-2a5d1cdf.js} +1 -1
  53. package/dist/cdn/{shared-9f4f8e95.js → shared-3ca95e21.js} +1 -1
  54. package/dist/cdn/{shared-ef98e595.js → shared-56d91134.js} +1 -1
  55. package/dist/cdn/{shared-6332db39.js → shared-5960c279.js} +1 -1
  56. package/dist/cdn/{shared-32883b02.js → shared-663794ff.js} +1 -1
  57. package/dist/cdn/shared-677953e0.js +1 -0
  58. package/dist/cdn/{shared-42a4540f.js → shared-77f39a8a.js} +1 -1
  59. package/dist/cdn/{shared-0643656a.js → shared-7995cbcf.js} +1 -1
  60. package/dist/cdn/{shared-bfdbe217.js → shared-7f5f6657.js} +1 -1
  61. package/dist/cdn/{shared-93c8789e.js → shared-90754404.js} +1 -1
  62. package/dist/cdn/{shared-79a6aa1a.js → shared-a1f654fc.js} +1 -1
  63. package/dist/cdn/{shared-38eb8858.js → shared-a3a18e8d.js} +1 -1
  64. package/dist/cdn/{shared-dd2a66a5.js → shared-df369311.js} +1 -1
  65. package/dist/cdn/{shared-bf5b2106.js → shared-e653b80e.js} +1 -1
  66. package/dist/cdn/{shared-c92d72ba.js → shared-eb086cef.js} +1 -1
  67. package/dist/cdn/{shared-d6f46d44.js → shared-fc66cb5d.js} +1 -1
  68. package/dist/cdn/{shared-91bf0fa2.js → shared-fca3a317.js} +1 -1
  69. package/dist/cdn/translations/payments-api-payment-method-form/en.json +36 -15
  70. package/dist/cdn/translations/payments-api-payment-preset-form/en.json +36 -15
  71. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js +15 -4
  72. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js.map +1 -1
  73. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.d.ts +1 -0
  74. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +31 -33
  75. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -1
  76. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js +1 -0
  77. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js.map +1 -1
  78. package/package.json +1 -1
  79. package/dist/cdn/shared-303dc2a6.js +0 -1
  80. package/dist/cdn/shared-cc5e4c06.js +0 -1
@@ -1 +1 @@
1
- import"./shared-93c8789e.js";import"./shared-6332db39.js";import"./shared-bfdbe217.js";import"./shared-9f4f8e95.js";import"./shared-38eb8858.js";import{I as e}from"./shared-0643656a.js";import"./shared-63b647a8.js";import{a as t}from"./shared-1ce5b073.js";import{B as i}from"./shared-cb58dfcd.js";import{p as s}from"./shared-8b891950.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-7a4ca3f1.js";import{p as n}from"./shared-70380f94.js";import{I as a}from"./shared-253e51f7.js";import"./shared-91bf0fa2.js";import"./shared-42c91940.js";import"./shared-7b3aac7e.js";import"./shared-a3a4c368.js";import"./shared-500b7eb7.js";import"./shared-68a5368a.js";import"./shared-92153a7f.js";import"./shared-0995ae7c.js";import"./shared-cc5e4c06.js";import"./shared-5212ef4f.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-2aa23b5f.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-4e709717.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-53e476fd.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./shared-ef98e595.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-75e7361d.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./foxy-pagination.js";import"./shared-6286efb1.js";import"./shared-6b3b8c63.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-7a2aaafa.js";import"./shared-f9f64dee.js";import"./shared-5c057c26.js";import"./shared-0662adb7.js";import"./shared-651c44fa.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-4e309d01.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";let r,l=e=>e;const d=t(e);customElements.define("foxy-internal-customer-portal-settings-form-subscriptions-allow-frequency-modification-rule-form",class extends d{constructor(){super(...arguments),this.__valuesInputParams={type:"number",step:"1",min:"1",max:"999"},this.__valuesGetValue=()=>{var e;return null===(e=this.form.values)||void 0===e?void 0:e.map((e=>{if(".5m"===e)return{value:e,label:this.t("values.twice_a_week")};const{units:t,count:i}=s(e);return{value:e,label:this.t(`values.${t}`,{count:i})}}))},this.__valuesSetValue=e=>{const t=e.filter((({value:e})=>parseFloat(e)<=999)).map((({unit:e,value:t})=>e?`${t}${e}`:t)).filter(((e,t,i)=>i.indexOf(e)===t));this.edit({values:t})}}static get v8n(){return[({jsonataQuery:e})=>!!e||"jsonata-query:v8n_required",({jsonataQuery:e})=>!e||e.length<=200||"jsonata-query:v8n_too_long",({values:e})=>!!e&&e.length>0||"values:v8n_required",({values:e})=>!e||e.length<=20||"values:v8n_too_long"]}get hiddenSelector(){return new i(`timestamps ${super.hiddenSelector}`.trim())}renderBody(){return o(r||(r=l` <foxy-internal-source-control infer="jsonata-query" property="jsonataQuery"> </foxy-internal-source-control> <foxy-internal-editable-list-control infer="values" .inputParams="${0}" .getValue="${0}" .setValue="${0}" .units="${0}"> </foxy-internal-editable-list-control> ${0} `),this.__valuesInputParams,this.__valuesGetValue,this.__valuesSetValue,[{label:this.t("values.unit_years"),value:"y"},{label:this.t("values.unit_months"),value:"m"},{label:this.t("values.unit_weeks"),value:"w"},{label:this.t("values.unit_days"),value:"d"}],super.renderBody())}});let u,c=e=>e;const p=t(a);customElements.define("foxy-internal-customer-portal-settings-form-subscriptions-allow-frequency-modification-rule-card",class extends p{renderBody(){var e;const{jsonataQuery:t,values:i}=null!==(e=this.data)&&void 0!==e?e:{},n=null==i?void 0:i.map((e=>{if(".5m"===e)return this.t("twice_a_week");const{units:t,count:i}=s(e);return this.t(t,{count:i})}));return o(u||(u=c` <section class="h-s flex flex-col justify-center leading-xs"> <p class="text-m font-medium min-w-0"> <foxy-i18n infer="" class="block truncate" key="${0}" .options="${0}"> </foxy-i18n> </p> <p class="text-s text-secondary min-w-0"> <foxy-i18n infer="" class="block truncate" key="${0}" .options="${0}"> </foxy-i18n> </p> </section> `),"*"===t?"title_all":"title_matching",{query:t},(null==i?void 0:i.length)?"subtitle_list":"subtitle_empty",{list:null==n?void 0:n.join(", ")})}});let f,h=e=>e;const m=t(e);customElements.define("foxy-internal-customer-portal-settings-form-subscriptions-allow-next-date-modification-rule-form",class extends m{constructor(){super(...arguments),this.__minmaxRestrictionsGetValue=()=>{const e=[],t=this.form;return t.min&&e.push("min"),t.max&&e.push("max"),e},this.__minmaxRestrictionsSetValue=e=>{const t=this.form;this.edit({min:e.includes("min")?t.min||"1m":null,max:e.includes("max")?t.max||"1y":null})},this.__minmaxRestrictionsOptions=[{label:"option_min",value:"min"},{label:"option_max",value:"max"}],this.__dayAndDateRestrictionsGetValue=()=>{var e;const t=null===(e=this.form.allowedDays)||void 0===e?void 0:e.type;return"day"===t?"days":"month"===t?"dates":"none"},this.__dayAndDateRestrictionsSetValue=e=>{"dates"===e?this.edit({allowedDays:{type:"month",days:[]}}):"days"===e?this.edit({allowedDays:{type:"day",days:[]}}):this.edit({allowedDays:null})},this.__dayAndDateRestrictionsOptions=[{label:"option_none",value:"none"},{label:"option_dates",value:"dates"},{label:"option_days",value:"days"}],this.__daysOfWeekGetValue=()=>{var e,t;return null!==(t=null===(e=this.form.allowedDays)||void 0===e?void 0:e.days.map((e=>String(e))))&&void 0!==t?t:[]},this.__daysOfWeekSetValue=e=>{this.edit({allowedDays:{type:"day",days:e.map(Number)}})},this.__daysOfWeekOptions=[{label:"option_1",value:"1"},{label:"option_2",value:"2"},{label:"option_3",value:"3"},{label:"option_4",value:"4"},{label:"option_5",value:"5"},{label:"option_6",value:"6"},{label:"option_7",value:"7"}],this.__datesOfMonthInputParams={type:"number",min:"1",max:"31",step:"1"},this.__datesOfMonthGetValue=()=>{var e,t;return null!==(t=null===(e=this.form.allowedDays)||void 0===e?void 0:e.days.map((e=>({value:String(e)}))))&&void 0!==t?t:[]},this.__datesOfMonthSetValue=e=>{this.edit({allowedDays:{type:"month",days:e.map((e=>parseInt(e.value))).filter((e=>Number.isInteger(e)&&e>=1&&e<=31))}})},this.__disallowedDatesInputParams={type:"date"},this.__disallowedDatesGetValue=()=>{var e,t;return null!==(t=null===(e=this.form.disallowedDates)||void 0===e?void 0:e.map((e=>({value:e}))))&&void 0!==t?t:[]},this.__disallowedDatesSetValue=e=>{this.edit({disallowedDates:e.map((e=>e.value))})}}static get v8n(){return[({jsonataQuery:e})=>!!e||"jsonata-query:v8n_required",({jsonataQuery:e})=>!e||e.length<=200||"jsonata-query:v8n_too_long",({disallowedDates:e})=>!e||e.length<=10||"disallowed-dates:v8n_too_long"]}get hiddenSelector(){var e,t;const s=["timestamps",super.hiddenSelector.toString()],o=this.form;return o.min||s.unshift("min"),o.max||s.unshift("max"),"day"!==(null===(e=o.allowedDays)||void 0===e?void 0:e.type)&&s.unshift("days-of-week"),"month"!==(null===(t=o.allowedDays)||void 0===t?void 0:t.type)&&s.unshift("dates-of-month"),new i(s.join(" ").trim())}renderBody(){return o(f||(f=h` <foxy-internal-source-control infer="jsonata-query" property="jsonataQuery"> </foxy-internal-source-control> <foxy-internal-checkbox-group-control infer="minmax-restrictions" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-frequency-control infer="min"></foxy-internal-frequency-control> <foxy-internal-frequency-control infer="max"></foxy-internal-frequency-control> <foxy-internal-radio-group-control infer="day-and-date-restrictions" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-checkbox-group-control infer="days-of-week" theme="vertical" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-editable-list-control infer="dates-of-month" .inputParams="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-editable-list-control infer="disallowed-dates" range="optional" .inputParams="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> ${0} `),this.__minmaxRestrictionsGetValue,this.__minmaxRestrictionsSetValue,this.__minmaxRestrictionsOptions,this.__dayAndDateRestrictionsGetValue,this.__dayAndDateRestrictionsSetValue,this.__dayAndDateRestrictionsOptions,this.__daysOfWeekGetValue,this.__daysOfWeekSetValue,this.__daysOfWeekOptions,this.__datesOfMonthInputParams,this.__datesOfMonthGetValue,this.__datesOfMonthSetValue,this.__disallowedDatesInputParams,this.__disallowedDatesGetValue,this.__disallowedDatesSetValue,super.renderBody())}});let y,_=e=>e;const v=t(a);function x(e){try{return new URL(e).origin===e.toLowerCase()}catch(e){return!1}}customElements.define("foxy-internal-customer-portal-settings-form-subscriptions-allow-next-date-modification-rule-card",class extends v{renderBody(){var e;const{min:t,max:i,allowedDays:s,jsonataQuery:a,disallowedDates:r}=null!==(e=this.data)&&void 0!==e?e:{},l=t?n(t):void 0,d=i?n(i):void 0,u="*"===a?"line_1_all":"line_1_matching",c={query:a},p={from:l?this.t(`unit_${l.units}`,{count:l.count}):this.t("any"),to:d?this.t(`unit_${d.units}`,{count:d.count}):this.t("any")},f=`line_3_${s?s.type:"any"}`,h={list:"month"===(null==s?void 0:s.type)?null==s?void 0:s.days.join(", "):null==s?void 0:s.days.map((e=>this.t(`day_${e}`))).join(", ")},m=r?"line_4_some":"line_4_none",v={list:null==r?void 0:r.map((e=>{const[t,i]=e.split("..");return t&&i?this.t("date_range",{from:t,to:i}):this.t("single_date",{value:e})})).join(", ")};return o(y||(y=_` <section class="leading-xs" style="margin:-.25ch 0"> <p class="text-m font-medium truncate"> <foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n> </p> <p class="text-s text-secondary"> <foxy-i18n infer="" class="block truncate" key="line_2" .options="${0}"> </foxy-i18n> <foxy-i18n infer="" class="block truncate" key="${0}" .options="${0}"> </foxy-i18n> <foxy-i18n infer="" class="block truncate" key="${0}" .options="${0}"> </foxy-i18n> </p> </section> `),u,c,p,f,h,m,v)}});let g,b=e=>e;const j=t(e,"customer-portal-settings-form");class w extends j{constructor(){super(...arguments),this.__sessionLifespanInMinutesOptions=[{value:"m",label:"option_minute"},{value:"h",label:"option_hour"},{value:"d",label:"option_day"},{value:"w",label:"option_week"}],this.__sessionLifespanInMinutesGetValue=()=>{var e;const t=null!==(e=this.form.sessionLifespanInMinutes)&&void 0!==e?e:0;return t%10080==0?t/10080+"w":t%1440==0?t/1440+"d":t%60==0?t/60+"h":`${t}m`},this.__sessionLifespanInMinutesSetValue=e=>{const t=parseInt(e);e.endsWith("w")?this.edit({sessionLifespanInMinutes:10080*t}):e.endsWith("d")?this.edit({sessionLifespanInMinutes:1440*t}):e.endsWith("h")?this.edit({sessionLifespanInMinutes:60*t}):this.edit({sessionLifespanInMinutes:t})},this.__allowedOriginsGetValue=()=>{var e;return null===(e=this.form.allowedOrigins)||void 0===e?void 0:e.map((e=>({label:x(e)?e:`⚠️ ${e}`,value:e})))},this.__allowedOriginsSetValue=e=>{this.edit({allowedOrigins:e.map((({value:e})=>function(e){try{return new URL(e).origin}catch(t){return e}}(e))).filter(((e,t,i)=>i.indexOf(e)===t))})},this.__featuresOptions=[{value:"sso",label:"option_sso"},{value:"sign-up",label:"option_sign_up"},{value:"frequency-modification",label:"option_frequency_modification"},{value:"next-date-modification",label:"option_next_date_modification"}],this.__featuresGetValue=()=>{var e,t,i;const s=[];return this.form.sso&&s.push("sso"),(null===(e=this.form.signUp)||void 0===e?void 0:e.enabled)&&s.push("sign-up"),(null===(t=this.form.subscriptions)||void 0===t?void 0:t.allowNextDateModification)&&s.push("next-date-modification"),(null===(i=this.form.subscriptions)||void 0===i?void 0:i.allowFrequencyModification.length)&&s.push("frequency-modification"),s},this.__featuresSetValue=e=>{var t,i,s,o,n;const a=null!==(i=null===(t=this.form.subscriptions)||void 0===t?void 0:t.allowFrequencyModification)&&void 0!==i?i:[];this.edit({sso:e.includes("sso"),signUp:{enabled:e.includes("sign-up"),verification:null!==(o=null===(s=this.form.signUp)||void 0===s?void 0:s.verification)&&void 0!==o?o:{type:"hcaptcha",siteKey:"",secretKey:""}},subscriptions:{allowFrequencyModification:e.includes("frequency-modification")?0===a.length?[{jsonataQuery:"*",values:[]}]:a:[],allowNextDateModification:!!e.includes("next-date-modification")&&((null===(n=this.form.subscriptions)||void 0===n?void 0:n.allowNextDateModification)||[])}})},this.__signUpVerificationHcaptchaSiteKeyGetValue=()=>{var e,t,i;return null!==(i=null===(t=null===(e=this.form.signUp)||void 0===e?void 0:e.verification)||void 0===t?void 0:t.siteKey)&&void 0!==i?i:""},this.__signUpVerificationHcaptchaSiteKeySetValue=e=>{var t,i,s,o;this.edit({signUp:{enabled:!!(null===(t=this.form.signUp)||void 0===t?void 0:t.enabled),verification:{secretKey:null!==(o=null===(s=null===(i=this.form.signUp)||void 0===i?void 0:i.verification)||void 0===s?void 0:s.secretKey)&&void 0!==o?o:"",siteKey:e,type:"hcaptcha"}}})},this.__signUpVerificationHcaptchaSecretKeyGetValue=()=>{var e,t,i;return null!==(i=null===(t=null===(e=this.form.signUp)||void 0===e?void 0:e.verification)||void 0===t?void 0:t.secretKey)&&void 0!==i?i:""},this.__signUpVerificationHcaptchaSecretKeySetValue=e=>{var t,i,s,o;this.edit({signUp:{enabled:!!(null===(t=this.form.signUp)||void 0===t?void 0:t.enabled),verification:{secretKey:e,siteKey:null!==(o=null===(s=null===(i=this.form.signUp)||void 0===i?void 0:i.verification)||void 0===s?void 0:s.siteKey)&&void 0!==o?o:"",type:"hcaptcha"}}})},this.__jwtSecretGeneratorOptions={charset:"abcdefghijklmnopqrstuvwxyz0123456789",length:64}}static get v8n(){return[({sessionLifespanInMinutes:e})=>"number"!=typeof e||e<=40320||"session-lifespan-in-minutes:v8n_too_long",({allowedOrigins:e=[]})=>e.length<=10||"allowed-origins:v8n_too_many",({allowedOrigins:e=[]})=>e.every(x)||"allowed-origins:v8n_invalid",({jwtSharedSecret:e})=>!e||/^[a-z0-9-]+$/.test(e)||"jwt-shared-secret:v8n_invalid",({jwtSharedSecret:e})=>!e||e.length>=40||"jwt-shared-secret:v8n_too_short",({jwtSharedSecret:e})=>!e||e.length<=100||"jwt-shared-secret:v8n_too_long",({signUp:e})=>{const t=null==e?void 0:e.verification.siteKey;return!t||t.length<=100||"sign-up-verification-hcaptcha-site-key:v8n_too_long"},({signUp:e})=>{const t=null==e?void 0:e.verification.secretKey;return!t||t.length<=100||"sign-up-verification-hcaptcha-secret-key:v8n_too_long"}]}get hiddenSelector(){var e,t,s;const o=["header:copy-id",super.hiddenSelector.toString()];return(null===(e=this.form.signUp)||void 0===e?void 0:e.enabled)||o.push("sign-up-verification-hcaptcha-site-key","sign-up-verification-hcaptcha-secret-key"),(null===(t=this.form.subscriptions)||void 0===t?void 0:t.allowFrequencyModification.length)||o.push("subscriptions-allow-frequency-modification"),(null===(s=this.form.subscriptions)||void 0===s?void 0:s.allowNextDateModification)||o.push("subscriptions-allow-next-date-modification"),new i(o.join(" ").trim())}renderBody(){return o(g||(g=b` ${0} <foxy-internal-editable-list-control infer="allowed-origins" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-checkbox-group-control infer="features" theme="vertical" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-password-control infer="sign-up-verification-hcaptcha-site-key" .getValue="${0}" .setValue="${0}"> </foxy-internal-password-control> <foxy-internal-password-control infer="sign-up-verification-hcaptcha-secret-key" .getValue="${0}" .setValue="${0}"> </foxy-internal-password-control> <foxy-internal-async-list-control first="foxy://${0}/form/subscriptions/allowFrequencyModification" infer="subscriptions-allow-frequency-modification" limit="20" form="foxy-internal-customer-portal-settings-form-subscriptions-allow-frequency-modification-rule-form" item="foxy-internal-customer-portal-settings-form-subscriptions-allow-frequency-modification-rule-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control first="foxy://${0}/form/subscriptions/allowNextDateModification" infer="subscriptions-allow-next-date-modification" limit="20" form="foxy-internal-customer-portal-settings-form-subscriptions-allow-next-date-modification-rule-form" item="foxy-internal-customer-portal-settings-form-subscriptions-allow-next-date-modification-rule-card" alert> </foxy-internal-async-list-control> <foxy-internal-frequency-control infer="session-lifespan-in-minutes" max="" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-frequency-control> <foxy-internal-password-control property="jwtSharedSecret" infer="jwt-shared-secret" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> ${0} `),this.renderHeader(),this.__allowedOriginsGetValue,this.__allowedOriginsSetValue,this.__featuresGetValue,this.__featuresSetValue,this.__featuresOptions,this.__signUpVerificationHcaptchaSiteKeyGetValue,this.__signUpVerificationHcaptchaSiteKeySetValue,this.__signUpVerificationHcaptchaSecretKeyGetValue,this.__signUpVerificationHcaptchaSecretKeySetValue,this.virtualHost,this.virtualHost,this.__sessionLifespanInMinutesGetValue,this.__sessionLifespanInMinutesSetValue,this.__sessionLifespanInMinutesOptions,this.__jwtSecretGeneratorOptions,super.renderBody())}async _sendPost(e){return this.__removeNullProperties(e),super._sendPost(e)}async _sendPatch(e){return this.__removeNullProperties(e),super._sendPatch(e)}__removeNullProperties(e){var t,i;"object"==typeof(null===(t=e.subscriptions)||void 0===t?void 0:t.allowNextDateModification)&&(null===(i=e.subscriptions)||void 0===i||i.allowNextDateModification.forEach((e=>{for(const t in e){const i=t;null===e[i]&&delete e[i]}})))}}customElements.define("foxy-customer-portal-settings-form",w);export{w as CustomerPortalSettingsForm};
1
+ import"./shared-90754404.js";import"./shared-5960c279.js";import"./shared-7f5f6657.js";import"./shared-3ca95e21.js";import"./shared-a3a18e8d.js";import{I as e}from"./shared-7995cbcf.js";import"./shared-2a5d1cdf.js";import{a as t}from"./shared-1ce5b073.js";import{B as i}from"./shared-cb58dfcd.js";import{p as s}from"./shared-8b891950.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-7a4ca3f1.js";import{p as n}from"./shared-70380f94.js";import{I as a}from"./shared-253e51f7.js";import"./shared-fca3a317.js";import"./shared-42c91940.js";import"./shared-7b3aac7e.js";import"./shared-a3a4c368.js";import"./shared-500b7eb7.js";import"./shared-68a5368a.js";import"./shared-92153a7f.js";import"./shared-0995ae7c.js";import"./shared-677953e0.js";import"./shared-5212ef4f.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-2aa23b5f.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-4e709717.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-53e476fd.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./shared-56d91134.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-75e7361d.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./foxy-pagination.js";import"./shared-0e1ad508.js";import"./shared-6b3b8c63.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-7a2aaafa.js";import"./shared-f9f64dee.js";import"./shared-5c057c26.js";import"./shared-0662adb7.js";import"./shared-651c44fa.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-4e309d01.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";let r,l=e=>e;const d=t(e);customElements.define("foxy-internal-customer-portal-settings-form-subscriptions-allow-frequency-modification-rule-form",class extends d{constructor(){super(...arguments),this.__valuesInputParams={type:"number",step:"1",min:"1",max:"999"},this.__valuesGetValue=()=>{var e;return null===(e=this.form.values)||void 0===e?void 0:e.map((e=>{if(".5m"===e)return{value:e,label:this.t("values.twice_a_week")};const{units:t,count:i}=s(e);return{value:e,label:this.t(`values.${t}`,{count:i})}}))},this.__valuesSetValue=e=>{const t=e.filter((({value:e})=>parseFloat(e)<=999)).map((({unit:e,value:t})=>e?`${t}${e}`:t)).filter(((e,t,i)=>i.indexOf(e)===t));this.edit({values:t})}}static get v8n(){return[({jsonataQuery:e})=>!!e||"jsonata-query:v8n_required",({jsonataQuery:e})=>!e||e.length<=200||"jsonata-query:v8n_too_long",({values:e})=>!!e&&e.length>0||"values:v8n_required",({values:e})=>!e||e.length<=20||"values:v8n_too_long"]}get hiddenSelector(){return new i(`timestamps ${super.hiddenSelector}`.trim())}renderBody(){return o(r||(r=l` <foxy-internal-source-control infer="jsonata-query" property="jsonataQuery"> </foxy-internal-source-control> <foxy-internal-editable-list-control infer="values" .inputParams="${0}" .getValue="${0}" .setValue="${0}" .units="${0}"> </foxy-internal-editable-list-control> ${0} `),this.__valuesInputParams,this.__valuesGetValue,this.__valuesSetValue,[{label:this.t("values.unit_years"),value:"y"},{label:this.t("values.unit_months"),value:"m"},{label:this.t("values.unit_weeks"),value:"w"},{label:this.t("values.unit_days"),value:"d"}],super.renderBody())}});let u,c=e=>e;const p=t(a);customElements.define("foxy-internal-customer-portal-settings-form-subscriptions-allow-frequency-modification-rule-card",class extends p{renderBody(){var e;const{jsonataQuery:t,values:i}=null!==(e=this.data)&&void 0!==e?e:{},n=null==i?void 0:i.map((e=>{if(".5m"===e)return this.t("twice_a_week");const{units:t,count:i}=s(e);return this.t(t,{count:i})}));return o(u||(u=c` <section class="h-s flex flex-col justify-center leading-xs"> <p class="text-m font-medium min-w-0"> <foxy-i18n infer="" class="block truncate" key="${0}" .options="${0}"> </foxy-i18n> </p> <p class="text-s text-secondary min-w-0"> <foxy-i18n infer="" class="block truncate" key="${0}" .options="${0}"> </foxy-i18n> </p> </section> `),"*"===t?"title_all":"title_matching",{query:t},(null==i?void 0:i.length)?"subtitle_list":"subtitle_empty",{list:null==n?void 0:n.join(", ")})}});let f,h=e=>e;const m=t(e);customElements.define("foxy-internal-customer-portal-settings-form-subscriptions-allow-next-date-modification-rule-form",class extends m{constructor(){super(...arguments),this.__minmaxRestrictionsGetValue=()=>{const e=[],t=this.form;return t.min&&e.push("min"),t.max&&e.push("max"),e},this.__minmaxRestrictionsSetValue=e=>{const t=this.form;this.edit({min:e.includes("min")?t.min||"1m":null,max:e.includes("max")?t.max||"1y":null})},this.__minmaxRestrictionsOptions=[{label:"option_min",value:"min"},{label:"option_max",value:"max"}],this.__dayAndDateRestrictionsGetValue=()=>{var e;const t=null===(e=this.form.allowedDays)||void 0===e?void 0:e.type;return"day"===t?"days":"month"===t?"dates":"none"},this.__dayAndDateRestrictionsSetValue=e=>{"dates"===e?this.edit({allowedDays:{type:"month",days:[]}}):"days"===e?this.edit({allowedDays:{type:"day",days:[]}}):this.edit({allowedDays:null})},this.__dayAndDateRestrictionsOptions=[{label:"option_none",value:"none"},{label:"option_dates",value:"dates"},{label:"option_days",value:"days"}],this.__daysOfWeekGetValue=()=>{var e,t;return null!==(t=null===(e=this.form.allowedDays)||void 0===e?void 0:e.days.map((e=>String(e))))&&void 0!==t?t:[]},this.__daysOfWeekSetValue=e=>{this.edit({allowedDays:{type:"day",days:e.map(Number)}})},this.__daysOfWeekOptions=[{label:"option_1",value:"1"},{label:"option_2",value:"2"},{label:"option_3",value:"3"},{label:"option_4",value:"4"},{label:"option_5",value:"5"},{label:"option_6",value:"6"},{label:"option_7",value:"7"}],this.__datesOfMonthInputParams={type:"number",min:"1",max:"31",step:"1"},this.__datesOfMonthGetValue=()=>{var e,t;return null!==(t=null===(e=this.form.allowedDays)||void 0===e?void 0:e.days.map((e=>({value:String(e)}))))&&void 0!==t?t:[]},this.__datesOfMonthSetValue=e=>{this.edit({allowedDays:{type:"month",days:e.map((e=>parseInt(e.value))).filter((e=>Number.isInteger(e)&&e>=1&&e<=31))}})},this.__disallowedDatesInputParams={type:"date"},this.__disallowedDatesGetValue=()=>{var e,t;return null!==(t=null===(e=this.form.disallowedDates)||void 0===e?void 0:e.map((e=>({value:e}))))&&void 0!==t?t:[]},this.__disallowedDatesSetValue=e=>{this.edit({disallowedDates:e.map((e=>e.value))})}}static get v8n(){return[({jsonataQuery:e})=>!!e||"jsonata-query:v8n_required",({jsonataQuery:e})=>!e||e.length<=200||"jsonata-query:v8n_too_long",({disallowedDates:e})=>!e||e.length<=10||"disallowed-dates:v8n_too_long"]}get hiddenSelector(){var e,t;const s=["timestamps",super.hiddenSelector.toString()],o=this.form;return o.min||s.unshift("min"),o.max||s.unshift("max"),"day"!==(null===(e=o.allowedDays)||void 0===e?void 0:e.type)&&s.unshift("days-of-week"),"month"!==(null===(t=o.allowedDays)||void 0===t?void 0:t.type)&&s.unshift("dates-of-month"),new i(s.join(" ").trim())}renderBody(){return o(f||(f=h` <foxy-internal-source-control infer="jsonata-query" property="jsonataQuery"> </foxy-internal-source-control> <foxy-internal-checkbox-group-control infer="minmax-restrictions" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-frequency-control infer="min"></foxy-internal-frequency-control> <foxy-internal-frequency-control infer="max"></foxy-internal-frequency-control> <foxy-internal-radio-group-control infer="day-and-date-restrictions" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-checkbox-group-control infer="days-of-week" theme="vertical" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-editable-list-control infer="dates-of-month" .inputParams="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-editable-list-control infer="disallowed-dates" range="optional" .inputParams="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> ${0} `),this.__minmaxRestrictionsGetValue,this.__minmaxRestrictionsSetValue,this.__minmaxRestrictionsOptions,this.__dayAndDateRestrictionsGetValue,this.__dayAndDateRestrictionsSetValue,this.__dayAndDateRestrictionsOptions,this.__daysOfWeekGetValue,this.__daysOfWeekSetValue,this.__daysOfWeekOptions,this.__datesOfMonthInputParams,this.__datesOfMonthGetValue,this.__datesOfMonthSetValue,this.__disallowedDatesInputParams,this.__disallowedDatesGetValue,this.__disallowedDatesSetValue,super.renderBody())}});let y,_=e=>e;const v=t(a);function x(e){try{return new URL(e).origin===e.toLowerCase()}catch(e){return!1}}customElements.define("foxy-internal-customer-portal-settings-form-subscriptions-allow-next-date-modification-rule-card",class extends v{renderBody(){var e;const{min:t,max:i,allowedDays:s,jsonataQuery:a,disallowedDates:r}=null!==(e=this.data)&&void 0!==e?e:{},l=t?n(t):void 0,d=i?n(i):void 0,u="*"===a?"line_1_all":"line_1_matching",c={query:a},p={from:l?this.t(`unit_${l.units}`,{count:l.count}):this.t("any"),to:d?this.t(`unit_${d.units}`,{count:d.count}):this.t("any")},f=`line_3_${s?s.type:"any"}`,h={list:"month"===(null==s?void 0:s.type)?null==s?void 0:s.days.join(", "):null==s?void 0:s.days.map((e=>this.t(`day_${e}`))).join(", ")},m=r?"line_4_some":"line_4_none",v={list:null==r?void 0:r.map((e=>{const[t,i]=e.split("..");return t&&i?this.t("date_range",{from:t,to:i}):this.t("single_date",{value:e})})).join(", ")};return o(y||(y=_` <section class="leading-xs" style="margin:-.25ch 0"> <p class="text-m font-medium truncate"> <foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n> </p> <p class="text-s text-secondary"> <foxy-i18n infer="" class="block truncate" key="line_2" .options="${0}"> </foxy-i18n> <foxy-i18n infer="" class="block truncate" key="${0}" .options="${0}"> </foxy-i18n> <foxy-i18n infer="" class="block truncate" key="${0}" .options="${0}"> </foxy-i18n> </p> </section> `),u,c,p,f,h,m,v)}});let g,b=e=>e;const j=t(e,"customer-portal-settings-form");class w extends j{constructor(){super(...arguments),this.__sessionLifespanInMinutesOptions=[{value:"m",label:"option_minute"},{value:"h",label:"option_hour"},{value:"d",label:"option_day"},{value:"w",label:"option_week"}],this.__sessionLifespanInMinutesGetValue=()=>{var e;const t=null!==(e=this.form.sessionLifespanInMinutes)&&void 0!==e?e:0;return t%10080==0?t/10080+"w":t%1440==0?t/1440+"d":t%60==0?t/60+"h":`${t}m`},this.__sessionLifespanInMinutesSetValue=e=>{const t=parseInt(e);e.endsWith("w")?this.edit({sessionLifespanInMinutes:10080*t}):e.endsWith("d")?this.edit({sessionLifespanInMinutes:1440*t}):e.endsWith("h")?this.edit({sessionLifespanInMinutes:60*t}):this.edit({sessionLifespanInMinutes:t})},this.__allowedOriginsGetValue=()=>{var e;return null===(e=this.form.allowedOrigins)||void 0===e?void 0:e.map((e=>({label:x(e)?e:`⚠️ ${e}`,value:e})))},this.__allowedOriginsSetValue=e=>{this.edit({allowedOrigins:e.map((({value:e})=>function(e){try{return new URL(e).origin}catch(t){return e}}(e))).filter(((e,t,i)=>i.indexOf(e)===t))})},this.__featuresOptions=[{value:"sso",label:"option_sso"},{value:"sign-up",label:"option_sign_up"},{value:"frequency-modification",label:"option_frequency_modification"},{value:"next-date-modification",label:"option_next_date_modification"}],this.__featuresGetValue=()=>{var e,t,i;const s=[];return this.form.sso&&s.push("sso"),(null===(e=this.form.signUp)||void 0===e?void 0:e.enabled)&&s.push("sign-up"),(null===(t=this.form.subscriptions)||void 0===t?void 0:t.allowNextDateModification)&&s.push("next-date-modification"),(null===(i=this.form.subscriptions)||void 0===i?void 0:i.allowFrequencyModification.length)&&s.push("frequency-modification"),s},this.__featuresSetValue=e=>{var t,i,s,o,n;const a=null!==(i=null===(t=this.form.subscriptions)||void 0===t?void 0:t.allowFrequencyModification)&&void 0!==i?i:[];this.edit({sso:e.includes("sso"),signUp:{enabled:e.includes("sign-up"),verification:null!==(o=null===(s=this.form.signUp)||void 0===s?void 0:s.verification)&&void 0!==o?o:{type:"hcaptcha",siteKey:"",secretKey:""}},subscriptions:{allowFrequencyModification:e.includes("frequency-modification")?0===a.length?[{jsonataQuery:"*",values:[]}]:a:[],allowNextDateModification:!!e.includes("next-date-modification")&&((null===(n=this.form.subscriptions)||void 0===n?void 0:n.allowNextDateModification)||[])}})},this.__signUpVerificationHcaptchaSiteKeyGetValue=()=>{var e,t,i;return null!==(i=null===(t=null===(e=this.form.signUp)||void 0===e?void 0:e.verification)||void 0===t?void 0:t.siteKey)&&void 0!==i?i:""},this.__signUpVerificationHcaptchaSiteKeySetValue=e=>{var t,i,s,o;this.edit({signUp:{enabled:!!(null===(t=this.form.signUp)||void 0===t?void 0:t.enabled),verification:{secretKey:null!==(o=null===(s=null===(i=this.form.signUp)||void 0===i?void 0:i.verification)||void 0===s?void 0:s.secretKey)&&void 0!==o?o:"",siteKey:e,type:"hcaptcha"}}})},this.__signUpVerificationHcaptchaSecretKeyGetValue=()=>{var e,t,i;return null!==(i=null===(t=null===(e=this.form.signUp)||void 0===e?void 0:e.verification)||void 0===t?void 0:t.secretKey)&&void 0!==i?i:""},this.__signUpVerificationHcaptchaSecretKeySetValue=e=>{var t,i,s,o;this.edit({signUp:{enabled:!!(null===(t=this.form.signUp)||void 0===t?void 0:t.enabled),verification:{secretKey:e,siteKey:null!==(o=null===(s=null===(i=this.form.signUp)||void 0===i?void 0:i.verification)||void 0===s?void 0:s.siteKey)&&void 0!==o?o:"",type:"hcaptcha"}}})},this.__jwtSecretGeneratorOptions={charset:"abcdefghijklmnopqrstuvwxyz0123456789",length:64}}static get v8n(){return[({sessionLifespanInMinutes:e})=>"number"!=typeof e||e<=40320||"session-lifespan-in-minutes:v8n_too_long",({allowedOrigins:e=[]})=>e.length<=10||"allowed-origins:v8n_too_many",({allowedOrigins:e=[]})=>e.every(x)||"allowed-origins:v8n_invalid",({jwtSharedSecret:e})=>!e||/^[a-z0-9-]+$/.test(e)||"jwt-shared-secret:v8n_invalid",({jwtSharedSecret:e})=>!e||e.length>=40||"jwt-shared-secret:v8n_too_short",({jwtSharedSecret:e})=>!e||e.length<=100||"jwt-shared-secret:v8n_too_long",({signUp:e})=>{const t=null==e?void 0:e.verification.siteKey;return!t||t.length<=100||"sign-up-verification-hcaptcha-site-key:v8n_too_long"},({signUp:e})=>{const t=null==e?void 0:e.verification.secretKey;return!t||t.length<=100||"sign-up-verification-hcaptcha-secret-key:v8n_too_long"}]}get hiddenSelector(){var e,t,s;const o=["header:copy-id",super.hiddenSelector.toString()];return(null===(e=this.form.signUp)||void 0===e?void 0:e.enabled)||o.push("sign-up-verification-hcaptcha-site-key","sign-up-verification-hcaptcha-secret-key"),(null===(t=this.form.subscriptions)||void 0===t?void 0:t.allowFrequencyModification.length)||o.push("subscriptions-allow-frequency-modification"),(null===(s=this.form.subscriptions)||void 0===s?void 0:s.allowNextDateModification)||o.push("subscriptions-allow-next-date-modification"),new i(o.join(" ").trim())}renderBody(){return o(g||(g=b` ${0} <foxy-internal-editable-list-control infer="allowed-origins" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-checkbox-group-control infer="features" theme="vertical" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-password-control infer="sign-up-verification-hcaptcha-site-key" .getValue="${0}" .setValue="${0}"> </foxy-internal-password-control> <foxy-internal-password-control infer="sign-up-verification-hcaptcha-secret-key" .getValue="${0}" .setValue="${0}"> </foxy-internal-password-control> <foxy-internal-async-list-control first="foxy://${0}/form/subscriptions/allowFrequencyModification" infer="subscriptions-allow-frequency-modification" limit="20" form="foxy-internal-customer-portal-settings-form-subscriptions-allow-frequency-modification-rule-form" item="foxy-internal-customer-portal-settings-form-subscriptions-allow-frequency-modification-rule-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control first="foxy://${0}/form/subscriptions/allowNextDateModification" infer="subscriptions-allow-next-date-modification" limit="20" form="foxy-internal-customer-portal-settings-form-subscriptions-allow-next-date-modification-rule-form" item="foxy-internal-customer-portal-settings-form-subscriptions-allow-next-date-modification-rule-card" alert> </foxy-internal-async-list-control> <foxy-internal-frequency-control infer="session-lifespan-in-minutes" max="" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-frequency-control> <foxy-internal-password-control property="jwtSharedSecret" infer="jwt-shared-secret" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> ${0} `),this.renderHeader(),this.__allowedOriginsGetValue,this.__allowedOriginsSetValue,this.__featuresGetValue,this.__featuresSetValue,this.__featuresOptions,this.__signUpVerificationHcaptchaSiteKeyGetValue,this.__signUpVerificationHcaptchaSiteKeySetValue,this.__signUpVerificationHcaptchaSecretKeyGetValue,this.__signUpVerificationHcaptchaSecretKeySetValue,this.virtualHost,this.virtualHost,this.__sessionLifespanInMinutesGetValue,this.__sessionLifespanInMinutesSetValue,this.__sessionLifespanInMinutesOptions,this.__jwtSecretGeneratorOptions,super.renderBody())}async _sendPost(e){return this.__removeNullProperties(e),super._sendPost(e)}async _sendPatch(e){return this.__removeNullProperties(e),super._sendPatch(e)}__removeNullProperties(e){var t,i;"object"==typeof(null===(t=e.subscriptions)||void 0===t?void 0:t.allowNextDateModification)&&(null===(i=e.subscriptions)||void 0===i||i.allowNextDateModification.forEach((e=>{for(const t in e){const i=t;null===e[i]&&delete e[i]}})))}}customElements.define("foxy-customer-portal-settings-form",w);export{w as CustomerPortalSettingsForm};
@@ -1,4 +1,4 @@
1
- import"./foxy-customer.js";import"./shared-68a5368a.js";import"./shared-75e7361d.js";import"./shared-0995ae7c.js";import"./shared-38eb8858.js";import"./shared-5212ef4f.js";import{I as e}from"./shared-0643656a.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-d6f46d44.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import"./shared-70380f94.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-1ce5b073.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-a3a4c368.js";import"./foxy-update-payment-method-form.js";import"./shared-303dc2a6.js";import"./shared-bfdbe217.js";import"./shared-7b3aac7e.js";import"./shared-500b7eb7.js";import"./shared-42c91940.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./shared-ef98e595.js";import"./shared-cc5e4c06.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"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-6286efb1.js";import"./shared-6b3b8c63.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./foxy-copy-to-clipboard.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./foxy-nucleon-element.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./foxy-template-set-card.js";import"./shared-49337d35.js";import"./shared-253e51f7.js";import"./foxy-payment-card-embed.js";import"./shared-0662adb7.js";import"./shared-864ea319.js";import"./shared-5fd5805c.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-91bf0fa2.js";import"./shared-63b647a8.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./shared-93c8789e.js";import"./shared-c92d72ba.js";import"./shared-5c057c26.js";import"./shared-651c44fa.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-f15af5d1.js";import"./shared-d0aed1c1.js";import"./foxy-table.js";import"./shared-6f1261fa.js";import"./shared-eed9b226.js";import"./shared-7a2aaafa.js";import"./shared-9a4d52dd.js";import"./shared-f9f64dee.js";import"./shared-d5f6483f.js";import"./shared-25167d28.js";import"./shared-ee9ee09a.js";import"./shared-771431a9.js";import"./shared-8b891950.js";import"./shared-ada5e9f5.js";import"./shared-cf613436.js";import"./shared-bc2eb9bb.js";import"./shared-43e2c3f6.js";import"./shared-79d0699c.js";import"./foxy-transaction-card.js";import"./shared-7a4ca3f1.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-eb963ba3.js";import"./shared-a6b2bd14.js";import"./shared-4e309d01.js";import"./shared-b738ee96.js";import"./shared-e55e32dd.js";
1
+ import"./foxy-customer.js";import"./shared-68a5368a.js";import"./shared-75e7361d.js";import"./shared-0995ae7c.js";import"./shared-a3a18e8d.js";import"./shared-5212ef4f.js";import{I as e}from"./shared-7995cbcf.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-fc66cb5d.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import"./shared-70380f94.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-1ce5b073.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-a3a4c368.js";import"./foxy-update-payment-method-form.js";import"./shared-21fba20d.js";import"./shared-7f5f6657.js";import"./shared-7b3aac7e.js";import"./shared-500b7eb7.js";import"./shared-42c91940.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./shared-56d91134.js";import"./shared-677953e0.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"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-0e1ad508.js";import"./shared-6b3b8c63.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./foxy-copy-to-clipboard.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./foxy-nucleon-element.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./foxy-template-set-card.js";import"./shared-49337d35.js";import"./shared-253e51f7.js";import"./foxy-payment-card-embed.js";import"./shared-0662adb7.js";import"./shared-864ea319.js";import"./shared-5fd5805c.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-fca3a317.js";import"./shared-2a5d1cdf.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./shared-90754404.js";import"./shared-eb086cef.js";import"./shared-5c057c26.js";import"./shared-651c44fa.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-076f086a.js";import"./shared-d0aed1c1.js";import"./foxy-table.js";import"./shared-6f1261fa.js";import"./shared-eed9b226.js";import"./shared-7a2aaafa.js";import"./shared-9a4d52dd.js";import"./shared-f9f64dee.js";import"./shared-d5f6483f.js";import"./shared-25167d28.js";import"./shared-ee9ee09a.js";import"./shared-771431a9.js";import"./shared-8b891950.js";import"./shared-ada5e9f5.js";import"./shared-cf613436.js";import"./shared-bc2eb9bb.js";import"./shared-43e2c3f6.js";import"./shared-79d0699c.js";import"./foxy-transaction-card.js";import"./shared-7a4ca3f1.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-eb963ba3.js";import"./shared-a6b2bd14.js";import"./shared-4e309d01.js";import"./shared-b738ee96.js";import"./shared-e55e32dd.js";
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -1,4 +1,4 @@
1
- import"./shared-0995ae7c.js";import"./shared-75e7361d.js";import{h as t}from"./shared-a3a4c368.js";import"./shared-68a5368a.js";import"./shared-5212ef4f.js";import"./foxy-payment-method-card.js";import"./foxy-update-payment-method-form.js";import"./foxy-subscription-form.js";import"./foxy-form-dialog.js";import"./foxy-transactions-table.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-d6f46d44.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./foxy-spinner.js";import"./foxy-table.js";import"./shared-70380f94.js";import{aH as e,_ as s}from"./shared-cb58dfcd.js";import{L as r,h as a,c as o}from"./shared-ba5c42c7.js";import{C as i}from"./shared-5afb584d.js";import"./shared-7b3aac7e.js";import"./shared-16ae74b2.js";import{z as h,S as d,T as n,a as l}from"./shared-1ce5b073.js";import{c as m}from"./shared-4e709717.js";import{S as c}from"./shared-eed9b226.js";import"./shared-a4ca1c5d.js";import{G as v}from"./shared-ee9ee09a.js";import"./shared-d2304d50.js";import"./shared-0662adb7.js";import"./shared-986d0f7f.js";import"./shared-92153a7f.js";import"./shared-864ea319.js";import"./shared-76cbea00.js";import{N as p}from"./shared-f83207fb.js";import{S as f}from"./shared-771431a9.js";import{i as g}from"./shared-53e42a77.js";import"./shared-500b7eb7.js";import"./shared-1f6366c0.js";import"./shared-cf613436.js";import"./foxy-nucleon-element.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-2aa23b5f.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-303dc2a6.js";import"./shared-bfdbe217.js";import"./shared-42c91940.js";import"./shared-20fb2969.js";import"./shared-292dcee0.js";import"./shared-ef98e595.js";import"./shared-cc5e4c06.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-6286efb1.js";import"./shared-6b3b8c63.js";import"./shared-4ded48ee.js";import"./shared-0643656a.js";import"./foxy-copy-to-clipboard.js";import"./shared-127ec8a7.js";import"./shared-bab2ea2c.js";import"./shared-53e476fd.js";import"./foxy-template-set-card.js";import"./shared-49337d35.js";import"./shared-253e51f7.js";import"./foxy-payment-card-embed.js";import"./shared-99a8889a.js";import"./shared-673d668a.js";import"./shared-5fd5805c.js";import"./shared-5c057c26.js";import"./shared-651c44fa.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-bc2eb9bb.js";import"./shared-43e2c3f6.js";import"./shared-79d0699c.js";import"./foxy-transaction-card.js";import"./shared-7a4ca3f1.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-8b891950.js";import"./shared-eb963ba3.js";import"./shared-ada5e9f5.js";import"./shared-6f1261fa.js";import"./shared-91bf0fa2.js";import"./shared-63b647a8.js";import"./shared-a6b2bd14.js";import"./shared-38eb8858.js";import"./shared-4e309d01.js";import"./shared-f15af5d1.js";import"./shared-d0aed1c1.js";import"./shared-b738ee96.js";import"./shared-93c8789e.js";import"./shared-c92d72ba.js";import"./shared-7a2aaafa.js";import"./shared-9a4d52dd.js";import"./shared-f9f64dee.js";import"./shared-d5f6483f.js";import"./shared-25167d28.js";let z,u,b,$=t=>t;class H extends r{constructor(){super(...arguments),this.value=0,this.size=0}static get properties(){return{value:{type:Number},size:{type:Number}}}static get styles(){return h.styles}render(){const t=[],e=[];for(let s=0;s<this.size;++s)t.push(a(z||(z=$` <button id="tab-${0}" role="tab" class="${0}" aria-controls="panel-${0}" aria-selected="${0}" @click="${0}" @keydown="${0}"> <slot name="tab-${0}"></slot> </button> `),s,m({"text-l font-medium px-s rounded focus-outline-none focus-shadow-outline":!0,"text-tertiary hover-text-body focus-text-body":this.value!==s}),s,this.value===s,(()=>this.value=s),this.__handleKeyDown,s)),e.push(a(u||(u=$` <slot id="panel-${0}" role="tabpanel" name="panel-${0}" class="${0}" aria-hidden="${0}" aria-labelledby="tab-${0}"> </slot> `),s,s,m({hidden:this.value!==s}),this.value!==s,s));return a(b||(b=$` <div role="tablist" aria-orientation="horizontal" class="-mx-s mb-s">${0}</div> ${0} `),t,e)}__handleKeyDown(t){if(t.key.startsWith("Arrow")){t.preventDefault();const e=t.target;let s=null;"ArrowRight"===t.key||"ArrowDown"===t.key?s=e.nextElementSibling:"ArrowLeft"!==t.key&&"ArrowUp"!==t.key||(s=e.previousElementSibling),null==s||s.click(),null==s||s.focus()}}}
1
+ import"./shared-0995ae7c.js";import"./shared-75e7361d.js";import{h as t}from"./shared-a3a4c368.js";import"./shared-68a5368a.js";import"./shared-5212ef4f.js";import"./foxy-payment-method-card.js";import"./foxy-update-payment-method-form.js";import"./foxy-subscription-form.js";import"./foxy-form-dialog.js";import"./foxy-transactions-table.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-fc66cb5d.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./foxy-spinner.js";import"./foxy-table.js";import"./shared-70380f94.js";import{aH as e,_ as s}from"./shared-cb58dfcd.js";import{L as r,h as a,c as o}from"./shared-ba5c42c7.js";import{C as i}from"./shared-5afb584d.js";import"./shared-7b3aac7e.js";import"./shared-16ae74b2.js";import{z as h,S as d,T as n,a as l}from"./shared-1ce5b073.js";import{c as m}from"./shared-4e709717.js";import{S as c}from"./shared-eed9b226.js";import"./shared-a4ca1c5d.js";import{G as v}from"./shared-ee9ee09a.js";import"./shared-d2304d50.js";import"./shared-0662adb7.js";import"./shared-986d0f7f.js";import"./shared-92153a7f.js";import"./shared-864ea319.js";import"./shared-76cbea00.js";import{N as p}from"./shared-f83207fb.js";import{S as f}from"./shared-771431a9.js";import{i as g}from"./shared-53e42a77.js";import"./shared-500b7eb7.js";import"./shared-1f6366c0.js";import"./shared-cf613436.js";import"./foxy-nucleon-element.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-2aa23b5f.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-21fba20d.js";import"./shared-7f5f6657.js";import"./shared-42c91940.js";import"./shared-20fb2969.js";import"./shared-292dcee0.js";import"./shared-56d91134.js";import"./shared-677953e0.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-0e1ad508.js";import"./shared-6b3b8c63.js";import"./shared-4ded48ee.js";import"./shared-7995cbcf.js";import"./foxy-copy-to-clipboard.js";import"./shared-127ec8a7.js";import"./shared-bab2ea2c.js";import"./shared-53e476fd.js";import"./foxy-template-set-card.js";import"./shared-49337d35.js";import"./shared-253e51f7.js";import"./foxy-payment-card-embed.js";import"./shared-99a8889a.js";import"./shared-673d668a.js";import"./shared-5fd5805c.js";import"./shared-5c057c26.js";import"./shared-651c44fa.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-bc2eb9bb.js";import"./shared-43e2c3f6.js";import"./shared-79d0699c.js";import"./foxy-transaction-card.js";import"./shared-7a4ca3f1.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-8b891950.js";import"./shared-eb963ba3.js";import"./shared-ada5e9f5.js";import"./shared-6f1261fa.js";import"./shared-fca3a317.js";import"./shared-2a5d1cdf.js";import"./shared-a6b2bd14.js";import"./shared-a3a18e8d.js";import"./shared-4e309d01.js";import"./shared-076f086a.js";import"./shared-d0aed1c1.js";import"./shared-b738ee96.js";import"./shared-90754404.js";import"./shared-eb086cef.js";import"./shared-7a2aaafa.js";import"./shared-9a4d52dd.js";import"./shared-f9f64dee.js";import"./shared-d5f6483f.js";import"./shared-25167d28.js";let z,u,b,$=t=>t;class H extends r{constructor(){super(...arguments),this.value=0,this.size=0}static get properties(){return{value:{type:Number},size:{type:Number}}}static get styles(){return h.styles}render(){const t=[],e=[];for(let s=0;s<this.size;++s)t.push(a(z||(z=$` <button id="tab-${0}" role="tab" class="${0}" aria-controls="panel-${0}" aria-selected="${0}" @click="${0}" @keydown="${0}"> <slot name="tab-${0}"></slot> </button> `),s,m({"text-l font-medium px-s rounded focus-outline-none focus-shadow-outline":!0,"text-tertiary hover-text-body focus-text-body":this.value!==s}),s,this.value===s,(()=>this.value=s),this.__handleKeyDown,s)),e.push(a(u||(u=$` <slot id="panel-${0}" role="tabpanel" name="panel-${0}" class="${0}" aria-hidden="${0}" aria-labelledby="tab-${0}"> </slot> `),s,s,m({hidden:this.value!==s}),this.value!==s,s));return a(b||(b=$` <div role="tablist" aria-orientation="horizontal" class="-mx-s mb-s">${0}</div> ${0} `),t,e)}__handleKeyDown(t){if(t.key.startsWith("Arrow")){t.preventDefault();const e=t.target;let s=null;"ArrowRight"===t.key||"ArrowDown"===t.key?s=e.nextElementSibling:"ArrowLeft"!==t.key&&"ArrowUp"!==t.key||(s=e.previousElementSibling),null==s||s.click(),null==s||s.focus()}}}
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
@@ -1,4 +1,4 @@
1
- import{a as e,I as t}from"./shared-cc5e4c06.js";import"./shared-76cbea00.js";import"./shared-7b3aac7e.js";import"./shared-d2304d50.js";import"./shared-68a5368a.js";import{h as r,P as a,B as o}from"./shared-a3a4c368.js";import{E as i,T as s}from"./shared-500b7eb7.js";import"./shared-0995ae7c.js";import"./shared-70380f94.js";import{x as l,a as n}from"./shared-1ce5b073.js";import{c as d,h as A}from"./shared-ba5c42c7.js";import{i as u}from"./shared-53e42a77.js";import{c as p}from"./shared-4e709717.js";import"./shared-5c057c26.js";import{_ as c,B as m}from"./shared-cb58dfcd.js";import{A as h}from"./shared-5592ec6e.js";import"./shared-6286efb1.js";import"./shared-f15af5d1.js";import{I as g}from"./shared-0643656a.js";import"./foxy-nucleon-element.js";import"./shared-5212ef4f.js";import"./shared-5afb584d.js";import"./shared-2aa23b5f.js";import"./shared-f83207fb.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./shared-0662adb7.js";import"./shared-651c44fa.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-6b3b8c63.js";import"./shared-d0aed1c1.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./foxy-copy-to-clipboard.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-75e7361d.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";const f=r`<dom-module id="lumo-progress-bar" theme-for="vaadin-progress-bar">
1
+ import{a as e,I as t}from"./shared-677953e0.js";import"./shared-76cbea00.js";import"./shared-7b3aac7e.js";import"./shared-d2304d50.js";import"./shared-68a5368a.js";import{h as r,P as a,B as o}from"./shared-a3a4c368.js";import{E as i,T as s}from"./shared-500b7eb7.js";import"./shared-0995ae7c.js";import"./shared-70380f94.js";import{x as l,a as n}from"./shared-1ce5b073.js";import{c as d,h as A}from"./shared-ba5c42c7.js";import{i as u}from"./shared-53e42a77.js";import{c as p}from"./shared-4e709717.js";import"./shared-5c057c26.js";import{_ as c,B as m}from"./shared-cb58dfcd.js";import{A as h}from"./shared-5592ec6e.js";import"./shared-0e1ad508.js";import"./shared-076f086a.js";import{I as g}from"./shared-7995cbcf.js";import"./foxy-nucleon-element.js";import"./shared-5212ef4f.js";import"./shared-5afb584d.js";import"./shared-2aa23b5f.js";import"./shared-f83207fb.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./shared-0662adb7.js";import"./shared-651c44fa.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-6b3b8c63.js";import"./shared-d0aed1c1.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./foxy-copy-to-clipboard.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-75e7361d.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";const f=r`<dom-module id="lumo-progress-bar" theme-for="vaadin-progress-bar">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1 +1 @@
1
- import"./shared-ef98e595.js";import"./shared-63b647a8.js";import"./shared-c92d72ba.js";import"./shared-bf5b2106.js";import"./shared-f15af5d1.js";import{I as t}from"./shared-0643656a.js";import"./shared-68a5368a.js";import{a as e}from"./shared-cc5e4c06.js";import"./shared-70380f94.js";import{_ as r,B as a}from"./shared-cb58dfcd.js";import{N as s}from"./shared-f83207fb.js";import{h as o}from"./shared-ba5c42c7.js";import{a as n}from"./shared-1ce5b073.js";import{i}from"./shared-53e42a77.js";import"./shared-5fd5805c.js";import"./shared-5c057c26.js";import"./shared-7b3aac7e.js";import"./shared-a3a4c368.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-0995ae7c.js";import"./shared-292dcee0.js";import"./shared-500b7eb7.js";import"./shared-0662adb7.js";import"./shared-76cbea00.js";import"./shared-651c44fa.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-4e709717.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-d0aed1c1.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-5afb584d.js";import"./shared-2aa23b5f.js";import"./foxy-copy-to-clipboard.js";import"./shared-75e7361d.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-5212ef4f.js";import"./shared-0aedd809.js";import"./shared-7594e563.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-5ef40e86.js";let l,c=t=>t;customElements.define("foxy-internal-email-template-form-async-action",class extends e{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return r(r({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,e="fail"===t?"error":"";return o(l||(l=c` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),`${this.theme} ${null!=e?e:""}`.trim(),"busy"===t||this.disabled,this.__submit,t)}async __submit(){var t,e;if("busy"!==this.__state)try{this.__state="busy";const r=new s.API(this),a=await r.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=a.ok?"idle":"fail",a.ok&&(null===(e=this.nucleon)||void 0===e||e.refresh())}catch(t){this.__state="fail"}}});let h,m=t=>t;const d=n(t,"email-template-form");class f extends d{constructor(){super(...arguments),this.defaultSubject=null,this.__templateLanguageOptions=[{rawLabel:"Nunjucks",value:"nunjucks"},{rawLabel:"Handlebars",value:"handlebars"},{rawLabel:"Pug",value:"pug"},{rawLabel:"Twig",value:"twig"},{rawLabel:"EJS",value:"ejs"}],this.__toggleGetValue=()=>!!this.form.subject,this.__toggleSetValue=t=>{var e;t?this.edit({subject:null!==(e=this.defaultSubject)&&void 0!==e?e:this.t("general.subject.default_value")}):this.edit({subject:""})}}static get properties(){return r(r({},super.properties),{},{defaultSubject:{attribute:"default-subject"}})}get readonlySelector(){const t=[super.readonlySelector.toString()],e=this.form.subject;return this.form.content_html_url&&e&&t.unshift("content-html"),this.form.content_text_url&&e&&t.unshift("content-text"),new a(t.join(" ").trim())}get disabledSelector(){const t=[super.disabledSelector.toString()];return this.in({idle:{snapshot:"clean"}})&&this.data.content_html_url&&this.data.content_text_url||t.unshift("html-source:cache","text-source:cache"),this.form.subject||t.unshift("general:template-language","html-source","text-source","content-html","content-text"),new a(t.join(" ").trim())}get hiddenSelector(){var t,e,r;const s=[super.hiddenSelector.toString()];return(null===(t=this.data)||void 0===t?void 0:t.content_html_url)||s.unshift("html-source:cache"),(null===(e=this.data)||void 0===e?void 0:e.content_text_url)||s.unshift("text-source:cache"),(null===(r=this.data)||void 0===r?void 0:r.subject)||this.form.subject||s.unshift("general:template-language","general:subject","html-source","text-source","content-html","content-text"),new a(s.join(" ").trim())}renderBody(){var t,e;return o(h||(h=m` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="description"> </foxy-internal-text-control> <foxy-internal-switch-control infer="toggle" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> <foxy-internal-text-control layout="summary-item" infer="subject"> </foxy-internal-text-control> <foxy-internal-select-control layout="summary-item" infer="template-language" .options="${0}"> </foxy-internal-select-control> </foxy-internal-summary-control> ${0} <foxy-internal-source-control infer="content-html"></foxy-internal-source-control> <foxy-internal-summary-control infer="html-source"> <foxy-internal-text-control layout="summary-item" infer="content-html-url"> </foxy-internal-text-control> <foxy-internal-email-template-form-async-action theme="tertiary-inline" infer="cache" href="${0}"> </foxy-internal-email-template-form-async-action> </foxy-internal-summary-control> <foxy-internal-source-control infer="content-text"></foxy-internal-source-control> <foxy-internal-summary-control infer="text-source"> <foxy-internal-text-control layout="summary-item" infer="content-text-url"> </foxy-internal-text-control> <foxy-internal-email-template-form-async-action theme="tertiary-inline" infer="cache" href="${0}"> </foxy-internal-email-template-form-async-action> </foxy-internal-summary-control> ${0} `),this.renderHeader(),this.__toggleGetValue,this.__toggleSetValue,this.__templateLanguageOptions,this.renderTemplateOrSlot(),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:cache"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:cache"].href),super.renderBody())}async _sendPost(t){const e=await super._sendPost(t);if(t.content_html_url&&t.content_text_url){const t=e._links["fx:cache"].href;if(!(await new f.API(this).fetch(t,{method:"POST"})).ok)throw["error:failed_to_cache"]}return await this._fetch(e._links.self.href)}async _sendPatch(t){const e=await super._sendPatch(t);if(!t.content_html_url&&!t.content_text_url)return e;const r=e._links["fx:cache"].href;if(!(await new f.API(this).fetch(r,{method:"POST"})).ok)throw["error:failed_to_cache"];return await this._fetch(e._links.self.href)}}customElements.define("foxy-email-template-form",f);export{f as EmailTemplateForm};
1
+ import"./shared-56d91134.js";import"./shared-2a5d1cdf.js";import"./shared-eb086cef.js";import"./shared-e653b80e.js";import"./shared-076f086a.js";import{I as t}from"./shared-7995cbcf.js";import"./shared-68a5368a.js";import{a as e}from"./shared-677953e0.js";import"./shared-70380f94.js";import{_ as r,B as s}from"./shared-cb58dfcd.js";import{N as a}from"./shared-f83207fb.js";import{h as o}from"./shared-ba5c42c7.js";import{a as n}from"./shared-1ce5b073.js";import{i}from"./shared-53e42a77.js";import"./shared-5fd5805c.js";import"./shared-5c057c26.js";import"./shared-7b3aac7e.js";import"./shared-a3a4c368.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-0995ae7c.js";import"./shared-292dcee0.js";import"./shared-500b7eb7.js";import"./shared-0662adb7.js";import"./shared-76cbea00.js";import"./shared-651c44fa.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-4e709717.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-d0aed1c1.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-5afb584d.js";import"./shared-2aa23b5f.js";import"./foxy-copy-to-clipboard.js";import"./shared-75e7361d.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-5212ef4f.js";import"./shared-0aedd809.js";import"./shared-7594e563.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-5ef40e86.js";let l,c=t=>t;customElements.define("foxy-internal-email-template-form-async-action",class extends e{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return r(r({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,e="fail"===t?"error":"";return o(l||(l=c` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),`${this.theme} ${null!=e?e:""}`.trim(),"busy"===t||this.disabled,this.__submit,t)}async __submit(){var t,e;if("busy"!==this.__state)try{this.__state="busy";const r=new a.API(this),s=await r.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=s.ok?"idle":"fail",s.ok&&(null===(e=this.nucleon)||void 0===e||e.refresh())}catch(t){this.__state="fail"}}});let h,m=t=>t;const d=n(t,"email-template-form");class f extends d{constructor(){super(...arguments),this.defaultSubject=null,this.__templateLanguageOptions=[{rawLabel:"Nunjucks",value:"nunjucks"},{rawLabel:"Handlebars",value:"handlebars"},{rawLabel:"Pug",value:"pug"},{rawLabel:"Twig",value:"twig"},{rawLabel:"EJS",value:"ejs"}],this.__toggleGetValue=()=>!!this.form.subject,this.__toggleSetValue=t=>{var e;t?this.edit({subject:null!==(e=this.defaultSubject)&&void 0!==e?e:this.t("general.subject.default_value")}):this.edit({subject:""})}}static get properties(){return r(r({},super.properties),{},{defaultSubject:{attribute:"default-subject"}})}get readonlySelector(){const t=[super.readonlySelector.toString()],e=this.form.subject;return this.form.content_html_url&&e&&t.unshift("content-html"),this.form.content_text_url&&e&&t.unshift("content-text"),new s(t.join(" ").trim())}get disabledSelector(){const t=[super.disabledSelector.toString()];return this.in({idle:{snapshot:"clean"}})&&this.data.content_html_url&&this.data.content_text_url||t.unshift("html-source:cache","text-source:cache"),this.form.subject||t.unshift("general:template-language","html-source","text-source","content-html","content-text"),new s(t.join(" ").trim())}get hiddenSelector(){var t,e,r;const a=[super.hiddenSelector.toString()];return(null===(t=this.data)||void 0===t?void 0:t.content_html_url)||a.unshift("html-source:cache"),(null===(e=this.data)||void 0===e?void 0:e.content_text_url)||a.unshift("text-source:cache"),(null===(r=this.data)||void 0===r?void 0:r.subject)||this.form.subject||a.unshift("general:template-language","general:subject","html-source","text-source","content-html","content-text"),new s(a.join(" ").trim())}renderBody(){var t,e;return o(h||(h=m` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="description"> </foxy-internal-text-control> <foxy-internal-switch-control infer="toggle" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> <foxy-internal-text-control layout="summary-item" infer="subject"> </foxy-internal-text-control> <foxy-internal-select-control layout="summary-item" infer="template-language" .options="${0}"> </foxy-internal-select-control> </foxy-internal-summary-control> ${0} <foxy-internal-source-control infer="content-html"></foxy-internal-source-control> <foxy-internal-summary-control infer="html-source"> <foxy-internal-text-control layout="summary-item" infer="content-html-url"> </foxy-internal-text-control> <foxy-internal-email-template-form-async-action theme="tertiary-inline" infer="cache" href="${0}"> </foxy-internal-email-template-form-async-action> </foxy-internal-summary-control> <foxy-internal-source-control infer="content-text"></foxy-internal-source-control> <foxy-internal-summary-control infer="text-source"> <foxy-internal-text-control layout="summary-item" infer="content-text-url"> </foxy-internal-text-control> <foxy-internal-email-template-form-async-action theme="tertiary-inline" infer="cache" href="${0}"> </foxy-internal-email-template-form-async-action> </foxy-internal-summary-control> ${0} `),this.renderHeader(),this.__toggleGetValue,this.__toggleSetValue,this.__templateLanguageOptions,this.renderTemplateOrSlot(),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:cache"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:cache"].href),super.renderBody())}async _sendPost(t){const e=await super._sendPost(t);if(t.content_html_url&&t.content_text_url){const t=e._links["fx:cache"].href;if(!(await new f.API(this).fetch(t,{method:"POST"})).ok)throw["error:failed_to_cache"]}return await this._fetch(e._links.self.href)}async _sendPatch(t){const e=await super._sendPatch(t);if(!t.content_html_url&&!t.content_text_url)return e;const r=e._links["fx:cache"].href;if(!(await new f.API(this).fetch(r,{method:"POST"})).ok)throw["error:failed_to_cache"];return await this._fetch(e._links.self.href)}}customElements.define("foxy-email-template-form",f);export{f as EmailTemplateForm};