@warp-ds/elements 2.10.0-next.4 → 2.10.0-next.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.
- package/dist/custom-elements.json +68 -14
- package/dist/docs/affix/affix.md +2 -0
- package/dist/docs/affix/styling.md +1 -0
- package/dist/docs/alert/alert.md +2 -0
- package/dist/docs/alert/styling.md +1 -0
- package/dist/docs/attention/attention.md +2 -0
- package/dist/docs/attention/styling.md +1 -0
- package/dist/docs/badge/badge.md +2 -0
- package/dist/docs/badge/styling.md +1 -0
- package/dist/docs/box/box.md +22 -38
- package/dist/docs/box/examples.md +20 -38
- package/dist/docs/box/styling.md +1 -0
- package/dist/docs/breadcrumbs/breadcrumbs.md +8 -0
- package/dist/docs/breadcrumbs/examples.md +7 -1
- package/dist/docs/breadcrumbs/styling.md +1 -0
- package/dist/docs/button/button.md +73 -0
- package/dist/docs/button/styling.md +72 -0
- package/dist/docs/card/card.md +2 -0
- package/dist/docs/card/styling.md +1 -0
- package/dist/docs/checkbox/api.md +128 -0
- package/dist/docs/checkbox/checkbox.md +134 -0
- package/dist/docs/checkbox-group/accessibility.md +71 -0
- package/dist/docs/checkbox-group/api.md +79 -0
- package/dist/docs/checkbox-group/checkbox-group.md +492 -0
- package/dist/docs/checkbox-group/examples.md +105 -0
- package/dist/docs/checkbox-group/styling.md +132 -0
- package/dist/docs/checkbox-group/usage.md +95 -0
- package/dist/docs/combobox/combobox.md +2 -0
- package/dist/docs/combobox/styling.md +1 -0
- package/dist/docs/datepicker/accessibility.md +25 -0
- package/dist/docs/datepicker/api.md +22 -14
- package/dist/docs/datepicker/datepicker.md +208 -14
- package/dist/docs/datepicker/examples.md +75 -0
- package/dist/docs/datepicker/styling.md +1 -0
- package/dist/docs/datepicker/usage.md +84 -0
- package/dist/docs/expandable/api.md +20 -32
- package/dist/docs/expandable/examples.md +54 -0
- package/dist/docs/expandable/expandable.md +74 -32
- package/dist/docs/expandable/styling.md +1 -0
- package/dist/docs/icon/icon.md +2 -0
- package/dist/docs/icon/styling.md +1 -0
- package/dist/docs/link/link.md +2 -0
- package/dist/docs/link/styling.md +1 -0
- package/dist/docs/modal/modal.md +2 -0
- package/dist/docs/modal/styling.md +1 -0
- package/dist/docs/modal-footer/modal-footer.md +0 -6
- package/dist/docs/modal-header/modal-header.md +0 -6
- package/dist/docs/page-indicator/page-indicator.md +2 -0
- package/dist/docs/page-indicator/styling.md +1 -0
- package/dist/docs/pagination/pagination.md +2 -0
- package/dist/docs/pagination/styling.md +1 -0
- package/dist/docs/pill/pill.md +2 -0
- package/dist/docs/pill/styling.md +1 -0
- package/dist/docs/radio/radio.md +0 -6
- package/dist/docs/select/select.md +2 -0
- package/dist/docs/select/styling.md +1 -0
- package/dist/docs/slider/slider.md +2 -0
- package/dist/docs/slider/styling.md +1 -0
- package/dist/docs/slider-thumb/slider-thumb.md +2 -0
- package/dist/docs/slider-thumb/styling.md +1 -0
- package/dist/docs/step-indicator/step-indicator.md +2 -0
- package/dist/docs/step-indicator/styling.md +1 -0
- package/dist/docs/switch/styling.md +1 -0
- package/dist/docs/switch/switch.md +2 -0
- package/dist/docs/tabs/styling.md +1 -0
- package/dist/docs/tabs/tabs.md +2 -0
- package/dist/docs/textarea/styling.md +1 -0
- package/dist/docs/textarea/textarea.md +2 -0
- package/dist/docs/textfield/styling.md +1 -0
- package/dist/docs/textfield/textfield.md +2 -0
- package/dist/index.d.ts +164 -128
- package/dist/packages/affix/affix.hydration.test.js +1 -1
- package/dist/packages/alert/alert.hydration.test.js +1 -1
- package/dist/packages/attention/attention.hydration.test.js +1 -1
- package/dist/packages/attention/attention.js +397 -446
- package/dist/packages/attention/attention.js.map +4 -4
- package/dist/packages/badge/badge.hydration.test.js +1 -1
- package/dist/packages/box/box.hydration.test.js +1 -1
- package/dist/packages/breadcrumbs/breadcrumbs.hydration.test.js +3 -2
- package/dist/packages/button/button.hydration.test.js +1 -1
- package/dist/packages/button/button.js +387 -436
- package/dist/packages/button/button.js.map +4 -4
- package/dist/packages/button/button.stories.d.ts +29 -0
- package/dist/packages/button/button.stories.js +176 -2
- package/dist/packages/button/styles.d.ts +22 -1
- package/dist/packages/button/styles.js +390 -1
- package/dist/packages/card/card.hydration.test.js +1 -1
- package/dist/packages/checkbox/checkbox.d.ts +5 -3
- package/dist/packages/checkbox/checkbox.hydration.test.js +1 -1
- package/dist/packages/checkbox/checkbox.js +2 -2
- package/dist/packages/checkbox/checkbox.js.map +3 -3
- package/dist/packages/checkbox/checkbox.react.stories.d.ts +1 -1
- package/dist/packages/checkbox/checkbox.stories.d.ts +2 -2
- package/dist/packages/checkbox/react.d.ts +2 -2
- package/dist/packages/checkbox-group/checkbox-group.d.ts +5 -3
- package/dist/packages/checkbox-group/checkbox-group.hydration.test.js +1 -1
- package/dist/packages/checkbox-group/checkbox-group.js +6 -6
- package/dist/packages/checkbox-group/checkbox-group.js.map +3 -3
- package/dist/packages/checkbox-group/react.d.ts +3 -3
- package/dist/packages/datepicker/datepicker.d.ts +22 -30
- package/dist/packages/datepicker/datepicker.hydration.test.js +1 -1
- package/dist/packages/datepicker/datepicker.js.map +2 -2
- package/dist/packages/expandable/expandable.d.ts +11 -32
- package/dist/packages/expandable/expandable.hydration.test.js +1 -1
- package/dist/packages/expandable/expandable.js.map +2 -2
- package/dist/packages/expandable/expandable.react.stories.d.ts +2 -2
- package/dist/packages/expandable/react.d.ts +1 -1
- package/dist/packages/icon/icon.hydration.test.js +1 -1
- package/dist/packages/link/link.hydration.test.js +1 -1
- package/dist/packages/link/link.js +420 -190
- package/dist/packages/link/link.js.map +4 -4
- package/dist/packages/link/styles.d.ts +5 -0
- package/dist/packages/link/styles.js +80 -0
- package/dist/packages/modal/modal.hydration.test.js +1 -1
- package/dist/packages/page-indicator/page-indicator.hydration.test.js +1 -1
- package/dist/packages/pagination/pagination.hydration.test.js +1 -1
- package/dist/packages/pill/pill.hydration.test.js +1 -1
- package/dist/packages/radio/radio.hydration.test.js +1 -1
- package/dist/packages/radio/radio.js.map +1 -1
- package/dist/packages/radio-group/radio-group.a11y.test.js +6 -2
- package/dist/packages/radio-group/radio-group.hydration.test.js +6 -2
- package/dist/packages/radio-group/radio-group.js +2 -2
- package/dist/packages/radio-group/radio-group.js.map +4 -4
- package/dist/packages/select/select.a11y.test.js +6 -2
- package/dist/packages/select/select.hydration.test.js +1 -1
- package/dist/packages/select/select.test.js +4 -2
- package/dist/packages/slider/slider.hydration.test.js +7 -2
- package/dist/packages/slider/slider.js.map +1 -1
- package/dist/packages/slider/slider.react.stories.js +2 -2
- package/dist/packages/slider-thumb/slider-thumb.hydration.test.js +1 -1
- package/dist/packages/step/step.hydration.test.js +1 -1
- package/dist/packages/step-indicator/step-indicator.hydration.test.js +1 -1
- package/dist/packages/switch/switch.hydration.test.js +1 -1
- package/dist/packages/tab/tab.hydration.test.js +1 -1
- package/dist/packages/tab-panel/tab-panel.hydration.test.js +1 -1
- package/dist/packages/tabs/tabs.a11y.test.js +1 -1
- package/dist/packages/tabs/tabs.hydration.test.js +1 -1
- package/dist/packages/tabs/tabs.test.js +3 -3
- package/dist/packages/textarea/textarea.hydration.test.js +1 -1
- package/dist/packages/textfield/textfield.hydration.test.js +1 -1
- package/dist/web-types.json +91 -28
- package/eik/index.js +115 -0
- package/package.json +7 -4
- package/dist/docs/modal-footer/accessibility.md +0 -1
- package/dist/docs/modal-footer/examples.md +0 -1
- package/dist/docs/modal-footer/usage.md +0 -1
- package/dist/docs/modal-header/accessibility.md +0 -1
- package/dist/docs/modal-header/examples.md +0 -1
- package/dist/docs/modal-header/usage.md +0 -1
- package/dist/docs/radio/accessibility.md +0 -1
- package/dist/docs/radio/examples.md +0 -1
- package/dist/docs/radio/usage.md +0 -1
- package/dist/packages/button/styles/w-button.styles.d.ts +0 -1
- package/dist/packages/button/styles/w-button.styles.js +0 -282
- package/dist/packages/link/styles/w-link.styles.d.ts +0 -1
- package/dist/packages/link/styles/w-link.styles.js +0 -213
package/eik/index.js
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),o=new WeakMap;let i=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const r=this.t;if(t&&void 0===e){const t=void 0!==r&&1===r.length;t&&(e=o.get(r)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&o.set(r,e))}return e}toString(){return this.cssText}};const a=(e,...t)=>{const o=1===e.length?e[0]:t.reduce((t,r,o)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[o+1],e[0]);return new i(o,e,r)},n=t?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new i("string"==typeof e?e:e+"",void 0,r))(t)})(e):e,{is:s,defineProperty:l,getOwnPropertyDescriptor:d,getOwnPropertyNames:c,getOwnPropertySymbols:h,getPrototypeOf:u}=Object,p=globalThis,b=p.trustedTypes,g=b?b.emptyScript:"",m=p.reactiveElementPolyfillSupport,v=(e,t)=>e,f={toAttribute(e,t){switch(t){case Boolean:e=e?g:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},w=(e,t)=>!s(e,t),y={attribute:!0,type:String,converter:f,reflect:!1,useDefault:!1,hasChanged:w};
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2017 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/Symbol.metadata??=Symbol("metadata"),p.litPropertyMetadata??=new WeakMap;let x=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=y){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),o=this.getPropertyDescriptor(e,r,t);void 0!==o&&l(this.prototype,e,o)}}static getPropertyDescriptor(e,t,r){const{get:o,set:i}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:o,set(t){const a=o?.call(this);i?.call(this,t),this.requestUpdate(e,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??y}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const e=u(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const e=this.properties,t=[...c(e),...h(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(n(e))}else void 0!==e&&t.push(n(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const r=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((r,o)=>{if(t)r.adoptedStyleSheets=o.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const t of o){const o=document.createElement("style"),i=e.litNonce;void 0!==i&&o.setAttribute("nonce",i),o.textContent=t.cssText,r.appendChild(o)}})(r,this.constructor.elementStyles),r}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,r);if(void 0!==o&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:f).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(o):this.setAttribute(o,i),this._$Em=null}}_$AK(e,t){const r=this.constructor,o=r._$Eh.get(e);if(void 0!==o&&this._$Em!==o){const e=r.getPropertyOptions(o),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:f;this._$Em=o;const a=i.fromAttribute(t,e.type);this[o]=a??this._$Ej?.get(o)??a,this._$Em=null}}requestUpdate(e,t,r,o=!1,i){if(void 0!==e){const a=this.constructor;if(!1===o&&(i=this[e]),r??=a.getPropertyOptions(e),!((r.hasChanged??w)(i,t)||r.useDefault&&r.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,r))))return;this.C(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:o,wrapped:i},a){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||void 0!==a)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),!0===o&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e){const{wrapped:e}=r,o=this[t];!0!==e||this._$AL.has(t)||void 0===o||this.C(t,void 0,r,o)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};x.elementStyles=[],x.shadowRootOptions={mode:"open"},x[v("elementProperties")]=new Map,x[v("finalized")]=new Map,m?.({ReactiveElement:x}),(p.reactiveElementVersions??=[]).push("2.1.2");
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2017 Google LLC
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*/
|
|
17
|
+
const k=globalThis,_=e=>e,$=k.trustedTypes,S=$?$.createPolicy("lit-html",{createHTML:e=>e}):void 0,E="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+C,z=`<${O}>`,A=document,D=()=>A.createComment(""),P=e=>null===e||"object"!=typeof e&&"function"!=typeof e,M=Array.isArray,T="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,R=/-->/g,N=/>/g,I=RegExp(`>|${T}(?:([^\\s"'>=/]+)(${T}*=${T}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,F=/"/g,L=/^(?:script|style|textarea|title)$/i,q=(e=>(t,...r)=>({_$litType$:e,strings:t,values:r}))(1),B=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),H=new WeakMap,Y=A.createTreeWalker(A,129);function X(e,t){if(!M(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(t):t}class U{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let i=0,a=0;const n=e.length-1,s=this.parts,[l,d]=((e,t)=>{const r=e.length-1,o=[];let i,a=2===t?"<svg>":3===t?"<math>":"",n=j;for(let t=0;t<r;t++){const r=e[t];let s,l,d=-1,c=0;for(;c<r.length&&(n.lastIndex=c,l=n.exec(r),null!==l);)c=n.lastIndex,n===j?"!--"===l[1]?n=R:void 0!==l[1]?n=N:void 0!==l[2]?(L.test(l[2])&&(i=RegExp("</"+l[2],"g")),n=I):void 0!==l[3]&&(n=I):n===I?">"===l[0]?(n=i??j,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,s=l[1],n=void 0===l[3]?I:'"'===l[3]?F:V):n===F||n===V?n=I:n===R||n===N?n=j:(n=I,i=void 0);const h=n===I&&e[t+1].startsWith("/>")?" ":"";a+=n===j?r+z:d>=0?(o.push(s),r.slice(0,d)+E+r.slice(d)+C+h):r+C+(-2===d?t:h)}return[X(e,a+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),o]})(e,t);if(this.el=U.createElement(l,r),Y.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(o=Y.nextNode())&&s.length<n;){if(1===o.nodeType){if(o.hasAttributes())for(const e of o.getAttributeNames())if(e.endsWith(E)){const t=d[a++],r=o.getAttribute(e).split(C),n=/([.?@])?(.*)/.exec(t);s.push({type:1,index:i,name:n[2],strings:r,ctor:"."===n[1]?G:"?"===n[1]?ee:"@"===n[1]?te:Q}),o.removeAttribute(e)}else e.startsWith(C)&&(s.push({type:6,index:i}),o.removeAttribute(e));if(L.test(o.tagName)){const e=o.textContent.split(C),t=e.length-1;if(t>0){o.textContent=$?$.emptyScript:"";for(let r=0;r<t;r++)o.append(e[r],D()),Y.nextNode(),s.push({type:2,index:++i});o.append(e[t],D())}}}else if(8===o.nodeType)if(o.data===O)s.push({type:2,index:i});else{let e=-1;for(;-1!==(e=o.data.indexOf(C,e+1));)s.push({type:7,index:i}),e+=C.length-1}i++}}static createElement(e,t){const r=A.createElement("template");return r.innerHTML=e,r}}function J(e,t,r=e,o){if(t===B)return t;let i=void 0!==o?r._$Co?.[o]:r._$Cl;const a=P(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),void 0===a?i=void 0:(i=new a(e),i._$AT(e,r,o)),void 0!==o?(r._$Co??=[])[o]=i:r._$Cl=i),void 0!==i&&(t=J(e,i._$AS(e,t.values),i,o)),t}class K{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,o=(e?.creationScope??A).importNode(t,!0);Y.currentNode=o;let i=Y.nextNode(),a=0,n=0,s=r[0];for(;void 0!==s;){if(a===s.index){let t;2===s.type?t=new Z(i,i.nextSibling,this,e):1===s.type?t=new s.ctor(i,s.name,s.strings,this,e):6===s.type&&(t=new re(i,this,e)),this._$AV.push(t),s=r[++n]}a!==s?.index&&(i=Y.nextNode(),a++)}return Y.currentNode=A,o}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class Z{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,o){this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=J(this,e,t),P(e)?e===W||null==e||""===e?(this._$AH!==W&&this._$AR(),this._$AH=W):e!==this._$AH&&e!==B&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>M(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==W&&P(this._$AH)?this._$AA.nextSibling.data=e:this.T(A.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,o="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=U.createElement(X(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(t);else{const e=new K(o,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=H.get(e.strings);return void 0===t&&H.set(e.strings,t=new U(e)),t}k(e){M(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,o=0;for(const i of e)o===t.length?t.push(r=new Z(this.O(D()),this.O(D()),this,this.options)):r=t[o],r._$AI(i),o++;o<t.length&&(this._$AR(r&&r._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=_(e).nextSibling;_(e).remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class Q{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,o,i){this.type=1,this._$AH=W,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=W}_$AI(e,t=this,r,o){const i=this.strings;let a=!1;if(void 0===i)e=J(this,e,t,0),a=!P(e)||e!==this._$AH&&e!==B,a&&(this._$AH=e);else{const o=e;let n,s;for(e=i[0],n=0;n<i.length-1;n++)s=J(this,o[r+n],t,n),s===B&&(s=this._$AH[n]),a||=!P(s)||s!==this._$AH[n],s===W?e=W:e!==W&&(e+=(s??"")+i[n+1]),this._$AH[n]=s}a&&!o&&this.j(e)}j(e){e===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class G extends Q{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===W?void 0:e}}class ee extends Q{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==W)}}class te extends Q{constructor(e,t,r,o,i){super(e,t,r,o,i),this.type=5}_$AI(e,t=this){if((e=J(this,e,t,0)??W)===B)return;const r=this._$AH,o=e===W&&r!==W||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==W&&(r===W||o);o&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class re{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){J(this,e)}}const oe={I:Z},ie=k.litHtmlPolyfillSupport;ie?.(U,Z),(k.litHtmlVersions??=[]).push("3.3.2");const ae=globalThis;
|
|
18
|
+
/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2017 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/let ne=class extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,r)=>{const o=r?.renderBefore??t;let i=o._$litPart$;if(void 0===i){const e=r?.renderBefore??null;o._$litPart$=i=new Z(t.insertBefore(D(),e),e,void 0,r??{})}return i._$AI(e),i})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return B}};ne._$litElement$=!0,ne.finalized=!0,ae.litElementHydrateSupport?.({LitElement:ne});const se=ae.litElementPolyfillSupport;se?.({LitElement:ne}),(ae.litElementVersions??=[]).push("4.2.2");
|
|
23
|
+
/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2017 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/
|
|
28
|
+
const le={attribute:!0,type:String,converter:f,reflect:!1,hasChanged:w},de=(e=le,t,r)=>{const{kind:o,metadata:i}=r;let a=globalThis.litPropertyMetadata.get(i);if(void 0===a&&globalThis.litPropertyMetadata.set(i,a=new Map),"setter"===o&&((e=Object.create(e)).wrapped=!0),a.set(r.name,e),"accessor"===o){const{name:o}=r;return{set(r){const i=t.get.call(this);t.set.call(this,r),this.requestUpdate(o,i,e,!0,r)},init(t){return void 0!==t&&this.C(o,void 0,e,t),t}}}if("setter"===o){const{name:o}=r;return function(r){const i=this[o];t.call(this,r),this.requestUpdate(o,i,e,!0,r)}}throw Error("Unsupported decorator location: "+o)};function ce(e){return(t,r)=>"object"==typeof r?de(e,t,r):((e,t,r)=>{const o=t.hasOwnProperty(r);return t.constructor.createProperty(r,e),o?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}
|
|
29
|
+
/**
|
|
30
|
+
* @license
|
|
31
|
+
* Copyright 2017 Google LLC
|
|
32
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
|
+
*/function he(e){return ce({...e,state:!0,attribute:!1})}
|
|
34
|
+
/**
|
|
35
|
+
* @license
|
|
36
|
+
* Copyright 2017 Google LLC
|
|
37
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
+
*/const ue=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);
|
|
39
|
+
/**
|
|
40
|
+
* @license
|
|
41
|
+
* Copyright 2017 Google LLC
|
|
42
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
+
*/function pe(e,t){return(r,o,i)=>{const a=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof o?r:i??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return ue(r,o,{get(){let r=e.call(this);return void 0===r&&(r=a(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return ue(r,o,{get(){return a(this)}})}}
|
|
44
|
+
/**
|
|
45
|
+
* @license
|
|
46
|
+
* Copyright 2017 Google LLC
|
|
47
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
|
+
*/const be=1,ge=2,me=3,ve=4,fe=e=>(...t)=>({_$litDirective$:e,values:t});let we=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};
|
|
49
|
+
/**
|
|
50
|
+
* @license
|
|
51
|
+
* Copyright 2018 Google LLC
|
|
52
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
+
*/const ye=fe(class extends we{constructor(e){if(super(e),e.type!==be||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const o=!!t[e];o===this.st.has(e)||this.nt?.has(e)||(o?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return B}}),xe=a`:host{display:inline-block}.w-icon{--_w-icon-size:var(--w-icon-size, 24px);height:var(--_w-icon-size);width:var(--_w-icon-size);display:flex}.w-icon svg{pointer-events:none;height:var(--_w-icon-size);width:var(--_w-icon-size)}.w-icon--s{--w-icon-size:16px}.w-icon--m{--w-icon-size:24px}.w-icon--l{--w-icon-size:32px}`;var ke=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const _e=new Map;class $e extends ne{constructor(){super(...arguments),this.locale=document.documentElement.lang||"en",this.svg=null}static{this.styles=[xe]}async fetchIcon(e){const t=`https://assets.finn.no/pkg/eikons/v1/${this.locale}/${e}.svg`;try{const e=await function(e,t={}){const r=t.responseParser??(e=>e.text());return _e.has(e)||_e.set(e,fetch(e).then(r)),_e.get(e)}(t);return(new DOMParser).parseFromString(e,"text/html").body.querySelector("svg")}catch{return null}}firstUpdated(){this.loadIcon()}updated(e){(e.has("name")||e.has("locale"))&&this.loadIcon()}async loadIcon(){if(!this.name)return void(this.svg=null);let e=await this.fetchIcon(this.name);if(!e){e=(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',"text/html").body.firstElementChild}this.svg=e}render(){const e=this.size||"medium",t=this.name||"",r={"w-icon":!0,"w-icon--s":"small"===e,"w-icon--m":"medium"===e,"w-icon--l":"large"===e},o="string"==typeof e&&e.endsWith("px")?`--w-icon-size: ${e};`:"";return q`<div class="${ye(r)}" style="${o}" part="w-${t.toLowerCase()}">${this.svg}</div>`}}ke([ce({type:String,reflect:!0})],$e.prototype,"name",void 0),ke([ce({type:String,reflect:!0})],$e.prototype,"size",void 0),ke([ce({type:String,reflect:!0,useDefault:!0})],$e.prototype,"locale",void 0),ke([he()],$e.prototype,"svg",void 0);const Se=$e;customElements.get("w-icon")||customElements.define("w-icon",$e);var Ee=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.reduce(function(e,t){return e.concat("string"==typeof t?t:Array.isArray(t)?Ee.apply(void 0,t):"object"==typeof t&&t?Object.keys(t).map(function(e){return t[e]?e:""}):"")},[]).join(" ")},Ce=function(e,t,r,o){if("a"===r&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?o:"a"===r?o.call(e):o?o.value:t.get(e)},Oe=function(e,t,r,o,i){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?i.call(e,r):i?i.value=r:t.set(e,r),r};function ze(e){var t,r,o,i,a,n,s,l,d,c,h,u,p,b,g,m,v,f;return r=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,n=new WeakMap,s=new WeakMap,l=new WeakMap,d=new WeakMap,c=new WeakMap,h=new WeakMap,u=new WeakMap,p=new WeakMap,b=new WeakMap,t=new WeakSet,g=function(){if(this.hasAttribute("disabled"))return!1;const e=Ce(this,o,"f")||Ce(this,i,"f")&&!this.validity.valid&&!Ce(this,r,"f");return e&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),e},m=function(e){const r=this.constructor,o={},i=r.validators,s=[],l=i.some(e=>e.isValid instanceof Promise);Ce(this,p,"f")||(Oe(this,b,new Promise(e=>{Oe(this,u,e,"f")}),"f"),Oe(this,p,!0,"f")),Ce(this,a,"f")&&(Ce(this,a,"f").abort(),Oe(this,n,Ce(this,a,"f"),"f"));const d=new AbortController;let c;Oe(this,a,d,"f");let h=!1;i.length&&(i.forEach(r=>{const i=r.key||"customError",a=r.isValid(this,e,d.signal);a instanceof Promise?(s.push(a),a.then(a=>{null!=a&&(o[i]=!a,c=Ce(this,t,"m",f).call(this,r,e),Ce(this,t,"m",v).call(this,o,c))})):(o[i]=!a,this.validity[i]!==!a&&(h=!0),a||c||(c=Ce(this,t,"m",f).call(this,r,e)))}),Promise.allSettled(s).then(()=>{var e;(null==d?void 0:d.signal.aborted)||(Oe(this,p,!1,"f"),null===(e=Ce(this,u,"f"))||void 0===e||e.call(this))}),!h&&l||Ce(this,t,"m",v).call(this,o,c))},v=function(e,t){if(this.validationTarget)this.internals.setValidity(e,t,this.validationTarget),Oe(this,s,!1,"f");else{if(this.internals.setValidity(e,t),this.internals.validity.valid)return;Oe(this,s,!0,"f")}},f=function(e,t){if(this.validityCallback){const t=this.validityCallback(e.key||"customError");if(t)return t}return e.message instanceof Function?e.message(this,t):e.message},class extends e{constructor(...e){var v,f,w;super(...e),t.add(this),this.internals=this.attachInternals(),r.set(this,!1),o.set(this,!1),i.set(this,!1),a.set(this,void 0),n.set(this,void 0),s.set(this,!0),l.set(this,""),d.set(this,()=>{Oe(this,i,!0,"f"),Oe(this,r,!0,"f"),Ce(this,t,"m",g).call(this)}),c.set(this,()=>{Oe(this,r,!1,"f"),Ce(this,t,"m",m).call(this,this.shouldFormValueUpdate()?Ce(this,l,"f"):""),!this.validity.valid&&Ce(this,i,"f")&&Oe(this,o,!0,"f");const e=Ce(this,t,"m",g).call(this);this.validationMessageCallback&&this.validationMessageCallback(e?this.internals.validationMessage:"")}),h.set(this,()=>{var e;Ce(this,s,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),Oe(this,s,!1,"f")),Oe(this,i,!0,"f"),Oe(this,o,!0,"f"),Ce(this,t,"m",g).call(this),null===(e=null==this?void 0:this.validationMessageCallback)||void 0===e||e.call(this,this.showError?this.internals.validationMessage:"")}),u.set(this,void 0),p.set(this,!1),b.set(this,Promise.resolve()),null===(v=this.addEventListener)||void 0===v||v.call(this,"focus",Ce(this,d,"f")),null===(f=this.addEventListener)||void 0===f||f.call(this,"blur",Ce(this,c,"f")),null===(w=this.addEventListener)||void 0===w||w.call(this,"invalid",Ce(this,h,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){const e=this.validators.map(e=>e.attribute).flat(),t=super.observedAttributes||[];return[...new Set([...t,...e])]}static getValidator(e){return this.validators.find(t=>t.attribute===e)||null}static getValidators(e){return this.validators.filter(t=>{var r;if(t.attribute===e||(null===(r=t.attribute)||void 0===r?void 0:r.includes(e)))return!0})}get form(){return this.internals.form}get showError(){return Ce(this,t,"m",g).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(e,t,r){var o;null===(o=super.attributeChangedCallback)||void 0===o||o.call(this,e,t,r);const i=this.constructor.getValidators(e);(null==i?void 0:i.length)&&this.validationTarget&&this.setValue(Ce(this,l,"f"))}setValue(e){var r;Oe(this,o,!1,"f"),null===(r=this.validationMessageCallback)||void 0===r||r.call(this,""),Oe(this,l,e,"f");const i=this.shouldFormValueUpdate()?e:null;this.internals.setFormValue(i),Ce(this,t,"m",m).call(this,i),this.valueChangedCallback&&this.valueChangedCallback(i),Ce(this,t,"m",g).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(e=>e(Ce(this,b,"f")))}formResetCallback(){var e,r;Oe(this,i,!1,"f"),Oe(this,o,!1,"f"),Ce(this,t,"m",g).call(this),null===(e=this.resetFormControl)||void 0===e||e.call(this),null===(r=this.validationMessageCallback)||void 0===r||r.call(this,Ce(this,t,"m",g).call(this)?this.validationMessage:"")}}}
|
|
54
|
+
/**
|
|
55
|
+
* @license
|
|
56
|
+
* Copyright 2018 Google LLC
|
|
57
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
|
+
*/const Ae=e=>e??W,De=a`*,:after,:before{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--w-s-color-border)}html{font-size:62.5%}body{background-color:var(--w-s-color-background);min-height:100%;margin:0;overflow-y:scroll}:host,body{-webkit-text-size-adjust:100%;tab-size:4;-webkit-tap-highlight-color:transparent;font-family:var(--w-font-family);font-size:var(--w-font-size-m);line-height:var(--w-line-height-m);color:var(--w-s-color-text)}hr{color:inherit;border-top-width:1px;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:700}a{cursor:pointer;color:var(--w-s-color-text-link);text-decoration:none}a:active,a:focus,a:hover{text-decoration:underline}a:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:1px}b,strong{font-weight:700}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{margin:0;padding:0;list-style:none}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:var(--w-s-color-text-placeholder)}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}h1{font-size:var(--w-font-size-xxl);line-height:var(--w-line-height-xxl)}h2{font-size:var(--w-font-size-xl);line-height:var(--w-line-height-xl)}h3{font-size:var(--w-font-size-l);line-height:var(--w-line-height-l)}h4{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}h5{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}dd,dt{margin:0 16px}blockquote,dl,h1,h2,h3,h4,h5,ol,p,ul{margin:0 0 8px}[hidden]{display:none!important}[tabindex='-1']:focus:not(:focus-visible){outline:0}legend{float:left;width:100%;margin:0;padding:0;display:table}legend+*{clear:both}fieldset{border:0;min-width:0;margin:0;padding:.01em 0 0}body:not(:-moz-handler-blocked) fieldset{display:table-cell}svg{pointer-events:none}`;a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.h4,.t4{font-weight:700;font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.t3{font-weight:700;font-size:var(--w-font-size-l);line-height:var(--w-line-height-l)}@media (min-width:480px){.sm\\:h3{font-weight:700;font-size:var(--w-font-size-l);line-height:var(--w-line-height-l)}}.text-center{text-align:center}.before\\:text-center:before{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.animate-inprogress{background-image:linear-gradient(135deg,rgba(0,0,0,.05) 25%,transparent 0,transparent 50%,rgba(0,0,0,.05) 0,rgba(0,0,0,.05) 75%,transparent 0,transparent)!important;background-size:30px 30px;animation:animate-inprogress 3s linear infinite}@keyframes animate-inprogress{0%{background-position:0 0}to{background-position:60px 0}}.\\[--w-modal-max-height\\:80\\%\\]{--w-modal-max-height:80%}.\\[--w-modal-width\\:640px\\]{--w-modal-width:640px}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.backdrop-blur{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.peer:checked~.peer-checked\\:before\\:bg-center:before{background-position:center}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.bg-transparent,.group\\/steph:first-child .group-first\\/steph\\:bg-transparent,.group\\/steph:last-child .group-last\\/steph\\:bg-transparent{background-color:transparent}.bg-\\[--w-black\\/25\\]{background-color:rgba(var(--w-rgb-black),.25)}.bg-\\[--w-black\\/70\\],.bg-\\[var\\(--w-black\\)\\/70\\]{background-color:rgba(var(--w-rgb-black),.7)}.bg-\\[--w-color-badge-info-background\\]{background-color:var(--w-color-badge-info-background)}.bg-\\[--w-color-badge-negative-background\\]{background-color:var(--w-color-badge-negative-background)}.bg-\\[--w-color-badge-neutral-background\\]{background-color:var(--w-color-badge-neutral-background)}.bg-\\[--w-color-badge-positive-background\\]{background-color:var(--w-color-badge-positive-background)}.bg-\\[--w-color-badge-sponsored-background\\]{background-color:var(--w-color-badge-sponsored-background)}.bg-\\[--w-color-badge-warning-background\\]{background-color:var(--w-color-badge-warning-background)}.bg-\\[--w-color-button-primary-background\\]{background-color:var(--w-color-button-primary-background)}.bg-\\[--w-color-buttongroup-utility-background-selected\\]{background-color:var(--w-color-buttongroup-utility-background-selected)}.bg-\\[--w-color-callout-background\\]{background-color:var(--w-color-callout-background)}.bg-\\[--w-color-pill-suggestion-background\\]{background-color:var(--w-color-pill-suggestion-background)}.bg-\\[--w-color-switch-track-background\\]{background-color:var(--w-color-switch-track-background)}.bg-\\[--w-s-color-surface-elevated-100\\]{background-color:var(--w-s-color-surface-elevated-100)}.bg-\\[--w-s-color-surface-elevated-300\\]{background-color:var(--w-s-color-surface-elevated-300)}.bg-\\[--w-s-icon-selected\\]{background-color:var(--w-s-icon-selected)}.group:hover .group-hover\\:bg-\\[--w-color-switch-track-background-hover\\]{background-color:var(--w-color-switch-track-background-hover)}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.hover\\:bg-\\[--w-color-button-primary-background-hover\\]:hover{background-color:var(--w-color-button-primary-background-hover)}.hover\\:bg-\\[--w-color-buttongroup-utility-background-hover\\]:hover{background-color:var(--w-color-buttongroup-utility-background-hover)}.hover\\:bg-\\[--w-color-pill-suggestion-background-hover\\]:hover{background-color:var(--w-color-pill-suggestion-background-hover)}.hover\\:bg-\\[--w-s-icon-subtle\\]:hover{background-color:var(--w-s-icon-subtle)}.hover\\:bg-\\[var\\(--w-black\\)\\/85\\]:hover{background-color:rgba(var(--w-rgb-black),.85)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.active\\:bg-\\[--w-color-button-primary-background-active\\]:active{background-color:var(--w-color-button-primary-background-active)}.active\\:bg-\\[--w-color-buttongroup-utility-background-selected\\]:active{background-color:var(--w-color-buttongroup-utility-background-selected)}.active\\:bg-\\[--w-color-pill-suggestion-background-active\\]:active{background-color:var(--w-color-pill-suggestion-background-active)}.active\\:bg-\\[var\\(--w-black\\)\\]:active{background-color:var(--w-black)}.peer:checked~.peer-checked\\:before\\:bg-\\[url\\(var\\(--w-icon-toggle-checked\\)\\)\\]:before{background-image:var(--w-icon-toggle-checked)}.appearance-none{-moz-appearance:none;appearance:none;-webkit-appearance:none}.will-change-height{will-change:height}.border,.border-1{border-width:1px}.border-b{border-bottom-width:1px}.before\\:border:before{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b-0{border-bottom-width:0}.border-b-4{border-bottom-width:4px}.border-l-4{border-left-width:4px}.border-r-0,.group:not(:last-of-type) .group-not-last-of-type\\:border-r-0{border-right-width:0}.peer:checked~.peer-checked\\:before\\:border-\\[6\\]:before{border-width:.6rem}.border-transparent{border-color:transparent}.border-\\[--w-color-buttongroup-utility-border\\]{border-color:var(--w-color-buttongroup-utility-border)}.border-\\[--w-color-callout-border\\]{border-color:var(--w-color-callout-border)}.border-\\[--w-s-color-background-inverted\\]{border-color:var(--w-s-color-background-inverted)}.border-\\[--w-s-color-surface-elevated-300\\]{border-color:var(--w-s-color-surface-elevated-300)}.active\\:border-\\[--w-color-buttongroup-utility-border-selected\\]:active{border-color:var(--w-color-buttongroup-utility-border-selected)}.divide-x>*+*{--w-divide-x-reverse:0;border-left-width:calc(1px * calc(1 - var(--w-divide-x-reverse)));border-right-width:calc(1px * var(--w-divide-x-reverse))}.divide-y>*+*{--w-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--w-divide-y-reverse)));border-bottom-width:calc(1px * var(--w-divide-y-reverse))}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.before\\:rounded-2:before{border-radius:2px}.before\\:rounded-full:before{border-radius:9999px}.rounded-b-0{border-bottom-left-radius:0;border-bottom-right-radius:0}.rounded-bl-0{border-bottom-left-radius:0}.rounded-br-0{border-bottom-right-radius:0}.rounded-l-0{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.rounded-r-0{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.rounded-tl-0{border-top-left-radius:0}.rounded-tl-4{border-top-left-radius:4px}.rounded-tr-0{border-top-right-radius:0}.group:first-of-type .group-first-of-type\\:rounded-bl-8{border-bottom-left-radius:8px}.group:first-of-type .group-first-of-type\\:rounded-tl-8{border-top-left-radius:8px}.first\\:rounded-lb-4:first-child{border-bottom-left-radius:4px}.first\\:rounded-lt-4:first-child{border-top-left-radius:4px}.first\\:rounded-rt-4:first-child{border-top-right-radius:4px}.group:last-of-type .group-last-of-type\\:rounded-br-8{border-bottom-right-radius:8px}.group:last-of-type .group-last-of-type\\:rounded-tr-8{border-top-right-radius:8px}.last\\:rounded-lb-4:last-child{border-bottom-left-radius:4px}.last\\:rounded-rb-4:last-child{border-bottom-right-radius:4px}.last\\:rounded-rt-4:last-child{border-top-right-radius:4px}.caret-current{caret-color:currentColor}.opacity-25{opacity:25%}.block{display:block}.before\\:block:before{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex,.open\\:flex[open]{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.inline-grid{display:inline-grid}.group\\/stepv:last-child .group-last\\/stepv\\:hidden,.hidden{display:none}.before\\:hidden:before{display:none}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:underline:focus{text-decoration-line:underline}.focus-visible\\:underline:focus-visible{text-decoration-line:underline}.active\\:underline:active{text-decoration-line:underline}.hover\\:no-underline:hover{text-decoration:none}.focus\\:no-underline:focus{text-decoration:none}.active\\:no-underline:active{text-decoration:none}.flex-1{flex:1 1 0%}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.shrink-0\\!{flex-shrink:0!important}.grow,.grow-1{flex-grow:1}.basis-auto{flex-basis:auto}.flex-col{flex-direction:column}.focus-within\\:focusable:focus-within{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus,.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:0}.peer:focus-visible~.peer-focus\\:focusable,.peer:focus~.peer-focus\\:focusable{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.peer:not(:focus-visible)~.peer-focus\\:focusable{outline:0}.focusable-inset{--w-outline-offset:-3px}.gap-12{gap:1.2rem}.gap-8{gap:.8rem}.gap-x-16{column-gap:1.6rem}.gap-y-16{row-gap:1.6rem}.row-span-2{grid-row:span 2/span 2}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.row-start-1{grid-row-start:1}.row-start-2{grid-row-start:2}.col-start-2{grid-column-start:2}.auto-rows-auto{grid-auto-rows:auto}.grid-flow-col{grid-auto-flow:column}.grid-rows-\\[20px_auto\\]{grid-template-rows:20px auto}.grid-rows-\\[auto_20px\\]{grid-template-rows:auto 20px}.grid-cols-\\[1fr_20px_1fr\\]{grid-template-columns:1fr 20px 1fr}.grid-cols-\\[1fr_20px\\]{grid-template-columns:1fr 20px}.grid-cols-\\[20px_1fr\\]{grid-template-columns:20px 1fr}.grid-cols-\\[auto_1fr_auto\\]{grid-template-columns:auto 1fr auto}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.list-none{list-style-type:none}.outline-\\[--w-s-color-border-negative\\]\\!{outline-color:var(--w-s-color-border-negative)!important}.outline-none{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.self-center{align-self:center}.inset-0{top:0;right:0;bottom:0;left:0}.-bottom-0{bottom:0}.bottom-0{bottom:0}.bottom-10{bottom:1rem}.bottom-16{bottom:1.6rem}.left-0{left:0}.left-4{left:.4rem}.right-0{right:0}.right-8{right:.8rem}.top-\\[1\\.92rem\\]{top:1.92rem}.top-0{top:0}.top-20{top:2rem}.top-4{top:.4rem}.top-8{top:.8rem}.before\\:bottom-0:before{bottom:0}.before\\:left-0:before{left:0}.before\\:right-0:before{right:0}.before\\:top-2:before{top:.2rem}.-bottom-\\[8px\\]{bottom:-8px}.-left-\\[8px\\]{left:-8px}.-right-\\[8px\\]{right:-8px}.-top-\\[8px\\]{top:-8px}.top-\\[19px\\]{top:19px}.top-\\[30\\%\\]{top:30%}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-center{justify-items:center}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.open\\:fixed[open]{position:fixed}.before\\:absolute:before{position:absolute}.peer:checked~.peer-checked\\:z-10,.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.hover\\:z-30:hover{z-index:30}.\\!s-bg-selected{background-color:var(--w-s-color-background-selected)!important}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-bg-info-subtle{background-color:var(--w-s-color-background-info-subtle)}.s-bg-inverted{background-color:var(--w-s-color-background-inverted)}.s-bg-negative{background-color:var(--w-s-color-background-negative)}.s-bg-negative-subtle{background-color:var(--w-s-color-background-negative-subtle)}.s-bg-positive-subtle{background-color:var(--w-s-color-background-positive-subtle)}.peer:checked~.peer-checked\\:s-bg-primary,.s-bg-primary{background-color:var(--w-s-color-background-primary)}.s-bg-selected{background-color:var(--w-s-color-background-selected)}.s-bg-subtle{background-color:var(--w-s-color-background-subtle)}.s-bg-warning-subtle{background-color:var(--w-s-color-background-warning-subtle)}.peer:checked:hover~.peer-checked\\:peer-hover\\:before\\:s-bg-negative-hover:before{background-color:var(--w-s-color-background-negative-hover)}.peer:checked:hover~.peer-checked\\:peer-hover\\:before\\:s-bg-primary-hover:before{background-color:var(--w-s-color-background-primary-hover)}.peer:checked~.peer-checked\\:before\\:s-bg-disabled:before{background-color:var(--w-s-color-background-disabled)}.peer:checked~.peer-checked\\:before\\:s-bg-negative:before{background-color:var(--w-s-color-background-negative)}.peer:checked~.peer-checked\\:before\\:s-bg-primary:before{background-color:var(--w-s-color-background-primary)}.peer:indeterminate~.peer-indeterminate\\:before\\:s-bg-disabled:before{background-color:var(--w-s-color-background-disabled)}.peer:indeterminate~.peer-indeterminate\\:before\\:s-bg-negative:before{background-color:var(--w-s-color-background-negative)}.peer:indeterminate~.peer-indeterminate\\:before\\:s-bg-primary:before{background-color:var(--w-s-color-background-primary)}.peer:indeterminate~.peer-indeterminate\\:hover\\:before\\:s-bg-negative-hover:hover:before{background-color:var(--w-s-color-background-negative-hover)}.peer:indeterminate~.peer-indeterminate\\:hover\\:before\\:s-bg-primary-hover:hover:before{background-color:var(--w-s-color-background-primary-hover)}.\\!hover\\:s-bg-selected-hover:hover{background-color:var(--w-s-color-background-selected-hover)!important}.group:hover .group-hover\\:s-bg-primary-hover{background-color:var(--w-s-color-background-primary-hover)}.hover\\:before\\:s-bg-hover:hover:before{background-color:var(--w-s-color-background-hover)}.hover\\:before\\:s-bg-negative-subtle-hover:hover:before{background-color:var(--w-s-color-background-negative-subtle-hover)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-negative-hover:hover{background-color:var(--w-s-color-background-negative-hover)}.hover\\:s-bg-negative-subtle-hover:hover{background-color:var(--w-s-color-background-negative-subtle-hover)}.hover\\:s-bg-primary-hover:hover{background-color:var(--w-s-color-background-primary-hover)}.hover\\:s-bg-selected-hover:hover{background-color:var(--w-s-color-background-selected-hover)}.peer:hover:not(:checked)~.peer-hover\\:peer-not-checked\\:s-bg-hover{background-color:var(--w-s-color-background-hover)}.peer:hover~.peer-hover\\:before\\:s-bg-hover:before{background-color:var(--w-s-color-background-hover)}.peer:hover~.peer-hover\\:before\\:s-bg-negative-subtle:before{background-color:var(--w-s-color-background-negative-subtle)}.focus\\:s-bg-primary-hover:focus{background-color:var(--w-s-color-background-primary-hover)}.\\!active\\:s-bg-selected-active:active{background-color:var(--w-s-color-background-selected-active)!important}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-negative-active:active{background-color:var(--w-s-color-background-negative-active)}.active\\:s-bg-negative-subtle-active:active{background-color:var(--w-s-color-background-negative-subtle-active)}.active\\:s-bg-primary-active:active{background-color:var(--w-s-color-background-primary-active)}.active\\:s-bg-selected-active:active{background-color:var(--w-s-color-background-selected-active)}.before\\:s-bg-disabled-subtle:before{background-color:var(--w-s-color-background-disabled-subtle)}.before\\:s-bg:before{background-color:var(--w-s-color-background)}.s-text{color:var(--w-s-color-text)}.s-text-disabled{color:var(--w-s-color-text-disabled)}.peer:checked~.peer-checked\\:s-text-inverted,.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-inverted-static{color:var(--w-s-color-text-inverted-static)}.s-text-link{color:var(--w-s-color-text-link)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-text-subtle{color:var(--w-s-color-text-subtle)}.hover\\:s-text-link:hover{color:var(--w-s-color-text-link)}.active\\:s-text:active{color:var(--w-s-color-text)}.placeholder\\:s-text-placeholder::placeholder{color:var(--w-s-color-text-placeholder)}.s-icon{color:var(--w-s-color-icon)}.s-icon-info{color:var(--w-s-color-icon-info)}.s-icon-inverted{color:var(--w-s-color-icon-inverted)}.s-icon-negative{color:var(--w-s-color-icon-negative)}.s-icon-positive{color:var(--w-s-color-icon-positive)}.s-icon-warning{color:var(--w-s-color-icon-warning)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.before\\:s-icon-inverted:before{color:var(--w-s-color-icon-inverted)}.s-border{border-color:var(--w-s-color-border)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-info-subtle{border-color:var(--w-s-color-border-info-subtle)}.s-border-l-info{border-left-color:var(--w-s-color-border-info)}.s-border-l-negative{border-left-color:var(--w-s-color-border-negative)}.s-border-l-positive{border-left-color:var(--w-s-color-border-positive)}.s-border-l-warning{border-left-color:var(--w-s-color-border-warning)}.s-border-negative{border-color:var(--w-s-color-border-negative)}.s-border-negative-subtle{border-color:var(--w-s-color-border-negative-subtle)}.s-border-positive-subtle{border-color:var(--w-s-color-border-positive-subtle)}.peer:checked~.peer-checked\\:s-border-primary,.s-border-primary{border-color:var(--w-s-color-border-primary)}.s-border-selected{border-color:var(--w-s-color-border-selected)}.s-border-warning-subtle{border-color:var(--w-s-color-border-warning-subtle)}.peer:checked:hover~.peer-checked\\:peer-hover\\:before\\:s-border-negative-hover:before{border-color:var(--w-s-color-border-negative-hover)}.peer:checked:hover~.peer-checked\\:peer-hover\\:before\\:s-border-primary-hover:before{border-color:var(--w-s-color-border-primary-hover)}.peer:checked:hover~.peer-checked\\:peer-hover\\:before\\:s-border-selected-hover:before{border-color:var(--w-s-color-border-selected-hover)}.peer:checked~.peer-checked\\:before\\:s-border-disabled:before{border-color:var(--w-s-color-border-disabled)}.peer:checked~.peer-checked\\:before\\:s-border-negative:before{border-color:var(--w-s-color-border-negative)}.peer:checked~.peer-checked\\:before\\:s-border-primary:before{border-color:var(--w-s-color-border-primary)}.peer:checked~.peer-checked\\:before\\:s-border-selected:before{border-color:var(--w-s-color-border-selected)}.peer:indeterminate~.peer-indeterminate\\:before\\:s-border-disabled:before{border-color:var(--w-s-color-border-disabled)}.peer:indeterminate~.peer-indeterminate\\:before\\:s-border-negative:before{border-color:var(--w-s-color-border-negative)}.peer:indeterminate~.peer-indeterminate\\:before\\:s-border-primary:before{border-color:var(--w-s-color-border-primary)}.peer:indeterminate~.peer-indeterminate\\:hover\\:before\\:s-border-negative-hover:hover:before{border-color:var(--w-s-color-border-negative-hover)}.peer:indeterminate~.peer-indeterminate\\:hover\\:before\\:s-border-primary-hover:hover:before{border-color:var(--w-s-color-border-primary-hover)}.group:hover .group-hover\\:s-border-selected-hover{border-color:var(--w-s-color-border-selected-hover)}.hover\\:before\\:s-border-negative-hover:hover:before{border-color:var(--w-s-color-border-negative-hover)}.hover\\:before\\:s-border-primary:hover:before{border-color:var(--w-s-color-border-primary)}.hover\\:s-border-disabled:hover{border-color:var(--w-s-color-border-disabled)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.hover\\:s-border-negative-hover:hover{border-color:var(--w-s-color-border-negative-hover)}.hover\\:s-border-primary-hover:hover{border-color:var(--w-s-color-border-primary-hover)}.hover\\:s-border-primary:hover{border-color:var(--w-s-color-border-primary)}.hover\\:s-border-selected-hover:hover{border-color:var(--w-s-color-border-selected-hover)}.peer:hover~.peer-hover\\:before\\:s-border-negative-hover:before{border-color:var(--w-s-color-border-negative-hover)}.peer:hover~.peer-hover\\:before\\:s-border-primary:before{border-color:var(--w-s-color-border-primary)}.focus\\:s-border-primary-hover:focus{border-color:var(--w-s-color-border-primary-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.active\\:s-border-disabled:active{border-color:var(--w-s-color-border-disabled)}.active\\:s-border-primary-active:active{border-color:var(--w-s-color-border-primary-active)}.active\\:s-border-selected-active:active{border-color:var(--w-s-color-border-selected-active)}.active\\:s-border-selected:active{border-color:var(--w-s-color-border-selected)}.group:active .group-active\\:s-border-active{border-color:var(--w-s-color-border-active)}.group:active .group-active\\:s-border-selected-active{border-color:var(--w-s-color-border-selected-active)}.before\\:s-border-disabled:before{border-color:var(--w-s-color-border-disabled)}.before\\:s-border-negative:before{border-color:var(--w-s-color-border-negative)}.s-surface-sunken{background-color:var(--w-s-color-surface-sunken)}.s-surface-elevated-200{background-color:var(--w-s-color-surface-elevated-200);box-shadow:var(--w-s-shadow-surface-elevated-200)}.hover\\:s-surface-elevated-200-hover:hover{background-color:var(--w-s-color-surface-elevated-200-hover);box-shadow:var(--w-s-shadow-surface-elevated-200-hover)}.active\\:s-surface-elevated-200-active:active{background-color:var(--w-s-color-surface-elevated-200-active);box-shadow:var(--w-s-shadow-surface-elevated-200-active)}.drop-shadow-m{filter:drop-shadow(rgba(64, 64, 64, .24) 0 3px 8px) drop-shadow(rgba(64, 64, 64, .16) 0 3px 6px)}.shadow-m{box-shadow:var(--w-shadow-m)}.shadow-s{box-shadow:var(--w-shadow-s)}.shadow-\\[--w-shadow-slider\\]{box-shadow:var(--w-shadow-slider)}.hover\\:shadow-\\[--w-shadow-slider-handle-hover\\]:hover{box-shadow:var(--w-shadow-slider-handle-hover)}.focus\\:shadow-\\[--w-shadow-slider-handle-hover\\]:focus{box-shadow:var(--w-shadow-slider-handle-hover)}.active\\:shadow-\\[--w-shadow-slider-handle-active\\]:active{box-shadow:var(--w-shadow-slider-handle-active)}.h-0{height:0}.h-16{height:1.6rem}.h-2{height:.2rem}.h-20{height:2rem}.h-24{height:2.4rem}.h-4{height:.4rem}.h-44{height:4.4rem}.h-6{height:.6rem}.h-8{height:.8rem}.h-full{height:100%}.h-unset{height:unset}.max-h-unset{max-height:unset}.max-w-full{max-width:100%}.max-w-max{max-width:max-content}.max-w-unset{max-width:unset}.min-h-32{min-height:3.2rem}.min-h-40{min-height:4rem}.min-w-16{min-width:1.6rem}.min-w-32{min-width:3.2rem}.w-16{width:1.6rem}.w-2{width:.2rem}.w-20{width:2rem}.w-24{width:2.4rem}.w-32{width:3.2rem}.w-40{width:4rem}.w-44{width:4.4rem}.w-8{width:.8rem}.w-full{width:100%}.w-max{width:max-content}.w-unset{width:unset}.before\\:h-20:before{height:2rem}.before\\:h-full:before{height:100%}.before\\:w-20:before{width:2rem}.before\\:w-32:before{width:3.2rem}.h-\\[--w-modal-height\\]{height:var(--w-modal-height)}.h-\\[14px\\]{height:14px}.h-\\[16px\\]{height:16px}.max-h-\\[--w-modal-max-height\\]{max-height:var(--w-modal-max-height)}.min-h-\\[--w-modal-min-height\\]{min-height:var(--w-modal-min-height)}.min-h-\\[32px\\]{min-height:32px}.min-h-\\[40px\\]{min-height:40px}.min-h-\\[42\\]{min-height:4.2rem}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[32px\\]{min-width:32px}.min-w-\\[40px\\]{min-width:40px}.min-w-\\[44px\\]{min-width:44px}.w-\\[--w-modal-width\\]{width:var(--w-modal-width)}.w-\\[14px\\]{width:14px}.w-\\[16px\\]{width:16px}.space-x-8>:not([hidden])~:not([hidden]){--w-space-x-reverse:0;margin-left:calc(.8rem * calc(1 - var(--w-space-x-reverse)));margin-right:calc(.8rem * var(--w-space-x-reverse))}.space-y-16>:not([hidden])~:not([hidden]){--w-space-y-reverse:0;margin-top:calc(1.6rem * calc(1 - var(--w-space-y-reverse)));margin-bottom:calc(1.6rem * var(--w-space-y-reverse))}.m-0{margin:0}.m-auto{margin:auto}.-mx-16{margin-left:-1.6rem;margin-right:-1.6rem}.mx-0{margin-left:0;margin-right:0}.mx-8{margin-left:.8rem;margin-right:.8rem}.mx-auto{margin-left:auto;margin-right:auto}.-mb-1{margin-bottom:-.1rem}.-ml-8{margin-left:-.8rem}.-mr-1{margin-right:-.1rem}.-mr-8{margin-right:-.8rem}.-mt-2{margin-top:-.2rem}.-mt-4{margin-top:-.4rem}.last-child\\:mb-0>:last-child,.mb-0{margin-bottom:0}.mb-32{margin-bottom:3.2rem}.ml-8{margin-left:.8rem}.ml-auto{margin-left:auto}.mr-8{margin-right:.8rem}.mt-16{margin-top:1.6rem}.mt-4{margin-top:.4rem}.group:not(:first-child) .group-not-first\\:-ml-2{margin-left:-.2rem}.last\\:mb-0:last-child{margin-bottom:0}.last\\:mr-0:last-child{margin-right:0}.m-\\[8px\\]{margin:8px}.p-0{padding:0}.p-16{padding:1.6rem}.p-4{padding:.4rem}.p-8{padding:.8rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.1rem;padding-right:.1rem}.px-12{padding-left:1.2rem;padding-right:1.2rem}.px-14{padding-left:1.4rem;padding-right:1.4rem}.px-16{padding-left:1.6rem;padding-right:1.6rem}.px-8{padding-left:.8rem;padding-right:.8rem}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.1rem;padding-bottom:.1rem}.py-10{padding-top:1rem;padding-bottom:1rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.py-2{padding-top:.2rem;padding-bottom:.2rem}.py-4{padding-top:.4rem;padding-bottom:.4rem}.py-6{padding-top:.6rem;padding-bottom:.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.pb-0{padding-bottom:0}.pb-32{padding-bottom:3.2rem}.pb-4{padding-bottom:.4rem}.pb-8{padding-bottom:.8rem}.pl-0{padding-left:0}.pl-1{padding-left:.1rem}.pl-12{padding-left:1.2rem}.pl-28{padding-left:2.8rem}.pl-4{padding-left:.4rem}.pl-8{padding-left:.8rem}.pr-12{padding-right:1.2rem}.pr-14{padding-right:1.4rem}.pr-2{padding-right:.2rem}.pr-32{padding-right:3.2rem}.pr-40{padding-right:4rem}.pt-0{padding-top:0}.pt-1{padding-top:.1rem}.pt-16{padding-top:1.6rem}.pt-24{padding-top:2.4rem}.pt-8{padding-top:.8rem}.group\\/step:last-child .group-last\\/step\\:last\\:pb-0:last-child{padding-bottom:0}.last\\:pb-1:last-child{padding-bottom:.1rem}.last\\:pr-1:last-child{padding-right:.1rem}.p-\\[8px\\]{padding:8px}.px-\\[15px\\]{padding-left:15px;padding-right:15px}.px-\\[8px\\]{padding-left:8px;padding-right:8px}.py-\\[11px\\]{padding-top:11px;padding-bottom:11px}.py-\\[5px\\]{padding-top:5px;padding-bottom:5px}.py-\\[7px\\]{padding-top:7px;padding-bottom:7px}.pl-\\[var\\(--w-prefix-width\\,_40px\\)\\]{padding-left:var(--w-prefix-width,40px)}.invisible{visibility:hidden}.backface-hidden{backface-visibility:hidden}.break-words{overflow-wrap:break-word}.before\\:content-\\[\\"–\\"\\]:before{content:"–"}.before\\:content-\\[\\"\\"\\]:before{content:""}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.before\\:font-bold:before{font-weight:700}.font-normal{font-weight:400}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.before\\:pointer-events-none:before{pointer-events:none}.pb-safe-\\[32\\]{padding-bottom:calc(32px + env(safe-area-inset-bottom,0px))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.touch-pan-y{touch-action:pan-y}.select-none{-webkit-user-select:none;user-select:none}.translate-x-20{--w-translate-x:2rem;transform:translate(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotate(var(--w-rotate-z)) skew(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.translate-z-0{--w-translate-z:0rem;transform:translate(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotate(var(--w-rotate-z)) skew(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.-rotate-180,.part-\\[w-icon-chevron-down-16-part\\]\\:-rotate-180::part(w-icon-chevron-down-16-part){--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:-180deg;transform:translate(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotate(var(--w-rotate-z)) skew(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-up-16-part\\]\\:rotate-180::part(w-icon-chevron-up-16-part),.rotate-180{--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:180deg;transform:translate(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotate(var(--w-rotate-z)) skew(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.rotate-90{--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:90deg;transform:translate(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotate(var(--w-rotate-z)) skew(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:transform::part(w-icon-chevron-down-16-part),.part-\\[w-icon-chevron-up-16-part\\]\\:transform::part(w-icon-chevron-up-16-part),.transform{transform:translate(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotate(var(--w-rotate-z)) skew(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:transform-gpu::part(w-icon-chevron-down-16-part),.part-\\[w-icon-chevron-up-16-part\\]\\:transform-gpu::part(w-icon-chevron-up-16-part),.transform-gpu{transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotate(var(--w-rotate-z)) skew(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:transition-transform::part(w-icon-chevron-down-16-part),.part-\\[w-icon-chevron-up-16-part\\]\\:transition-transform::part(w-icon-chevron-up-16-part),.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-300{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.before\\:transition-all:before{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out,.part-\\[w-icon-chevron-down-16-part\\]\\:ease-in-out::part(w-icon-chevron-down-16-part),.part-\\[w-icon-chevron-up-16-part\\]\\:ease-in-out::part(w-icon-chevron-up-16-part){transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-s{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-m{line-height:var(--w-line-height-m)}.before\\:leading-xs:before{line-height:var(--w-line-height-xs)}.leading-\\[24\\]{line-height:2.4rem}@media (max-width:479.9px){.lt-sm\\:rounded-b-0{border-bottom-left-radius:0;border-bottom-right-radius:0}}@media (min-width:480px){.sm\\:border-b-0{border-bottom-width:0}.sm\\:rounded-8{border-radius:8px}.sm\\:rounded-b-8{border-bottom-left-radius:8px;border-bottom-right-radius:8px}.sm\\:gap-16{gap:1.6rem}.sm\\:place-content-center{place-content:center}.sm\\:place-items-center{place-items:center}.sm\\:h-24{height:2.4rem}.sm\\:min-h-48{min-height:4.8rem}.sm\\:w-24{width:2.4rem}.sm\\:min-h-\\[32px\\]{min-height:32px}.sm\\:min-h-\\[44px\\]{min-height:44px}.sm\\:min-h-\\[45\\]{min-height:4.5rem}.sm\\:min-w-\\[32px\\]{min-width:32px}.sm\\:min-w-\\[44px\\]{min-width:44px}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:mx-16{margin-left:1.6rem;margin-right:1.6rem}.sm\\:-ml-12{margin-left:-1.2rem}.sm\\:-mr-12{margin-right:-1.2rem}.sm\\:-mt-8{margin-top:-.8rem}.sm\\:px-32{padding-left:3.2rem;padding-right:3.2rem}.sm\\:py-0{padding-top:0;padding-bottom:0}.sm\\:pb-32{padding-bottom:3.2rem}.sm\\:pt-24{padding-top:2.4rem}.sm\\:pt-32{padding-top:3.2rem}}@media (min-width:768px){.md\\:block{display:block}.md\\:hidden{display:none}}`;const Pe=a`.w-textfield{--_input-padding-top:12px;--_input-padding-left:8px;--_input-padding-right:8px;position:relative}.w-textfield--has-prefix{--_input-padding-left:40px}.w-textfield--has-suffix{--_input-padding-right:var(--w-prefix-width, 40px)}.w-textfield__input-wrapper{position:relative;overflow:hidden}.w-textfield__input-wrapper:focus-within .w-textfield__mask{display:none}input[type=number]{-moz-appearance:textfield}input[type=number]::-webkit-inner-spin-button{display:none}input::placeholder{color:var(--w-textfield-placeholder-color-text,var(--w-s-color-text-placeholder))}.w-textfield__input-wrapper:has(.w-textfield__mask):not(:focus-within) input{color:transparent}.w-textfield__mask{display:block;border:1px solid transparent;top:var(--_input-padding-top);left:var(--_input-padding-left);right:var(--_input-padding-right);position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;z-index:1}`,Me=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.border-1{border-width:1px}.rounded-4{border-radius:4px}.caret-current{caret-color:currentColor}.block{display:block}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:0}.outline-\\[--w-s-color-border-negative\\]\\!{outline-color:var(--w-s-color-border-negative)!important}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-text{color:var(--w-s-color-text)}.s-text-disabled{color:var(--w-s-color-text-disabled)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-text-subtle{color:var(--w-s-color-text-subtle)}.placeholder\\:s-text-placeholder::placeholder{color:var(--w-s-color-text-placeholder)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-negative{border-color:var(--w-s-color-border-negative)}.s-border-strong{border-color:var(--w-s-color-border-strong)}.hover\\:s-border-negative-hover:hover{border-color:var(--w-s-color-border-negative-hover)}.hover\\:s-border-strong-hover:hover{border-color:var(--w-s-color-border-strong-hover)}.active\\:s-border-selected:active{border-color:var(--w-s-color-border-selected)}.w-full{width:100%}.min-h-\\[42\\]{min-height:4.2rem}.mb-0{margin-bottom:0}.mt-4{margin-top:.4rem}.px-8{padding-left:.8rem;padding-right:.8rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.pb-4{padding-bottom:.4rem}.pl-0{padding-left:0}.pl-8{padding-left:.8rem}.pr-40{padding-right:4rem}.pl-\\[var\\(--w-prefix-width\\,_40px\\)\\]{padding-left:var(--w-prefix-width,40px)}.cursor-pointer{cursor:pointer}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.font-normal{font-weight:400}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-s{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-m{line-height:var(--w-line-height-m)}@media (min-width:480px){.sm\\:min-h-\\[45\\]{min-height:4.5rem}}`;var Te=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const je="block text-m leading-m mb-0 px-8 py-12 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] caret-current",Re="border-1 s-text s-bg s-border-strong hover:s-border-strong-hover active:s-border-selected",Ne="border-1 s-text-disabled s-bg-disabled-subtle s-border-disabled pointer-events-none",Ie="border-1 s-text-negative s-bg s-border-negative hover:s-border-negative-hover outline-[--w-s-color-border-negative]!",Ve="pl-0 bg-transparent pointer-events-none",Fe="pr-40",Le="pl-[var(--w-prefix-width,_40px)]",qe="antialiased block relative text-s font-bold pb-4 cursor-pointer s-text",Be="text-xs mt-4 block",We="s-text-subtle",He="s-text-negative";class Ye extends(ze(ne)){constructor(){super(...arguments),this.disabled=!1,this.invalid=!1,this.readOnly=!1,this.readonly=!1,this.required=!1,this._hasPrefix=!1,this._hasSuffix=!1,this.#e=null}static{this.shadowRootOptions={...ne.shadowRootOptions,delegatesFocus:!0}}#t(e){"Enter"===e.key&&this.internals.form&&this.internals.form.requestSubmit()}updated(e){e.has("value")&&(this.setValue(this.value),this.formatter&&(this.mask.innerText=this.formatter(this.value)))}#e;firstUpdated(e){this.#e=this.value}resetFormControl(){this.value=this.#e}static{this.styles=[De,Me,Pe]}get _inputstyles(){return Ee([je,this._hasSuffix&&Fe,this._hasPrefix&&Le,!this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&Re,this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&Ie,!this.invalid&&this.disabled&&!(this.readonly||this.readOnly)&&Ne,!this.invalid&&!this.disabled&&(this.readonly||this.readOnly)&&Ve])}get _helptextstyles(){return Ee([Be,this.invalid?He:We])}get _label(){if(this.label)return q`<label for="${this._id}" class="${qe}">${this.label}</label>`}get _helpId(){if(this.helpText)return`${this._id}__hint`}get _id(){return"textfield"}get _error(){if(this.invalid&&this._helpId)return this._helpId}handler(e){const{name:t,value:r}=e.currentTarget;this.value=r;const o=new CustomEvent(e.type,{detail:{name:t,value:r,target:e.target}});this.dispatchEvent(o)}prefixSlotChange(){this.renderRoot.querySelector("slot[name=prefix]").assignedElements().length&&(this._hasPrefix=!0)}suffixSlotChange(){this.renderRoot.querySelector("slot[name=suffix]").assignedElements().length&&(this._hasSuffix=!0)}render(){return q`${this._label}<div class="${ye({"w-textfield":!0,"w-textfield--has-prefix":this._hasPrefix,"w-textfield--has-suffix":this._hasSuffix})}"><div class="w-textfield__input-wrapper">${this.formatter?q`<div class="w-textfield__mask"></div>`:W} <input class="${this._inputstyles}" type="${this.type||"text"}" min="${Ae(this.min)}" max="${Ae(this.max)}" size="${Ae(this.size)}" minlength="${Ae(this.minLength||this.minlength)}" maxlength="${Ae(this.maxLength||this.maxlength)}" name="${Ae(this.name)}" pattern="${Ae(this.pattern)}" placeholder="${Ae(this.placeholder)}" .value="${this.value||""}" aria-describedby="${Ae(this._helpId||(this.ariaDescription?"aria-description":void 0))}" aria-errormessage="${Ae(this._error)}" aria-invalid="${Ae(this.invalid)}" id="${this._id}" ?disabled="${this.disabled}" ?readonly="${this.readonly||this.readOnly}" ?required="${this.required}" autocomplete="${Ae(this.autocomplete)}" step="${Ae(this.step)}" @blur="${this.handler}" @change="${this.handler}" @input="${this.handler}" @focus="${this.handler}" @keydown="${this.#t}"></div><slot @slotchange="${this.prefixSlotChange}" name="prefix"></slot><slot @slotchange="${this.suffixSlotChange}" name="suffix"></slot></div><span class="sr-only" id="aria-description">${this.ariaDescription}</span> ${this.helpText&&q`<div class="${this._helptextstyles}" id="${this._helpId}">${this.helpText}</div>`}`}}Te([ce({type:Boolean,reflect:!0})],Ye.prototype,"disabled",void 0),Te([ce({type:Boolean,reflect:!0})],Ye.prototype,"invalid",void 0),Te([ce({type:String,reflect:!0})],Ye.prototype,"label",void 0),Te([ce({type:String,reflect:!0,attribute:"help-text"})],Ye.prototype,"helpText",void 0),Te([ce({type:String,reflect:!0})],Ye.prototype,"size",void 0),Te([ce({type:Number,reflect:!0})],Ye.prototype,"max",void 0),Te([ce({type:Number,reflect:!0})],Ye.prototype,"min",void 0),Te([ce({type:Number,reflect:!0,attribute:"min-length"})],Ye.prototype,"minLength",void 0),Te([ce({type:Number,reflect:!0})],Ye.prototype,"minlength",void 0),Te([ce({type:Number,reflect:!0,attribute:"max-length"})],Ye.prototype,"maxLength",void 0),Te([ce({type:Number,reflect:!0})],Ye.prototype,"maxlength",void 0),Te([ce({type:String,reflect:!0})],Ye.prototype,"pattern",void 0),Te([ce({type:String,reflect:!0})],Ye.prototype,"placeholder",void 0),Te([ce({type:Boolean,reflect:!0,attribute:"read-only"})],Ye.prototype,"readOnly",void 0),Te([ce({type:Boolean,reflect:!0})],Ye.prototype,"readonly",void 0),Te([ce({type:Boolean,reflect:!0})],Ye.prototype,"required",void 0),Te([ce({type:String,reflect:!0})],Ye.prototype,"type",void 0),Te([ce({type:String,reflect:!0})],Ye.prototype,"value",void 0),Te([ce({type:String,reflect:!0})],Ye.prototype,"name",void 0),Te([ce({type:Number,reflect:!0})],Ye.prototype,"step",void 0),Te([ce({type:String,reflect:!0})],Ye.prototype,"autocomplete",void 0),Te([ce({attribute:!1})],Ye.prototype,"formatter",void 0),Te([pe(".w-textfield__mask")],Ye.prototype,"mask",void 0),Te([ce({type:Boolean})],Ye.prototype,"_hasPrefix",void 0),Te([ce({type:Boolean})],Ye.prototype,"_hasSuffix",void 0),customElements.get("w-textfield")||customElements.define("w-textfield",Ye);const Xe=e=>"string"==typeof e,Ue=new Map;function Je(e){return[...Array.isArray(e)?e:[e],"en"]}function Ke(e,t,r){const o=Je(e);let i;if(r||(r="default"),"string"==typeof r)switch(i={day:"numeric",month:"short",year:"numeric"},r){case"full":i.weekday="long";case"long":i.month="long";break;case"short":i.month="numeric"}else i=r;return Ge(()=>et("date",o,r),()=>new Intl.DateTimeFormat(o,i)).format(Xe(t)?new Date(t):t)}function Ze(e,t,r){const o=Je(e);return Ge(()=>et("number",o,r),()=>new Intl.NumberFormat(o,r)).format(t)}function Qe(e,t,r,{offset:o=0,...i}){const a=Je(e),n=t?Ge(()=>et("plural-ordinal",a),()=>new Intl.PluralRules(a,{type:"ordinal"})):Ge(()=>et("plural-cardinal",a),()=>new Intl.PluralRules(a,{type:"cardinal"}));return i[r]??i[n.select(r-o)]??i.other}function Ge(e,t){const r=e();let o=Ue.get(r);return o||(o=t(),Ue.set(r,o)),o}function et(e,t,r){return`${e}-${t.join("-")}-${JSON.stringify(r)}`}const tt=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,rt=e=>e.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(e,t,r)=>{if(t){const e=parseInt(t,16);return String.fromCharCode(e)}{const e=parseInt(r,16);return String.fromCharCode(e)}}),ot="%__lingui_octothorpe__%",it=(e,t,r={})=>{const o=t||e,i=e=>"object"==typeof e?e:r[e],a=(e,t)=>{const a=Object.keys(r).length?i("number"):void 0,n=Ze(o,e,a);return t.replace(new RegExp(ot,"g"),n)};return{plural:(e,t)=>{const{offset:r=0}=t,i=Qe(o,!1,e,t);return a(e-r,i)},selectordinal:(e,t)=>{const{offset:r=0}=t,i=Qe(o,!0,e,t);return a(e-r,i)},select:at,number:(e,t)=>Ze(o,e,i(t)||{style:t}),date:(e,t)=>Ke(o,e,i(t)||t),time:(e,t)=>function(e,t,r){let o;if(r||(r="default"),"string"==typeof r)switch(o={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":o.timeZoneName="short";break;case"short":delete o.second}else o=r;return Ke(e,t,o)}(o,e,i(t)||t)}},at=(e,t)=>t[e]??t.other;var nt=Object.defineProperty,st=(e,t,r)=>(((e,t,r)=>{t in e?nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,t+"",r),r);class lt{constructor(){st(this,"_events",{})}on(e,t){var r;return(r=this._events)[e]??(r[e]=[]),this._events[e].push(t),()=>this.removeListener(e,t)}removeListener(e,t){const r=this._getListeners(e);if(!r)return;const o=r.indexOf(t);~o&&r.splice(o,1)}emit(e,...t){const r=this._getListeners(e);r&&r.map(e=>e.apply(this,t))}_getListeners(e){const t=this._events[e];return!!Array.isArray(t)&&t}}var dt=Object.defineProperty,ct=(e,t,r)=>(((e,t,r)=>{t in e?dt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);class ht extends lt{constructor(e){super(),ct(this,"_locale",""),ct(this,"_locales"),ct(this,"_localeData",{}),ct(this,"_messages",{}),ct(this,"_missing"),ct(this,"_messageCompiler"),ct(this,"t",this._.bind(this)),null!=e.missing&&(this._missing=e.missing),null!=e.messages&&this.load(e.messages),null!=e.localeData&&this.loadLocaleData(e.localeData),("string"==typeof e.locale||e.locales)&&this.activate(e.locale??"en",e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,t){const r=this._localeData[e];r?Object.assign(r,t):this._localeData[e]=t}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,t){"string"==typeof e?this._loadLocaleData(e,t):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,t){const r=this._messages[e];r?Object.assign(r,t):this._messages[e]=t}load(e,t){"string"==typeof e&&"object"==typeof t?this._load(e,t):Object.entries(e).forEach(([e,t])=>this._load(e,t)),this.emit("change")}loadAndActivate({locale:e,locales:t,messages:r}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,t){this._locale=e,this._locales=t,this.emit("change")}_(e,t,r){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let o=r?.message;e||(e=""),Xe(e)||(t=e.values||t,o=e.message,e=e.id);const i=this.messages[e],a=void 0===i,n=this._missing;if(n&&a)return(e=>"function"==typeof e)(n)?n(this._locale,e):n;a&&this.emit("missing",{id:e,locale:this._locale});let s=i||o||e;return Xe(s)&&(this._messageCompiler?s=this._messageCompiler(s):console.warn(`Uncompiled message detected! Message:\n\n> ${s}\n\nThat means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.\nICU features such as interpolation and plurals will not work properly for that message. \n\nPlease compile your catalog first. \n`)),Xe(s)&&tt.test(s)?rt(s):Xe(s)?s:function(e,t,r){return(o={},i)=>{const a=it(t,r,i),n=(e,t=!1)=>Array.isArray(e)?e.reduce((e,r)=>{if("#"===r&&t)return e+ot;if(Xe(r))return e+r;const[i,s,l]=r;let d,c={};return"plural"===s||"selectordinal"===s||"select"===s?Object.entries(l).forEach(([e,t])=>{c[e]=n(t,"plural"===s||"selectordinal"===s)}):c=l,d=s?(0,a[s])(o[i],c):o[i],null==d?e:e+d},""):e,s=n(e);return Xe(s)&&tt.test(s)?rt(s):Xe(s)?s:s?String(s):""}}(s,this._locale,this._locales)(t,r?.formats)}date(e,t){return Ke(this._locales||this._locale,e,t)}number(e,t){return Ze(this._locales||this._locale,e,t)}}const ut=function(e={}){return new ht(e)}(),pt=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.rounded-4{border-radius:4px}.block{display:block}.flex{display:flex}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:0}.items-center{align-items:center}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.justify-center{justify-content:center}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-text{color:var(--w-s-color-text)}.w-40{width:4rem}.w-max{width:max-content}.pb-0{padding-bottom:0}.pl-12{padding-left:1.2rem}.pr-12{padding-right:1.2rem}.cursor-default{cursor:default}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`,bt=["en","nb","fi","da","sv"],gt="en",mt=e=>bt.find(t=>e===t||e.toLowerCase().includes(t))||gt;function vt(){if("undefined"==typeof window){const e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return mt(e)}try{const e=_t(document);if(e)return mt(e);const t=function(){try{return window.frameElement?.getAttribute?.("lang")??""}catch{return""}}();if(t)return mt(t);const r=_t(kt());return r?mt(r):gt}catch(e){return console.warn("could not detect locale, falling back to source locale",e),gt}}const ft=(e,t,r,o,i)=>{ut.load("en",e),ut.load("nb",t),ut.load("fi",r),ut.load("da",o),ut.load("sv",i);const a=vt();ut.activate(a),yt(),function(){if(xt)return;if("undefined"==typeof window)return;if(!document?.documentElement)return;xt=!0;const e=()=>{const e=vt();ut.locale!==e&&(ut.activate(e),yt())},t=new MutationObserver(t=>{for(const r of t)if("attributes"===r.type&&"lang"===r.attributeName){e();break}});t.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});const r=kt();r&&r.documentElement&&r!==document&&t.observe(r.documentElement,{attributes:!0,attributeFilter:["lang"]});const o=function(){try{return window.frameElement??null}catch{return null}}();o&&t.observe(o,{attributes:!0,attributeFilter:["lang"]})}()},wt="warp-i18n-change";function yt(){"undefined"!=typeof window&&window.dispatchEvent(new Event(wt))}let xt=!1;function kt(){try{return window.parent?.document??null}catch{return null}}function _t(e){try{return e?.documentElement?.lang??""}catch{return""}}var $t=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const St="absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ",Et={wrapper:St+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},Ct={wrapper:St+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"};class Ot extends(ze(ne)){constructor(){super(...arguments),this.ariaLabel=null,this.clear=!1,this.search=!1,this.label="",this.icon=null}static{this.styles=[De,pt]}get _classBase(){return"suffix"===this.slot?Et:Ct}get _classes(){return Ee([this._classBase.wrapper,this.label?this._classBase.wrapperWithLabel:this._classBase.wrapperWithIcon])}resetContainingTextField(e){const t=this.closest("w-textfield");t&&t.resetFormControl(),e.stopPropagation()}submitContainingForm(e){const t=this.internals.form;t&&t.submit(),e.stopPropagation()}get _searchButton(){const e=this.ariaLabel||ut._({id:"affix.aria.search",message:"Search",comment:"Aria label for the search button in affix"});return q`<button aria-label="${e}" class="${this._classes}" type="submit" @click="${this.submitContainingForm.bind(this)}"><w-icon name="Search" size="small" locale="${vt()}" class="flex"></w-icon></button>`}get _clearButton(){const e=this.ariaLabel||ut._({id:"affix.aria.clearInput",message:"Clear input",comment:"Aria label for the clear input button in affix"});return q`<button aria-label="${e}" class="${this._classes}" type="reset" @click="${this.resetContainingTextField.bind(this)}"><w-icon name="Close" size="small" locale="${vt()}" class="flex"></w-icon></button>`}get _icon(){return this.icon?q`<div class="${this._classes}"><w-icon name="${this.icon}" size="small" locale="${vt()}" class="flex"></w-icon></div>`:""}get _text(){return q`<div class="${this._classes}"><span class="${this._classBase.label}">${this.label}</span></div>`}get _markup(){return this.label?this._text:this.icon?this._icon:this.search?this._searchButton:this.clear?this._clearButton:void 0}render(){return q`${this._markup}`}}$t([ce({attribute:"aria-label",reflect:!0,useDefault:!0})],Ot.prototype,"ariaLabel",void 0),$t([ce({type:Boolean})],Ot.prototype,"clear",void 0),$t([ce({type:Boolean})],Ot.prototype,"search",void 0),$t([ce({reflect:!0,useDefault:!0})],Ot.prototype,"label",void 0),$t([ce({reflect:!0,useDefault:!0})],Ot.prototype,"icon",void 0),customElements.get("w-affix")||customElements.define("w-affix",Ot);const zt=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.will-change-height{will-change:height}.border{border-width:1px}.border-l-4{border-left-width:4px}.rounded-4{border-radius:4px}.block{display:block}.inline{display:inline}.flex{display:flex}.static{position:static}.s-bg-info-subtle{background-color:var(--w-s-color-background-info-subtle)}.s-bg-negative-subtle{background-color:var(--w-s-color-background-negative-subtle)}.s-bg-positive-subtle{background-color:var(--w-s-color-background-positive-subtle)}.s-bg-warning-subtle{background-color:var(--w-s-color-background-warning-subtle)}.s-text{color:var(--w-s-color-text)}.s-icon-info{color:var(--w-s-color-icon-info)}.s-icon-negative{color:var(--w-s-color-icon-negative)}.s-icon-positive{color:var(--w-s-color-icon-positive)}.s-icon-warning{color:var(--w-s-color-icon-warning)}.s-border-info-subtle{border-color:var(--w-s-color-border-info-subtle)}.s-border-l-info{border-left-color:var(--w-s-color-border-info)}.s-border-l-negative{border-left-color:var(--w-s-color-border-negative)}.s-border-l-positive{border-left-color:var(--w-s-color-border-positive)}.s-border-l-warning{border-left-color:var(--w-s-color-border-warning)}.s-border-negative-subtle{border-color:var(--w-s-color-border-negative-subtle)}.s-border-positive-subtle{border-color:var(--w-s-color-border-positive-subtle)}.s-border-warning-subtle{border-color:var(--w-s-color-border-warning-subtle)}.min-w-16{min-width:1.6rem}.w-16{width:1.6rem}.last-child\\:mb-0>:last-child{margin-bottom:0}.mr-8{margin-right:.8rem}.p-16{padding:1.6rem}.text-s{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}`;var At=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const Dt={wrapper:"flex p-16 border border-l-4 rounded-4 s-text",willChangeHeight:"will-change-height",textWrapper:"last-child:mb-0 text-s",title:"text-s",icon:"w-16 mr-8 min-w-16",negative:"s-border-negative-subtle s-border-l-negative s-bg-negative-subtle",negativeIcon:"s-icon-negative",positive:"s-border-positive-subtle s-border-l-positive s-bg-positive-subtle",positiveIcon:"s-icon-positive",warning:"s-border-warning-subtle s-border-l-warning s-bg-warning-subtle",warningIcon:"s-icon-warning",info:"s-border-info-subtle s-border-l-info s-bg-info-subtle",infoIcon:"s-icon-info"},Pt={negative:"negative",positive:"positive",warning:"warning",info:"info"};class Mt extends ne{constructor(){super(),this.variant="info",this.show=!1,this.role="alert",this._internals=this.attachInternals(),this._internals.role="alert"}connectedCallback(){if(super.connectedCallback(),this.variant&&!Pt[this.variant])throw new Error("Invalid 'variant' attribute. Set its value to one of the following:\nnegative, positive, warning, info.")}get _wrapperClasses(){const e=this.variant;return Ee([Dt.wrapper,Dt[e]])}get _iconClasses(){const e=this.variant;return Ee([Dt.icon,Dt[`${e}Icon`]])}static{this.styles=[De,zt,a`:host{display:block}::slotted(:first-child){margin-top:0}::slotted(:last-child){margin-bottom:0!important}`]}get _icon(){const e=vt(),t=this.variant||"info";return t===Pt.info?q`<w-icon name="Info" size="small" locale="${e}" class="flex"></w-icon>`:t===Pt.warning?q`<w-icon name="Warning" size="small" locale="${e}" class="flex"></w-icon>`:t===Pt.negative?q`<w-icon name="Error" size="small" locale="${e}" class="flex"></w-icon>`:t===Pt.positive?q`<w-icon name="Success" size="small" locale="${e}" class="flex"></w-icon>`:""}render(){return q`<w-expand-transition ?show="${this.show}"><div role="${this.role}" class="${this._wrapperClasses}"><div class="${this._iconClasses}">${this._icon}</div><div class="${Dt.textWrapper}"><slot></slot></div></div></w-expand-transition>`}}At([ce({reflect:!0,useDefault:!0})],Mt.prototype,"variant",void 0),At([ce({type:Boolean,reflect:!0,useDefault:!0})],Mt.prototype,"show",void 0),At([ce({reflect:!0,useDefault:!0})],Mt.prototype,"role",void 0),customElements.get("w-alert")||customElements.define("w-alert",Mt);const Tt=a`:host{display:inline-block;--_bg:var(--w-c-button-bg, var(--w-s-color-background));--_bg-hover:var(--w-c-button-bg-hover, var(--w-s-color-background-hover));--_bg-active:var(--w-c-button-bg-active, var(--w-s-color-background-active));--_color:var(--w-c-button-color, var(--w-s-color-text-link));--_color-hover:var(--w-c-button-color-hover, var(--_color));--_color-active:var(--w-c-button-color-active, var(--_color));--_border-width:var(--w-c-button-border-width, 2px);--_border-color:var(--w-c-button-border-color, var(--w-s-color-border));--_border-color-hover:var(--w-c-button-border-color-hover, var(--w-s-color-border-hover));--_border-color-active:var(--w-c-button-border-color-active, var(--w-s-color-border-active));--_radius:var(--w-c-button-radius, 8px);--_font-size:var(--w-c-button-font-size, var(--w-font-size-m));--_line-height:var(--w-c-button-line-height, var(--w-line-height-m));--_font-weight:var(--w-c-button-font-weight, 700);--_pad-x:var(--w-c-button-padding-x, 16px);--_pad-y:var(--w-c-button-padding-y, 13px);--_outline-width:var(--w-c-button-outline-width, 2px);--_outline-color:var(--w-c-button-outline-color, var(--w-s-color-border-focus));--_outline-offset:var(--w-c-button-outline-offset, var(--w-outline-offset, 1px));--_transition:var(
|
|
59
|
+
--w-c-button-transition,
|
|
60
|
+
color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
61
|
+
background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
62
|
+
border-color 150ms cubic-bezier(0.4, 0, 0.2, 1)
|
|
63
|
+
);--w-c-button-icon-color:var(--w-s-color-icon)}:host(:focus-visible){outline:0}`,jt=a`:host([variant=primary]){--w-c-button-bg:var(--w-s-color-background-primary);--w-c-button-bg-hover:var(--w-s-color-background-primary-hover);--w-c-button-bg-active:var(--w-s-color-background-primary-active);--w-c-button-color:var(--w-s-color-text-inverted);--w-c-button-border-width:0px}:host([variant=negative]){--w-c-button-bg:var(--w-s-color-background-negative);--w-c-button-bg-hover:var(--w-s-color-background-negative-hover);--w-c-button-bg-active:var(--w-s-color-background-negative-active);--w-c-button-color:var(--w-s-color-text-inverted);--w-c-button-border-width:0px}:host([variant=negativeQuiet]){--w-c-button-bg:transparent;--w-c-button-bg-hover:var(--w-s-color-background-negative-subtle-hover);--w-c-button-bg-active:var(--w-s-color-background-negative-subtle-active);--w-c-button-color:var(--w-s-color-text-negative);--w-c-button-border-width:0px}:host([variant=utility]){--w-c-button-bg:var(--w-s-color-background);--w-c-button-color:var(--w-s-color-text);--w-c-button-radius:4px;--w-c-button-border-width:1px}:host([variant=utilityQuiet]){--w-c-button-bg:transparent;--w-c-button-color:var(--w-s-color-text);--w-c-button-border-width:0px}:host([variant=quiet]){--w-c-button-bg:transparent;--w-c-button-border-width:0px}:host([variant=overlay]){--w-c-button-bg:var(--w-s-color-background);--w-c-button-bg-hover:var(--w-s-color-background-hover);--w-c-button-bg-active:var(--w-s-color-background-active);--w-c-button-color:var(--w-s-color-text);--w-c-button-radius:9999px;--w-c-button-border-width:0px}:host([variant=overlayInverted]){--w-c-button-bg:var(--w-s-color-background-inverted);--w-c-button-bg-hover:var(--w-s-color-background-inverted-hover);--w-c-button-bg-active:var(--w-s-color-background-inverted-active);--w-c-button-color:var(--w-s-color-text-inverted);--w-c-button-radius:9999px;--w-c-button-border-width:0px}:host([variant=overlayQuiet]){--w-c-button-bg:transparent;--w-c-button-bg-hover:var(--w-s-color-background-hover);--w-c-button-bg-active:var(--w-s-color-background-active);--w-c-button-color:var(--w-s-color-text);--w-c-button-radius:9999px;--w-c-button-border-width:0px}:host([variant=overlayInvertedQuiet]){--w-c-button-bg:transparent;--w-c-button-bg-hover:var(--w-s-color-background-inverted-hover);--w-c-button-bg-active:var(--w-s-color-background-inverted-active);--w-c-button-color:var(--w-s-color-text-inverted);--w-c-button-radius:9999px;--w-c-button-border-width:0px}:host([variant=link]){--w-c-button-bg:transparent;--w-c-button-border-width:0px;--w-c-button-padding-x:0px;--w-c-button-padding-y:0px;--w-c-button-font-weight:400;--w-c-button-bg-hover:transparent;--w-c-button-bg-active:transparent;--w-c-button-color:var(--w-s-color-text-link);--w-c-button-color-hover:var(--w-s-color-text-link-hover, var(--w-c-button-color));--w-c-button-color-active:var(--w-s-color-text-link-active, var(--w-c-button-color))}`,Rt=a`:host([small]){--w-c-button-padding-x:12px;--w-c-button-padding-y:8px;--w-c-button-font-size:var(--w-font-size-xs);--w-c-button-line-height:var(--w-line-height-xs)}`,Nt=a`:host([disabled]){pointer-events:none;--w-c-button-bg:var(--w-s-color-background-disabled);--w-c-button-bg-hover:var(--w-s-color-background-disabled);--w-c-button-bg-active:var(--w-s-color-background-disabled);--w-c-button-color:var(--w-s-color-text-inverted);--w-c-button-border-width:0px}`,It=a`${Tt}button[part=base]{display:inline-flex;justify-content:center;align-items:center;text-align:center;cursor:pointer;background-color:var(--_bg);color:var(--_color);border:var(--_border-width) solid var(--_border-color);border-radius:var(--_radius);padding:calc(var(--_pad-y) - var(--_border-width)) calc(var(--_pad-x) - var(--_border-width));font-size:var(--_font-size);line-height:var(--_line-height);font-weight:var(--_font-weight);transition:var(--_transition)}button[part=base] ::slotted(*){line-height:inherit}:host>w-link[part=base]{display:inline-block;padding:0;border:0;background:0 0}:host(:not([disabled]):not([loading])) button[part=base]:hover{background-color:var(--_bg-hover);border-color:var(--_border-color-hover);color:var(--_color-hover)}:host(:not([disabled]):not([loading])) button[part=base]:active{background-color:var(--_bg-active);border-color:var(--_border-color-active);color:var(--_color-active)}:host(:focus-visible) button[part=base]{outline:var(--_outline-width) solid var(--_outline-color);outline-offset:var(--_outline-offset)}${jt}:host([variant=negative][quiet]){--w-c-button-bg:transparent;--w-c-button-bg-hover:var(--w-s-color-background-negative-subtle-hover);--w-c-button-bg-active:var(--w-s-color-background-negative-subtle-active);--w-c-button-color:var(--w-s-color-text-negative);--w-c-button-border-width:0px}:host([variant=utility][quiet]){--w-c-button-bg:transparent;--w-c-button-color:var(--w-s-color-text);--w-c-button-border-width:0px}:host([variant=pill]){--w-c-button-bg:transparent;--w-c-button-radius:50%;--w-c-button-border-width:0px;--w-c-button-padding-x:14px;--w-c-button-padding-y:14px;--w-c-button-color:var(--w-c-button-icon-color, var(--w-s-color-icon))}:host([variant=link]) button[part=base]{display:inline;padding:0}:host([variant=link]:not([disabled]):not([loading])) button[part=base]:hover{text-decoration:underline;background-color:transparent;border-color:transparent;color:var(--w-c-button-color-hover)}${Rt}:host([small][variant=pill]){--w-c-button-padding-x:8px;--w-c-button-padding-y:8px}:host([full-width]) button[part=base],:host([full-width])>w-link[part=base]{width:100%}:host([icon-only]) button[part=base]{aspect-ratio:1/1;padding-left:calc(var(--w-c-button-padding-y) - var(--w-c-button-border-width,0px));padding-right:calc(var(--w-c-button-padding-y) - var(--w-c-button-border-width,0px))}${Nt}:host([disabled][quiet]),:host([disabled][variant]){--w-c-button-bg:var(--w-s-color-background-disabled);--w-c-button-bg-hover:var(--w-s-color-background-disabled);--w-c-button-bg-active:var(--w-s-color-background-disabled);--w-c-button-color:var(--w-s-color-text-inverted);--w-c-button-border-width:0px;--w-c-button-border-color:transparent;--w-c-button-border-color-hover:transparent;--w-c-button-border-color-active:transparent;--w-c-button-color-hover:var(--w-s-color-text-inverted);--w-c-button-color-active:var(--w-s-color-text-inverted)}:host([loading]),:host([loading][quiet]),:host([loading][variant]){pointer-events:none;--w-c-button-bg:var(--w-s-color-background-subtle);--w-c-button-bg-hover:var(--w-s-color-background-subtle);--w-c-button-bg-active:var(--w-s-color-background-subtle);--w-c-button-color:var(--w-s-color-text);--w-c-button-color-hover:var(--w-s-color-text);--w-c-button-color-active:var(--w-s-color-text);--w-c-button-border-width:0px;--w-c-button-border-color:transparent;--w-c-button-border-color-hover:transparent;--w-c-button-border-color-active:transparent}:host([loading]) button[part=base]{background-image:linear-gradient(135deg,rgba(0,0,0,.05) 25%,transparent 25%,transparent 50%,rgba(0,0,0,.05) 50%,rgba(0,0,0,.05) 75%,transparent 75%,transparent);background-size:30px 30px;animation:animate-inprogress 3s linear infinite}@media (prefers-reduced-motion:reduce){:host([loading]) button[part=base]{animation:none}}@keyframes animate-inprogress{0%{background-position:0 0}100%{background-position:60px 0}}`,Vt=a`${Tt}a[part=base]{display:inline-flex;justify-content:center;align-items:center;text-align:center;cursor:pointer;text-decoration:none;background-color:var(--_bg);color:var(--_color);border:var(--_border-width) solid var(--_border-color);border-radius:var(--_radius);padding:calc(var(--_pad-y) - var(--_border-width)) calc(var(--_pad-x) - var(--_border-width));font-size:var(--_font-size);line-height:var(--_line-height);font-weight:var(--_font-weight);transition:var(--_transition)}:host(:not([disabled])) a[part=base]:hover{background-color:var(--_bg-hover);border-color:var(--_border-color-hover);color:var(--_color-hover)}:host(:not([disabled])) a[part=base]:active{background-color:var(--_bg-active);border-color:var(--_border-color-active);color:var(--_color-active)}:host(:focus-visible) a[part=base]{outline:var(--_outline-width) solid var(--_outline-color);outline-offset:var(--_outline-offset)}${jt}:host([variant=link]) a[part=base]{display:inline;padding:0}:host([variant=link]:not([disabled])) a[part=base]:hover{text-decoration:underline;background-color:transparent;border-color:transparent}${Rt}:host([full-width]) a[part=base]{width:100%}${Nt}`;var Ft=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const Lt=["primary","secondary","negative","negativeQuiet","utility","utilityQuiet","quiet","link","overlay","overlayInverted","overlayQuiet","overlayInvertedQuiet"];class qt extends ne{constructor(){super(...arguments),this.autofocus=!1,this.small=!1,this.disabled=!1,this.fullWidth=!1}static{this.shadowRootOptions={...ne.shadowRootOptions,delegatesFocus:!0}}static{this.styles=[De,Vt]}connectedCallback(){if(super.connectedCallback(),this.variant&&!Lt.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:\n${Lt.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0)}render(){return q`<a href="${this.href}" part="base" target="${this.target}" rel="${"_blank"===this.target?this.rel||"noopener":W}" tabindex="0"><slot></slot></a>`}}Ft([ce({type:Boolean,reflect:!0})],qt.prototype,"autofocus",void 0),Ft([ce({reflect:!0})],qt.prototype,"variant",void 0),Ft([ce({type:Boolean,reflect:!0})],qt.prototype,"small",void 0),Ft([ce({reflect:!0})],qt.prototype,"href",void 0),Ft([ce({type:Boolean,reflect:!0})],qt.prototype,"disabled",void 0),Ft([ce({reflect:!0})],qt.prototype,"target",void 0),Ft([ce({reflect:!0})],qt.prototype,"rel",void 0),Ft([ce({attribute:"full-width",type:Boolean,reflect:!0})],qt.prototype,"fullWidth",void 0),customElements.get("w-link")||customElements.define("w-link",qt);const Bt=JSON.parse('{"button.aria.loading":["Indlæser..."]}'),Wt=JSON.parse('{"button.aria.loading":["Loading..."]}'),Ht=JSON.parse('{"button.aria.loading":["Ladataan..."]}'),Yt=JSON.parse('{"button.aria.loading":["Laster..."]}'),Xt=JSON.parse('{"button.aria.loading":["Laddar ..."]}');var Ut=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const Jt=["primary","secondary","negative","negativeQuiet","utility","pill","link","quiet","utilityQuiet","overlay","overlayInverted","overlayQuiet","overlayInvertedQuiet"];class Kt extends(ze(ne)){static{this.styles=[De,It]}static{this.shadowRootOptions={...ne.shadowRootOptions,delegatesFocus:!0}}#e;updated(e){e.has("value")&&this.setValue(this.value)}constructor(){super(),this.autofocus=!1,this.quiet=!1,this.iconOnly=!1,this.small=!1,this.loading=!1,this.disabled=!1,this.fullWidth=!1,this.#e=null,ft(Wt,Yt,Ht,Bt,Xt),this.ariaValueTextLoading=ut.t({id:"button.aria.loading",message:"Loading...",comment:"Screen reader message for buttons that are loading"})}connectedCallback(){super.connectedCallback();const e=this.variant||"secondary";if(!Jt.includes(e))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:\n${Jt.join(", ")}.`);this.#e=this.value}closestWithId(e){let t=this.shadowRoot,r=null;try{for(;t;){if(r=t.getElementById(e),r)return r;t=t.getRootNode().host?.getRootNode()}}catch{}return document.getElementById(e)}firstUpdated(){this.autofocus&&!this.href&&setTimeout(()=>this.focus(),0),this.buttonEl&&this.commandfor&&(this.buttonEl.commandForElement=this.closestWithId(this.commandfor))}_handleButtonClick(){"submit"===this.type?this.internals.form.requestSubmit():"reset"===this.type&&this.internals.form.reset()}resetFormControl(){this.value=this.#e}render(){const e=this.variant||"secondary";return q`${this.href?q`<w-link href="${this.href}" target="${this.target}" variant="${this.quiet?"quiet":e}" ?small="${this.small}" ?loading="${this.loading}" ?autofocus="${this.autofocus}" ?full-width="${this.fullWidth}" class="${this.buttonClass}" rel="${"_blank"===this.target?this.rel||"noopener":void 0}"><slot></slot></w-link>`:q`<button type="${this.type||"button"}" part="base" class="${Ae(this.buttonClass)}" @click="${this._handleButtonClick}" commandfor="${Ae(this.commandfor)}" command="${Ae(this.command)}"><slot></slot></button>`} ${this.loading?q`<span class="sr-only" role="progressbar" aria-valuenow="{0}" aria-valuetext="${this.ariaValueTextLoading}"></span>`:W}`}}Ut([ce({reflect:!0})],Kt.prototype,"type",void 0),Ut([ce({type:Boolean,reflect:!0})],Kt.prototype,"autofocus",void 0),Ut([ce({reflect:!0})],Kt.prototype,"variant",void 0),Ut([ce({type:Boolean,reflect:!0})],Kt.prototype,"quiet",void 0),Ut([ce({type:Boolean,reflect:!0,attribute:"icon-only"})],Kt.prototype,"iconOnly",void 0),Ut([ce({type:Boolean,reflect:!0})],Kt.prototype,"small",void 0),Ut([ce({type:Boolean,reflect:!0})],Kt.prototype,"loading",void 0),Ut([ce({reflect:!0})],Kt.prototype,"href",void 0),Ut([ce({reflect:!0})],Kt.prototype,"target",void 0),Ut([ce({type:Boolean,reflect:!0})],Kt.prototype,"disabled",void 0),Ut([ce({reflect:!0})],Kt.prototype,"rel",void 0),Ut([ce({attribute:"full-width",type:Boolean,reflect:!0})],Kt.prototype,"fullWidth",void 0),Ut([ce({attribute:"button-class",reflect:!0})],Kt.prototype,"buttonClass",void 0),Ut([ce({reflect:!0})],Kt.prototype,"name",void 0),Ut([ce({reflect:!0})],Kt.prototype,"value",void 0),Ut([ce()],Kt.prototype,"commandfor",void 0),Ut([ce()],Kt.prototype,"command",void 0),Ut([pe("button")],Kt.prototype,"buttonEl",void 0),customElements.get("w-button")||customElements.define("w-button",Kt);const Zt=["top","right","bottom","left"],Qt=Math.min,Gt=Math.max,er=Math.round,tr=e=>({x:e,y:e}),rr={left:"right",right:"left",bottom:"top",top:"bottom"};function or(e,t,r){return Gt(e,Qt(t,r))}function ir(e,t){return"function"==typeof e?e(t):e}function ar(e){return e.split("-")[0]}function nr(e){return e.split("-")[1]}function sr(e){return"x"===e?"y":"x"}function lr(e){return"y"===e?"height":"width"}function dr(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function cr(e){return sr(dr(e))}function hr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ur=["left","right"],pr=["right","left"],br=["top","bottom"],gr=["bottom","top"];function mr(e,t,r,o){const i=nr(e);let a=function(e,t,r){switch(e){case"top":case"bottom":return r?t?pr:ur:t?ur:pr;case"left":case"right":return t?br:gr;default:return[]}}(ar(e),"start"===r,o);return i&&(a=a.map(e=>e+"-"+i),t&&(a=a.concat(a.map(hr)))),a}function vr(e){const t=ar(e);return rr[t]+e.slice(t.length)}function fr(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function wr(e){const{x:t,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:t,right:t+o,bottom:r+i,x:t,y:r}}function yr(e,t,r){let{reference:o,floating:i}=e;const a=dr(t),n=cr(t),s=lr(n),l=ar(t),d="y"===a,c=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,u=o[s]/2-i[s]/2;let p;switch(l){case"top":p={x:c,y:o.y-i.height};break;case"bottom":p={x:c,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:h};break;case"left":p={x:o.x-i.width,y:h};break;default:p={x:o.x,y:o.y}}switch(nr(t)){case"start":p[n]-=u*(r&&d?-1:1);break;case"end":p[n]+=u*(r&&d?-1:1)}return p}async function xr(e,t){var r;void 0===t&&(t={});const{x:o,y:i,platform:a,rects:n,elements:s,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=ir(t,e),b=fr(p),g=s[u?"floating"===h?"reference":"floating":h],m=wr(await a.getClippingRect({element:null==(r=await(null==a.isElement?void 0:a.isElement(g)))||r?g:g.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:d,rootBoundary:c,strategy:l})),v="floating"===h?{x:o,y:i,width:n.floating.width,height:n.floating.height}:n.reference,f=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),w=await(null==a.isElement?void 0:a.isElement(f))&&await(null==a.getScale?void 0:a.getScale(f))||{x:1,y:1},y=wr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:f,strategy:l}):v);return{top:(m.top-y.top+b.top)/w.y,bottom:(y.bottom-m.bottom+b.bottom)/w.y,left:(m.left-y.left+b.left)/w.x,right:(y.right-m.right+b.right)/w.x}}function kr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _r(e){return Zt.some(t=>e[t]>=0)}const $r=new Set(["left","top"]);function Sr(){return"undefined"!=typeof window}function Er(e){return zr(e)?(e.nodeName||"").toLowerCase():"#document"}function Cr(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Or(e){var t;return null==(t=(zr(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function zr(e){return!!Sr()&&(e instanceof Node||e instanceof Cr(e).Node)}function Ar(e){return!!Sr()&&(e instanceof Element||e instanceof Cr(e).Element)}function Dr(e){return!!Sr()&&(e instanceof HTMLElement||e instanceof Cr(e).HTMLElement)}function Pr(e){return!(!Sr()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Cr(e).ShadowRoot)}function Mr(e){const{overflow:t,overflowX:r,overflowY:o,display:i}=Br(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&"inline"!==i&&"contents"!==i}function Tr(e){return/^(table|td|th)$/.test(Er(e))}function jr(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Rr=/transform|translate|scale|rotate|perspective|filter/,Nr=/paint|layout|strict|content/,Ir=e=>!!e&&"none"!==e;let Vr;function Fr(e){const t=Ar(e)?Br(e):e;return Ir(t.transform)||Ir(t.translate)||Ir(t.scale)||Ir(t.rotate)||Ir(t.perspective)||!Lr()&&(Ir(t.backdropFilter)||Ir(t.filter))||Rr.test(t.willChange||"")||Nr.test(t.contain||"")}function Lr(){return null==Vr&&(Vr="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Vr}function qr(e){return/^(html|body|#document)$/.test(Er(e))}function Br(e){return Cr(e).getComputedStyle(e)}function Wr(e){return Ar(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hr(e){if("html"===Er(e))return e;const t=e.assignedSlot||e.parentNode||Pr(e)&&e.host||Or(e);return Pr(t)?t.host:t}function Yr(e){const t=Hr(e);return qr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dr(t)&&Mr(t)?t:Yr(t)}function Xr(e,t,r){var o;void 0===t&&(t=[]);const i=Yr(e),a=i===(null==(o=e.ownerDocument)?void 0:o.body),n=Cr(i);return a?(Ur(n),t.concat(n,n.visualViewport||[],Mr(i)?i:[],[])):t.concat(i,Xr(i,[]))}function Ur(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Jr(e){const t=Br(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Dr(e),a=i?e.offsetWidth:r,n=i?e.offsetHeight:o,s=er(r)!==a||er(o)!==n;return s&&(r=a,o=n),{width:r,height:o,$:s}}function Kr(e){return Ar(e)?e:e.contextElement}function Zr(e){const t=Kr(e);if(!Dr(t))return tr(1);const r=t.getBoundingClientRect(),{width:o,height:i,$:a}=Jr(t);let n=(a?er(r.width):r.width)/o,s=(a?er(r.height):r.height)/i;return n&&Number.isFinite(n)||(n=1),s&&Number.isFinite(s)||(s=1),{x:n,y:s}}const Qr=tr(0);function Gr(e){const t=Cr(e);return Lr()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Qr}function eo(e,t,r,o){void 0===t&&(t=!1),void 0===r&&(r=!1);const i=e.getBoundingClientRect(),a=Kr(e);let n=tr(1);t&&(o?Ar(o)&&(n=Zr(o)):n=Zr(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==Cr(e))&&t}(a,r,o)?Gr(a):tr(0);let l=(i.left+s.x)/n.x,d=(i.top+s.y)/n.y,c=i.width/n.x,h=i.height/n.y;if(a){const e=Cr(a),t=o&&Ar(o)?Cr(o):o;let r=e,i=Ur(r);for(;i&&o&&t!==r;){const e=Zr(i),t=i.getBoundingClientRect(),o=Br(i),a=t.left+(i.clientLeft+parseFloat(o.paddingLeft))*e.x,n=t.top+(i.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,h*=e.y,l+=a,d+=n,r=Cr(i),i=Ur(r)}}return wr({width:c,height:h,x:l,y:d})}function to(e,t){const r=Wr(e).scrollLeft;return t?t.left+r:eo(Or(e)).left+r}function ro(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-to(e,r),y:r.top+t.scrollTop}}function oo(e,t,r){let o;if("viewport"===t)o=function(e,t){const r=Cr(e),o=Or(e),i=r.visualViewport;let a=o.clientWidth,n=o.clientHeight,s=0,l=0;if(i){a=i.width,n=i.height;const e=Lr();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}const d=to(o);if(d<=0){const e=o.ownerDocument,t=e.body,r=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,n=Math.abs(o.clientWidth-t.clientWidth-i);n<=25&&(a-=n)}else d<=25&&(a+=d);return{width:a,height:n,x:s,y:l}}(e,r);else if("document"===t)o=function(e){const t=Or(e),r=Wr(e),o=e.ownerDocument.body,i=Gt(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=Gt(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let n=-r.scrollLeft+to(e);const s=-r.scrollTop;return"rtl"===Br(o).direction&&(n+=Gt(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:n,y:s}}(Or(e));else if(Ar(t))o=function(e,t){const r=eo(e,!0,"fixed"===t),o=r.top+e.clientTop,i=r.left+e.clientLeft,a=Dr(e)?Zr(e):tr(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:o*a.y}}(t,r);else{const r=Gr(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return wr(o)}function io(e,t){const r=Hr(e);return!(r===t||!Ar(r)||qr(r))&&("fixed"===Br(r).position||io(r,t))}function ao(e,t,r){const o=Dr(t),i=Or(t),a="fixed"===r,n=eo(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=tr(0);function d(){l.x=to(i)}if(o||!o&&!a)if(("body"!==Er(t)||Mr(i))&&(s=Wr(t)),o){const e=eo(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&d();a&&!o&&i&&d();const c=!i||o||a?tr(0):ro(i,s);return{x:n.left+s.scrollLeft-l.x-c.x,y:n.top+s.scrollTop-l.y-c.y,width:n.width,height:n.height}}function no(e){return"static"===Br(e).position}function so(e,t){if(!Dr(e)||"fixed"===Br(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Or(e)===r&&(r=r.ownerDocument.body),r}function lo(e,t){const r=Cr(e);if(jr(e))return r;if(!Dr(e)){let t=Hr(e);for(;t&&!qr(t);){if(Ar(t)&&!no(t))return t;t=Hr(t)}return r}let o=so(e,t);for(;o&&Tr(o)&&no(o);)o=so(o,t);return o&&qr(o)&&no(o)&&!Fr(o)?r:o||function(e){let t=Hr(e);for(;Dr(t)&&!qr(t);){if(Fr(t))return t;if(jr(t))return null;t=Hr(t)}return null}(e)||r}const co={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:o,strategy:i}=e;const a="fixed"===i,n=Or(o),s=!!t&&jr(t.floating);if(o===n||s&&a)return r;let l={scrollLeft:0,scrollTop:0},d=tr(1);const c=tr(0),h=Dr(o);if((h||!h&&!a)&&(("body"!==Er(o)||Mr(n))&&(l=Wr(o)),h)){const e=eo(o);d=Zr(o),c.x=e.x+o.clientLeft,c.y=e.y+o.clientTop}const u=!n||h||a?tr(0):ro(n,l);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-l.scrollLeft*d.x+c.x+u.x,y:r.y*d.y-l.scrollTop*d.y+c.y+u.y}},getDocumentElement:Or,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:o,strategy:i}=e;const a="clippingAncestors"===r?jr(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let o=Xr(e,[]).filter(e=>Ar(e)&&"body"!==Er(e)),i=null;const a="fixed"===Br(e).position;let n=a?Hr(e):e;for(;Ar(n)&&!qr(n);){const t=Br(n),r=Fr(n);r||"fixed"!==t.position||(i=null),(a?!r&&!i:!r&&"static"===t.position&&i&&("absolute"===i.position||"fixed"===i.position)||Mr(n)&&!r&&io(e,n))?o=o.filter(e=>e!==n):i=t,n=Hr(n)}return t.set(e,o),o}(t,this._c):[].concat(r),n=[...a,o],s=oo(t,n[0],i);let l=s.top,d=s.right,c=s.bottom,h=s.left;for(let e=1;e<n.length;e++){const r=oo(t,n[e],i);l=Gt(r.top,l),d=Qt(r.right,d),c=Qt(r.bottom,c),h=Gt(r.left,h)}return{width:d-h,height:c-l,x:h,y:l}},getOffsetParent:lo,getElementRects:async function(e){const t=this.getOffsetParent||lo,r=this.getDimensions,o=await r(e.floating);return{reference:ao(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Jr(e);return{width:t,height:r}},getScale:Zr,isElement:Ar,isRTL:function(e){return"rtl"===Br(e).direction}},ho=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:i,y:a,placement:n,middlewareData:s}=t,l=await async function(e,t){const{placement:r,platform:o,elements:i}=e,a=await(null==o.isRTL?void 0:o.isRTL(i.floating)),n=ar(r),s=nr(r),l="y"===dr(r),d=$r.has(n)?-1:1,c=a&&l?-1:1,h=ir(t,e);let{mainAxis:u,crossAxis:p,alignmentAxis:b}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return s&&"number"==typeof b&&(p="end"===s?-1*b:b),l?{x:p*c,y:u*d}:{x:u*d,y:p*c}}(t,e);return n===(null==(r=s.offset)?void 0:r.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:n}}}}},uo=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:i,platform:a}=t,{mainAxis:n=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...d}=ir(e,t),c={x:r,y:o},h=await a.detectOverflow(t,d),u=dr(ar(i)),p=sr(u);let b=c[p],g=c[u];if(n){const e="y"===p?"bottom":"right";b=or(b+h["y"===p?"top":"left"],b,b-h[e])}if(s){const e="y"===u?"bottom":"right";g=or(g+h["y"===u?"top":"left"],g,g-h[e])}const m=l.fn({...t,[p]:b,[u]:g});return{...m,data:{x:m.x-r,y:m.y-o,enabled:{[p]:n,[u]:s}}}}}},po=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:i,middlewareData:a,rects:n,initialPlacement:s,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...m}=ir(e,t);if(null!=(r=a.arrow)&&r.alignmentOffset)return{};const v=ar(i),f=dr(s),w=ar(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(d.floating)),x=u||(w||!g?[vr(s)]:function(e){const t=vr(e);return[hr(e),t,hr(t)]}(s)),k="none"!==b;!u&&k&&x.push(...mr(s,g,b,y));const _=[s,...x],$=await l.detectOverflow(t,m),S=[];let E=(null==(o=a.flip)?void 0:o.overflows)||[];if(c&&S.push($[v]),h){const e=function(e,t,r){void 0===r&&(r=!1);const o=nr(e),i=cr(e),a=lr(i);let n="x"===i?o===(r?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[a]>t.floating[a]&&(n=vr(n)),[n,vr(n)]}(i,n,y);S.push($[e[0]],$[e[1]])}if(E=[...E,{placement:i,overflows:S}],!S.every(e=>e<=0)){var C,O;const e=((null==(C=a.flip)?void 0:C.index)||0)+1,t=_[e];if(t){if(!("alignment"===h&&f!==dr(t))||E.every(e=>dr(e.placement)!==f||e.overflows[0]>0))return{data:{index:e,overflows:E},reset:{placement:t}}}let r=null==(O=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:O.placement;if(!r)switch(p){case"bestFit":{var z;const e=null==(z=E.filter(e=>{if(k){const t=dr(e.placement);return t===f||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:z[0];e&&(r=e);break}case"initialPlacement":r=s}if(i!==r)return{reset:{placement:r}}}return{}}}},bo=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,o;const{placement:i,rects:a,platform:n,elements:s}=t,{apply:l=()=>{},...d}=ir(e,t),c=await n.detectOverflow(t,d),h=ar(i),u=nr(i),p="y"===dr(i),{width:b,height:g}=a.floating;let m,v;"top"===h||"bottom"===h?(m=h,v=u===(await(null==n.isRTL?void 0:n.isRTL(s.floating))?"start":"end")?"left":"right"):(v=h,m="end"===u?"top":"bottom");const f=g-c.top-c.bottom,w=b-c.left-c.right,y=Qt(g-c[m],f),x=Qt(b-c[v],w),k=!t.middlewareData.shift;let _=y,$=x;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&($=w),null!=(o=t.middlewareData.shift)&&o.enabled.y&&(_=f),k&&!u){const e=Gt(c.left,0),t=Gt(c.right,0),r=Gt(c.top,0),o=Gt(c.bottom,0);p?$=b-2*(0!==e||0!==t?e+t:Gt(c.left,c.right)):_=g-2*(0!==r||0!==o?r+o:Gt(c.top,c.bottom))}await l({...t,availableWidth:$,availableHeight:_});const S=await n.getDimensions(s.floating);return b!==S.width||g!==S.height?{reset:{rects:!0}}:{}}}},go=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:o}=t,{strategy:i="referenceHidden",...a}=ir(e,t);switch(i){case"referenceHidden":{const e=kr(await o.detectOverflow(t,{...a,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:_r(e)}}}case"escaped":{const e=kr(await o.detectOverflow(t,{...a,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:_r(e)}}}default:return{}}}}},mo=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:o,placement:i,rects:a,platform:n,elements:s,middlewareData:l}=t,{element:d,padding:c=0}=ir(e,t)||{};if(null==d)return{};const h=fr(c),u={x:r,y:o},p=cr(i),b=lr(p),g=await n.getDimensions(d),m="y"===p,v=m?"top":"left",f=m?"bottom":"right",w=m?"clientHeight":"clientWidth",y=a.reference[b]+a.reference[p]-u[p]-a.floating[b],x=u[p]-a.reference[p],k=await(null==n.getOffsetParent?void 0:n.getOffsetParent(d));let _=k?k[w]:0;_&&await(null==n.isElement?void 0:n.isElement(k))||(_=s.floating[w]||a.floating[b]);const $=y/2-x/2,S=_/2-g[b]/2-1,E=Qt(h[v],S),C=Qt(h[f],S),O=E,z=_-g[b]-C,A=_/2-g[b]/2+$,D=or(O,A,z),P=!l.arrow&&null!=nr(i)&&A!==D&&a.reference[b]/2-(A<O?E:C)-g[b]/2<0,M=P?A<O?A-O:A-z:0;return{[p]:u[p]+M,data:{[p]:D,centerOffset:A-D-M,...P&&{alignmentOffset:M}},reset:P}}}),vo=(e,t,r)=>{const o=new Map,i={platform:co,...r},a={...i.platform,_c:o};return(async(e,t,r)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:n}=r,s=n.detectOverflow?n:{...n,detectOverflow:xr},l=await(null==n.isRTL?void 0:n.isRTL(t));let d=await n.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:h}=yr(d,o,l),u=o,p=0;const b={};for(let r=0;r<a.length;r++){const g=a[r];if(!g)continue;const{name:m,fn:v}=g,{x:f,y:w,data:y,reset:x}=await v({x:c,y:h,initialPlacement:o,placement:u,strategy:i,middlewareData:b,rects:d,platform:s,elements:{reference:e,floating:t}});c=null!=f?f:c,h=null!=w?w:h,b[m]={...b[m],...y},x&&p<50&&(p++,"object"==typeof x&&(x.placement&&(u=x.placement),x.rects&&(d=!0===x.rects?await n.getElementRects({reference:e,floating:t,strategy:i}):x.rects),({x:c,y:h}=yr(d,u,l))),r=-1)}return{x:c,y:h,placement:u,strategy:i,middlewareData:b}})(e,t,{...i,platform:a})},fo="top-start",wo="top",yo="top-end",xo="right-start",ko="right",_o="right-end",$o="bottom-start",So="bottom",Eo="bottom-end",Co="left-start",Oo="left",zo="left-end",Ao=[fo,wo,yo,xo,ko,_o,$o,So,Eo,Co,Oo,zo],Do={[fo]:$o,[wo]:So,[yo]:Eo,[$o]:fo,[So]:wo,[Eo]:yo,[Co]:xo,[Oo]:ko,[zo]:_o,[xo]:Co,[ko]:Oo,[_o]:zo},Po={[Co]:-45,[Oo]:-45,[zo]:-45,[fo]:45,[wo]:45,[yo]:45,[xo]:135,[ko]:135,[_o]:135,[$o]:-135,[So]:-135,[Eo]:-135},Mo=e=>{let t;return t=/-/.test(e)?e.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(""):e.charAt(0).toUpperCase()+e.slice(1),t},To=e=>Do[(e=>e.split("-")[0])(e)],jo=e=>Do[e];async function Ro(e){if(!e?.isShowing)return;if(e?.waitForDOM&&await(e?.waitForDOM()),!e?.targetEl||!e?.attentionEl)return;let t=e?.targetEl;const r=e.attentionEl;return vo(t,r,{placement:e?.directionName??So,middleware:[ho({mainAxis:e?.distance??8,crossAxis:e?.skidding??0}),e?.flip&&po({crossAxis:e?.crossAxis,fallbackPlacements:e?.fallbackPlacements}),e?.flip&&uo({crossAxis:!0}),!e?.noArrow&&e?.arrowEl&&mo({element:e?.arrowEl}),go(),bo({apply(){Object.assign(r.style,{paddingRight:"8px",paddingLeft:"8px"})}})]}).then(({x:t,y:o,middlewareData:i,placement:a})=>{if(e.actualDirection=a,e?.isCallout||Object.assign(r.style,{left:`${t}px`,top:`${o}px`}),i?.hide&&!e?.isCallout){const{referenceHidden:e}=i.hide;Object.assign(r.style,{visibility:e?"hidden":""})}if(i?.arrow&&e?.arrowEl){const t=e?.arrowEl,{x:o,y:n}=i.arrow,s="rtl"===window.getComputedStyle(r).direction,l=jo(a).split("-")[1];let d="",c="",h="",u="";if("start"===l){const e="number"==typeof o?`calc(24px - ${t.offsetWidth/2}px)`:"";d="number"==typeof n?`calc(24px - ${t.offsetWidth/2}px)`:"",c=s?e:"",u=s?"":e}else if("end"===l){const e="number"==typeof o?`calc(24px - ${t.offsetWidth/2}px)`:"";c=s?"":e,u=s?e:"",h="number"==typeof n?`calc(24px - ${t.offsetWidth/2}px)`:""}else u="number"==typeof o?`${o}px`:"",d="number"==typeof n?`${n}px`:"";Object.assign(t.style,{top:d,right:c,bottom:h,left:u}),((e,t,r)=>{Object.assign(e?.style,{borderTopLeftRadius:"4px",zIndex:1,[`margin${Mo(To(r))}`]:"-0.5px",transform:`rotate(${t}deg)`})})(t,Po[jo(a)],a)}}),e}const No=a`.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-stretch{place-items:stretch}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-center{align-self:center}.self-end{align-self:flex-end}.self-stretch{align-self:stretch}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.items-start{align-items:flex-start}.items-center{align-items:center}.items-end{align-items:flex-end}.content-start{align-content:flex-start}.content-center{align-content:center}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-center{justify-self:center}.justify-self-end{justify-self:end}.justify-self-stretch{justify-self:stretch}.justify-items-start{justify-items:start}.justify-items-center{justify-items:center}.justify-items-end{justify-items:end}.justify-items-stretch{justify-items:stretch}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.gap-0{gap:0}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-10{gap:2.5rem}.gap-12{gap:3rem}.gap-14{gap:3.5rem}.gap-16{gap:4rem}.gap-x-0{column-gap:0}.gap-x-1{column-gap:.25rem}.gap-x-2{column-gap:.5rem}.gap-x-4{column-gap:1rem}.gap-x-6{column-gap:1.5rem}.gap-x-8{column-gap:2rem}.gap-x-10{column-gap:2.5rem}.gap-x-12{column-gap:3rem}.gap-x-14{column-gap:3.5rem}.gap-x-16{column-gap:4rem}.gap-y-0{row-gap:0}.gap-y-1{row-gap:.25rem}.gap-y-2{row-gap:.5rem}.gap-y-4{row-gap:1rem}.gap-y-6{row-gap:1.5rem}.gap-y-8{row-gap:2rem}.gap-y-10{row-gap:2.5rem}.gap-y-12{row-gap:3rem}.gap-y-14{row-gap:3.5rem}.gap-y-16{row-gap:4rem}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.order-5{order:5}.order-6{order:6}.order-7{order:7}.order-8{order:8}.order-9{order:9}.order-10{order:10}.order-11{order:11}.order-12{order:12}.order-none{order:0}.order-first{order:-9999}.order-last{order:9999}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.basis-1{flex-basis:.25rem}.basis-2{flex-basis:.5rem}.basis-4{flex-basis:1rem}.basis-8{flex-basis:2rem}.basis-16{flex-basis:4rem}.basis-1\/5{flex-basis:20%}.flex-initial{flex:0 1 auto}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.space-x-0>*+*{margin-left:0}.space-x-1>*+*{margin-left:.25rem}.space-x-2>*+*{margin-left:.5rem}.space-x-4>*+*{margin-left:1rem}.space-x-6>*+*{margin-left:1.5rem}.space-x-8>*+*{margin-left:2rem}.space-x-10>*+*{margin-left:2.5rem}.space-x-12>*+*{margin-left:3rem}.space-x-14>*+*{margin-left:3.5rem}.space-x-16>*+*{margin-left:4rem}.space-y-0>*+*{margin-top:0}.space-y-1>*+*{margin-top:.25rem}.space-y-2>*+*{margin-top:.5rem}.space-y-4>*+*{margin-top:1rem}.space-y-6>*+*{margin-top:1.5rem}.space-y-8>*+*{margin-top:2rem}.space-y-10>*+*{margin-top:2.5rem}.space-y-12>*+*{margin-top:3rem}.space-y-14>*+*{margin-top:3.5rem}.space-y-16>*+*{margin-top:4rem}.space-x-reverse>*+*{margin-right:0;margin-left:0}.space-y-reverse>*+*{margin-bottom:0;margin-top:0}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.m-6{margin:1.5rem}.m-8{margin:2rem}.m-10{margin:2.5rem}.m-12{margin:3rem}.m-14{margin:3.5rem}.m-16{margin:4rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-14{margin-top:3.5rem}.mt-16{margin-top:4rem}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.mr-6{margin-right:1.5rem}.mr-8{margin-right:2rem}.mr-10{margin-right:2.5rem}.mr-12{margin-right:3rem}.mr-14{margin-right:3.5rem}.mr-16{margin-right:4rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-14{margin-bottom:3.5rem}.mb-16{margin-bottom:4rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-8{margin-left:2rem}.ml-10{margin-left:2.5rem}.ml-12{margin-left:3rem}.ml-14{margin-left:3.5rem}.ml-16{margin-left:4rem}.mx-0{margin-left:0;margin-right:0}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-8{margin-left:2rem;margin-right:2rem}.mx-10{margin-left:2.5rem;margin-right:2.5rem}.mx-12{margin-left:3rem;margin-right:3rem}.mx-14{margin-left:3.5rem;margin-right:3.5rem}.mx-16{margin-left:4rem;margin-right:4rem}.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.my-8{margin-top:2rem;margin-bottom:2rem}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-12{margin-top:3rem;margin-bottom:3rem}.my-14{margin-top:3.5rem;margin-bottom:3.5rem}.my-16{margin-top:4rem;margin-bottom:4rem}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-10{padding:2.5rem}.p-12{padding:3rem}.p-14{padding:3.5rem}.p-16{padding:4rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.pt-10{padding-top:2.5rem}.pt-12{padding-top:3rem}.pt-14{padding-top:3.5rem}.pt-16{padding-top:4rem}.pr-0{padding-right:0}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-14{padding-right:3.5rem}.pr-16{padding-right:4rem}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pb-10{padding-bottom:2.5rem}.pb-12{padding-bottom:3rem}.pb-14{padding-bottom:3.5rem}.pb-16{padding-bottom:4rem}.pl-0{padding-left:0}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pl-10{padding-left:2.5rem}.pl-12{padding-left:3rem}.pl-14{padding-left:3.5rem}.pl-16{padding-left:4rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-12{padding-left:3rem;padding-right:3rem}.px-14{padding-left:3.5rem;padding-right:3.5rem}.px-16{padding-left:4rem;padding-right:4rem}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-14{padding-top:3.5rem;padding-bottom:3.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}`,Io=JSON.parse('{"attention.aria.callout":["En grøn taleboble der introducerer noget nyt"],"attention.aria.close":["Luk"],"attention.aria.highlight":["En opmærksomhedsskabende taleboble med vigtig information"],"attention.aria.pointingDown":["peger nedad"],"attention.aria.pointingLeft":["peger til venstre"],"attention.aria.pointingRight":["peger til højre"],"attention.aria.pointingUp":["peger opad"],"attention.aria.popover":["En hvid taleboble med mere information"],"attention.aria.tooltip":["En sort taleboble med flere oplysninger"]}'),Vo=JSON.parse('{"attention.aria.callout":["A green speech bubble introducing something new"],"attention.aria.close":["Close"],"attention.aria.highlight":["An attention speech bubble with important information"],"attention.aria.pointingDown":["pointing down"],"attention.aria.pointingLeft":["pointing left"],"attention.aria.pointingRight":["pointing right"],"attention.aria.pointingUp":["pointing up"],"attention.aria.popover":["A white speech bubble providing additional information"],"attention.aria.tooltip":["A black speech bubble providing complementary information"]}'),Fo=JSON.parse('{"attention.aria.callout":["Vihreä puhekupla, joka esittelee jotain uutta"],"attention.aria.close":["Sulje"],"attention.aria.highlight":["Puhekupla, joka sisältää tärkeää tietoa"],"attention.aria.pointingDown":["osoittaa alas"],"attention.aria.pointingLeft":["osoittaa vasemmalle"],"attention.aria.pointingRight":["osoittaa oikealle"],"attention.aria.pointingUp":["osoittaa ylös"],"attention.aria.popover":["Valkoinen puhekupla, joka tarjoaa lisätietoa"],"attention.aria.tooltip":["Musta puhekupla, joka tarjoaa täydentävää tietoa"]}'),Lo=JSON.parse('{"attention.aria.callout":["Grønn taleboble som introduserer noe nytt"],"attention.aria.close":["Lukk"],"attention.aria.highlight":["En uthevet taleboble med viktig informasjon"],"attention.aria.pointingDown":["peker ned"],"attention.aria.pointingLeft":["peker til venstre"],"attention.aria.pointingRight":["peker til høyre"],"attention.aria.pointingUp":["peker opp"],"attention.aria.popover":["En hvit taleboble som gir tilleggsinformasjon"],"attention.aria.tooltip":["En svart taleboble som forklarer konteksten"]}'),qo=JSON.parse('{"attention.aria.callout":["En grön pratbubbla som introducerar något nytt"],"attention.aria.close":["Stäng"],"attention.aria.highlight":["En pratbubbla med viktig information"],"attention.aria.pointingDown":["pekar ned"],"attention.aria.pointingLeft":["pekar vänster"],"attention.aria.pointingRight":["pekar höger"],"attention.aria.pointingUp":["pekar upp"],"attention.aria.popover":["En vit pratbubbla som ger ytterligare information"],"attention.aria.tooltip":["En svart pratbubbla som ger kompletterande information"]}'),Bo=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.bg-transparent{background-color:#0000}.bg-\\[--w-color-button-primary-background\\]{background-color:var(--w-color-button-primary-background)}.bg-\\[--w-color-callout-background\\]{background-color:var(--w-color-callout-background)}.bg-\\[--w-s-color-surface-elevated-300\\]{background-color:var(--w-s-color-surface-elevated-300)}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.hover\\:bg-\\[--w-color-button-primary-background-hover\\]:hover{background-color:var(--w-color-button-primary-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.active\\:bg-\\[--w-color-button-primary-background-active\\]:active{background-color:var(--w-color-button-primary-background-active)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b-0{border-bottom-width:0}.border-r-0{border-right-width:0}.border-\\[--w-color-callout-border\\]{border-color:var(--w-color-callout-border)}.border-\\[--w-s-color-background-inverted\\]{border-color:var(--w-s-color-background-inverted)}.border-\\[--w-s-color-surface-elevated-300\\]{border-color:var(--w-s-color-surface-elevated-300)}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-tl-4{border-top-left-radius:4px}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.contents{display:contents}.hidden{display:none}.active\\:underline:active,.focus\\:underline:focus,.hover\\:underline:hover{text-decoration-line:underline}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:0}.items-center{align-items:center}.-bottom-\\[8px\\]{bottom:-8px}.-left-\\[8px\\]{left:-8px}.-right-\\[8px\\]{right:-8px}.-top-\\[8px\\]{top:-8px}.justify-center{justify-content:center}.absolute{position:absolute}.relative{position:relative}.static{position:static}.z-50{z-index:50}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-inverted{background-color:var(--w-s-color-background-inverted)}.s-bg-negative{background-color:var(--w-s-color-background-negative)}.s-bg-subtle{background-color:var(--w-s-color-background-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-negative-hover:hover{background-color:var(--w-s-color-background-negative-hover)}.hover\\:s-bg-negative-subtle-hover:hover{background-color:var(--w-s-color-background-negative-subtle-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-negative-active:active{background-color:var(--w-s-color-background-negative-active)}.active\\:s-bg-negative-subtle-active:active{background-color:var(--w-s-color-background-negative-subtle-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-icon{color:var(--w-s-color-icon)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border{border-color:var(--w-s-color-border)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.drop-shadow-m{filter:drop-shadow(0 3px 8px #4040403d) drop-shadow(0 3px 6px #40404029)}.shadow-m{box-shadow:var(--w-shadow-m)}.h-\\[14px\\]{height:14px}.w-\\[14px\\]{width:14px}.last-child\\:mb-0>:last-child{margin-bottom:0}.ml-8{margin-left:.8rem}.p-16{padding:1.6rem}.p-4{padding:.4rem}.px-16{padding-left:1.6rem;padding-right:1.6rem}.px-8{padding-left:.8rem;padding-right:.8rem}.py-6{padding-top:.6rem;padding-bottom:.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.font-bold{font-weight:700}.resize{resize:both}.translate-z-0{--w-translate-z:0rem;transform:translateX(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.transform{transform:translateX(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-\\[24\\]{line-height:2.4rem}`;var Wo=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const Ho="border-2 relative flex items-center",Yo="s-bg-inverted border-[--w-s-color-background-inverted] shadow-m s-text-inverted rounded-4 py-6 px-8",Xo="bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8",Uo="bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8 drop-shadow-m translate-z-0",Jo="bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300] s-text rounded-8 p-16 drop-shadow-m translate-z-0",Ko="absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",Zo="s-bg-inverted border-[--w-s-color-background-inverted]",Qo="bg-[--w-color-callout-background] border-[--w-color-callout-border]",Go="bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300]",ei="bg-[--w-color-callout-background] border-[--w-color-callout-border]",ti={"top-start":"-top-[8px]",top:"-top-[8px]","top-end":"-top-[8px]","right-start":"-right-[8px]",right:"-right-[8px]","right-end":"-right-[8px]","bottom-start":"-bottom-[8px]",bottom:"-bottom-[8px]","bottom-end":"-bottom-[8px]","left-start":"-left-[8px]",left:"-left-[8px]","left-end":"-left-[8px]"};class ri extends ne{static{this.styles=[De,No,Bo,a`#attention{position:absolute;z-index:50;visibility:var(--attention-visibility);display:var(--attention-display)}:host([popover]:not(:popover-open):not(dialog[open])){display:contents}`]}constructor(){super(),this.show=!1,this.tooltip=!1,this.callout=!1,this.highlight=!1,this.canClose=!1,this.noArrow=!1,this.flip=!1,this.crossAxis=!1,this.fallbackPlacements=[],this.attentionState=null,ft(Vo,Lo,Fo,Io,qo),this.handleDone=this.handleDone.bind(this),this.show=!1,this.placement="bottom",this.tooltip=!1,this.callout=!1,this.popover=!1,this.highlight=!1,this.canClose=!1,this.noArrow=!1,this.distance=8,this.skidding=0,this.flip=!1,this.crossAxis=!1,this._initialPlacement=this.placement,this._actualDirection=this.placement}connectedCallback(){if(super.connectedCallback(),this.placement&&!Object.keys(Do).includes(this.placement))throw new Error(`Invalid "placement" attribute. Set its value to one of the following:\n${JSON.stringify(Object.keys(Do))}`);if(this.fallbackPlacements&&!this.fallbackPlacements.every(e=>Ao.includes(e)))throw new Error(`Invalid "fallbackPlacements" attribute. Set its value to an array with one or more of the following:\n${JSON.stringify(Ao)}`);setTimeout(()=>{this.requestUpdate(),this.handleDone()},0),this.callout||(window.addEventListener("click",this.handleDone),window.addEventListener("scroll",this.handleDone),window.addEventListener("resize",this.handleDone),window.addEventListener("touch",this.handleDone)),this.tooltip&&(window.addEventListener("mouseover",this.handleDone),window.addEventListener("mouseout",this.handleDone))}disconnectedCallback(){window.removeEventListener("click",this.handleDone),window.removeEventListener("scroll",this.handleDone),window.removeEventListener("resize",this.handleDone),window.removeEventListener("touch",this.handleDone),window.removeEventListener("mouseover",this.handleDone),window.removeEventListener("mouseout",this.handleDone),super.disconnectedCallback()}handleDone(){window.requestAnimationFrame(()=>{this.show&&this._targetEl&&this._attentionEl&&this.attentionState?Ro(this.attentionState).then(e=>{this._actualDirection=e?.actualDirection}):this._actualDirection=this._initialPlacement})}get _actualDirection(){return this.placement}set _actualDirection(e){this.placement=e}get _arrowEl(){return this.renderRoot.querySelector("#arrow")}get _arrowDirection(){return Do[this._actualDirection]}get _arrowClasses(){const e=ti[this._arrowDirection];return Ee([Ko,this._activeVariantClasses.arrow,e])}get _arrowHtml(){return this.noArrow?W:q`<div id="arrow" class="${this._arrowClasses}"></div>`}get _activeVariantClasses(){return this.callout?{wrapper:Xo,arrow:Qo}:this.popover?{wrapper:Jo,arrow:Go}:this.tooltip?{wrapper:Yo,arrow:Zo}:this.highlight?{wrapper:Uo,arrow:ei}:{wrapper:"",arrow:""}}get _attentionEl(){return this.renderRoot.querySelector("#attention")}get _targetEl(){const e=this.renderRoot?.querySelector("slot[name='target']"),t=e?.assignedElements()[0];return t instanceof HTMLElement?t:null}get _messageEl(){const e=this.renderRoot.querySelector("slot[name='message']"),t=e?.assignedElements()[0];return t instanceof HTMLElement?t:null}get _wrapperClasses(){return Ee([Ho,this._activeVariantClasses.wrapper])}get _ariaClose(){return ut._({id:"attention.aria.close",message:"Close",comment:"Aria label for the close button in attention"})}get _closeBtnHtml(){return q`<w-button aria-label="${this._ariaClose}" @click="${this.close}" @keydown="${this.keypressed}" variant="pill" small="" class="ml-8"><w-icon name="Close" size="small" locale="${vt()}" class="flex"></w-icon></w-button>`}updated(){this._attentionEl&&(this.callout||this._attentionEl.style.setProperty("--attention-visibility",this.show?"":"hidden"),this.tooltip||this._attentionEl.style.setProperty("--attention-display",this.show?"flex":"none"),this.attentionState={isShowing:this.show,isCallout:this.callout,actualDirection:this._actualDirection,directionName:this.placement,arrowEl:this._arrowEl,attentionEl:this._attentionEl,targetEl:this._targetEl,noArrow:this.noArrow,distance:this.distance,skidding:this.skidding,flip:this.flip,crossAxis:this.crossAxis,fallbackPlacements:this.fallbackPlacements},Ro(this.attentionState))}pointingAtDirection(){switch(Do[this._actualDirection]){case"top-start":case"top":case"top-end":return ut._({id:"attention.aria.pointingUp",message:"pointing up",comment:"Default screenreader message for top direction in the attention component"});case"right-start":case"right":case"right-end":return ut._({id:"attention.aria.pointingRight",message:"pointing right",comment:"Default screenreader message for right direction in the attention component"});case"bottom-start":case"bottom":case"bottom-end":return ut._({id:"attention.aria.pointingDown",message:"pointing down",comment:"Default screenreader message for bottom direction in the attention component"});case"left-start":case"left":case"left-end":return ut._({id:"attention.aria.pointingLeft",message:"pointing left",comment:"Default screenreader message for left direction in the attention component"});default:return""}}activeAttentionType(){switch(!0){case this.tooltip:return ut._({id:"attention.aria.tooltip",message:"tooltip",comment:"Default screenreader message for tooltip in the attention component"});case this.callout:return ut._({id:"attention.aria.callout",message:"callout speech bubble",comment:"Default screenreader message for callout speech bubble in the attention component"});case this.popover:return ut._({id:"attention.aria.popover",message:"popover speech bubble",comment:"Default screenreader message for popover speech bubble in the attention component"});case this.highlight:return ut._({id:"attention.aria.highlight",message:"highlighted speech bubble",comment:"Default screenreader message for highlighted speech bubble in the attention component"});default:return""}}defaultAriaLabel(){return`${this.activeAttentionType()} ${this.noArrow?"":this.pointingAtDirection()}`}firstUpdated(){this._initialPlacement=this.placement,this.callout&&this._attentionEl&&(this._attentionEl.style.position="relative")}close(){const e=new CustomEvent("close",{bubbles:!0,composed:!0});this.updateComplete.then(()=>this.dispatchEvent(e))}keypressed(e){this.canClose&&"Escape"===e.key&&(e.preventDefault(),this.close())}render(){return this.callout||void 0!==this._targetEl?q`<section class="${Ae(this.className?this.className:void 0)}">${"right-start"===this.placement||"right"===this.placement||"right-end"===this.placement||"bottom-start"===this.placement||"bottom"===this.placement||"bottom-end"===this.placement?q`<slot name="target"></slot><div id="attention" class="${this._wrapperClasses}"><div role="${this.tooltip?"tooltip":"img"}" aria-label="${this.defaultAriaLabel()}">${this._arrowHtml}</div><slot name="message"></slot>${this.canClose?this._closeBtnHtml:W}</div>`:q`<div id="attention" class="${this._wrapperClasses}"><slot name="message"></slot><div role="${this.tooltip?"tooltip":"img"}" aria-label="${this.defaultAriaLabel()}">${this._arrowHtml}</div>${this.canClose?this._closeBtnHtml:W}</div><slot name="target"></slot>`}</section>`:q``}}Wo([ce({type:Boolean,reflect:!0})],ri.prototype,"show",void 0),Wo([ce({type:String,reflect:!1})],ri.prototype,"placement",void 0),Wo([ce({type:Boolean,reflect:!0})],ri.prototype,"tooltip",void 0),Wo([ce({type:Boolean,reflect:!0})],ri.prototype,"callout",void 0),Wo([ce({type:Boolean,reflect:!0})],ri.prototype,"popover",void 0),Wo([ce({type:Boolean,reflect:!0})],ri.prototype,"highlight",void 0),Wo([ce({attribute:"can-close",type:Boolean,reflect:!0})],ri.prototype,"canClose",void 0),Wo([ce({attribute:"no-arrow",type:Boolean,reflect:!0})],ri.prototype,"noArrow",void 0),Wo([ce({type:Number})],ri.prototype,"distance",void 0),Wo([ce({type:Number})],ri.prototype,"skidding",void 0),Wo([ce({type:Boolean,reflect:!0})],ri.prototype,"flip",void 0),Wo([ce({attribute:"cross-axis",type:Boolean,reflect:!0})],ri.prototype,"crossAxis",void 0),Wo([ce({attribute:"fallback-placements",type:Array,reflect:!0,useDefault:!0})],ri.prototype,"fallbackPlacements",void 0),customElements.get("w-attention")||customElements.define("w-attention",ri);const oi=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.backdrop-blur{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.bg-\\[--w-black\\/70\\]{background-color:rgba(var(--w-rgb-black),.7)}.bg-\\[--w-color-badge-info-background\\]{background-color:var(--w-color-badge-info-background)}.bg-\\[--w-color-badge-negative-background\\]{background-color:var(--w-color-badge-negative-background)}.bg-\\[--w-color-badge-neutral-background\\]{background-color:var(--w-color-badge-neutral-background)}.bg-\\[--w-color-badge-positive-background\\]{background-color:var(--w-color-badge-positive-background)}.bg-\\[--w-color-badge-sponsored-background\\]{background-color:var(--w-color-badge-sponsored-background)}.bg-\\[--w-color-badge-warning-background\\]{background-color:var(--w-color-badge-warning-background)}.border-0{border-width:0}.rounded-4{border-radius:4px}.rounded-bl-0{border-bottom-left-radius:0}.rounded-br-0{border-bottom-right-radius:0}.rounded-tl-0{border-top-left-radius:0}.rounded-tr-0{border-top-right-radius:0}.inline-flex{display:inline-flex}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.absolute{position:absolute}.static{position:static}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-text{color:var(--w-s-color-text)}.s-text-inverted-static{color:var(--w-s-color-text-inverted-static)}.px-8{padding-left:.8rem;padding-right:.8rem}.py-4{padding-top:.4rem;padding-bottom:.4rem}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;var ii=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};class ai extends ne{static{this.styles=[De,oi]}get _class(){const e=this.variant||"neutral";return Ee(["py-4 px-8 border-0 rounded-4 text-xs inline-flex","neutral"===e&&"bg-[--w-color-badge-neutral-background] s-text","info"===e&&"bg-[--w-color-badge-info-background] s-text","positive"===e&&"bg-[--w-color-badge-positive-background] s-text","warning"===e&&"bg-[--w-color-badge-warning-background] s-text","negative"===e&&"bg-[--w-color-badge-negative-background] s-text","disabled"===e&&"s-bg-disabled s-text","price"===e&&"bg-[--w-black/70] s-text-inverted-static","sponsored"===e&&"bg-[--w-color-badge-sponsored-background] s-text",!!this.position&&"absolute backdrop-blur","top-left"===this.position&&"rounded-tl-0 rounded-tr-0 rounded-bl-0 top-0 left-0","top-right"===this.position&&"rounded-tl-0 rounded-tr-0 rounded-br-0 top-0 right-0","bottom-right"===this.position&&"rounded-tr-0 rounded-br-0 rounded-bl-0 bottom-0 right-0","bottom-left"===this.position&&"rounded-tl-0 rounded-br-0 rounded-bl-0 bottom-0 left-0"])}render(){return q`<div class="${this._class}"><slot></slot></div>`}}ii([ce({type:String,reflect:!0})],ai.prototype,"variant",void 0),ii([ce({type:String,reflect:!0})],ai.prototype,"position",void 0),customElements.get("w-badge")||customElements.define("w-badge",ai);const ni=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.border-2{border-width:2px}.rounded-8{border-radius:8px}.rounded-l-0{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-0{border-top-right-radius:0;border-bottom-right-radius:0}.block{display:block}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-info-subtle{background-color:var(--w-s-color-background-info-subtle)}.s-border{border-color:var(--w-s-color-border)}.s-surface-sunken{background-color:var(--w-s-color-surface-sunken)}.-mx-16{margin-left:-1.6rem;margin-right:-1.6rem}.last-child\\:mb-0>:last-child{margin-bottom:0}.p-16{padding:1.6rem}.break-words{overflow-wrap:break-word}@media (min-width:480px){.sm\\:rounded-8{border-radius:8px}.sm\\:mx-0{margin-left:0;margin-right:0}}`;var si=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};class li extends(ze(ne)){constructor(){super(...arguments),this.bleed=!1,this.bordered=!1,this.info=!1,this.neutral=!1,this.role="region"}static{this.styles=[De,ni,a`:host{display:block}::slotted(:last-child){margin-bottom:0!important}`]}connectedCallback(){super.connectedCallback(),this.internals.role=this.role}updated(e){super.updated(e),e.has("role")&&(this.internals.role=this.role)}get _class(){return Ee(["group block relative break-words last-child:mb-0 p-16 rounded-8",this.bleed&&"-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",this.info&&"s-bg-info-subtle",this.neutral&&"s-surface-sunken",this.bordered&&"border-2 s-border s-bg"])}render(){return q`<div class="${this._class}"><slot></slot></div>`}}si([ce({type:Boolean,reflect:!0})],li.prototype,"bleed",void 0),si([ce({type:Boolean,reflect:!0})],li.prototype,"bordered",void 0),si([ce({type:Boolean,reflect:!0})],li.prototype,"info",void 0),si([ce({type:Boolean,reflect:!0})],li.prototype,"neutral",void 0),si([ce({type:String,reflect:!0,useDefault:!0})],li.prototype,"role",void 0),customElements.get("w-box")||customElements.define("w-box",li);const di=JSON.parse('{"breadcrumbs.ariaLabel":["Du er her"]}'),ci=JSON.parse('{"breadcrumbs.ariaLabel":["You are here"]}'),hi=JSON.parse('{"breadcrumbs.ariaLabel":["Olet tässä"]}'),ui=JSON.parse('{"breadcrumbs.ariaLabel":["Her er du"]}'),pi=JSON.parse('{"breadcrumbs.ariaLabel":["Du är här"]}'),bi=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.flex{display:flex}.static{position:static}.s-text{color:var(--w-s-color-text)}.s-text-link{color:var(--w-s-color-text-link)}.s-icon{color:var(--w-s-color-icon)}.space-x-8>:not([hidden])~:not([hidden]){--w-space-x-reverse:0;margin-left:calc(.8rem*calc(1 - var(--w-space-x-reverse)));margin-right:calc(.8rem*var(--w-space-x-reverse))}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.select-none{-webkit-user-select:none;user-select:none}`,gi="flex space-x-8",mi="s-text",vi="s-text-link",fi="sr-only",wi=q`<span class="${"select-none s-icon"}">/</span>`;class yi extends ne{static{this.styles=[De,bi]}constructor(){super(),this._internals=this.attachInternals(),ft(ci,ui,hi,di,pi),this._internals.ariaLabel=ut._({id:"breadcrumbs.ariaLabel",message:"You are here",comment:"Default screen reader message for the breadcrumb component"})}connectedCallback(){super.connectedCallback(),this._internals.role="navigation";const e=Array.from(this.children).flat(Number.POSITIVE_INFINITY).filter(e=>e).map((e,t)=>{if("string"==typeof e){const r=t===this.children.length-1;return q`<span class="${mi}" aria-current="${r?"page":void 0}">${e}</span>`}return e.classList.add("A"===e.tagName?vi:mi),e});this._children=function(e,t){return e.flatMap(e=>[e,t]).slice(0,-1)}(e,wi)}render(){return q`<nav aria-labelledby="breadCrumbLabel"><h2 id="breadCrumbLabel" class="${fi}">${this.ariaLabel}</h2><div class="${gi}">${this._children}</div></nav>`}}customElements.get("w-breadcrumbs")||customElements.define("w-breadcrumbs",yi);const xi=JSON.parse('{"card.button.text":["Vælg"]}'),ki=JSON.parse('{"card.button.text":["Select"]}'),_i=JSON.parse('{"card.button.text":["Valitse"]}'),$i=JSON.parse('{"card.button.text":["Velg"]}'),Si=JSON.parse('{"card.button.text":["Välj"]}'),Ei=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.border-2{border-width:2px}.border-transparent{border-color:#0000}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.block{display:block}.overflow-hidden{overflow:hidden}.outline{outline-style:solid}.inset-0{top:0;bottom:0;left:0;right:0}.absolute{position:absolute}.relative{position:relative}.static{position:static}.\\!s-bg-selected{background-color:var(--w-s-color-background-selected)!important}.s-bg{background-color:var(--w-s-color-background)}.s-bg-selected{background-color:var(--w-s-color-background-selected)}.\\!hover\\:s-bg-selected-hover:hover{background-color:var(--w-s-color-background-selected-hover)!important}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-selected-hover:hover{background-color:var(--w-s-color-background-selected-hover)}.\\!active\\:s-bg-selected-active:active{background-color:var(--w-s-color-background-selected-active)!important}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-selected-active:active{background-color:var(--w-s-color-background-selected-active)}.s-border{border-color:var(--w-s-color-border)}.s-border-selected{border-color:var(--w-s-color-border-selected)}.group:hover .group-hover\\:s-border-selected-hover{border-color:var(--w-s-color-border-selected-hover)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.hover\\:s-border-selected-hover:hover{border-color:var(--w-s-color-border-selected-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.active\\:s-border-selected-active:active{border-color:var(--w-s-color-border-selected-active)}.group:active .group-active\\:s-border-active{border-color:var(--w-s-color-border-active)}.group:active .group-active\\:s-border-selected-active{border-color:var(--w-s-color-border-selected-active)}.s-surface-elevated-200{background-color:var(--w-s-color-surface-elevated-200);box-shadow:var(--w-s-shadow-surface-elevated-200)}.hover\\:s-surface-elevated-200-hover:hover{background-color:var(--w-s-color-surface-elevated-200-hover);box-shadow:var(--w-s-shadow-surface-elevated-200-hover)}.active\\:s-surface-elevated-200-active:active{background-color:var(--w-s-color-surface-elevated-200-active);box-shadow:var(--w-s-shadow-surface-elevated-200-active)}.cursor-pointer{cursor:pointer}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}`;var Ci=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const Oi="cursor-pointer overflow-hidden relative transition-all",zi="group rounded-8 s-surface-elevated-200 hover:s-surface-elevated-200-hover active:s-surface-elevated-200-active",Ai="!s-bg-selected !hover:s-bg-selected-hover !active:s-bg-selected-active",Di="absolute border-2 rounded-8 inset-0 transition-all",Pi="border-transparent group-active:s-border-active",Mi="s-border-selected group-hover:s-border-selected-hover group-active:s-border-selected-active",Ti="border-2 rounded-4",ji="s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",Ri="s-bg-selected hover:s-bg-selected-hover active:s-bg-selected-active s-border-selected hover:s-border-selected-hover active:s-border-selected-active",Ni="sr-only",Ii="Enter",Vi=" ";class Fi extends ne{static{this.styles=[De,Ei,a`a::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0}:host{display:block}`]}constructor(){super(),this.selected=!1,this.flat=!1,this.clickable=!1,ft(ki,$i,_i,xi,Si),this.buttonText=ut._({id:"card.button.text",message:"Select",comment:"Screenreader message to indicate that the card is clickable"})}get _containerClasses(){return Ee([Oi,this.flat?Ti:zi,this.selected&&!this.flat&&Ai,this.selected&&this.flat?Ri:ji])}get _outlineClasses(){return Ee([Di,this.selected?Mi:Pi])}get _interactiveElement(){return this.clickable?(()=>q`<button class="${Ni}" aria-pressed="${this.selected}" tabindex="-1">${this.buttonText}</button>`)():this.selected?q`<span role="checkbox" aria-checked="true" aria-disabled="true"></span>`:""}keypressed(e){!this.clickable||e.altKey||e.ctrlKey||e.key!==Ii&&e.key!==Vi||(e.preventDefault(),this.click())}render(){return q`<div tabindex="${Ae(this.clickable?"0":void 0)}" class="${this._containerClasses}" @keydown="${this.keypressed}">${this._interactiveElement} ${this.flat?"":q`<div class="${this._outlineClasses}"></div>`}<slot></slot></div>`}}Ci([ce({type:Boolean,reflect:!0})],Fi.prototype,"selected",void 0),Ci([ce({type:Boolean})],Fi.prototype,"flat",void 0),Ci([ce({type:Boolean})],Fi.prototype,"clickable",void 0),customElements.get("w-card")||customElements.define("w-card",Fi)
|
|
64
|
+
/**
|
|
65
|
+
* @license
|
|
66
|
+
* Copyright 2020 Google LLC
|
|
67
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
|
+
*/;const{I:Li}=oe,qi=e=>e,Bi=()=>document.createComment(""),Wi=(e,t,r)=>{const o=e._$AA.parentNode,i=void 0===t?e._$AB:t._$AA;if(void 0===r){const t=o.insertBefore(Bi(),i),a=o.insertBefore(Bi(),i);r=new Li(t,a,e,e.options)}else{const t=r._$AB.nextSibling,a=r._$AM,n=a!==e;if(n){let t;r._$AQ?.(e),r._$AM=e,void 0!==r._$AP&&(t=e._$AU)!==a._$AU&&r._$AP(t)}if(t!==i||n){let e=r._$AA;for(;e!==t;){const t=qi(e).nextSibling;qi(o).insertBefore(e,i),e=t}}}return r},Hi=(e,t,r=e)=>(e._$AI(t,r),e),Yi={},Xi=(e,t=Yi)=>e._$AH=t,Ui=e=>{e._$AR(),e._$AA.remove()},Ji=fe(class extends we{constructor(e){if(super(e),e.type!==me&&e.type!==be&&e.type!==ve)throw Error("The `live` directive is not allowed on child or event bindings");if(!(e=>void 0===e.strings)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===B||t===W)return t;const r=e.element,o=e.name;if(e.type===me){if(t===r[o])return B}else if(e.type===ve){if(!!t===r.hasAttribute(o))return B}else if(e.type===be&&r.getAttribute(o)===t+"")return B;return Xi(e),t}}),Ki=a`:host{--_label-font-size:var(--w-c-checkbox-label-font-size, var(--w-font-size-m));--_label-line-height:var(--w-c-checkbox-label-line-height, var(--w-line-height-m));--_control-size:var(--w-c-checkbox-control-size, 2rem);--_gap:var(--w-c-checkbox-gap, 8px);--_radius:var(--w-c-checkbox-radius, 4px);--_border-width:var(--w-c-checkbox-border-width, 1px);--_bg-default:var(--w-c-checkbox-bg, var(--w-s-color-background));--_border-default:var(--w-c-checkbox-border-color, var(--w-s-color-border-strong));--_icon-color:var(--w-c-checkbox-icon-color, var(--w-s-color-icon-inverted));--_bg-checked:var(--w-c-checkbox-bg-checked, var(--w-s-color-background-primary));--_border-checked:var(--w-c-checkbox-border-color-checked, var(--w-s-color-border-primary));--_checked-icon:var(--w-c-checkbox-checked-icon, var(--w-icon-toggle-checked));--_border-invalid:var(--w-c-checkbox-border-color-invalid, var(--w-s-color-border-negative));--_bg-invalid-checked:var(--w-c-checkbox-bg-invalid-checked, var(--w-s-color-background-negative));--_bg-disabled:var(--w-c-checkbox-bg-disabled, var(--w-s-color-background-disabled-subtle));--_border-disabled:var(--w-c-checkbox-border-color-disabled, var(--w-s-color-border-disabled));--_bg-disabled-checked:var(--w-c-checkbox-bg-disabled-checked, var(--w-s-color-background-disabled));--_outline-width:var(--w-c-checkbox-outline-width, 2px);--_outline-color:var(--w-c-checkbox-outline-color, var(--w-s-color-border-focus));--_outline-offset:var(--w-c-checkbox-outline-offset, var(--w-outline-offset, 1px));--_transition:var(--w-c-checkbox-transition, all 150ms cubic-bezier(0.4, 0, 0.2, 1));--_bg:var(--_bg-default);--_border-color:var(--_border-default)}:host([type=checkbox]){--_radius:var(--w-c-checkbox-radius, 4px)}:host([checked]),:host([indeterminate]){--_bg:var(--_bg-checked);--_border-color:var(--_border-checked)}:host([disabled]){--_bg:var(--_bg-disabled);--_border-color:var(--_border-disabled)}:host([disabled][checked]),:host([disabled][indeterminate]){--_bg:var(--_bg-disabled-checked)}[part~=label]{display:block;font-size:var(--_label-font-size);line-height:var(--_label-line-height);user-select:none;cursor:pointer}[part=base]{display:grid;grid-template-columns:var(--_control-size) max-content;gap:var(--_gap)}[part=input]{position:absolute;padding:0;margin:0;opacity:0;pointer-events:none;inset:0}[part=control]{position:relative;display:block;height:var(--_control-size);width:var(--_control-size);flex-shrink:0;border-width:var(--_border-width);border-style:solid;border-color:var(--_border-color);border-radius:var(--_radius);background-color:var(--_bg);color:var(--_icon-color);cursor:pointer;user-select:none;appearance:none;transition:var(--_transition);font-weight:700;text-align:center;line-height:var(--w-line-height-xs);font-size:var(--w-font-size-m)}[part=control]:has(>[part=input][aria-invalid=true]:not(:disabled)){border-color:var(--_border-invalid)}[part=control]:has(>[part=input][aria-invalid=true]:is(:checked,:indeterminate):not(:disabled)){background-color:var(--_bg-invalid-checked)}:host(:focus-visible){outline:0}:host(:focus-visible) [part=control],[part=control]:has(>[part=input]:focus-visible:not(:disabled)){outline:var(--_outline-width) solid var(--_outline-color);outline-offset:var(--_outline-offset)}[part=control]:has(:checked){background-image:var(--_checked-icon);background-position:center}@media (prefers-reduced-motion:reduce){:host{--w-c-checkbox-transition:none}}`;
|
|
69
|
+
/**
|
|
70
|
+
* @license
|
|
71
|
+
* Copyright 2020 Google LLC
|
|
72
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
73
|
+
*/var Zi=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};class Qi extends(ze(ne)){constructor(){super(...arguments),this.value=null,this.indeterminate=!1,this.checked=!1,this.disabled=!1,this.required=!1,this.invalid=!1,this.#r=!1,this.#o=!1,this.#i=!1,this.#a=()=>{this.#n(),this.#s()},this.#l=e=>{this.disabled||e.defaultPrevented||" "!==e.key&&"Spacebar"!==e.key&&"Enter"!==e.key||("Enter"===e.key&&this.internals.form?this.internals.form.requestSubmit():e.composedPath()[0]!==this.input&&(e.preventDefault(),this.click()))}}static{this.styles=[De,Ki]}static{this.shadowRootOptions={...ne.shadowRootOptions,delegatesFocus:!0}}set name(e){this._ownName=e}get name(){return this._ownName||this._groupName}#r;#o;#i;get _computedInvalid(){return this.invalid||!0===this._groupInvalid}connectedCallback(){super.connectedCallback();const e=this.getAttribute("value");this.value=e??"on",this.#r=this.hasAttribute("checked"),this.checked=this.#r,this.addEventListener("invalid",this.#a),this.addEventListener("keydown",this.#l),this.#d()}handleClick(){this.disabled||(this.#n(),this.checked=!this.checked,this.indeterminate=!1,this.updateComplete.then(()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}))}#a;#l;updated(e){super.updated(e),(e.has("checked")||e.has("indeterminate"))&&this.#c(),this.#h(e)&&(this.#d(),this.#s())}resetFormControl(){this.checked=this.#r,this.#d(),this.#s()}click(){this.disabled||this.input?.click()}focus(e){this.input?.focus(e)}blur(){this.input?.blur()}get validationMessage(){return this.internals.validationMessage}get validity(){return this.internals.validity}checkValidity(){return this.#s(),this.internals.checkValidity()}reportValidity(){return this.#n(),this.#s(),this.internals.checkValidity()}#n(){this.#i=!0}#u(){return this.input?.validationMessage||" "}#p(){return this.input??void 0}#b(e){this.internals.setValidity(e,this.#u(),this.#p())}#s(){if(this.disabled)return void this.internals.setValidity({});const e=this.required&&!this.checked,t=this.invalid&&!this.#o;if(e)return this.#o=!0,this.invalid=this.#i,void this.#b({valueMissing:!0});this.#o&&(this.invalid=!1,this.#o=!1),t?this.#b({customError:!0}):this.internals.setValidity({})}#d(){if(this.disabled)return void this.setValue(null);const e=this.checked?this.value:null;this.setValue(e)}#c(){this.input&&(this.input.checked=this.checked,this.input.indeterminate=this.indeterminate)}#h(e){return e.has("checked")||e.has("value")||e.has("disabled")||e.has("required")||e.has("invalid")}render(){const e=!this.checked&&this.indeterminate,t=e?"mixed":this.checked?"true":"false";return q`<label part="base" class="wrapper"><span part="control" class="checkbox control"><input part="input" class="input hide-toggle" type="checkbox" name="${Ae(this.name||void 0)}" value="${Ae(this.value)}" .indeterminate="${Ji(this.indeterminate)}" .checked="${Ji(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${t}" aria-invalid="${Ae(this._computedInvalid?"true":void 0)}" @click="${this.handleClick}"> ${e?"–":""}</span><slot part="label"></slot></label>`}}Zi([pe('input[type="checkbox"]')],Qi.prototype,"input",void 0),Zi([ce({reflect:!0})],Qi.prototype,"name",null),Zi([ce({reflect:!0})],Qi.prototype,"value",void 0),Zi([ce({type:Boolean,reflect:!0})],Qi.prototype,"indeterminate",void 0),Zi([ce({type:Boolean,reflect:!0})],Qi.prototype,"checked",void 0),Zi([ce({type:Boolean,reflect:!0})],Qi.prototype,"disabled",void 0),Zi([ce({type:Boolean,reflect:!0})],Qi.prototype,"required",void 0),Zi([ce({type:Boolean,reflect:!0})],Qi.prototype,"invalid",void 0),Zi([ce({attribute:!1})],Qi.prototype,"_groupInvalid",void 0),Zi([ce({attribute:!1})],Qi.prototype,"_groupName",void 0);const Gi=Qi;customElements.get("w-checkbox")||customElements.define("w-checkbox",Qi);const ea=JSON.parse('{"checkbox-group.label.optional":["Valgfri"],"checkbox-group.validation.required":["Mindst én valgt mulighed er påkrævet."]}'),ta=JSON.parse('{"checkbox-group.label.optional":["Optional"],"checkbox-group.validation.required":["At least one selection is required."]}'),ra=JSON.parse('{"checkbox-group.label.optional":["Valinnainen"],"checkbox-group.validation.required":["Vähintään yksi valinta vaaditaan."]}'),oa=JSON.parse('{"checkbox-group.label.optional":["Valgfri"],"checkbox-group.validation.required":["Minst ett valg er påkrevd."]}'),ia=JSON.parse('{"checkbox-group.label.optional":["Valfritt"],"checkbox-group.validation.required":["Minst ett val krävs."]}');var aa=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};ft(ta,oa,ra,ea,ia);class na extends(ze(ne)){constructor(){super(...arguments),this.optional=!1,this.required=!1,this.invalid=!1,this.#i=!1,this.#g=!1,this._internalTabIndex=-1,this.#m=()=>{this.#n(),this.#s(),this.requestUpdate()},this.#a=()=>{this.#n(),this.#s(),this.requestUpdate()},this.#v=()=>{this.#f(),this.#s(),this.requestUpdate()},this.#w=()=>{this.requestUpdate()}}static{this.shadowRootOptions={...ne.shadowRootOptions,delegatesFocus:!0}}#i;#g;#y;static{this.styles=a`.wrapper{display:inline-flex;flex-direction:column;gap:16px}.checkbox-group{display:grid;gap:16px}.label{display:flex;align-items:center;gap:8px;font-size:var(--w-font-size-s);line-height:var(--w-line-height-s);font-weight:700;color:var(--w-s-color-text)}.optional{font-weight:400;color:var(--w-s-color-text-subtle)}.help-text{display:block;font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs);color:var(--w-s-color-text-subtle)}.error{color:var(--w-s-color-text-negative)}`}render(){const e=this.#x()>0,t=this.required&&!e&&this.#i,r=this.invalid||t,o=r?this.#k():this.helpText,i=o?"checkbox-group__help":void 0,a=this.label?"checkbox-group__label":void 0,n=r?"true":void 0;return q`<div class="wrapper" tabindex="${this._internalTabIndex}">${this.label?q`<div class="label" id="${a}"><span>${this.label}</span> ${this.optional?q`<span class="optional">${ut._({id:"checkbox-group.label.optional",message:"Optional",comment:"Shown behind label when marked as optional"})}</span>`:W}</div>`:W}<div class="checkbox-group" role="group" aria-labelledby="${Ae(a)}" aria-describedby="${Ae(i)}" aria-invalid="${Ae(n)}"><slot></slot></div>${o?q`<div class="${r?"help-text error":"help-text"}" id="${i}">${o}</div>`:W}</div>`}connectedCallback(){super.connectedCallback(),this.addEventListener("change",this.#m),this.addEventListener("invalid",this.#a),this.addEventListener("slotchange",this.#v),this.#y=ut.on("change",this.#w),this.setValue(null),this.#_()}disconnectedCallback(){this.#y?.(),this.#y=void 0,super.disconnectedCallback()}checkValidity(){return this.#s(),this.internals.checkValidity()}reportValidity(){return this.#n(),this.#s(),this.internals.checkValidity()}focus(e){const t=this.#$();t?.focus?t.focus(e):HTMLElement.prototype.focus.call(this,e)}#m;#a;#v;#n(){this.#i=!0}#w;#x(){return this.#S().filter(e=>e.checked).length}#f(){if(this.name)for(const e of this.#S()){const t=e;t&&"object"==typeof t&&!t.name&&(t._groupName=this.name)}}#E(e){for(const t of this.#S())"_groupInvalid"in t&&(t._groupInvalid=e)}#$(){return this.#S()[0]}#S(){const e=this.shadowRoot?.querySelector("slot");return e?.assignedElements({flatten:!0})??[]}#k(){return ut._({id:"checkbox-group.validation.required",message:"At least one selection is required.",comment:"Shown when required checkbox group has no selections"})}updated(e){super.updated(e),this.#C(e)&&(e.has("name")&&this.#f(),this.#s())}#C(e){return e.has("invalid")||e.has("required")||e.has("helpText")||e.has("name")}#O(e){const t=this.#$();this.internals.setValidity(e," ",t??void 0)}#z(e){this._internalTabIndex=e?0:-1}#s(){this.#_();const e=this.#x()>0,t=this.required&&!e,r=this.invalid,o=t&&this.#i,i=r||o;return this.#z(i),t?(this.#O({valueMissing:!0}),void this.#E(i)):r?(this.#O({customError:!0}),void this.#E(!0)):(this.internals.setValidity({}),void this.#E(!1))}#_(){this.#g||this.internals.form&&(this.name&&this.name.trim().length>0||(console.warn('w-checkbox-group: "name" is required for form submission.'),this.#g=!0))}}aa([ce({type:String,reflect:!0})],na.prototype,"label",void 0),aa([ce({type:String,reflect:!0})],na.prototype,"name",void 0),aa([ce({type:Boolean,reflect:!0})],na.prototype,"optional",void 0),aa([ce({type:String,reflect:!0,attribute:"help-text"})],na.prototype,"helpText",void 0),aa([ce({type:Boolean,reflect:!0})],na.prototype,"required",void 0),aa([ce({type:Boolean,reflect:!0})],na.prototype,"invalid",void 0),aa([he()],na.prototype,"_internalTabIndex",void 0);const sa=na;customElements.get("w-checkbox-group")||customElements.define("w-checkbox-group",na)
|
|
74
|
+
/**
|
|
75
|
+
* @license
|
|
76
|
+
* Copyright 2017 Google LLC
|
|
77
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
78
|
+
*/;const la=(e,t,r)=>{const o=new Map;for(let i=t;i<=r;i++)o.set(e[i],i);return o},da=fe(class extends we{constructor(e){if(super(e),e.type!==ge)throw Error("repeat() can only be used in text expressions")}dt(e,t,r){let o;void 0===r?r=t:void 0!==t&&(o=t);const i=[],a=[];let n=0;for(const t of e)i[n]=o?o(t,n):n,a[n]=r(t,n),n++;return{values:a,keys:i}}render(e,t,r){return this.dt(e,t,r).values}update(e,[t,r,o]){const i=(e=>e._$AH)(e),{values:a,keys:n}=this.dt(t,r,o);if(!Array.isArray(i))return this.ut=n,a;const s=this.ut??=[],l=[];let d,c,h=0,u=i.length-1,p=0,b=a.length-1;for(;h<=u&&p<=b;)if(null===i[h])h++;else if(null===i[u])u--;else if(s[h]===n[p])l[p]=Hi(i[h],a[p]),h++,p++;else if(s[u]===n[b])l[b]=Hi(i[u],a[b]),u--,b--;else if(s[h]===n[b])l[b]=Hi(i[h],a[b]),Wi(e,l[b+1],i[h]),h++,b--;else if(s[u]===n[p])l[p]=Hi(i[u],a[p]),Wi(e,i[h],i[u]),u--,p++;else if(void 0===d&&(d=la(n,p,b),c=la(s,h,u)),d.has(s[h]))if(d.has(s[u])){const t=c.get(n[p]),r=void 0!==t?i[t]:null;if(null===r){const t=Wi(e,i[h]);Hi(t,a[p]),l[p]=t}else l[p]=Hi(r,a[p]),Wi(e,i[h],r),i[t]=null;p++}else Ui(i[u]),u--;else Ui(i[h]),h++;for(;p<=b;){const t=Wi(e,l[b+1]);Hi(t,a[p]),l[p++]=t}for(;h<=u;){const e=i[h++];null!==e&&Ui(e)}return this.ut=n,Xi(e,l),B}}),ca=JSON.parse('{"combobox.aria.noResults":["Ingen resultater"],"combobox.aria.noSuggestions":["Ingen forslag"],"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," resultat"],"other":["#"," resultater"]}]],"combobox.aria.pluralSuggestions":[["numSuggestions","plural",{"one":["#"," forslag"],"other":["#"," forslag"]}]]}'),ha=JSON.parse('{"combobox.aria.noResults":["No results"],"combobox.aria.noSuggestions":["No suggestions"],"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," result"],"other":["#"," results"]}]],"combobox.aria.pluralSuggestions":[["numSuggestions","plural",{"one":["#"," suggestion"],"other":["#"," suggestions"]}]]}'),ua=JSON.parse('{"combobox.aria.noResults":["Ei tuloksia"],"combobox.aria.noSuggestions":["Ei ehdotuksia"],"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," tulos"],"other":["#"," tulosta"]}]],"combobox.aria.pluralSuggestions":[["numSuggestions","plural",{"one":["#"," ehdotus"],"other":["#"," ehdotusta"]}]]}'),pa=JSON.parse('{"combobox.aria.noResults":["Ingen resultater"],"combobox.aria.noSuggestions":["Ingen forslag"],"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," resultat"],"other":["#"," resultater"]}]],"combobox.aria.pluralSuggestions":[["numSuggestions","plural",{"one":["#"," forslag"],"other":["#"," forslag"]}]]}'),ba=JSON.parse('{"combobox.aria.noResults":["Inga resultat"],"combobox.aria.noSuggestions":["Inga förslag"],"combobox.aria.pluralResults":[["numResults","plural",{"one":["#"," resultat"],"other":["#"," resultat"]}]],"combobox.aria.pluralSuggestions":[["numSuggestions","plural",{"one":["#"," förslag"],"other":["#"," förslag"]}]]}'),ga=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.rounded-8{border-radius:8px}.block{display:block}.overflow-hidden{overflow:hidden}.list-none{list-style-type:none}.left-0{left:0}.right-0{right:0}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-selected{background-color:var(--w-s-color-background-selected)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-selected-hover:hover{background-color:var(--w-s-color-background-selected-hover)}.shadow-m{box-shadow:var(--w-shadow-m)}.m-0{margin:0}.p-0{padding:0}.p-8{padding:.8rem}.pb-4{padding-bottom:.4rem}.cursor-pointer{cursor:pointer}.font-bold{font-weight:700}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.select-none{-webkit-user-select:none;user-select:none}.z-20{z-index:20}`;var ma=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const va="relative z-0",fa="absolute z-20 left-0 right-0 s-bg pb-4 rounded-8 overflow-hidden shadow-m",wa="m-0 p-0 select-none list-none",ya="block cursor-pointer p-8",xa="hover:s-bg-hover",ka="s-bg-selected hover:s-bg-selected-hover",_a="font-bold",$a="sr-only";class Sa extends(ze(ne)){static{this.styles=[De,ga]}constructor(){super(),this.options=[],this.label="",this.placeholder="",this.value="",this.openOnFocus=!1,this.selectOnBlur=!0,this.matchTextSegments=!1,this.disableStaticFiltering=!1,this.invalid=!1,this.helpText="",this.disabled=!1,this.required=!1,this.optional=!1,this.name="",this.autocomplete="off",this._isOpen=!1,this._navigationOption=null,this._currentOptions=[],this._lightDomOptions=[],this._optionIdCounter=0,this._displayValue="",this.#e=null,ft(ha,pa,ua,ca,ba)}#e;#A;firstUpdated(e){this.#e=this.value}updated(e){e.has("value")&&this.setValue(this.value)}resetFormControl(){this.value=this.#e}connectedCallback(){super.connectedCallback(),this.#D(),this.#A=new MutationObserver(()=>{this.#D()}),this.#A.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["label","value"]})}disconnectedCallback(){super.disconnectedCallback(),this.#A?.disconnect()}get _listboxId(){return`${this._id}-listbox`}get _id(){return"combobox"}get _helpId(){return this.helpText?`${this._id}__hint`:void 0}get _sourceOptions(){return Array.isArray(this.options)&&this.options.length?this.options:this._lightDomOptions}get _navigationLabelOrDisplayValue(){return this._navigationOption?this._navigationOption.label||this._navigationOption.value:this._displayValue}get _navigationValueOrInputValue(){return this._navigationOption?.value||this.value}_createOptionsWithIdAndMatch(e,t){return e.map((e,r)=>({...e,id:`${this._id}-option-${this._optionIdCounter+r}`,key:e.key||e.value,currentInputValue:t}))}#P(){return Array.from(this.children).filter(e=>"option"===e.tagName.toLowerCase())}#D(){this._lightDomOptions=this.#P().map(e=>{const t=e.getAttribute("value")??"";return{value:t,label:e.hasAttribute("label")?e.getAttribute("label")??"":e.textContent??"",key:t}})}_getAriaText(e,t,r){if(!e||!r)return"";const o=e.filter(e=>(e.label||e.value).toLowerCase().includes(t.toLowerCase())),i=ut._({id:"combobox.aria.pluralSuggestions",message:"{numSuggestions, plural, one {# suggestion} other {# suggestions}}",comment:"Aria text for combobox when there are one or more suggestions",values:{numSuggestions:o.length}}),a=ut._({id:"combobox.aria.noSuggestions",message:"No suggestions",comment:"Aria text for combobox when no suggestions"});return o.length?i:a}_getOptionClasses(e){return Ee(ya,this._navigationOption?.id===e?.id?ka:xa)}_handleKeyDown(e){const t=["ArrowDown","ArrowUp","PageUp","PageDown","Home","End"].includes(e.key),r=["ArrowDown","ArrowLeft","ArrowUp","ArrowRight"];if(!t||this._isOpen){if(t&&this._isOpen)this._findAndSetActiveOption(e);else if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey))switch(e.key){case"Enter":this._navigationOption&&(e.preventDefault(),this._handleSelect(this._navigationOption),requestAnimationFrame(()=>{const e=this.shadowRoot?.querySelector("w-textfield"),t=e?.shadowRoot?.querySelector("input");t&&(t.value=this._displayValue)})),this._isOpen=!1;break;case"Tab":case"Delete":this._isOpen=!1;break;case"Escape":this._isOpen?this._isOpen=!1:this._handleChange(""),this._navigationOption=null;break;case"Backspace":this._handleChange(this._navigationLabelOrDisplayValue),this._navigationOption=null,this._isOpen=!0;break;default:if(r.includes(e.key))break;this._isOpen=!0,this._navigationOption?(this._handleChange(this._navigationOption.value),this._navigationOption=null):this._handleChange(this.value)}}else this._isOpen=!0}_findAndSetActiveOption(e){e.preventDefault();const t=this._currentOptions.findIndex(e=>e.id===this._navigationOption?.id),r=t+1,o=t-1;switch(e.key){case"ArrowDown":this._navigationOption=r>this._currentOptions.length-1?null:this._currentOptions[r];break;case"ArrowUp":this._navigationOption=-2===o?this._currentOptions[this._currentOptions.length-1]:o<0?null:this._currentOptions[o];break;case"PageUp":this._navigationOption=t-10<0?this._currentOptions[0]:this._currentOptions[t-10];break;case"PageDown":this._navigationOption=t+10>this._currentOptions.length-1?this._currentOptions[this._currentOptions.length-1]:this._currentOptions[t+10];break;case"Home":this._navigationOption=this._currentOptions[0];break;case"End":this._navigationOption=this._currentOptions[this._currentOptions.length-1]}}_handleSelect(e){this.value=e.value,this._displayValue=e.label||e.value,this.setValue(this.value);const t=new CustomEvent("select",{detail:{value:e.value},bubbles:!0,composed:!0});this.dispatchEvent(t),this._isOpen=!1,this._navigationOption=null,this.disableStaticFiltering&&(this._currentOptions=[])}_handleChange(e){if(void 0===e)return;this.value=e,this._displayValue=e;const t=new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0});this.dispatchEvent(t)}_handleFocus(){if(!this.openOnFocus)return;const e=new CustomEvent("focus",{bubbles:!0,composed:!0});this.dispatchEvent(e),this._isOpen=!0}_handleBlur(e){const t=e.relatedTarget;if(t&&this.shadowRoot?.contains(t))return;if(this._isOpen=!1,this.selectOnBlur&&(this._navigationOption||!this._navigationOption&&-1!==this._currentOptions.findIndex(e=>e.value===this.value))){const e=this._navigationOption?.value||this.value;this.value=e;const t=new CustomEvent("select",{detail:{value:e},bubbles:!0,composed:!0});this.dispatchEvent(t)}this._navigationOption=null;const r=new CustomEvent("blur",{detail:{value:this._navigationValueOrInputValue},bubbles:!0,composed:!0});this.dispatchEvent(r)}_handleOptionClick(e,t){this._handleSelect(t),requestAnimationFrame(()=>{const e=this.shadowRoot?.querySelector("w-textfield"),r=e?.shadowRoot?.querySelector("input");r&&(r.value=t.label||t.value)})}_handleContainerBlur(e){(!e.currentTarget||!e.currentTarget.contains(e.relatedTarget))&&(this._isOpen=!1)}_renderTextMatch(e,t){if(!this.matchTextSegments)return e;const r=e.toLowerCase().indexOf(t.currentInputValue.toLowerCase());if(-1!==r){const o=r+t.currentInputValue.length;return q`${e.substring(0,r)}<span class="${_a}">${e.substring(r,o)}</span>${e.substring(o)}`}return e}willUpdate(e){const t=this._sourceOptions,r=e.has("_lightDomOptions");if(e.has("value")||e.has("options")||r){const e=t.find(e=>e.value===this.value),r=e?e.label||e.value:this.value;this._displayValue!==r&&this._displayValue!==this.value&&(this._displayValue=r),!this._displayValue&&this.value&&(this._displayValue=r)}(e.has("options")||r||e.has("value")||e.has("disableStaticFiltering")||e.has("_displayValue"))&&(this._optionIdCounter+=t.length,this._currentOptions=this._createOptionsWithIdAndMatch(t,this._displayValue).filter(e=>!!this.disableStaticFiltering||(e.label||e.value).toLowerCase().includes(this._displayValue.toLowerCase()))),this.disableStaticFiltering&&this._currentOptions.length&&1===this._currentOptions.length&&!this._currentOptions.some(e=>e.value===this.value)&&!this._isOpen&&(this._isOpen=!0)}render(){return q`<div class="${Ee(va)}" @blur="${this._handleContainerBlur}"><w-textfield class="w-combobox-textfield" .value="${this._navigationLabelOrDisplayValue}" .label="${this.label}" .placeholder="${this.placeholder}" .invalid="${this.invalid}" .helpText="${this.helpText}" .disabled="${this.disabled}" .required="${this.required}" .optional="${this.optional}" .name="${this.name}" .autocomplete="${this.autocomplete||"off"}" role="combobox" aria-autocomplete="list" aria-expanded="${this._isOpen&&0!==this._currentOptions.length}" aria-activedescendant="${this._isOpen?this._navigationOption?.id:void 0}" aria-controls="${this._listboxId}" @input="${e=>this._handleChange(e?.detail?.value)}" @focus="${this._handleFocus}" @blur="${this._handleBlur}" @keydown="${this._handleKeyDown}"></w-textfield><span class="${$a}" role="status">${this._getAriaText(this._currentOptions,this._displayValue,this._isOpen)}</span><div ?hidden="${!this._isOpen||!this._currentOptions.length}" class="${Ee(fa)}"><ul id="${this._listboxId}" role="listbox" class="${wa}">${da(this._currentOptions,e=>e.key,e=>{const t=e.label||e.value;return q`<li id="${e.id}" role="option" aria-selected="${this._navigationOption?.id===e.id}" tabindex="-1" class="${this._getOptionClasses(e)}" @mousedown="${t=>this._handleOptionClick(t,e)}">${this._renderTextMatch(t,e)}</li>`})}</ul></div></div>`}}ma([ce({type:Array})],Sa.prototype,"options",void 0),ma([ce({type:String,reflect:!0,useDefault:!0})],Sa.prototype,"label",void 0),ma([ce({type:String,reflect:!0,useDefault:!0})],Sa.prototype,"placeholder",void 0),ma([ce({type:String,reflect:!0,useDefault:!0})],Sa.prototype,"value",void 0),ma([ce({type:Boolean,attribute:"open-on-focus",reflect:!0})],Sa.prototype,"openOnFocus",void 0),ma([ce({type:Boolean,attribute:"select-on-blur",reflect:!0,useDefault:!0})],Sa.prototype,"selectOnBlur",void 0),ma([ce({type:Boolean,attribute:"match-text-segments",reflect:!0})],Sa.prototype,"matchTextSegments",void 0),ma([ce({type:Boolean,attribute:"disable-static-filtering",reflect:!0})],Sa.prototype,"disableStaticFiltering",void 0),ma([ce({type:Boolean,reflect:!0})],Sa.prototype,"invalid",void 0),ma([ce({type:String,attribute:"help-text",reflect:!0,useDefault:!0})],Sa.prototype,"helpText",void 0),ma([ce({type:Boolean,reflect:!0})],Sa.prototype,"disabled",void 0),ma([ce({type:Boolean,reflect:!0})],Sa.prototype,"required",void 0),ma([ce({type:Boolean,reflect:!0})],Sa.prototype,"optional",void 0),ma([ce({type:String,reflect:!0,useDefault:!0})],Sa.prototype,"name",void 0),ma([ce({type:String,reflect:!0,useDefault:!0})],Sa.prototype,"autocomplete",void 0),ma([he()],Sa.prototype,"_isOpen",void 0),ma([he()],Sa.prototype,"_navigationOption",void 0),ma([he()],Sa.prototype,"_currentOptions",void 0),ma([he()],Sa.prototype,"_lightDomOptions",void 0),ma([he()],Sa.prototype,"_optionIdCounter",void 0),ma([he()],Sa.prototype,"_displayValue",void 0),customElements.get("w-combobox")||customElements.define("w-combobox",Sa);const Ea=6048e5,Ca=Symbol.for("constructDateFrom");function Oa(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Ca in e?e[Ca](t):e instanceof Date?new e.constructor(t):new Date(t)}function za(e,t){return Oa(t||e,e)}function Aa(e,t,r){const o=za(e,r?.in);return isNaN(t)?Oa(e,NaN):t?(o.setDate(o.getDate()+t),o):o}function Da(e,t,r){const o=za(e,r?.in);if(isNaN(t))return Oa(e,NaN);if(!t)return o;const i=o.getDate(),a=Oa(e,o.getTime());a.setMonth(o.getMonth()+t+1,0);return i>=a.getDate()?a:(o.setFullYear(a.getFullYear(),a.getMonth(),i),o)}let Pa={};function Ma(){return Pa}function Ta(e,t){const r=Ma(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=za(e,t?.in),a=i.getDay(),n=(a<o?7:0)+a-o;return i.setDate(i.getDate()-n),i.setHours(0,0,0,0),i}function ja(e,t){return Ta(e,{...t,weekStartsOn:1})}function Ra(e,t){const r=za(e,t?.in),o=r.getFullYear(),i=Oa(r,0);i.setFullYear(o+1,0,4),i.setHours(0,0,0,0);const a=ja(i),n=Oa(r,0);n.setFullYear(o,0,4),n.setHours(0,0,0,0);const s=ja(n);return r.getTime()>=a.getTime()?o+1:r.getTime()>=s.getTime()?o:o-1}function Na(e){const t=za(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Ia(e,...t){const r=Oa.bind(null,e||t.find(e=>"object"==typeof e));return t.map(r)}function Va(e,t){const r=za(e,t?.in);return r.setHours(0,0,0,0),r}function Fa(e,t,r){const[o,i]=Ia(r?.in,e,t),a=Va(o),n=Va(i),s=+a-Na(a),l=+n-Na(n);return Math.round((s-l)/864e5)}function La(e,t,r){return Aa(e,7*t,r)}function qa(e,t,r){const[o,i]=Ia(r?.in,e,t);return+Va(o)===+Va(i)}function Ba(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+za(e)));var t}function Wa(e,t){const[r,o]=Ia(e,t.start,t.end);return{start:r,end:o}}function Ha(e,t){const r=za(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function Ya(e,t){const r=Ma(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=za(e,t?.in),a=i.getDay(),n=6+(a<o?-7:0)-(a-o);return i.setDate(i.getDate()+n),i.setHours(23,59,59,999),i}const Xa={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ua=(e,t,r)=>{let o;const i=Xa[e];return o="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function Ja(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Ka={date:Ja({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Ja({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Ja({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Za={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Qa=(e,t,r,o)=>Za[e];function Ga(e){return(t,r)=>{let o;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=r?.width?String(r.width):t;o=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=r?.width?String(r.width):e.defaultWidth;o=e.values[i]||e.values[t]}return o[e.argumentCallback?e.argumentCallback(t):t]}}const en={ordinalNumber:(e,t)=>{const r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:Ga({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ga({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ga({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Ga({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Ga({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function tn(e){return(t,r={})=>{const o=r.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const n=a[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(s,e=>e.test(n)):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(s,e=>e.test(n));let d;d=e.valueCallback?e.valueCallback(l):l,d=r.valueCallback?r.valueCallback(d):d;return{value:d,rest:t.slice(n.length)}}}function rn(e){return(t,r={})=>{const o=t.match(e.matchPattern);if(!o)return null;const i=o[0],a=t.match(e.parsePattern);if(!a)return null;let n=e.valueCallback?e.valueCallback(a[0]):a[0];n=r.valueCallback?r.valueCallback(n):n;return{value:n,rest:t.slice(i.length)}}}const on={ordinalNumber:rn({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:tn({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:tn({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:tn({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:tn({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:tn({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},an={code:"en-US",formatDistance:Ua,formatLong:Ka,formatRelative:Qa,localize:en,match:on,options:{weekStartsOn:0,firstWeekContainsDate:1}};function nn(e,t){const r=za(e,t?.in),o=Fa(r,function(e,t){const r=za(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}(r));return o+1}function sn(e,t){const r=za(e,t?.in),o=+ja(r)-+function(e,t){const r=Ra(e,t),o=Oa(e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),ja(o)}(r);return Math.round(o/Ea)+1}function ln(e,t){const r=za(e,t?.in),o=r.getFullYear(),i=Ma(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,n=Oa(t?.in||e,0);n.setFullYear(o+1,0,a),n.setHours(0,0,0,0);const s=Ta(n,t),l=Oa(t?.in||e,0);l.setFullYear(o,0,a),l.setHours(0,0,0,0);const d=Ta(l,t);return+r>=+s?o+1:+r>=+d?o:o-1}function dn(e,t){const r=za(e,t?.in),o=+Ta(r,t)-+function(e,t){const r=Ma(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=ln(e,t),a=Oa(t?.in||e,0);return a.setFullYear(i,0,o),a.setHours(0,0,0,0),Ta(a,t)}(r,t);return Math.round(o/Ea)+1}function cn(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const hn={y(e,t){const r=e.getFullYear(),o=r>0?r:1-r;return cn("yy"===t?o%100:o,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):cn(r+1,2)},d:(e,t)=>cn(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>cn(e.getHours()%12||12,t.length),H:(e,t)=>cn(e.getHours(),t.length),m:(e,t)=>cn(e.getMinutes(),t.length),s:(e,t)=>cn(e.getSeconds(),t.length),S(e,t){const r=t.length,o=e.getMilliseconds();return cn(Math.trunc(o*Math.pow(10,r-3)),t.length)}},un="midnight",pn="noon",bn="morning",gn="afternoon",mn="evening",vn="night",fn={G:function(e,t,r){const o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),o=t>0?t:1-t;return r.ordinalNumber(o,{unit:"year"})}return hn.y(e,t)},Y:function(e,t,r,o){const i=ln(e,o),a=i>0?i:1-i;if("YY"===t){return cn(a%100,2)}return"Yo"===t?r.ordinalNumber(a,{unit:"year"}):cn(a,t.length)},R:function(e,t){return cn(Ra(e),t.length)},u:function(e,t){return cn(e.getFullYear(),t.length)},Q:function(e,t,r){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return cn(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return cn(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){const o=e.getMonth();switch(t){case"M":case"MM":return hn.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){const o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return cn(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){const i=dn(e,o);return"wo"===t?r.ordinalNumber(i,{unit:"week"}):cn(i,t.length)},I:function(e,t,r){const o=sn(e);return"Io"===t?r.ordinalNumber(o,{unit:"week"}):cn(o,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):hn.d(e,t)},D:function(e,t,r){const o=nn(e);return"Do"===t?r.ordinalNumber(o,{unit:"dayOfYear"}):cn(o,t.length)},E:function(e,t,r){const o=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){const i=e.getDay(),a=(i-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return cn(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){const i=e.getDay(),a=(i-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return cn(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){const o=e.getDay(),i=0===o?7:o;switch(t){case"i":return String(i);case"ii":return cn(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){const o=e.getHours();let i;switch(i=12===o?pn:0===o?un:o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){const o=e.getHours();let i;switch(i=o>=17?mn:o>=12?gn:o>=4?bn:vn,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return hn.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):hn.H(e,t)},K:function(e,t,r){const o=e.getHours()%12;return"Ko"===t?r.ordinalNumber(o,{unit:"hour"}):cn(o,t.length)},k:function(e,t,r){let o=e.getHours();return 0===o&&(o=24),"ko"===t?r.ordinalNumber(o,{unit:"hour"}):cn(o,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):hn.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):hn.s(e,t)},S:function(e,t){return hn.S(e,t)},X:function(e,t,r){const o=e.getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return yn(o);case"XXXX":case"XX":return xn(o);default:return xn(o,":")}},x:function(e,t,r){const o=e.getTimezoneOffset();switch(t){case"x":return yn(o);case"xxxx":case"xx":return xn(o);default:return xn(o,":")}},O:function(e,t,r){const o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wn(o,":");default:return"GMT"+xn(o,":")}},z:function(e,t,r){const o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wn(o,":");default:return"GMT"+xn(o,":")}},t:function(e,t,r){return cn(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return cn(+e,t.length)}};function wn(e,t=""){const r=e>0?"-":"+",o=Math.abs(e),i=Math.trunc(o/60),a=o%60;return 0===a?r+String(i):r+String(i)+t+cn(a,2)}function yn(e,t){if(e%60==0){return(e>0?"-":"+")+cn(Math.abs(e)/60,2)}return xn(e,t)}function xn(e,t=""){const r=e>0?"-":"+",o=Math.abs(e);return r+cn(Math.trunc(o/60),2)+t+cn(o%60,2)}const kn=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},_n=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},$n={p:_n,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return kn(e,t);let a;switch(o){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",kn(o,t)).replace("{{time}}",_n(i,t))}},Sn=/^D+$/,En=/^Y+$/,Cn=["D","DD","YY","YYYY"];const On=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,An=/^'([^]*?)'?$/,Dn=/''/g,Pn=/[a-zA-Z]/;function Mn(e,t,r){const o=Ma(),i=r?.locale??o.locale??an,a=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,s=za(e,r?.in);if(!Ba(s))throw new RangeError("Invalid time value");let l=t.match(zn).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,$n[t])(e,i.formatLong)}return e}).join("").match(On).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Tn(e)};if(fn[t])return{isToken:!0,value:e};if(t.match(Pn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const d={firstWeekContainsDate:a,weekStartsOn:n,locale:i};return l.map(o=>{if(!o.isToken)return o.value;const a=o.value;(!r?.useAdditionalWeekYearTokens&&function(e){return En.test(e)}(a)||!r?.useAdditionalDayOfYearTokens&&function(e){return Sn.test(e)}(a))&&function(e,t,r){const o=function(e,t,r){const o="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(o),Cn.includes(e))throw new RangeError(o)}(a,t,String(e));return(0,fn[a[0]])(s,a,i.localize,d)}).join("")}function Tn(e){const t=e.match(An);return t?t[1].replace(Dn,"'"):e}function jn(e,t){return za(e,t?.in).getDate()}function Rn(e,t){const r=Ma(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=jn(za(e,t?.in));if(isNaN(i))return NaN;const a=function(e,t){return za(e,t?.in).getDay()}(Ha(e,t));let n=o-a;n<=0&&(n+=7);const s=i-n;return Math.ceil(s/7)+1}function Nn(e,t){const r=za(e,t?.in),o=r.getMonth();return r.setFullYear(r.getFullYear(),o+1,0),r.setHours(0,0,0,0),za(r,t?.in)}function In(e,t,r){const[o,i]=Ia(r?.in,e,t);return o.getFullYear()===i.getFullYear()&&o.getMonth()===i.getMonth()}function Vn(e,t){return qa(Oa(e,e),function(e){return Oa(e,Date.now())}(e))}function Fn(e,t,r){return Aa(e,-t,r)}function Ln(e,t,r){return Da(e,-1,r)}const qn={lessThanXSeconds:{one:"mindre end ét sekund",other:"mindre end {{count}} sekunder"},xSeconds:{one:"1 sekund",other:"{{count}} sekunder"},halfAMinute:"ét halvt minut",lessThanXMinutes:{one:"mindre end ét minut",other:"mindre end {{count}} minutter"},xMinutes:{one:"1 minut",other:"{{count}} minutter"},aboutXHours:{one:"cirka 1 time",other:"cirka {{count}} timer"},xHours:{one:"1 time",other:"{{count}} timer"},xDays:{one:"1 dag",other:"{{count}} dage"},aboutXWeeks:{one:"cirka 1 uge",other:"cirka {{count}} uger"},xWeeks:{one:"1 uge",other:"{{count}} uger"},aboutXMonths:{one:"cirka 1 måned",other:"cirka {{count}} måneder"},xMonths:{one:"1 måned",other:"{{count}} måneder"},aboutXYears:{one:"cirka 1 år",other:"cirka {{count}} år"},xYears:{one:"1 år",other:"{{count}} år"},overXYears:{one:"over 1 år",other:"over {{count}} år"},almostXYears:{one:"næsten 1 år",other:"næsten {{count}} år"}},Bn={date:Ja({formats:{full:"EEEE 'den' d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:Ja({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Ja({formats:{full:"{{date}} 'kl'. {{time}}",long:"{{date}} 'kl'. {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Wn={lastWeek:"'sidste' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"'på' eeee 'kl.' p",other:"P"},Hn={code:"da",formatDistance:(e,t,r)=>{let o;const i=qn[e];return o="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),r?.addSuffix?r.comparison&&r.comparison>0?"om "+o:o+" siden":o},formatLong:Bn,formatRelative:(e,t,r,o)=>Wn[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Ga({values:{narrow:["fvt","vt"],abbreviated:["f.v.t.","v.t."],wide:["før vesterlandsk tidsregning","vesterlandsk tidsregning"]},defaultWidth:"wide"}),quarter:Ga({values:{narrow:["1","2","3","4"],abbreviated:["1. kvt.","2. kvt.","3. kvt.","4. kvt."],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ga({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mar.","apr.","maj","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"]},defaultWidth:"wide"}),day:Ga({values:{narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn.","man.","tir.","ons.","tor.","fre.","lør."],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},defaultWidth:"wide"}),dayPeriod:Ga({values:{narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:rn({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:tn({matchPatterns:{narrow:/^(fKr|fvt|eKr|vt)/i,abbreviated:/^(f\.Kr\.?|f\.v\.t\.?|e\.Kr\.?|v\.t\.)/i,wide:/^(f.Kr.|før vesterlandsk tidsregning|e.Kr.|vesterlandsk tidsregning)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^(v|e)/i]},defaultParseWidth:"any"}),quarter:tn({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234]. kvt\./i,wide:/^[1234]\.? kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:tn({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mar.|apr.|maj|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:tn({matchPatterns:{narrow:/^[smtofl]/i,short:/^(søn.|man.|tir.|ons.|tor.|fre.|lør.)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^o/i,/^t/i,/^f/i,/^l/i],any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:tn({matchPatterns:{narrow:/^(a|p|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,any:/^([ap]\.?\s?m\.?|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/midnat/i,noon:/middag/i,morning:/morgen/i,afternoon:/eftermiddag/i,evening:/aften/i,night:/nat/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Yn={code:"en-GB",formatDistance:Ua,formatLong:{date:Ja({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:Ja({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Ja({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:Qa,localize:en,match:on,options:{weekStartsOn:1,firstWeekContainsDate:4}};function Xn(e){return e.replace(/sekuntia?/,"sekunnin")}function Un(e){return e.replace(/minuuttia?/,"minuutin")}function Jn(e){return e.replace(/tuntia?/,"tunnin")}function Kn(e){return e.replace(/(viikko|viikkoa)/,"viikon")}function Zn(e){return e.replace(/(kuukausi|kuukautta)/,"kuukauden")}function Qn(e){return e.replace(/(vuosi|vuotta)/,"vuoden")}const Gn={lessThanXSeconds:{one:"alle sekunti",other:"alle {{count}} sekuntia",futureTense:Xn},xSeconds:{one:"sekunti",other:"{{count}} sekuntia",futureTense:Xn},halfAMinute:{one:"puoli minuuttia",other:"puoli minuuttia",futureTense:e=>"puolen minuutin"},lessThanXMinutes:{one:"alle minuutti",other:"alle {{count}} minuuttia",futureTense:Un},xMinutes:{one:"minuutti",other:"{{count}} minuuttia",futureTense:Un},aboutXHours:{one:"noin tunti",other:"noin {{count}} tuntia",futureTense:Jn},xHours:{one:"tunti",other:"{{count}} tuntia",futureTense:Jn},xDays:{one:"päivä",other:"{{count}} päivää",futureTense:function(e){return e.replace(/päivää?/,"päivän")}},aboutXWeeks:{one:"noin viikko",other:"noin {{count}} viikkoa",futureTense:Kn},xWeeks:{one:"viikko",other:"{{count}} viikkoa",futureTense:Kn},aboutXMonths:{one:"noin kuukausi",other:"noin {{count}} kuukautta",futureTense:Zn},xMonths:{one:"kuukausi",other:"{{count}} kuukautta",futureTense:Zn},aboutXYears:{one:"noin vuosi",other:"noin {{count}} vuotta",futureTense:Qn},xYears:{one:"vuosi",other:"{{count}} vuotta",futureTense:Qn},overXYears:{one:"yli vuosi",other:"yli {{count}} vuotta",futureTense:Qn},almostXYears:{one:"lähes vuosi",other:"lähes {{count}} vuotta",futureTense:Qn}},es={date:Ja({formats:{full:"eeee d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"d.M.y"},defaultWidth:"full"}),time:Ja({formats:{full:"HH.mm.ss zzzz",long:"HH.mm.ss z",medium:"HH.mm.ss",short:"HH.mm"},defaultWidth:"full"}),dateTime:Ja({formats:{full:"{{date}} 'klo' {{time}}",long:"{{date}} 'klo' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},ts={lastWeek:"'viime' eeee 'klo' p",yesterday:"'eilen klo' p",today:"'tänään klo' p",tomorrow:"'huomenna klo' p",nextWeek:"'ensi' eeee 'klo' p",other:"P"},rs={narrow:["T","H","M","H","T","K","H","E","S","L","M","J"],abbreviated:["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu"],wide:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"]},os={narrow:rs.narrow,abbreviated:rs.abbreviated,wide:["tammikuuta","helmikuuta","maaliskuuta","huhtikuuta","toukokuuta","kesäkuuta","heinäkuuta","elokuuta","syyskuuta","lokakuuta","marraskuuta","joulukuuta"]},is={narrow:["S","M","T","K","T","P","L"],short:["su","ma","ti","ke","to","pe","la"],abbreviated:["sunn.","maan.","tiis.","kesk.","torst.","perj.","la"],wide:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},as={narrow:is.narrow,short:is.short,abbreviated:is.abbreviated,wide:["sunnuntaina","maanantaina","tiistaina","keskiviikkona","torstaina","perjantaina","lauantaina"]},ns={code:"fi",formatDistance:(e,t,r)=>{const o=Gn[e],i=1===t?o.one:o.other.replace("{{count}}",String(t));return r?.addSuffix?r.comparison&&r.comparison>0?o.futureTense(i)+" kuluttua":i+" sitten":i},formatLong:es,formatRelative:(e,t,r,o)=>ts[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Ga({values:{narrow:["eaa.","jaa."],abbreviated:["eaa.","jaa."],wide:["ennen ajanlaskun alkua","jälkeen ajanlaskun alun"]},defaultWidth:"wide"}),quarter:Ga({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartaali","2. kvartaali","3. kvartaali","4. kvartaali"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ga({values:rs,defaultWidth:"wide",formattingValues:os,defaultFormattingWidth:"wide"}),day:Ga({values:is,defaultWidth:"wide",formattingValues:as,defaultFormattingWidth:"wide"}),dayPeriod:Ga({values:{narrow:{am:"ap",pm:"ip",midnight:"keskiyö",noon:"keskipäivä",morning:"ap",afternoon:"ip",evening:"illalla",night:"yöllä"},abbreviated:{am:"ap",pm:"ip",midnight:"keskiyö",noon:"keskipäivä",morning:"ap",afternoon:"ip",evening:"illalla",night:"yöllä"},wide:{am:"ap",pm:"ip",midnight:"keskiyöllä",noon:"keskipäivällä",morning:"aamupäivällä",afternoon:"iltapäivällä",evening:"illalla",night:"yöllä"}},defaultWidth:"wide"})},match:{ordinalNumber:rn({matchPattern:/^(\d+)(\.)/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:tn({matchPatterns:{narrow:/^(e|j)/i,abbreviated:/^(eaa.|jaa.)/i,wide:/^(ennen ajanlaskun alkua|jälkeen ajanlaskun alun)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^e/i,/^j/i]},defaultParseWidth:"any"}),quarter:tn({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]\.? kvartaali/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:tn({matchPatterns:{narrow:/^[thmkeslj]/i,abbreviated:/^(tammi|helmi|maalis|huhti|touko|kesä|heinä|elo|syys|loka|marras|joulu)/i,wide:/^(tammikuu|helmikuu|maaliskuu|huhtikuu|toukokuu|kesäkuu|heinäkuu|elokuu|syyskuu|lokakuu|marraskuu|joulukuu)(ta)?/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^t/i,/^h/i,/^m/i,/^h/i,/^t/i,/^k/i,/^h/i,/^e/i,/^s/i,/^l/i,/^m/i,/^j/i],any:[/^ta/i,/^hel/i,/^maa/i,/^hu/i,/^to/i,/^k/i,/^hei/i,/^e/i,/^s/i,/^l/i,/^mar/i,/^j/i]},defaultParseWidth:"any"}),day:tn({matchPatterns:{narrow:/^[smtkpl]/i,short:/^(su|ma|ti|ke|to|pe|la)/i,abbreviated:/^(sunn.|maan.|tiis.|kesk.|torst.|perj.|la)/i,wide:/^(sunnuntai|maanantai|tiistai|keskiviikko|torstai|perjantai|lauantai)(na)?/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^k/i,/^t/i,/^p/i,/^l/i],any:[/^s/i,/^m/i,/^ti/i,/^k/i,/^to/i,/^p/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:tn({matchPatterns:{narrow:/^(ap|ip|keskiyö|keskipäivä|aamupäivällä|iltapäivällä|illalla|yöllä)/i,any:/^(ap|ip|keskiyöllä|keskipäivällä|aamupäivällä|iltapäivällä|illalla|yöllä)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^ap/i,pm:/^ip/i,midnight:/^keskiyö/i,noon:/^keskipäivä/i,morning:/aamupäivällä/i,afternoon:/iltapäivällä/i,evening:/illalla/i,night:/yöllä/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},ss={lessThanXSeconds:{one:"mindre enn ett sekund",other:"mindre enn {{count}} sekunder"},xSeconds:{one:"ett sekund",other:"{{count}} sekunder"},halfAMinute:"et halvt minutt",lessThanXMinutes:{one:"mindre enn ett minutt",other:"mindre enn {{count}} minutter"},xMinutes:{one:"ett minutt",other:"{{count}} minutter"},aboutXHours:{one:"omtrent en time",other:"omtrent {{count}} timer"},xHours:{one:"en time",other:"{{count}} timer"},xDays:{one:"en dag",other:"{{count}} dager"},aboutXWeeks:{one:"omtrent en uke",other:"omtrent {{count}} uker"},xWeeks:{one:"en uke",other:"{{count}} uker"},aboutXMonths:{one:"omtrent en måned",other:"omtrent {{count}} måneder"},xMonths:{one:"en måned",other:"{{count}} måneder"},aboutXYears:{one:"omtrent ett år",other:"omtrent {{count}} år"},xYears:{one:"ett år",other:"{{count}} år"},overXYears:{one:"over ett år",other:"over {{count}} år"},almostXYears:{one:"nesten ett år",other:"nesten {{count}} år"}},ls={date:Ja({formats:{full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},defaultWidth:"full"}),time:Ja({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Ja({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},ds={lastWeek:"'forrige' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},cs={code:"nb",formatDistance:(e,t,r)=>{let o;const i=ss[e];return o="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),r?.addSuffix?r.comparison&&r.comparison>0?"om "+o:o+" siden":o},formatLong:ls,formatRelative:(e,t,r,o)=>ds[e],localize:{ordinalNumber:(e,t)=>Number(e)+".",era:Ga({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["før Kristus","etter Kristus"]},defaultWidth:"wide"}),quarter:Ga({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ga({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","mai","juni","juli","aug.","sep.","okt.","nov.","des."],wide:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"]},defaultWidth:"wide"}),day:Ga({values:{narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn","man","tir","ons","tor","fre","lør"],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},defaultWidth:"wide"}),dayPeriod:Ga({values:{narrow:{am:"a",pm:"p",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morgenen",afternoon:"på ettermiddagen",evening:"på kvelden",night:"på natten"}},defaultWidth:"wide"})},match:{ordinalNumber:rn({matchPattern:/^(\d+)\.?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:tn({matchPatterns:{narrow:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,abbreviated:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,wide:/^(før Kristus|før vår tid|etter Kristus|vår tid)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^e/i]},defaultParseWidth:"any"}),quarter:tn({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? kvartal/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:tn({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,wide:/^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^aug/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:tn({matchPatterns:{narrow:/^[smtofl]/i,short:/^(sø|ma|ti|on|to|fr|lø)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:tn({matchPatterns:{narrow:/^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,any:/^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a(\.?\s?m\.?)?$/i,pm:/^p(\.?\s?m\.?)?$/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgen/i,afternoon:/ettermiddag/i,evening:/kveld/i,night:/natt/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},hs={lessThanXSeconds:{one:"mindre än en sekund",other:"mindre än {{count}} sekunder"},xSeconds:{one:"en sekund",other:"{{count}} sekunder"},halfAMinute:"en halv minut",lessThanXMinutes:{one:"mindre än en minut",other:"mindre än {{count}} minuter"},xMinutes:{one:"en minut",other:"{{count}} minuter"},aboutXHours:{one:"ungefär en timme",other:"ungefär {{count}} timmar"},xHours:{one:"en timme",other:"{{count}} timmar"},xDays:{one:"en dag",other:"{{count}} dagar"},aboutXWeeks:{one:"ungefär en vecka",other:"ungefär {{count}} veckor"},xWeeks:{one:"en vecka",other:"{{count}} veckor"},aboutXMonths:{one:"ungefär en månad",other:"ungefär {{count}} månader"},xMonths:{one:"en månad",other:"{{count}} månader"},aboutXYears:{one:"ungefär ett år",other:"ungefär {{count}} år"},xYears:{one:"ett år",other:"{{count}} år"},overXYears:{one:"över ett år",other:"över {{count}} år"},almostXYears:{one:"nästan ett år",other:"nästan {{count}} år"}},us=["noll","en","två","tre","fyra","fem","sex","sju","åtta","nio","tio","elva","tolv"],ps={date:Ja({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"y-MM-dd"},defaultWidth:"full"}),time:Ja({formats:{full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Ja({formats:{full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},bs={lastWeek:"'i' EEEE's kl.' p",yesterday:"'igår kl.' p",today:"'idag kl.' p",tomorrow:"'imorgon kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},gs={ordinalNumber:(e,t)=>{const r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:case 2:return r+":a"}return r+":e"},era:Ga({values:{narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["före Kristus","efter Kristus"]},defaultWidth:"wide"}),quarter:Ga({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1:a kvartalet","2:a kvartalet","3:e kvartalet","4:e kvartalet"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ga({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","maj","juni","juli","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]},defaultWidth:"wide"}),day:Ga({values:{narrow:["S","M","T","O","T","F","L"],short:["sö","må","ti","on","to","fr","lö"],abbreviated:["sön","mån","tis","ons","tors","fre","lör"],wide:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"]},defaultWidth:"wide"}),dayPeriod:Ga({values:{narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"morg.",afternoon:"efterm.",evening:"kväll",night:"natt"},abbreviated:{am:"f.m.",pm:"e.m.",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"efterm.",evening:"kväll",night:"natt"},wide:{am:"förmiddag",pm:"eftermiddag",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"eftermiddag",evening:"kväll",night:"natt"}},defaultWidth:"wide",formattingValues:{narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på efterm.",evening:"på kvällen",night:"på natten"},abbreviated:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på efterm.",evening:"på kvällen",night:"på natten"},wide:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"på morgonen",afternoon:"på eftermiddagen",evening:"på kvällen",night:"på natten"}},defaultFormattingWidth:"wide"})},ms={code:"sv",formatDistance:(e,t,r)=>{let o;const i=hs[e];return o="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t<13?us[t]:String(t)),r?.addSuffix?r.comparison&&r.comparison>0?"om "+o:o+" sedan":o},formatLong:ps,formatRelative:(e,t,r,o)=>bs[e],localize:gs,match:{ordinalNumber:rn({matchPattern:/^(\d+)(:a|:e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:tn({matchPatterns:{narrow:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,abbreviated:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,wide:/^(före Kristus|före vår tid|efter Kristus|vår tid)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^f/i,/^[ev]/i]},defaultParseWidth:"any"}),quarter:tn({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](:a|:e)? kvartalet/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:tn({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar[s]?|apr|maj|jun[i]?|jul[i]?|aug|sep|okt|nov|dec)\.?/i,wide:/^(januari|februari|mars|april|maj|juni|juli|augusti|september|oktober|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:tn({matchPatterns:{narrow:/^[smtofl]/i,short:/^(sö|må|ti|on|to|fr|lö)/i,abbreviated:/^(sön|mån|tis|ons|tors|fre|lör)/i,wide:/^(söndag|måndag|tisdag|onsdag|torsdag|fredag|lördag)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},defaultParseWidth:"any"}),dayPeriod:tn({matchPatterns:{any:/^([fe]\.?\s?m\.?|midn(att)?|midd(ag)?|(på) (morgonen|eftermiddagen|kvällen|natten))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^f/i,pm:/^e/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgon/i,afternoon:/eftermiddag/i,evening:/kväll/i,night:/natt/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},vs="important",fs=" !"+vs,ws=fe(class extends we{constructor(e){if(super(e),e.type!==be||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,r)=>{const o=e[r];return null==o?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(e,[t]){const{style:r}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?r.removeProperty(e):r[e]=null);for(const e in t){const o=t[e];if(null!=o){this.ft.add(e);const t="string"==typeof o&&o.endsWith(fs);e.includes("-")||t?r.setProperty(e,t?o.slice(0,-11):o,t?vs:""):r[e]=o}}return B}}),ys=JSON.parse('{"datepicker.calendar.nextMonth":["Next month"],"datepicker.calendar.previousMonth":["Previous month"],"datepicker.calendar.roleDescription":["Date picker"],"datepicker.toggle.changeDate":["Change date, ",["currentDate"]],"datepicker.toggle.chooseDate":["Choose date"]}'),xs=JSON.parse('{"datepicker.calendar.nextMonth":["Next month"],"datepicker.calendar.previousMonth":["Previous month"],"datepicker.calendar.roleDescription":["Date picker"],"datepicker.toggle.changeDate":["Change date, ",["currentDate"]],"datepicker.toggle.chooseDate":["Choose date"]}'),ks=JSON.parse('{"datepicker.calendar.nextMonth":["Next month"],"datepicker.calendar.previousMonth":["Previous month"],"datepicker.calendar.roleDescription":["Date picker"],"datepicker.toggle.changeDate":["Change date, ",["currentDate"]],"datepicker.toggle.chooseDate":["Choose date"]}'),_s=JSON.parse('{"datepicker.calendar.nextMonth":["Gå til neste måned"],"datepicker.calendar.previousMonth":["Gå til forrige måned"],"datepicker.calendar.roleDescription":["datovelger"],"datepicker.toggle.changeDate":["Endre dato, ",["currentDate"]],"datepicker.toggle.chooseDate":["Velg dato"]}'),$s=JSON.parse('{"datepicker.calendar.nextMonth":["Next month"],"datepicker.calendar.previousMonth":["Previous month"],"datepicker.calendar.roleDescription":["Date picker"],"datepicker.toggle.changeDate":["Change date, ",["currentDate"]],"datepicker.toggle.chooseDate":["Choose date"]}'),Ss=a`.w-datepicker-wrapper{position:relative;display:inline-block;width:100%;font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.w-datepicker-input-wrapper{position:relative}.w-datepicker-input{-webkit-appearance:none;-moz-appearance:textfield;appearance:none;display:block;padding:1.2rem .8rem;border:1px solid #ccc;border-radius:4px;width:100%;height:48px;cursor:pointer;font-size:var(--w-font-size-m);line-height:var(--w-line-height-m);background-color:var(--w-s-color-background)}.w-datepicker-input:hover{border-color:var(--w-s-color-border-hover)}.w-datepicker-input:active{border-color:var(--w-s-color-border-selected)}.w-datepicker-input:focus,.w-datepicker-input:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:-2px}.w-datepicker-input-label{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s);font-weight:700;cursor:pointer;padding-bottom:.4rem;color:var(--w-s-color-text);display:block}.w-datepicker-button{--padding-x:14px;--padding-y:14px;--border-radius:2px;position:absolute;right:2px;top:2px;pointer-events:auto}input[type=date]::-webkit-calendar-picker-indicator,input[type=date]::-webkit-inner-spin-button{display:none;-webkit-appearance:none}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:none;-moz-appearance:none;appearance:none}.w-dropdown__popover{position:absolute;width:max-content;background-color:var(--w-s-color-background);box-shadow:var(--w-shadow-s);z-index:100;border-radius:8px;visibility:hidden}.w-dropdown__popover--open{visibility:visible}`,Es=a`.w-datepicker__calendar{--_calendar-border-color:var(--calendar-border-color, initial);--_calendar-border-style:var(--calendar-border-style, none);--_calendar-border-width:var(--calendar-border-width, 0);--_calendar-border-radius:var(--calendar-border-radius, 0);position:relative;z-index:30;border:var(--_calendar-border-width) var(--_calendar-border-style) var(--_calendar-border-color);border-radius:var(--_calendar-border-radius);padding:16px}`,Cs=a`.w-datepicker__day{--_day-in-range-background:var(--day-in-range-background, var(--w-s-color-background-primary-subtle-active));text-align:center;cursor:pointer;outline:0;position:relative;color:var(--day-color,var(--w-s-color-text));background-color:var(--day-background,transparent);width:var(--day-width,40px);height:var(--day-height,40px);padding:var(--day-padding,0);font-weight:var(--day-font-weight,normal);font-size:var(--w-font-size-s);line-height:var(--w-line-height-s);border-radius:var(--day-border-radius,50%)}.w-datepicker__day:hover{--day-color:var(--w-s-color-text);--day-background:var(--w-s-color-background-hover);--day-border-radius:50%}.w-datepicker__day:active{--day-color:var(--w-s-color-text);--day-background:var(--w-s-color-background-active);--day-border-radius:50%}.w-datepicker__day:focus-visible{text-decoration:none;outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,-2px)}.w-datepicker__day--today{--day-font-weight:bold}.w-datepicker__day--selected{--day-background:var(--w-s-color-background-primary);--day-color:var(--w-s-color-text-inverted);--day-font-weight:bold}.w-datepicker__day--selected:focus-visible,.w-datepicker__day--selected:hover{--day-background:var(--w-s-color-background-primary-hover);--day-color:var(--w-s-color-text-inverted);--day-font-weight:bold}.w-datepicker__day--disabled,.w-datepicker__day--disabled:hover{--day-color:var(--w-s-color-text-disabled);cursor:not-allowed;pointer-events:none}`,Os=a`.w-datepicker__month{--day-width:40px;--_month-color:var(--month-color, var(--w-s-color-text));--_month-font-size:var(--month-font-size, var(--w-font-size-m));--_month-line-height:var(--month-line-height, var(--w-line-height-m));--_month-table-min-width:var(--month-table-min-width, calc(var(--day-width) * 7));--_weekdays-font-size:var(--weekdays-font-size, var(--w-font-size-xs));--_weekdays-line-height:var(--weekdays-font-size, var(--w-line-height-xs));--_weekdays-font-weight:var(--weekdays-font-weight, bold);--_weekdays-padding:var(--weekdays-padding, 8px 0 4px 0);text-align:center;user-select:none;display:inline-block;color:var(--_month-color);font-size:var(--_month-font-size);line-height:var(--_month-line-height)}.w-datepicker__month__nav{margin:0 0 8px 0}.w-datepicker__month__nav__header{text-align:center;font-weight:Bold}.w-datepicker__table{width:100%;border-spacing:0;border-collapse:collapse;display:block;min-width:var(--_month-table-min-width);padding-top:8px}.w-datepicker__weekday{text-align:center;font-size:var(--_weekdays-font-size);line-height:var(--_weekdays-line-height);font-weight:var(--_weekdays-font-weight);padding:var(--_weekdays-padding)}.w-datepicker__month-nav{display:flex;align-items:center;justify-content:space-between;width:100%}.w-datepicker__month__nav__button{flex-shrink:0}.w-datepicker__month__nav__header{flex:1;display:flex;align-items:center;justify-content:center;text-align:center}`,zs=/^\d{4}-\d{2}-\d{2}$/;function As(e){if("string"!=typeof e)return null;let t=e;zs.test(e)&&(t=`${e}T00:00:00Z`);const r=Date.parse(t);return Number.isNaN(r)?null:new Date(r)}var Ds=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const Ps="undefined"!=typeof navigator?navigator.userAgent:"",Ms=/iP(hone|od|ad)/.test(Ps)?"text":"date",Ts="calendar",js="input",Rs="toggle",Ns="wrapper",Is="previous",Vs={en:Yn,nb:cs,sv:ms,da:Hn,fi:ns};class Fs extends(ze(ne)){static{this.shadowRootOptions={...ne.shadowRootOptions,delegatesFocus:!0}}static{this.styles=[De,Ss,Es,Cs,Os]}get selectedDate(){return As(this.value)??null}get month(){return Ha(this.navigationDate)}#e;get weeks(){const e=this.month,t=this.navigationDate,r=function(e,t){const{start:r,end:o}=Wa(t?.in,e);let i=+r>+o;const a=Ta(i?o:r,t),n=Ta(i?r:o,t);a.setHours(15),n.setHours(15);const s=+n.getTime();let l=a,d=t?.step??1;if(!d)return[];d<0&&(d=-d,i=!i);const c=[];for(;+l<=s;)l.setHours(0),c.push(Oa(r,l)),l=La(l,d),l.setHours(15);return i?c.reverse():c}({start:Ha(e),end:Nn(e)},{locale:this.locale}).map(e=>({start:e,end:Ya(e,{locale:this.locale})})).map(e=>function(e,t){const{start:r,end:o}=Wa(t?.in,e);let i=+r>+o;const a=i?+r:+o,n=i?o:r;n.setHours(0,0,0,0);const s=[];for(;+n<=a;)s.push(Oa(r,n)),n.setDate(n.getDate()+1),n.setHours(0,0,0,0);return i?s.reverse():s}(e));if(In(t,e)){const e=Rn(t,{locale:this.locale})-1,o=Fa(t,Ta(t,{locale:this.locale}));r[e][o]=t}return r}resetFormControl(){this.value=this.#e}async#M(e){e.preventDefault(),this.isCalendarOpen=!this.isCalendarOpen,this.isCalendarOpen&&(await this.updateComplete,(this.selectedCell||this.todayCell).focus())}#T(){this.navigationDate=Da(this.month,1)}#j(){this.navigationDate=Ln(this.month)}async#R(){await this.updateComplete,this.input.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}_onClickOutside(e){if(!this.isCalendarOpen)return;this.contains(e.target)||(this.isCalendarOpen=!1)}#N(e){this.value=e.target.value}#I(e){e.preventDefault(),this.isCalendarOpen=!0}#V(e){if(" "===e.key)return this.#M(e);","===e.key&&e.preventDefault(),"Enter"===e.key&&this.internals.form&&this.internals.form.requestSubmit()}async#F(e){const t=this.navigationDate;let r;switch(e.key){case"ArrowUp":r=Fn(t,7);break;case"ArrowLeft":r=Fn(t,1);break;case"Home":r=Ta(t,{locale:this.locale});break;case"PageUp":r=Ln(t);break;case"ArrowDown":r=Aa(t,7);break;case"ArrowRight":r=Aa(t,1);break;case"End":r=Ya(t,{locale:this.locale});break;case"PageDown":r=Da(t,1);break;case"Escape":this.isCalendarOpen=!1;break;case"Tab":"TD"!==e.target.tagName||e.shiftKey?e.target.id===Is&&e.shiftKey&&(e.preventDefault(),(this.selectedCell||this.todayCell).focus()):(e.preventDefault(),this.previousMonthButton.focus())}r&&(e.preventDefault(),this.navigationDate=r,await this.updateComplete,this.selectedCell.focus())}#L(e){const t=e.currentTarget.dataset.date;"key"in e?"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.value=t,this.shadowRoot.querySelector("input").value=this.value,this.isCalendarOpen=!1,this.toggleButton.focus(),this.#R()):(this.value=t,this.shadowRoot.querySelector("input").value=this.value,this.isCalendarOpen=!1,this.#R())}constructor(){var e;super(),this.headerFormat="MMMM yyyy",this.weekdayFormat="EEEEEE",this.dayFormat="PPPP",this.isCalendarOpen=!1,this.navigationDate=Va(Date.now(),e),this.locale=Yn,this.#e=null,ft(xs,_s,ks,ys,$s);const t=vt();t&&Vs[t]&&(this.locale=Vs[t]),this._onClickOutside=this._onClickOutside.bind(this)}connectedCallback(){super.connectedCallback(),this.#e=this.value;const e=this.lang;if(e&&Vs[e]&&(this.locale=Vs[e]),this.value){const e=As(this.value);e&&(this.navigationDate=e)}document.addEventListener("mousedown",this._onClickOutside),document.addEventListener("touchend",this._onClickOutside),document.addEventListener("focusin",this._onClickOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this._onClickOutside),document.removeEventListener("touchend",this._onClickOutside),document.removeEventListener("focusin",this._onClickOutside)}updated(e){e.has("value")&&this.setValue(this.value)}render(){return q`<div class="w-datepicker-wrapper" id="${Ns}"><label class="w-datepicker-input-label" for="${js}">${this.label}</label><div class="w-datepicker-input-wrapper"><input id="${js}" type="${Ms}" name="${Ae(this.name)}" value="${Ae(this.value)}" class="w-datepicker-input" @click="${this.#I}" @input="${this.#N}" @keydown="${this.#V}"><w-button aria-label="${this.value?ut.t({id:"datepicker.toggle.changeDate",values:{currentDate:Mn(this.value,this.dayFormat)},message:"Change date, {currentDate}",comment:"Used by screen readers to describe the button that toggles open the calendar in a date picker when there is a selected date"}):ut.t({id:"datepicker.toggle.chooseDate",message:"Choose date",comment:"Used by screen readers to describe the button that toggles open the calendar in a date picker when there is no selected date"})}" aria-controls="${Ts}" class="w-datepicker-button" data-testid="${Rs}" id="${Rs}" variant="utilityQuiet" type="button" @click="${this.#M}"><w-icon name="Calendar" size="small" locale="${vt()}" class="flex"></w-icon></w-button></div></div><div class="w-dropdown__popover w-dropdown__popover--open" style="${ws({display:this.isCalendarOpen?void 0:"none"})}"><div aria-label="${ut.t({id:"datepicker.calendar.roleDescription",message:"Date picker",comment:"Used by screen readers to announce that the calendar element is a date picker."})}" aria-modal="true" role="dialog" class="w-datepicker__calendar" data-testid="${Ts}" id="${Ts}" @keydown="${this.#F}"><div class="w-datepicker__month-nav"><w-button aria-label="${ut.t({id:"datepicker.calendar.previousMonth",message:"Previous month",comment:"Screen reader label for the previous month button."})}" class="w-datepicker__month__nav__button" id="${Is}" data-testid="${Is}" variant="utility" quiet small @click="${this.#j}"><w-icon name="ChevronLeft" size="small" locale="${vt()}" class="flex"></w-icon></w-button><div aria-live="polite" class="w-datepicker__month__nav__header">${Mn(this.month,this.headerFormat,{locale:this.locale})}</div><w-button aria-label="${ut.t({id:"datepicker.calendar.nextMonth",message:"Next month",comment:"Screen reader label for the next month button."})}" class="w-datepicker__month__nav__button" data-testid="${Ts}-next" variant="utility" quiet small @click="${this.#T}"><w-icon name="ChevronRight" size="small" locale="${vt()}" class="flex"></w-icon></w-button></div><div class="w-datepicker__month"><table class="w-datepicker__table" role="grid"><thead class="w-datepicker__weekdays"><tr>${this.weeks[0].map(e=>q`<th class="w-datepicker__weekday">${Mn(e,this.weekdayFormat,{locale:this.locale})}</th>`)}</tr></thead><tbody>${this.weeks.map(e=>q`<tr>${e.map(e=>{if(!In(this.month,e))return q`<td></td>`;const t=!!this.isDayDisabled&&this.isDayDisabled(e),r=qa(e,this.selectedDate),o=e===this.navigationDate;return q`<td aria-current="${Ae(Vn(e)?"date":void 0)}" aria-disabled="${t}" aria-label="${Mn(e,this.dayFormat,{locale:this.locale})}" aria-selected="${r}" class="${ye({"w-datepicker__day":!0,"w-datepicker__day--today":Vn(e),"w-datepicker__day--selected":r,"w-datepicker__day--disabled":t,"w-datepicker__day--navigation":o})}" data-navigation="${o}" data-date="${function(e,t){const r=za(e,t?.in);if(isNaN(+r))throw new RangeError("Invalid time value");let o="";const i="extended"===(t?.format??"extended")?"-":"";{const e=cn(r.getDate(),2),t=cn(r.getMonth()+1,2);o=`${cn(r.getFullYear(),4)}${i}${t}${i}${e}`}return o}(e,{})}" role="gridcell" tabindex="${o?0:-1}" @click="${t?void 0:this.#L}" @keydown="${t?void 0:this.#L}"><div>${jn(e)}</div></td>`})}</tr>`)}</tbody></table></div></div></div>`}}Ds([ce({reflect:!0})],Fs.prototype,"label",void 0),Ds([ce({reflect:!0})],Fs.prototype,"lang",void 0),Ds([ce({reflect:!0})],Fs.prototype,"name",void 0),Ds([ce({reflect:!0})],Fs.prototype,"value",void 0),Ds([ce({attribute:"header-format"})],Fs.prototype,"headerFormat",void 0),Ds([ce({attribute:"weekday-format"})],Fs.prototype,"weekdayFormat",void 0),Ds([ce({attribute:!1})],Fs.prototype,"isDayDisabled",void 0),Ds([ce({attribute:"day-format"})],Fs.prototype,"dayFormat",void 0),Ds([he()],Fs.prototype,"isCalendarOpen",void 0),Ds([he()],Fs.prototype,"navigationDate",void 0),Ds([he()],Fs.prototype,"locale",void 0),Ds([he()],Fs.prototype,"selectedDate",null),Ds([he()],Fs.prototype,"month",null),Ds([he()],Fs.prototype,"weeks",null),Ds([pe(`#${Ts}`)],Fs.prototype,"calendar",void 0),Ds([pe(`#${js}`,!0)],Fs.prototype,"input",void 0),Ds([pe(`#${Rs}`,!0)],Fs.prototype,"toggleButton",void 0),Ds([pe(`#${Ns}`,!0)],Fs.prototype,"wrapper",void 0),Ds([pe(`#${Is}`)],Fs.prototype,"previousMonthButton",void 0),Ds([pe('[aria-current="date"]')],Fs.prototype,"todayCell",void 0),Ds([pe('[data-navigation="true"]')],Fs.prototype,"selectedCell",void 0),customElements.get("w-datepicker")||customElements.define("w-datepicker",Fs);const Ls="undefined"!=typeof window;let qs=!0;if(Ls){const e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=({matches:e})=>qs=!e;e.addEventListener&&e.addEventListener("change",t),t(e)}const Bs=e=>{e.style.transition=null,e.style.backfaceVisibility=null,e.style.overflow=null},Ws=e=>{const t=qs?"var(--f-expansion-duration, 0.3s)":"0.01s";e.style.transition=`height ${t}`,e.style.backfaceVisibility="hidden",e.style.overflow="hidden"},Hs=(e,t)=>{const r=(()=>{if(!t)return new Promise(e=>{t=e})})(),o=((e,t)=>()=>{e.style.height="auto",e.style.overflow=null,t&&t()})(e,t);Bs(e),e.style.height="auto";let i=e.scrollHeight;if(Ls&&requestAnimationFrame(()=>{e.addEventListener("transitionend",o,{once:!0}),e.style.height="0px",e.style.transitionTimingFunction="ease-out",Ws(e),requestAnimationFrame(()=>e.style.height=i+"px")}),r)return r},Ys=(e,t)=>{const r=(()=>{if(!t)return new Promise(e=>{t=e})})(),o=(e=>()=>{e&&e()})(t);Bs(e);let i=e.scrollHeight;if(Ls&&requestAnimationFrame(()=>{e.addEventListener("transitionend",o,{once:!0}),e.style.height=i+"px",e.style.transitionTimingFunction="ease-in",Ws(e),requestAnimationFrame(()=>e.style.height="0px")}),r)return r};class Xs extends ne{static{this.properties={show:{type:Boolean,reflect:!0},_removeElement:{type:Boolean,state:!0}}}constructor(){super(),this.show=!1,this._mounted=!1,this._removeElement=!1}willUpdate(){this._mounted||(this._removeElement=!this.show),this.show&&this._removeElement&&(this._removeElement=!1)}updated(){this._wrapper&&(this._mounted?(this.show&&Hs(this._wrapper),this.show||this._removeElement||Ys(this._wrapper,()=>this._removeElement=!0)):this._mounted=!0)}get _wrapper(){return this??null}static{this.styles=[a`:host{display:block}`]}render(){return q`<div aria-hidden="${Ae(this.show?void 0:"true")}">${this._removeElement?q``:q`<slot></slot>`}</div>`}}customElements.get("w-expand-transition")||customElements.define("w-expand-transition",Xs)
|
|
79
|
+
/**
|
|
80
|
+
* @license
|
|
81
|
+
* Copyright 2017 Google LLC
|
|
82
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
83
|
+
*/;class Us extends we{constructor(e){if(super(e),this.it=W,e.type!==ge)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===W||null==e)return this._t=void 0,this.it=e;if(e===B)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Us.directiveName="unsafeHTML",Us.resultType=1;const Js=fe(Us);class Ks extends ne{static{this.properties={level:{type:Number}}}get _markup(){return`<h${this.level}\n style="margin: 0; font-weight: unset; font-size: unset; line-height: unset;"\n >\n <slot></slot>\n </h${this.level}>\n`}render(){return this.level?Js(this._markup):q`<slot></slot>`}}customElements.get("w-unstyled-heading")||customElements.define("w-unstyled-heading",Ks);const Zs=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.t4{font-weight:700;font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-left{text-align:left}.align-middle{vertical-align:middle}.bg-transparent{background-color:#0000}.appearance-none{-webkit-appearance:none;appearance:none}.will-change-height{will-change:height}.border-0{border-width:0}.border-2{border-width:2px}.rounded-8{border-radius:8px}.rounded-l-0{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-0{border-top-right-radius:0;border-bottom-right-radius:0}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.hover\\:underline:hover{text-decoration-line:underline}.focus-visible\\:underline:focus-visible{text-decoration-line:underline}.overflow-hidden{overflow:hidden}.focus\\:outline-none:focus{outline-offset:2px;outline:2px solid #0000}.items-center{align-items:center}.justify-between{justify-content:space-between}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-info-subtle{background-color:var(--w-s-color-background-info-subtle)}.s-bg-subtle{background-color:var(--w-s-color-background-subtle)}.hover\\:s-bg-subtle-hover:hover{background-color:var(--w-s-color-background-subtle-hover)}.active\\:s-bg-subtle-active:active{background-color:var(--w-s-color-background-subtle-active)}.s-text{color:var(--w-s-color-text)}.s-icon{color:var(--w-s-color-icon)}.s-border{border-color:var(--w-s-color-border)}.s-surface-sunken{background-color:var(--w-s-color-surface-sunken)}.h-0{height:0}.w-full{width:100%}.m-0{margin:0}.-mx-16{margin-left:-1.6rem;margin-right:-1.6rem}.last-child\\:mb-0>:last-child{margin-bottom:0}.ml-8{margin-left:.8rem}.px-0{padding-left:0;padding-right:0}.px-16{padding-left:1.6rem;padding-right:1.6rem}.py-0{padding-top:0;padding-bottom:0}.py-16{padding-top:1.6rem;padding-bottom:1.6rem}.pt-0{padding-top:0}.pt-16{padding-top:1.6rem}.pt-8{padding-top:.8rem}.invisible{visibility:hidden}.break-words{overflow-wrap:break-word}.cursor-pointer{cursor:pointer}.-rotate-180{--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:-180deg;transform:translateX(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:-rotate-180::part(w-icon-chevron-down-16-part){--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:-180deg;transform:translateX(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.rotate-180{--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:180deg;transform:translateX(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-up-16-part\\]\\:rotate-180::part(w-icon-chevron-up-16-part){--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:180deg;transform:translateX(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.transform{transform:translateX(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:transform::part(w-icon-chevron-down-16-part){transform:translateX(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-up-16-part\\]\\:transform::part(w-icon-chevron-up-16-part){transform:translateX(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.transform-gpu{transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:transform-gpu::part(w-icon-chevron-down-16-part){transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-up-16-part\\]\\:transform-gpu::part(w-icon-chevron-up-16-part){transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-down-16-part\\]\\:transition-transform::part(w-icon-chevron-down-16-part){transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-up-16-part\\]\\:transition-transform::part(w-icon-chevron-up-16-part){transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-down-16-part\\]\\:ease-in-out::part(w-icon-chevron-down-16-part){transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-up-16-part\\]\\:ease-in-out::part(w-icon-chevron-up-16-part){transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:480px){.sm\\:rounded-8{border-radius:8px}.sm\\:mx-0{margin-left:0;margin-right:0}}`;var Qs=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const Gs="group block relative break-words last-child:mb-0 px-16 rounded-8",el="will-change-height s-text py-16",tl="s-bg-subtle hover:s-bg-subtle-hover active:s-bg-subtle-active py-0 px-0 group block relative break-words last-child:mb-0 rounded-8",rl="-mx-16 rounded-l-0 rounded-r-0 sm:mx-0 sm:rounded-8",ol="inline-block align-middle s-icon",il="ml-8",al="part-[w-chevrondown]:transform part-[w-chevrondown]:transition-transform part-[w-chevrondown]:transform-gpu part-[w-chevrondown]:ease-in-out",nl="part-[w-chevronup]:transform part-[w-chevronup]:transition-transform part-[w-chevronup]:transform-gpu part-[w-chevronup]:ease-in-out",sl="part-[w-chevrondown]:-rotate-180",ll="part-[w-chevronup]:rotate-180",dl="overflow-hidden",cl="h-0 invisible",hl="focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 hover:underline focus-visible:underline",ul="w-full text-left relative inline-flex items-center justify-between group relative break-words last-child:mb-0 px-16 rounded-8",pl="pt-0",bl="flex w-full justify-between items-center",gl="t4";class ml extends ne{constructor(){super(...arguments),this.expanded=!1,this.box=!1,this.bleed=!1,this.noChevron=!1,this.animated=!1,this._hasTitle=!0,this._showChevronUp=!1}static{this.styles=[De,Zs,a`:host{display:block}::slotted(:last-child){margin-bottom:0!important}`]}updated(e){e.has("expanded")&&setTimeout(()=>{this._showChevronUp=this.expanded},200)}firstUpdated(){const e=Boolean(this.title),t=this.renderRoot.querySelector("slot[name='title']")?.assignedNodes().length>0;this._hasTitle=e||t}get#q(){return Ee([el,this.box&&tl,this.bleed&&rl])}get#B(){return Ee(this.buttonClass,[hl,this.box&&ul])}get#W(){return Ee([ol,!this.box&&il])}get#H(){const e=Ee([nl,"flex",!this.expanded&&this._showChevronUp&&ll]),t=Ee([al,"flex",this.expanded&&!this._showChevronUp&&sl]),r=vt();return this._showChevronUp?q`<w-icon name="ChevronUp" size="small" locale="${r}" class="${e}"></w-icon>`:q`<w-icon name="ChevronDown" size="small" locale="${r}" class="${t}"></w-icon>`}get#Y(){return Ee(this.contentClass,[this.box?"pt-16":"pt-8",this.box&&Gs,this._hasTitle&&this.box&&pl])}get#X(){return Ee([dl,!this.expanded&&cl])}get _expandableSlot(){return q`<div class="${this.#Y}"><slot></slot></div>`}render(){return q`<div class="${this.#q}">${this._hasTitle?q`<w-unstyled-heading level="${this.headingLevel}"><button type="button" aria-expanded="${this.expanded}" class="${this.#B}" @click="${()=>this.expanded=!this.expanded}"><div class="${bl}">${this.title?q`<span class="${gl}">${this.title}</span>`:q`<slot name="title"></slot>`} ${this.noChevron?"":q`<div class="${this.#W}">${this.#H}</div>`}</div></button></w-unstyled-heading>`:""} ${this.animated?q`<w-expand-transition ?show="${this.expanded}">${this._expandableSlot}</w-expand-transition>`:q`<div class="${this.#X}" aria-hidden="${Ae(!this.expanded||void 0)}">${this._expandableSlot}</div>`}</div>`}}Qs([ce({type:Boolean,reflect:!0})],ml.prototype,"expanded",void 0),Qs([ce({type:String})],ml.prototype,"title",void 0),Qs([ce({type:Boolean})],ml.prototype,"box",void 0),Qs([ce({type:Boolean})],ml.prototype,"bleed",void 0),Qs([ce({attribute:"button-class",type:String})],ml.prototype,"buttonClass",void 0),Qs([ce({attribute:"content-class",type:String})],ml.prototype,"contentClass",void 0),Qs([ce({attribute:"no-chevron",type:Boolean})],ml.prototype,"noChevron",void 0),Qs([ce({type:Boolean})],ml.prototype,"animated",void 0),Qs([ce({attribute:"heading-level",type:Number})],ml.prototype,"headingLevel",void 0),Qs([ce({type:Boolean,state:!0})],ml.prototype,"_hasTitle",void 0),Qs([ce({type:Boolean,state:!0})],ml.prototype,"_showChevronUp",void 0),customElements.get("w-expandable")||customElements.define("w-expandable",ml);let vl=[];const fl={documentElement:{},body:{}},wl=Object.freeze({documentElement:{"scrollbar-gutter":"stable"},body:{overflow:"hidden",position:"relative",height:"100%"}}),yl=e=>{e.touches.length>1||e.preventDefault?.()},xl=()=>Object.entries(wl).forEach(([e,t])=>{Object.entries(t).forEach((e=>([t,r])=>{fl[e][t]=document[e].style[t],document[e].style[t]=r})(e))}),kl=()=>Object.entries(fl).forEach(([e,t])=>{Object.entries(t).forEach((e=>([t,r])=>{document[e].style[t]=fl[e][t]})(e))});function _l(e){let t=-1;e.ontouchstart=e=>{1===e.targetTouches.length&&(t=e.targetTouches[0].clientY)},e.ontouchmove=r=>{if(1!==r.targetTouches.length)return;const o=r.targetTouches[0].clientY-t;return 0===e.scrollTop&&o>0||(e=>e.scrollHeight-Math.abs(e.scrollTop)===e.clientHeight)(e)&&o<0?yl(r):(r.stopPropagation(),!0)}}function $l(e){e.ontouchstart=null,e.ontouchmove=null}const Sl=e=>()=>document[e?"addEventListener":"removeEventListener"]("touchmove",yl,{passive:!1}),El=Sl(!0),Cl=Sl();const Ol=e=>class extends e{constructor(){super(...arguments),this.patchClose=!0,this._close=null}close(){this._close()}},zl=e=>class extends e{handleSlotChange(e){const t=e.target.assignedNodes({flatten:!0});for(const e of t.filter(e=>e.patchClose))e._close=()=>this.close()}};var Al=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};class Dl extends(zl(ne)){constructor(){super(),this.show=!1,this.ignoreBackdropClicks=!1,this._isClosing=!1,this.interceptEscape=this.interceptEscape.bind(this),this.closeOnBackdropClick=this.closeOnBackdropClick.bind(this),this.eventPreventer=this.eventPreventer.bind(this),this.modifyBorderRadius=this.modifyBorderRadius.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("command",e=>{const t=e.command;"--show-modal"===t?this.open():"--close"!==t&&"--confirm"!==t||this.close()})}async open(){this._isClosing=!1,this.dialogEl.classList.remove("close"),this.dialogEl.showModal(),this.handleListeners(),function(e){if(!e)throw Error("Could not run setup, an element must be provided");vl.some(t=>t===e)||(vl.length||(xl(),El()),_l(e),vl.push(e))}(this.contentEl),await this.updateComplete,this.dispatchEvent(new CustomEvent("shown",{bubbles:!0,composed:!0}))}close(){this.dialogEl?.open&&(this._isClosing=!0,this.handleListeners("removeEventListener"),this.dialogEl.classList.add("close"),this.dialogEl.addEventListener("animationend",async e=>{"w-modal-out"===e.animationName&&this._isClosing&&(this.dialogEl.classList.remove("close"),this.dialogEl.close(),this._isClosing=!1,vl.forEach($l),Cl(),kl(),vl=[],await this.updateComplete,this.dispatchEvent(new CustomEvent("hidden",{bubbles:!0,composed:!0})))},{once:!0}))}render(){return q`<dialog class="dialog-el"><div class="dialog-inner-el"><slot name="header" @slotchange="${this.handleSlotChange}"></slot><div class="content-el" id="${this.contentId}"><slot name="content" @slotchange="${this.handleSlotChange}"></slot></div><slot name="footer" @slotchange="${this.handleSlotChange}"></slot></div></dialog>`}updated(e){if(!e.has("show"))return;void 0===e.get("show")&&!1===this.show||this[this.show?"open":"close"]()}handleListeners(e="addEventListener"){document[e]("keydown",this.interceptEscape),this.ignoreBackdropClicks||this.dialogEl[e]("mousedown",this.closeOnBackdropClick),this.dialogEl[e]("close",this.eventPreventer),this.dialogEl[e]("cancel",this.eventPreventer),this.dialogInnerEl[e]("transitionend",this.modifyBorderRadius)}eventPreventer(e){e.preventDefault()}closeOnBackdropClick(e){this.dialogEl===e.target&&this.close()}interceptEscape(e){"Escape"===e.key&&(e.preventDefault(),this.close())}modifyBorderRadius(){1.02*this.dialogInnerEl.scrollHeight>innerHeight?this.dialogInnerEl.style.borderRadius="0px":this.dialogInnerEl.style.borderRadius=null}static{this.styles=[De,a`.dialog-el{--w-modal-translate-distance:100%;--w-modal-max-height:80%;--w-modal-width:640px;background-color:transparent;border-width:0;align-items:flex-end;inset:0;height:unset;max-height:unset;max-width:unset;width:unset;margin:auto;padding:0;backface-visibility:hidden}.dialog-inner-el{will-change:height;border-radius:8px;display:flex;flex-direction:column;overflow:hidden;position:relative;background-color:var(--w-s-color-background);color:var(--w-s-color-text);box-shadow:var(--w-shadow-m);height:var(--w-modal-height);max-height:var(--w-modal-max-height);min-height:var(--w-modal-min-height);width:var(--w-modal-width);backface-visibility:hidden;padding-bottom:calc(32px + env(safe-area-inset-bottom,0px));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:150ms;transition-timing-function:cubic-bezier(.4,0,.2,1)}.content-el{display:block;flex-shrink:1;flex-grow:1;overflow-x:hidden;overflow-y:auto;position:relative;margin-bottom:0;padding-left:1.6rem;padding-right:1.6rem}@media (min-width:480px){.dialog-el{--w-modal-translate-distance:50%;place-content:center;place-items:center}.dialog-inner-el{margin-left:1.6rem;margin-right:1.6rem;padding-bottom:3.2rem}.content-el{padding-left:3.2rem;padding-right:3.2rem}}@media (max-width:479.9px){.dialog-inner-el{border-bottom-left-radius:0;border-bottom-right-radius:0}}.dialog-el[open]{animation:w-modal-in .3s ease-in-out forwards;display:flex;position:fixed}.dialog-el.close{animation:w-modal-out .3s ease-in-out forwards}.dialog-el[open]::backdrop{animation:backdrop-in .3s ease-in-out forwards}.dialog-el.close::backdrop{animation:backdrop-out .3s ease-in-out forwards}@keyframes w-modal-in{from{transform:translateY(var(--w-modal-translate-distance));opacity:0}to{transform:translateY(0);opacity:1}}@keyframes w-modal-out{from{transform:translateY(0);opacity:1}to{transform:translateY(var(--w-modal-translate-distance));opacity:0}}@keyframes backdrop-in{from{background:0 0}to{background:rgba(0,0,0,.25)}}@keyframes backdrop-out{from{background:rgba(0,0,0,.25)}to{background:0 0}}`]}}Al([ce({type:Boolean})],Dl.prototype,"show",void 0),Al([ce({type:String,attribute:"content-id"})],Dl.prototype,"contentId",void 0),Al([ce({type:Boolean,attribute:"ignore-backdrop-clicks"})],Dl.prototype,"ignoreBackdropClicks",void 0),Al([pe(".dialog-el")],Dl.prototype,"dialogEl",void 0),Al([pe(".dialog-inner-el")],Dl.prototype,"dialogInnerEl",void 0),Al([pe(".content-el")],Dl.prototype,"contentEl",void 0);const Pl=Dl;customElements.get("w-modal")||customElements.define("w-modal",Dl);class Ml extends(Ol(zl(ne))){render(){return q`<div class="footer"><slot @slotchange="${this.handleSlotChange}"></slot></div>`}static{this.styles=[De,a`.footer{display:flex;flex-shrink:0;justify-content:flex-end;padding-left:1.6rem;padding-right:1.6rem;padding-top:2.4rem}@media (min-width:480px){.footer{padding-left:3.2rem;padding-right:3.2rem}}`]}}const Tl=Ml;customElements.get("w-modal-footer")||customElements.define("w-modal-footer",Ml);const jl=({dx:e,dy:t})=>[{transform:`translate(${e}px, ${t}px)`},{transform:"none"}],Rl={easing:"ease",duration:300};let Nl=!1;if("undefined"!=typeof window){const e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=({matches:e})=>Nl=e;e.addEventListener&&e.addEventListener("change",t),t(e)}class Il{first;last;el;constructor(e,{animation:t={},keyframes:r,respectReduceMotion:o=!0}={}){this.el=e,this.first={},this.last={},this.userAnimationOptions=t,this.keyframeGenerator=r||jl,this.shouldReduceMotion=o}async when(e){this.prep();const t=await e();return await this.play(),t}prep(){this.first=this.el.getBoundingClientRect()}async play(){if(this.last=this.el.getBoundingClientRect(),!this.el.animate)return;const e=this.el.animate(this.keyframes,this.animationOptions);await e.finished}get keyframes(){return this.keyframeGenerator((e=this.first,t=this.last,{dx:e.left-t.left,dy:e.top-t.top,dw:e.width/t.width,dh:e.height/t.height,first:e,last:t}));var e,t}get defaults(){return Rl}get mergedOptions(){return{...this.defaults,...this.userAnimationOptions}}get animationOptions(){return this.shouldReduceMotion&&Nl?{...this.mergedOptions,duration:0}:this.mergedOptions}}const Vl=JSON.parse('{"modal.aria.back":["Tilbage"],"modal.aria.close":["Luk"]}'),Fl=JSON.parse('{"modal.aria.back":["Back"],"modal.aria.close":["Close"]}'),Ll=JSON.parse('{"modal.aria.back":["Takaisin"],"modal.aria.close":["Sulje"]}'),ql=JSON.parse('{"modal.aria.back":["Tilbake"],"modal.aria.close":["Lukk"]}'),Bl=JSON.parse('{"modal.aria.back":["Tillbaka"],"modal.aria.close":["Stäng"]}');var Wl=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};class Hl extends(Ol(ne)){constructor(){super(),this.back=!1,this.noClose=!1,this._hasTopContent=!1,ft(Fl,ql,Ll,Vl,Bl)}render(){return q`<div class="header"><slot name="top" @slotchange="${this.handleTopSlotChange}"></slot><div class="${this._hasTopContent?"":"header-title-bar"}">${this.backButton}<h1 class="title-el ${this.titleClasses}">${this.title}</h1>${this.closeButton}</div></div>`}async willUpdate(e){if(e.has("back")){if(!this.titleEl)return;new Il(this.titleEl).when(async()=>{await this.updateComplete})}}get titleClasses(){return["header-title",this.back?"header-title-with-back-button":"header-title-without-back-button",this._hasTopContent?"header-title-with-top-area":""].join(" ")}get backButton(){return this.back&&!this._hasTopContent?q`<button type="button" aria-label="${ut._({id:"modal.aria.back",message:"Back",comment:"Aria label for the back button in modal"})}" class="header-button header-button-left" @click="${this.emitBack}"><w-icon name="ArrowLeft" size="small" locale="${vt()}" style="display:flex" class="flex"></w-icon></button>`:W}get closeButton(){return this.noClose?W:q`<div class="header-close-button-container"><w-button type="button" aria-label="${ut._({id:"modal.aria.close",message:"Close",comment:"Aria label for the close button in modal"})}" variant="pill" small="" @click="${this.close}"><w-icon name="Close" size="small" locale="${vt()}" style="display:flex" class="flex"></w-icon></w-button></div>`}emitBack(){this.dispatchEvent(new CustomEvent("backClicked",{bubbles:!0,composed:!0}))}handleTopSlotChange(e){const t=e.target.assignedElements({flatten:!0});this._hasTopContent=!!t.length}static{this.styles=[De,a`.header{position:relative;padding-bottom:.8rem}.header-title-bar{display:grid;flex-shrink:0!important;gap:1.2rem;grid-template-columns:auto 1fr auto;align-items:flex-start;padding-left:1.6rem;padding-right:1.6rem;padding-top:1.6rem}.header-title{font-weight:700;font-size:var(--w-font-size-l);line-height:var(--w-line-height-l);align-self:center;margin:0}.header-title-with-back-button{justify-self:center}.header-title-without-back-button{grid-column:span 2/span 2}.header-title-with-top-area{padding-left:1.6rem;padding-right:1.6rem;padding-top:1.6rem}.header-button:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.header-button:focus,.header-button:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.header-button:not(:focus-visible){outline:0}.header-button{border-width:0;border-radius:9999px;display:inline-flex;align-items:center;justify-content:center;min-height:40px;min-width:40px;padding:.4rem;font-weight:700;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:150ms;font-size:var(--w-font-size-m);line-height:var(--w-line-height-m);line-height:2.4rem}.header-button-left{background-color:transparent;color:var(--w-s-color-icon);margin-left:-.8rem}.header-button-left:hover{background-color:var(--w-color-button-pill-background-hover)}.header-button-left:active{background-color:var(--w-color-button-pill-background-active)}.header-close-button-container{position:absolute;right:2rem;top:2.4rem}@media (min-width:480px){.header-title-bar{padding-left:3.2rem;padding-right:3.2rem;padding-top:2.4rem}.header-title-with-top-area{padding-left:3.2rem;padding-right:3.2rem}.header-button{min-height:32px;min-width:32px}}`]}}Wl([ce({type:String})],Hl.prototype,"title",void 0),Wl([ce({type:Boolean})],Hl.prototype,"back",void 0),Wl([ce({type:Boolean,attribute:"no-close"})],Hl.prototype,"noClose",void 0),Wl([he()],Hl.prototype,"_hasTopContent",void 0),Wl([pe(".title-el")],Hl.prototype,"titleEl",void 0);const Yl=Hl;customElements.get("w-modal-header")||customElements.define("w-modal-header",Hl)
|
|
84
|
+
/**
|
|
85
|
+
* @license
|
|
86
|
+
* Copyright 2021 Google LLC
|
|
87
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
88
|
+
*/;const Xl=JSON.parse('{"page-indicator.aria.label":["Prik ",["selectedPage"]," er fremhævet i en række med ",["pageCount"]," prikker"]}'),Ul=JSON.parse('{"page-indicator.aria.label":["Dot ",["selectedPage"]," is highlighted in a row of ",["pageCount"]," dots"]}'),Jl=JSON.parse('{"page-indicator.aria.label":["Piste ",["selectedPage"]," on korostettuna ",["pageCount"]," pisteen rivissä"]}'),Kl=JSON.parse('{"page-indicator.aria.label":["Prikk ",["selectedPage"]," er uthevet i en rad med ",["pageCount"]," prikker"]}'),Zl=JSON.parse('{"page-indicator.aria.label":["Prick ",["selectedPage"]," är markerad i en rad med ",["pageCount"]," prickar"]}'),Ql=a`.w-page-indicator{display:grid;justify-content:center;height:max-content;pointer-events:none}.w-page-indicator--container{display:grid;grid-auto-flow:column;gap:8px}.w-page-indicator--dot{background-color:var(--w-s-color-background-disabled);border-radius:5px;width:10px;height:10px}.w-page-indicator--selecteddot{background-color:var(--w-s-color-icon-selected)}`;var Gl=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};ft(Ul,Kl,Jl,Xl,Zl);class ed extends ne{static{this.styles=[Ql]}get _validPageCount(){return Math.max(1,Math.floor(this.pageCount??1))}get _validSelectedPage(){const e=Math.floor(this.selectedPage??1);return Math.max(1,Math.min(e,this._validPageCount))}render(){const e=this._validPageCount,t=this._validSelectedPage,r=ut._({id:"page-indicator.aria.label",comment:"Default screenreader message for page indicator group",message:"Dot {selectedPage} is highlighted in a row of {pageCount} dots",values:{selectedPage:t,pageCount:e}});return q`<div class="w-page-indicator" role="img" aria-label="${r}"><div class="w-page-indicator--container">${function*(e,t){if(void 0!==e){let r=0;for(const o of e)yield t(o,r++)}}
|
|
89
|
+
/**
|
|
90
|
+
* @license
|
|
91
|
+
* Copyright 2021 Google LLC
|
|
92
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
93
|
+
*/(function*(e,t,r=1){const o=void 0===t?0:e;t??=e;for(let e=o;r>0?e<t:t<e;e+=r)yield e}(e),e=>q`<div class="${ye({"w-page-indicator--dot":!0,"w-page-indicator--selecteddot":e+1===t})}"></div>`)}</div></div>`}}Gl([ce({type:Number,attribute:"selected-page",reflect:!0})],ed.prototype,"selectedPage",void 0),Gl([ce({type:Number,attribute:"page-count",reflect:!0})],ed.prototype,"pageCount",void 0),customElements.get("w-page-indicator")||customElements.define("w-page-indicator",ed);const td=JSON.parse('{"pagination.aria.first-page":["Første side"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["Næste side"],"pagination.aria.page":["Side ",["currentPage"]],"pagination.aria.pagination":["Sider"],"pagination.aria.prev-page":["Forrige side"],"pagination.label.current-page":["Side ",["currentPage"]]}'),rd=JSON.parse('{"pagination.aria.first-page":["First page"],"pagination.aria.icon-suffix":["icon"],"pagination.aria.next-page":["Next page"],"pagination.aria.page":["Page ",["currentPage"]],"pagination.aria.pagination":["Pages"],"pagination.aria.prev-page":["Previous page"],"pagination.label.current-page":["Page ",["currentPage"]]}'),od=JSON.parse('{"pagination.aria.first-page":["Ensimmäinen sivu"],"pagination.aria.icon-suffix":["kuvake"],"pagination.aria.next-page":["Seuraava sivu"],"pagination.aria.page":["Sivu ",["currentPage"]],"pagination.aria.pagination":["Sivut"],"pagination.aria.prev-page":["Edellinen sivu"],"pagination.label.current-page":["Sivu ",["currentPage"]]}'),id=JSON.parse('{"pagination.aria.first-page":["Første side"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["Neste side"],"pagination.aria.page":["Side ",["currentPage"]],"pagination.aria.pagination":["Sider"],"pagination.aria.prev-page":["Forrige side"],"pagination.label.current-page":["Side ",["currentPage"]]}'),ad=JSON.parse('{"pagination.aria.first-page":["Första sidan"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["Nästa sida"],"pagination.aria.page":["Sida ",["currentPage"]],"pagination.aria.pagination":["Sidor"],"pagination.aria.prev-page":["Föregående sida"],"pagination.label.current-page":["Sida ",["currentPage"]]}'),nd=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.border-0{border-width:0}.rounded-full{border-radius:9999px}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.focus\\:no-underline:focus,.hover\\:no-underline:hover{text-decoration:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:0}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-icon{color:var(--w-s-color-icon)}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-4{padding:.4rem}.p-8{padding:.8rem}.visible{visibility:visible}.font-bold{font-weight:700}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:768px){.md\\:block{display:block}.md\\:hidden{display:none}}`;var sd=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const ld=()=>ut._({id:"pagination.aria.icon-suffix",message:"icon",comment:"Suffix added at the end of icon titles when img semantics are lost on an html element"}),dd="hover:no-underline focus:no-underline focusable inline-flex justify-center items-center transition-colors ease-in-out min-h-[44px] min-w-[44px] p-4 rounded-full border-0 hover:bg-clip-padding";class cd extends ne{static{this.styles=[De,nd,a`w-icon{height:16px}`]}constructor(){super(),ft(rd,id,od,td,ad)}get _currentPage(){return this.currentPageNumber??1}get _visiblePages(){return this.visiblePages??7}get shouldShowShowFirstPageButton(){return this._currentPage-2>0}get shouldShowPreviousPageButton(){return this._currentPage-1>0}get shouldShowNextPageButton(){return this._currentPage<this.pages}get currentPageIndex(){return this._currentPage-1}get visiblePageNumbers(){if(this.pages<=this._visiblePages)return Array.from({length:this.pages},(e,t)=>t+1);const e=Math.floor(this._visiblePages/2);let t=Math.max(1,this._currentPage-e);const r=Math.min(this.pages,t+this._visiblePages-1);return r-t+1<this._visiblePages&&(t=Math.max(1,r-this._visiblePages+1)),Array.from({length:r-t+1},(e,r)=>t+r)}#U(e){const t=e.target.getAttribute("data-page-number");this.dispatchEvent(new CustomEvent("page-click",{detail:{clickedPage:t},bubbles:!0,composed:!0}))}render(){const e=this.visiblePageNumbers;return q`<nav class="flex items-center justify-center p-8" @click="${this.#U}"><h1 class="sr-only">${ut._({id:"pagination.aria.pagination",message:"Pages",comment:"Default screenreader message for pagination container in the pagination component"})}</h1><div class="flex items-center s-text-link">${this.shouldShowShowFirstPageButton?q`<a data-page-number="1" href="${this.baseUrl}1" class="${dd+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}"><span class="sr-only">${ut._({id:"pagination.aria.first-page",message:"First page",comment:"Default screenreader message for first page link in the pagination component"})},</span><w-icon name="ChevronDoubleLeft" size="small" locale="${vt()}" class="pointer-events-none flex items-center" class="flex"></w-icon><span class="sr-only">${ld()}</span></a>`:W} ${this.shouldShowPreviousPageButton?q`<a data-page-number="${this._currentPage-1}" href="${this.baseUrl}${this._currentPage-1}" class="${dd+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}"><span class="sr-only">${ut._({id:"pagination.aria.prev-page",message:"Previous page",comment:"Default screenreader message for previous page link in the pagination component"})},</span><w-icon name="ChevronLeft" size="small" locale="${vt()}" class="pointer-events-none flex items-center" class="flex"></w-icon><span class="sr-only">${ld()}</span></a>`:W}<div class="hidden md:block">${e.map(e=>{const t=e===this._currentPage,r=`${this.baseUrl}${e}`;let o=dd;o+=t?" s-bg-primary s-text-inverted":" hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]";const i=ut._({id:"pagination.aria.page",message:"Page {currentPage}",values:{currentPage:e},comment:"Default screenreader message for page link in the pagination component"});return q`<a data-page-number="${e}" aria-label="${i}" href="${r}" class="${o}" aria-current="${t?"page":""}">${e}</a>`})}</div><span class="block md:hidden p-8 font-bold">${ut._({id:"pagination.label.current-page",message:"Page {currentPage}",values:{currentPage:this._currentPage},comment:"Default message for current page label in the pagination component"})}</span> ${this.shouldShowNextPageButton?q`<a data-page-number="${this._currentPage+1}" href="${this.baseUrl}${this._currentPage+1}" class="${dd+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}"><span class="sr-only">${ut._({id:"pagination.aria.next-page",message:"Next page",comment:"Default screenreader message for next page link in the pagination component"})},</span><w-icon name="ChevronRight" size="small" locale="${vt()}" class="pointer-events-none flex items-center" class="flex"></w-icon><span class="sr-only">${ld()}</span></a>`:W}</div></nav>`}}sd([ce({type:String,reflect:!0,attribute:"base-url"})],cd.prototype,"baseUrl",void 0),sd([ce({type:Number,reflect:!0})],cd.prototype,"pages",void 0),sd([ce({type:Number,reflect:!0,attribute:"current-page"})],cd.prototype,"currentPageNumber",void 0),sd([ce({type:Number,reflect:!0,attribute:"visible-pages"})],cd.prototype,"visiblePages",void 0),customElements.get("w-pagination")||customElements.define("w-pagination",cd);const hd=JSON.parse('{"pill.aria.openFilter":["Åbn filter"],"pill.aria.removeFilter":["Fjern filter ",["label"]]}'),ud=JSON.parse('{"pill.aria.openFilter":["Open filter"],"pill.aria.removeFilter":["Remove filter ",["label"]]}'),pd=JSON.parse('{"pill.aria.openFilter":["Avaa suodatin"],"pill.aria.removeFilter":["Tyhjennä suodatin ",["label"]]}'),bd=JSON.parse('{"pill.aria.openFilter":["Åpne filter"],"pill.aria.removeFilter":["Fjern filter ",["label"]]}'),gd=JSON.parse('{"pill.aria.openFilter":["Öppna filter"],"pill.aria.removeFilter":["Ta bort filtret ",["label"]]}'),md=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.bg-\\[--w-color-pill-suggestion-background\\]{background-color:var(--w-color-pill-suggestion-background)}.hover\\:bg-\\[--w-color-pill-suggestion-background-hover\\]:hover{background-color:var(--w-color-pill-suggestion-background-hover)}.active\\:bg-\\[--w-color-pill-suggestion-background-active\\]:active{background-color:var(--w-color-pill-suggestion-background-active)}.rounded{border-radius:4px}.rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.flex{display:flex}.inline-flex{display:inline-flex}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:0}.items-center{align-items:center}.static{position:static}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.hover\\:s-bg-primary-hover:hover{background-color:var(--w-s-color-background-primary-hover)}.active\\:s-bg-primary-active:active{background-color:var(--w-s-color-background-primary-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.h-16{height:1.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.pl-12{padding-left:1.2rem}.pl-4{padding-left:.4rem}.pr-12{padding-right:1.2rem}.pr-2{padding-right:.2rem}.font-bold{font-weight:700}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;var vd=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const fd="flex items-center",wd="inline-flex items-center focusable text-xs transition-all",yd="bg-[--w-color-pill-suggestion-background] hover:bg-[--w-color-pill-suggestion-background-hover] active:bg-[--w-color-pill-suggestion-background-active] s-text font-bold",xd="s-bg-primary hover:s-bg-primary-hover active:s-bg-primary-active s-text-inverted",kd="pl-12 py-8 rounded-l-full",_d="pr-12 rounded-r-full",$d="pr-2",Sd="pr-12 pl-4 py-8 rounded-r-full",Ed="h-16",Cd="sr-only";class Od extends ne{static{this.styles=[De,md]}constructor(){super(),this.canClose=!1,this.suggestion=!1,ft(ud,bd,pd,hd,gd),this.canClose=!1,this.suggestion=!1,this.openFilterSrText=ut._({id:"pill.aria.openFilter",message:"Open filter",comment:"Fallback screen reader message for open filter"}),this.removeFilterSrText=ut._({id:"pill.aria.removeFilter",message:"Remove filter {label}",comment:"Fallback screen reader message for removal of the filter"})}get _labelClasses(){return Ee([wd,kd,this.suggestion?yd:xd,this.canClose?$d:_d])}get _closeClasses(){return Ee([wd,Sd,this.suggestion?yd:xd])}_onClick(){this.dispatchEvent(new CustomEvent("w-pill-click",{bubbles:!0,composed:!0}))}_onClose(){this.dispatchEvent(new CustomEvent("w-pill-close",{bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this.openSrLabel&&(this.openAriaLabel=this.openSrLabel),this.closeSrLabel&&(this.closeAriaLabel=this.closeSrLabel)}render(){return q`<div class="${fd}"><button type="button" class="${this._labelClasses}" @click="${this._onClick}"><span class="${Cd}">${this.openAriaLabel?this.openAriaLabel:this.openFilterSrText}</span><slot></slot></button> ${this.canClose?q`<button type="button" class="${this._closeClasses}" @click="${this._onClose}"><span class="${Cd}">${this.closeAriaLabel?this.closeAriaLabel:this.removeFilterSrText}</span><w-icon name="Close" size="small" locale="${vt()}" class="${Ed}" class="flex"></w-icon></button>`:null}</div>`}}vd([ce({attribute:"can-close",type:Boolean})],Od.prototype,"canClose",void 0),vd([ce({attribute:"suggestion",type:Boolean})],Od.prototype,"suggestion",void 0),vd([ce({attribute:"open-sr-label",type:String})],Od.prototype,"openSrLabel",void 0),vd([ce({attribute:"open-aria-label",type:String})],Od.prototype,"openAriaLabel",void 0),vd([ce({attribute:"close-sr-label",type:String})],Od.prototype,"closeSrLabel",void 0),vd([ce({attribute:"close-aria-label",type:String})],Od.prototype,"closeAriaLabel",void 0),customElements.get("w-pill")||customElements.define("w-pill",Od);const zd=a`:host{box-sizing:border-box!important}:host *,:host ::after,:host ::before{box-sizing:inherit!important}`,Ad=a`:host{display:inline-flex;align-items:center;gap:var(--_gap);--_gap:var(--w-c-radio-gap, 8px);--_size:var(--w-c-radio-size, 2rem);--_radius:var(--w-c-radio-radius, 50%);--_border-width:var(--w-c-radio-border-width, 1px);--_checked-border-width:var(--w-c-radio-checked-border-width, 0.6rem);--_bg:var(--w-c-radio-bg, var(--w-s-color-background));--_border-color:var(--w-c-radio-border-color, var(--w-s-color-border-strong));--_border-color-checked:var(--w-c-radio-border-color-checked, var(--w-s-color-border-selected));--_border-color-invalid:var(--w-c-radio-border-color-invalid, var(--w-s-color-border-negative));--_outline-width:var(--w-c-radio-outline-width, 2px);--_outline-color:var(--w-c-radio-outline-color, var(--w-s-color-border-focus));--_outline-offset:var(--w-c-radio-outline-offset, var(--w-outline-offset, 1px));--_border-color-disabled:var(--w-c-radio-border-color-disabled, var(--w-s-color-border-disabled));--_bg-disabled:var(--w-c-radio-bg-disabled, var(--w-s-color-background-disabled-subtle));--_label-font-size:var(--w-c-radio-label-font-size, var(--w-font-size-m));--_label-line-height:var(--w-c-radio-label-line-height, var(--w-line-height-m));--_label-color:var(--w-c-radio-label-color, currentColor);--_label-color-disabled:var(--w-c-radio-label-color-disabled, var(--w-s-color-text-disabled));--_cursor:var(--w-c-radio-cursor, pointer);--_cursor-disabled:var(--w-c-radio-cursor-disabled, not-allowed);--_transition:var(
|
|
94
|
+
--w-c-radio-transition,
|
|
95
|
+
border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
96
|
+
border-width 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
97
|
+
background-color 150ms cubic-bezier(0.4, 0, 0.2, 1)
|
|
98
|
+
)}:host([disabled-ui]),:host([disabled]){--w-c-radio-border-color:var(--w-c-radio-border-color-disabled, var(--w-s-color-border-disabled));--w-c-radio-bg:var(--w-c-radio-bg-disabled, var(--w-s-color-background-disabled-subtle));--w-c-radio-border-color-checked:var(--w-c-radio-border-color-disabled, var(--w-s-color-border-disabled));--w-c-radio-label-color:var(--w-c-radio-label-color-disabled, var(--w-s-color-text-disabled));--w-c-radio-cursor:var(--w-c-radio-cursor-disabled, not-allowed)}.wrapper{display:inline-flex;align-items:center;gap:var(--_gap)}[part=control]{appearance:none;-webkit-appearance:none;margin:0;width:var(--_size);height:var(--_size);border-style:solid;border-width:var(--_border-width);border-color:var(--_border-color);border-radius:var(--_radius);background-color:var(--_bg);cursor:var(--_cursor);flex-shrink:0;transition:var(--_transition)}:host([checked-ui]) [part=control],:host([checked]) [part=control],:host([role=radio]:state(checked)) [part=control],:host([role=radio][checked-ui]) [part=control]{border-color:var(--_border-color-checked);border-width:var(--_checked-border-width)}:host([invalid]) [part=control]{border-color:var(--_border-color-invalid)}:host(:focus-visible){outline:0}:host(:focus-visible) [part=control]{outline:var(--_outline-width) solid var(--_outline-color);outline-offset:var(--_outline-offset)}:host([disabled-ui]) [part=control],:host([disabled]) [part=control],:host([role=radio]:state(disabled)) [part=control]{border-color:var(--_border-color-disabled);background-color:var(--_bg-disabled);cursor:var(--_cursor-disabled)}:host([disabled-ui]) [part=label],:host([disabled]) [part=label]{color:var(--_label-color-disabled);cursor:var(--_cursor-disabled)}:host([disabled-ui][checked-ui]) [part=control],:host([disabled][checked-ui]),:host([disabled][checked]){border-color:var(--_border-color-disabled)}[part=label]{font-size:var(--_label-font-size);line-height:var(--_label-line-height);color:var(--_label-color);user-select:none;cursor:var(--_cursor)}@media (prefers-reduced-motion:reduce){:host{--w-c-radio-transition:none}}@media (forced-colors:active){:host{--w-c-radio-bg:Canvas;--w-c-radio-border-color:ButtonText;--w-c-radio-border-color-checked:Highlight;--w-c-radio-outline-color:Highlight;--w-c-radio-bg-disabled:Canvas;--w-c-radio-border-color-disabled:GrayText;--w-c-radio-label-color:CanvasText;--w-c-radio-label-color-disabled:GrayText}[part=control]{forced-color-adjust:none}:host([checked-ui]) [part=control],:host([checked]) [part=control],:host([role=radio]:state(checked)) [part=control]{background-color:var(--_border-color-checked);border-color:var(--_border-color-checked)}:host([disabled-ui][checked-ui]) [part=control],:host([disabled][checked-ui]),:host([disabled][checked]),:host([role=radio]:state(disabled):state(checked)) [part=control]{background-color:var(--_border-color-disabled);border-color:var(--_border-color-disabled)}}`;var Dd=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};class Pd extends(ze(ne)){static{this.styles=[zd,De,Ad]}static{this.shadowRootOptions={...ne.shadowRootOptions,delegatesFocus:!0}}get tabIndex(){return this._internalTabIndex}set tabIndex(e){this._groupTabIndex=e}#r;#o;#i;constructor(){super(),this.value=null,this.checked=!1,this.disabled=!1,this.required=!1,this.invalid=!1,this.#r=!1,this.#o=!1,this.#i=!1,this.handleClick=()=>{this.isInGroup()||this.disabled||(this.#i=!0,this.checked||(this.checked=!0,this.updateComplete.then(()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))})))},this.handleInvalid=()=>{this.#i=!0,this.updateValidity()},this.handleKeyDown=e=>{if(!this.isInGroup()&&!this.disabled&&!e.defaultPrevented){if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key)){const t=this.getStandaloneNamedRadios().filter(e=>!e.disabled);if(t.length<=1)return;e.preventDefault();const r=t.find(e=>e.checked)??t.find(e=>e===this)??t[0],o="ArrowUp"===e.key||"ArrowLeft"===e.key?-1:1,i=t.indexOf(r),a=t[(i+o+t.length)%t.length];return a.#i=!0,a.checked||(a.checked=!0,a.updateComplete.then(()=>{a.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))})),void a.focus()}" "!==e.key&&"Spacebar"!==e.key&&"Enter"!==e.key||("Enter"===e.key&&this.internals.form?this.internals.form.requestSubmit():(e.preventDefault(),this.click()))}},this.addEventListener("click",this.handleClick),this.addEventListener("invalid",this.handleInvalid),this.addEventListener("keydown",this.handleKeyDown)}connectedCallback(){super.connectedCallback(),this.value=this.getAttribute("value")??"on",this.#r=this.hasAttribute("checked"),this.checked=this.#r,this.internals.role="radio",this.syncAriaDisabled(),this.syncFormValue(),this.updateValidity()}syncAriaDisabled(){this.internals.ariaDisabled=this.disabled?"true":"false"}syncAriaChecked(){this.internals.ariaChecked=this.checked?"true":"false"}willUpdate(e){this.shouldSyncFormState(e)&&(this.syncFormValue(),this.updateValidity())}updated(e){super.updated(e),e.has("checked")&&(this.syncAriaChecked(),this.checked&&!this.isInGroup()&&(this.uncheckOtherRadios(),this.syncStandaloneTabOrder())),e.has("disabled")&&(this.syncAriaDisabled(),this.isInGroup()||this.syncStandaloneTabOrder()),e.has("invalid")&&(this.internals.ariaInvalid=this.invalid?"true":null),e.has("name")&&this.checked&&!this.isInGroup()&&this.uncheckOtherRadios()}resetFormControl(){this.checked=this.#r,this.syncFormValue(),this.updateValidity()}get validationMessage(){return this.internals.validationMessage}get validity(){return this.internals.validity}checkValidity(){return this.updateValidity(),this.internals.checkValidity()}reportValidity(){return this.#i=!0,this.updateValidity(),this.internals.checkValidity()}isInGroup(){return Boolean(this.closest("w-radio-group"))}getRadioScope(){return this.internals.form??this.closest("form")??document}getStandaloneNamedRadios(){if(!this.name)return[this];const e=this.getRadioScope();return Array.from(e.querySelectorAll(`w-radio[name="${this.name}"]`)).filter(e=>!e.closest("w-radio-group"))}syncStandaloneTabOrder(){const e=this.getStandaloneNamedRadios(),t=e.filter(e=>!e.disabled),r=t.find(e=>e.checked)??t[0]??null;e.forEach(e=>{e._standaloneTabIndex=e===r?0:-1})}get _internalTabIndex(){return this.disabled?-1:void 0!==this._groupTabIndex?this._groupTabIndex:void 0!==this._standaloneTabIndex?this._standaloneTabIndex:0}firstUpdated(){this.isInGroup()||this.syncStandaloneTabOrder()}uncheckOtherRadios(){if(!this.name)return;const e=this.getRadioScope();Array.from(e.querySelectorAll(`w-radio[name="${this.name}"]`)).forEach(e=>{e!==this&&(e.closest("w-radio-group")||e.checked&&(e.checked=!1))})}updateValidity(){if(this.disabled||this.isInGroup())return void this.internals.setValidity({});const e=this.required&&!this.checked,t=this.invalid&&!this.#o;if(e)return this.#o=!0,this.invalid=this.#i,void this.internals.setValidity({valueMissing:!0},this.internals.validationMessage||" ");this.#o&&(this.invalid=!1,this.#o=!1),t?this.internals.setValidity({customError:!0},this.internals.validationMessage||" "):this.internals.setValidity({})}syncFormValue(){this.disabled?this.setValue(null):this.setValue(this.checked?this.value:null)}shouldSyncFormState(e){return e.has("checked")||e.has("value")||e.has("disabled")||e.has("required")||e.has("invalid")}render(){return q`<div class="wrapper" tabindex="${this._internalTabIndex}"><div part="control" class="control"></div><slot part="label" class="label"></slot></div>`}}Dd([ce({reflect:!0})],Pd.prototype,"name",void 0),Dd([ce({reflect:!0})],Pd.prototype,"value",void 0),Dd([ce({type:Boolean,reflect:!0})],Pd.prototype,"checked",void 0),Dd([ce({type:Boolean,reflect:!0})],Pd.prototype,"disabled",void 0),Dd([ce({type:Boolean,reflect:!0})],Pd.prototype,"required",void 0),Dd([ce({type:Boolean,reflect:!0})],Pd.prototype,"invalid",void 0),Dd([ce({attribute:!1})],Pd.prototype,"_groupTabIndex",void 0),Dd([ce({attribute:!1})],Pd.prototype,"_standaloneTabIndex",void 0);const Md=Pd;customElements.get("w-radio")||customElements.define("w-radio",Pd);const Td=JSON.parse('{"radio-group.label.optional":["Valgfri"],"radio-group.validation.required":["Vælg en mulighed."]}'),jd=JSON.parse('{"radio-group.label.optional":["Optional"],"radio-group.validation.required":["Please select an option."]}'),Rd=JSON.parse('{"radio-group.label.optional":["Valinnainen"],"radio-group.validation.required":["Valitse vaihtoehto."]}'),Nd=JSON.parse('{"radio-group.label.optional":["Valgfri"],"radio-group.validation.required":["Velg et alternativ."]}'),Id=JSON.parse('{"radio-group.label.optional":["Valfritt"],"radio-group.validation.required":["Välj ett alternativ."]}'),Vd=a`:host{display:block;--_label-font-size:var(--w-c-radio-group-label-font-size, var(--w-font-size-s));--_label-line-height:var(--w-c-radio-group-label-line-height, var(--w-line-height-s));--_label-font-weight:var(--w-c-radio-group-label-font-weight, 700);--_label-color:var(--w-c-radio-group-label-color, var(--w-s-color-text));--_label-color-disabled:var(--w-c-radio-group-label-color-disabled, var(--w-s-color-text-disabled));--_label-padding-bottom:var(--w-c-radio-group-label-padding-bottom, 16px);--_optional-font-weight:var(--w-c-radio-group-optional-font-weight, 400);--_optional-color:var(--w-c-radio-group-optional-color, var(--w-s-color-text-subtle));--_optional-margin-inline-start:var(--w-c-radio-group-optional-margin-inline-start, 0.5rem);--_radios-gap:var(--w-c-radio-group-gap, 16px);--_help-text-margin-block-start:var(--w-c-radio-group-help-text-margin-block-start, 16px);--_help-text-font-size:var(--w-c-radio-group-help-text-font-size, var(--w-font-size-xs));--_help-text-line-height:var(--w-c-radio-group-help-text-line-height, var(--w-line-height-xs));--_help-text-color:var(--w-c-radio-group-help-text-color, var(--w-s-color-text-subtle));--_help-text-color-disabled:var(--w-c-radio-group-help-text-color-disabled, var(--w-s-color-text-disabled));--_help-text-color-error:var(--w-c-radio-group-help-text-color-error, var(--w-s-color-text-negative))}[part=form-control]{position:relative;border:0;padding:0;margin:0;min-inline-size:0}[part=form-control-label]{display:block;cursor:pointer;font-size:var(--_label-font-size);line-height:var(--_label-line-height);font-weight:var(--_label-font-weight);color:var(--_label-color);padding-bottom:var(--_label-padding-bottom);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}:host([disabled]) [part=form-control-label]{cursor:default;color:var(--_label-color-disabled)}:host([required]) [part=form-control-label]::after{content:var(--wa-form-control-required-content);margin-inline-start:var(--wa-form-control-required-content-offset)}.optional{font-weight:var(--_optional-font-weight);color:var(--_optional-color);margin-inline-start:var(--_optional-margin-inline-start)}[part~=form-control-input]{display:flex;flex-direction:column;flex-wrap:wrap;gap:var(--_radios-gap)}[part~=help-text]{margin-block-start:var(--_help-text-margin-block-start);font-size:var(--_help-text-font-size);line-height:var(--_help-text-line-height);color:var(--_help-text-color)}:host([disabled]) [part~=help-text]{color:var(--_help-text-color-disabled)}:host([data-show-error]) [part~=help-text]{color:var(--_help-text-color-error)}`;var Fd=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};ft(jd,Nd,Rd,Td,Id);class Ld extends(ze(ne)){static{this.styles=[zd,Vd]}static{this.shadowRootOptions={...ne.shadowRootOptions,delegatesFocus:!0}}constructor(){super(),this.hasInteracted=!1,this.hasWarnedMissingName=!1,this.autoTabIndex=!1,this.label="",this.helpText="",this.optional=!1,this.invalid=!1,this.name=null,this.disabled=!1,this.required=!1,this.defaultCheckedValue=void 0,this.slottedHelpText=null,this.nameManagedRadios=new WeakSet,this.disabledManagedRadios=new WeakSet,this.handleRadioClick=e=>{const t=e.target.closest("w-radio");if(!t||t.disabled||this.disabled)return;const r=this.getCheckedValue(),o=this.getAllRadios();this.selectSingleRadio(t,o);this.getCheckedValue()!==r&&this.updateComplete.then(this.emitSelectionChange)},this.handleInvalid=e=>{e.preventDefault(),this.hasInteracted=!0,this.updateValidity()},this.handleHelpTextSlotChange=()=>{this.syncSlottedHelpText(),this.requestUpdate()},this.handleI18nChange=()=>{this.requestUpdate()},this.emitSelectionChange=()=>{this.hasInteracted=!0,this.syncFormValue(),this.updateValidity(),this.requestUpdate(),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},this.captureDefaultSelection=()=>{void 0===this.defaultCheckedValue&&(this.defaultCheckedValue=this.getCheckedValue())},this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleRadioClick),this.addEventListener("invalid",this.handleInvalid)}get validationTarget(){return this.querySelector(":is(w-radio):not([disabled])")??void 0}connectedCallback(){super.connectedCallback(),this.syncSlottedHelpText(),this.syncFormValue(),this.updateValidity(),this.unsubscribeI18n=ut.on("change",this.handleI18nChange),this.warnIfMissingName(),this.updateComplete.then(this.captureDefaultSelection)}disconnectedCallback(){this.unsubscribeI18n?.(),this.unsubscribeI18n=void 0,super.disconnectedCallback()}async updated(e){(e.has("disabled")||e.has("name")||e.has("required")||e.has("invalid")||e.has("helpText"))&&(this.syncFormValue(),this.updateValidity(),this.syncRadioElements(),this.syncFormValue(),this.updateValidity())}resetFormControl(){const e=this.defaultCheckedValue??null;this.getAllRadios().forEach(t=>{t.checked=!!e&&t.value===e}),this.syncRadioElements(),this.syncFormValue(),this.updateValidity()}getAllRadios(){return[...this.querySelectorAll("w-radio")]}getCheckedValue(){const e=this.getAllRadios().find(e=>e.checked);return e?.value??null}getEnabledRadios(e=this.getAllRadios()){return e.filter(e=>!e.disabled)}selectSingleRadio(e,t=this.getAllRadios()){t.forEach(t=>{const r=t===e;t.checked=r,t._groupTabIndex=r?0:-1})}handleLabelClick(){this.focus()}async syncRadioElements(){const e=this.getAllRadios();e.forEach((t,r)=>{t.toggleAttribute("data-w-radio-first",0===r),t.toggleAttribute("data-w-radio-inner",0!==r&&r!==e.length-1),t.toggleAttribute("data-w-radio-last",r===e.length-1),this.syncRadioDisabledState(t),this.name?t.getAttribute("name")&&!this.nameManagedRadios.has(t)||(t.setAttribute("name",this.name),this.nameManagedRadios.add(t)):this.nameManagedRadios.has(t)&&(t.removeAttribute("name"),this.nameManagedRadios.delete(t))}),await Promise.all(e.map(async e=>e.updateComplete)),this.normalizeCheckedRadios(e),this.syncTabOrder(e)}syncRadioDisabledState(e){this.disabled?e.disabled||(e.disabled=!0,this.disabledManagedRadios.add(e)):this.disabledManagedRadios.has(e)&&(e.disabled=!1,this.disabledManagedRadios.delete(e))}syncTabOrder(e){if(this.disabled)return void e.forEach(e=>e._groupTabIndex=-1);const t=this.getEnabledRadios(e),r=t.find(e=>e.checked);t.length>0&&(r?t.forEach(e=>e._groupTabIndex=e.checked?0:-1):t.forEach((e,t)=>e._groupTabIndex=0===t?0:-1)),e.filter(e=>e.disabled).forEach(e=>e._groupTabIndex=-1)}handleKeyDown(e){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key)||this.disabled)return;const t=this.getAllRadios(),r=this.getEnabledRadios(t);if(r.length<=0)return;e.preventDefault();const o=this.getCheckedValue(),i=r.find(e=>e.checked)??r[0],a=" "===e.key?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1;let n=r.indexOf(i)+a;n<0&&(n=r.length-1),n>=r.length&&(n=0),this.selectSingleRadio(r[n],t),r[n].focus();this.getCheckedValue()!==o&&this.updateComplete.then(this.emitSelectionChange)}focus(e){if(this.disabled)return;const t=this.getAllRadios(),r=t.find(e=>e.checked),o=t.find(e=>!e.disabled),i=r||o;i&&i.focus(e)}checkValidity(){return this.updateValidity(),this.internals.checkValidity()}reportValidity(){return this.hasInteracted=!0,this.updateValidity(),this.internals.checkValidity()}hasSlottedContent(e){if(this.querySelector(`[slot="${e}"]`))return!0;const t=this.shadowRoot?.querySelector(`slot[name="${e}"]`);return!!t&&t.assignedNodes({flatten:!0}).some(e=>e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&Boolean(e.textContent?.trim()))}syncFormValue(){this.setValue(null)}syncSlottedHelpText(){const e=this.querySelector('[slot="help-text"]');this.slottedHelpText=e?.textContent?.trim()||null}updateValidity(){this.warnIfMissingName();const e=this.required&&!this.getCheckedValue(),t=e&&this.hasInteracted,r=this.invalid||this.hasAttribute("invalid"),o=r||t;return this.toggleAttribute("data-show-error",o),this.disabled?(this.internals.setValidity({}),this.syncChildInvalid(!1),void this.syncHostTabIndex(!1)):(this.syncHostTabIndex(o),e?(this.setValidityState({valueMissing:!0}),void this.syncChildInvalid(o)):r?(this.setValidityState({customError:!0}),void this.syncChildInvalid(!0)):(this.internals.setValidity({}),void this.syncChildInvalid(!1)))}normalizeCheckedRadios(e){const t=e.find(e=>e.checked);t&&e.forEach(e=>{e!==t&&(e.checked=!1)})}syncChildInvalid(e){this.getAllRadios().forEach(t=>{t.invalid=e})}setValidityState(e){const t=this.validationTarget;this.internals.setValidity(e," ",t??void 0)}syncHostTabIndex(e){if(!this.hasAttribute("tabindex")||this.autoTabIndex)return e?(this.setAttribute("tabindex","0"),void(this.autoTabIndex=!0)):void(this.autoTabIndex&&(this.removeAttribute("tabindex"),this.autoTabIndex=!1))}warnIfMissingName(){this.hasWarnedMissingName||this.internals.form&&(this.name&&this.name.trim().length>0||(console.warn('w-radio-group: "name" is required for form submission.'),this.hasWarnedMissingName=!0))}render(){const e=this.hasSlottedContent("label"),t=this.hasSlottedContent("help-text"),r=!!this.label||!!e,o=!!this.helpText||!!t,i=this.required&&!this.getCheckedValue()&&this.hasInteracted,a=this.invalid||this.hasAttribute("invalid"),n=a||i,s=n?a&&this.helpText?this.helpText:ut._({id:"radio-group.validation.required",message:"Please select an option.",comment:"Shown when required radio group has no selections"}):this.helpText,l=n||o,d=r?"label":void 0,c=l?"help-text":void 0,h=this.slottedHelpText||void 0;return q`<fieldset part="form-control" role="radiogroup" aria-labelledby="${Ae(d)}" aria-describedby="${Ae(c)}" aria-errormessage="error-message" aria-invalid="${n?"true":void 0}">${r?q`<label part="form-control-label" id="label" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot>${this.optional?q`<span class="optional">${ut._({id:"radio-group.label.optional",message:"Optional",comment:"Shown behind label when marked as optional"})}</span>`:null}</label>`:null}<slot part="form-control-input" @slotchange="${this.syncRadioElements}"></slot>${l?q`<div id="help-text" part="help-text" aria-label="${Ae(h)}"><slot name="help-text" @slotchange="${this.handleHelpTextSlotChange}">${s}</slot></div>`:null}</fieldset>`}}Fd([he()],Ld.prototype,"hasInteracted",void 0),Fd([ce()],Ld.prototype,"label",void 0),Fd([ce({attribute:"help-text"})],Ld.prototype,"helpText",void 0),Fd([ce({type:Boolean,reflect:!0})],Ld.prototype,"optional",void 0),Fd([ce({type:Boolean,reflect:!0})],Ld.prototype,"invalid",void 0),Fd([ce({reflect:!0})],Ld.prototype,"name",void 0),Fd([ce({type:Boolean,reflect:!0})],Ld.prototype,"disabled",void 0),Fd([ce({type:Boolean,reflect:!0})],Ld.prototype,"required",void 0);const qd=Ld;
|
|
99
|
+
/**
|
|
100
|
+
* @license
|
|
101
|
+
* Copyright 2021 Google LLC
|
|
102
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
103
|
+
*/
|
|
104
|
+
function Bd(e,t,r){return e?t(e):r?.(e)}customElements.get("w-radio-group")||customElements.define("w-radio-group",Ld);const Wd=JSON.parse('{"select.label.optional":["(valgfrit)"]}'),Hd=JSON.parse('{"select.label.optional":["(optional)"]}'),Yd=JSON.parse('{"select.label.optional":["(vapaaehtoinen)"]}'),Xd=JSON.parse('{"select.label.optional":["(valgfritt)"]}'),Ud=JSON.parse('{"select.label.optional":["(valfritt)"]}'),Jd=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.appearance-none{-webkit-appearance:none;appearance:none}.border-0{border-width:0}.border-1{border-width:1px}.rounded-4{border-radius:4px}.caret-current{caret-color:currentColor}.opacity-25{opacity:.25}.before\\:block:before,.block{display:block}.before\\:hidden:before{display:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:0}.outline-\\[--w-s-color-border-negative\\]\\!{outline-color:var(--w-s-color-border-negative)!important}.bottom-0{bottom:0}.right-0{right:0}.before\\:bottom-0:before{bottom:0}.before\\:right-0:before{right:0}.top-\\[30\\%\\]{top:30%}.absolute{position:absolute}.relative{position:relative}.static{position:static}.before\\:absolute:before{position:absolute}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-text{color:var(--w-s-color-text)}.s-text-disabled{color:var(--w-s-color-text-disabled)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-text-subtle{color:var(--w-s-color-text-subtle)}.s-icon{color:var(--w-s-color-icon)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-negative{border-color:var(--w-s-color-border-negative)}.s-border-strong{border-color:var(--w-s-color-border-strong)}.hover\\:s-border-disabled:hover{border-color:var(--w-s-color-border-disabled)}.hover\\:s-border-negative-hover:hover{border-color:var(--w-s-color-border-negative-hover)}.hover\\:s-border-strong-hover:hover{border-color:var(--w-s-color-border-strong-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.active\\:s-border-disabled:active{border-color:var(--w-s-color-border-disabled)}.h-full{height:100%}.w-32{width:3.2rem}.w-full{width:100%}.before\\:h-full:before{height:100%}.before\\:w-32:before{width:3.2rem}.mb-0{margin-bottom:0}.mt-4{margin-top:.4rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.pb-4{padding-bottom:.4rem}.pl-0{padding-left:0}.pl-8{padding-left:.8rem}.pr-32{padding-right:3.2rem}.cursor-pointer{cursor:pointer}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.font-normal{font-weight:400}.before\\:pointer-events-none:before,.pointer-events-none{pointer-events:none}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-s{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;var Kd=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const Zd="block text-m mb-0 py-12 pr-32 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] appearance-none cursor-pointer caret-current",Qd="s-text s-bg pl-8 border-1 s-border-strong hover:s-border-strong-hover active:s-border-active",Gd="s-text-disabled s-bg-disabled-subtle pl-8 border-1 s-border-disabled hover:s-border-disabled active:s-border-disabled pointer-events-none",ec="s-text s-bg pl-8 border-1 s-border-negative hover:s-border-negative-hover active:s-border-active outline-[--w-s-color-border-negative]!",tc="s-text bg-transparent pl-0 border-0 pointer-events-none before:hidden",rc="relative",oc="relative before:block before:absolute before:right-0 before:bottom-0 before:w-32 before:h-full before:pointer-events-none ",ic="block absolute top-[30%] right-0 bottom-0 w-32 h-full s-icon pointer-events-none cursor-pointer",ac="opacity-25",nc="antialiased block relative text-s font-bold pb-4 cursor-pointer s-text",sc="pl-8 font-normal text-s s-text-subtle",lc="text-xs mt-4 block",dc="s-text-subtle",cc="s-text-negative";class hc extends(ze(ne)){#e;#J;#A;static{this.styles=[De,Jd,a`select:has(option[value=""]):not(:has(option[selected])),select:has(option[value=""][selected]){color:var(--w-s-color-text-placeholder)}`]}constructor(){super(),this.autoFocus=!1,this.autofocus=!1,this.invalid=!1,this.always=!1,this.optional=!1,this.disabled=!1,this.readOnly=!1,this.readonly=!1,this.#e=null,this.#J=()=>this.#K(),this._setValue=e=>{this.value=e,this.setValue(e)},ft(Hd,Xd,Yd,Wd,Ud)}resetFormControl(){this.value=this.#e}#P(){return Array.from(this.children).filter(e=>"option"===e.tagName.toLowerCase()||"w-option"===e.tagName.toLowerCase())}#Z(){return this.shadowRoot?.querySelector("select")}#Q(){return this.#P().some(e=>e.hasAttribute("selected"))}#G(e){const t=this.#Z();if(!t)return;let r=!1;for(const o of Array.from(t.options)){const t=!r&&o.value===e;o.selected=t,o.toggleAttribute("selected",t),t&&(r=!0)}}#K({allowDefaultFirstOption:e=!1}={}){const t=this.#Z();if(!t)return;const r=t.value;if(!r||r===this.value)return;!e&&!this.value&&!this.#Q()&&0===t.selectedIndex||(this._setValue(r),this.#G(r))}#ee({syncValueFromSelected:e=!1}={}){let t;const r=this.#P().map(r=>{const o=r.getAttribute("value")??"",i=r.textContent??"",a=r.hasAttribute("selected"),n=r.hasAttribute("disabled");return e&&void 0===t&&a&&(t=o),q`<option value="${o}" ?selected="${a}" ?disabled="${n}">${i}</option>`});this._options=r,e&&void 0!==t&&t!==this.value&&this._setValue(t)}connectedCallback(){super.connectedCallback(),this.#e=this.value,(this.autofocus||this.autoFocus)&&this.shadowRoot.querySelector("select").focus(),this.#ee({syncValueFromSelected:!0}),this.ownerDocument?.defaultView?.addEventListener("pageshow",this.#J),this.#A=new MutationObserver(()=>{this.#ee({syncValueFromSelected:!0})}),this.#A.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["selected","disabled","value"]})}disconnectedCallback(){super.disconnectedCallback(),this.ownerDocument?.defaultView?.removeEventListener("pageshow",this.#J),this.#A?.disconnect()}firstUpdated(){this.value&&this.#G(this.value),this.#K({allowDefaultFirstOption:!1})}formStateRestoreCallback(e,t){if("string"==typeof e&&e)return this._setValue(e),void this.#G(e);this.#K({allowDefaultFirstOption:!0})}willUpdate(e){e.has("value")&&this.setValue(this.value)}updated(e){if(e.has("value")){const e=this.#Z();e&&e.value!==this.value&&(e.value=this.value??""),this.#G(this.value??"")}}handleKeyDown(e){!this.readonly&&!this.readOnly||" "!==e.key&&"ArrowDown"!==e.key&&"ArrowUp"!==e.key||e.preventDefault(),"Enter"===e.key&&this.internals.form&&this.internals.form.requestSubmit()}get#te(){return Ee([Zd,!this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&Qd,this.invalid&&ec,this.disabled&&Gd,(this.readonly||this.readOnly)&&tc])}get#re(){return Ee([lc,this.invalid?cc:dc])}get#W(){return Ee([ic,this.disabled&&ac])}get#oe(){return"select_id"}get#ie(){return this.helpText||this.hint?`${this.#oe}__hint`:void 0}onChange(e){const t=e.currentTarget.value;e.stopPropagation(),this._setValue(t),this.#G(t),this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,composed:!0}))}render(){return q`<div class="${rc}">${Bd(this.label,()=>q`<label class="${nc}" for="${this.#oe}">${this.label} ${Bd(this.optional,()=>q`<span class="${sc}">${ut._({id:"select.label.optional",message:"(optional)",comment:"Shown behind label when marked as optional"})}</span>`)}</label>`)}<div class="${oc}"><select class="${this.#te}" id="${this.#oe}" ?disabled="${this.disabled}" aria-readonly="${this.readonly}" aria-describedby="${Ae(this.#ie)}" aria-invalid="${Ae(this.invalid)}" aria-errormessage="${Ae(this.invalid&&this.#ie)}" @keydown="${this.handleKeyDown}" @change="${this.onChange}">${this._options}</select><div class="${this.#W}"><w-icon name="ChevronDown" size="small" locale="${vt()}" class="flex"></w-icon></div></div>${Bd(this.helpText||this.always||this.invalid,()=>q`<div id="${this.#ie}" class="${this.#re}">${this.helpText||this.hint}</div>`)}</div>`}}Kd([ce({attribute:"auto-focus",type:Boolean,reflect:!0})],hc.prototype,"autoFocus",void 0),Kd([ce({type:Boolean,reflect:!0})],hc.prototype,"autofocus",void 0),Kd([ce({attribute:"help-text",reflect:!0})],hc.prototype,"helpText",void 0),Kd([ce({type:Boolean,reflect:!0})],hc.prototype,"invalid",void 0),Kd([ce({type:Boolean,reflect:!0})],hc.prototype,"always",void 0),Kd([ce({reflect:!0})],hc.prototype,"hint",void 0),Kd([ce({reflect:!0})],hc.prototype,"label",void 0),Kd([ce({type:Boolean,reflect:!0})],hc.prototype,"optional",void 0),Kd([ce({type:Boolean,reflect:!0})],hc.prototype,"disabled",void 0),Kd([ce({attribute:"read-only",type:Boolean,reflect:!0})],hc.prototype,"readOnly",void 0),Kd([ce({type:Boolean,reflect:!0})],hc.prototype,"readonly",void 0),Kd([ce({attribute:!1,state:!0})],hc.prototype,"_options",void 0),Kd([ce({reflect:!0})],hc.prototype,"name",void 0),Kd([ce({reflect:!0})],hc.prototype,"value",void 0),customElements.get("w-select")||customElements.define("w-select",hc);const uc=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hidden{display:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}`,pc=a`.w-slider-thumb{position:relative;display:grid;pointer-events:none;grid-template-areas:"slider slider slider" "frommarker . tomarker" "fromtextfield . totextfield";grid-template-columns:1fr 24px 1fr}.w-slider-thumb__range{appearance:none;background-color:transparent;grid-area:slider;height:44px;margin-left:0;pointer-events:none}.w-slider-thumb__range::-webkit-slider-runnable-track{box-shadow:none;color:var(--w-s-color-text);height:var(--w-slider-track-height)}.w-slider-thumb__range::-webkit-slider-thumb{anchor-name:--thumb;appearance:none;cursor:pointer;background:var(--w-slider-thumb-background);border-radius:50%;height:var(--w-slider-thumb-size,28px);margin-top:calc(-1 * calc(var(--w-slider-thumb-offset) - calc(var(--w-slider-track-height)/ 2)));pointer-events:initial;width:var(--w-slider-thumb-size,28px);z-index:1}.w-slider-thumb__range[disabled]::-webkit-slider-thumb{cursor:auto}.w-slider-thumb__range::-moz-range-thumb{anchor-name:--thumb;appearance:none;cursor:pointer;background:var(--w-slider-thumb-background);border-radius:50%;border-color:transparent;height:var(--w-slider-thumb-size,28px);margin-top:calc(-1 * calc(var(--w-slider-thumb-offset) - calc(var(--w-slider-track-height)/ 2)));pointer-events:initial;width:var(--w-slider-thumb-size,28px);z-index:1;box-shadow:none}.w-slider-thumb__range[disabled]::-moz-range-thumb{cursor:auto}.w-slider-thumb__range:active::-webkit-slider-thumb,.w-slider-thumb__range:hover::-webkit-slider-thumb{background:var(--w-slider-thumb-background);box-shadow:var(--w-shadow-slider-handle-hover)}.w-slider-thumb__range:focus,.w-slider-thumb__range:focus-visible{outline:0}.w-slider-thumb__range:focus-visible::-webkit-slider-thumb{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px);box-shadow:none}.w-slider-thumb__range:active::-moz-range-thumb,.w-slider-thumb__range:hover::-moz-range-thumb{background:var(--w-s-color-background-primary-hover);box-shadow:var(--w-shadow-slider-handle-hover)}.w-slider-thumb__range:focus-visible::-moz-range-thumb{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px);box-shadow:none}.w-slider-thumb__tooltip-target{display:block;pointer-events:none;position:absolute;border:2px solid transparent;border-radius:20px;width:8px;height:8px;position-anchor:--thumb;position-area:center}.w-slider-thumb__from-marker,.w-slider-thumb__to-marker{margin-inline:2px;color:var(--w-s-color-text-subtle);font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}.w-slider-thumb__from-marker{grid-area:frommarker}.w-slider-thumb__to-marker{grid-area:tomarker;text-align:right}.w-slider-thumb__textfield{margin-top:12px;pointer-events:auto;grid-row:3/4;grid-column:1/3}:host([slot=from]) .w-slider-thumb__textfield{grid-column:1/2}:host([slot=from]) .w-slider-thumb__range{margin-left:var(--w-slider-thumb-size,28px)}:host([slot=to]) .w-slider-thumb__range{margin-right:var(--w-slider-thumb-size,28px)}:host([slot=from]) .w-slider-thumb__tooltip-target{transform:translateX(calc(-1 * var(--transform-offset,0) - 1px))}:host([slot=from]) .w-slider-thumb__range::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--w-slider-thumb-size,28px) - 1px))}:host([slot=from]) .w-slider-thumb__range::-moz-range-thumb{transform:translateX(calc(-1 * var(--w-slider-thumb-size,28px) - 1px))}:host([slot=to]) .w-slider-thumb__textfield{grid-row:3/4;grid-column:3/4}:host([slot=to]) .w-slider-thumb__tooltip-target{transform:translateX(calc(var(--transform-offset,0) - 1px))}:host([slot=to]) .w-slider-thumb__range::-webkit-slider-thumb{transform:translateX(calc(var(--w-slider-thumb-size,28px) - 1px))}:host([slot=to]) .w-slider-thumb__range::-moz-range-thumb{transform:translateX(calc(var(--w-slider-thumb-size,28px) - 1px))}w-textfield{--w-textfield-placeholder-color-text:var(--w-s-color-text)}`;var bc=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};class gc extends(ze(ne)){constructor(){super(...arguments),this.disabled=!1,this.invalid=!1,this.openEnded=!1,this.suffix="",this._showTooltip=!1,this._inputHasFocus=!1,this._hiddenTextfield=!1,this.#e=null,this.anchorPositioningStyleElement=null}static{this.shadowRootOptions={...ne.shadowRootOptions,delegatesFocus:!0}}static{this.styles=[De,uc,pc]}#e;resetFormControl(){this.value=this.#e,this.dispatchEvent(new CustomEvent("thumbreset",{bubbles:!0}))}#ae(){this._showTooltip=!0,this.shadowRoot.querySelector("w-attention").handleDone()}#ne(){this._showTooltip=!1}#se(){this.range&&(""===this.value?this.range.value=this.boundaryValue:this.value&&(this.range.value=this.value))}#le(e){this.dispatchEvent(new CustomEvent("slidervalidity",{bubbles:!0,detail:{invalid:e,slot:this.slot}}))}async updateFieldAfterValidation(){const e=this.shadowRoot.querySelector("w-textfield");await this.#de(e.value,!0)}async#de(e,t){const r=this.suffix??"";let o=Number.parseInt(e);if(this.openEnded&&!t&&this.step){if(!("to"===this.slot&&o>=Number(this.max)-1||"from"===this.slot&&o<=Number(this.min)+1)){const t=1/this.step;o=Math.round(o*t)/t,e=o.toString()}}const i=Number.parseInt(this.max),a=Number.parseInt(this.min);if(!this.openEnded&&(o>i||o<a))return this.#le(ut.t({id:"slider.error.out_of_bounds",message:"Value must be between {min} and {max}",values:{min:`${this.min} ${r}`.trim(),max:`${this.max} ${r}`.trim()}})),{shouldCancel:!0};""===e&&this.required&&this.#le(ut.t({id:"slider.error.required",message:"This field is required"})),this.value=e;const n=e===this.max||e===this.min;let s=!1;if(this.slot){const r=this.parentElement.querySelector('w-slider-thumb[slot="to"]'),l=this.parentElement.querySelector('w-slider-thumb[slot="from"]'),d=r.textfield.value||this.max,c=l.textfield.value||this.min,h=Number.parseInt(d),u=Number.parseInt(c),p=ut.t({id:"slider.error.overlap",message:"The maximum value cannot be less than the minimum"});if("from"===this.slot){const r=this.openEnded&&h>i?h:Math.min(h,this.openEnded?i-1:i);o>r&&(s=!0,this.openEnded&&n?this.value=String(r):this.value=d,t&&(this.#le(p),await this.updateComplete,this.textfield.value=e))}else{const r=this.openEnded&&u<a?u:Math.max(Number.parseInt(c),this.openEnded?a+1:a);o<r&&(s=!0,this.openEnded&&n?this.value=String(r):this.value=c,t&&(this.#le(p),await this.updateComplete,this.textfield.value=e))}}return s?{shouldCancel:!0}:(this.#le(""),this.range.value=Math.min(Math.max(Number(e),Number(this.min)),Number(this.max)).toString(),this.value=this.openEnded&&!t&&n?"":e,this.shadowRoot.querySelector("w-attention").handleDone(),{shouldCancel:!1})}async#N(e){const t="W-TEXTFIELD"===e.currentTarget.tagName;if(e instanceof CustomEvent)return;const r=e.currentTarget.value;return!(await this.#de(r,t)).shouldCancel||(e.preventDefault(),!1)}async#ce(e){if("Enter"===e.key&&this.internals.form)return void this.internals.form.requestSubmit();if(!this.openEnded)return;if("ArrowLeft"!==e.key&&"ArrowRight"!==e.key)return;const t=Number(this.range.value),r=this.step||1;let o;o="ArrowLeft"===e.key?t-r:t+r,o=Math.min(Math.max(o,Number(this.min)),Number(this.max));(await this.#de(o.toString(),!1)).shouldCancel&&e.preventDefault()}async#he(e){if("Enter"===e.key&&this.internals.form)return void this.internals.form.requestSubmit();if(this.textfield.value)return;let t="";"from"===this.slot?"ArrowUp"===e.key?t=String(Number(this.min)+1)||"1":"ArrowDown"===e.key&&(t=String(Number(this.min))||"0"):"ArrowUp"===e.key?t=String(Number(this.max))||"100":"ArrowDown"===e.key&&(t=String(Number(this.max)-1)||"99"),t&&(e.preventDefault(),await this.#de(t,!0))}async connectedCallback(){if(super.connectedCallback(),this.#e=this.value,this.setValue(this.value),this.slot&&!this.ariaDescription&&("from"===this.slot?this.ariaDescription=ut.t({id:"slider.label.from",comment:"Accessible label for the 'from value' input field in a range slider",message:"From"}):"to"===this.slot&&(this.ariaDescription=ut.t({id:"slider.label.to",comment:"Accessible label for the 'to value' input field in a range slider",message:"To"}))),"anchorName"in document.documentElement.style)await this.updateComplete;else{const e=import.meta.url.substring(0,import.meta.url.lastIndexOf("/"));try{const[{default:t}]=await Promise.all([import(`${e}/oddbird-css-anchor-positioning.js`),this.updateComplete]);this.anchorPositioningStyleElement||(this.anchorPositioningStyleElement=document.createElement("style"),this.shadowRoot.prepend(this.anchorPositioningStyleElement)),this.anchorPositioningStyleElement.textContent="\n /*\n * The polyfill can only anchor to ::before and ::after pseudo elements, not the pseudo element slider thumb.\n * We work around that by recreating a transparent version of the active range\n * so that we can position relative to that, without crossing the shadow root boundary.\n */\n .polyfill-range {\n align-self: center;\n background: transparent;\n height: var(--w-slider-track-active-height);\n position: absolute;\n padding-inline-start: var(--active-range-inline-start-padding, 0);\n padding-inline-end: var(--active-range-inline-end-padding, 0);\n top: var(--_range-top);\n left: 0;\n right: 0;\n grid-area: slider;\n }\n\n .polyfill-active-range {\n anchor-name: --polyfilled-thumb;\n\n box-sizing: content-box;\n background: transparent;\n height: var(--w-slider-track-active-height);\n\n border-start-start-radius: var(--active-range-border-radius, 0);\n border-end-start-radius: var(--active-range-border-radius, 0);\n\n margin-left: calc(calc(var(--_blank-values-before) * 1%) - var(--active-range-inline-start-padding, 0px));\n width: calc(calc(var(--_filled-values) * 1%) + var(--active-range-inline-end-padding, 0px));\n }\n\n #target {\n position: absolute;\n top: anchor(--polyfilled-thumb top);\n right: anchor(--polyfilled-thumb right);\n margin-right: 12px;\n }\n\n :host([name='from']) .polyfill-active-range {\n margin-left: calc(calc(var(--_blank-values-before) * 1%) - var(--active-range-inline-start-padding, 0px));\n width: calc(calc(var(--_filled-values) * 1%) + var(--active-range-inline-end-padding, 0px));\n }\n\n :host([name='from']) #target {\n left: anchor(--polyfilled-thumb left);\n margin-left: 38px;\n }\n ",await t({roots:[this.shadowRoot],elements:[this.anchorPositioningStyleElement]})}catch(e){console.error(new Error("Error registering the CSS anchor positioning polyfill. The UI will look broken.",{cause:e}))}}const e=window.navigator.userAgent;/WebKit/.test(e)&&!/Chrome/.test(e)&&this.tooltipTarget&&this.tooltipTarget.style.setProperty("--transform-offset","var(--w-slider-thumb-size, 28px)"),this.#se()}get boundaryValue(){return"from"===this.slot?this.min:this.max}get textFieldDisplayValue(){return this._inputHasFocus?""!==this.value?this.value:this.range?.value?Math.min(Math.max(Number(this.range.value),Number(this.min)+1),Number(this.max)-1).toString():"":this.value}get tooltipDisplayValue(){let e=0;return e=this.tooltipFormatter?this.tooltipFormatter(this.value,this.slot):this.valueFormatter?this.valueFormatter(this.value,this.slot):""===this.value?this.range?.value??this.boundaryValue:this.value||0,e}get ariaDescriptionText(){let e="";const t=this.ariaDescription||"",r=""===this.value;return this.openEnded&&r&&(e="from"===this.slot?ut.t({id:"slider.placeholder.from",message:"Min"}):ut.t({id:"slider.placeholder.to",message:"Max"})),e?`${e}, ${t}`:t}updated(e){e.has("openEnded")&&this.openEnded&&!this.placeholder&&("to"===this.slot||""===this.slot?this.placeholder=ut.t({id:"slider.placeholder.to",message:"Max",comment:"Max as in short for Maximum"}):"from"===this.slot&&(this.placeholder=ut.t({id:"slider.placeholder.from",message:"Min",comment:"Min as in short for Minimum"}))),e.has("value")&&(void 0===this.#e&&void 0!==this.value&&(this.#e=this.value),this.setValue(this.value),this.#se())}render(){const e=this.placeholder&&!this.value;return q`<div class="w-slider-thumb">${"anchorName"in document.documentElement.style?W:q`<div class="polyfill-range"><div class="polyfill-active-range"></div></div>`} <input id="range" aria-label="${this.ariaLabel}" aria-describedby="${Ae(this.ariaDescription?"aria-description":void 0)}" class="w-slider-thumb__range" type="range" .value="${this.value}" min="${this.min}" max="${this.max}" step="${Ae(!this.openEnded&&this.step?this.step:void 0)}" ?disabled="${this.disabled}" @mousedown="${this.#ae}" @mouseup="${this.#ne}" @touchstart="${this.#ae}" @touchend="${this.#ne}" @focus="${this.#ae}" @blur="${this.#ne}" @input="${this.#N}" @keydown="${this.#ce}"> ${"from"!==this.slot&&this.slot?W:q`<span class="sr-only">${ut.t({id:"slider.label.from",message:"From"})+" "+(this.labelFormatter?this.labelFormatter("from"):this.min)+", "+ut.t({id:"slider.label.to",message:"To"})+" "+(this.labelFormatter?this.labelFormatter("to"):this.max)}</span>`} <span aria-hidden="true" class="w-slider-thumb__from-marker">${this.labelFormatter?this.labelFormatter("from"):this.min} </span><span aria-hidden="true" class="w-slider-thumb__to-marker">${this.labelFormatter?this.labelFormatter("to"):this.max}</span><w-textfield aria-label="${this.ariaLabel}" aria-description="${Ae(this.ariaDescriptionText)}" class="${ye({"w-slider-thumb__textfield":!0,"sr-only":this._hiddenTextfield})}" type="number" tabindex="${this._hiddenTextfield?-1:W}" placeholder="${this.placeholder}" .value="${this.textFieldDisplayValue}" .formatter="${this.valueFormatter&&!e?e=>this.valueFormatter(e,this.slot):W}" min="${this.openEnded?W:this.min}" max="${this.openEnded?W:this.max}" step="${Ae(this.step)}" ?invalid="${Boolean(this.invalid)}" @input="${this.#N}" @keydown="${this.#he}" ?disabled="${this.disabled}">${this.suffix?q`<w-affix slot="suffix" label="${this.suffix??""}"></w-affix>`:W}</w-textfield><w-attention tooltip placement="top" flip distance="24" .show="${this._showTooltip}"><output id="target" class="w-slider-thumb__tooltip-target" slot="target"></output> <span slot="message">${this.tooltipDisplayValue}${this.suffix?q` ${this.suffix??""}`:W}</span></w-attention><span class="sr-only" id="aria-description">${this.ariaDescriptionText}</span></div>`}}bc([ce({attribute:"aria-label"})],gc.prototype,"ariaLabel",void 0),bc([ce({attribute:"aria-description"})],gc.prototype,"ariaDescription",void 0),bc([ce({reflect:!0})],gc.prototype,"name",void 0),bc([ce({reflect:!0})],gc.prototype,"value",void 0),bc([ce({type:Boolean,reflect:!0})],gc.prototype,"disabled",void 0),bc([ce({type:Boolean,reflect:!0})],gc.prototype,"invalid",void 0),bc([ce({attribute:!1,reflect:!1})],gc.prototype,"openEnded",void 0),bc([ce({reflect:!0})],gc.prototype,"placeholder",void 0),bc([he()],gc.prototype,"markers",void 0),bc([he()],gc.prototype,"required",void 0),bc([he()],gc.prototype,"step",void 0),bc([he()],gc.prototype,"min",void 0),bc([he()],gc.prototype,"max",void 0),bc([he()],gc.prototype,"suffix",void 0),bc([ce({attribute:!1})],gc.prototype,"valueFormatter",void 0),bc([ce({attribute:!1})],gc.prototype,"tooltipFormatter",void 0),bc([ce({attribute:!1})],gc.prototype,"labelFormatter",void 0),bc([pe('input[type="range"]')],gc.prototype,"range",void 0),bc([pe(".w-slider-thumb__tooltip-target")],gc.prototype,"tooltipTarget",void 0),bc([pe("w-textfield")],gc.prototype,"textfield",void 0),bc([he()],gc.prototype,"_showTooltip",void 0),bc([he()],gc.prototype,"_inputHasFocus",void 0),bc([he()],gc.prototype,"_hiddenTextfield",void 0),customElements.get("w-slider-thumb")||customElements.define("w-slider-thumb",gc);const mc=JSON.parse('{"slider.error.out_of_bounds":["Værdien skal være mellem ",["min"]," og ",["max"]],"slider.error.overlap":["Maksimumværdien må ikke være mindre end minimumværdien"],"slider.error.required":["Dette felt er påkrævet"],"slider.label.from":["From"],"slider.label.to":["To"],"slider.placeholder.from":["Min"],"slider.placeholder.to":["Max"]}'),vc=JSON.parse('{"slider.error.out_of_bounds":["Value must be between ",["min"]," and ",["max"]],"slider.error.overlap":["The maximum value cannot be less than the minimum"],"slider.error.required":["This field is required"],"slider.label.from":["From"],"slider.label.to":["To"],"slider.placeholder.from":["Min"],"slider.placeholder.to":["Max"]}'),fc=JSON.parse('{"slider.error.out_of_bounds":["Arvon on oltava välillä ",["min"]," - ",["max"]],"slider.error.overlap":["Maksimiarvo ei voi olla pienempi kuin minimiarvo"],"slider.error.required":["Tämä kenttä on pakollinen"],"slider.label.from":["From"],"slider.label.to":["To"],"slider.placeholder.from":["Min"],"slider.placeholder.to":["Max"]}'),wc=JSON.parse('{"slider.error.out_of_bounds":["Verdien må være mellom ",["min"]," og ",["max"]],"slider.error.overlap":["Maksimumsverdien kan ikke være mindre enn minimumsverdien"],"slider.error.required":["Dette feltet er påkrevd"],"slider.label.from":["From"],"slider.label.to":["To"],"slider.placeholder.from":["Min"],"slider.placeholder.to":["Max"]}'),yc=JSON.parse('{"slider.error.out_of_bounds":["Värdet måste vara mellan ",["min"]," och ",["max"]],"slider.error.overlap":["Maxvärdet kan inte vara mindre än minimivärdet"],"slider.error.required":["Detta fält är obligatoriskt"],"slider.label.from":["From"],"slider.label.to":["To"],"slider.placeholder.from":["Min"],"slider.placeholder.to":["Max"]}'),xc=a`.w-slider{position:relative;border:none;padding:0;margin:0;display:grid;width:100%;grid-template-areas:"label" "description" "slider" "error";grid-template-columns:1fr;--w-slider-track-background:var(--w-s-color-background-disabled-subtle);--w-slider-track-active-background:var(--w-s-color-background-primary);--w-slider-track-height:4px;--w-slider-track-active-height:6px;--w-slider-thumb-background:var(--w-s-color-background-primary);--w-slider-thumb-background-hover:var(
|
|
105
|
+
--w-s-color-background-primary-hover
|
|
106
|
+
);--w-slider-thumb-size:28px;--w-slider-thumb-offset:calc(var(--w-slider-thumb-size) / 2);--w-slider-marker-color:var(--w-s-color-border);--_range-top:calc(
|
|
107
|
+
var(--w-slider-thumb-size) / 2 +
|
|
108
|
+
calc(
|
|
109
|
+
var(--w-slider-track-active-height) - calc(
|
|
110
|
+
var(--w-slider-track-height) / 2
|
|
111
|
+
) + 1px
|
|
112
|
+
)
|
|
113
|
+
)}.w-slider[disabled]{--w-slider-track-active-background:var(--w-s-color-background-disabled-subtle);--w-slider-thumb-background:var(--w-s-color-background-disabled-subtle);--w-slider-thumb-background-hover:var(--w-s-color-background-disabled-subtle)}.w-slider__label{grid-area:label;font-size:var(--w-font-size-s);line-height:var(--w-line-height-s);font-weight:700;padding-bottom:8px;color:var(--w-s-color-text)}.w-slider__description{grid-area:description}.w-slider__range{align-self:center;background:var(--w-slider-track-background);border-radius:4px;height:var(--w-slider-track-active-height);position:absolute;padding-inline-start:var(--active-range-inline-start-padding,0);padding-inline-end:var(--active-range-inline-end-padding,0);top:var(--_range-top);left:0;right:0;grid-area:slider}.w-slider__active-range{box-sizing:content-box;background:var(--w-slider-track-active-background);height:var(--w-slider-track-active-height);border-start-start-radius:var(--active-range-border-radius,0);border-end-start-radius:var(--active-range-border-radius,0);--max-with-offset:calc(var(--max) + var(--over-under-offset, 0));--offset-percentage:calc(calc(var(--from) - var(--min)) / calc(var(--max-with-offset) - var(--min)) * 100);margin-left:calc(max(var(--offset-percentage) * 1%,0px) - var(--range-slider-magic-pixel,0px));--value-range:calc(var(--max-with-offset) - var(--min));--range-span-percentage:calc(calc(min(var(--to), var(--max-with-offset)) - max(var(--min), var(--from))) / var(--value-range) * 100 );width:calc(var(--range-span-percentage) * 1% + var(--range-slider-magic-pixel,0px));z-index:1}.w-slider__markers{--_marker-height:7px;--_marker-width:1px;align-self:center;background:linear-gradient(to right,var(--w-slider-marker-color) var(--_marker-width),rgba(0,0,0,0) 1px calc(100% - 1px),var(--w-slider-marker-color) 100%) repeat-x;--_step-width-as-percent:calc(var(--markers) / var(--_value-range) * 100);background-size:calc(var(--_step-width-as-percent) * 1%) var(--_marker-height);background-position:bottom 0 left 8px right 8px;position:absolute;top:calc(var(--_range-top) + 2px);left:1px;right:1px;grid-area:slider;height:var(--_marker-height);margin-inline:var(--w-slider-thumb-offset)}.w-slider__error{grid-area:error;padding-top:8px;font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs);color:var(--w-s-color-text-negative)}.w-slider__help-text{grid-area:error;padding-top:8px;font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}slot::slotted(w-slider-thumb){position:static;top:0;left:0;right:0;bottom:0;grid-area:slider}`;var kc=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};class _c extends ne{static{this.shadowRootOptions={...ne.shadowRootOptions,delegatesFocus:!0}}static{this.styles=[De,xc]}constructor(){super(),this.disabled=!1,this.openEnded=!1,this.invalid=!1,this.required=!1,this.hiddenTextfield=!1,this._invalidMessage="",this._hasInternalError=!1,this._showError=!1,this._tabbableElements=[],ft(vc,wc,fc,mc,yc)}#ue(){const e=this.querySelectorAll("w-slider-thumb");let t=!1;for(const r of e.values())r.min=this.edgeMin,r.max=this.edgeMax,r.step=this.step,r.suffix=this.suffix??"",r.required=this.required,r.labelFormatter=this.labelFormatter,r.valueFormatter=this.valueFormatter,r.tooltipFormatter=this.tooltipFormatter,r.openEnded=this.openEnded,r._hiddenTextfield=this.hiddenTextfield,r.ariaLabel||(r.slot||(r.ariaLabel=this.label),"from"===r.slot&&(r.ariaLabel=`${this.label} min`),"to"===r.slot&&(r.ariaLabel=`${this.label} max`)),"from"!==r.slot&&"to"!==r.slot||(t=!0),r.disabled=this.disabled,r.invalid=Boolean(this.errorText),this.#pe(r);t?(this.fieldset.style.setProperty("--active-range-inline-start-padding","var(--w-slider-thumb-size, 28px)"),this.fieldset.style.setProperty("--active-range-inline-end-padding","var(--w-slider-thumb-size, 28px)")):this.fieldset.style.setProperty("--active-range-border-radius","4px")}get edgeMin(){return this.openEnded?(Number(this.min)-1).toString():this.min}get edgeMax(){return this.openEnded?(Number(this.max)+1).toString():this.max}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.step&&this.fieldset.style.setProperty("--step",String(this.step)),void 0!==this.min&&this.fieldset.style.setProperty("--min",this.edgeMin),void 0!==this.max&&this.fieldset.style.setProperty("--max",this.max),this.markers&&this.fieldset.style.setProperty("--markers",String(this.markers)),this.openEnded&&this.fieldset.style.setProperty("--over-under-offset","1");const e=this.querySelectorAll("w-slider-thumb");if(2===e.length){this.fieldset.style.setProperty("--range-slider-magic-pixel","1px");const t=Array.from(e);this._tabbableElements[0]=t[0].shadowRoot.querySelector("input"),this._tabbableElements[1]=t[1].shadowRoot.querySelector("input"),this._tabbableElements[2]=t[0].shadowRoot.querySelector("w-textfield"),this._tabbableElements[3]=t[1].shadowRoot.querySelector("w-textfield")}else if(1===e.length){const t=Array.from(e);this._tabbableElements[0]=t[0].shadowRoot.querySelector("input"),this._tabbableElements[1]=t[0].shadowRoot.querySelector("w-textfield")}this.invalid&&this.error&&(this._showError=!0),this.#ue()}updated(e){(e.has("disabled")||e.has("required")||e.has("min")||e.has("step")||e.has("max")||e.has("suffix")||e.has("labelFormatter")||e.has("valueFormatter")||e.has("_invalidMessage")||e.has("_hasInternalError"))&&this.#ue(),(e.has("error")||e.has("invalid"))&&(this.error&&this.invalid?this._showError=!0:this._showError=!1,this.#ue())}#be(e){e.stopPropagation();const t=e.target;this.#pe(t)}#N(e){const t=e.target;this.#pe(t);t.slot&&this.#ge()}#me(){this.componentHasError?this._showError=!0:this._showError=!1,this.#ue()}#l(e){if("Tab"===e.key){const t=this._tabbableElements.indexOf(e.target.shadowRoot.activeElement);if(-1===t)return;const r=e.shiftKey?-1:1,o=this._tabbableElements[t+r];if(!o)return;e.preventDefault(),o.focus()}}#ge(){let e,t;const r=this.querySelectorAll("w-slider-thumb");for(const o of r.values())"from"===o.slot&&(e=o),"to"===o.slot&&(t=o);e&&t&&(e.invalid||t.invalid)}#ve(e){e.stopPropagation();const t=this._hasInternalError||this.invalid,r=e.target;if(this._hasInternalError=Boolean(e.detail.invalid)||this.invalid,this._invalidMessage=e.detail.invalid,!0===t&&!1===this._hasInternalError){const e=this.querySelectorAll("w-slider-thumb");for(const t of e.values())t!==r&&t.updateFieldAfterValidation()}}#fe(e,t){return void 0!==t.value&&null!==t.value||(t.value=this.openEnded?"":e),""===t.value?e:t.value}#pe(e){const t=e.slot;t||this.fieldset.style.setProperty("--from","0"),"from"===t&&this.fieldset.style.setProperty("--from",this.#fe(this.edgeMin,e)),t&&"to"!==t||this.fieldset.style.setProperty("--to",this.#fe(this.edgeMax,e))}get componentHasError(){return this.invalid||this._hasInternalError}get errorText(){return this._showError?this.error||this._invalidMessage:""}render(){return q`<fieldset id="fieldset" class="w-slider" @input="${this.#N}" @focusout="${this.#me}" @slidervalidity="${this.#ve}" @thumbreset="${this.#be}" @keydown="${this.#l}" aria-invalid="${this.errorText?"true":W}" ?disabled="${this.disabled}">${this.label?q`<legend class="w-slider__label"><slot id="label" name="label">${this.label}</slot></legend>`:q`<slot id="label" name="label"></slot>`}<slot class="w-slider__description" name="description"></slot>${this.markers?q`<div class="w-slider__markers"></div>`:W}<div class="w-slider__range"><div class="w-slider__active-range"></div></div><slot class="w-slider__slider" @slotchange="${this.#ue}"></slot><slot class="w-slider__slider" name="from" @slotchange="${this.#ue}"></slot><slot class="w-slider__slider" name="to" @slotchange="${this.#ue}"></slot>${this.errorText?q`<p class="w-slider__error" aria-describes="fieldset">${this.errorText}</p>`:this.helpText?q`<p class="w-slider__help-text" aria-describes="fieldset">${this.helpText}</p>`:W}</fieldset>`}}kc([ce({reflect:!0})],_c.prototype,"label",void 0),kc([ce({type:Boolean,reflect:!0})],_c.prototype,"disabled",void 0),kc([ce({type:Boolean,attribute:"open-ended"})],_c.prototype,"openEnded",void 0),kc([ce({type:String,reflect:!0})],_c.prototype,"error",void 0),kc([ce({type:String,reflect:!0,attribute:"help-text"})],_c.prototype,"helpText",void 0),kc([ce({type:Boolean,reflect:!0})],_c.prototype,"invalid",void 0),kc([ce({type:Boolean,reflect:!0})],_c.prototype,"required",void 0),kc([ce({reflect:!0})],_c.prototype,"min",void 0),kc([ce({reflect:!0})],_c.prototype,"max",void 0),kc([ce({type:Number,reflect:!0})],_c.prototype,"markers",void 0),kc([ce({type:Number,reflect:!0})],_c.prototype,"step",void 0),kc([ce({reflect:!0})],_c.prototype,"suffix",void 0),kc([ce({type:Boolean,reflect:!0,attribute:"hidden-textfield"})],_c.prototype,"hiddenTextfield",void 0),kc([ce({attribute:!1})],_c.prototype,"valueFormatter",void 0),kc([ce({attribute:!1})],_c.prototype,"tooltipFormatter",void 0),kc([ce({attribute:!1})],_c.prototype,"labelFormatter",void 0),kc([pe("fieldset")],_c.prototype,"fieldset",void 0),kc([he()],_c.prototype,"_invalidMessage",void 0),kc([he()],_c.prototype,"_hasInternalError",void 0),kc([he()],_c.prototype,"_showError",void 0),kc([he()],_c.prototype,"_tabbableElements",void 0),customElements.get("w-slider")||customElements.define("w-slider",_c);const $c=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.text-center{text-align:center}.text-right{text-align:right}.border-2{border-width:2px}.rounded-full{border-radius:9999px}.flex{display:flex}.grid{display:grid}.flex-1{flex:1}.gap-x-16{column-gap:1.6rem}.gap-y-16{row-gap:1.6rem}.row-span-2{grid-row:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.row-start-1{grid-row-start:1}.row-start-2{grid-row-start:2}.col-start-2{grid-column-start:2}.grid-flow-col{grid-auto-flow:column}.grid-rows-\\[20px_auto\\]{grid-template-rows:20px auto}.grid-rows-\\[auto_20px\\]{grid-template-rows:auto 20px}.grid-cols-\\[1fr_20px_1fr\\]{grid-template-columns:1fr 20px 1fr}.grid-cols-\\[1fr_20px\\]{grid-template-columns:1fr 20px}.grid-cols-\\[20px_1fr\\]{grid-template-columns:20px 1fr}.items-center{align-items:center}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.s-icon-inverted{color:var(--w-s-color-icon-inverted)}.s-border{border-color:var(--w-s-color-border)}.s-border-primary{border-color:var(--w-s-color-border-primary)}.h-2{height:.2rem}.h-20{height:2rem}.h-full{height:100%}.w-2{width:.2rem}.w-20{width:2rem}.w-full{width:100%}.last\\:mb-0:last-child{margin-bottom:0}.px-16{padding-left:1.6rem;padding-right:1.6rem}.pb-0{padding-bottom:0}.pb-32{padding-bottom:3.2rem}.invisible{visibility:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}`,Sc=JSON.parse('{"steps.aria.active":["Trinindikator aktiv cirkel"],"steps.aria.completed":["Trinindikator fuldført cirkel"],"steps.aria.emptyCircle":["Tom cirkel"]}'),Ec=JSON.parse('{"steps.aria.active":["Step indicator active circle"],"steps.aria.completed":["Step indicator completed circle"],"steps.aria.emptyCircle":["Empty circle"]}'),Cc=JSON.parse('{"steps.aria.active":["Vaiheilmaisin aktiivinen ympyrä"],"steps.aria.completed":["Vaiheilmaisin valmis ympyrä"],"steps.aria.emptyCircle":["Tyhjä ympyrä"]}'),Oc=JSON.parse('{"steps.aria.active":["Stegindikator aktiv sirkel"],"steps.aria.completed":["Stegindikator hel sirkel"],"steps.aria.emptyCircle":["Tom sirkel"]}'),zc=JSON.parse('{"steps.aria.active":["Stegindikator aktiv cirkel"],"steps.aria.completed":["Stegindikator fulländad cirkel"],"steps.aria.emptyCircle":["Tom cirkel"]}');var Ac=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const Dc="group/step",Pc="group/stepv grid-rows-[20px_auto] grid grid-flow-col gap-x-16",Mc="group/steph grid-rows-[auto_20px] grid-cols-[1fr_20px_1fr] flex-1 grid items-center",Tc="grid-cols-[20px_1fr]",jc="grid-cols-[1fr_20px] text-right",Rc="rounded-full border-2 h-20 w-20 transition-colors duration-300 s-icon-inverted",Nc="col-start-2",Ic="row-start-2 justify-self-end",Vc="s-border-primary s-bg-primary",Fc="s-border s-bg",Lc="transition-colors duration-300",qc="w-2 h-full justify-self-center",Bc="col-start-2",Wc="h-2 w-full row-start-2",Hc="s-bg-disabled",Yc="s-bg-primary",Xc="last:mb-0",Uc="row-span-2 pb-32",Jc="col-span-3 px-16 row-start-1 text-center";class Kc extends ne{static{this.styles=[De,$c]}constructor(){super(),this.active=!1,this.completed=!1,this._context={horizontal:!1,right:!1,isLast:!1,isFirst:!1},this._internals=this.attachInternals(),ft(Ec,Oc,Cc,Sc,zc)}connectedCallback(){super.connectedCallback(),this._internals.role="listitem"}setContext(e){this._context=e}getAriaLabel(){return this.completed?ut._({id:"steps.aria.completed",message:"Step indicator completed circle",comment:"Completed circle"}):this.active?ut._({id:"steps.aria.active",message:"Step indicator active circle",comment:"Active circle"}):ut._({id:"steps.aria.emptyCircle",message:"Empty circle",comment:"Empty circle"})}render(){const e=!this._context.horizontal,t=!this._context.right,r=this._context.isFirst,o=this._context.isLast,i=Ee([Dc,e?Pc:Mc,e?t?Tc:jc:""]),a=Ee([Lc,Wc,this.active||this.completed?Yc:Hc,r?"invisible":""]),n=Ee([Rc,e?t?"":Nc:Ic,this.active||this.completed?Vc:Fc]),s=Ee([Lc,e?qc:Wc,e&&!t?Bc:"",this.completed?Yc:Hc,o?"invisible":""]),l=Ee([Xc,e?Uc:Jc,o?"pb-0":""]);return q`<div class="${i}" style="${Ae(this._context.horizontal?"height: 100%;":void 0)}">${e?W:q`<div class="${a}"></div>`}<div class="${n}" role="img" aria-label="${this.getAriaLabel()}" aria-current="${this.active?"step":W}">${this.completed?q`<w-icon name="Check" size="small" locale="${vt()}" data-testid="completed-icon" class="flex"></w-icon>`:W}</div><div class="${s}"></div><div class="${l}" style="${Ae(this._context.horizontal?"height: 100%;":void 0)}"><slot></slot></div></div>`}}Ac([ce({type:Boolean,reflect:!0})],Kc.prototype,"active",void 0),Ac([ce({type:Boolean,reflect:!0})],Kc.prototype,"completed",void 0),Ac([he()],Kc.prototype,"_context",void 0),customElements.get("w-step")||customElements.define("w-step",Kc);var Zc=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const Qc="w-full",Gc="flex";class eh extends ne{constructor(){super(...arguments),this.horizontal=!1,this.right=!1}static{this.styles=[De,$c]}updated(){this.updateStepsContext()}updateStepsContext(){const e=this.querySelectorAll("w-step");e.forEach((t,r)=>{t.setContext({horizontal:this.horizontal,right:this.right,isLast:r===e.length-1,isFirst:0===r})})}render(){const e=Ee([Qc,this.horizontal&&Gc]);return q`<div role="list" class="${e}" ${this.horizontal&&"style='display: grid; grid-auto-rows: 1fr;grid-template-columns: 1fr;'"}><slot></slot></div>`}}Zc([ce({type:Boolean,reflect:!0})],eh.prototype,"horizontal",void 0),Zc([ce({type:Boolean,reflect:!0})],eh.prototype,"right",void 0),customElements.get("w-step-indicator")||customElements.define("w-step-indicator",eh);const th=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.bg-\\[--w-s-color-border-strong\\]{background-color:var(--w-s-color-border-strong)}.group:hover .group-hover\\:bg-\\[--w-s-color-border-strong-hover\\]{background-color:var(--w-s-color-border-strong-hover)}.border{border-width:1px}.rounded-full{border-radius:9999px}.block{display:block}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:0}.left-0{left:0}.left-4{left:.4rem}.top-0{top:0}.top-4{top:.4rem}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.group:hover .group-hover\\:s-bg-hover{background-color:var(--w-s-color-background-hover)}.group:hover .group-hover\\:s-bg-primary-hover{background-color:var(--w-s-color-background-primary-hover)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-strong{border-color:var(--w-s-color-border-strong)}.group:hover .group-hover\\:s-border-strong-hover{border-color:var(--w-s-color-border-strong-hover)}.h-16{height:1.6rem}.h-24{height:2.4rem}.h-full{height:100%}.w-16{width:1.6rem}.w-44{width:4.4rem}.w-full{width:100%}.cursor-pointer{cursor:pointer}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.translate-x-20{--w-translate-x:2rem;transform:translateX(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.transform-gpu{transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}`;var rh=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const oh="block relative h-24 w-44 cursor-pointer group focusable rounded-full",ih="pointer-events-none",ah="absolute top-0 left-0 h-full w-full rounded-full transition-colors",nh="s-bg-primary group-hover:s-bg-primary-hover",sh="s-bg border s-border-strong group-hover:s-bg-hover group-hover:s-border-strong-hover",lh="s-bg-disabled",dh="s-bg-disabled-subtle border s-border-disabled",ch="absolute transform-gpu h-16 w-16 top-4 left-4 rounded-full transition-transform",hh="translate-x-20",uh="s-bg",ph="bg-[--w-s-color-border-strong] group-hover:bg-[--w-s-color-border-strong-hover]",bh="s-bg-disabled-subtle",gh="s-bg-disabled";class mh extends(ze(ne)){constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.#we=null,this._handleHostClick=e=>{this.disabled||e.composedPath()[0]===this&&this._handleClick()},this._handleKeyDown=e=>{this.disabled||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),this._handleClick())}}static{this.shadowRootOptions={...ne.shadowRootOptions,delegatesFocus:!0}}#we;static{this.styles=[De,th,a`:host{display:inline-block}button:focus{outline:0}button:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}`]}get _baseClasses(){return Ee([oh,this.disabled&&ih])}get _trackClasses(){return Ee([ah,this.disabled?this.checked?lh:dh:this.checked?nh:sh])}get _handleClasses(){return Ee([ch,this.checked&&hh,this.disabled?this.checked?bh:gh:this.checked?uh:ph])}_handleClick(){this.disabled||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked,value:this.value||null},bubbles:!0,composed:!0})))}_syncA11yState(){this.internals.ariaChecked=this.checked?"true":"false",this.internals.ariaDisabled=this.disabled?"true":null}connectedCallback(){this.#we=this.checked,super.connectedCallback(),this.internals.role="switch";const e=this.getAttribute("aria-label");e&&(this.internals.ariaLabel=e),this.disabled||this.setValue(this.checked&&this.value?this.value:null),this._syncA11yState(),this.addEventListener("click",this._handleHostClick),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){this.removeEventListener("click",this._handleHostClick),this.removeEventListener("keydown",this._handleKeyDown),super.disconnectedCallback()}willUpdate(e){e.has("checked")&&(this.disabled||this.setValue(this.checked&&this.value?this.value:null)),(e.has("checked")||e.has("disabled"))&&this._syncA11yState()}resetFormControl(){this.checked=this.#we}render(){return q`<div><button type="button" role="none" tabindex="${this.disabled?-1:0}" class="${this._baseClasses}" ?disabled="${this.disabled}" @click="${this._handleClick}"><span data-testid="track" class="${this._trackClasses}"></span> <span data-testid="handle" class="${this._handleClasses}"></span></button></div>`}}rh([ce({type:String,reflect:!0})],mh.prototype,"name",void 0),rh([ce({type:String,reflect:!0})],mh.prototype,"value",void 0),rh([ce({type:Boolean,reflect:!0})],mh.prototype,"checked",void 0),rh([ce({type:Boolean,reflect:!0})],mh.prototype,"disabled",void 0),customElements.get("w-switch")||customElements.define("w-switch",mh);const vh=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.border-b{border-bottom-width:1px}.border-b-4{border-bottom-width:4px}.inline-block{display:inline-block}.inline-grid{display:inline-grid}.hidden{display:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.-bottom-0{bottom:0}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-border{border-color:var(--w-s-color-border)}.s-border-selected{border-color:var(--w-s-color-border-selected)}.-mb-1{margin-bottom:-.1rem}.mb-32{margin-bottom:3.2rem}.resize{resize:both}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.bg-transparent{background-color:#0000}.appearance-none{-webkit-appearance:none;appearance:none}.border-0{border-width:0}.border-b-4{border-bottom-width:4px}.border-transparent{border-color:#0000}.inline-block{display:inline-block}.flex{display:flex}.grid{display:grid}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:0}.gap-8{gap:.8rem}.focus\\:outline-none:focus{outline-offset:2px;outline:2px solid #0000}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-text-link{color:var(--w-s-color-text-link)}.s-text-subtle{color:var(--w-s-color-text-subtle)}.hover\\:s-text-link:hover{color:var(--w-s-color-text-link)}.s-border-selected{border-color:var(--w-s-color-border-selected)}.hover\\:s-border-primary:hover{border-color:var(--w-s-color-border-primary)}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.p-0{padding:0}.p-16{padding:1.6rem}.pb-8{padding-bottom:.8rem}.cursor-pointer{cursor:pointer}.font-bold{font-weight:700}.w-full{width:100%}`;var fh=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const wh="grid w-full items-center font-bold gap-8 antialias p-16 pb-8 border-b-4 bg-transparent border-transparent hover:s-text-link hover:s-border-primary",yh="s-text-subtle",xh="s-text-link s-border-selected",kh="mx-auto",_h="flex items-center justify-center gap-8",$h="content-underlined";class Sh extends ne{static{this.styles=[De,vh,a`::slotted([slot=icon]){display:flex}button.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus,#1a73e8);outline-offset:var(--w-outline-offset,1px)}`]}static{this.shadowRootOptions={...ne.shadowRootOptions,delegatesFocus:!0}}constructor(){super(),this._handleClick=e=>{e.tab||(e.tab=this)},this.active=!1,this.over=!1,this._internals=this.attachInternals()}get tabIndex(){return this._parentTabIndex??0}set tabIndex(e){this._parentTabIndex=e}get _computedAriaSelected(){return this._parentAriaSelected??this._ownAriaSelected}get _effectiveAriaControls(){return this._ariaControlsAttr||this.for||""}set ariaSelected(e){const t=this._ownAriaSelected;this._ownAriaSelected=e,this._internals.ariaSelected=this._computedAriaSelected??null,this.requestUpdate("ariaSelected",t)}get ariaSelected(){return this._computedAriaSelected??"false"}get _classes(){return Ee(["focusable appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block",wh,this.active||"true"===this.ariaSelected?xh:yh])}get _hasIcon(){return null!==this.querySelector('[slot="icon"]')}connectedCallback(){super.connectedCallback(),this._internals.role="tab",this.syncAriaControls(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}updated(e){super.updated(e);const t=e;e.has("_parentAriaSelected")&&(this._internals.ariaSelected=this._computedAriaSelected??null),t.has("_ariaControlsAttr")&&this.syncAriaControls(),e.has("for")&&this.syncAriaControls(),e.has("active")&&this.hasAttribute("active")&&(this._internals.ariaSelected=this.active?"true":"false")}syncAriaControls(){const e=this._effectiveAriaControls,t=this.closest("w-tabs"),r=t?.querySelector(`w-tab-panel#${CSS.escape(e)}`)??this.ownerDocument?.getElementById(e)??null,o=this._internals;"ariaControlsElements"in o?o.ariaControlsElements=r?[r]:[]:"ariaControls"in o&&(o.ariaControls=e||null)}render(){const e=this._hasIcon;return q`<button type="button" role="none" id="warp-tab-${this.for}" class="${this._classes}" tabindex="${this._parentTabIndex??0}" aria-controls="${this._effectiveAriaControls}" @click="${e=>{e.tab=this}}" style="height:100%">${e?this.over?q`<span class="${kh}"><slot name="icon"></slot></span><span class="${$h}"><slot></slot></span>`:q`<div class="${_h}"><slot name="icon"></slot><slot></slot></div>`:q`<span class="${$h}"><slot></slot></span>`}</button>`}}fh([ce({attribute:"for",reflect:!0})],Sh.prototype,"for",void 0),fh([ce({attribute:"aria-controls"})],Sh.prototype,"_ariaControlsAttr",void 0),fh([ce({attribute:!1})],Sh.prototype,"_parentTabIndex",void 0),fh([ce({attribute:!1})],Sh.prototype,"_parentAriaSelected",void 0),fh([ce({attribute:"aria-selected"})],Sh.prototype,"ariaSelected",null),fh([ce({type:Boolean,reflect:!0})],Sh.prototype,"active",void 0),fh([ce({type:Boolean,reflect:!0})],Sh.prototype,"over",void 0),customElements.get("w-tab")||customElements.define("w-tab",Sh);var Eh=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};class Ch extends ne{static{this.styles=[De,vh,a`:host{display:block}:host([hidden]){display:block!important}.panel-content{display:none}.panel-content[data-active]{display:block}`]}constructor(){super(),this._internals=this.attachInternals()}set active(e){this._ownActive=e}get active(){return this._parentActive??this._ownActive??!1}connectedCallback(){super.connectedCallback(),this._internals.role="tabpanel",this.syncA11yState()}updated(){this.syncA11yState()}syncA11yState(){const e=this._internals;e.ariaLabelledBy=this._parentAriaLabelledBy||null,e.ariaHidden=this.active?"false":"true"}render(){return q`<div class="panel-content" ?data-active="${this.active}"><slot></slot></div>`}}Eh([ce({attribute:"id",reflect:!0})],Ch.prototype,"id",void 0),Eh([ce({type:Boolean})],Ch.prototype,"active",null),Eh([ce({attribute:!1})],Ch.prototype,"_parentActive",void 0),Eh([ce({attribute:!1})],Ch.prototype,"_parentAriaLabelledBy",void 0),customElements.get("w-tab-panel")||customElements.define("w-tab-panel",Ch);function Oh(e=""){return`${e}${((e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&r[e]];return t})()}`}var zh=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const Ah="border-b s-border mb-32",Dh="inline-grid relative -mb-1",Ph="absolute s-border-selected -bottom-0 border-b-4 transition-all",Mh={cols1:"grid-cols-1",cols2:"grid-cols-2",cols3:"grid-cols-3",cols4:"grid-cols-4",cols5:"grid-cols-5",cols6:"grid-cols-6",cols7:"grid-cols-7",cols8:"grid-cols-8",cols9:"grid-cols-9"};class Th extends ne{static{this.styles=[De,vh]}constructor(){super(),this._uniqueId=Oh(),this._activeTabFor="",this._updateSelectionIndicatorDebounced=function(e,t=200,r=!1){let o;return(...i)=>{const a=r&&!o;o&&clearTimeout(o),o=setTimeout(()=>{o=null,r||e(...i)},t),a&&e(...i)}}(this.updateSelectionIndicator.bind(this),100),this._assignSlots=()=>{Array.from(this.children).forEach(e=>{e instanceof HTMLElement&&("W-TAB"!==e.tagName||e.getAttribute("slot")||e.setAttribute("slot","tabs"),"W-TAB-PANEL"!==e.tagName||e.getAttribute("slot")||e.setAttribute("slot","panels"))}),this.requestUpdate()},this._handleTabClick=e=>{const t=e.tab?.for;t&&t!==this._activeTabFor&&(this.active=t,this._activeTabFor=t,this.updateSelectionIndicator(),this.updatePanels(),this._notifyTabChange())},this._handleKeyDown=e=>{if(e.altKey||e.ctrlKey||e.shiftKey||!["ArrowLeft","ArrowRight","Home","End"].includes(e.key))return;const t=Array.from(this.querySelectorAll("w-tab")),r=t.findIndex(e=>e.for===this._activeTabFor);if(-1===r)return;let o=r;switch(e.key){case"Home":o=0;break;case"End":o=t.length-1;break;case"ArrowLeft":o=Math.max(0,r-1);break;case"ArrowRight":o=Math.min(t.length-1,r+1)}if(o!==r){e.preventDefault();const r=t[o],i=r.for;i&&(this.active=i,this._activeTabFor=i,this.updateSelectionIndicator(),this.updatePanels(),this._notifyTabChange(),r.focus())}},this.addEventListener("click",this._handleTabClick)}connectedCallback(){super.connectedCallback(),this.active&&(this._activeTabFor=this.active),this._assignSlots(),"undefined"!=typeof ResizeObserver&&(this._resizeObserver=new ResizeObserver(()=>{this._updateSelectionIndicatorDebounced()}),this._resizeObserver.observe(this)),window.addEventListener("resize",this._updateSelectionIndicatorDebounced)}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver&&this._resizeObserver.disconnect(),window.removeEventListener("resize",this._updateSelectionIndicatorDebounced),this.removeEventListener("click",this._handleTabClick)}firstUpdated(){this._assignSlots(),this._initializeActiveTab(),this.updateSelectionIndicator(),this.updatePanels()}updated(e){e.has("active")&&this.active!==this._activeTabFor&&(this._activeTabFor=this.active,this.updateSelectionIndicator(),this.updatePanels(),this._notifyTabChange())}get tabs(){const e=this.shadowRoot?.querySelector('slot[name="tabs"]');if(!e)return[];return e.assignedElements({flatten:!0}).filter(e=>"w-tab"===e.tagName.toLowerCase())}get activeTab(){return this.tabs.filter(e=>e.for===this._activeTabFor)[0]}_initializeActiveTab(){this.activeTab?this._activeTabFor=this.activeTab.getAttribute("for")||"":this.tabs.length>0&&(this._activeTabFor=this.tabs[0].getAttribute("for")||""),this._activeTabFor&&this._activeTabFor!==this.active&&(this.active=this._activeTabFor)}_notifyTabChange(){this.dispatchEvent(new CustomEvent("change",{detail:{panelId:this._activeTabFor},bubbles:!0,composed:!0}))}updateSelectionIndicator(){requestAnimationFrame(()=>{if(!this.tabList||!this.selectionIndicator)return;if(!this.activeTab)return;const e=this.tabList.getBoundingClientRect(),t=this.activeTab.getBoundingClientRect(),r=t.left-e.left,o=t.width;this.selectionIndicator.style.left=`${r}px`,this.selectionIndicator.style.width=`${o}px`})}updatePanels(){const e=Array.from(this.querySelectorAll("w-tab"));e.forEach((e,t)=>{e.id||(e.id=`w-tab-${this._uniqueId}-${t}`);const r=e.for===this._activeTabFor;e._parentAriaSelected=r?"true":"false",e._parentTabIndex=r?0:-1});Array.from(this.querySelectorAll("w-tab-panel")).forEach(t=>{const r=e.find(e=>e.for===t.id);r&&(t._parentAriaLabelledBy=r.id),t._parentActive=t.id===this._activeTabFor})}get _tabCount(){return this.querySelectorAll("w-tab").length}get _gridClass(){const e=Math.min(this._tabCount,9);return Mh[`cols${e}`]||Mh.cols1}render(){const e=Ee(Ah),t=Ee([Dh,this._gridClass]);return q`<div class="${e}"><div role="tablist" class="${t}" @keydown="${this._handleKeyDown}"><slot name="tabs" @slotchange="${this._assignSlots}"></slot><span class="selection-indicator ${Ph}" data-testid="selection-indicator"></span></div></div><slot name="panels" @slotchange="${this._assignSlots}"></slot><slot @slotchange="${this._assignSlots}"></slot>`}}zh([ce({reflect:!0})],Th.prototype,"active",void 0),zh([pe('[role="tablist"]')],Th.prototype,"tabList",void 0),zh([pe(".selection-indicator")],Th.prototype,"selectionIndicator",void 0),customElements.get("w-tabs")||customElements.define("w-tabs",Th);const jh=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.border-1{border-width:1px}.rounded-4{border-radius:4px}.caret-current{caret-color:currentColor}.block{display:block}.flex{display:flex}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:0}.outline-\\[--w-s-color-border-negative\\]\\!{outline-color:var(--w-s-color-border-negative)!important}.fixed{position:fixed}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-text{color:var(--w-s-color-text)}.s-text-disabled{color:var(--w-s-color-text-disabled)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-text-subtle{color:var(--w-s-color-text-subtle)}.placeholder\\:s-text-placeholder::placeholder{color:var(--w-s-color-text-placeholder)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-negative{border-color:var(--w-s-color-border-negative)}.s-border-strong{border-color:var(--w-s-color-border-strong)}.hover\\:s-border-negative-hover:hover{border-color:var(--w-s-color-border-negative-hover)}.hover\\:s-border-strong-hover:hover{border-color:var(--w-s-color-border-strong-hover)}.active\\:s-border-selected:active{border-color:var(--w-s-color-border-selected)}.w-full{width:100%}.min-h-\\[42\\]{min-height:4.2rem}.mb-0{margin-bottom:0}.mt-4{margin-top:.4rem}.px-8{padding-left:.8rem;padding-right:.8rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.pb-4{padding-bottom:.4rem}.pl-0{padding-left:0}.pl-8{padding-left:.8rem}.pr-40{padding-right:4rem}.pl-\\[var\\(--w-prefix-width\\,_40px\\)\\]{padding-left:var(--w-prefix-width,40px)}.cursor-pointer{cursor:pointer}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.font-normal{font-weight:400}.pointer-events-none{pointer-events:none}.resize{resize:both}.resize-none{resize:none}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-s{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-m{line-height:var(--w-line-height-m)}@media (min-width:480px){.sm\\:min-h-\\[45\\]{min-height:4.5rem}}`;var Rh=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const Nh="block text-m leading-m mb-0 px-8 py-12 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] caret-current",Ih="border-1 s-text s-bg s-border-strong hover:s-border-strong-hover active:s-border-selected",Vh="border-1 s-text-disabled s-bg-disabled-subtle s-border-disabled pointer-events-none",Fh="border-1 s-text-negative s-bg s-border-negative hover:s-border-negative-hover outline-[--w-s-color-border-negative]!",Lh="pl-0 bg-transparent pointer-events-none",qh="placeholder:s-text-placeholder",Bh="min-h-[42] sm:min-h-[45]",Wh="resize-none",Hh="antialiased block relative text-s font-bold pb-4 cursor-pointer s-text flex",Yh="pl-8 font-normal text-s s-text-subtle",Xh="text-xs mt-4 block",Uh="s-text-subtle",Jh="s-text-negative";class Kh extends(ze(ne)){constructor(){super(...arguments),this.disabled=!1,this.invalid=!1,this.readOnly=!1,this.readonly=!1,this.required=!1,this.optional=!1,this.minHeight=Number.NEGATIVE_INFINITY,this.maxHeight=Number.POSITIVE_INFINITY,this.#e=null,this.#ye=Oh("textarea-"),this.#xe=!1,this.#ke=void 0,this.#i=!1,this.#a=e=>{e.preventDefault(),this.#i=!0,this.#s()}}static{this.shadowRootOptions={...ne.shadowRootOptions,delegatesFocus:!0}}#e;#ye;#xe;#ke;#i;updated(e){e.has("value")&&this.setValue(this.value),(e.has("value")||e.has("required")||e.has("disabled"))&&this.#s()}resetFormControl(){this.value=this.#e,this.#i=!1,this.#_e(),this.#s()}get validationMessage(){return this.internals.validationMessage}get validity(){return this.internals.validity}checkValidity(){return this.#s(),this.internals.checkValidity()}reportValidity(){return this.#i=!0,this.#s(),this.internals.checkValidity()}setCustomValidity(e){e?(this.internals.setValidity({customError:!0},e,this._textarea),this.#$e(e)):(this.#_e(),this.#s())}#$e(e){this.#xe||(this.#ke=this.helpText),this.#xe=!0,this.invalid=!0,this.helpText=e}#_e(){this.#xe&&(this.invalid=!1,this.helpText=this.#ke,this.#ke=void 0,this.#xe=!1)}#s(){if(this.disabled)return this.internals.setValidity({}),void this.#_e();if(this.required&&!this.value){const e=this._textarea?.validationMessage||"";return this.internals.setValidity({valueMissing:!0},e,this._textarea),void(this.#i&&this.#$e(e))}this.internals.setValidity({}),this.#_e()}static{this.styles=[De,jh]}get _textareaStyles(){return Ee([Nh,Bh,!!this.placeholder&&qh,!this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&Ih,this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&Fh,!this.invalid&&this.disabled&&!(this.readonly||this.readOnly)&&Vh,!this.invalid&&!this.disabled&&(this.readonly||this.readOnly)&&Lh,this.maxRows&&Wh])}get _helptextstyles(){return Ee([Xh,this.invalid?Jh:Uh])}get _helpId(){if(this.helpText)return`${this._id}__hint`}get _id(){return this.#ye}get _error(){if(this.invalid&&this._helpId)return this._helpId}async connectedCallback(){if(super.connectedCallback(),this.#e=this.value,this.setValue(this.value),this.addEventListener("invalid",this.#a),await this.updateComplete,this.value||this.minRows){const e=this.shadowRoot?.querySelector("textarea");e&&this.#Se(e)}}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("invalid",this.#a)}firstUpdated(e){super.firstUpdated(e),this.#s()}handler(e){const t=e.currentTarget;this.value=t.value,this.#Se(t)}#Ee(){this.#i=!0,this.#s()}#a;#Se(e){const t=getComputedStyle(e),r=Number.parseFloat(t.getPropertyValue("border-top-width")),o=Number.parseFloat(t.getPropertyValue("border-bottom-width")),i=Number.parseFloat(t.getPropertyValue("line-height")),a=Number.parseFloat(t.getPropertyValue("padding-top"))+Number.parseFloat(t.getPropertyValue("padding-bottom"))+o+r;this.minRows&&(this.minHeight=i*this.minRows+a),this.maxRows&&(this.maxHeight=i*this.maxRows+a);const n=e.scrollHeight+r+o,s=Math.min(this.maxHeight,Math.max(this.minHeight,n));e.style.setProperty("height",s+"px")}render(){return q`${this.label?q`<label for="${this._id}" class="${Hh}">${this.label} ${this.optional?q`<span class="${Yh}">${ut._({id:"textarea.label.optional",message:"(optional)",comment:"Shown behind label when marked as optional"})}</span>`:W}</label>`:W} <textarea id="${this._id}" class="${this._textareaStyles}" name="${Ae(this.name)}" placeholder="${Ae(this.placeholder)}" .value="${this.value||""}" aria-describedby="${Ae(this._helpId||(this.ariaDescription?"aria-description":void 0))}" aria-errormessage="${Ae(this._error)}" aria-invalid="${this.invalid?"true":W}" ?disabled="${this.disabled}" ?readonly="${this.readonly||this.readOnly}" ?required="${this.required}" @input="${this.handler}" @blur="${this.#Ee}">
|
|
114
|
+
</textarea> ${this.helpText?q`<div class="${this._helptextstyles}" id="${this._helpId}">${this.helpText}</div>`:W}`}}Rh([ce({type:Boolean,reflect:!0})],Kh.prototype,"disabled",void 0),Rh([ce({type:Boolean,reflect:!0})],Kh.prototype,"invalid",void 0),Rh([ce({type:String,reflect:!0})],Kh.prototype,"label",void 0),Rh([ce({type:String,reflect:!0,attribute:"help-text"})],Kh.prototype,"helpText",void 0),Rh([ce({type:Number,reflect:!0,attribute:"maximum-rows"})],Kh.prototype,"maxRows",void 0),Rh([ce({type:Number,reflect:!0,attribute:"minimum-rows"})],Kh.prototype,"minRows",void 0),Rh([ce({type:String,reflect:!0})],Kh.prototype,"name",void 0),Rh([ce({type:String,reflect:!0})],Kh.prototype,"placeholder",void 0),Rh([ce({type:Boolean,reflect:!0,attribute:"read-only"})],Kh.prototype,"readOnly",void 0),Rh([ce({type:Boolean,reflect:!0})],Kh.prototype,"readonly",void 0),Rh([ce({type:Boolean,reflect:!0})],Kh.prototype,"required",void 0),Rh([ce({type:String,reflect:!0})],Kh.prototype,"value",void 0),Rh([ce({type:Boolean,reflect:!0})],Kh.prototype,"optional",void 0),Rh([he()],Kh.prototype,"minHeight",void 0),Rh([he()],Kh.prototype,"maxHeight",void 0),Rh([pe("textarea")],Kh.prototype,"_textarea",void 0),customElements.get("w-textarea")||customElements.define("w-textarea",Kh);const Zh=a`*,:after,:before{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.bg-transparent{background-color:#0000}.border-2{border-width:2px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.block{display:block}.flex{display:flex}.grid{display:grid}.shrink-0{flex-shrink:0}.auto-rows-auto{grid-auto-rows:auto}.overflow-hidden{overflow:hidden}.self-center{align-self:center}.bottom-16{bottom:1.6rem}.left-0{left:0}.right-0{right:0}.justify-center{justify-content:center}.justify-items-center{justify-items:center}.fixed{position:fixed}.relative{position:relative}.static{position:static}.z-50{z-index:50}.s-bg-negative-subtle{background-color:var(--w-s-color-background-negative-subtle)}.s-bg-positive-subtle{background-color:var(--w-s-color-background-positive-subtle)}.s-bg-warning-subtle{background-color:var(--w-s-color-background-warning-subtle)}.s-text{color:var(--w-s-color-text)}.s-icon{color:var(--w-s-color-icon)}.s-icon-negative{color:var(--w-s-color-icon-negative)}.s-icon-positive{color:var(--w-s-color-icon-positive)}.s-icon-warning{color:var(--w-s-color-icon-warning)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border-negative-subtle{border-color:var(--w-s-color-border-negative-subtle)}.s-border-positive-subtle{border-color:var(--w-s-color-border-positive-subtle)}.s-border-warning-subtle{border-color:var(--w-s-color-border-warning-subtle)}.w-full{width:100%}.h-\\[16px\\]{height:16px}.w-\\[16px\\]{width:16px}.mx-8{margin-left:.8rem;margin-right:.8rem}.mx-auto{margin-left:auto;margin-right:auto}.last-child\\:mb-0>:last-child{margin-bottom:0}.ml-auto{margin-left:auto}.mr-8{margin-right:.8rem}.mt-16{margin-top:1.6rem}.m-\\[8px\\]{margin:8px}.p-8{padding:.8rem}.py-4{padding-top:.4rem;padding-bottom:.4rem}.p-\\[8px\\]{padding:8px}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.translate-z-0{--w-translate-z:0rem;transform:translateX(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.transform{transform:translateX(var(--w-translate-x)) translateY(var(--w-translate-y)) translateZ(var(--w-translate-z)) rotate(var(--w-rotate)) rotateX(var(--w-rotate-x)) rotateY(var(--w-rotate-y)) rotateZ(var(--w-rotate-z)) skewX(var(--w-skew-x)) skewY(var(--w-skew-y)) scaleX(var(--w-scale-x)) scaleY(var(--w-scale-y)) scaleZ(var(--w-scale-z))}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:480px){.sm\\:mx-16{margin-left:1.6rem;margin-right:1.6rem}}`;var Qh=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const Gh="fixed transform translate-z-0 bottom-16 left-0 right-0 mx-8 sm:mx-16 z-50 pointer-events-none",eu="grid auto-rows-auto justify-items-center justify-center mx-auto pointer-events-none",tu="w-full";class ru extends ne{constructor(){super(...arguments),this._toasts=new Map}static{this.styles=[De,Zh,a`:host{display:block}`]}connectedCallback(){super.connectedCallback(),this._interval=setInterval(()=>{const e=[],t=[];for(const r of this._toasts)Date.now()<=r[1].duration?e.push(r):t.push(r);const r=[];for(const[e]of t){const t=this.renderRoot.querySelector(`#${e}`);r.push(t.collapse())}Promise.all(r).then(()=>{e.length!==this._toasts.size&&(this._toasts=new Map(e))})},500)}disconnectedCallback(){super.disconnectedCallback(),this._interval&&clearTimeout(this._interval)}static init(){let e=document.querySelector("w-toast-container");return e||(e=document.createElement("w-toast-container"),document.body.appendChild(e)),e}get _toastsArray(){return Array.from(this._toasts).map(([,e])=>e)}get(e){if(!e)throw new Error('undefined "id" given when attempting to retrieve toast');if("string"!=typeof e&&!Number.isInteger(e))throw new Error('"id" must be number or string when attempting to retrieve toast');return this._toasts.get(e)}set(e){if(!e.id)throw new Error('invalid or undefined "id" on toast object');const t=this._toasts.set(e.id,{id:e.id,type:e.type??"success",text:e.text??"",canclose:e.canclose??!1,duration:Date.now()+(e.duration||5e3)});return this._toasts=new Map(Array.from(this._toasts)),t}async del(e){if(!e)throw new Error('undefined "id" given when attempting to retrieve toast');if("string"!=typeof e&&!Number.isInteger(e))throw new Error('"id" must be number or string when attempting to retrieve toast');const t=this.renderRoot.querySelector(`#${e}`);if(!this._toasts.has(e))return!1;await t.collapse();const r=this._toasts.delete(e);return this._toasts=new Map(Array.from(this._toasts)),r}render(){return q`<aside class="${Gh}"><div class="${eu}" id="w-toast-container-list">${da(this._toastsArray,e=>e.id,e=>q`<w-toast class="${tu}" id="${e.id}" type="${e.type}" text="${e.text}" ?canclose="${e.canclose}" @close="${()=>this.del(e.id)}"></w-toast>`)}</div></aside>`}}Qh([he()],ru.prototype,"_toasts",void 0),customElements.get("w-toast-container")||customElements.define("w-toast-container",ru);const ou=JSON.parse('{"toast.aria.error":["Fejl"],"toast.aria.successful":["Fuldført"],"toast.aria.warning":["Advarsel"]}'),iu=JSON.parse('{"toast.aria.error":["Error"],"toast.aria.successful":["Successful"],"toast.aria.warning":["Warning"]}'),au=JSON.parse('{"toast.aria.error":["Virhe"],"toast.aria.successful":["Onnistui"],"toast.aria.warning":["Varoitus"]}'),nu=JSON.parse('{"toast.aria.error":["Feil"],"toast.aria.successful":["Vellykket"],"toast.aria.warning":["Advarsel"]}'),su=JSON.parse('{"toast.aria.error":["Fel"],"toast.aria.successful":["Genomfört"],"toast.aria.warning":["Varning"]}'),lu="undefined"!=typeof window;function du(){return customElements.get("w-toast-container")}function cu(e,t){if(!lu)return;const r=du().init(),o={id:Date.now().toString(36)+Math.random().toString(36).slice(2,5),text:e,duration:5e3,type:"success",...t};return r.set(o),o}function hu(e){if(!lu)return;return du().init().del(e)}function uu(e,t){if(!lu)return;const r=du().init();return r.set({...r.get(e),...t}),r.get(e)}var pu=function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};const bu="relative overflow-hidden w-full",gu="flex group p-8 mt-16 rounded-8 border-2 pointer-events-auto transition-all",mu="s-bg-positive-subtle s-border-positive-subtle s-text",vu="s-bg-warning-subtle s-border-warning-subtle s-text",fu="s-bg-negative-subtle s-border-negative-subtle s-text",wu="shrink-0 rounded-full w-[16px] h-[16px] m-[8px]",yu="s-icon-positive",xu="s-icon-warning",ku="s-icon-negative",_u="self-center mr-8 py-4 last-child:mb-0";class $u extends ne{static{this.styles=[De,Zh,a`:host{display:block}`]}constructor(){super(),this.text="",this.canclose=!1,this._expanded=!1,ft(iu,nu,au,ou,su),this.id||(this.id=Date.now().toString(36)+Math.random().toString(36).slice(2,5))}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}updated(){!this._expanded&&this._wrapper&&Hs(this._wrapper,()=>this._expanded=!0)}get#Ce(){const e=this.type||"success";return Ee([gu,"success"===e&&mu,"warning"===e&&vu,"error"===e&&fu])}get#Oe(){const e=this.type||"success";return Ee([wu,"success"===e&&yu,"warning"===e&&xu,"error"===e&&ku])}get _wrapper(){return this.renderRoot?.querySelector("section")??null}get _warning(){return"warning"===(this.type||"success")}get _error(){return"error"===(this.type||"success")}get _role(){return this._error||this._warning?"alert":"status"}get _typeLabel(){return this._warning?ut._({id:"toast.aria.warning",message:"Warning",comment:"Default screenreader message for warning in toast component"}):this._error?ut._({id:"toast.aria.error",message:"Error",comment:"Default screenreader message for error in toast component"}):ut._({id:"toast.aria.successful",message:"Successful",comment:"Default screenreader message for successful in toast component"})}get _iconMarkup(){const e=vt();return this._warning?q`<w-icon name="Warning" size="small" locale="${e}" class="flex"></w-icon>`:this._error?q`<w-icon name="Error" size="small" locale="${e}" class="flex"></w-icon>`:q`<w-icon name="Success" size="small" locale="${e}" class="flex"></w-icon>`}async collapse(){return new Promise(e=>{this._expanded&&this._wrapper?Ys(this._wrapper,e):e()})}close(){const e=new CustomEvent("close",{detail:{id:this.id},bubbles:!0,composed:!0});this.updateComplete.then(()=>this.dispatchEvent(e))}render(){return this.text?q`<section class="${bu}" aria-label="${this._typeLabel}"><div class="${this.#Ce}"><div class="${this.#Oe}">${this._iconMarkup}</div><div role="${this._role}" class="${_u}"><p>${this.text}</p></div>${Bd(!0===this.canclose,()=>q`<w-button variant="pill" small="" @click="${this.close}"><w-icon name="Close" size="small" locale="${vt()}" style="display:flex" class="flex"></w-icon></w-button>`)}</div></section>`:q``}}pu([ce({type:String,attribute:!0,reflect:!0})],$u.prototype,"id",void 0),pu([ce({type:String,attribute:!0,reflect:!0})],$u.prototype,"type",void 0),pu([ce({type:String,attribute:!0,reflect:!0})],$u.prototype,"text",void 0),pu([ce({type:Boolean,attribute:!0,reflect:!0})],$u.prototype,"canclose",void 0),pu([he()],$u.prototype,"_expanded",void 0),customElements.get("w-toast")||customElements.define("w-toast",$u),Promise.all([customElements.whenDefined("w-icon"),customElements.whenDefined("w-textfield"),customElements.whenDefined("w-affix"),customElements.whenDefined("w-alert"),customElements.whenDefined("w-link"),customElements.whenDefined("w-button"),customElements.whenDefined("w-attention"),customElements.whenDefined("w-badge"),customElements.whenDefined("w-box"),customElements.whenDefined("w-breadcrumbs"),customElements.whenDefined("w-card"),customElements.whenDefined("w-checkbox"),customElements.whenDefined("w-checkbox-group"),customElements.whenDefined("w-combobox"),customElements.whenDefined("w-datepicker"),customElements.whenDefined("w-expandable"),customElements.whenDefined("w-modal"),customElements.whenDefined("w-modal-footer"),customElements.whenDefined("w-modal-header"),customElements.whenDefined("w-page-indicator"),customElements.whenDefined("w-pagination"),customElements.whenDefined("w-pill"),customElements.whenDefined("w-radio"),customElements.whenDefined("w-radio-group"),customElements.whenDefined("w-select"),customElements.whenDefined("w-slider-thumb"),customElements.whenDefined("w-slider"),customElements.whenDefined("w-step"),customElements.whenDefined("w-step-indicator"),customElements.whenDefined("w-switch"),customElements.whenDefined("w-tab"),customElements.whenDefined("w-tab-panel"),customElements.whenDefined("w-tabs"),customElements.whenDefined("w-textarea")]).then(()=>{performance.mark("vend/pc-design-system/warp-elements-loaded")});export{Tl as ModalFooter,Yl as ModalHeader,Pl as ModalMain,Gi as WCheckbox,sa as WCheckboxGroup,Se as WIcon,Md as WRadio,qd as WRadioGroup,Ot as WarpAffix,Mt as WarpAlert,ri as WarpAttention,ai as WarpBadge,li as WarpBox,yi as WarpBreadcrumbs,Kt as WarpButton,Fi as WarpCard,Qi as WarpCheckbox,na as WarpCheckboxGroup,Sa as WarpCombobox,Fs as WarpDatepicker,ml as WarpExpandable,$e as WarpIcon,qt as WarpLink,Dl as WarpModal,Ml as WarpModalFooter,Hl as WarpModalHeader,ed as WarpPageIndicator,cd as WarpPagination,Od as WarpPill,Pd as WarpRadio,Ld as WarpRadioGroup,hc as WarpSelect,_c as WarpSlider,gc as WarpSliderThumb,Kc as WarpStep,eh as WarpStepIndicator,mh as WarpSwitch,Sh as WarpTab,Ch as WarpTabPanel,Th as WarpTabs,Ye as WarpTextField,Kh as WarpTextarea,$u as WarpToast,ru as WarpToastContainer,hu as removeToast,cu as toast,uu as updateToast};
|
|
115
|
+
//# sourceMappingURL=index.js.map
|