@supersoniks/concorde 1.1.25 → 1.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +0 -0
  2. package/cli.js +0 -0
  3. package/concorde-core.bundle.js +22 -22
  4. package/concorde-core.es.js +19 -19
  5. package/core/components/functional/list/list.d.ts +3 -0
  6. package/core/components/ui/_css/scroll.d.ts +1 -0
  7. package/core/components/ui/_css/scroll.js +22 -0
  8. package/core/components/ui/_css/types.d.ts +2 -0
  9. package/core/components/ui/_css/types.js +60 -0
  10. package/core/components/ui/alert/alert.js +1 -1
  11. package/core/components/ui/button/button.d.ts +1 -1
  12. package/core/components/ui/button/button.js +0 -4
  13. package/core/components/ui/card/card-footer.d.ts +0 -1
  14. package/core/components/ui/card/card-footer.js +7 -9
  15. package/core/components/ui/card/card-main.d.ts +0 -1
  16. package/core/components/ui/card/card-main.js +7 -9
  17. package/core/components/ui/form/checkbox/checkbox.d.ts +1 -0
  18. package/core/components/ui/form/checkbox/checkbox.js +19 -0
  19. package/core/components/ui/form/css/form-control.js +36 -33
  20. package/core/components/ui/form/fieldset/fieldset.d.ts +1 -1
  21. package/core/components/ui/form/fieldset/fieldset.js +0 -4
  22. package/core/components/ui/form/fieldset/legend.d.ts +3 -3
  23. package/core/components/ui/form/fieldset/legend.js +3 -8
  24. package/core/components/ui/form/select/select.js +3 -2
  25. package/core/components/ui/form/textarea/textarea.js +3 -1
  26. package/core/components/ui/modal/modal.js +6 -20
  27. package/core/components/ui/table/table-caption.js +2 -11
  28. package/core/components/ui/table/table-td.d.ts +1 -0
  29. package/core/components/ui/table/table-td.js +13 -4
  30. package/core/components/ui/table/table-th.d.ts +1 -0
  31. package/core/components/ui/table/table-th.js +23 -9
  32. package/core/components/ui/table/table-tr.js +2 -0
  33. package/core/components/ui/table/table.d.ts +2 -0
  34. package/core/components/ui/table/table.js +26 -4
  35. package/core/components/ui/tabs/tabs.js +1 -1
  36. package/core/components/ui/theme/css/tailwind.css +0 -0
  37. package/core/components/ui/theme/css/tailwind.d.ts +0 -0
  38. package/core/components/ui/theme/theme-collection/core-variables.js +4 -1
  39. package/core/components/ui/toast/toast-item.js +3 -13
  40. package/core/mixins/Fetcher.d.ts +3 -1
  41. package/core/mixins/Fetcher.js +3 -1
  42. package/core/mixins/FormElement.js +4 -0
  43. package/core/utils/api.d.ts +2 -2
  44. package/core/utils/api.js +7 -7
  45. package/package.json +5 -1
@@ -2,19 +2,19 @@ var wt=Object.defineProperty,$t=Object.defineProperties;var xt=Object.getOwnProp
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const t$c=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,e$e=Symbol(),n$n=new Map;class s$c{constructor(O,B){if(this._$cssResult$=!0,B!==e$e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=O}get styleSheet(){let O=n$n.get(this.cssText);return t$c&&O===void 0&&(n$n.set(this.cssText,O=new CSSStyleSheet),O.replaceSync(this.cssText)),O}toString(){return this.cssText}}const o$h=q=>new s$c(typeof q=="string"?q:q+"",e$e),r$o=(q,...O)=>{const B=q.length===1?q[0]:O.reduce((D,U,W)=>D+(K=>{if(K._$cssResult$===!0)return K.cssText;if(typeof K=="number")return K;throw Error("Value passed to 'css' function must be a 'css' function result: "+K+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(U)+q[W+1],q[0]);return new s$c(B,e$e)},i$t=(q,O)=>{t$c?q.adoptedStyleSheets=O.map(B=>B instanceof CSSStyleSheet?B:B.styleSheet):O.forEach(B=>{const D=document.createElement("style"),U=window.litNonce;U!==void 0&&D.setAttribute("nonce",U),D.textContent=B.cssText,q.appendChild(D)})},S$2=t$c?q=>q:q=>q instanceof CSSStyleSheet?(O=>{let B="";for(const D of O.cssRules)B+=D.cssText;return o$h(B)})(q):q;/**
5
+ */const t$c=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,e$e=Symbol(),n$n=new Map;class s$d{constructor(O,B){if(this._$cssResult$=!0,B!==e$e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=O}get styleSheet(){let O=n$n.get(this.cssText);return t$c&&O===void 0&&(n$n.set(this.cssText,O=new CSSStyleSheet),O.replaceSync(this.cssText)),O}toString(){return this.cssText}}const o$h=q=>new s$d(typeof q=="string"?q:q+"",e$e),r$k=(q,...O)=>{const B=q.length===1?q[0]:O.reduce((D,U,W)=>D+(K=>{if(K._$cssResult$===!0)return K.cssText;if(typeof K=="number")return K;throw Error("Value passed to 'css' function must be a 'css' function result: "+K+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(U)+q[W+1],q[0]);return new s$d(B,e$e)},i$s=(q,O)=>{t$c?q.adoptedStyleSheets=O.map(B=>B instanceof CSSStyleSheet?B:B.styleSheet):O.forEach(B=>{const D=document.createElement("style"),U=window.litNonce;U!==void 0&&D.setAttribute("nonce",U),D.textContent=B.cssText,q.appendChild(D)})},S$2=t$c?q=>q:q=>q instanceof CSSStyleSheet?(O=>{let B="";for(const D of O.cssRules)B+=D.cssText;return o$h(B)})(q):q;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */var s$b;const e$d=window.trustedTypes,r$n=e$d?e$d.emptyScript:"",h$c=window.reactiveElementPolyfillSupport,o$g={toAttribute(q,O){switch(O){case Boolean:q=q?r$n:null;break;case Object:case Array:q=q==null?q:JSON.stringify(q)}return q},fromAttribute(q,O){let B=q;switch(O){case Boolean:B=q!==null;break;case Number:B=q===null?null:Number(q);break;case Object:case Array:try{B=JSON.parse(q)}catch{B=null}}return B}},n$m=(q,O)=>O!==q&&(O==O||q==q),l$s={attribute:!0,type:String,converter:o$g,reflect:!1,hasChanged:n$m};class a$q extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(O){var B;(B=this.l)!==null&&B!==void 0||(this.l=[]),this.l.push(O)}static get observedAttributes(){this.finalize();const O=[];return this.elementProperties.forEach((B,D)=>{const U=this._$Eh(D,B);U!==void 0&&(this._$Eu.set(U,D),O.push(U))}),O}static createProperty(O,B=l$s){if(B.state&&(B.attribute=!1),this.finalize(),this.elementProperties.set(O,B),!B.noAccessor&&!this.prototype.hasOwnProperty(O)){const D=typeof O=="symbol"?Symbol():"__"+O,U=this.getPropertyDescriptor(O,D,B);U!==void 0&&Object.defineProperty(this.prototype,O,U)}}static getPropertyDescriptor(O,B,D){return{get(){return this[B]},set(U){const W=this[O];this[B]=U,this.requestUpdate(O,W,D)},configurable:!0,enumerable:!0}}static getPropertyOptions(O){return this.elementProperties.get(O)||l$s}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const O=Object.getPrototypeOf(this);if(O.finalize(),this.elementProperties=new Map(O.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const B=this.properties,D=[...Object.getOwnPropertyNames(B),...Object.getOwnPropertySymbols(B)];for(const U of D)this.createProperty(U,B[U])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(O){const B=[];if(Array.isArray(O)){const D=new Set(O.flat(1/0).reverse());for(const U of D)B.unshift(S$2(U))}else O!==void 0&&B.push(S$2(O));return B}static _$Eh(O,B){const D=B.attribute;return D===!1?void 0:typeof D=="string"?D:typeof O=="string"?O.toLowerCase():void 0}o(){var O;this._$Ep=new Promise(B=>this.enableUpdating=B),this._$AL=new Map,this._$Em(),this.requestUpdate(),(O=this.constructor.l)===null||O===void 0||O.forEach(B=>B(this))}addController(O){var B,D;((B=this._$Eg)!==null&&B!==void 0?B:this._$Eg=[]).push(O),this.renderRoot!==void 0&&this.isConnected&&((D=O.hostConnected)===null||D===void 0||D.call(O))}removeController(O){var B;(B=this._$Eg)===null||B===void 0||B.splice(this._$Eg.indexOf(O)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach((O,B)=>{this.hasOwnProperty(B)&&(this._$Et.set(B,this[B]),delete this[B])})}createRenderRoot(){var O;const B=(O=this.shadowRoot)!==null&&O!==void 0?O:this.attachShadow(this.constructor.shadowRootOptions);return i$t(B,this.constructor.elementStyles),B}connectedCallback(){var O;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(O=this._$Eg)===null||O===void 0||O.forEach(B=>{var D;return(D=B.hostConnected)===null||D===void 0?void 0:D.call(B)})}enableUpdating(O){}disconnectedCallback(){var O;(O=this._$Eg)===null||O===void 0||O.forEach(B=>{var D;return(D=B.hostDisconnected)===null||D===void 0?void 0:D.call(B)})}attributeChangedCallback(O,B,D){this._$AK(O,D)}_$ES(O,B,D=l$s){var U,W;const K=this.constructor._$Eh(O,D);if(K!==void 0&&D.reflect===!0){const Y=((W=(U=D.converter)===null||U===void 0?void 0:U.toAttribute)!==null&&W!==void 0?W:o$g.toAttribute)(B,D.type);this._$Ei=O,Y==null?this.removeAttribute(K):this.setAttribute(K,Y),this._$Ei=null}}_$AK(O,B){var D,U,W;const K=this.constructor,Y=K._$Eu.get(O);if(Y!==void 0&&this._$Ei!==Y){const Z=K.getPropertyOptions(Y),G=Z.converter,st=(W=(U=(D=G)===null||D===void 0?void 0:D.fromAttribute)!==null&&U!==void 0?U:typeof G=="function"?G:null)!==null&&W!==void 0?W:o$g.fromAttribute;this._$Ei=Y,this[Y]=st(B,Z.type),this._$Ei=null}}requestUpdate(O,B,D){let U=!0;O!==void 0&&(((D=D||this.constructor.getPropertyOptions(O)).hasChanged||n$m)(this[O],B)?(this._$AL.has(O)||this._$AL.set(O,B),D.reflect===!0&&this._$Ei!==O&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(O,D))):U=!1),!this.isUpdatePending&&U&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(B){Promise.reject(B)}const O=this.scheduleUpdate();return O!=null&&await O,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var O;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach((U,W)=>this[W]=U),this._$Et=void 0);let B=!1;const D=this._$AL;try{B=this.shouldUpdate(D),B?(this.willUpdate(D),(O=this._$Eg)===null||O===void 0||O.forEach(U=>{var W;return(W=U.hostUpdate)===null||W===void 0?void 0:W.call(U)}),this.update(D)):this._$EU()}catch(U){throw B=!1,this._$EU(),U}B&&this._$AE(D)}willUpdate(O){}_$AE(O){var B;(B=this._$Eg)===null||B===void 0||B.forEach(D=>{var U;return(U=D.hostUpdated)===null||U===void 0?void 0:U.call(D)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(O)),this.updated(O)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(O){return!0}update(O){this._$EC!==void 0&&(this._$EC.forEach((B,D)=>this._$ES(D,this[D],B)),this._$EC=void 0),this._$EU()}updated(O){}firstUpdated(O){}}a$q.finalized=!0,a$q.elementProperties=new Map,a$q.elementStyles=[],a$q.shadowRootOptions={mode:"open"},h$c==null||h$c({ReactiveElement:a$q}),((s$b=globalThis.reactiveElementVersions)!==null&&s$b!==void 0?s$b:globalThis.reactiveElementVersions=[]).push("1.3.2");/**
9
+ */var s$c;const e$d=window.trustedTypes,r$j=e$d?e$d.emptyScript:"",h$d=window.reactiveElementPolyfillSupport,o$g={toAttribute(q,O){switch(O){case Boolean:q=q?r$j:null;break;case Object:case Array:q=q==null?q:JSON.stringify(q)}return q},fromAttribute(q,O){let B=q;switch(O){case Boolean:B=q!==null;break;case Number:B=q===null?null:Number(q);break;case Object:case Array:try{B=JSON.parse(q)}catch{B=null}}return B}},n$m=(q,O)=>O!==q&&(O==O||q==q),l$t={attribute:!0,type:String,converter:o$g,reflect:!1,hasChanged:n$m};class a$s extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(O){var B;(B=this.l)!==null&&B!==void 0||(this.l=[]),this.l.push(O)}static get observedAttributes(){this.finalize();const O=[];return this.elementProperties.forEach((B,D)=>{const U=this._$Eh(D,B);U!==void 0&&(this._$Eu.set(U,D),O.push(U))}),O}static createProperty(O,B=l$t){if(B.state&&(B.attribute=!1),this.finalize(),this.elementProperties.set(O,B),!B.noAccessor&&!this.prototype.hasOwnProperty(O)){const D=typeof O=="symbol"?Symbol():"__"+O,U=this.getPropertyDescriptor(O,D,B);U!==void 0&&Object.defineProperty(this.prototype,O,U)}}static getPropertyDescriptor(O,B,D){return{get(){return this[B]},set(U){const W=this[O];this[B]=U,this.requestUpdate(O,W,D)},configurable:!0,enumerable:!0}}static getPropertyOptions(O){return this.elementProperties.get(O)||l$t}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const O=Object.getPrototypeOf(this);if(O.finalize(),this.elementProperties=new Map(O.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const B=this.properties,D=[...Object.getOwnPropertyNames(B),...Object.getOwnPropertySymbols(B)];for(const U of D)this.createProperty(U,B[U])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(O){const B=[];if(Array.isArray(O)){const D=new Set(O.flat(1/0).reverse());for(const U of D)B.unshift(S$2(U))}else O!==void 0&&B.push(S$2(O));return B}static _$Eh(O,B){const D=B.attribute;return D===!1?void 0:typeof D=="string"?D:typeof O=="string"?O.toLowerCase():void 0}o(){var O;this._$Ep=new Promise(B=>this.enableUpdating=B),this._$AL=new Map,this._$Em(),this.requestUpdate(),(O=this.constructor.l)===null||O===void 0||O.forEach(B=>B(this))}addController(O){var B,D;((B=this._$Eg)!==null&&B!==void 0?B:this._$Eg=[]).push(O),this.renderRoot!==void 0&&this.isConnected&&((D=O.hostConnected)===null||D===void 0||D.call(O))}removeController(O){var B;(B=this._$Eg)===null||B===void 0||B.splice(this._$Eg.indexOf(O)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach((O,B)=>{this.hasOwnProperty(B)&&(this._$Et.set(B,this[B]),delete this[B])})}createRenderRoot(){var O;const B=(O=this.shadowRoot)!==null&&O!==void 0?O:this.attachShadow(this.constructor.shadowRootOptions);return i$s(B,this.constructor.elementStyles),B}connectedCallback(){var O;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(O=this._$Eg)===null||O===void 0||O.forEach(B=>{var D;return(D=B.hostConnected)===null||D===void 0?void 0:D.call(B)})}enableUpdating(O){}disconnectedCallback(){var O;(O=this._$Eg)===null||O===void 0||O.forEach(B=>{var D;return(D=B.hostDisconnected)===null||D===void 0?void 0:D.call(B)})}attributeChangedCallback(O,B,D){this._$AK(O,D)}_$ES(O,B,D=l$t){var U,W;const K=this.constructor._$Eh(O,D);if(K!==void 0&&D.reflect===!0){const Y=((W=(U=D.converter)===null||U===void 0?void 0:U.toAttribute)!==null&&W!==void 0?W:o$g.toAttribute)(B,D.type);this._$Ei=O,Y==null?this.removeAttribute(K):this.setAttribute(K,Y),this._$Ei=null}}_$AK(O,B){var D,U,W;const K=this.constructor,Y=K._$Eu.get(O);if(Y!==void 0&&this._$Ei!==Y){const Z=K.getPropertyOptions(Y),G=Z.converter,st=(W=(U=(D=G)===null||D===void 0?void 0:D.fromAttribute)!==null&&U!==void 0?U:typeof G=="function"?G:null)!==null&&W!==void 0?W:o$g.fromAttribute;this._$Ei=Y,this[Y]=st(B,Z.type),this._$Ei=null}}requestUpdate(O,B,D){let U=!0;O!==void 0&&(((D=D||this.constructor.getPropertyOptions(O)).hasChanged||n$m)(this[O],B)?(this._$AL.has(O)||this._$AL.set(O,B),D.reflect===!0&&this._$Ei!==O&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(O,D))):U=!1),!this.isUpdatePending&&U&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(B){Promise.reject(B)}const O=this.scheduleUpdate();return O!=null&&await O,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var O;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach((U,W)=>this[W]=U),this._$Et=void 0);let B=!1;const D=this._$AL;try{B=this.shouldUpdate(D),B?(this.willUpdate(D),(O=this._$Eg)===null||O===void 0||O.forEach(U=>{var W;return(W=U.hostUpdate)===null||W===void 0?void 0:W.call(U)}),this.update(D)):this._$EU()}catch(U){throw B=!1,this._$EU(),U}B&&this._$AE(D)}willUpdate(O){}_$AE(O){var B;(B=this._$Eg)===null||B===void 0||B.forEach(D=>{var U;return(U=D.hostUpdated)===null||U===void 0?void 0:U.call(D)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(O)),this.updated(O)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(O){return!0}update(O){this._$EC!==void 0&&(this._$EC.forEach((B,D)=>this._$ES(D,this[D],B)),this._$EC=void 0),this._$EU()}updated(O){}firstUpdated(O){}}a$s.finalized=!0,a$s.elementProperties=new Map,a$s.elementStyles=[],a$s.shadowRootOptions={mode:"open"},h$d==null||h$d({ReactiveElement:a$s}),((s$c=globalThis.reactiveElementVersions)!==null&&s$c!==void 0?s$c:globalThis.reactiveElementVersions=[]).push("1.3.2");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */var t$b;const i$s=globalThis.trustedTypes,s$a=i$s?i$s.createPolicy("lit-html",{createHTML:q=>q}):void 0,e$c=`lit$${(Math.random()+"").slice(9)}$`,o$f="?"+e$c,n$l=`<${o$f}>`,l$r=document,h$b=(q="")=>l$r.createComment(q),r$m=q=>q===null||typeof q!="object"&&typeof q!="function",d$r=Array.isArray,u$9=q=>{var O;return d$r(q)||typeof((O=q)===null||O===void 0?void 0:O[Symbol.iterator])=="function"},c$p=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$8=/-->/g,a$p=/>/g,f$m=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,_$1=/'/g,m$h=/"/g,g$6=/^(?:script|style|textarea|title)$/i,p$i=q=>(O,...B)=>({_$litType$:q,strings:O,values:B}),$$2=p$i(1),b$5=Symbol.for("lit-noChange"),w$1=Symbol.for("lit-nothing"),T$3=new WeakMap,x$3=(q,O,B)=>{var D,U;const W=(D=B==null?void 0:B.renderBefore)!==null&&D!==void 0?D:O;let K=W._$litPart$;if(K===void 0){const Y=(U=B==null?void 0:B.renderBefore)!==null&&U!==void 0?U:null;W._$litPart$=K=new N(O.insertBefore(h$b(),Y),Y,void 0,B!=null?B:{})}return K._$AI(q),K},A$3=l$r.createTreeWalker(l$r,129,null,!1),C$1=(q,O)=>{const B=q.length-1,D=[];let U,W=O===2?"<svg>":"",K=c$p;for(let Z=0;Z<B;Z++){const G=q[Z];let st,tt,Q=-1,rt=0;for(;rt<G.length&&(K.lastIndex=rt,tt=K.exec(G),tt!==null);)rt=K.lastIndex,K===c$p?tt[1]==="!--"?K=v$8:tt[1]!==void 0?K=a$p:tt[2]!==void 0?(g$6.test(tt[2])&&(U=RegExp("</"+tt[2],"g")),K=f$m):tt[3]!==void 0&&(K=f$m):K===f$m?tt[0]===">"?(K=U!=null?U:c$p,Q=-1):tt[1]===void 0?Q=-2:(Q=K.lastIndex-tt[2].length,st=tt[1],K=tt[3]===void 0?f$m:tt[3]==='"'?m$h:_$1):K===m$h||K===_$1?K=f$m:K===v$8||K===a$p?K=c$p:(K=f$m,U=void 0);const ot=K===f$m&&q[Z+1].startsWith("/>")?" ":"";W+=K===c$p?G+n$l:Q>=0?(D.push(st),G.slice(0,Q)+"$lit$"+G.slice(Q)+e$c+ot):G+e$c+(Q===-2?(D.push(void 0),Z):ot)}const Y=W+(q[B]||"<?>")+(O===2?"</svg>":"");if(!Array.isArray(q)||!q.hasOwnProperty("raw"))throw Error("invalid template strings array");return[s$a!==void 0?s$a.createHTML(Y):Y,D]};class E{constructor({strings:O,_$litType$:B},D){let U;this.parts=[];let W=0,K=0;const Y=O.length-1,Z=this.parts,[G,st]=C$1(O,B);if(this.el=E.createElement(G,D),A$3.currentNode=this.el.content,B===2){const tt=this.el.content,Q=tt.firstChild;Q.remove(),tt.append(...Q.childNodes)}for(;(U=A$3.nextNode())!==null&&Z.length<Y;){if(U.nodeType===1){if(U.hasAttributes()){const tt=[];for(const Q of U.getAttributeNames())if(Q.endsWith("$lit$")||Q.startsWith(e$c)){const rt=st[K++];if(tt.push(Q),rt!==void 0){const ot=U.getAttribute(rt.toLowerCase()+"$lit$").split(e$c),nt=/([.?@])?(.*)/.exec(rt);Z.push({type:1,index:W,name:nt[2],strings:ot,ctor:nt[1]==="."?M$1:nt[1]==="?"?H:nt[1]==="@"?I:S$1})}else Z.push({type:6,index:W})}for(const Q of tt)U.removeAttribute(Q)}if(g$6.test(U.tagName)){const tt=U.textContent.split(e$c),Q=tt.length-1;if(Q>0){U.textContent=i$s?i$s.emptyScript:"";for(let rt=0;rt<Q;rt++)U.append(tt[rt],h$b()),A$3.nextNode(),Z.push({type:2,index:++W});U.append(tt[Q],h$b())}}}else if(U.nodeType===8)if(U.data===o$f)Z.push({type:2,index:W});else{let tt=-1;for(;(tt=U.data.indexOf(e$c,tt+1))!==-1;)Z.push({type:7,index:W}),tt+=e$c.length-1}W++}}static createElement(O,B){const D=l$r.createElement("template");return D.innerHTML=O,D}}function P$3(q,O,B=q,D){var U,W,K,Y;if(O===b$5)return O;let Z=D!==void 0?(U=B._$Cl)===null||U===void 0?void 0:U[D]:B._$Cu;const G=r$m(O)?void 0:O._$litDirective$;return(Z==null?void 0:Z.constructor)!==G&&((W=Z==null?void 0:Z._$AO)===null||W===void 0||W.call(Z,!1),G===void 0?Z=void 0:(Z=new G(q),Z._$AT(q,B,D)),D!==void 0?((K=(Y=B)._$Cl)!==null&&K!==void 0?K:Y._$Cl=[])[D]=Z:B._$Cu=Z),Z!==void 0&&(O=P$3(q,Z._$AS(q,O.values),Z,D)),O}class V$1{constructor(O,B){this.v=[],this._$AN=void 0,this._$AD=O,this._$AM=B}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(O){var B;const{el:{content:D},parts:U}=this._$AD,W=((B=O==null?void 0:O.creationScope)!==null&&B!==void 0?B:l$r).importNode(D,!0);A$3.currentNode=W;let K=A$3.nextNode(),Y=0,Z=0,G=U[0];for(;G!==void 0;){if(Y===G.index){let st;G.type===2?st=new N(K,K.nextSibling,this,O):G.type===1?st=new G.ctor(K,G.name,G.strings,this,O):G.type===6&&(st=new L$2(K,this,O)),this.v.push(st),G=U[++Z]}Y!==(G==null?void 0:G.index)&&(K=A$3.nextNode(),Y++)}return W}m(O){let B=0;for(const D of this.v)D!==void 0&&(D.strings!==void 0?(D._$AI(O,D,B),B+=D.strings.length-2):D._$AI(O[B])),B++}}class N{constructor(O,B,D,U){var W;this.type=2,this._$AH=w$1,this._$AN=void 0,this._$AA=O,this._$AB=B,this._$AM=D,this.options=U,this._$Cg=(W=U==null?void 0:U.isConnected)===null||W===void 0||W}get _$AU(){var O,B;return(B=(O=this._$AM)===null||O===void 0?void 0:O._$AU)!==null&&B!==void 0?B:this._$Cg}get parentNode(){let O=this._$AA.parentNode;const B=this._$AM;return B!==void 0&&O.nodeType===11&&(O=B.parentNode),O}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(O,B=this){O=P$3(this,O,B),r$m(O)?O===w$1||O==null||O===""?(this._$AH!==w$1&&this._$AR(),this._$AH=w$1):O!==this._$AH&&O!==b$5&&this.$(O):O._$litType$!==void 0?this.T(O):O.nodeType!==void 0?this.k(O):u$9(O)?this.S(O):this.$(O)}M(O,B=this._$AB){return this._$AA.parentNode.insertBefore(O,B)}k(O){this._$AH!==O&&(this._$AR(),this._$AH=this.M(O))}$(O){this._$AH!==w$1&&r$m(this._$AH)?this._$AA.nextSibling.data=O:this.k(l$r.createTextNode(O)),this._$AH=O}T(O){var B;const{values:D,_$litType$:U}=O,W=typeof U=="number"?this._$AC(O):(U.el===void 0&&(U.el=E.createElement(U.h,this.options)),U);if(((B=this._$AH)===null||B===void 0?void 0:B._$AD)===W)this._$AH.m(D);else{const K=new V$1(W,this),Y=K.p(this.options);K.m(D),this.k(Y),this._$AH=K}}_$AC(O){let B=T$3.get(O.strings);return B===void 0&&T$3.set(O.strings,B=new E(O)),B}S(O){d$r(this._$AH)||(this._$AH=[],this._$AR());const B=this._$AH;let D,U=0;for(const W of O)U===B.length?B.push(D=new N(this.M(h$b()),this.M(h$b()),this,this.options)):D=B[U],D._$AI(W),U++;U<B.length&&(this._$AR(D&&D._$AB.nextSibling,U),B.length=U)}_$AR(O=this._$AA.nextSibling,B){var D;for((D=this._$AP)===null||D===void 0||D.call(this,!1,!0,B);O&&O!==this._$AB;){const U=O.nextSibling;O.remove(),O=U}}setConnected(O){var B;this._$AM===void 0&&(this._$Cg=O,(B=this._$AP)===null||B===void 0||B.call(this,O))}}class S$1{constructor(O,B,D,U,W){this.type=1,this._$AH=w$1,this._$AN=void 0,this.element=O,this.name=B,this._$AM=U,this.options=W,D.length>2||D[0]!==""||D[1]!==""?(this._$AH=Array(D.length-1).fill(new String),this.strings=D):this._$AH=w$1}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(O,B=this,D,U){const W=this.strings;let K=!1;if(W===void 0)O=P$3(this,O,B,0),K=!r$m(O)||O!==this._$AH&&O!==b$5,K&&(this._$AH=O);else{const Y=O;let Z,G;for(O=W[0],Z=0;Z<W.length-1;Z++)G=P$3(this,Y[D+Z],B,Z),G===b$5&&(G=this._$AH[Z]),K||(K=!r$m(G)||G!==this._$AH[Z]),G===w$1?O=w$1:O!==w$1&&(O+=(G!=null?G:"")+W[Z+1]),this._$AH[Z]=G}K&&!U&&this.C(O)}C(O){O===w$1?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,O!=null?O:"")}}class M$1 extends S$1{constructor(){super(...arguments),this.type=3}C(O){this.element[this.name]=O===w$1?void 0:O}}const k$2=i$s?i$s.emptyScript:"";class H extends S$1{constructor(){super(...arguments),this.type=4}C(O){O&&O!==w$1?this.element.setAttribute(this.name,k$2):this.element.removeAttribute(this.name)}}class I extends S$1{constructor(O,B,D,U,W){super(O,B,D,U,W),this.type=5}_$AI(O,B=this){var D;if((O=(D=P$3(this,O,B,0))!==null&&D!==void 0?D:w$1)===b$5)return;const U=this._$AH,W=O===w$1&&U!==w$1||O.capture!==U.capture||O.once!==U.once||O.passive!==U.passive,K=O!==w$1&&(U===w$1||W);W&&this.element.removeEventListener(this.name,this,U),K&&this.element.addEventListener(this.name,this,O),this._$AH=O}handleEvent(O){var B,D;typeof this._$AH=="function"?this._$AH.call((D=(B=this.options)===null||B===void 0?void 0:B.host)!==null&&D!==void 0?D:this.element,O):this._$AH.handleEvent(O)}}class L$2{constructor(O,B,D){this.element=O,this.type=6,this._$AN=void 0,this._$AM=B,this.options=D}get _$AU(){return this._$AM._$AU}_$AI(O){P$3(this,O)}}const R$1={L:"$lit$",P:e$c,V:o$f,I:1,N:C$1,R:V$1,j:u$9,D:P$3,H:N,F:S$1,O:H,W:I,B:M$1,Z:L$2},z=window.litHtmlPolyfillSupport;z==null||z(E,N),((t$b=globalThis.litHtmlVersions)!==null&&t$b!==void 0?t$b:globalThis.litHtmlVersions=[]).push("2.2.3");/**
13
+ */var t$b;const i$r=globalThis.trustedTypes,s$b=i$r?i$r.createPolicy("lit-html",{createHTML:q=>q}):void 0,e$c=`lit$${(Math.random()+"").slice(9)}$`,o$f="?"+e$c,n$l=`<${o$f}>`,l$s=document,h$c=(q="")=>l$s.createComment(q),r$i=q=>q===null||typeof q!="object"&&typeof q!="function",d$s=Array.isArray,u$b=q=>{var O;return d$s(q)||typeof((O=q)===null||O===void 0?void 0:O[Symbol.iterator])=="function"},c$n=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$8=/-->/g,a$r=/>/g,f$i=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,_$1=/'/g,m$h=/"/g,g$6=/^(?:script|style|textarea|title)$/i,p$j=q=>(O,...B)=>({_$litType$:q,strings:O,values:B}),$$2=p$j(1),b$6=Symbol.for("lit-noChange"),w$1=Symbol.for("lit-nothing"),T$3=new WeakMap,x$3=(q,O,B)=>{var D,U;const W=(D=B==null?void 0:B.renderBefore)!==null&&D!==void 0?D:O;let K=W._$litPart$;if(K===void 0){const Y=(U=B==null?void 0:B.renderBefore)!==null&&U!==void 0?U:null;W._$litPart$=K=new N(O.insertBefore(h$c(),Y),Y,void 0,B!=null?B:{})}return K._$AI(q),K},A$3=l$s.createTreeWalker(l$s,129,null,!1),C$1=(q,O)=>{const B=q.length-1,D=[];let U,W=O===2?"<svg>":"",K=c$n;for(let Z=0;Z<B;Z++){const G=q[Z];let st,tt,Q=-1,rt=0;for(;rt<G.length&&(K.lastIndex=rt,tt=K.exec(G),tt!==null);)rt=K.lastIndex,K===c$n?tt[1]==="!--"?K=v$8:tt[1]!==void 0?K=a$r:tt[2]!==void 0?(g$6.test(tt[2])&&(U=RegExp("</"+tt[2],"g")),K=f$i):tt[3]!==void 0&&(K=f$i):K===f$i?tt[0]===">"?(K=U!=null?U:c$n,Q=-1):tt[1]===void 0?Q=-2:(Q=K.lastIndex-tt[2].length,st=tt[1],K=tt[3]===void 0?f$i:tt[3]==='"'?m$h:_$1):K===m$h||K===_$1?K=f$i:K===v$8||K===a$r?K=c$n:(K=f$i,U=void 0);const ot=K===f$i&&q[Z+1].startsWith("/>")?" ":"";W+=K===c$n?G+n$l:Q>=0?(D.push(st),G.slice(0,Q)+"$lit$"+G.slice(Q)+e$c+ot):G+e$c+(Q===-2?(D.push(void 0),Z):ot)}const Y=W+(q[B]||"<?>")+(O===2?"</svg>":"");if(!Array.isArray(q)||!q.hasOwnProperty("raw"))throw Error("invalid template strings array");return[s$b!==void 0?s$b.createHTML(Y):Y,D]};class E{constructor({strings:O,_$litType$:B},D){let U;this.parts=[];let W=0,K=0;const Y=O.length-1,Z=this.parts,[G,st]=C$1(O,B);if(this.el=E.createElement(G,D),A$3.currentNode=this.el.content,B===2){const tt=this.el.content,Q=tt.firstChild;Q.remove(),tt.append(...Q.childNodes)}for(;(U=A$3.nextNode())!==null&&Z.length<Y;){if(U.nodeType===1){if(U.hasAttributes()){const tt=[];for(const Q of U.getAttributeNames())if(Q.endsWith("$lit$")||Q.startsWith(e$c)){const rt=st[K++];if(tt.push(Q),rt!==void 0){const ot=U.getAttribute(rt.toLowerCase()+"$lit$").split(e$c),nt=/([.?@])?(.*)/.exec(rt);Z.push({type:1,index:W,name:nt[2],strings:ot,ctor:nt[1]==="."?M$1:nt[1]==="?"?H:nt[1]==="@"?I:S$1})}else Z.push({type:6,index:W})}for(const Q of tt)U.removeAttribute(Q)}if(g$6.test(U.tagName)){const tt=U.textContent.split(e$c),Q=tt.length-1;if(Q>0){U.textContent=i$r?i$r.emptyScript:"";for(let rt=0;rt<Q;rt++)U.append(tt[rt],h$c()),A$3.nextNode(),Z.push({type:2,index:++W});U.append(tt[Q],h$c())}}}else if(U.nodeType===8)if(U.data===o$f)Z.push({type:2,index:W});else{let tt=-1;for(;(tt=U.data.indexOf(e$c,tt+1))!==-1;)Z.push({type:7,index:W}),tt+=e$c.length-1}W++}}static createElement(O,B){const D=l$s.createElement("template");return D.innerHTML=O,D}}function P$3(q,O,B=q,D){var U,W,K,Y;if(O===b$6)return O;let Z=D!==void 0?(U=B._$Cl)===null||U===void 0?void 0:U[D]:B._$Cu;const G=r$i(O)?void 0:O._$litDirective$;return(Z==null?void 0:Z.constructor)!==G&&((W=Z==null?void 0:Z._$AO)===null||W===void 0||W.call(Z,!1),G===void 0?Z=void 0:(Z=new G(q),Z._$AT(q,B,D)),D!==void 0?((K=(Y=B)._$Cl)!==null&&K!==void 0?K:Y._$Cl=[])[D]=Z:B._$Cu=Z),Z!==void 0&&(O=P$3(q,Z._$AS(q,O.values),Z,D)),O}class V$1{constructor(O,B){this.v=[],this._$AN=void 0,this._$AD=O,this._$AM=B}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(O){var B;const{el:{content:D},parts:U}=this._$AD,W=((B=O==null?void 0:O.creationScope)!==null&&B!==void 0?B:l$s).importNode(D,!0);A$3.currentNode=W;let K=A$3.nextNode(),Y=0,Z=0,G=U[0];for(;G!==void 0;){if(Y===G.index){let st;G.type===2?st=new N(K,K.nextSibling,this,O):G.type===1?st=new G.ctor(K,G.name,G.strings,this,O):G.type===6&&(st=new L$2(K,this,O)),this.v.push(st),G=U[++Z]}Y!==(G==null?void 0:G.index)&&(K=A$3.nextNode(),Y++)}return W}m(O){let B=0;for(const D of this.v)D!==void 0&&(D.strings!==void 0?(D._$AI(O,D,B),B+=D.strings.length-2):D._$AI(O[B])),B++}}class N{constructor(O,B,D,U){var W;this.type=2,this._$AH=w$1,this._$AN=void 0,this._$AA=O,this._$AB=B,this._$AM=D,this.options=U,this._$Cg=(W=U==null?void 0:U.isConnected)===null||W===void 0||W}get _$AU(){var O,B;return(B=(O=this._$AM)===null||O===void 0?void 0:O._$AU)!==null&&B!==void 0?B:this._$Cg}get parentNode(){let O=this._$AA.parentNode;const B=this._$AM;return B!==void 0&&O.nodeType===11&&(O=B.parentNode),O}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(O,B=this){O=P$3(this,O,B),r$i(O)?O===w$1||O==null||O===""?(this._$AH!==w$1&&this._$AR(),this._$AH=w$1):O!==this._$AH&&O!==b$6&&this.$(O):O._$litType$!==void 0?this.T(O):O.nodeType!==void 0?this.k(O):u$b(O)?this.S(O):this.$(O)}M(O,B=this._$AB){return this._$AA.parentNode.insertBefore(O,B)}k(O){this._$AH!==O&&(this._$AR(),this._$AH=this.M(O))}$(O){this._$AH!==w$1&&r$i(this._$AH)?this._$AA.nextSibling.data=O:this.k(l$s.createTextNode(O)),this._$AH=O}T(O){var B;const{values:D,_$litType$:U}=O,W=typeof U=="number"?this._$AC(O):(U.el===void 0&&(U.el=E.createElement(U.h,this.options)),U);if(((B=this._$AH)===null||B===void 0?void 0:B._$AD)===W)this._$AH.m(D);else{const K=new V$1(W,this),Y=K.p(this.options);K.m(D),this.k(Y),this._$AH=K}}_$AC(O){let B=T$3.get(O.strings);return B===void 0&&T$3.set(O.strings,B=new E(O)),B}S(O){d$s(this._$AH)||(this._$AH=[],this._$AR());const B=this._$AH;let D,U=0;for(const W of O)U===B.length?B.push(D=new N(this.M(h$c()),this.M(h$c()),this,this.options)):D=B[U],D._$AI(W),U++;U<B.length&&(this._$AR(D&&D._$AB.nextSibling,U),B.length=U)}_$AR(O=this._$AA.nextSibling,B){var D;for((D=this._$AP)===null||D===void 0||D.call(this,!1,!0,B);O&&O!==this._$AB;){const U=O.nextSibling;O.remove(),O=U}}setConnected(O){var B;this._$AM===void 0&&(this._$Cg=O,(B=this._$AP)===null||B===void 0||B.call(this,O))}}class S$1{constructor(O,B,D,U,W){this.type=1,this._$AH=w$1,this._$AN=void 0,this.element=O,this.name=B,this._$AM=U,this.options=W,D.length>2||D[0]!==""||D[1]!==""?(this._$AH=Array(D.length-1).fill(new String),this.strings=D):this._$AH=w$1}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(O,B=this,D,U){const W=this.strings;let K=!1;if(W===void 0)O=P$3(this,O,B,0),K=!r$i(O)||O!==this._$AH&&O!==b$6,K&&(this._$AH=O);else{const Y=O;let Z,G;for(O=W[0],Z=0;Z<W.length-1;Z++)G=P$3(this,Y[D+Z],B,Z),G===b$6&&(G=this._$AH[Z]),K||(K=!r$i(G)||G!==this._$AH[Z]),G===w$1?O=w$1:O!==w$1&&(O+=(G!=null?G:"")+W[Z+1]),this._$AH[Z]=G}K&&!U&&this.C(O)}C(O){O===w$1?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,O!=null?O:"")}}class M$1 extends S$1{constructor(){super(...arguments),this.type=3}C(O){this.element[this.name]=O===w$1?void 0:O}}const k$2=i$r?i$r.emptyScript:"";class H extends S$1{constructor(){super(...arguments),this.type=4}C(O){O&&O!==w$1?this.element.setAttribute(this.name,k$2):this.element.removeAttribute(this.name)}}class I extends S$1{constructor(O,B,D,U,W){super(O,B,D,U,W),this.type=5}_$AI(O,B=this){var D;if((O=(D=P$3(this,O,B,0))!==null&&D!==void 0?D:w$1)===b$6)return;const U=this._$AH,W=O===w$1&&U!==w$1||O.capture!==U.capture||O.once!==U.once||O.passive!==U.passive,K=O!==w$1&&(U===w$1||W);W&&this.element.removeEventListener(this.name,this,U),K&&this.element.addEventListener(this.name,this,O),this._$AH=O}handleEvent(O){var B,D;typeof this._$AH=="function"?this._$AH.call((D=(B=this.options)===null||B===void 0?void 0:B.host)!==null&&D!==void 0?D:this.element,O):this._$AH.handleEvent(O)}}class L$2{constructor(O,B,D){this.element=O,this.type=6,this._$AN=void 0,this._$AM=B,this.options=D}get _$AU(){return this._$AM._$AU}_$AI(O){P$3(this,O)}}const R$1={L:"$lit$",P:e$c,V:o$f,I:1,N:C$1,R:V$1,j:u$b,D:P$3,H:N,F:S$1,O:H,W:I,B:M$1,Z:L$2},z=window.litHtmlPolyfillSupport;z==null||z(E,N),((t$b=globalThis.litHtmlVersions)!==null&&t$b!==void 0?t$b:globalThis.litHtmlVersions=[]).push("2.2.3");/**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
- */var l$q,o$e;class s$9 extends a$q{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var O,B;const D=super.createRenderRoot();return(O=(B=this.renderOptions).renderBefore)!==null&&O!==void 0||(B.renderBefore=D.firstChild),D}update(O){const B=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(O),this._$Dt=x$3(B,this.renderRoot,this.renderOptions)}connectedCallback(){var O;super.connectedCallback(),(O=this._$Dt)===null||O===void 0||O.setConnected(!0)}disconnectedCallback(){var O;super.disconnectedCallback(),(O=this._$Dt)===null||O===void 0||O.setConnected(!1)}render(){return b$5}}s$9.finalized=!0,s$9._$litElement$=!0,(l$q=globalThis.litElementHydrateSupport)===null||l$q===void 0||l$q.call(globalThis,{LitElement:s$9});const n$k=globalThis.litElementPolyfillSupport;n$k==null||n$k({LitElement:s$9}),((o$e=globalThis.litElementVersions)!==null&&o$e!==void 0?o$e:globalThis.litElementVersions=[]).push("3.2.0");/**
17
+ */var l$r,o$e;class s$a extends a$s{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var O,B;const D=super.createRenderRoot();return(O=(B=this.renderOptions).renderBefore)!==null&&O!==void 0||(B.renderBefore=D.firstChild),D}update(O){const B=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(O),this._$Dt=x$3(B,this.renderRoot,this.renderOptions)}connectedCallback(){var O;super.connectedCallback(),(O=this._$Dt)===null||O===void 0||O.setConnected(!0)}disconnectedCallback(){var O;super.disconnectedCallback(),(O=this._$Dt)===null||O===void 0||O.setConnected(!1)}render(){return b$6}}s$a.finalized=!0,s$a._$litElement$=!0,(l$r=globalThis.litElementHydrateSupport)===null||l$r===void 0||l$r.call(globalThis,{LitElement:s$a});const n$k=globalThis.litElementPolyfillSupport;n$k==null||n$k({LitElement:s$a}),((o$e=globalThis.litElementVersions)!==null&&o$e!==void 0?o$e:globalThis.litElementVersions=[]).push("3.2.0");/**
18
18
  * @license
19
19
  * Copyright 2017 Google LLC
20
20
  * SPDX-License-Identifier: BSD-3-Clause
@@ -22,7 +22,7 @@ var wt=Object.defineProperty,$t=Object.defineProperties;var xt=Object.getOwnProp
22
22
  * @license
23
23
  * Copyright 2017 Google LLC
24
24
  * SPDX-License-Identifier: BSD-3-Clause
25
- */const i$r=(q,O)=>O.kind==="method"&&O.descriptor&&!("value"in O.descriptor)?mt(ut({},O),{finisher(B){B.createProperty(O.key,q)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:O.key,initializer(){typeof O.initializer=="function"&&(this[O.key]=O.initializer.call(this))},finisher(B){B.createProperty(O.key,q)}};function e$b(q){return(O,B)=>B!==void 0?((D,U,W)=>{U.constructor.createProperty(W,D)})(q,O,B):i$r(q,O)}/**
25
+ */const i$q=(q,O)=>O.kind==="method"&&O.descriptor&&!("value"in O.descriptor)?mt(ut({},O),{finisher(B){B.createProperty(O.key,q)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:O.key,initializer(){typeof O.initializer=="function"&&(this[O.key]=O.initializer.call(this))},finisher(B){B.createProperty(O.key,q)}};function e$b(q){return(O,B)=>B!==void 0?((D,U,W)=>{U.constructor.createProperty(W,D)})(q,O,B):i$q(q,O)}/**
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
@@ -34,35 +34,35 @@ var wt=Object.defineProperty,$t=Object.defineProperties;var xt=Object.getOwnProp
34
34
  * @license
35
35
  * Copyright 2017 Google LLC
36
36
  * SPDX-License-Identifier: BSD-3-Clause
37
- */function i$q(q,O){return o$d({descriptor:B=>{const D={get(){var U,W;return(W=(U=this.renderRoot)===null||U===void 0?void 0:U.querySelector(q))!==null&&W!==void 0?W:null},enumerable:!0,configurable:!0};if(O){const U=typeof B=="symbol"?Symbol():"__"+B;D.get=function(){var W,K;return this[U]===void 0&&(this[U]=(K=(W=this.renderRoot)===null||W===void 0?void 0:W.querySelector(q))!==null&&K!==void 0?K:null),this[U]}}return D}})}/**
37
+ */function i$p(q,O){return o$d({descriptor:B=>{const D={get(){var U,W;return(W=(U=this.renderRoot)===null||U===void 0?void 0:U.querySelector(q))!==null&&W!==void 0?W:null},enumerable:!0,configurable:!0};if(O){const U=typeof B=="symbol"?Symbol():"__"+B;D.get=function(){var W,K;return this[U]===void 0&&(this[U]=(K=(W=this.renderRoot)===null||W===void 0?void 0:W.querySelector(q))!==null&&K!==void 0?K:null),this[U]}}return D}})}/**
38
38
  * @license
39
39
  * Copyright 2021 Google LLC
40
40
  * SPDX-License-Identifier: BSD-3-Clause
41
- */var n$i;const e$a=((n$i=window.HTMLSlotElement)===null||n$i===void 0?void 0:n$i.prototype.assignedElements)!=null?(q,O)=>q.assignedElements(O):(q,O)=>q.assignedNodes(O).filter(B=>B.nodeType===Node.ELEMENT_NODE);function l$p(q){const{slot:O,selector:B}=q!=null?q:{};return o$d({descriptor:D=>({get(){var U;const W="slot"+(O?`[name=${O}]`:":not([name])"),K=(U=this.renderRoot)===null||U===void 0?void 0:U.querySelector(W),Y=K!=null?e$a(K,q):[];return B?Y.filter(Z=>Z.matches(B)):Y},enumerable:!0,configurable:!0})})}/**
41
+ */var n$i;const e$a=((n$i=window.HTMLSlotElement)===null||n$i===void 0?void 0:n$i.prototype.assignedElements)!=null?(q,O)=>q.assignedElements(O):(q,O)=>q.assignedNodes(O).filter(B=>B.nodeType===Node.ELEMENT_NODE);function l$q(q){const{slot:O,selector:B}=q!=null?q:{};return o$d({descriptor:D=>({get(){var U;const W="slot"+(O?`[name=${O}]`:":not([name])"),K=(U=this.renderRoot)===null||U===void 0?void 0:U.querySelector(W),Y=K!=null?e$a(K,q):[];return B?Y.filter(Z=>Z.matches(B)):Y},enumerable:!0,configurable:!0})})}/**
42
42
  * @license
43
43
  * Copyright 2017 Google LLC
44
44
  * SPDX-License-Identifier: BSD-3-Clause
45
- */function o$c(q,O,B){let D,U=q;return typeof q=="object"?(U=q.slot,D=q):D={flatten:O},B?l$p({slot:U,flatten:O,selector:B}):o$d({descriptor:W=>({get(){var K,Y;const Z="slot"+(U?`[name=${U}]`:":not([name])"),G=(K=this.renderRoot)===null||K===void 0?void 0:K.querySelector(Z);return(Y=G==null?void 0:G.assignedNodes(D))!==null&&Y!==void 0?Y:[]},enumerable:!0,configurable:!0})})}function isComplex(q){return typeof q=="object"&&q!=null}class PublisherProxy$1{constructor(O,B=null){for(this._proxies_=new Map,this._value_=O,this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this.parent=B,this.root=this;this.root.parent;)this.root=this.root.parent}delete(){for(let O of this._proxies_.values())O.delete();this._invalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear()}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(O=!1){this._mutationListeners_.forEach(B=>B()),!O&&this.parent&&this.parent._publishInternalMutation_()}_publishAssignement_(O=!1){this._assignListeners_.forEach(B=>B(this.get())),this._publishInternalMutation_(O)}_publishInvalidation_(){this._invalidateListeners_.forEach(O=>O())}_publishDynamicFilling_(O,B){this._fillListeners_.forEach(D=>{D[O]!==B&&(D[O]=B)}),this._publishTemplateFilling_(O,B)}_publishTemplateFilling_(O,B){this._templateFillListeners_.forEach(D=>{let U=Object.getOwnPropertyDescriptor(D,O);U&&!U.set||(D.propertyMap&&D.propertyMap[O]&&(O=D.propertyMap[O]),typeof D[O]!="undefined"&&D[O]!==B&&(D[O]=B))})}onAssign(O){typeof O=="function"&&(this._assignListeners_.add(O),O(this.get()))}offAssign(O){this._assignListeners_.delete(O)}onInvalidate(O){typeof O=="function"&&this._invalidateListeners_.add(O)}offInvalidate(O){this._invalidateListeners_.delete(O)}invalidate(O){this._publishInvalidation_()}onInternalMutation(O){typeof O=="function"&&(this._mutationListeners_.add(O),O())}offInternalMutation(O){this._mutationListeners_.delete(O)}startTemplateFilling(O){this._templateFillListeners_.add(O);for(var B in this._value_){const D=this._value_[B];O.propertyMap&&O.propertyMap[B]&&(B=O.propertyMap[B]),typeof O[B]!="undefined"&&O[B]!==D&&(O[B]=D)}}stopTemplateFilling(O){this._templateFillListeners_.delete(O)}startDynamicFilling(O){this._fillListeners_.add(O);for(var B in this._value_){const D=this._value_[B];O[B]!==D&&(O[B]=D)}}stopDynamicFilling(O){this._fillListeners_.delete(O)}set(O,B=!1){if(this._value_===O||this._value_.hasOwnProperty("__value")&&O.hasOwnProperty("__value")&&this._value_.__value===O.__value)return!0;if(this._value_=O,this._value_.hasOwnProperty("__value"))return this._publishAssignement_(B),!0;if(Array.from(this._proxies_.keys()).forEach(U=>{!this._value_[U]&&this._proxies_.has(U)&&!this._proxies_.get(U).hasListener()&&this._proxies_.delete(U)}),isComplex(this._value_))for(let U in this._value_){let W=O[U],Y=isComplex(W)?W:{__value:W};if(!this._proxies_.has(U)){let Z=new Publisher({},this);this._proxies_.set(U,Z,!0),Z._proxies_.set("_parent_",this)}this._proxies_.get(U).set(Y,!0),this._publishDynamicFilling_(U,W)}return this._publishAssignement_(),!0}get(){if(this._value_.hasOwnProperty("__value")){let O=this._value_.__value;return O!=null?O:null}return this._value_}}const gt=class{constructor(){if(gt.instance!=null)throw"Singleton / use getInstance";gt.instance=this,this.publishers=new Map}static getInstance(){return gt.instance==null?new gt:gt.instance}static get(O){return gt.getInstance().get(O)}static delete(O){return gt.getInstance().delete(O)}get(O){return this.publishers.has(O)||this.publishers.set(O,new Publisher({})),this.publishers.get(O)}set(O,B){this.publishers.set(O,B)}delete(O){if(!this.publishers.has(O))return!1;this.publishers.get(O),this.publishers.delete(O)}};let PublisherManager$1=gt;yt(PublisherManager$1,"instance",null);class Publisher extends PublisherProxy$1{constructor(O,B=null){super(O,B);let D=this,U=new Proxy(this,{get:function(W,K){if(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_lockInternalMutationPublishing_"].includes(K))return D[K];if(!D._proxies_.has(K)){let Y=D._value_[K],Z=new Publisher(isComplex(Y)?Y:{__value:Y},D);Z._proxies_.set("_parent_",U),D._proxies_.set(K,Z)}return D._proxies_.get(K)},set:function(W,K,Y){if(K=="_value_")return W._value_=Y,W._value_;if(!D._proxies_.has(K)){let G=new Publisher({},D);G._proxies_.set("_parent_",U),D._proxies_.set(K,G)}return D._value_[K]!==Y&&(D._value_[K]=Y,D._publishDynamicFilling_(K,Y),D._proxies_.get(K).set(isComplex(Y)?Y:{__value:Y})),D._proxies_.get(K)},deleteProperty:function(W,K){return D._publishDynamicFilling_(K,null),D._proxies_.delete(K),delete D._value_[K]},enumerate:function(W,K){return D._value_.keys()},has:function(W,K){return K in D._value_&&K!="_lockInternalMutationPublishing_"},defineProperty:function(W,K,Y){return Y&&"value"in Y&&(D._value_[K]=Y.value),D._value_},getOwnPropertyDescriptor:function(W,K){return D._value_[K],{enumerable:!0,configurable:!0}},ownKeys:function(W){return D._value_.__value?Object.keys(this._value_.__value):Object.keys(D._value_)}});return U}}typeof module!="undefined"&&(module.exports={Publisher,PublisherManager:PublisherManager$1});class r$l{static getLanguage(){return document.getElementsByTagName("html")[0].getAttribute("lang")}static getCookies(){return document.cookie.split(";").reduce((O,B)=>{const D=B.indexOf("=");return O[B.substring(0,D).trim()]=B.substring(D+1),O},{})}static getAncestorAttributeValue(O,B){for(;!(O.hasAttribute&&O.hasAttribute(B))&&(O.parentNode||O.host);)O=O.parentNode||O.host;return O.hasAttribute?O.getAttribute(B):null}}const n$h=class{constructor(q){this.serviceURL=q.serviceURL,this.serviceURL||(this.serviceURL=document.location.origin),this.userName=q.userName,this.password=q.password,this.token=q.token,this.tokenProvider=q.tokenProvider}async auth(){if(this.token)return;if(n$h.tokens.has(this.serviceURL)){this.token=n$h.tokens.get(this.serviceURL);return}if(!this.userName||!this.password||!this.tokenProvider)return;let q={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))},O=await fetch(this.computeURL(this.tokenProvider),{headers:q});try{let B=await O.json();this.token=B.token,n$h.tokens.set(this.serviceURL,this.token)}catch{}}async get(q){let O=await this.createHeaders();const B=this.computeURL(q);if(!n$h.loadingGetPromises.has(B)){let U=new Promise(async W=>{let K=await fetch(B,{headers:O});try{let Y=await K.json();W(Y)}catch{W(null)}});n$h.loadingGetPromises.set(B,U)}let D=await n$h.loadingGetPromises.get(B);return n$h.loadingGetPromises.delete(B),D}async createHeaders(){await this.auth();let q={};return this.token&&(q.Authorization="Bearer "+this.token),q.credentials="include",q["Accept-Language"]=r$l.getLanguage(),q}computeURL(q){return(this.serviceURL+"/"+q).replace(/([^(https?\:)])\/{2,}/g,"$1/")}async send(q,O,B="POST",D){await this.auth();let U=await this.createHeaders();U.Accept="application/json",U["Content-Type"]="application/json",D&&Object.assign(U,D);let W=await fetch(this.computeURL(q),{headers:U,method:B,body:JSON.stringify(O)});try{return await W.json()}catch{return null}}async put(q,O,B){return this.send(q,O,"PUT",B)}async post(q,O,B){return this.send(q,O,"POST",B)}async delete(q,O,B){return this.send(q,O,"delete",B)}};let r$k=n$h;r$k.loadingGetPromises=new Map,r$k.tokens=new Map;class r$j{static ucFirst(O){return typeof O!="string"?O:O.charAt(0).toUpperCase()+O.substring(1)}static js(O){try{return Function("return "+O)()}catch{return""}}}const r$i=class{static disable(){!this.enabled||(this.enabled=!1,Array.from(r$i.observedElements.keys()).forEach(q=>r$i.unObserve(q)))}static observe(q){if(!r$i.enabled||r$i.observedElements.has(q))return;let O=new MutationObserver(r$i.onMutation),B={};B.childList=!0,B.subtree=!0,B.attributes=!0,B.attributeFilter=["data-bind"],O.observe(q,B),q.querySelectorAll("[data-bind]").forEach(D=>r$i.addPublisherListeners(D)),r$i.observedElements.set(q,O)}static unObserve(q){let O=this.observedElements.get(q);!O||(O.disconnect(),q.querySelectorAll("[data-bind]").forEach(B=>r$i.removePublisherListeners(B)))}static onAdded(q){q.hasAttribute&&q.hasAttribute("data-bind")&&r$i.addPublisherListeners(q),q.querySelectorAll?q.querySelectorAll("[data-bind]").forEach(O=>r$i.addPublisherListeners(O)):q.childNodes.forEach(O=>r$i.onAdded(O))}static onRemoved(q){q.hasAttribute&&q.hasAttribute("data-bind")&&r$i.removePublisherListeners(q),q.querySelectorAll?q.querySelectorAll("[data-bind]").forEach(O=>r$i.removePublisherListeners(O)):q.childNodes.forEach(O=>r$i.onRemoved(O))}static onMutation(q){for(let D of q)switch(D.type){case"attributes":r$i.addPublisherListeners(D.target);break;case"childList":var O=D.addedNodes,B=D.removedNodes;O.forEach(U=>{r$i.onAdded(U)}),B.forEach(U=>{r$i.onRemoved(U)});break}}static removePublisherListeners(q){let O=r$i.publisherListeners.get(q);!O||(r$i.publisherListeners.delete(q),O.forEach(B=>{B.publisher.offAssign(B.onAssign)}))}static getVariablesDescriptor(q){let O=q.match(/(\$(?:\w+\\?\.?)+)/g);return O?O=O.map(B=>B.replace("$","")):O=[q],O=O.filter(B=>B.length>0),{expression:q.replace("\\",""),variables:O.map(B=>B.split(/\b\.\b/).map(D=>D.replace("\\","")))}}static getDataBindItems(q){return Array.from(q.attributes).filter(O=>O.name.indexOf("::")==0).map(O=>({propertyToUpdate:O.name.substring(2).replace(/\-((html)|\w)/g,B=>B.substring(1).toUpperCase()),bindedVariablesDescriptor:r$i.getVariablesDescriptor(O.value)}))}static getSubPublisher(q,O){for(let B of O)B!="_self_"&&(q=q[B]);return q}static addPublisherListeners(q){r$i.removePublisherListeners(q);let O=q,B=r$l.getAncestorAttributeValue(O.parentNode||O.host||O,"dataProvider");if(!B)return;let D=PublisherManager$1.getInstance().get(B),U=r$i.getDataBindItems(q),W=[];U.forEach(K=>{let Y=K.bindedVariablesDescriptor,Z=K.propertyToUpdate;for(let G of Y.variables){let st=G,tt=D;tt=r$i.getSubPublisher(D,st);let Q=q,rt={publisher:tt,onAssign:()=>{let ot=Y.variables.map(ct=>r$i.getSubPublisher(D,ct).get()),nt=Y.expression,ht=!1;if(ot.length==1&&Y.variables[0].join(".")==nt.substring(1)){let ct=ot[0];ct===null&&(ct=""),Q[Z]=ct;return}for(let ct=0;ct<ot.length;ct++){let X=ot[ct],J=Y.variables[ct];X===null&&(ht=!0,X=void 0),nt=nt.replace("$"+J.join("."),X)}if(nt.indexOf("|")!=-1){let ct=nt.indexOf("|");if(ct==0)nt=r$j.js(nt.substring(1));else{let X=nt.substring(0,ct),J=nt.substring(ct+1),et=r$j;nt=ht?"":et[X]?et[X](J):nt}}else nt=ht?"":nt;Q[Z]=nt}};tt.onAssign(rt.onAssign),W.push(rt)}}),r$i.publisherListeners.set(q,W)}};let l$o=r$i;l$o.observedElements=new Map,l$o.enabled=!0,l$o.publisherListeners=new Map,l$o.observe(document.documentElement);let A$2=window;A$2.SonicDataBindObserver||(A$2.SonicDataBindObserver=l$o);class a$o{static shallowEqual(O,B){const D=Object.keys(O),U=Object.keys(B);if(D.length!==U.length)return!1;for(let W of D)if(O[W]!==B[W])return!1;return!0}static deepEqual(O,B){const D=Object.keys(O),U=Object.keys(B);if(D.length!==U.length)return!1;for(const W of D){const K=O[W],Y=B[W],Z=a$o.isObject(K)&&a$o.isObject(Y);if(Z&&!a$o.deepEqual(K,Y)||!Z&&K!==Y)return!1}return!0}static isObject(O){return O!=null&&typeof O=="object"}static isUndefindOrNull(O){return O==null}static traverse(O,B,D=!1){for(let U of B){let W=O[U];if(W===void 0)return;D&&a$o.isObject(W)?O=Object.assign(Array.isArray(W)?[]:{},O,W):O=O[U]}return O}}var y$5=Object.defineProperty,P$2=Object.getOwnPropertyDescriptor,a$n=(q,O,B,D)=>{for(var U=D>1?void 0:D?P$2(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&y$5(O,B,U),U};let f$l=!1,v$7=new Set;const L$1=q=>{const O=class extends q{constructor(...D){super(),this.noAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.defferedDebug=null,this.debug=null,this.onAssign=null,this.args=D}hasAncestorAttribute(D){return this.getAncestorAttributeValue(D)!=null}getAncestorAttributeValue(D){let U=this;return r$l.getAncestorAttributeValue(U,D)}get props(){return this.publisher?this.publisher.get():this._props}set props(D){typeof D=="string"&&["{","["].includes(D.trim().charAt(0))&&(D=JSON.parse(D)),(D==null||D==="")&&(D={}),this.publisher||this.initPublisher(),this._props=D,this.publisher&&this.publisher.set(D),this.requestUpdate()}updated(D){super.updated(D),this.shadowRoot?this.shadowRoot.children.length==0?this.style.display="none":this.style.removeProperty("display"):this.children.length==0?this.style.display="none":this.style.removeProperty("display")}connectedCallback(){if(this.hasAttribute("lazyRendering")){let D={root:null,rootMargin:Math.max(window.innerWidth*.1,window.innerHeight*.1)+"px"},U=!0;new IntersectionObserver(W=>{for(const K of W)U&&K.isIntersecting&&(U=!1,this.initWording(),this.initPublisher())},D).observe(this)}else this.initWording(),this.initPublisher();this.addDebugger(),super.connectedCallback(),O.instanceCounter++}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate())),this.wordingPublisher&&this.wordingPublisher.stopTemplateFilling(this),this.onAssign&&this.publisher.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");let D=this.debug.style;D.position="fixed",D.top="0",D.right="0",D.margin="auto",D.borderRadius=".7rem",D.backgroundColor="#0f1729",D.color="#c5d4f9",D.padding="16px 16px",D.margin="16px 16px",D.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",D.overflowY="auto",D.zIndex="99999999",D.maxHeight="calc(100vh - 32px)",D.fontFamily="Consolas, monospace",D.maxWidth="50vw",D.fontSize="12px",D.minWidth="300px",D.overflowWrap="break-word"}if(this.addEventListener("click",D=>{!D.ctrlKey||(D.preventDefault(),f$l=!f$l)}),this.dataProvider){let D=window;D[this.dataProvider]=this.publisher}this.addEventListener("mouseover",()=>{f$l||this.removeDebugger(),document.body.appendChild(this.debug),v$7.add(this.debug)}),this.addEventListener("mouseout",()=>{f$l||this.removeDebugger()}),this.publisher.onInternalMutation(()=>{this.debug.innerHTML=`\u{1F916} DataProvider : "<b style="font-weight:700;color:#fff">${this.dataProvider}</b>"<br><div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px">Variable disponible dans la console<br>ctrl + Clique : \xE9pingler / d\xE9s\xE9pingler</div><pre style="margin-top:10px;background:0 0;padding:0;font-size:inherit;color:inherit">${JSON.stringify(this.publisher.get(),null," ")}</pre>`})}}removeDebugger(){v$7.forEach(D=>{document.body.contains(D)&&document.body.removeChild(D)}),v$7=new Set}getApiConfiguration(){const D=this.getAncestorAttributeValue("token");let U=this.getAncestorAttributeValue("serviceURL"),W=null,K=null,Y=null;return D||(W=this.getAncestorAttributeValue("userName"),K=this.getAncestorAttributeValue("password"),Y=this.getAncestorAttributeValue("tokenProvider")),{serviceURL:U,token:D,userName:W,password:K,tokenProvider:Y}}async initWording(){let D=!1;const U=Object.getOwnPropertyNames(this.constructor.prototype);for(let Z of U)if(Z.indexOf("wording_")==0){D=!0;break}if(!D)return;let W=PublisherManager$1.getInstance().get("sonic-wording"),K=this.getAncestorAttributeValue("wordingProvider");const Y=new r$k(this.getApiConfiguration());if(K){let Z=[];for(let G of U)if(G.indexOf("wording_")==0){let st=G.substring(8);W.get()[G]||(W[G]="...",Z.push(st))}if(Z.length>0){let G=await Y.post(K,{labels:Z});for(let st in G)W["wording_"+st]=G[st]}W.startTemplateFilling(this),this.wordingPublisher=W}}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;let D=super.createRenderRoot();return l$o.observe(D),D}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const D=PublisherManager$1.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let U=this.dataProvider;if(!U&&this._props&&(this.dataProvider=U="__subscriber__"+O.instanceCounter),U){this.bindPublisher&&D.set(U,this.bindPublisher());let W=D.get(U);if(this.dataProvider=U,this.hasAttribute("subDataProvider")){let K=this.getAttribute("subDataProvider");this.dataProvider=U+"/"+K,W=a$o.traverse(W,K.split(".")),D.set(this.dataProvider,W),this.publisher=W}this.publisher=W}this.publisher&&(this.onAssign=()=>{this.requestUpdate()},this.publisher.onAssign(this.onAssign),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this._props&&this.publisher.set(this._props))}};let B=O;return B.instanceCounter=0,a$n([e$b({type:Boolean})],B.prototype,"noAutoFill",2),a$n([e$b({type:Object})],B.prototype,"propertyMap",2),a$n([e$b({type:String,attribute:"data-title"})],B.prototype,"title",2),a$n([e$b({reflect:!0})],B.prototype,"dataProvider",2),a$n([e$b()],B.prototype,"bindPublisher",2),a$n([e$b()],B.prototype,"props",1),B};let m$g=window;m$g.SonicPublisherManager||(m$g.SonicPublisherManager=PublisherManager$1);var p$h=Object.defineProperty,i$p=Object.getOwnPropertyDescriptor,n$g=(q,O,B,D)=>{for(var U=D>1?void 0:D?i$p(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$h(O,B,U),U};const T$2=q=>{class O extends q{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){let D=this.templates||[...this.querySelectorAll("template")];for(let U of D)U.hasAttribute(this.templateValueAttribute)&&(this.templateParts[U.getAttribute(this.templateValueAttribute)]=U,this.templatePartsList.push(U));this.templateList=D.filter(U=>!U.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=D),super.connectedCallback()}}return n$g([e$b({type:Array})],O.prototype,"templates",2),O};var p$g=Object.defineProperty,_=Object.getOwnPropertyDescriptor,t$9=(q,O,B,D)=>{for(var U=D>1?void 0:D?_(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$g(O,B,U),U};const M="sonic-date";let SonicDate=class extends L$1(T$2(s$9)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=new Date().getTime()/1e3,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.minute="2-digit",this.language="",this.renderIf=!0,this.startDateObject=new Date,this.endDateObject=new Date}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(q){this._wording_billet_periode_validite=q,this.duAu=this.wording_billet_periode_validite.split("%s").map(O=>O.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.wording_billet_periode_validite="Du %s au %s",this.pageLanguage=r$l.getLanguage(),super.connectedCallback()}getDatesParts(q,O,B){const D=new Intl.DateTimeFormat(this.language||this.pageLanguage,B);let U=this.startDateObject;U.setTime(q*1e3);let W=null;if(O>0){let K=this.endDateObject;if(K.setTime(O*1e3),W=D.formatRangeToParts(U,K),this.designMode)for(let Z of W)Z.type=="literal"&&this.designMode&&Z.value.trim()==","&&(Z.hidden=!0);const Y=U.getFullYear()==K.getFullYear()&&U.getMonth()==K.getMonth()&&U.getDate()==K.getDate();if(W.some(Z=>Z.source=="endRange")&&!Y){for(let Z of W)if(Z.type=="literal"&&Z.source=="shared"&&Z.value.trim().length>0&&!Y){Z.value=" "+this.duAu[1]+" ",Z.type="to";break}this.designMode||W.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else W=D.formatToParts(U);return W[0].value=r$j.ucFirst(W[0].value),W=W.filter(K=>K.hidden!==!0),W}render(){if(!this.renderIf)return w$1;if(this.date_string&&(this.date=new Date(this.date_string).getTime()/1e3),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=new Date(this.start_date_string).getTime()/1e3),this.end_date_string&&(this.end_date=new Date(this.end_date_string).getTime()/1e3),this.end_date>0&&this.end_date<this.start_date){const B=this.start_date;this.start_date=this.end_date,this.end_date=B}let q={weekday:this.weekday,year:this.year,month:this.month,day:this.day};this.hour&&(q.hour=this.hour),this.minute&&(q.minute=this.minute),this.era&&(q.era=this.era),this.time_zone&&(q.timeZone=this.time_zone);let O=this.getDatesParts(this.start_date,this.end_date,q);return $$2`${O.map(B=>{let D=this.templateParts[B.type];if(D){var U=document.importNode(D.content,!0);let W=U.children[0];return W.innerText.trim()==""&&(W.innerText=B.value),U}return $$2`<span class="${B.type}">${B.value}</span>`})}`}};t$9([e$b()],SonicDate.prototype,"wording_billet_periode_validite",1),t$9([e$b({type:Boolean})],SonicDate.prototype,"designMode",2),t$9([e$b({type:String})],SonicDate.prototype,"time_zone",2),t$9([e$b({type:Number})],SonicDate.prototype,"date",2),t$9([e$b({type:String})],SonicDate.prototype,"date_string",2),t$9([e$b({type:String})],SonicDate.prototype,"start_date_string",2),t$9([e$b({type:String})],SonicDate.prototype,"end_date_string",2),t$9([e$b({type:Number})],SonicDate.prototype,"start_date",2),t$9([e$b({type:Number})],SonicDate.prototype,"end_date",2),t$9([e$b({type:String})],SonicDate.prototype,"era",2),t$9([e$b({type:String})],SonicDate.prototype,"year",2),t$9([e$b({type:String})],SonicDate.prototype,"month",2),t$9([e$b({type:String})],SonicDate.prototype,"day",2),t$9([e$b({type:String})],SonicDate.prototype,"weekday",2),t$9([e$b({type:String})],SonicDate.prototype,"hour",2),t$9([e$b({type:String})],SonicDate.prototype,"minute",2),t$9([e$b({type:String})],SonicDate.prototype,"language",2),t$9([e$b({type:Boolean})],SonicDate.prototype,"renderIf",2),SonicDate=t$9([n$j(M)],SonicDate);const inline=r$o`:host([align="left"]) .sonic-loader--inline { margin-left:0; } :host([align="right"]) .sonic-loader--inline { margin-left:auto; margin-right:0; } .sonic-loader--inline { display:block; position: relative; width: 80px; height: 80px; margin:auto; z-index:20; } .sonic-loader--inline div { position: absolute; top: 33px; width: 13px; height: 13px; border-radius: 50%; background:var(--sc-loader-bg); animation-timing-function: cubic-bezier(0, 1, 1, 0); } .sonic-loader--inline div:nth-child(1) { left: 8px; animation: lds-ellipsis1 0.6s infinite; } .sonic-loader--inline div:nth-child(2) { left: 8px; animation: lds-ellipsis2 0.6s infinite; } .sonic-loader--inline div:nth-child(3) { left: 32px; animation: lds-ellipsis2 0.6s infinite; } .sonic-loader--inline div:nth-child(4) { left: 56px; animation: lds-ellipsis3 0.6s infinite; } @keyframes lds-ellipsis1 { 0% { transform: scale(0); } 100% { transform: scale(1); } } @keyframes lds-ellipsis3 { 0% { transform: scale(1); } 100% { transform: scale(0); } } @keyframes lds-ellipsis2 { 0% { transform: translate(0, 0); } 100% { transform: translate(24px, 0); } }`,fixed=r$o`@keyframes sonic-loader--fixed { 0% { transform: scale(0); opacity: 0; } 5% { opacity: 1; } 70% { opacity:90%; } 100% { transform: scale(1); opacity: 0; } } .sonic-loader--fixed { position: fixed; top:50%; left:50%; transform:transateY(-50%) translateX(-50%); z-index:999; } .sonic-loader--fixed > div:nth-child(2) { animation-delay: -0.5s; } .sonic-loader--fixed > div:nth-child(3) { animation-delay: -0.2s; } .sonic-loader--fixed > div:nth-child(4) { display:none !important; } .sonic-loader--fixed > div { background-color: var(--sc-loader-bg); width: 5rem; height: 5rem; border-radius: 100%; margin: 2px; animation-fill-mode: both; position: absolute; top: 0px; opacity: 0; margin: 0; top: -2.5rem; left: -2.5rem; width: 5rem; height: 5rem; animation: sonic-loader--fixed 1s 0s linear infinite; }`;var d$q=Object.defineProperty,c$o=Object.getOwnPropertyDescriptor,a$m=(q,O,B,D)=>{for(var U=D>1?void 0:D?c$o(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$q(O,B,U),U};const l$n="sonic-loader";let Loader=class extends s$9{constructor(){super(...arguments),this.mode="fixed"}static show(q){Loader.loader||(Loader.loader=document.createElement("sonic-loader"));let O=Loader.loader;q||(q={});let B=q;for(let D in B)O.setAttribute(D,B[D]);q.container||(q.container=document.querySelector("sonic-theme")||document.body,q.mode="fixed"),q.container.appendChild(O),Loader.callCounter++}static hide(){Loader.callCounter--,!(Loader.callCounter>0)&&Loader.loader&&Loader.loader.remove()}render(){return $$2`<div class="sonic-loader sonic-loader--${this.mode}"><div></div><div></div><div></div><div></div></div>`}};Loader.styles=[inline,fixed,r$o`:host { --sc-loader-bg: var(--sc-primary, currentColor); pointer-events: none; } .sonic-loader { opacity: 0; animation: showLoader 0.5s 0.5s forwards; } .sonic-loader--inline { animation-delay: 0s; } @keyframes showLoader { 0% { opacity: 0; } 100% { opacity: 1; } }`],Loader.callCounter=0,a$m([e$b({type:String})],Loader.prototype,"mode",2),Loader=a$m([n$j(l$n)],Loader);try{customElements.define(l$n,Loader)}catch{}/**
45
+ */function o$c(q,O,B){let D,U=q;return typeof q=="object"?(U=q.slot,D=q):D={flatten:O},B?l$q({slot:U,flatten:O,selector:B}):o$d({descriptor:W=>({get(){var K,Y;const Z="slot"+(U?`[name=${U}]`:":not([name])"),G=(K=this.renderRoot)===null||K===void 0?void 0:K.querySelector(Z);return(Y=G==null?void 0:G.assignedNodes(D))!==null&&Y!==void 0?Y:[]},enumerable:!0,configurable:!0})})}function isComplex(q){return typeof q=="object"&&q!=null}class PublisherProxy$1{constructor(O,B=null){for(this._proxies_=new Map,this._value_=O,this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this.parent=B,this.root=this;this.root.parent;)this.root=this.root.parent}delete(){for(let O of this._proxies_.values())O.delete();this._invalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear()}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(O=!1){this._mutationListeners_.forEach(B=>B()),!O&&this.parent&&this.parent._publishInternalMutation_()}_publishAssignement_(O=!1){this._assignListeners_.forEach(B=>B(this.get())),this._publishInternalMutation_(O)}_publishInvalidation_(){this._invalidateListeners_.forEach(O=>O())}_publishDynamicFilling_(O,B){this._fillListeners_.forEach(D=>{D[O]!==B&&(D[O]=B)}),this._publishTemplateFilling_(O,B)}_publishTemplateFilling_(O,B){this._templateFillListeners_.forEach(D=>{let U=Object.getOwnPropertyDescriptor(D,O);U&&!U.set||(D.propertyMap&&D.propertyMap[O]&&(O=D.propertyMap[O]),typeof D[O]!="undefined"&&D[O]!==B&&(D[O]=B))})}onAssign(O){typeof O=="function"&&(this._assignListeners_.add(O),O(this.get()))}offAssign(O){this._assignListeners_.delete(O)}onInvalidate(O){typeof O=="function"&&this._invalidateListeners_.add(O)}offInvalidate(O){this._invalidateListeners_.delete(O)}invalidate(O){this._publishInvalidation_()}onInternalMutation(O){typeof O=="function"&&(this._mutationListeners_.add(O),O())}offInternalMutation(O){this._mutationListeners_.delete(O)}startTemplateFilling(O){this._templateFillListeners_.add(O);for(var B in this._value_){const D=this._value_[B];O.propertyMap&&O.propertyMap[B]&&(B=O.propertyMap[B]),typeof O[B]!="undefined"&&O[B]!==D&&(O[B]=D)}}stopTemplateFilling(O){this._templateFillListeners_.delete(O)}startDynamicFilling(O){this._fillListeners_.add(O);for(var B in this._value_){const D=this._value_[B];O[B]!==D&&(O[B]=D)}}stopDynamicFilling(O){this._fillListeners_.delete(O)}set(O,B=!1){if(this._value_===O||this._value_.hasOwnProperty("__value")&&O.hasOwnProperty("__value")&&this._value_.__value===O.__value)return!0;if(this._value_=O,this._value_.hasOwnProperty("__value"))return this._publishAssignement_(B),!0;if(Array.from(this._proxies_.keys()).forEach(U=>{!this._value_[U]&&this._proxies_.has(U)&&!this._proxies_.get(U).hasListener()&&this._proxies_.delete(U)}),isComplex(this._value_))for(let U in this._value_){let W=O[U],Y=isComplex(W)?W:{__value:W};if(!this._proxies_.has(U)){let Z=new Publisher({},this);this._proxies_.set(U,Z,!0),Z._proxies_.set("_parent_",this)}this._proxies_.get(U).set(Y,!0),this._publishDynamicFilling_(U,W)}return this._publishAssignement_(),!0}get(){if(this._value_.hasOwnProperty("__value")){let O=this._value_.__value;return O!=null?O:null}return this._value_}}const gt=class{constructor(){if(gt.instance!=null)throw"Singleton / use getInstance";gt.instance=this,this.publishers=new Map}static getInstance(){return gt.instance==null?new gt:gt.instance}static get(O){return gt.getInstance().get(O)}static delete(O){return gt.getInstance().delete(O)}get(O){return this.publishers.has(O)||this.publishers.set(O,new Publisher({})),this.publishers.get(O)}set(O,B){this.publishers.set(O,B)}delete(O){if(!this.publishers.has(O))return!1;this.publishers.get(O),this.publishers.delete(O)}};let PublisherManager$1=gt;yt(PublisherManager$1,"instance",null);class Publisher extends PublisherProxy$1{constructor(O,B=null){super(O,B);let D=this,U=new Proxy(this,{get:function(W,K){if(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_lockInternalMutationPublishing_"].includes(K))return D[K];if(!D._proxies_.has(K)){let Y=D._value_[K],Z=new Publisher(isComplex(Y)?Y:{__value:Y},D);Z._proxies_.set("_parent_",U),D._proxies_.set(K,Z)}return D._proxies_.get(K)},set:function(W,K,Y){if(K=="_value_")return W._value_=Y,W._value_;if(!D._proxies_.has(K)){let G=new Publisher({},D);G._proxies_.set("_parent_",U),D._proxies_.set(K,G)}return D._value_[K]!==Y&&(D._value_[K]=Y,D._publishDynamicFilling_(K,Y),D._proxies_.get(K).set(isComplex(Y)?Y:{__value:Y})),D._proxies_.get(K)},deleteProperty:function(W,K){return D._publishDynamicFilling_(K,null),D._proxies_.delete(K),delete D._value_[K]},enumerate:function(W,K){return D._value_.keys()},has:function(W,K){return K in D._value_&&K!="_lockInternalMutationPublishing_"},defineProperty:function(W,K,Y){return Y&&"value"in Y&&(D._value_[K]=Y.value),D._value_},getOwnPropertyDescriptor:function(W,K){return D._value_[K],{enumerable:!0,configurable:!0}},ownKeys:function(W){return D._value_.__value?Object.keys(this._value_.__value):Object.keys(D._value_)}});return U}}typeof module!="undefined"&&(module.exports={Publisher,PublisherManager:PublisherManager$1});class r$h{static getLanguage(){return document.getElementsByTagName("html")[0].getAttribute("lang")}static getCookies(){return document.cookie.split(";").reduce((O,B)=>{const D=B.indexOf("=");return O[B.substring(0,D).trim()]=B.substring(D+1),O},{})}static getAncestorAttributeValue(O,B){for(;!(O.hasAttribute&&O.hasAttribute(B))&&(O.parentNode||O.host);)O=O.parentNode||O.host;return O.hasAttribute?O.getAttribute(B):null}}const n$h=class{constructor(q){this.serviceURL=q.serviceURL,this.serviceURL||(this.serviceURL=document.location.origin),this.userName=q.userName,this.password=q.password,this.token=q.token,this.tokenProvider=q.tokenProvider}async auth(){if(this.token)return;if(n$h.tokens.has(this.serviceURL)){this.token=n$h.tokens.get(this.serviceURL);return}if(!this.userName||!this.password||!this.tokenProvider)return;let q={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))},O=await fetch(this.computeURL(this.tokenProvider),{headers:q});try{let B=await O.json();this.token=B.token,n$h.tokens.set(this.serviceURL,this.token)}catch{}}async get(q,O){let B=await this.createHeaders(O);const D=this.computeURL(q);if(!n$h.loadingGetPromises.has(D)){let W=new Promise(async K=>{let Y=await fetch(D,{headers:B});try{let Z=await Y.json();K(Z)}catch{K(null)}});n$h.loadingGetPromises.set(D,W)}let U=await n$h.loadingGetPromises.get(D);return n$h.loadingGetPromises.delete(D),U}async createHeaders(q){await this.auth();let O={};return this.token&&(O.Authorization="Bearer "+this.token),O.credentials="include",O["Accept-Language"]=r$h.getLanguage(),q&&Object.assign(O,q),O}computeURL(q){return(this.serviceURL+"/"+q).replace(/([^(https?\:)])\/{2,}/g,"$1/")}async send(q,O,B="POST",D){await this.auth();let U=await this.createHeaders(D);U.Accept="application/json",U["Content-Type"]="application/json";let W=await fetch(this.computeURL(q),{headers:U,method:B,body:JSON.stringify(O)});try{return await W.json()}catch{return null}}async put(q,O,B){return this.send(q,O,"PUT",B)}async post(q,O,B){return this.send(q,O,"POST",B)}async delete(q,O,B){return this.send(q,O,"delete",B)}};let a$q=n$h;a$q.loadingGetPromises=new Map,a$q.tokens=new Map;class r$g{static ucFirst(O){return typeof O!="string"?O:O.charAt(0).toUpperCase()+O.substring(1)}static js(O){try{return Function("return "+O)()}catch{return""}}}const r$f=class{static disable(){!this.enabled||(this.enabled=!1,Array.from(r$f.observedElements.keys()).forEach(q=>r$f.unObserve(q)))}static observe(q){if(!r$f.enabled||r$f.observedElements.has(q))return;let O=new MutationObserver(r$f.onMutation),B={};B.childList=!0,B.subtree=!0,B.attributes=!0,B.attributeFilter=["data-bind"],O.observe(q,B),q.querySelectorAll("[data-bind]").forEach(D=>r$f.addPublisherListeners(D)),r$f.observedElements.set(q,O)}static unObserve(q){let O=this.observedElements.get(q);!O||(O.disconnect(),q.querySelectorAll("[data-bind]").forEach(B=>r$f.removePublisherListeners(B)))}static onAdded(q){q.hasAttribute&&q.hasAttribute("data-bind")&&r$f.addPublisherListeners(q),q.querySelectorAll?q.querySelectorAll("[data-bind]").forEach(O=>r$f.addPublisherListeners(O)):q.childNodes.forEach(O=>r$f.onAdded(O))}static onRemoved(q){q.hasAttribute&&q.hasAttribute("data-bind")&&r$f.removePublisherListeners(q),q.querySelectorAll?q.querySelectorAll("[data-bind]").forEach(O=>r$f.removePublisherListeners(O)):q.childNodes.forEach(O=>r$f.onRemoved(O))}static onMutation(q){for(let D of q)switch(D.type){case"attributes":r$f.addPublisherListeners(D.target);break;case"childList":var O=D.addedNodes,B=D.removedNodes;O.forEach(U=>{r$f.onAdded(U)}),B.forEach(U=>{r$f.onRemoved(U)});break}}static removePublisherListeners(q){let O=r$f.publisherListeners.get(q);!O||(r$f.publisherListeners.delete(q),O.forEach(B=>{B.publisher.offAssign(B.onAssign)}))}static getVariablesDescriptor(q){let O=q.match(/(\$(?:\w+\\?\.?)+)/g);return O?O=O.map(B=>B.replace("$","")):O=[q],O=O.filter(B=>B.length>0),{expression:q.replace("\\",""),variables:O.map(B=>B.split(/\b\.\b/).map(D=>D.replace("\\","")))}}static getDataBindItems(q){return Array.from(q.attributes).filter(O=>O.name.indexOf("::")==0).map(O=>({propertyToUpdate:O.name.substring(2).replace(/\-((html)|\w)/g,B=>B.substring(1).toUpperCase()),bindedVariablesDescriptor:r$f.getVariablesDescriptor(O.value)}))}static getSubPublisher(q,O){for(let B of O)B!="_self_"&&(q=q[B]);return q}static addPublisherListeners(q){r$f.removePublisherListeners(q);let O=q,B=r$h.getAncestorAttributeValue(O.parentNode||O.host||O,"dataProvider");if(!B)return;let D=PublisherManager$1.getInstance().get(B),U=r$f.getDataBindItems(q),W=[];U.forEach(K=>{let Y=K.bindedVariablesDescriptor,Z=K.propertyToUpdate;for(let G of Y.variables){let st=G,tt=D;tt=r$f.getSubPublisher(D,st);let Q=q,rt={publisher:tt,onAssign:()=>{let ot=Y.variables.map(ct=>r$f.getSubPublisher(D,ct).get()),nt=Y.expression,ht=!1;if(ot.length==1&&Y.variables[0].join(".")==nt.substring(1)){let ct=ot[0];ct===null&&(ct=""),Q[Z]=ct;return}for(let ct=0;ct<ot.length;ct++){let X=ot[ct],J=Y.variables[ct];X===null&&(ht=!0,X=void 0),nt=nt.replace("$"+J.join("."),X)}if(nt.indexOf("|")!=-1){let ct=nt.indexOf("|");if(ct==0)nt=r$g.js(nt.substring(1));else{let X=nt.substring(0,ct),J=nt.substring(ct+1),et=r$g;nt=ht?"":et[X]?et[X](J):nt}}else nt=ht?"":nt;Q[Z]=nt}};tt.onAssign(rt.onAssign),W.push(rt)}}),r$f.publisherListeners.set(q,W)}};let l$p=r$f;l$p.observedElements=new Map,l$p.enabled=!0,l$p.publisherListeners=new Map,l$p.observe(document.documentElement);let A$2=window;A$2.SonicDataBindObserver||(A$2.SonicDataBindObserver=l$p);class a$p{static shallowEqual(O,B){const D=Object.keys(O),U=Object.keys(B);if(D.length!==U.length)return!1;for(let W of D)if(O[W]!==B[W])return!1;return!0}static deepEqual(O,B){const D=Object.keys(O),U=Object.keys(B);if(D.length!==U.length)return!1;for(const W of D){const K=O[W],Y=B[W],Z=a$p.isObject(K)&&a$p.isObject(Y);if(Z&&!a$p.deepEqual(K,Y)||!Z&&K!==Y)return!1}return!0}static isObject(O){return O!=null&&typeof O=="object"}static isUndefindOrNull(O){return O==null}static traverse(O,B,D=!1){for(let U of B){let W=O[U];if(W===void 0)return;D&&a$p.isObject(W)?O=Object.assign(Array.isArray(W)?[]:{},O,W):O=O[U]}return O}}var y$6=Object.defineProperty,P$2=Object.getOwnPropertyDescriptor,a$o=(q,O,B,D)=>{for(var U=D>1?void 0:D?P$2(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&y$6(O,B,U),U};let f$h=!1,v$7=new Set;const L$1=q=>{const O=class extends q{constructor(...D){super(),this.noAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.defferedDebug=null,this.debug=null,this.onAssign=null,this.args=D}hasAncestorAttribute(D){return this.getAncestorAttributeValue(D)!=null}getAncestorAttributeValue(D){let U=this;return r$h.getAncestorAttributeValue(U,D)}get props(){return this.publisher?this.publisher.get():this._props}set props(D){typeof D=="string"&&["{","["].includes(D.trim().charAt(0))&&(D=JSON.parse(D)),(D==null||D==="")&&(D={}),this.publisher||this.initPublisher(),this._props=D,this.publisher&&this.publisher.set(D),this.requestUpdate()}updated(D){super.updated(D),this.shadowRoot?this.shadowRoot.children.length==0?this.style.display="none":this.style.removeProperty("display"):this.children.length==0?this.style.display="none":this.style.removeProperty("display")}connectedCallback(){if(this.hasAttribute("lazyRendering")){let D={root:null,rootMargin:Math.max(window.innerWidth*.1,window.innerHeight*.1)+"px"},U=!0;new IntersectionObserver(W=>{for(const K of W)U&&K.isIntersecting&&(U=!1,this.initWording(),this.initPublisher())},D).observe(this)}else this.initWording(),this.initPublisher();this.addDebugger(),super.connectedCallback(),O.instanceCounter++}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate())),this.wordingPublisher&&this.wordingPublisher.stopTemplateFilling(this),this.onAssign&&this.publisher.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");let D=this.debug.style;D.position="fixed",D.top="0",D.right="0",D.margin="auto",D.borderRadius=".7rem",D.backgroundColor="#0f1729",D.color="#c5d4f9",D.padding="16px 16px",D.margin="16px 16px",D.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",D.overflowY="auto",D.zIndex="99999999",D.maxHeight="calc(100vh - 32px)",D.fontFamily="Consolas, monospace",D.maxWidth="50vw",D.fontSize="12px",D.minWidth="300px",D.overflowWrap="break-word"}if(this.addEventListener("click",D=>{!D.ctrlKey||(D.preventDefault(),f$h=!f$h)}),this.dataProvider){let D=window;D[this.dataProvider]=this.publisher}this.addEventListener("mouseover",()=>{f$h||this.removeDebugger(),document.body.appendChild(this.debug),v$7.add(this.debug)}),this.addEventListener("mouseout",()=>{f$h||this.removeDebugger()}),this.publisher.onInternalMutation(()=>{this.debug.innerHTML=`\u{1F916} DataProvider : "<b style="font-weight:700;color:#fff">${this.dataProvider}</b>"<br><div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px">Variable disponible dans la console<br>ctrl + Clique : \xE9pingler / d\xE9s\xE9pingler</div><pre style="margin-top:10px;background:0 0;padding:0;font-size:inherit;color:inherit">${JSON.stringify(this.publisher.get(),null," ")}</pre>`})}}removeDebugger(){v$7.forEach(D=>{document.body.contains(D)&&document.body.removeChild(D)}),v$7=new Set}getApiConfiguration(){const D=this.getAncestorAttributeValue("token");let U=this.getAncestorAttributeValue("serviceURL"),W=null,K=null,Y=null;return D||(W=this.getAncestorAttributeValue("userName"),K=this.getAncestorAttributeValue("password"),Y=this.getAncestorAttributeValue("tokenProvider")),{serviceURL:U,token:D,userName:W,password:K,tokenProvider:Y}}async initWording(){let D=!1;const U=Object.getOwnPropertyNames(this.constructor.prototype);for(let Z of U)if(Z.indexOf("wording_")==0){D=!0;break}if(!D)return;let W=PublisherManager$1.getInstance().get("sonic-wording"),K=this.getAncestorAttributeValue("wordingProvider");const Y=new a$q(this.getApiConfiguration());if(K){let Z=[];for(let G of U)if(G.indexOf("wording_")==0){let st=G.substring(8);W.get()[G]||(W[G]="...",Z.push(st))}if(Z.length>0){let G=await Y.post(K,{labels:Z});for(let st in G)W["wording_"+st]=G[st]}W.startTemplateFilling(this),this.wordingPublisher=W}}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;let D=super.createRenderRoot();return l$p.observe(D),D}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const D=PublisherManager$1.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let U=this.dataProvider;if(!U&&this._props&&(this.dataProvider=U="__subscriber__"+O.instanceCounter),U){this.bindPublisher&&D.set(U,this.bindPublisher());let W=D.get(U);if(this.dataProvider=U,this.hasAttribute("subDataProvider")){let K=this.getAttribute("subDataProvider");this.dataProvider=U+"/"+K,W=a$p.traverse(W,K.split(".")),D.set(this.dataProvider,W),this.publisher=W}this.publisher=W}this.publisher&&(this.onAssign=()=>{this.requestUpdate()},this.publisher.onAssign(this.onAssign),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this._props&&this.publisher.set(this._props))}};let B=O;return B.instanceCounter=0,a$o([e$b({type:Boolean})],B.prototype,"noAutoFill",2),a$o([e$b({type:Object})],B.prototype,"propertyMap",2),a$o([e$b({type:String,attribute:"data-title"})],B.prototype,"title",2),a$o([e$b({reflect:!0})],B.prototype,"dataProvider",2),a$o([e$b()],B.prototype,"bindPublisher",2),a$o([e$b()],B.prototype,"props",1),B};let m$g=window;m$g.SonicPublisherManager||(m$g.SonicPublisherManager=PublisherManager$1);var p$i=Object.defineProperty,i$o=Object.getOwnPropertyDescriptor,n$g=(q,O,B,D)=>{for(var U=D>1?void 0:D?i$o(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$i(O,B,U),U};const T$2=q=>{class O extends q{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){let D=this.templates||[...this.querySelectorAll("template")];for(let U of D)U.hasAttribute(this.templateValueAttribute)&&(this.templateParts[U.getAttribute(this.templateValueAttribute)]=U,this.templatePartsList.push(U));this.templateList=D.filter(U=>!U.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=D),super.connectedCallback()}}return n$g([e$b({type:Array})],O.prototype,"templates",2),O};var p$h=Object.defineProperty,_=Object.getOwnPropertyDescriptor,t$9=(q,O,B,D)=>{for(var U=D>1?void 0:D?_(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$h(O,B,U),U};const M="sonic-date";let SonicDate=class extends L$1(T$2(s$a)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=new Date().getTime()/1e3,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.minute="2-digit",this.language="",this.renderIf=!0,this.startDateObject=new Date,this.endDateObject=new Date}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(q){this._wording_billet_periode_validite=q,this.duAu=this.wording_billet_periode_validite.split("%s").map(O=>O.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.wording_billet_periode_validite="Du %s au %s",this.pageLanguage=r$h.getLanguage(),super.connectedCallback()}getDatesParts(q,O,B){const D=new Intl.DateTimeFormat(this.language||this.pageLanguage,B);let U=this.startDateObject;U.setTime(q*1e3);let W=null;if(O>0){let K=this.endDateObject;if(K.setTime(O*1e3),W=D.formatRangeToParts(U,K),this.designMode)for(let Z of W)Z.type=="literal"&&this.designMode&&Z.value.trim()==","&&(Z.hidden=!0);const Y=U.getFullYear()==K.getFullYear()&&U.getMonth()==K.getMonth()&&U.getDate()==K.getDate();if(W.some(Z=>Z.source=="endRange")&&!Y){for(let Z of W)if(Z.type=="literal"&&Z.source=="shared"&&Z.value.trim().length>0&&!Y){Z.value=" "+this.duAu[1]+" ",Z.type="to";break}this.designMode||W.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else W=D.formatToParts(U);return W[0].value=r$g.ucFirst(W[0].value),W=W.filter(K=>K.hidden!==!0),W}render(){if(!this.renderIf)return w$1;if(this.date_string&&(this.date=new Date(this.date_string).getTime()/1e3),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=new Date(this.start_date_string).getTime()/1e3),this.end_date_string&&(this.end_date=new Date(this.end_date_string).getTime()/1e3),this.end_date>0&&this.end_date<this.start_date){const B=this.start_date;this.start_date=this.end_date,this.end_date=B}let q={weekday:this.weekday,year:this.year,month:this.month,day:this.day};this.hour&&(q.hour=this.hour),this.minute&&(q.minute=this.minute),this.era&&(q.era=this.era),this.time_zone&&(q.timeZone=this.time_zone);let O=this.getDatesParts(this.start_date,this.end_date,q);return $$2`${O.map(B=>{let D=this.templateParts[B.type];if(D){var U=document.importNode(D.content,!0);let W=U.children[0];return W.innerText.trim()==""&&(W.innerText=B.value),U}return $$2`<span class="${B.type}">${B.value}</span>`})}`}};t$9([e$b()],SonicDate.prototype,"wording_billet_periode_validite",1),t$9([e$b({type:Boolean})],SonicDate.prototype,"designMode",2),t$9([e$b({type:String})],SonicDate.prototype,"time_zone",2),t$9([e$b({type:Number})],SonicDate.prototype,"date",2),t$9([e$b({type:String})],SonicDate.prototype,"date_string",2),t$9([e$b({type:String})],SonicDate.prototype,"start_date_string",2),t$9([e$b({type:String})],SonicDate.prototype,"end_date_string",2),t$9([e$b({type:Number})],SonicDate.prototype,"start_date",2),t$9([e$b({type:Number})],SonicDate.prototype,"end_date",2),t$9([e$b({type:String})],SonicDate.prototype,"era",2),t$9([e$b({type:String})],SonicDate.prototype,"year",2),t$9([e$b({type:String})],SonicDate.prototype,"month",2),t$9([e$b({type:String})],SonicDate.prototype,"day",2),t$9([e$b({type:String})],SonicDate.prototype,"weekday",2),t$9([e$b({type:String})],SonicDate.prototype,"hour",2),t$9([e$b({type:String})],SonicDate.prototype,"minute",2),t$9([e$b({type:String})],SonicDate.prototype,"language",2),t$9([e$b({type:Boolean})],SonicDate.prototype,"renderIf",2),SonicDate=t$9([n$j(M)],SonicDate);const inline=r$k`:host([align="left"]) .sonic-loader--inline { margin-left:0; } :host([align="right"]) .sonic-loader--inline { margin-left:auto; margin-right:0; } .sonic-loader--inline { display:block; position: relative; width: 80px; height: 80px; margin:auto; z-index:20; } .sonic-loader--inline div { position: absolute; top: 33px; width: 13px; height: 13px; border-radius: 50%; background:var(--sc-loader-bg); animation-timing-function: cubic-bezier(0, 1, 1, 0); } .sonic-loader--inline div:nth-child(1) { left: 8px; animation: lds-ellipsis1 0.6s infinite; } .sonic-loader--inline div:nth-child(2) { left: 8px; animation: lds-ellipsis2 0.6s infinite; } .sonic-loader--inline div:nth-child(3) { left: 32px; animation: lds-ellipsis2 0.6s infinite; } .sonic-loader--inline div:nth-child(4) { left: 56px; animation: lds-ellipsis3 0.6s infinite; } @keyframes lds-ellipsis1 { 0% { transform: scale(0); } 100% { transform: scale(1); } } @keyframes lds-ellipsis3 { 0% { transform: scale(1); } 100% { transform: scale(0); } } @keyframes lds-ellipsis2 { 0% { transform: translate(0, 0); } 100% { transform: translate(24px, 0); } }`,fixed=r$k`@keyframes sonic-loader--fixed { 0% { transform: scale(0); opacity: 0; } 5% { opacity: 1; } 70% { opacity:90%; } 100% { transform: scale(1); opacity: 0; } } .sonic-loader--fixed { position: fixed; top:50%; left:50%; transform:transateY(-50%) translateX(-50%); z-index:999; } .sonic-loader--fixed > div:nth-child(2) { animation-delay: -0.5s; } .sonic-loader--fixed > div:nth-child(3) { animation-delay: -0.2s; } .sonic-loader--fixed > div:nth-child(4) { display:none !important; } .sonic-loader--fixed > div { background-color: var(--sc-loader-bg); width: 5rem; height: 5rem; border-radius: 100%; margin: 2px; animation-fill-mode: both; position: absolute; top: 0px; opacity: 0; margin: 0; top: -2.5rem; left: -2.5rem; width: 5rem; height: 5rem; animation: sonic-loader--fixed 1s 0s linear infinite; }`;var d$r=Object.defineProperty,c$m=Object.getOwnPropertyDescriptor,a$n=(q,O,B,D)=>{for(var U=D>1?void 0:D?c$m(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$r(O,B,U),U};const l$o="sonic-loader";let Loader=class extends s$a{constructor(){super(...arguments),this.mode="fixed"}static show(q){Loader.loader||(Loader.loader=document.createElement("sonic-loader"));let O=Loader.loader;q||(q={});let B=q;for(let D in B)O.setAttribute(D,B[D]);q.container||(q.container=document.querySelector("sonic-theme")||document.body,q.mode="fixed"),q.container.appendChild(O),Loader.callCounter++}static hide(){Loader.callCounter--,!(Loader.callCounter>0)&&Loader.loader&&Loader.loader.remove()}render(){return $$2`<div class="sonic-loader sonic-loader--${this.mode}"><div></div><div></div><div></div><div></div></div>`}};Loader.styles=[inline,fixed,r$k`:host { --sc-loader-bg: var(--sc-primary, currentColor); pointer-events: none; } .sonic-loader { opacity: 0; animation: showLoader 0.5s 0.5s forwards; } .sonic-loader--inline { animation-delay: 0s; } @keyframes showLoader { 0% { opacity: 0; } 100% { opacity: 1; } }`],Loader.callCounter=0,a$n([e$b({type:String})],Loader.prototype,"mode",2),Loader=a$n([n$j(l$o)],Loader);try{customElements.define(l$o,Loader)}catch{}/**
46
46
  * @license
47
47
  * Copyright 2017 Google LLC
48
48
  * SPDX-License-Identifier: BSD-3-Clause
49
- */const t$8={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$9=q=>(...O)=>({_$litDirective$:q,values:O});class i$o{constructor(O){}get _$AU(){return this._$AM._$AU}_$AT(O,B,D){this._$Ct=O,this._$AM=B,this._$Ci=D}_$AS(O,B){return this.update(O,B)}update(O,B){return this.render(...B)}}/**
49
+ */const t$8={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$9=q=>(...O)=>({_$litDirective$:q,values:O});class i$n{constructor(O){}get _$AU(){return this._$AM._$AU}_$AT(O,B,D){this._$Ct=O,this._$AM=B,this._$Ci=D}_$AS(O,B){return this.update(O,B)}update(O,B){return this.render(...B)}}/**
50
50
  * @license
51
51
  * Copyright 2020 Google LLC
52
52
  * SPDX-License-Identifier: BSD-3-Clause
53
- */const{H:i$n}=R$1,r$h=q=>q.strings===void 0,e$8=()=>document.createComment(""),u$8=(q,O,B)=>{var D;const U=q._$AA.parentNode,W=O===void 0?q._$AB:O._$AA;if(B===void 0){const K=U.insertBefore(e$8(),W),Y=U.insertBefore(e$8(),W);B=new i$n(K,Y,q,q.options)}else{const K=B._$AB.nextSibling,Y=B._$AM,Z=Y!==q;if(Z){let G;(D=B._$AQ)===null||D===void 0||D.call(B,q),B._$AM=q,B._$AP!==void 0&&(G=q._$AU)!==Y._$AU&&B._$AP(G)}if(K!==W||Z){let G=B._$AA;for(;G!==K;){const st=G.nextSibling;U.insertBefore(G,W),G=st}}}return B},c$n=(q,O,B=q)=>(q._$AI(O,B),q),f$k={},s$8=(q,O=f$k)=>q._$AH=O,a$l=q=>q._$AH,m$f=q=>{var O;(O=q._$AP)===null||O===void 0||O.call(q,!1,!0);let B=q._$AA;const D=q._$AB.nextSibling;for(;B!==D;){const U=B.nextSibling;B.remove(),B=U}};/**
53
+ */const{H:i$m}=R$1,r$e=q=>q.strings===void 0,e$8=()=>document.createComment(""),u$a=(q,O,B)=>{var D;const U=q._$AA.parentNode,W=O===void 0?q._$AB:O._$AA;if(B===void 0){const K=U.insertBefore(e$8(),W),Y=U.insertBefore(e$8(),W);B=new i$m(K,Y,q,q.options)}else{const K=B._$AB.nextSibling,Y=B._$AM,Z=Y!==q;if(Z){let G;(D=B._$AQ)===null||D===void 0||D.call(B,q),B._$AM=q,B._$AP!==void 0&&(G=q._$AU)!==Y._$AU&&B._$AP(G)}if(K!==W||Z){let G=B._$AA;for(;G!==K;){const st=G.nextSibling;U.insertBefore(G,W),G=st}}}return B},c$l=(q,O,B=q)=>(q._$AI(O,B),q),f$g={},s$9=(q,O=f$g)=>q._$AH=O,a$m=q=>q._$AH,m$f=q=>{var O;(O=q._$AP)===null||O===void 0||O.call(q,!1,!0);let B=q._$AA;const D=q._$AB.nextSibling;for(;B!==D;){const U=B.nextSibling;B.remove(),B=U}};/**
54
54
  * @license
55
55
  * Copyright 2017 Google LLC
56
56
  * SPDX-License-Identifier: BSD-3-Clause
57
- */const u$7=(q,O,B)=>{const D=new Map;for(let U=O;U<=B;U++)D.set(q[U],U);return D},c$m=e$9(class extends i$o{constructor(q){if(super(q),q.type!==t$8.CHILD)throw Error("repeat() can only be used in text expressions")}dt(q,O,B){let D;B===void 0?B=O:O!==void 0&&(D=O);const U=[],W=[];let K=0;for(const Y of q)U[K]=D?D(Y,K):K,W[K]=B(Y,K),K++;return{values:W,keys:U}}render(q,O,B){return this.dt(q,O,B).values}update(q,[O,B,D]){var U;const W=a$l(q),{values:K,keys:Y}=this.dt(O,B,D);if(!Array.isArray(W))return this.ut=Y,K;const Z=(U=this.ut)!==null&&U!==void 0?U:this.ut=[],G=[];let st,tt,Q=0,rt=W.length-1,ot=0,nt=K.length-1;for(;Q<=rt&&ot<=nt;)if(W[Q]===null)Q++;else if(W[rt]===null)rt--;else if(Z[Q]===Y[ot])G[ot]=c$n(W[Q],K[ot]),Q++,ot++;else if(Z[rt]===Y[nt])G[nt]=c$n(W[rt],K[nt]),rt--,nt--;else if(Z[Q]===Y[nt])G[nt]=c$n(W[Q],K[nt]),u$8(q,G[nt+1],W[Q]),Q++,nt--;else if(Z[rt]===Y[ot])G[ot]=c$n(W[rt],K[ot]),u$8(q,W[Q],W[rt]),rt--,ot++;else if(st===void 0&&(st=u$7(Y,ot,nt),tt=u$7(Z,Q,rt)),st.has(Z[Q]))if(st.has(Z[rt])){const ht=tt.get(Y[ot]),ct=ht!==void 0?W[ht]:null;if(ct===null){const X=u$8(q,W[Q]);c$n(X,K[ot]),G[ot]=X}else G[ot]=c$n(ct,K[ot]),u$8(q,W[Q],ct),W[ht]=null;ot++}else m$f(W[rt]),rt--;else m$f(W[Q]),Q++;for(;ot<=nt;){const ht=u$8(q,G[nt+1]);c$n(ht,K[ot]),G[ot++]=ht}for(;Q<=rt;){const ht=W[Q++];ht!==null&&m$f(ht)}return this.ut=Y,s$8(q,G),b$5}});/**
57
+ */const u$9=(q,O,B)=>{const D=new Map;for(let U=O;U<=B;U++)D.set(q[U],U);return D},c$k=e$9(class extends i$n{constructor(q){if(super(q),q.type!==t$8.CHILD)throw Error("repeat() can only be used in text expressions")}dt(q,O,B){let D;B===void 0?B=O:O!==void 0&&(D=O);const U=[],W=[];let K=0;for(const Y of q)U[K]=D?D(Y,K):K,W[K]=B(Y,K),K++;return{values:W,keys:U}}render(q,O,B){return this.dt(q,O,B).values}update(q,[O,B,D]){var U;const W=a$m(q),{values:K,keys:Y}=this.dt(O,B,D);if(!Array.isArray(W))return this.ut=Y,K;const Z=(U=this.ut)!==null&&U!==void 0?U:this.ut=[],G=[];let st,tt,Q=0,rt=W.length-1,ot=0,nt=K.length-1;for(;Q<=rt&&ot<=nt;)if(W[Q]===null)Q++;else if(W[rt]===null)rt--;else if(Z[Q]===Y[ot])G[ot]=c$l(W[Q],K[ot]),Q++,ot++;else if(Z[rt]===Y[nt])G[nt]=c$l(W[rt],K[nt]),rt--,nt--;else if(Z[Q]===Y[nt])G[nt]=c$l(W[Q],K[nt]),u$a(q,G[nt+1],W[Q]),Q++,nt--;else if(Z[rt]===Y[ot])G[ot]=c$l(W[rt],K[ot]),u$a(q,W[Q],W[rt]),rt--,ot++;else if(st===void 0&&(st=u$9(Y,ot,nt),tt=u$9(Z,Q,rt)),st.has(Z[Q]))if(st.has(Z[rt])){const ht=tt.get(Y[ot]),ct=ht!==void 0?W[ht]:null;if(ct===null){const X=u$a(q,W[Q]);c$l(X,K[ot]),G[ot]=X}else G[ot]=c$l(ct,K[ot]),u$a(q,W[Q],ct),W[ht]=null;ot++}else m$f(W[rt]),rt--;else m$f(W[Q]),Q++;for(;ot<=nt;){const ht=u$a(q,G[nt+1]);c$l(ht,K[ot]),G[ot++]=ht}for(;Q<=rt;){const ht=W[Q++];ht!==null&&m$f(ht)}return this.ut=Y,s$9(q,G),b$6}});/**
58
58
  * @license
59
59
  * Copyright 2017 Google LLC
60
60
  * SPDX-License-Identifier: BSD-3-Clause
61
- */const e$7=(q,O)=>{var B,D;const U=q._$AN;if(U===void 0)return!1;for(const W of U)(D=(B=W)._$AO)===null||D===void 0||D.call(B,O,!1),e$7(W,O);return!0},o$b=q=>{let O,B;do{if((O=q._$AM)===void 0)break;B=O._$AN,B.delete(q),q=O}while((B==null?void 0:B.size)===0)},n$f=q=>{for(let O;O=q._$AM;q=O){let B=O._$AN;if(B===void 0)O._$AN=B=new Set;else if(B.has(q))break;B.add(q),l$m(O)}};function r$g(q){this._$AN!==void 0?(o$b(this),this._$AM=q,n$f(this)):this._$AM=q}function h$a(q,O=!1,B=0){const D=this._$AH,U=this._$AN;if(U!==void 0&&U.size!==0)if(O)if(Array.isArray(D))for(let W=B;W<D.length;W++)e$7(D[W],!1),o$b(D[W]);else D!=null&&(e$7(D,!1),o$b(D));else e$7(this,q)}const l$m=q=>{var O,B,D,U;q.type==t$8.CHILD&&((O=(D=q)._$AP)!==null&&O!==void 0||(D._$AP=h$a),(B=(U=q)._$AQ)!==null&&B!==void 0||(U._$AQ=r$g))};class d$p extends i$o{constructor(){super(...arguments),this._$AN=void 0}_$AT(O,B,D){super._$AT(O,B,D),n$f(this),this.isConnected=O._$AU}_$AO(O,B=!0){var D,U;O!==this.isConnected&&(this.isConnected=O,O?(D=this.reconnected)===null||D===void 0||D.call(this):(U=this.disconnected)===null||U===void 0||U.call(this)),B&&(e$7(this,O),o$b(this))}setValue(O){if(r$h(this._$Ct))this._$Ct._$AI(O,this);else{const B=[...this._$Ct._$AH];B[this._$Ci]=O,this._$Ct._$AI(B,this,0)}}disconnected(){}reconnected(){}}const i$m=new WeakMap;let h$9=0;const r$f=new Map,n$e=new WeakSet,a$k=()=>new Promise(q=>requestAnimationFrame(q)),f$j=[{opacity:0}],p$f=[{opacity:0},{opacity:1}],g$5=(q,O)=>{const B=q-O;return B===0?void 0:B},w=(q,O)=>{const B=q/O;return B===1?void 0:B},A$1={left:(q,O)=>{const B=g$5(q,O);return{value:B,transform:B&&`translateX(${B}px)`}},top:(q,O)=>{const B=g$5(q,O);return{value:B,transform:B&&`translateY(${B}px)`}},width:(q,O)=>{const B=w(q,O);return{value:B,transform:B&&`scaleX(${B})`}},height:(q,O)=>{const B=w(q,O);return{value:B,transform:B&&`scaleY(${B})`}}},b$4={duration:333,easing:"ease-in-out"},j=["left","top","width","height","opacity","color","background"],x$2=new WeakMap;class S extends d$p{constructor(O){if(super(O),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,O.type===t$8.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var O;(O=this.resolveFinished)===null||O===void 0||O.call(this),this.finished=new Promise(B=>{this.h=B})}async resolveFinished(){var O;(O=this.h)===null||O===void 0||O.call(this),this.h=void 0}render(O){return w$1}getController(){return i$m.get(this.l)}isDisabled(){var O;return this.options.disabled||((O=this.getController())===null||O===void 0?void 0:O.disabled)}update(O,[B]){var D;const U=this.l===void 0;return U&&(this.l=(D=O.options)===null||D===void 0?void 0:D.host,this.l.addController(this),this.element=O.element,x$2.set(this.element,this)),this.optionsOrCallback=B,(U||typeof B!="function")&&this.u(B),this.render(B)}u(O){var B,D;O=O!=null?O:{};const U=this.getController();U!==void 0&&((O=ut(ut({},U.defaultOptions),O)).keyframeOptions=ut(ut({},U.defaultOptions.keyframeOptions),O.keyframeOptions)),(B=(D=O).properties)!==null&&B!==void 0||(D.properties=j),this.options=O}v(){const O={},B=this.element.getBoundingClientRect(),D=getComputedStyle(this.element);return this.options.properties.forEach(U=>{var W;const K=(W=B[U])!==null&&W!==void 0?W:A$1[U]?void 0:D[U],Y=Number(K);O[U]=isNaN(Y)?K+"":Y}),O}p(){let O,B=!0;return this.options.guard&&(O=this.options.guard(),B=((D,U)=>{if(Array.isArray(D)){if(Array.isArray(U)&&U.length===D.length&&D.every((W,K)=>W===U[K]))return!1}else if(U===D)return!1;return!0})(O,this.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&B&&this.element.isConnected,this.o&&(this.m=Array.isArray(O)?Array.from(O):O),this.o}hostUpdate(){var O;typeof this.optionsOrCallback=="function"&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=(O=this.t)!==null&&O!==void 0?O:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let O;this.prepare(),await a$k;const B=this.A(),D=this._(this.options.keyframeOptions,B),U=this.v();if(this.g!==void 0){const{from:W,to:K}=this.j(this.g,U,B);this.log("measured",[this.g,U,W,K]),O=this.calculateKeyframes(W,K)}else{const W=r$f.get(this.options.inId);if(W){r$f.delete(this.options.inId);const{from:K,to:Y}=this.j(W,U,B);O=this.calculateKeyframes(K,Y),O=this.options.in?[ut(ut({},this.options.in[0]),O[0]),...this.options.in.slice(1),O[1]]:O,h$9++,O.forEach(Z=>Z.zIndex=h$9)}else this.options.in&&(O=[...this.options.in,{}])}this.animate(O,D)}resetStyles(){var O;this.S!==void 0&&(this.element.setAttribute("style",(O=this.S)!==null&&O!==void 0?O:""),this.S=void 0)}commitStyles(){var O,B;this.S=this.element.getAttribute("style"),(O=this.webAnimation)===null||O===void 0||O.commitStyles(),(B=this.webAnimation)===null||B===void 0||B.cancel()}reconnected(){}async disconnected(){var O;if(!this.o||(this.options.id!==void 0&&r$f.set(this.options.id,this.g),this.options.out===void 0))return;if(this.prepare(),await a$k(),(O=this.t)===null||O===void 0?void 0:O.isConnected){const D=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,D),this.options.stabilizeOut){const U=this.v();this.log("stabilizing out");const W=this.g.left-U.left,K=this.g.top-U.top;getComputedStyle(this.element).position!=="static"||W===0&&K===0||(this.element.style.position="relative"),W!==0&&(this.element.style.left=W+"px"),K!==0&&(this.element.style.top=K+"px")}}const B=this._(this.options.keyframeOptions);await this.animate(this.options.out,B),this.element.remove()}prepare(){this.createFinished()}start(){var O,B;(B=(O=this.options).onStart)===null||B===void 0||B.call(O,this)}didFinish(O){var B,D;O&&((D=(B=this.options).onComplete)===null||D===void 0||D.call(B,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}A(){const O=[];for(let B=this.element.parentNode;B;B=B==null?void 0:B.parentNode){const D=x$2.get(B);D&&!D.isDisabled()&&D&&O.push(D)}return O}get isHostRendered(){const O=n$e.has(this.l);return O||this.l.updateComplete.then(()=>{n$e.add(this.l)}),O}_(O,B=this.A()){const D=ut({},b$4);return B.forEach(U=>Object.assign(D,U.options.keyframeOptions)),Object.assign(D,O),D}j(O,B,D){O=ut({},O),B=ut({},B);const U=D.map(Y=>Y.animatingProperties).filter(Y=>Y!==void 0);let W=1,K=1;return U!==void 0&&(U.forEach(Y=>{Y.width&&(W/=Y.width),Y.height&&(K/=Y.height)}),O.left!==void 0&&B.left!==void 0&&(O.left=W*O.left,B.left=W*B.left),O.top!==void 0&&B.top!==void 0&&(O.top=K*O.top,B.top=K*B.top)),{from:O,to:B}}calculateKeyframes(O,B,D=!1){var U;const W={},K={};let Y=!1;const Z={};for(const G in B){const st=O[G],tt=B[G];if(G in A$1){const Q=A$1[G];if(st===void 0||tt===void 0)continue;const rt=Q(st,tt);rt.transform!==void 0&&(Z[G]=rt.value,Y=!0,W.transform=`${(U=W.transform)!==null&&U!==void 0?U:""} ${rt.transform}`)}else st!==tt&&st!==void 0&&tt!==void 0&&(Y=!0,W[G]=st,K[G]=tt)}return W.transformOrigin=K.transformOrigin=D?"center center":"top left",this.animatingProperties=Z,Y?[W,K]:void 0}async animate(O,B=this.options.keyframeOptions){this.start(),this.frames=O;let D=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=O=this.options.onFrames(this),this.log("modified frames",O)),O!==void 0)){this.log("animate",[O,B]),D=!0,this.webAnimation=this.element.animate(O,B);const U=this.getController();U==null||U.add(this);try{await this.webAnimation.finished}catch{}U==null||U.remove(this)}return this.didFinish(D),D}isAnimating(){var O,B;return((O=this.webAnimation)===null||O===void 0?void 0:O.playState)==="running"||((B=this.webAnimation)===null||B===void 0?void 0:B.pending)}log(O,B){this.shouldLog&&!this.isDisabled()&&console.log(O,this.options.id,B)}}const $$1=e$9(S);/**
61
+ */const e$7=(q,O)=>{var B,D;const U=q._$AN;if(U===void 0)return!1;for(const W of U)(D=(B=W)._$AO)===null||D===void 0||D.call(B,O,!1),e$7(W,O);return!0},o$b=q=>{let O,B;do{if((O=q._$AM)===void 0)break;B=O._$AN,B.delete(q),q=O}while((B==null?void 0:B.size)===0)},n$f=q=>{for(let O;O=q._$AM;q=O){let B=O._$AN;if(B===void 0)O._$AN=B=new Set;else if(B.has(q))break;B.add(q),l$n(O)}};function r$d(q){this._$AN!==void 0?(o$b(this),this._$AM=q,n$f(this)):this._$AM=q}function h$b(q,O=!1,B=0){const D=this._$AH,U=this._$AN;if(U!==void 0&&U.size!==0)if(O)if(Array.isArray(D))for(let W=B;W<D.length;W++)e$7(D[W],!1),o$b(D[W]);else D!=null&&(e$7(D,!1),o$b(D));else e$7(this,q)}const l$n=q=>{var O,B,D,U;q.type==t$8.CHILD&&((O=(D=q)._$AP)!==null&&O!==void 0||(D._$AP=h$b),(B=(U=q)._$AQ)!==null&&B!==void 0||(U._$AQ=r$d))};class d$q extends i$n{constructor(){super(...arguments),this._$AN=void 0}_$AT(O,B,D){super._$AT(O,B,D),n$f(this),this.isConnected=O._$AU}_$AO(O,B=!0){var D,U;O!==this.isConnected&&(this.isConnected=O,O?(D=this.reconnected)===null||D===void 0||D.call(this):(U=this.disconnected)===null||U===void 0||U.call(this)),B&&(e$7(this,O),o$b(this))}setValue(O){if(r$e(this._$Ct))this._$Ct._$AI(O,this);else{const B=[...this._$Ct._$AH];B[this._$Ci]=O,this._$Ct._$AI(B,this,0)}}disconnected(){}reconnected(){}}const i$l=new WeakMap;let h$a=0;const r$c=new Map,n$e=new WeakSet,a$l=()=>new Promise(q=>requestAnimationFrame(q)),f$f=[{opacity:0}],p$g=[{opacity:0},{opacity:1}],g$5=(q,O)=>{const B=q-O;return B===0?void 0:B},w=(q,O)=>{const B=q/O;return B===1?void 0:B},A$1={left:(q,O)=>{const B=g$5(q,O);return{value:B,transform:B&&`translateX(${B}px)`}},top:(q,O)=>{const B=g$5(q,O);return{value:B,transform:B&&`translateY(${B}px)`}},width:(q,O)=>{const B=w(q,O);return{value:B,transform:B&&`scaleX(${B})`}},height:(q,O)=>{const B=w(q,O);return{value:B,transform:B&&`scaleY(${B})`}}},b$5={duration:333,easing:"ease-in-out"},j=["left","top","width","height","opacity","color","background"],x$2=new WeakMap;class S extends d$q{constructor(O){if(super(O),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,O.type===t$8.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var O;(O=this.resolveFinished)===null||O===void 0||O.call(this),this.finished=new Promise(B=>{this.h=B})}async resolveFinished(){var O;(O=this.h)===null||O===void 0||O.call(this),this.h=void 0}render(O){return w$1}getController(){return i$l.get(this.l)}isDisabled(){var O;return this.options.disabled||((O=this.getController())===null||O===void 0?void 0:O.disabled)}update(O,[B]){var D;const U=this.l===void 0;return U&&(this.l=(D=O.options)===null||D===void 0?void 0:D.host,this.l.addController(this),this.element=O.element,x$2.set(this.element,this)),this.optionsOrCallback=B,(U||typeof B!="function")&&this.u(B),this.render(B)}u(O){var B,D;O=O!=null?O:{};const U=this.getController();U!==void 0&&((O=ut(ut({},U.defaultOptions),O)).keyframeOptions=ut(ut({},U.defaultOptions.keyframeOptions),O.keyframeOptions)),(B=(D=O).properties)!==null&&B!==void 0||(D.properties=j),this.options=O}v(){const O={},B=this.element.getBoundingClientRect(),D=getComputedStyle(this.element);return this.options.properties.forEach(U=>{var W;const K=(W=B[U])!==null&&W!==void 0?W:A$1[U]?void 0:D[U],Y=Number(K);O[U]=isNaN(Y)?K+"":Y}),O}p(){let O,B=!0;return this.options.guard&&(O=this.options.guard(),B=((D,U)=>{if(Array.isArray(D)){if(Array.isArray(U)&&U.length===D.length&&D.every((W,K)=>W===U[K]))return!1}else if(U===D)return!1;return!0})(O,this.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&B&&this.element.isConnected,this.o&&(this.m=Array.isArray(O)?Array.from(O):O),this.o}hostUpdate(){var O;typeof this.optionsOrCallback=="function"&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=(O=this.t)!==null&&O!==void 0?O:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let O;this.prepare(),await a$l;const B=this.A(),D=this._(this.options.keyframeOptions,B),U=this.v();if(this.g!==void 0){const{from:W,to:K}=this.j(this.g,U,B);this.log("measured",[this.g,U,W,K]),O=this.calculateKeyframes(W,K)}else{const W=r$c.get(this.options.inId);if(W){r$c.delete(this.options.inId);const{from:K,to:Y}=this.j(W,U,B);O=this.calculateKeyframes(K,Y),O=this.options.in?[ut(ut({},this.options.in[0]),O[0]),...this.options.in.slice(1),O[1]]:O,h$a++,O.forEach(Z=>Z.zIndex=h$a)}else this.options.in&&(O=[...this.options.in,{}])}this.animate(O,D)}resetStyles(){var O;this.S!==void 0&&(this.element.setAttribute("style",(O=this.S)!==null&&O!==void 0?O:""),this.S=void 0)}commitStyles(){var O,B;this.S=this.element.getAttribute("style"),(O=this.webAnimation)===null||O===void 0||O.commitStyles(),(B=this.webAnimation)===null||B===void 0||B.cancel()}reconnected(){}async disconnected(){var O;if(!this.o||(this.options.id!==void 0&&r$c.set(this.options.id,this.g),this.options.out===void 0))return;if(this.prepare(),await a$l(),(O=this.t)===null||O===void 0?void 0:O.isConnected){const D=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,D),this.options.stabilizeOut){const U=this.v();this.log("stabilizing out");const W=this.g.left-U.left,K=this.g.top-U.top;getComputedStyle(this.element).position!=="static"||W===0&&K===0||(this.element.style.position="relative"),W!==0&&(this.element.style.left=W+"px"),K!==0&&(this.element.style.top=K+"px")}}const B=this._(this.options.keyframeOptions);await this.animate(this.options.out,B),this.element.remove()}prepare(){this.createFinished()}start(){var O,B;(B=(O=this.options).onStart)===null||B===void 0||B.call(O,this)}didFinish(O){var B,D;O&&((D=(B=this.options).onComplete)===null||D===void 0||D.call(B,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}A(){const O=[];for(let B=this.element.parentNode;B;B=B==null?void 0:B.parentNode){const D=x$2.get(B);D&&!D.isDisabled()&&D&&O.push(D)}return O}get isHostRendered(){const O=n$e.has(this.l);return O||this.l.updateComplete.then(()=>{n$e.add(this.l)}),O}_(O,B=this.A()){const D=ut({},b$5);return B.forEach(U=>Object.assign(D,U.options.keyframeOptions)),Object.assign(D,O),D}j(O,B,D){O=ut({},O),B=ut({},B);const U=D.map(Y=>Y.animatingProperties).filter(Y=>Y!==void 0);let W=1,K=1;return U!==void 0&&(U.forEach(Y=>{Y.width&&(W/=Y.width),Y.height&&(K/=Y.height)}),O.left!==void 0&&B.left!==void 0&&(O.left=W*O.left,B.left=W*B.left),O.top!==void 0&&B.top!==void 0&&(O.top=K*O.top,B.top=K*B.top)),{from:O,to:B}}calculateKeyframes(O,B,D=!1){var U;const W={},K={};let Y=!1;const Z={};for(const G in B){const st=O[G],tt=B[G];if(G in A$1){const Q=A$1[G];if(st===void 0||tt===void 0)continue;const rt=Q(st,tt);rt.transform!==void 0&&(Z[G]=rt.value,Y=!0,W.transform=`${(U=W.transform)!==null&&U!==void 0?U:""} ${rt.transform}`)}else st!==tt&&st!==void 0&&tt!==void 0&&(Y=!0,W[G]=st,K[G]=tt)}return W.transformOrigin=K.transformOrigin=D?"center center":"top left",this.animatingProperties=Z,Y?[W,K]:void 0}async animate(O,B=this.options.keyframeOptions){this.start(),this.frames=O;let D=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=O=this.options.onFrames(this),this.log("modified frames",O)),O!==void 0)){this.log("animate",[O,B]),D=!0,this.webAnimation=this.element.animate(O,B);const U=this.getController();U==null||U.add(this);try{await this.webAnimation.finished}catch{}U==null||U.remove(this)}return this.didFinish(D),D}isAnimating(){var O,B;return((O=this.webAnimation)===null||O===void 0?void 0:O.playState)==="running"||((B=this.webAnimation)===null||B===void 0?void 0:B.pending)}log(O,B){this.shouldLog&&!this.isDisabled()&&console.log(O,this.options.id,B)}}const $$1=e$9(S);/**
62
62
  * @license
63
63
  * Copyright 2017 Google LLC
64
64
  * SPDX-License-Identifier: BSD-3-Clause
65
- */class e$6 extends i$o{constructor(O){if(super(O),this.it=w$1,O.type!==t$8.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(O){if(O===w$1||O==null)return this.ft=void 0,this.it=O;if(O===b$5)return O;if(typeof O!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(O===this.it)return this.ft;this.it=O;const B=[O];return B.raw=B,this.ft={_$litType$:this.constructor.resultType,strings:B,values:[]}}}e$6.directiveName="unsafeHTML",e$6.resultType=1;const o$a=e$9(e$6),core={cancel:`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
65
+ */class e$6 extends i$n{constructor(O){if(super(O),this.it=w$1,O.type!==t$8.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(O){if(O===w$1||O==null)return this.ft=void 0,this.it=O;if(O===b$6)return O;if(typeof O!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(O===this.it)return this.ft;this.it=O;const B=[O];return B.raw=B,this.ft={_$litType$:this.constructor.resultType,strings:B,values:[]}}}e$6.directiveName="unsafeHTML",e$6.resultType=1;const o$a=e$9(e$6),core={cancel:`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
66
66
  <path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
67
67
  </svg>
68
68
  `,"check-circled-outline":`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -95,21 +95,21 @@ var wt=Object.defineProperty,$t=Object.defineProperties;var xt=Object.getOwnProp
95
95
  <path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
96
96
  <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
97
97
  </svg>
98
- `};var y$4={core};const m$e=new Map,l$l={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"}};let b$3=!1;function v$6(){var q,O;b$3||(b$3=!0,l$l.custom={},l$l.custom.url=(q=document.querySelector("[customIconLibraryPath]"))==null?void 0:q.getAttribute("customIconLibraryPath"),l$l.custom.defaultPrefix=(O=document.querySelector("[customIconDefaultPrefix]"))==null?void 0:O.getAttribute("customIconDefaultPrefix"))}const d$o=class{static registerIcons(q){const O=y$4;for(let B in q){const D=q[B],U=O[B]||{};for(let W in D)U[W]=D[W];O[B]=U}}};let f$i=d$o;f$i.fontAwesomeNext={get:async q=>{let O=q.library,B=q.name||"";const D=y$4;if(O=="custom"&&v$6(),O&&l$l[O]){let U=l$l[O],W=q.prefix||U.defaultPrefix,K=D[O]||{},Y=W+"-"+B;if(K[Y])return o$a(K[Y]);let Z=U.url.replace("$prefix",W).replace("$name",B);if(K[Y])return o$a(K[Y]);if(!m$e.has(Z)){let st=new Promise(async tt=>{let Q=await fetch(Z);try{let rt=await Q.text();tt(rt)}catch{tt(null)}});m$e.set(Z,st)}let G=await m$e.get(Z);return m$e.delete(Z),K[Y]=G,o$a(G)}return o$a(D.core[q.name]||"")}},f$i.default=d$o.fontAwesomeNext;var m$d=Object.defineProperty,l$k=Object.getOwnPropertyDescriptor,s$7=(q,O,B,D)=>{for(var U=D>1?void 0:D?l$k(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$d(O,B,U),U};const c$l="sonic-icon";let Icon=class extends s$9{constructor(){super(...arguments),this.iconText="",this._name="",this._prefix="",this._library=""}async updateIcon(){!this.name||(this.iconText=await f$i.default.get({name:this.name,prefix:this.prefix,library:this.library}),this.requestUpdate())}get name(){return this._name}set name(q){this._name=q,this.updateIcon()}get prefix(){return this._prefix}set prefix(q){this._prefix=q,this.updateIcon()}get library(){return this._library}set library(q){this._library=q,this.updateIcon()}render(){return this.name?(this.style.removeProperty("display"),this.iconText):(this.style.display="none",w$1)}};Icon.styles=r$o`:host { line-height: 0; width: fit-content; height: fit-content; vertical-align: -0.125em; } svg { height: var(--sc-icon-size, 1em); width: var(--sc-icon-size, 1em); } svg:not([fill="none"]){ fill: currentColor; } svg[fill="none"]{ stroke-width: 2; } :host([size="2xs"]) svg { --sc-icon-size: 0.625em; } :host([size="xs"]) svg { --sc-icon-size: 0.75em; } :host([size="sm"]) svg { --sc-icon-size: 0.875em; } :host([size="lg"]) svg { --sc-icon-size: 1.25em; } :host([size="xl"]) svg { --sc-icon-size: 1.5em; } :host([size="2xl"]) svg { --sc-icon-size: 2em; }`,s$7([e$b({type:String})],Icon.prototype,"name",1),s$7([e$b({type:String})],Icon.prototype,"prefix",1),s$7([e$b({type:String})],Icon.prototype,"library",1),Icon=s$7([n$j(c$l)],Icon);try{customElements.define(c$l,Icon)}catch{}/**
98
+ `};var y$5={core};const m$e=new Map,l$m={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"}};let b$4=!1;function v$6(){var q,O;b$4||(b$4=!0,l$m.custom={},l$m.custom.url=(q=document.querySelector("[customIconLibraryPath]"))==null?void 0:q.getAttribute("customIconLibraryPath"),l$m.custom.defaultPrefix=(O=document.querySelector("[customIconDefaultPrefix]"))==null?void 0:O.getAttribute("customIconDefaultPrefix"))}const d$p=class{static registerIcons(q){const O=y$5;for(let B in q){const D=q[B],U=O[B]||{};for(let W in D)U[W]=D[W];O[B]=U}}};let f$e=d$p;f$e.fontAwesomeNext={get:async q=>{let O=q.library,B=q.name||"";const D=y$5;if(O=="custom"&&v$6(),O&&l$m[O]){let U=l$m[O],W=q.prefix||U.defaultPrefix,K=D[O]||{},Y=W+"-"+B;if(K[Y])return o$a(K[Y]);let Z=U.url.replace("$prefix",W).replace("$name",B);if(K[Y])return o$a(K[Y]);if(!m$e.has(Z)){let st=new Promise(async tt=>{let Q=await fetch(Z);try{let rt=await Q.text();tt(rt)}catch{tt(null)}});m$e.set(Z,st)}let G=await m$e.get(Z);return m$e.delete(Z),K[Y]=G,o$a(G)}return o$a(D.core[q.name]||"")}},f$e.default=d$p.fontAwesomeNext;var m$d=Object.defineProperty,l$l=Object.getOwnPropertyDescriptor,s$8=(q,O,B,D)=>{for(var U=D>1?void 0:D?l$l(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$d(O,B,U),U};const c$j="sonic-icon";let Icon=class extends s$a{constructor(){super(...arguments),this.iconText="",this._name="",this._prefix="",this._library=""}async updateIcon(){!this.name||(this.iconText=await f$e.default.get({name:this.name,prefix:this.prefix,library:this.library}),this.requestUpdate())}get name(){return this._name}set name(q){this._name=q,this.updateIcon()}get prefix(){return this._prefix}set prefix(q){this._prefix=q,this.updateIcon()}get library(){return this._library}set library(q){this._library=q,this.updateIcon()}render(){return this.name?(this.style.removeProperty("display"),this.iconText):(this.style.display="none",w$1)}};Icon.styles=r$k`:host { line-height: 0; width: fit-content; height: fit-content; vertical-align: -0.125em; } svg { height: var(--sc-icon-size, 1em); width: var(--sc-icon-size, 1em); } svg:not([fill="none"]){ fill: currentColor; } svg[fill="none"]{ stroke-width: 2; } :host([size="2xs"]) svg { --sc-icon-size: 0.625em; } :host([size="xs"]) svg { --sc-icon-size: 0.75em; } :host([size="sm"]) svg { --sc-icon-size: 0.875em; } :host([size="lg"]) svg { --sc-icon-size: 1.25em; } :host([size="xl"]) svg { --sc-icon-size: 1.5em; } :host([size="2xl"]) svg { --sc-icon-size: 2em; }`,s$8([e$b({type:String})],Icon.prototype,"name",1),s$8([e$b({type:String})],Icon.prototype,"prefix",1),s$8([e$b({type:String})],Icon.prototype,"library",1),Icon=s$8([n$j(c$j)],Icon);try{customElements.define(c$j,Icon)}catch{}/**
99
99
  * @license
100
100
  * Copyright 2018 Google LLC
101
101
  * SPDX-License-Identifier: BSD-3-Clause
102
- */const i$l=e$9(class extends i$o{constructor(q){var O;if(super(q),q.type!==t$8.ATTRIBUTE||q.name!=="style"||((O=q.strings)===null||O===void 0?void 0:O.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(q){return Object.keys(q).reduce((O,B)=>{const D=q[B];return D==null?O:O+`${B=B.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${D};`},"")}update(q,[O]){const{style:B}=q.element;if(this.ct===void 0){this.ct=new Set;for(const D in O)this.ct.add(D);return this.render(O)}this.ct.forEach(D=>{O[D]==null&&(this.ct.delete(D),D.includes("-")?B.removeProperty(D):B[D]="")});for(const D in O){const U=O[D];U!=null&&(this.ct.add(D),D.includes("-")?B.setProperty(D,U):B[D]=U)}return b$5}});var d$n=Object.defineProperty,u$6=Object.getOwnPropertyDescriptor,t$7=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$6(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$n(O,B,U),U};const f$h={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},x$1="sonic-toast-item";let SonicToastItem=class extends s$9{constructor(){super(...arguments),this.title="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.maxHeight="10rem",this.visible=!0}render(){return this.visible?$$2`<div class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"><button aria-label="Close" class="sonic-toast-close" @click="${()=>this.hide()}"><sonic-icon name="cancel" size="lg"></sonic-icon></button><div class="sonic-toast-content custom-scroll" style="max-height:${this.maxHeight}">${this.status&&$$2`<sonic-icon name="${f$h[this.status]}" class="sonic-toast-icon" size="2xl"></sonic-icon>`}<div class="sonic-toast-text">${this.title?$$2`<div class="sonic-toast-title">${this.title}</div>`:""} ${this.text?o$a(this.text):""}<slot></slot></div>${this.preserve?"":this.autoHide()}</div></div>`:w$1}hide(){this.closest("sonic-toast")||(this.visible=!1),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout(()=>{this.hide()},4200)}};SonicToastItem.styles=[r$o`* { box-sizing: border-box; } :host { display: block; pointer-events: auto; position: relative; --sc-toast-status-color: transparent; --sc-toast-color: var(--sc-base-content); --sc-toast-bg: var(--sc-base); --sc-toast-rounded: var(--sc-rounded-md); --sc-toast-shadow: var(--sc-shadow-lg); } .fixed-area { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 999; display: flex; flex-direction: column-reverse; } .sonic-toast { position: relative; pointer-events: auto; overflow:hidden; line-height: 1.25; color: var(--sc-toast-color); box-shadow: var(--sc-toast-shadow); border-radius: var(--sc-toast-rounded); background: var(--sc-toast-bg); } .sonic-toast-content { padding: 1em 2rem 1em 1em; display: flex; gap: 0.5rem; overflow: auto; position:relative; } .sonic-toast-text { align-self: center; margin-top: auto; margin-bottom: auto; max-width:70ch; } ::slotted(a), .sonic-toast-text a { color: inherit; text-decoration: underline; text-underline-offset: 0.15rem; } /*BUTTON CLOSE*/ .sonic-toast-close { all: unset; position: absolute; z-index:4; pointer-events: initial; right: 0.5em; top: 0.5em; width: 1.5rem; height: 1.5rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; text-align: center; opacity: 0.5; background: rgba(0, 0, 0, 0); } .sonic-toast-close:focus, .sonic-toast-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.075); } .sonic-toast-close svg { width: 1rem; height: 1rem; object-fit: contain; object-position: center center; } /*Title*/ .sonic-toast-title { font-weight: bold; font-size: 1.15rem; margin: 0.15em 0 0.25em; } /*STATUS*/ .success { --sc-toast-status-color: var(--sc-success); --sc-toast-title-color: var(--sc-toast-status-color); } .error { --sc-toast-status-color: var(--sc-danger); --sc-toast-title-color: var(--sc-toast-status-color); } .warning { --sc-toast-status-color: var(--sc-warning); --sc-toast-title-color: var(--sc-toast-status-color); } .info { --sc-toast-status-color: var(--sc-info); --sc-toast-title-color: var(--sc-toast-status-color); } .success, .error, .info, .warning { border-top: 3px solid var(--sc-toast-status-color, currentColor); } .sonic-toast:before { content: ""; display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; opacity: 0.05; pointer-events: none; transition: 0.2s; border-radius: var(--sc-toast-rounded); background-color: var(--sc-toast-status-color); } .sonic-toast:hover:before { opacity: 0.025; } .info .sonic-toast-icon, .error .sonic-toast-icon, .success .sonic-toast-icon, .warning .sonic-toast-icon { color: var(--sc-toast-status-color, currentColor); } .sonic-toast-icon { position:sticky; top:0; } .ghost { opacity: 0.85; pointer-events: none; } /*TODO :: mutualiser le scroll */ .custom-scroll::-webkit-scrollbar { width: 0.8rem; border: solid 3px transparent; border-radius: var(--sc-rounded); background:transparent; } .custom-scroll::-webkit-scrollbar-thumb { box-shadow: inset 0 0 2rem 2rem var(--sc-base-500); border-radius: var(--sc-rounded); border: solid 3px transparent; }`],t$7([e$b({type:String})],SonicToastItem.prototype,"title",2),t$7([e$b({type:String})],SonicToastItem.prototype,"text",2),t$7([e$b({type:String})],SonicToastItem.prototype,"status",2),t$7([e$b({type:Boolean})],SonicToastItem.prototype,"ghost",2),t$7([e$b({type:Boolean})],SonicToastItem.prototype,"preserve",2),t$7([e$b({type:String})],SonicToastItem.prototype,"maxHeight",2),t$7([t$a()],SonicToastItem.prototype,"visible",2),SonicToastItem=t$7([n$j(x$1)],SonicToastItem);var d$m=Object.defineProperty,u$5=Object.getOwnPropertyDescriptor,l$j=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$5(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$m(O,B,U),U};const T$1="sonic-toast";let SonicToast$1=class extends s$9{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const q=window.parent!=window;let O={pointerEvents:"none",gap:"1rem",display:"flex",margin:"1rem"};return q||(O=mt(ut({},O),{margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"999",maxWidth:"64ch",flexDirection:"column-reverse"})),this.toasts?$$2`<div aria-live="polite" style="${i$l(O)}">${c$m(this.toasts,B=>B.id,B=>$$2`<sonic-toast-item maxHeight="${q?"none":"10rem"}" status="${B.status}" ?ghost="${B.ghost}" ?preserve="${B.preserve}" id="${B.id}" @hide="${()=>this.removeItem(B)}" ${$$1({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}>${B.text?o$a(B.text):""}</sonic-toast-item>`)}</div>`:w$1}static removeAll(){let q=document.querySelector("sonic-toast");!q||(q.toasts=q.toasts.filter(O=>O.ghost))}static add(q){if(!document.querySelector("sonic-toast")){let W=document.createElement("sonic-toast");(document.querySelector("sonic-theme")||document.body).prepend(W)}let O=document.querySelector("sonic-toast");const B=new Date().valueOf(),D=new RegExp("</a>|</button>").test(q.text),U={id:B,text:q.text,title:q.title,status:q.status,preserve:D?!0:q.preserve,ghost:q.ghost};if(O.toasts.length>0){let W=ut({},U),K=ut({},O.toasts[O.toasts.length-1]);if(W.id=K.id=0,!U.preserve&&a$o.shallowEqual(W,K))return null}return O.toasts=[...O.toasts,U],U}removeItem(q){this.toasts=this.toasts.filter(O=>O!=q)}};if(l$j([e$b({type:Array})],SonicToast$1.prototype,"toasts",2),SonicToast$1=l$j([n$j(T$1)],SonicToast$1),typeof window<"u"){let q=window;q.SonicToast=SonicToast$1}const i$k=class{static listen(){if(!i$k.listening)return;let q=document.location.href.replace(document.location.origin,"");i$k.prevURL&&i$k.prevURL!=q&&(i$k.prevURL=q,i$k.listeners.forEach(O=>{O.location=q})),window.requestAnimationFrame(i$k.listen)}static offChange(q){let O=i$k.listeners.indexOf(q);O!=-1&&(i$k.listeners.splice(O,1),i$k.listeners.length==0&&(i$k.listening=!1))}static onChange(q){i$k.listening||(i$k.listening=!0,i$k.listen()),i$k.listeners.push(q)}static changeFromComponent(q){if(q.goBack!==null){const K=document.location.origin;let Y=q.goBack||K;if((document.referrer.indexOf("http")!=0||new URL(document.referrer).origin!=K)&&Y!=document.location.href){let Z=history.state||{};Z.concorde=Z.concorde||{},Z.concorde.hasDoneHistoryBack=!0,history.pushState(Z,document.title),history.back(),document.location.replace(Y)}else history.back();return}let O=q.getAttribute("to");if(O||(O=q.href),!O)return;if(O.indexOf("#")==0){document.location.hash=O.substring(1);return}let B=new URL(O,document.location.href),D=B.pathname.split("/"),U=[],W="";for(let K of D)K!=W&&U.push(K),W=K;O="/"+U.join("/")+B.search+(B.hash?+B.hash:""),q.hasAttribute("pushState")?history.pushState(null,"",O):q.hasAttribute("replaceState")?history.replaceState(null,"",O):document.location.href=O}static updateComponentActiveState(q){if(q.autoActive!="disabled"&&q.href&&q.href.indexOf("http")!=0){let O=new URL(q.href,document.location.href),B=new URL(q.location,document.location.origin),D=!1;q.autoActive=="strict"?D=O.pathname==B.pathname&&O.hash==B.hash&&O.search==B.search:D=B.href.indexOf(O.href)==0,D?q.setAttribute("active","true"):q.removeAttribute("active")}}};let a$j=i$k;a$j.listeners=[],a$j.listening=!1,a$j.prevURL=document.location.href.replace(document.location.origin,"");var v$5=Object.defineProperty,F=Object.getOwnPropertyDescriptor,n$d=(q,O,B,D)=>{for(var U=D>1?void 0:D?F(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&v$5(O,B,U),U};const b$2=new Map,V=q=>{class O extends q{constructor(...D){super(),this.error=null,this.autofocus=null,this.disabled=null,this.required=null,this.onValueAssign=null,this.onFormValueAssign=null,this.onFormDataInValidate=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=U=>{this.setValueFromPublisher(U)},this.onFormValueAssign=U=>{this.setFormValueFromPublisher(U)},this.onFormDataInValidate=()=>{!this.getFormPublisher().isFormValid.get()||this.validateFormElement()}}get name(){return this._name}set name(D){this._name=D}validateFormElement(){}updateDataValue(){if(this._name){let D=this.getFormPublisher();D&&(D[this._name]=this.getValueForFormPublisher(),this.setFormValueFromPublisher(D[this.name].get()))}}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?PublisherManager$1.get(this.formDataProvider):this.publisher}getValueForFormPublisher(){return this.value}setValueFromPublisher(D){this.value=D}setFormValueFromPublisher(D){this.value=D}get value(){return this._value}set value(D){a$o.isObject(D)&&D.hasOwnProperty("__value")&&D.value==null||D!=null&&this._value!=D&&(this._value=D,this.updateDataValue(),this.requestUpdate())}initPublisher(){this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);let D=this.getFormPublisher();this._name&&D&&D[this._name].offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.updateDataValue(),this.publisher&&this._name&&this.publisher[this._name].onAssign(this.onValueAssign),D=this.getFormPublisher(),this._name&&D&&(D[this._name].onAssign(this.onFormValueAssign),D.onInvalidate(this.onFormDataInValidate))}handleChange(D){this.value=D.target.value;const U=new Event("change");this.dispatchEvent(U)}addKeyboardNavigation(){let D=this.getAncestorAttributeValue("data-keyboard-nav");if(!D)return;let U=D.split(" "),W=U[0];if(!W)return;for(let Y of U){b$2.has(Y)||b$2.set(Y,[]);let Z=b$2.get(Y);Z.indexOf(this)==-1&&Z.push(this)}let K=b$2.get(W);this.addEventListener("keydown",Y=>{if(!["ArrowDown","ArrowUp"].includes(Y.key))return;let Z="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",G=K.filter(Q=>{let rt=Q.shadowRoot.querySelector(Z);if(!rt)return!1;let ot=window.getComputedStyle(rt);return ot.display!=="none"&&ot.display!==""&&ot.pointerEvents!="none"&&ot.visibility!=="hidden"&&rt.getBoundingClientRect().width>0}),st=null;if(Y.key=="ArrowDown"){let Q=G.indexOf(this);Q==G.length-1?st=G[0]:st=G[Q+1]}else if(Y.key=="ArrowUp"){let Q=G.indexOf(this);Q==0?st=G[G.length-1]:st=G[Q-1]}let tt=st.shadowRoot.querySelector(Z);tt&&(tt.focus(),Y.preventDefault())})}connectedCallback(){super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);let D=this.getFormPublisher();this._name&&D&&(D[this._name].offAssign(this.onFormValueAssign),D.offInvalidate(this.onFormDataInValidate))}}return n$d([e$b({type:Boolean})],O.prototype,"error",2),n$d([e$b({type:Boolean})],O.prototype,"autofocus",2),n$d([e$b({type:Boolean})],O.prototype,"disabled",2),n$d([e$b({type:Boolean})],O.prototype,"required",2),n$d([e$b()],O.prototype,"name",1),n$d([e$b()],O.prototype,"value",1),O};var a$i=Object.defineProperty,c$k=Object.getOwnPropertyDescriptor,s$6=(q,O,B,D)=>{for(var U=D>1?void 0:D?c$k(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&a$i(O,B,U),U};const d$l=q=>{class O extends q{constructor(){super(...arguments),this._value="",this._name="",this.unique=null,this.radio=null,this._checked=null}get value(){return this._value}set value(D){this.hasAttribute("value")&&(D=this.getAttribute("value")),this._value!=D&&(this._value=D,this.updateDataValue(),this.requestUpdate())}get name(){return this._name}set name(D){this.hasAttribute("name")&&(D=this.getAttribute("name")),this._name=D}get checked(){return this._checked}set checked(D){this.setCheckedValue(D)}validateFormElement(){var W;const D=(W=this.shadowRoot)==null?void 0:W.querySelector("input");if(!D||D.checkValidity())return;let U=this.getFormPublisher()[this.name].get();(this.unique||this.radio)&&U!==null&&U.toString().length>0||(this.getFormPublisher().isFormValid=!1,D.reportValidity())}setCheckedValue(D){this._checked!=D&&(this._checked=D,this.updateDataValue(),this.requestUpdate(),this.publisher&&!this.radio&&!this.unique&&(this.publisher.checked=this._checked))}handleChange(){this.checked=this.checked?this.radio?!0:null:!0;const D=new Event("change");this.dispatchEvent(D)}getValueForFormPublisher(){let D=this.getFormPublisher()[this.name].get();if(this.unique||this.radio)return this.checked&&this.value!=null?this.value:D;Array.isArray(D)||(D=[]),D=D.slice(0);let U=D.indexOf(this.value);return this.checked===!0&&U===-1&&D.push(this.value),this.checked===null&&U!==-1&&D.splice(U,1),D}setFormValueFromPublisher(D){if(this.unique||this.radio){this.checked=this.value==D?!0:null;return}Array.isArray(D)||(D=[]),this.checked=D.indexOf(this.value)!==-1?!0:null}initPublisher(){super.initPublisher(),!!this.hasAttribute("checked")&&(!this.publisher||this.publisher.get().checked!==!1)&&(this.checked=!0)}}return s$6([e$b()],O.prototype,"value",1),s$6([e$b()],O.prototype,"name",1),s$6([e$b({type:Boolean})],O.prototype,"unique",2),s$6([e$b({type:Boolean})],O.prototype,"radio",2),s$6([e$b()],O.prototype,"checked",1),O};/**
102
+ */const i$k=e$9(class extends i$n{constructor(q){var O;if(super(q),q.type!==t$8.ATTRIBUTE||q.name!=="style"||((O=q.strings)===null||O===void 0?void 0:O.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(q){return Object.keys(q).reduce((O,B)=>{const D=q[B];return D==null?O:O+`${B=B.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${D};`},"")}update(q,[O]){const{style:B}=q.element;if(this.ct===void 0){this.ct=new Set;for(const D in O)this.ct.add(D);return this.render(O)}this.ct.forEach(D=>{O[D]==null&&(this.ct.delete(D),D.includes("-")?B.removeProperty(D):B[D]="")});for(const D in O){const U=O[D];U!=null&&(this.ct.add(D),D.includes("-")?B.setProperty(D,U):B[D]=U)}return b$6}}),customScroll=r$k`.custom-scroll { overflow:auto !important; } .custom-scroll::-webkit-scrollbar { width: 0.5rem; height: 0.5rem; border: solid .15rem transparent; border-radius: var(--sc-rounded); background:transparent; } .custom-scroll::-webkit-scrollbar-thumb { box-shadow: inset 0 0 2rem 2rem var(--sc-scrollbar-bg); border-radius: var(--sc-rounded); border: solid .15rem transparent; }`;var d$o=Object.defineProperty,u$8=Object.getOwnPropertyDescriptor,t$7=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$8(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$o(O,B,U),U};const x$1={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},y$4="sonic-toast-item";let SonicToastItem=class extends s$a{constructor(){super(...arguments),this.title="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.maxHeight="10rem",this.visible=!0}render(){return this.visible?$$2`<div class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"><button aria-label="Close" class="sonic-toast-close" @click="${()=>this.hide()}"><sonic-icon name="cancel" size="lg"></sonic-icon></button><div class="sonic-toast-content custom-scroll" style="max-height:${this.maxHeight}">${this.status&&$$2`<sonic-icon name="${x$1[this.status]}" class="sonic-toast-icon" size="2xl"></sonic-icon>`}<div class="sonic-toast-text">${this.title?$$2`<div class="sonic-toast-title">${this.title}</div>`:""} ${this.text?o$a(this.text):""}<slot></slot></div>${this.preserve?"":this.autoHide()}</div></div>`:w$1}hide(){this.closest("sonic-toast")||(this.visible=!1),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout(()=>{this.hide()},4200)}};SonicToastItem.styles=[customScroll,r$k`* { box-sizing: border-box; } :host { display: block; pointer-events: auto; position: relative; --sc-toast-status-color: transparent; --sc-toast-color: var(--sc-base-content); --sc-toast-bg: var(--sc-base); --sc-toast-rounded: var(--sc-rounded-md); --sc-toast-shadow: var(--sc-shadow-lg); } .fixed-area { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 999; display: flex; flex-direction: column-reverse; } .sonic-toast { position: relative; pointer-events: auto; overflow:hidden; line-height: 1.25; color: var(--sc-toast-color); box-shadow: var(--sc-toast-shadow); border-radius: var(--sc-toast-rounded); background: var(--sc-toast-bg); } .sonic-toast-content { padding: 1em 2rem 1em 1em; display: flex; gap: 0.5rem; overflow: auto; position:relative; } .sonic-toast-text { align-self: center; margin-top: auto; margin-bottom: auto; max-width:70ch; } ::slotted(a), .sonic-toast-text a { color: inherit; text-decoration: underline; text-underline-offset: 0.15rem; } /*BUTTON CLOSE*/ .sonic-toast-close { all: unset; position: absolute; z-index:4; pointer-events: initial; right: 0.5em; top: 0.5em; width: 1.5rem; height: 1.5rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; text-align: center; opacity: 0.5; background: rgba(0, 0, 0, 0); } .sonic-toast-close:focus, .sonic-toast-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.075); } .sonic-toast-close svg { width: 1rem; height: 1rem; object-fit: contain; object-position: center center; } /*Title*/ .sonic-toast-title { font-weight: bold; font-size: 1.15rem; margin: 0.15em 0 0.25em; } /*STATUS*/ .success { --sc-toast-status-color: var(--sc-success); --sc-toast-title-color: var(--sc-toast-status-color); } .error { --sc-toast-status-color: var(--sc-danger); --sc-toast-title-color: var(--sc-toast-status-color); } .warning { --sc-toast-status-color: var(--sc-warning); --sc-toast-title-color: var(--sc-toast-status-color); } .info { --sc-toast-status-color: var(--sc-info); --sc-toast-title-color: var(--sc-toast-status-color); } .success, .error, .info, .warning { border-top: 3px solid var(--sc-toast-status-color, currentColor); } .sonic-toast:before { content: ""; display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; opacity: 0.05; pointer-events: none; transition: 0.2s; border-radius: var(--sc-toast-rounded); background-color: var(--sc-toast-status-color); } .sonic-toast:hover:before { opacity: 0.025; } .info .sonic-toast-icon, .error .sonic-toast-icon, .success .sonic-toast-icon, .warning .sonic-toast-icon { color: var(--sc-toast-status-color, currentColor); } .sonic-toast-icon { position:sticky; top:0; } .ghost { opacity: 0.85; pointer-events: none; }`],t$7([e$b({type:String})],SonicToastItem.prototype,"title",2),t$7([e$b({type:String})],SonicToastItem.prototype,"text",2),t$7([e$b({type:String})],SonicToastItem.prototype,"status",2),t$7([e$b({type:Boolean})],SonicToastItem.prototype,"ghost",2),t$7([e$b({type:Boolean})],SonicToastItem.prototype,"preserve",2),t$7([e$b({type:String})],SonicToastItem.prototype,"maxHeight",2),t$7([t$a()],SonicToastItem.prototype,"visible",2),SonicToastItem=t$7([n$j(y$4)],SonicToastItem);var d$n=Object.defineProperty,u$7=Object.getOwnPropertyDescriptor,l$k=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$7(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$n(O,B,U),U};const T$1="sonic-toast";let SonicToast$1=class extends s$a{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const q=window.parent!=window;let O={pointerEvents:"none",gap:"1rem",display:"flex",margin:"1rem"};return q||(O=mt(ut({},O),{margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"999",maxWidth:"64ch",flexDirection:"column-reverse"})),this.toasts?$$2`<div aria-live="polite" style="${i$k(O)}">${c$k(this.toasts,B=>B.id,B=>$$2`<sonic-toast-item maxHeight="${q?"none":"10rem"}" status="${B.status}" ?ghost="${B.ghost}" ?preserve="${B.preserve}" id="${B.id}" @hide="${()=>this.removeItem(B)}" ${$$1({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}>${B.text?o$a(B.text):""}</sonic-toast-item>`)}</div>`:w$1}static removeAll(){let q=document.querySelector("sonic-toast");!q||(q.toasts=q.toasts.filter(O=>O.ghost))}static add(q){if(!document.querySelector("sonic-toast")){let W=document.createElement("sonic-toast");(document.querySelector("sonic-theme")||document.body).prepend(W)}let O=document.querySelector("sonic-toast");const B=new Date().valueOf(),D=new RegExp("</a>|</button>").test(q.text),U={id:B,text:q.text,title:q.title,status:q.status,preserve:D?!0:q.preserve,ghost:q.ghost};if(O.toasts.length>0){let W=ut({},U),K=ut({},O.toasts[O.toasts.length-1]);if(W.id=K.id=0,!U.preserve&&a$p.shallowEqual(W,K))return null}return O.toasts=[...O.toasts,U],U}removeItem(q){this.toasts=this.toasts.filter(O=>O!=q)}};if(l$k([e$b({type:Array})],SonicToast$1.prototype,"toasts",2),SonicToast$1=l$k([n$j(T$1)],SonicToast$1),typeof window<"u"){let q=window;q.SonicToast=SonicToast$1}const i$j=class{static listen(){if(!i$j.listening)return;let q=document.location.href.replace(document.location.origin,"");i$j.prevURL&&i$j.prevURL!=q&&(i$j.prevURL=q,i$j.listeners.forEach(O=>{O.location=q})),window.requestAnimationFrame(i$j.listen)}static offChange(q){let O=i$j.listeners.indexOf(q);O!=-1&&(i$j.listeners.splice(O,1),i$j.listeners.length==0&&(i$j.listening=!1))}static onChange(q){i$j.listening||(i$j.listening=!0,i$j.listen()),i$j.listeners.push(q)}static changeFromComponent(q){if(q.goBack!==null){const K=document.location.origin;let Y=q.goBack||K;if((document.referrer.indexOf("http")!=0||new URL(document.referrer).origin!=K)&&Y!=document.location.href){let Z=history.state||{};Z.concorde=Z.concorde||{},Z.concorde.hasDoneHistoryBack=!0,history.pushState(Z,document.title),history.back(),document.location.replace(Y)}else history.back();return}let O=q.getAttribute("to");if(O||(O=q.href),!O)return;if(O.indexOf("#")==0){document.location.hash=O.substring(1);return}let B=new URL(O,document.location.href),D=B.pathname.split("/"),U=[],W="";for(let K of D)K!=W&&U.push(K),W=K;O="/"+U.join("/")+B.search+(B.hash?+B.hash:""),q.hasAttribute("pushState")?history.pushState(null,"",O):q.hasAttribute("replaceState")?history.replaceState(null,"",O):document.location.href=O}static updateComponentActiveState(q){if(q.autoActive!="disabled"&&q.href&&q.href.indexOf("http")!=0){let O=new URL(q.href,document.location.href),B=new URL(q.location,document.location.origin),D=!1;q.autoActive=="strict"?D=O.pathname==B.pathname&&O.hash==B.hash&&O.search==B.search:D=B.href.indexOf(O.href)==0,D?q.setAttribute("active","true"):q.removeAttribute("active")}}};let a$k=i$j;a$k.listeners=[],a$k.listening=!1,a$k.prevURL=document.location.href.replace(document.location.origin,"");var v$5=Object.defineProperty,F=Object.getOwnPropertyDescriptor,a$j=(q,O,B,D)=>{for(var U=D>1?void 0:D?F(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&v$5(O,B,U),U};const b$3=new Map,V=q=>{class O extends q{constructor(...D){super(),this.touched=!1,this.error=null,this.autofocus=null,this.disabled=null,this.required=null,this.onValueAssign=null,this.onFormValueAssign=null,this.onFormDataInValidate=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=U=>{this.setValueFromPublisher(U)},this.onFormValueAssign=U=>{this.setFormValueFromPublisher(U)},this.onFormDataInValidate=()=>{!this.getFormPublisher().isFormValid.get()||this.validateFormElement()}}get name(){return this._name}set name(D){this._name=D}validateFormElement(){}updateDataValue(){if(this._name){let D=this.getFormPublisher();D&&(D[this._name]=this.getValueForFormPublisher(),this.setFormValueFromPublisher(D[this.name].get()))}}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?PublisherManager$1.get(this.formDataProvider):this.publisher}getValueForFormPublisher(){return this.value}setValueFromPublisher(D){this.value=D}setFormValueFromPublisher(D){this.value=D}get value(){return this._value}set value(D){a$p.isObject(D)&&D.hasOwnProperty("__value")&&D.value==null||D!=null&&this._value!=D&&(this._value=D,this.updateDataValue(),this.requestUpdate())}initPublisher(){this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);let D=this.getFormPublisher();this._name&&D&&D[this._name].offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.updateDataValue(),this.publisher&&this._name&&this.publisher[this._name].onAssign(this.onValueAssign),D=this.getFormPublisher(),this._name&&D&&(D[this._name].onAssign(this.onFormValueAssign),D.onInvalidate(this.onFormDataInValidate))}handleChange(D){this.value=D.target.value;const U=new Event("change");this.dispatchEvent(U)}addKeyboardNavigation(){let D=this.getAncestorAttributeValue("data-keyboard-nav");if(!D)return;let U=D.split(" "),W=U[0];if(!W)return;for(let Y of U){b$3.has(Y)||b$3.set(Y,[]);let Z=b$3.get(Y);Z.indexOf(this)==-1&&Z.push(this)}let K=b$3.get(W);this.addEventListener("keydown",Y=>{if(!["ArrowDown","ArrowUp"].includes(Y.key))return;let Z="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",G=K.filter(Q=>{let rt=Q.shadowRoot.querySelector(Z);if(!rt)return!1;let ot=window.getComputedStyle(rt);return ot.display!=="none"&&ot.display!==""&&ot.pointerEvents!="none"&&ot.visibility!=="hidden"&&rt.getBoundingClientRect().width>0}),st=null;if(Y.key=="ArrowDown"){let Q=G.indexOf(this);Q==G.length-1?st=G[0]:st=G[Q+1]}else if(Y.key=="ArrowUp"){let Q=G.indexOf(this);Q==0?st=G[G.length-1]:st=G[Q-1]}let tt=st.shadowRoot.querySelector(Z);tt&&(tt.focus(),Y.preventDefault())})}connectedCallback(){super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);let D=this.getFormPublisher();this._name&&D&&(D[this._name].offAssign(this.onFormValueAssign),D.offInvalidate(this.onFormDataInValidate))}}return a$j([e$b({type:Boolean,reflect:!0})],O.prototype,"touched",2),a$j([e$b({type:Boolean})],O.prototype,"error",2),a$j([e$b({type:Boolean})],O.prototype,"autofocus",2),a$j([e$b({type:Boolean})],O.prototype,"disabled",2),a$j([e$b({type:Boolean})],O.prototype,"required",2),a$j([e$b()],O.prototype,"name",1),a$j([e$b()],O.prototype,"value",1),O};var a$i=Object.defineProperty,c$i=Object.getOwnPropertyDescriptor,s$7=(q,O,B,D)=>{for(var U=D>1?void 0:D?c$i(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&a$i(O,B,U),U};const d$m=q=>{class O extends q{constructor(){super(...arguments),this._value="",this._name="",this.unique=null,this.radio=null,this._checked=null}get value(){return this._value}set value(D){this.hasAttribute("value")&&(D=this.getAttribute("value")),this._value!=D&&(this._value=D,this.updateDataValue(),this.requestUpdate())}get name(){return this._name}set name(D){this.hasAttribute("name")&&(D=this.getAttribute("name")),this._name=D}get checked(){return this._checked}set checked(D){this.setCheckedValue(D)}validateFormElement(){var W;const D=(W=this.shadowRoot)==null?void 0:W.querySelector("input");if(!D||D.checkValidity())return;let U=this.getFormPublisher()[this.name].get();(this.unique||this.radio)&&U!==null&&U.toString().length>0||(this.getFormPublisher().isFormValid=!1,D.reportValidity())}setCheckedValue(D){this._checked!=D&&(this._checked=D,this.updateDataValue(),this.requestUpdate(),this.publisher&&!this.radio&&!this.unique&&(this.publisher.checked=this._checked))}handleChange(){this.checked=this.checked?this.radio?!0:null:!0;const D=new Event("change");this.dispatchEvent(D)}getValueForFormPublisher(){let D=this.getFormPublisher()[this.name].get();if(this.unique||this.radio)return this.checked&&this.value!=null?this.value:D;Array.isArray(D)||(D=[]),D=D.slice(0);let U=D.indexOf(this.value);return this.checked===!0&&U===-1&&D.push(this.value),this.checked===null&&U!==-1&&D.splice(U,1),D}setFormValueFromPublisher(D){if(this.unique||this.radio){this.checked=this.value==D?!0:null;return}Array.isArray(D)||(D=[]),this.checked=D.indexOf(this.value)!==-1?!0:null}initPublisher(){super.initPublisher(),!!this.hasAttribute("checked")&&(!this.publisher||this.publisher.get().checked!==!1)&&(this.checked=!0)}}return s$7([e$b()],O.prototype,"value",1),s$7([e$b()],O.prototype,"name",1),s$7([e$b({type:Boolean})],O.prototype,"unique",2),s$7([e$b({type:Boolean})],O.prototype,"radio",2),s$7([e$b()],O.prototype,"checked",1),O};/**
103
103
  * @license
104
104
  * Copyright 2018 Google LLC
105
105
  * SPDX-License-Identifier: BSD-3-Clause
106
- */const l$i=q=>q!=null?q:w$1;var d$k=Object.defineProperty,u$4=Object.getOwnPropertyDescriptor,t$6=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$4(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$k(O,B,U),U};const f$g="sonic-button";let Button=class extends d$l(V(L$1(s$9))){constructor(){super(...arguments),this.type="default",this.variant="default",this.size="md",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.align="center",this.minWidth="0",this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this.target=null,this._href="",this.goBack=null,this.pushState=null,this.active=!1,this._location=""}set href(q){this._href=q,this.href&&this.href.indexOf("http")!=0?(a$j.onChange(this),this.location=document.location.href.replace(document.location.origin,"")):a$j.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(q){q.preventDefault(),a$j.changeFromComponent(this)}handleChange(q){super.handleChange(q),(this.pushState||this.goBack!==null)&&(q.preventDefault(),q.stopPropagation(),a$j.changeFromComponent(this))}connectedCallback(){super.connectedCallback()}setCheckedValue(q){if(this.name){if(q==this._checked)return;super.setCheckedValue(q),this._checked?this.setAttribute("active","true"):this.removeAttribute("active")}}disconnectedCallback(){a$j.offChange(this),super.disconnectedCallback()}get location(){return this._location}set location(q){this._location=q,a$j.updateComponentActiveState(this)}render(){const q={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,textAlign:this.align,minWidth:this.minWidth},O=$$2`<button part="button" class="${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}" style="${i$l(q)}" @click="${this.handleChange}"><slot @slotchange="${this.onSlotChange}" part="prefix" name="prefix"></slot><slot part="main" class="main-slot"></slot><slot @slotchange="${this.onSlotChange}" part="suffix" name="suffix"></slot>${this.loading==!0?$$2`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}</button>`;return this.href?$$2`<a href="${this.href}" target="${l$i(this.target)}" @click="${this.pushState||this.goBack!==null?this.handleNavigation:null}">${O}</a>`:$$2`${O}`}onSlotChange(){var q,O;this.hasPrefix=!!((q=this.prefixes)!=null&&q.length),this.hasSuffix=!!((O=this.suffixes)!=null&&O.length)}};Button.styles=[r$o`* { box-sizing: border-box; } :host { --sc-btn-gap: 0.35em; --sc-btn-py: 0.25em; --sc-btn-px: 1.1em; --sc-btn-fs: 1rem; --sc-btn-fw: var(--sc-btn-font-weight); --sc-btn-ff: var(--sc-btn-font-family); --sc-btn-height: var(--sc-form-height, 2.5em); --sc-btn-color: var(--sc-base-content, #1f2937); --sc-btn-bg: var(--sc-base-100, #e5e7eb); --sc-btn-border-style: solid; --sc-btn-border-with: var(--sc-form-border-width, 0.1rem); --sc-btn-border-color: transparent; --sc-btn-outline-bg-hover: var(--sc-base-100); --sc-btn-ghost-bg-hover: var(--sc-base-100); --sc-btn-active-color: var(--sc-base); --sc-btn-hover-filter: brightness(0.97); --sc-btn-active-filter: brightness(0.96); --sc-btn-active-bg: var(--sc-base-content); --sc-item-rounded-tr: var(--sc-btn-rounded); --sc-item-rounded-tl: var(--sc-btn-rounded); --sc-item-rounded-bl: var(--sc-btn-rounded); --sc-item-rounded-br: var(--sc-btn-rounded); display: inline-flex; vertical-align: middle; box-sizing: border-box; } :host a { display: contents; color:unset; } :host button { display: flex; flex: 1; box-sizing: border-box; align-items: center; justify-content: center; font-family: var(--sc-btn-ff); font-weight: var(--sc-btn-fw); font-size: var(--sc-btn-fs); cursor: pointer; text-align: center; line-height: 1.1; border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl); background: var(--sc-btn-bg); color: var(--sc-btn-color); padding-top: var(--sc-btn-py); padding-bottom: var(--sc-btn-py); padding-left: var(--sc-btn-px); padding-right: var(--sc-btn-px); border: var(--sc-btn-border-with) var(--sc-btn-border-style) var(--sc-btn-border-color); min-height: var(--sc-btn-height); } :host button.has-prefix-or-suffix { gap: var(--sc-btn-gap); } :host button:focus, :host button:hover { filter: var(--sc-btn-hover-filter); } :host button:active { filter: var(--sc-btn-active-filter); } /*TYPES*/ :host([type="default"]) button { --sc-btn-color: var(--sc-base-content); --sc-btn-bg: var(--sc-base-100); } :host([type="primary"]) button { --sc-btn-color: var(--sc-primary-content); --sc-btn-bg: var(--sc-primary); } :host([type="warning"]) button { --sc-btn-color: var(--sc-warning-content); --sc-btn-bg: var(--sc-warning); } :host([type="danger"]) button { --sc-btn-color: var(--sc-danger-content); --sc-btn-bg: var(--sc-danger); } :host([type="info"]) button { --sc-btn-color: var(--sc-info-content); --sc-btn-bg: var(--sc-info); } :host([type="success"]) button { --sc-btn-color: var(--sc-success-content); --sc-btn-bg: var(--sc-success); } :host([type="neutral"]) button { --sc-btn-color: var(--sc-base); --sc-btn-bg: var(--sc-base-600); } /*SIZE*/ :host([size="2xs"]) { --sc-btn-fs: 0.6rem; } :host([size="xs"]) { --sc-btn-fs: 0.75rem; } :host([size="sm"]) { --sc-btn-fs: 0.85rem; } :host([size="lg"]) { --sc-btn-fs: 1.2rem; } :host([size="xl"]) { --sc-btn-fs: 1.5rem; } /*UNSTYLED*/ :host([variant="unstyled"]) button { all: unset; transition: 0.1s; display: inline-flex; cursor: pointer; --sc-btn-height: auto; --sc-btn-width: auto; } /*GESTION DU FOCUS*/ :host(:not([disabled])) button:focus { box-shadow: 0 0 0 0.18rem var(--sc-base-300); border-color: var(--sc-base-300) !important; outline: none; } /*GHOST*/ :host([variant="ghost"][type]) button { color: var(--sc-btn-bg); background: transparent; } :host([variant="ghost"][type="default"]) button { color: var(--sc-btn-color); background: transparent; } /*:host([variant="ghost"]) button:focus,*/ :host([variant="ghost"]) button:hover { background: var(--sc-btn-ghost-bg-hover); filter: none; } :host([active][variant="ghost"]) button { background: var(--sc-btn-ghost-bg-hover); filter: none; } :host([active][variant="ghost"]) button:hover { filter: var(--sc-btn-hover-filter); } /*OUTLINE*/ :host([variant="outline"][type]) button { border-color: var(--sc-btn-bg); color: var(--sc-btn-bg); background: transparent; } :host([variant="outline"][type="default"]) button { border-color: var(--sc-base-400); color: var(--sc-base-500); background: transparent; } /*:host([variant="outline"]) button:focus,*/ :host([variant="outline"]) button:hover { background: var(--sc-btn-outline-bg-hover); } /*OUTLINE*/ :host([variant="link"]) { vertical-align: baseline; margin-left:.25em; margin-right:.25em; } :host([variant="link"]) button { text-decoration: underline; padding: 0; background: none; border: none; font-size: inherit; min-height: 0; color: inherit; } :host([variant="link"][type]) button { color: var(--sc-btn-bg); } :host([variant="link"][type="default"]) button { color: inherit; } :host([variant="link"]) button:focus, :host([variant="link"]) button:hover { text-decoration: none; } /*SHAPE*/ :host([shape="circle"]) button { border-radius: 50%; } :host([shape="circle"]) button, :host([shape="square"]) button { width: var(--sc-btn-height); height: var(--sc-btn-height); overflow: hidden; padding: 0; align-items: center; justify-content: 0; text-align:center !important; } :host([shape="block"]), :host([shape="block"]) button { width: 100%; } :host([disabled]) { opacity: 0.3; pointer-events: none; user-select: none; } /*ACTIVE*/ :host([active]:not([variant="ghost"])) button { background: var(--sc-btn-active-bg); color: var(--sc-btn-active-color); border-color: var(--sc-btn-active-bg); } :host([textAlign="left"]) button { text-align: left; } :host([textAlign="right"]) button { text-align: right; } .main-slot { flex-grow: 1; display: block; /*align-items: center; justify-content: center;*/ } :host([minWidth]) .main-slot { flex-grow:0; } slot[name="suffix"], slot[name="prefix"] { flex-shrink: 0; } /*ALIGNEMENT DES ICONES permet de tous les avoir alignés dans un menu */ ::slotted(sonic-icon) { min-width: 1.3em; text-align: center; } /*Tooltip ne joue pas sur le layout*/ sonic-tooltip { display: contents; } /*OUTLINE*/ :host(:not([active])) ::slotted([swap="on"]) { display: none; } :host([active]) ::slotted([swap="off"]) { display: none; } /*Loading*/ :host([loading]) { pointer-events: none; position: relative; } :host([loading]) slot { opacity: 0 !important; pointer-events: none; } /*Loading*/ :host([loading]) .loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; line-height: 0; height: var(--sc-btn-ff); width: var(--sc-btn-ff); animation: rotation 2s infinite linear; } @keyframes rotation { from { transform-origin: 50% 50%; transform: translate(-50%, -50%) rotate(0deg); } to { transform-origin: 50% 50%; transform: translate(-50%, -50%) rotate(359deg); } }`],t$6([e$b({type:String,reflect:!0})],Button.prototype,"type",2),t$6([e$b({type:String,reflect:!0})],Button.prototype,"variant",2),t$6([e$b({type:String,reflect:!0})],Button.prototype,"size",2),t$6([e$b({type:String,reflect:!0})],Button.prototype,"shape",2),t$6([e$b({type:String})],Button.prototype,"direction",2),t$6([e$b({type:String,reflect:!0})],Button.prototype,"alignItems",2),t$6([e$b({type:String})],Button.prototype,"justify",2),t$6([e$b({type:String,reflect:!0})],Button.prototype,"align",2),t$6([e$b({type:String})],Button.prototype,"minWidth",2),t$6([e$b({type:String})],Button.prototype,"autoActive",2),t$6([e$b({type:Boolean,reflect:!0})],Button.prototype,"loading",2),t$6([t$a()],Button.prototype,"hasPrefix",2),t$6([t$a()],Button.prototype,"hasSuffix",2),t$6([l$p({flatten:!0,slot:"prefix"})],Button.prototype,"prefixes",2),t$6([l$p({flatten:!0,slot:"suffix"})],Button.prototype,"suffixes",2),t$6([e$b({type:String})],Button.prototype,"target",2),t$6([e$b({type:String})],Button.prototype,"href",1),t$6([e$b({type:String})],Button.prototype,"goBack",2),t$6([e$b({type:Boolean})],Button.prototype,"pushState",2),t$6([e$b({type:Boolean,reflect:!0})],Button.prototype,"active",2),Button=t$6([n$j(f$g)],Button);try{customElements.define(f$g,Button)}catch{}var c$j=Object.defineProperty,f$f=Object.getOwnPropertyDescriptor,d$j=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$f(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$j(O,B,U),U};const L=q=>{class O extends q{constructor(...D){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isDefaultLoaderEnabled=!0,this.isFetchEnabled=!0,this._endPoint="",this.dataProvider=""}set endPoint(D){this._endPoint=D,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}async _fetchData(){if(!this.isFetchEnabled||(this.api=new r$k(this.getApiConfiguration()),!this.api))return;this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.isLoading=!0,this.requestUpdate();let D,U=this.isDefaultLoaderEnabled&&!this.hasAttribute("noLoader");if(U&&Loader.show(),D=await this.api.get(this.endPoint||this.dataProvider||""),!D){SonicToast$1.add({text:"Network Error",status:"error"}),this.isLoading=!1,U&&Loader.hide();return}U&&Loader.hide(),this.key&&(D=a$o.traverse(D,this.key.split("."),!1)),this.props=D,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1}disconnectedCallback(){var D;super.disconnectedCallback(),(D=this.publisher)==null||D.offInvalidate(this.onInvalidate),this.isFirstLoad=!1}connectedCallback(){var D;if(this.noShadowDom="",!this.isFetchEnabled){super.connectedCallback();return}super.connectedCallback(),this.key=this.getAncestorAttributeValue("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),(D=this.publisher)==null||D.onInvalidate(this.onInvalidate),this.getAncestorAttributeValue("lazyload")===null&&this._fetchData()}firstUpdated(){if(this.getAncestorAttributeValue("lazyload")===null)return;let D={root:null,rootMargin:Math.max(window.innerWidth,window.innerHeight)+"px"};this.iObserver=new IntersectionObserver(K=>this.onIntersection(K),D);let U=this,W=U.shadowRoot?U.shadowRoot.children[0]:U.children[0];W&&W.nodeName.toLocaleLowerCase()=="slot"&&(W=W.children[0]),(!W||W.nodeName.toLocaleLowerCase()=="template")&&(W=document.createElement("span"),U.appendChild(W)),W?this.iObserver.observe(W):this.isFirstLoad&&this._fetchData()}onIntersection(D){for(const U of D)U.isIntersecting&&this.isFirstLoad&&this._fetchData()}}return d$j([e$b({type:String})],O.prototype,"endPoint",1),O};var l$h=Object.defineProperty,a$h=Object.getOwnPropertyDescriptor,i$j=(q,O,B,D)=>{for(var U=D>1?void 0:D?a$h(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l$h(O,B,U),U};const c$i="sonic-fetch";let Fetch=class extends L(L$1(s$9)){render(){return $$2`<slot></slot>`}};Fetch.styles=[r$o`:host { display: contents; }`],Fetch=i$j([n$j(c$i)],Fetch);try{customElements.define(c$i,Fetch)}catch{}var a$g=Object.defineProperty,c$h=Object.getOwnPropertyDescriptor,m$c=(q,O,B,D)=>{for(var U=D>1?void 0:D?c$h(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&a$g(O,B,U),U};const i$i="sonic-if";let SonicIF=class extends s$9{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?$$2`<slot></slot>`:w$1}};SonicIF.styles=r$o`:host{ display:contents; }`,m$c([e$b({type:Boolean})],SonicIF.prototype,"condition",2),SonicIF=m$c([n$j(i$i)],SonicIF);try{customElements.define(i$i,SonicIF)}catch{}/**
106
+ */const l$j=q=>q!=null?q:w$1;var d$l=Object.defineProperty,u$6=Object.getOwnPropertyDescriptor,t$6=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$6(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$l(O,B,U),U};const f$d="sonic-button";let Button=class extends d$m(V(L$1(s$a))){constructor(){super(...arguments),this.type="default",this.variant="default",this.size="md",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.align="center",this.minWidth="0",this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=null,this.active=!1,this._location=""}set href(q){this._href=q,this.href&&this.href.indexOf("http")!=0?(a$k.onChange(this),this.location=document.location.href.replace(document.location.origin,"")):a$k.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(q){q.preventDefault(),a$k.changeFromComponent(this)}handleChange(q){super.handleChange(q),(this.pushState||this.goBack!==null)&&(q.preventDefault(),q.stopPropagation(),a$k.changeFromComponent(this))}connectedCallback(){super.connectedCallback()}setCheckedValue(q){if(this.name){if(q==this._checked)return;super.setCheckedValue(q),this._checked?this.setAttribute("active","true"):this.removeAttribute("active")}}disconnectedCallback(){a$k.offChange(this),super.disconnectedCallback()}get location(){return this._location}set location(q){this._location=q,a$k.updateComponentActiveState(this)}render(){const q={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,textAlign:this.align,minWidth:this.minWidth},O=$$2`<button part="button" class="${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}" style="${i$k(q)}" @click="${this.handleChange}"><slot @slotchange="${this.onSlotChange}" part="prefix" name="prefix"></slot><slot part="main" class="main-slot"></slot><slot @slotchange="${this.onSlotChange}" part="suffix" name="suffix"></slot>${this.loading==!0?$$2`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}</button>`;return this.href?$$2`<a href="${this.href}" target="${l$j(this.target)}" @click="${this.pushState||this.goBack!==null?this.handleNavigation:null}">${O}</a>`:$$2`${O}`}onSlotChange(){var q,O;this.hasPrefix=!!((q=this.prefixes)!=null&&q.length),this.hasSuffix=!!((O=this.suffixes)!=null&&O.length)}};Button.styles=[r$k`* { box-sizing: border-box; } :host { --sc-btn-gap: 0.35em; --sc-btn-py: 0.25em; --sc-btn-px: 1.1em; --sc-btn-fs: 1rem; --sc-btn-fw: var(--sc-btn-font-weight); --sc-btn-ff: var(--sc-btn-font-family); --sc-btn-height: var(--sc-form-height, 2.5em); --sc-btn-color: var(--sc-base-content, #1f2937); --sc-btn-bg: var(--sc-base-100, #e5e7eb); --sc-btn-border-style: solid; --sc-btn-border-with: var(--sc-form-border-width, 0.1rem); --sc-btn-border-color: transparent; --sc-btn-outline-bg-hover: var(--sc-base-100); --sc-btn-ghost-bg-hover: var(--sc-base-100); --sc-btn-active-color: var(--sc-base); --sc-btn-hover-filter: brightness(0.97); --sc-btn-active-filter: brightness(0.96); --sc-btn-active-bg: var(--sc-base-content); --sc-item-rounded-tr: var(--sc-btn-rounded); --sc-item-rounded-tl: var(--sc-btn-rounded); --sc-item-rounded-bl: var(--sc-btn-rounded); --sc-item-rounded-br: var(--sc-btn-rounded); display: inline-flex; vertical-align: middle; box-sizing: border-box; } :host a { display: contents; color:unset; } :host button { display: flex; flex: 1; box-sizing: border-box; align-items: center; justify-content: center; font-family: var(--sc-btn-ff); font-weight: var(--sc-btn-fw); font-size: var(--sc-btn-fs); cursor: pointer; text-align: center; line-height: 1.1; border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl); background: var(--sc-btn-bg); color: var(--sc-btn-color); padding-top: var(--sc-btn-py); padding-bottom: var(--sc-btn-py); padding-left: var(--sc-btn-px); padding-right: var(--sc-btn-px); border: var(--sc-btn-border-with) var(--sc-btn-border-style) var(--sc-btn-border-color); min-height: var(--sc-btn-height); } :host button.has-prefix-or-suffix { gap: var(--sc-btn-gap); } :host button:focus, :host button:hover { filter: var(--sc-btn-hover-filter); } :host button:active { filter: var(--sc-btn-active-filter); } /*TYPES*/ :host([type="default"]) button { --sc-btn-color: var(--sc-base-content); --sc-btn-bg: var(--sc-base-100); } :host([type="primary"]) button { --sc-btn-color: var(--sc-primary-content); --sc-btn-bg: var(--sc-primary); } :host([type="warning"]) button { --sc-btn-color: var(--sc-warning-content); --sc-btn-bg: var(--sc-warning); } :host([type="danger"]) button { --sc-btn-color: var(--sc-danger-content); --sc-btn-bg: var(--sc-danger); } :host([type="info"]) button { --sc-btn-color: var(--sc-info-content); --sc-btn-bg: var(--sc-info); } :host([type="success"]) button { --sc-btn-color: var(--sc-success-content); --sc-btn-bg: var(--sc-success); } :host([type="neutral"]) button { --sc-btn-color: var(--sc-base); --sc-btn-bg: var(--sc-base-600); } /*SIZE*/ :host([size="2xs"]) { --sc-btn-fs: 0.6rem; } :host([size="xs"]) { --sc-btn-fs: 0.75rem; } :host([size="sm"]) { --sc-btn-fs: 0.85rem; } :host([size="lg"]) { --sc-btn-fs: 1.2rem; } :host([size="xl"]) { --sc-btn-fs: 1.5rem; } /*UNSTYLED*/ :host([variant="unstyled"]) button { all: unset; transition: 0.1s; display: inline-flex; cursor: pointer; --sc-btn-height: auto; --sc-btn-width: auto; } /*GESTION DU FOCUS*/ :host(:not([disabled])) button:focus { box-shadow: 0 0 0 0.18rem var(--sc-base-300); border-color: var(--sc-base-300) !important; outline: none; } /*GHOST*/ :host([variant="ghost"][type]) button { color: var(--sc-btn-bg); background: transparent; } :host([variant="ghost"][type="default"]) button { color: var(--sc-btn-color); background: transparent; } /*:host([variant="ghost"]) button:focus,*/ :host([variant="ghost"]) button:hover { background: var(--sc-btn-ghost-bg-hover); filter: none; } :host([active][variant="ghost"]) button { background: var(--sc-btn-ghost-bg-hover); filter: none; } :host([active][variant="ghost"]) button:hover { filter: var(--sc-btn-hover-filter); } /*OUTLINE*/ :host([variant="outline"][type]) button { border-color: var(--sc-btn-bg); color: var(--sc-btn-bg); background: transparent; } :host([variant="outline"][type="default"]) button { border-color: var(--sc-base-400); color: var(--sc-base-500); background: transparent; } /*:host([variant="outline"]) button:focus,*/ :host([variant="outline"]) button:hover { background: var(--sc-btn-outline-bg-hover); } /*OUTLINE*/ :host([variant="link"]) { vertical-align: baseline; margin-left:.25em; margin-right:.25em; } :host([variant="link"]) button { text-decoration: underline; padding: 0; background: none; border: none; font-size: inherit; min-height: 0; color: inherit; } :host([variant="link"][type]) button { color: var(--sc-btn-bg); } :host([variant="link"][type="default"]) button { color: inherit; } :host([variant="link"]) button:focus, :host([variant="link"]) button:hover { text-decoration: none; } /*SHAPE*/ :host([shape="circle"]) button { border-radius: 50%; } :host([shape="circle"]) button, :host([shape="square"]) button { width: var(--sc-btn-height); height: var(--sc-btn-height); overflow: hidden; padding: 0; align-items: center; justify-content: 0; text-align:center !important; } :host([shape="block"]), :host([shape="block"]) button { width: 100%; } :host([disabled]) { opacity: 0.3; pointer-events: none; user-select: none; } /*ACTIVE*/ :host([active]:not([variant="ghost"])) button { background: var(--sc-btn-active-bg); color: var(--sc-btn-active-color); border-color: var(--sc-btn-active-bg); } :host([textAlign="left"]) button { text-align: left; } :host([textAlign="right"]) button { text-align: right; } .main-slot { flex-grow: 1; display: block; /*align-items: center; justify-content: center;*/ } :host([minWidth]) .main-slot { flex-grow:0; } slot[name="suffix"], slot[name="prefix"] { flex-shrink: 0; } /*ALIGNEMENT DES ICONES permet de tous les avoir alignés dans un menu */ ::slotted(sonic-icon) { min-width: 1.3em; text-align: center; } /*Tooltip ne joue pas sur le layout*/ sonic-tooltip { display: contents; } /*OUTLINE*/ :host(:not([active])) ::slotted([swap="on"]) { display: none; } :host([active]) ::slotted([swap="off"]) { display: none; } /*Loading*/ :host([loading]) { pointer-events: none; position: relative; } :host([loading]) slot { opacity: 0 !important; pointer-events: none; } /*Loading*/ :host([loading]) .loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; line-height: 0; height: var(--sc-btn-ff); width: var(--sc-btn-ff); animation: rotation 2s infinite linear; } @keyframes rotation { from { transform-origin: 50% 50%; transform: translate(-50%, -50%) rotate(0deg); } to { transform-origin: 50% 50%; transform: translate(-50%, -50%) rotate(359deg); } }`],t$6([e$b({type:String,reflect:!0})],Button.prototype,"type",2),t$6([e$b({type:String,reflect:!0})],Button.prototype,"variant",2),t$6([e$b({type:String,reflect:!0})],Button.prototype,"size",2),t$6([e$b({type:String,reflect:!0})],Button.prototype,"shape",2),t$6([e$b({type:String})],Button.prototype,"direction",2),t$6([e$b({type:String,reflect:!0})],Button.prototype,"alignItems",2),t$6([e$b({type:String})],Button.prototype,"justify",2),t$6([e$b({type:String,reflect:!0})],Button.prototype,"align",2),t$6([e$b({type:String})],Button.prototype,"minWidth",2),t$6([e$b({type:String})],Button.prototype,"autoActive",2),t$6([e$b({type:Boolean,reflect:!0})],Button.prototype,"loading",2),t$6([t$a()],Button.prototype,"hasPrefix",2),t$6([t$a()],Button.prototype,"hasSuffix",2),t$6([l$q({flatten:!0,slot:"prefix"})],Button.prototype,"prefixes",2),t$6([l$q({flatten:!0,slot:"suffix"})],Button.prototype,"suffixes",2),t$6([e$b({type:String})],Button.prototype,"target",2),t$6([e$b({type:String})],Button.prototype,"href",1),t$6([e$b({type:String})],Button.prototype,"goBack",2),t$6([e$b({type:Boolean})],Button.prototype,"pushState",2),t$6([e$b({type:Boolean,reflect:!0})],Button.prototype,"active",2),Button=t$6([n$j(f$d)],Button);try{customElements.define(f$d,Button)}catch{}class i$i{static areEqual(O,B){return O.length===B.length?O.every((D,U)=>D===B[U]):!1}static from2d(O){return{to1D:()=>{let B=[];return O.forEach(D=>B=B.concat(D)),this.from(B)}}}static from(O){return{get:()=>O||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:B=>{if(O.length<1)return!0;let D=(O[0]||{})[B];return O.every(U=>(U||{})[B]==D)}})})}),value:()=>({forKey:B=>i$i.from(O.map(D=>D[B]))}),copy:()=>({fromKey:B=>({toKey:D=>{O.forEach(U=>{U[D]=Array.isArray(U[B])?[...U[B]]:typeof U[B]=="object"&&U[B]!=null?ut({},U[B]):U[B]})}})})}),map:B=>i$i.from(O.map(B)),filter:B=>i$i.from(O.filter(B)),find:B=>O.find(B),some:B=>O.some(B),every:B=>O.every(B),group:()=>({byKey:B=>{let D=[],U=new Map;for(let W of O){let K=W[B];if(!U.has(K)){let Y=D.length;U.set(K,Y);let Z={items:[]};Z[B]=K,D.push(Z)}D[U.get(K)].items.push(W)}return i$i.from(D)}}),without:()=>({duplicates:()=>({forKey:B=>{let D=[...new Set(O.map(U=>U[B]))];return i$i.from(D.map(U=>O.find(W=>W[B]==U)))}}),itemsIn:B=>({havingSameValue:()=>({forKey:D=>{let U=(W,K)=>Y=>W[K]!=Y[K];return i$i.from(O.filter(W=>B.every(U(W,D))))}})})})}}}const Arrays=i$i,DataBindObserver=l$p,Format=r$g,HTML=r$h,LocationHandler=a$k,Objects=a$p,PublisherProxy=Publisher,PublisherManager=PublisherManager$1,api=a$q;let r$b=window;r$b["concorde-utils"]=r$b["concorde-utils"]||{},r$b["concorde-utils"]={Arrays,DataBindObserver,Format,HTML,LocationHandler,Objects,PublisherProxy,PublisherManager,api};var c$h=Object.defineProperty,u$5=Object.getOwnPropertyDescriptor,h$9=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$5(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$h(O,B,U),U};const L=q=>{class O extends q{constructor(...D){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isDefaultLoaderEnabled=!0,this.isFetchEnabled=!0,this._endPoint="",this.dataProvider=""}set endPoint(D){this._endPoint=D,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}async _fetchData(){if(!this.isFetchEnabled||(this.api=new a$q(this.getApiConfiguration()),!this.api))return;this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.isLoading=!0,this.requestUpdate();let D,U=this.isDefaultLoaderEnabled&&!this.hasAttribute("noLoader");U&&Loader.show();let W=PublisherManager.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(D=await this.api.get(this.endPoint||this.dataProvider||"",W),!D){SonicToast$1.add({text:"Network Error",status:"error"}),this.isLoading=!1,U&&Loader.hide();return}U&&Loader.hide(),this.key&&(D=a$p.traverse(D,this.key.split("."),!1)),this.props=D,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1}disconnectedCallback(){var D;super.disconnectedCallback(),(D=this.publisher)==null||D.offInvalidate(this.onInvalidate),this.isFirstLoad=!1}connectedCallback(){var D;if(this.noShadowDom="",!this.isFetchEnabled){super.connectedCallback();return}super.connectedCallback(),this.key=this.getAncestorAttributeValue("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),(D=this.publisher)==null||D.onInvalidate(this.onInvalidate),this.getAncestorAttributeValue("lazyload")===null&&this._fetchData()}firstUpdated(){if(this.getAncestorAttributeValue("lazyload")===null)return;let D={root:null,rootMargin:Math.max(window.innerWidth,window.innerHeight)+"px"};this.iObserver=new IntersectionObserver(K=>this.onIntersection(K),D);let U=this,W=U.shadowRoot?U.shadowRoot.children[0]:U.children[0];W&&W.nodeName.toLocaleLowerCase()=="slot"&&(W=W.children[0]),(!W||W.nodeName.toLocaleLowerCase()=="template")&&(W=document.createElement("span"),U.appendChild(W)),W?this.iObserver.observe(W):this.isFirstLoad&&this._fetchData()}onIntersection(D){for(const U of D)U.isIntersecting&&this.isFirstLoad&&this._fetchData()}}return h$9([e$b({type:String})],O.prototype,"endPoint",1),O};var l$i=Object.defineProperty,a$h=Object.getOwnPropertyDescriptor,i$h=(q,O,B,D)=>{for(var U=D>1?void 0:D?a$h(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l$i(O,B,U),U};const c$g="sonic-fetch";let Fetch=class extends L(L$1(s$a)){render(){return $$2`<slot></slot>`}};Fetch.styles=[r$k`:host { display: contents; }`],Fetch=i$h([n$j(c$g)],Fetch);try{customElements.define(c$g,Fetch)}catch{}var a$g=Object.defineProperty,c$f=Object.getOwnPropertyDescriptor,m$c=(q,O,B,D)=>{for(var U=D>1?void 0:D?c$f(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&a$g(O,B,U),U};const i$g="sonic-if";let SonicIF=class extends s$a{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?$$2`<slot></slot>`:w$1}};SonicIF.styles=r$k`:host{ display:contents; }`,m$c([e$b({type:Boolean})],SonicIF.prototype,"condition",2),SonicIF=m$c([n$j(i$g)],SonicIF);try{customElements.define(i$g,SonicIF)}catch{}/**
107
107
  * @license
108
108
  * Copyright 2020 Google LLC
109
109
  * SPDX-License-Identifier: BSD-3-Clause
110
- */const o$9=e$9(class extends i$o{constructor(q){if(super(q),q.type!==t$8.CHILD)throw Error("templateContent can only be used in child bindings")}render(q){return this.vt===q?b$5:(this.vt=q,document.importNode(q.content,!0))}});var c$g=Object.defineProperty,d$i=Object.getOwnPropertyDescriptor,s$5=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$i(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$g(O,B,U),U};const a$f="sonic-subscriber";let SonicSubscriber=class extends L$1(s$9){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}render(){return $$2`<slot></slot>`}};SonicSubscriber=s$5([n$j(a$f)],SonicSubscriber);try{customElements.define(a$f,SonicSubscriber)}catch{}var v$4=Object.defineProperty,k$1=Object.getOwnPropertyDescriptor,n$c=(q,O,B,D)=>{for(var U=D>1?void 0:D?k$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&v$4(O,B,U),U};const P$1="sonic-list";let List=class extends L(L$1(T$2(s$9))){constructor(){super(...arguments),this.itemPropertyMap=null,this.templateKey="template",this.idKey="id"}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isDefaultLoaderEnabled=!1,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}renderLoadingState(){return this.templateParts.skeleton?o$9(this.templateParts.skeleton):$$2`<sonic-loader mode="inline"></sonic-loader>`}renderNoResultState(){return $$2`<div class="sonic-no-result-container"><sonic-icon name="emoji-puzzled" size="lg"></sonic-icon><span class="sonic-no-result-text">${this.props}</span></div>`}formatProps(){let q=this.props,O=this.hasAttribute("extractValues");return Array.isArray(q)||(O?q=Object.entries(q).map(([B,D])=>({key:B,value:D})):q=[q]),q}render(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!a$o.isObject(this.props))return $$2`<div></div>`;let q=this.formatProps();if(q.length==0&&this.templateParts["no-item"])return o$9(this.templateParts["no-item"]);let O=this.templateList.length,B=-1,D=this.hasAttribute("extractValues");return $$2`${c$m(q,(U,W)=>U[this.idKey]||W,(U,W)=>{let K=U[this.templateKey],Y=K&&this.templateParts[K];B++,Y&&(B=-1);let Z=D?U.key:W,G=this.publisher[Z];return G._key_=Z+"",U&&$$2`<sonic-subscriber debug="${l$i(this.defferedDebug)}" .bindPublisher="${function(){return G}}" .propertyMap="${l$i(this.itemPropertyMap)}" dataProvider="${this.dataProvider}/list-item/${W}">${o$9(Y?this.templateParts[K]:this.templateList[B%O])}</sonic-subscriber>`})}`}};List.styles=[r$o`.sonic-no-result-container { color: var(--sc-base-400); font-size: 1.65rem; } sonic-icon { margin-right: 0.25em; } span { vertical-align: middle; }`],n$c([e$b({type:Object})],List.prototype,"itemPropertyMap",2),n$c([e$b({type:String})],List.prototype,"templateKey",2),n$c([e$b({type:String})],List.prototype,"idKey",2),List=n$c([n$j(P$1)],List);try{customElements.define(P$1,List)}catch{}var T=Object.defineProperty,v$3=Object.getOwnPropertyDescriptor,s$4=(q,O,B,D)=>{for(var U=D>1?void 0:D?v$3(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&T(O,B,U),U};const P="sonic-queue";let e$5=class extends L$1(s$9){constructor(){super(...arguments),this.templates=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.targetRequestDuration=500,this.limit=5,this.offset=0,this.filteredFields="",this.filterPublisher=null,this.filterTimeoutId=void 0,this.dataProviderExpression="",this.idKey="id",this.currentScrollPosition=void 0,this.listDataProviders=[]}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider="sonic-queue-"+e$5.instanceCounter++),this.configFilter(),super.connectedCallback(),this.key=this.getAttribute("key"),this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.next()}configFilter(){var O;let q=this.getAncestorAttributeValue("dataFilterProvider");!q||(this.filterPublisher=PublisherManager$1.getInstance().get(q),(O=this.filterPublisher)==null||O.onInternalMutation(()=>{var B;Object.keys((B=this.filterPublisher)==null?void 0:B.get()).length!=0&&this.updateFilteredContent()}))}updateFilteredContent(){for(let q of this.listDataProviders)PublisherManager$1.delete(q);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(()=>{this.props=null,this.next()},250)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(q){var G,st;let O=this.offset;const B=new Date().getTime()-this.lastRequestTime;if(q&&(!q.detail.isFirstLoad||!q.detail.props.length||this.dataProviderExpression.indexOf("$offset")==-1))return;if(!Array.isArray(this.props))this.props=[];else{const tt=this.props,Q=tt[tt.length-1];O=parseInt(Q.offset.toString())+parseInt(Q.limit.toString())}B>0&&q&&(this.limit=Math.round(this.limit/B*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let D=this.dataProviderExpression.replace("$offset",O+"").replace("$limit",this.limit+""),U=D.split("?"),W=U.shift(),K=new URLSearchParams(U.join("?")),Y=(G=this.filterPublisher)==null?void 0:G.get(),Z=this.filteredFields.split(" ");for(let tt in Y)this.filteredFields&&!Z.includes(tt)||K.set(tt,Y[tt]);D=W+"?"+K.toString(),this.listDataProviders.push(D),this.currentScrollPosition=(st=document.scrollingElement)==null?void 0:st.scrollTop,this.props=[...this.props,{id:K.toString()+"/"+this.props.length,dataProvider:D,offset:O,limit:this.limit}],this.lastRequestTime=new Date().getTime()}render(){return this.currentScrollPosition&&window.requestAnimationFrame(()=>{document.scrollingElement&&(document.scrollingElement.scrollTop=this.currentScrollPosition),this.currentScrollPosition=void 0}),Array.isArray(this.props)?$$2`${c$m(this.props,q=>q.id,(q,O)=>{var D;let B=O==0?this.templates:(D=this.templates)==null?void 0:D.filter(U=>U.getAttribute("data-value")!="no-item");return $$2`<sonic-list fetch .itemPropertyMap="${this.itemPropertyMap}" debug="${l$i(this.defferedDebug)}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${q.dataProvider}" idKey="${this.idKey}" .templates="${B}"></sonic-list>`})}`:w$1}};e$5.instanceCounter=0,s$4([e$b({type:Array})],e$5.prototype,"templates",2),s$4([e$b({type:Object})],e$5.prototype,"itemPropertyMap",2),s$4([e$b()],e$5.prototype,"targetRequestDuration",2),s$4([e$b()],e$5.prototype,"limit",2),s$4([e$b()],e$5.prototype,"offset",2),s$4([e$b()],e$5.prototype,"filteredFields",2),s$4([e$b({type:String})],e$5.prototype,"dataProviderExpression",2),s$4([e$b({type:String})],e$5.prototype,"idKey",2),e$5=s$4([n$j(P)],e$5);try{customElements.define(P,e$5)}catch{}var g$4=Object.defineProperty,f$e=Object.getOwnPropertyDescriptor,o$8=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$e(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&g$4(O,B,U),U};const p$e="sonic-submit";let Submit=class extends L$1(s$9){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.api=null}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",()=>this.submit()),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",q=>{q.key==="Enter"&&this.submit()}),super.connectedCallback(),this.api=new r$k(this.getApiConfiguration())}async submit(){var Z,G,st,tt,Q;const q=PublisherManager$1.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(q.isFormValid=!0,q.invalidate(),!q.isFormValid.get())return;this.publisher.disabled=!0,q.isFormValid;let O=((Z=this.getAttribute("method"))==null?void 0:Z.toLocaleLowerCase())||"post",B=q.get();delete B.isFormValid;let D=PublisherManager$1.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get(),U=null,W=this.getAncestorAttributeValue("dataProvider"),K=this.endPoint||W;switch(Loader.show(),O){case"put":U=await((G=this.api)==null?void 0:G.put(K,B,D));break;case"delete":U=await((st=this.api)==null?void 0:st.delete(K,B,D));break;case"get":U=await((tt=this.api)==null?void 0:tt.get(K));break;default:U=await((Q=this.api)==null?void 0:Q.post(K,B,D));break}Loader.hide(),U||(U={messages:[{content:"Network Error",status:"error"}]});let Y=this.getAncestorAttributeValue("clearedDataOnSuccess");Y&&Y.split(" ").forEach(rt=>PublisherManager$1.get(rt).set({})),this.submitResultKey&&(U=a$o.traverse(U,this.submitResultKey.split("."),!0)),PublisherManager$1.getInstance().get(this.getAncestorAttributeValue("submitResultDataProvider")).set(U),this.publisher.disabled=!1}render(){return $$2`<div ?data-disabled="${this.disabled}"><slot></slot></div>`}};Submit.styles=r$o`[data-disabled]{ opacity: 0.3; pointer-events: none; user-select: none; }`,o$8([e$b({type:String})],Submit.prototype,"submitResultKey",2),o$8([e$b({type:Boolean})],Submit.prototype,"disabled",2),o$8([e$b({type:String})],Submit.prototype,"endPoint",2),Submit=o$8([n$j(p$e)],Submit);try{customElements.define(p$e,Submit)}catch{}var commonjsGlobal=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},urlPattern={exports:{}};(function(q,O){var B=[].slice;(function(D,U){return O!==null?q.exports=U():D.UrlPattern=U()})(commonjsGlobal,function(){var D,U,W,K,Y,Z,G,st,tt,Q,rt,ot,nt,ht,ct;return tt=function(X){return X.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},G=function(X,J){var et,it,at;for(at=[],et=-1,it=X.length;++et<it;)at=at.concat(J(X[et]));return at},ht=function(X,J){var et,it,at;for(at="",et=-1,it=X.length;++et<it;)at+=J(X[et]);return at},nt=function(X){return new RegExp(X.toString()+"|").exec("").length-1},rt=function(X,J){var et,it,at,lt,dt;for(lt={},et=-1,at=X.length;++et<at;)it=X[et],dt=J[et],dt!=null&&(lt[it]!=null?(Array.isArray(lt[it])||(lt[it]=[lt[it]]),lt[it].push(dt)):lt[it]=dt);return lt},D={},D.Result=function(X,J){this.value=X,this.rest=J},D.Tagged=function(X,J){this.tag=X,this.value=J},D.tag=function(X,J){return function(et){var it,at;if(it=J(et),it!=null)return at=new D.Tagged(X,it.value),new D.Result(at,it.rest)}},D.regex=function(X){return function(J){var et,it;if(et=X.exec(J),et!=null)return it=et[0],new D.Result(it,J.slice(it.length))}},D.sequence=function(){var X;return X=1<=arguments.length?B.call(arguments,0):[],function(J){var et,it,at,lt,dt,pt;for(et=-1,it=X.length,pt=[],lt=J;++et<it;){if(at=X[et],dt=at(lt),dt==null)return;pt.push(dt.value),lt=dt.rest}return new D.Result(pt,lt)}},D.pick=function(){var X,J;return X=arguments[0],J=2<=arguments.length?B.call(arguments,1):[],function(et){var it,at;if(at=D.sequence.apply(D,J)(et),at!=null)return it=at.value,at.value=it[X],at}},D.string=function(X){var J;return J=X.length,function(et){if(et.slice(0,J)===X)return new D.Result(X,et.slice(J))}},D.lazy=function(X){var J;return J=null,function(et){return J==null&&(J=X()),J(et)}},D.baseMany=function(X,J,et,it,at){var lt,dt,pt,ft;for(pt=at,ft=et?"":[];!(J!=null&&(lt=J(pt),lt!=null)||(dt=X(pt),dt==null));)et?ft+=dt.value:ft.push(dt.value),pt=dt.rest;if(!(it&&ft.length===0))return new D.Result(ft,pt)},D.many1=function(X){return function(J){return D.baseMany(X,null,!1,!0,J)}},D.concatMany1Till=function(X,J){return function(et){return D.baseMany(X,J,!0,!0,et)}},D.firstChoice=function(){var X;return X=1<=arguments.length?B.call(arguments,0):[],function(J){var et,it,at,lt;for(et=-1,it=X.length;++et<it;)if(at=X[et],lt=at(J),lt!=null)return lt}},ot=function(X){var J;return J={},J.wildcard=D.tag("wildcard",D.string(X.wildcardChar)),J.optional=D.tag("optional",D.pick(1,D.string(X.optionalSegmentStartChar),D.lazy(function(){return J.pattern}),D.string(X.optionalSegmentEndChar))),J.name=D.regex(new RegExp("^["+X.segmentNameCharset+"]+")),J.named=D.tag("named",D.pick(1,D.string(X.segmentNameStartChar),D.lazy(function(){return J.name}))),J.escapedChar=D.pick(1,D.string(X.escapeChar),D.regex(/^./)),J.static=D.tag("static",D.concatMany1Till(D.firstChoice(D.lazy(function(){return J.escapedChar}),D.regex(/^./)),D.firstChoice(D.string(X.segmentNameStartChar),D.string(X.optionalSegmentStartChar),D.string(X.optionalSegmentEndChar),J.wildcard))),J.token=D.lazy(function(){return D.firstChoice(J.wildcard,J.optional,J.named,J.static)}),J.pattern=D.many1(D.lazy(function(){return J.token})),J},st={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},Z=function(X,J){if(Array.isArray(X))return ht(X,function(et){return Z(et,J)});switch(X.tag){case"wildcard":return"(.*?)";case"named":return"(["+J+"]+)";case"static":return tt(X.value);case"optional":return"(?:"+Z(X.value,J)+")?"}},Y=function(X,J){return J==null&&(J=st.segmentValueCharset),"^"+Z(X,J)+"$"},K=function(X){if(Array.isArray(X))return G(X,K);switch(X.tag){case"wildcard":return["_"];case"named":return[X.value];case"static":return[];case"optional":return K(X.value)}},Q=function(X,J,et,it){var at,lt,dt,pt;if(it==null&&(it=!1),pt=X[J],pt==null){if(it)throw new Error("no values provided for key `"+J+"`");return}if(at=et[J]||0,lt=Array.isArray(pt)?pt.length-1:0,at>lt){if(it)throw new Error("too few values provided for key `"+J+"`");return}return dt=Array.isArray(pt)?pt[at]:pt,it&&(et[J]=at+1),dt},W=function(X,J,et){var it,at;if(Array.isArray(X)){for(it=-1,at=X.length;++it<at;)if(W(X[it],J,et))return!0;return!1}switch(X.tag){case"wildcard":return Q(J,"_",et,!1)!=null;case"named":return Q(J,X.value,et,!1)!=null;case"static":return!1;case"optional":return W(X.value,J,et)}},ct=function(X,J,et){if(Array.isArray(X))return ht(X,function(it){return ct(it,J,et)});switch(X.tag){case"wildcard":return Q(J,"_",et,!0);case"named":return Q(J,X.value,et,!0);case"static":return X.value;case"optional":return W(X.value,J,et)?ct(X.value,J,et):""}},U=function(X,J){var et,it,at,lt,dt;if(X instanceof U){this.isRegex=X.isRegex,this.regex=X.regex,this.ast=X.ast,this.names=X.names;return}if(this.isRegex=X instanceof RegExp,!(typeof X=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=X,J!=null){if(!Array.isArray(J))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(et=nt(this.regex),J.length!==et)throw new Error("regex contains "+et+" groups but array of group names contains "+J.length);this.names=J}return}if(X==="")throw new Error("argument must not be the empty string");if(dt=X.replace(/\s+/g,""),dt!==X)throw new Error("argument must not contain whitespace");if(it={escapeChar:(J!=null?J.escapeChar:void 0)||st.escapeChar,segmentNameStartChar:(J!=null?J.segmentNameStartChar:void 0)||st.segmentNameStartChar,segmentNameCharset:(J!=null?J.segmentNameCharset:void 0)||st.segmentNameCharset,segmentValueCharset:(J!=null?J.segmentValueCharset:void 0)||st.segmentValueCharset,optionalSegmentStartChar:(J!=null?J.optionalSegmentStartChar:void 0)||st.optionalSegmentStartChar,optionalSegmentEndChar:(J!=null?J.optionalSegmentEndChar:void 0)||st.optionalSegmentEndChar,wildcardChar:(J!=null?J.wildcardChar:void 0)||st.wildcardChar},lt=ot(it),at=lt.pattern(X),at==null)throw new Error("couldn't parse pattern");if(at.rest!=="")throw new Error("could only partially parse pattern");this.ast=at.value,this.regex=new RegExp(Y(this.ast,it.segmentValueCharset)),this.names=K(this.ast)},U.prototype.match=function(X){var J,et;return et=this.regex.exec(X),et==null?null:(J=et.slice(1),this.names?rt(this.names,J):J)},U.prototype.stringify=function(X){if(X==null&&(X={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(X!==Object(X))throw new Error("argument must be an object or undefined");return ct(this.ast,X,{})},U.escapeForRegex=tt,U.concatMap=G,U.stringConcatMap=ht,U.regexGroupCount=nt,U.keysAndValuesToObject=rt,U.P=D,U.newParser=ot,U.defaultOptions=st,U.astNodeToRegexString=Y,U.astNodeToNames=K,U.getParam=Q,U.astNodeContainsSegmentsForProvidedParams=W,U.stringify=ct,U})})(urlPattern,urlPattern.exports);var f$d=urlPattern.exports,u$3=Object.defineProperty,g$3=Object.getOwnPropertyDescriptor,l$g=(q,O,B,D)=>{for(var U=D>1?void 0:D?g$3(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&u$3(O,B,U),U};const p$d="sonic-router";let SonicRouter=class extends L$1(T$2(s$9)){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",a$j.onChange(this),super.connectedCallback()}disconnectedCallback(){a$j.offChange(this),super.disconnectedCallback()}set location(q){this._location=q,this.requestUpdate()}get location(){return this._location}render(){let q=[];for(let O of this.templatePartsList){let B=O.getAttribute(this.templateValueAttribute),D=new RegExp(B),U=new f$d(B);D.test(this.location)?q.push(O):U.match(this.location)&&(O.setAttribute("mode","patternMatching"),q.push(O))}return $$2`${c$m(q,(O,B)=>B+new Date().getTime(),O=>{var B;if(O.title&&(document.title=O.title),O.hasAttribute("dataProviderExpression")){let D="",U=O.getAttribute("dataProviderExpression");if(O.getAttribute("mode")=="patternMatching"){const W=new f$d(O.getAttribute(this.templateValueAttribute));D=new f$d(U).stringify(W.match(this.location))}else{const W=new RegExp(O.getAttribute(this.templateValueAttribute));let K=(this.location+"").match(W);K&&(D=(B=K.shift())==null?void 0:B.replace(W,U))}return $$2`<div style="display:contents" dataProvider="${D}">${o$9(O)}</div>`}return o$9(O)})}`}};l$g([e$b()],SonicRouter.prototype,"location",1),SonicRouter=l$g([n$j(p$d)],SonicRouter);try{customElements.define(p$d,SonicRouter)}catch{}var c$f=Object.defineProperty,h$8=Object.getOwnPropertyDescriptor,r$e=(q,O,B,D)=>{for(var U=D>1?void 0:D?h$8(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$f(O,B,U),U};const p$c="sonic-redirect";let SonicRedirect=class extends L$1(s$9){constructor(){super(...arguments),this.udpateCallBack=()=>{}}connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(!this.props)return;let q=this.getAttribute("onData").split("."),O=a$o.traverse(this.props,q);O&&!(a$o.isObject(O)&&O)&&a$j.changeFromComponent(this)}};SonicRedirect=r$e([n$j(p$c)],SonicRedirect);try{customElements.define(p$c,SonicRedirect)}catch{}var b$1=Object.defineProperty,A=Object.getOwnPropertyDescriptor,d$h=(q,O,B,D)=>{for(var U=D>1?void 0:D?A(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&b$1(O,B,U),U};const g$2="sonic-states";let SonicStates=class extends L$1(T$2(s$9)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=null}connectedCallback(){if(super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;let q=this.statePath.split(".");for(let O of q)this.statePublisher=this.statePublisher[O];this.onAssign=O=>{this.state=O,this.requestUpdate()},this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher.offAssign(this.onAssign),super.disconnectedCallback()}render(){let q=[],O=this.state;(!Array.isArray(O)&&a$o.isObject(O)||O===void 0)&&(O="");for(let B of this.templatePartsList){let D=B.getAttribute(this.templateValueAttribute),U=O;if(this.inverted&&(U=D,D=O),D==""&&(D=this.inverted?".*?":"^$"),new RegExp(D).test(U))q.push(B),B.removeAttribute("mode");else{let W=new f$d(D);W.names.length>0&&W.match(U)&&(B.setAttribute("mode","patternMatching"),q.push(B))}}return $$2`${c$m(q,(B,D)=>D+new Date().getTime(),B=>{var D;if(B.title&&(document.title=B.title),B.hasAttribute("dataProviderExpression")){let U=B.getAttribute("dataProviderExpression"),W="",K=O,Y=B.getAttribute(this.templateValueAttribute);if(this.inverted&&(K=Y,Y=O),Y==""&&(Y=this.inverted?"*":"^$"),B.getAttribute("mode")=="patternMatching"){const Z=new f$d(Y);W=new f$d(U).stringify(Z.match(K))}else{const Z=new RegExp(Y);let G=(K+"").match(Z);G&&(W=(D=G.shift())==null?void 0:D.replace(Z,U))}return $$2`<div style="display:contents" dataProvider="${W}">${o$9(B)}</div>`}return o$9(B)})}`}};d$h([e$b()],SonicStates.prototype,"state",2),d$h([e$b({type:Boolean,reflect:!0})],SonicStates.prototype,"inverted",2),SonicStates=d$h([n$j(g$2)],SonicStates);try{customElements.define(g$2,SonicStates)}catch{}var a$e=Object.defineProperty,d$g=Object.getOwnPropertyDescriptor,n$b=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$g(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&a$e(O,B,U),U};const R="sonic-scope";let SonicScope=class extends s$9{createRenderRoot(){return this}render(){return $$2`<slot></slot>`}};SonicScope=n$b([n$j(R)],SonicScope);var p$b=Object.defineProperty,f$c=Object.getOwnPropertyDescriptor,a$d=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$c(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$b(O,B,U),U};const h$7="sonic-example";let SonicComponent=class extends L$1(s$9){constructor(){super(...arguments),this.text="Example"}render(){return $$2`${this.text}`}};a$d([e$b()],SonicComponent.prototype,"text",2),SonicComponent=a$d([n$j(h$7)],SonicComponent);const coreVariables=r$o`:host { /* polices*/ --sc-font-family-base: "Inter var", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --sc-font-weight-base: 400; --sc-font-style-base: normal; --sc-headings-font-family: var(--sc-font-family-base); --sc-headings-font-style: var(--sc-font-style-base); --sc-headings-line-height: 1.1; --sc-headings-font-weight: 700; --sc-headings-text-transform: none; /* Button*/ --sc-btn-font-weight: var(--sc-font-weight-base); --sc-btn-font-family: var(--sc-font-family-base); --sc-btn-font-style: var(--sc-font-style-base); /* ROUNDED*/ --sc-rounded-sm: calc(var(--sc-rounded) * 0.5); --sc-rounded: 0.35rem; --sc-rounded-md: calc(var(--sc-rounded) * 1.8); --sc-rounded-lg: calc(var(--sc-rounded) * 3.5); --sc-rounded-xl: calc(var(--sc-rounded) * 7); --sc-btn-rounded: calc(var(--sc-rounded) * 1.2); /* Placeholder */ --sc-placeholder-bg: rgba(17, 24, 39, 0.05); /* Images*/ --sc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --sc-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --sc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --sc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --sc-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); /* formulaires*/ --sc-border-width: max(1px, 0.1rem); --sc-form-border-width: var(--sc-border-width); --sc-input-bg: var(--sc-base-100); --sc-input-border-color: var(--sc-input-bg); --sc-input-rounded: calc(var(--sc-rounded) * 1.2); /*Couleurs -- textes sur images*/ --sc-contrast-content: #fff; --sc-contrast: #0f172a; }`,light=r$o`:host { /*Boutons*/ --sc-primary: var(--sc-base-800); --sc-info: #2563eb; --sc-danger: #f43f5e; --sc-warning: #f97316; --sc-success: #14b8a6; --sc-primary-content: var(--sc-base); --sc-info-content: var(--sc-base); --sc-danger-content: var(--sc-base); --sc-warning-content: var(--sc-base); --sc-success-content: var(--sc-base); /*Bases*/ --sc-base: #fff; --sc-base-50: #f8fafc; --sc-base-100: #f1f5f9; --sc-base-200: #e2e8f0; --sc-base-300: #cbd5e1; --sc-base-400: #94a3b8; --sc-base-500: #64748b; --sc-base-600: #475569; --sc-base-700: #334155; --sc-base-800: #1e293b; --sc-base-900: #0f172a; --sc-base-content: var(--sc-base-700); /*formulaires*/ --sc-input-bg: var(--sc-base-100); --sc-input-color: var(--sc-base-content); }`,a$c=r$o`--sc-primary: var(--sc-dark-primary, var(--sc-base-700)); --sc-info: var(--sc-dark-info, #3abff8); --sc-danger: var(--sc-dark-danger, #f87272); --sc-warning: var(--sc-dark-warning, #fbbd23); --sc-success: var(--sc-dark-success, #36d399); --sc-primary-content: var(--sc-dark-primary-content, #002b3d); --sc-info-content: var(--sc-dark-info-content, #002b3d); --sc-danger-content: var(--sc-dark-danger-content, #382800); --sc-warning-content: var(--sc-dark-warning-content, #382800); --sc-success-content: var(--sc-dark-success-content, #003320); --sc-base: var(--sc-dark-base, #1d2634); --sc-base-50: var(--sc-dark-base-50, #1f2937); --sc-base-100: var(--sc-dark-base-100, #252C36); --sc-base-200: var(--sc-dark-base-200, #2c3543); --sc-base-300: var(--sc-dark-base-300, #38414e); --sc-base-400: var(--sc-dark-base-400, #515964); --sc-base-500: var(--sc-dark-base-500, #828891); --sc-base-600: var(--sc-dark-base-600, #b4b8be); --sc-base-700: var(--sc-dark-base-700, #cdd0d5); --sc-base-800: var(--sc-dark-base-800, #d9dce0); --sc-base-900: var(--sc-dark-base-900, #e5e7eb); --sc-base-content: var(--sc-dark-base-content, #e5e7eb);`,dark=r$o`:host([theme="dark"]) { ${a$c} } @media (prefers-color-scheme: dark) { :host([theme="auto"]) { ${a$c} } }`;var y$3=Object.defineProperty,h$6=Object.getOwnPropertyDescriptor,a$b=(q,O,B,D)=>{for(var U=D>1?void 0:D?h$6(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&y$3(O,B,U),U};const C="sonic-theme";let Theme=class extends s$9{constructor(){super(...arguments),this.theme="light"}connectedCallback(){super.connectedCallback(),window.addEventListener("message",q=>this.receiveMessage(q),!1),this.postCSSVars()}postCSSVars(){const q=document.styleSheets,O=q.length;let B=[];for(let D=0;D<O;D++){let U=q[D];U.href&&(U.href.includes("googleapis")||U.href.includes("typekit.net"))&&B.push(U.href)}document.querySelectorAll("iframe").forEach(D=>{var U;return(U=D.contentWindow)==null?void 0:U.postMessage({type:"SonicTheme",variables:this.getCssVariables(),fonts:B},"*")})}receiveMessage(q){let O=q.data;!O.type||O.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){let q=[],O=[...Theme.styles.map(U=>U.styleSheet),...Array.from(document.styleSheets)];for(let U of O)try{let W=U==null?void 0:U.cssRules;for(let K of W)if(K.style)for(let Y of K.style)q.includes(Y)||Y.indexOf("--sc")!==0||q.push(Y)}catch{}let B=window.getComputedStyle(this),D={};return q.forEach(U=>D[U]=B.getPropertyValue(U)),D}render(){return $$2`<slot></slot>`}};Theme.styles=[light,dark,coreVariables,r$o`:host([background]) { display: block !important; background: var(--sc-base) !important; } :host([color]) { color: var(--sc-base-content); } :host([font]) { font-family: var(--sc-font-family-base); font-weight: var(--sc-font-weight-base); font-style: var(--sc-font-style-base); }`],a$b([e$b({type:String,reflect:!0})],Theme.prototype,"theme",2),Theme=a$b([n$j(C)],Theme);var n$a=Object.defineProperty,i$h=Object.getOwnPropertyDescriptor,r$d=(q,O,B,D)=>{for(var U=D>1?void 0:D?i$h(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&n$a(O,B,U),U};const b="sonic-badge";let Badge=class extends s$9{constructor(){super(...arguments),this.type="default",this.variant="default",this.size="md"}render(){return $$2`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};Badge.styles=[r$o`:host { --sc-badge-gap: 0.3em; --sc-badge-py: 0.15em; --sc-badge-px: 0.66em; --sc-badge-fs: 1rem; --sc-badge-color: var(--sc-base-content, #1f2937); --sc-badge-bg: var(--sc-base-200, #e5e7eb); --sc-badge-border-with: var(--sc-form-border-width, 0.1rem); --sc-badge-border-color: transparent; --sc-badge-border: var(--sc-badge-border-with) solid var(--sc-badge-border-color); --sc-badge-rounded: 9999px; --sc-badge-line-height: 1.15; --sc-badge-fw: var(--sc-font-weight-base); display: inline-flex; align-items:center; box-sizing: border-box; line-height: var(--sc-badge-line-height); border-radius: var(--sc-badge-rounded); background: var(--sc-badge-bg); color: var(--sc-badge-color); font-family: var(--sc-badge-ff, var(--sc-font-family-base, inherit)); font-weight: var(--sc-badge-fw); padding-top: var(--sc-badge-py); padding-bottom: var(--sc-badge-py); padding-left: var(--sc-badge-px); padding-right: var(--sc-badge-px); min-height: calc(var(--sc-badge-px) * 2); border: var(--sc-badge-border); } /*TYPES*/ :host([type="primary"]) { --sc-badge-color: var(--sc-primary-content); --sc-badge-bg: var(--sc-primary); } :host([type="warning"]) { --sc-badge-color: var(--sc-warning-content); --sc-badge-bg: var(--sc-warning); } :host([type="danger"]) { --sc-badge-color: var(--sc-danger-content); --sc-badge-bg: var(--sc-danger); } :host([type="info"]) { --sc-badge-color: var(--sc-info-content); --sc-badge-bg: var(--sc-info); } :host([type="success"]) { --sc-badge-color: var(--sc-success-content); --sc-badge-bg: var(--sc-success); } :host([type="neutral"]) { --sc-badge-color: var(--sc-base); --sc-badge-bg: var(--sc-base-content); } /*SIZE*/ :host { font-size: var(--sc-badge-fs); gap: var(--sc-badge-gap); } :host([size="xs"]) { --sc-badge-fs: 0.68rem; --sc-badge-gap: 0.35em; } :host([size="sm"]) { --sc-badge-fs: 0.85rem; --sc-badge-gap: 0.35em; } :host([size="lg"]) { --sc-badge-line-height: 1.2; --sc-badge-fs: 1.25rem; --sc-badge-gap: 0.5em; } :host([size="xl"]) { --sc-badge-line-height: 1.2; --sc-badge-fs: 1.5rem; --sc-badge-gap: 0.5em; } /*OUTLINE*/ :host([variant="outline"][type]) { border-width: var(--sc-badge-border-with) !important; border-color: var(--sc-badge-bg); color: var(--sc-badge-bg); background: transparent; } :host([variant="outline"][type="default"]) { border-color: var(--sc-base-400); color: var(--sc-base-500); background: transparent; } /*GHOST*/ :host([variant="ghost"][type]) { color: var(--sc-badge-bg); background: transparent; padding: 0; } :host([variant="ghost"][type="default"]) { color: var(--sc-badge-color); background: transparent; }`],r$d([e$b({type:String,reflect:!0})],Badge.prototype,"type",2),r$d([e$b({type:String,reflect:!0})],Badge.prototype,"variant",2),r$d([e$b({type:String,reflect:!0})],Badge.prototype,"size",2),Badge=r$d([n$j(b)],Badge);try{customElements.define(b,Badge)}catch{}class r$c{static fixBlankLink(O){const B="electron",D=typeof require>"u"?null:require(B);typeof D&&O.target=="_blank"&&O.addEventListener("click",()=>{D==null||D.shell.openExternal(O.href)})}}var d$f=Object.defineProperty,f$b=Object.getOwnPropertyDescriptor,o$7=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$b(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$f(O,B,U),U};const p$a="sonic-link";let Link=class extends s$9{constructor(){super(...arguments),this.href="",this._location="",this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(q){this._location=q,a$j.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(a$j.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){a$j.offChange(this),super.disconnectedCallback()}set target(q){this._target=q,r$c.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(q){q.preventDefault(),a$j.changeFromComponent(this)}render(){return this.href?$$2`<a href="${this.href}" target="${l$i(this.target)}" @click="${this.pushState?this.handlePushState:null}"><slot></slot></a>`:$$2`<slot></slot>`}};Link.styles=[r$o`a { color: inherit; text-decoration: none; display:contents; }`],o$7([e$b({type:String})],Link.prototype,"href",2),o$7([e$b({type:String})],Link.prototype,"autoActive",2),o$7([e$b({type:String})],Link.prototype,"target",1),o$7([e$b({type:Boolean})],Link.prototype,"pushState",2),Link=o$7([n$j(p$a)],Link);try{customElements.define(p$a,Link)}catch{}var p$9=Object.defineProperty,l$f=Object.getOwnPropertyDescriptor,s$3=(q,O,B,D)=>{for(var U=D>1?void 0:D?l$f(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$9(O,B,U),U};const i$g="sonic-progress";let Progress=class extends s$9{constructor(){super(...arguments),this.max=100,this.type="default",this.size="md"}render(){return $$2`<progress value="${l$i(this.value)}" max="${this.max}"></progress><div class="slot-container"><slot></slot><slot name="remaining"></slot></div>`}};Progress.styles=[r$o`:host { --sc-progress-bg: var(--sc-input-bg, var(--sc-base-100, #f5f5f5)); --sc-progress-color: var(--sc-base-content, #1f2937); --sc-progress-height: .6rem; --sc-progress-fs: 1rem; --sc-progress-fw: 500; --sc-progress-rounded: var(--sc-rounded-lg); display: block; line-height: 1.2; font-weight:var(--sc-progress-fw); font-size:var(--sc-progress-fs); color:var(--sc-progress-color); } progress { position: relative; width: 100%; -webkit-appearance: none; appearance: none; overflow: hidden; border:none; height: var(--sc-progress-height); border-radius: var(--sc-progress-rounded); background-color: var(--sc-progress-bg); color: var(--sc-progress-color); } progress::-moz-progress-bar { background-color: var(--sc-progress-color); border-radius: var(--sc-progress-rounded); } progress:not([value])::-moz-progress-bar { background-color: var(--sc-progress-bg); } progress::-webkit-progress-bar { background-color: var(--sc-progress-bg); } progress::-webkit-progress-value { background-color: var(--sc-progress-color); border-radius: var(--sc-progress-rounded); } /* Indeterminate */ progress:indeterminate:after { background-color: var(--sc-progress-color); content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 33.333333%; border-radius: var(--sc-progress-rounded); animation: progress-loading 3s infinite ease-in-out; } @keyframes progress-loading { 50% { left: 107%; } } /* COLOR TYPES */ :host([type="warning"]) { --sc-progress-color: var(--sc-warning); } :host([type="danger"]) { --sc-progress-color: var(--sc-danger); } :host([type="info"]) { --sc-progress-color: var(--sc-info); } :host([type="success"]) { --sc-progress-color: var(--sc-success); } /* SIZES */ :host([size="xs"]) { --sc-progress-height:.25rem; --sc-progress-fs: 0.68rem; } :host([size="sm"]) { --sc-progress-height:.4rem; --sc-progress-fs: 0.85rem; } :host([size="lg"]) { --sc-progress-height:1rem; --sc-progress-fs: 1.25rem; } :host([size="xl"]) { --sc-progress-height:1.5rem; --sc-progress-fs: 1.5rem; } slot[name="remaining"] { font-weight:var(--sc-font-weight-base); color:var(--sc-base-400); font-size:.85em; margin-top:.5em; } .slot-container { display:flex; justify-content: space-between; gap:.5em; }`],s$3([e$b({type:Number})],Progress.prototype,"value",2),s$3([e$b({type:Number})],Progress.prototype,"max",2),s$3([e$b({type:String,reflect:!0})],Progress.prototype,"type",2),s$3([e$b({type:String,reflect:!0})],Progress.prototype,"size",2),Progress=s$3([n$j(i$g)],Progress);try{customElements.define(i$g,Progress)}catch{}const formControl=r$o`* { box-sizing: border-box; } :host { --sc-input-height: var(--sc-form-height, 2.5em); --sc-input-border-with: var(--sc-form-border-width, 0.1rem); --sc-input-border: var(--sc-input-border-with) solid var(--sc-input-border-color, var(--sc-base-300, #aaa)); --sc-input-color: var(--sc-base-content, #1f2937); --sc-item-rounded-tr: var(--sc-input-rounded, var(--sc-rounded)); --sc-item-rounded-tl: var(--sc-input-rounded, var(--sc-rounded)); --sc-item-rounded-bl: var(--sc-input-rounded, var(--sc-rounded)); --sc-item-rounded-br: var(--sc-input-rounded, var(--sc-rounded)); --sc-input-ff: inherit; --sc-input-py: 0.6em; --sc-input-px: 1.15em; --sc-input-prefix-color: var(--sc-input-color); --sc-input-prefix-bg: var(--sc-input-bg); --sc-input-prefix-border-color: var(--sc-input-border-color); --sc-input-suffix-color: var(--sc-input-color); --sc-input-suffix-bg: var(--sc-input-bg); --sc-input-suffix-border-color: var(--sc-input-border-color); --sc-label-fs: var(--sc-input-fs); --sc-label-fw: normal; } .form-element { display: block; flex-grow: 1; width: 100%; line-height: 1.1; color: var(--sc-input-color); border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl); font-family: var(--sc-input-ff); background-color: var(--sc-input-bg, var(--sc-base, #fff)); border: var(--sc-input-border); width: 100%; font-size: var(--sc-input-fs); padding-top: var(--sc-input-py); padding-bottom: var(--sc-input-py); padding-left: var(--sc-input-px); padding-right: var(--sc-input-px); min-height: var(--sc-input-height); } label { font-size: var(--sc-label-fs); font-weight: var(--sc-label-fw); line-height: 1.2; } .form-control { display: flex; width: 100%; } /*Suffix*/ :host(:not([inlineContent])) .has-suffix slot[name="suffix"], :host(:not([inlineContent])) .has-prefix slot[name="prefix"] { min-width: var(--sc-input-height); box-sizing: border-box; display: flex; align-items: center; justify-content: center; line-height: 1.1; flex-shrink: 0; padding-left: calc(-1 * var(--sc-input-px)); padding-right: calc(-1 * var(--sc-input-px)); } :host(:not([inlineContent])) slot[name="prefix"] { border-radius: var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl); background-color: var(--sc-input-prefix-bg); color: var(--sc-input-prefix-color); border: var(--sc-input-border-with) solid var(--sc-input-prefix-border-color); margin-right: calc(-1 * var(--sc-input-border-with)); } :host(:not([inlineContent])) slot[name="suffix"] { border-radius: 0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0; background-color: var(--sc-input-suffix-bg); color: var(--sc-input-suffix-color); border: var(--sc-input-border-with) solid var(--sc-input-suffix-border-color); margin-left: calc(-1 * var(--sc-input-border-with)); } :host(:not([inlineContent])) .has-prefix .form-element { border-top-left-radius: 0; border-bottom-left-radius: 0; } :host(:not([inlineContent])) .has-suffix .form-element { border-top-right-radius: 0; border-bottom-right-radius: 0; } /*InlineCONTENT */ :host([inlineContent]) { --sc-input-py: 0; } :host([inlineContent]) .form-element { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2em; } /*Disabled */ :host([disabled]) .form-element-container { cursor: not-allowed; } /*SIZE*/ :host { --sc-input-fs: 1rem; } :host([size="xs"]) { --sc-input-fs: 0.75rem; } :host([size="sm"]) { --sc-input-fs: 0.85rem; } :host([size="lg"]) { --sc-input-fs: 1.2rem; } :host([variant="ghost"]) .form-element { --sc-input-bg: transparent; } /*ERROR*/ :host([error]) { --sc-input-border-color: var(--sc-danger); } :host :not(select):not(textarea):not([value=""]):not(:focus):invalid { --sc-input-color: var(--sc-danger); } /*Disbaled*/ :host([disabled]) .form-element { pointer-events: none; background-color: var(--sc-base-100); border-color: transparent; color: var(--sc-base-400); } /*PLACEHOLDER*/ ::placeholder { color: inherit; opacity: 0.45; } :focus::placeholder { opacity: 0; } /*HOVER*/ :host(:not([disabled])) .form-element:hover, .form-element:focus-visible, .form-element:focus { filter: brightness(0.97); outline: none; } .form-label { margin-bottom: 0.22em; display: block; } .form-description { color: var(--sc-base-400); font-size: 0.85em; margin-top: 0.2em; display: block; } .form-element > slot, .form-element .form-element { all: unset !important; } /*Textarea scrollbar*/ textarea::-webkit-scrollbar { width: 0.4rem; } textarea::-webkit-scrollbar-track { width: 0.4rem; } textarea::-webkit-scrollbar-thumb { background-color: var(--sc-base-500); width: 0.4rem; border-radius: var(--sc-rounded); } textarea::-webkit-scrollbar { width: 0.4rem; } textarea::-webkit-scrollbar-track { width: 0.4rem; } /*Utilitaires*/ .hidden { display: none; } .contents { display: contents; }`;var s$2=Object.defineProperty,d$e=Object.getOwnPropertyDescriptor,l$e=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$e(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&s$2(O,B,U),U};const m$b=q=>{class O extends q{constructor(...D){super(),this.type="text",this.tabindex=null,this.autocomplete=null}validateFormElement(){var U;const D=(U=this.shadowRoot)==null?void 0:U.querySelector("input");!D||D.checkValidity()||(this.getFormPublisher().isFormValid=!1,D.reportValidity())}}return l$e([e$b({type:String})],O.prototype,"type",2),l$e([e$b({type:String})],O.prototype,"tabindex",2),l$e([e$b({type:String})],O.prototype,"autocomplete",2),O};/**
110
+ */const o$9=e$9(class extends i$n{constructor(q){if(super(q),q.type!==t$8.CHILD)throw Error("templateContent can only be used in child bindings")}render(q){return this.vt===q?b$6:(this.vt=q,document.importNode(q.content,!0))}});var c$e=Object.defineProperty,d$k=Object.getOwnPropertyDescriptor,s$6=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$k(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$e(O,B,U),U};const a$f="sonic-subscriber";let SonicSubscriber=class extends L$1(s$a){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}render(){return $$2`<slot></slot>`}};SonicSubscriber=s$6([n$j(a$f)],SonicSubscriber);try{customElements.define(a$f,SonicSubscriber)}catch{}var v$4=Object.defineProperty,k$1=Object.getOwnPropertyDescriptor,n$d=(q,O,B,D)=>{for(var U=D>1?void 0:D?k$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&v$4(O,B,U),U};const P$1="sonic-list";let List=class extends L(L$1(T$2(s$a))){constructor(){super(...arguments),this.itemPropertyMap=null,this.templateKey="template",this.idKey="id"}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isDefaultLoaderEnabled=!1,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}renderLoadingState(){return this.templateParts.skeleton?o$9(this.templateParts.skeleton):$$2`<sonic-loader mode="inline"></sonic-loader>`}renderNoResultState(){return $$2`<div class="sonic-no-result-container"><sonic-icon name="emoji-puzzled" size="lg"></sonic-icon><span class="sonic-no-result-text">${this.props}</span></div>`}formatProps(){let q=this.props,O=this.hasAttribute("extractValues");return Array.isArray(q)||(O?q=Object.entries(q).map(([B,D])=>({key:B,value:D})):q=[q]),q}render(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!a$p.isObject(this.props))return $$2`<div></div>`;let q=this.formatProps();if(q.length==0&&this.templateParts["no-item"])return o$9(this.templateParts["no-item"]);let O=this.templateList.length,B=-1,D=this.hasAttribute("extractValues");return $$2`${c$k(q,(U,W)=>U[this.idKey]||W,(U,W)=>{let K=U[this.templateKey],Y=K&&this.templateParts[K];B++,Y&&(B=-1);let Z=D?U.key:W,G=this.publisher[Z];return G._key_=Z+"",U&&$$2`<sonic-subscriber debug="${l$j(this.defferedDebug)}" .bindPublisher="${function(){return G}}" .propertyMap="${l$j(this.itemPropertyMap)}" dataProvider="${this.dataProvider}/list-item/${W}">${o$9(Y?this.templateParts[K]:this.templateList[B%O])}</sonic-subscriber>`})}`}};List.styles=[r$k`.sonic-no-result-container { color: var(--sc-base-400); font-size: 1.65rem; } sonic-icon { margin-right: 0.25em; } span { vertical-align: middle; }`],n$d([e$b({type:Object})],List.prototype,"itemPropertyMap",2),n$d([e$b({type:String})],List.prototype,"templateKey",2),n$d([e$b({type:String})],List.prototype,"idKey",2),List=n$d([n$j(P$1)],List);try{customElements.define(P$1,List)}catch{}var T=Object.defineProperty,v$3=Object.getOwnPropertyDescriptor,s$5=(q,O,B,D)=>{for(var U=D>1?void 0:D?v$3(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&T(O,B,U),U};const P="sonic-queue";let e$5=class extends L$1(s$a){constructor(){super(...arguments),this.templates=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.targetRequestDuration=500,this.limit=5,this.offset=0,this.filteredFields="",this.filterPublisher=null,this.filterTimeoutId=void 0,this.dataProviderExpression="",this.idKey="id",this.currentScrollPosition=void 0,this.listDataProviders=[]}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider="sonic-queue-"+e$5.instanceCounter++),this.configFilter(),super.connectedCallback(),this.key=this.getAttribute("key"),this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.next()}configFilter(){var O;let q=this.getAncestorAttributeValue("dataFilterProvider");!q||(this.filterPublisher=PublisherManager$1.getInstance().get(q),(O=this.filterPublisher)==null||O.onInternalMutation(()=>{var B;Object.keys((B=this.filterPublisher)==null?void 0:B.get()).length!=0&&this.updateFilteredContent()}))}updateFilteredContent(){for(let q of this.listDataProviders)PublisherManager$1.delete(q);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(()=>{this.props=null,this.next()},250)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(q){var G,st;let O=this.offset;const B=new Date().getTime()-this.lastRequestTime;if(q&&(!q.detail.isFirstLoad||!q.detail.props.length||this.dataProviderExpression.indexOf("$offset")==-1))return;if(!Array.isArray(this.props))this.props=[];else{const tt=this.props,Q=tt[tt.length-1];O=parseInt(Q.offset.toString())+parseInt(Q.limit.toString())}B>0&&q&&(this.limit=Math.round(this.limit/B*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let D=this.dataProviderExpression.replace("$offset",O+"").replace("$limit",this.limit+""),U=D.split("?"),W=U.shift(),K=new URLSearchParams(U.join("?")),Y=(G=this.filterPublisher)==null?void 0:G.get(),Z=this.filteredFields.split(" ");for(let tt in Y)this.filteredFields&&!Z.includes(tt)||K.set(tt,Y[tt]);D=W+"?"+K.toString(),this.listDataProviders.push(D),this.currentScrollPosition=(st=document.scrollingElement)==null?void 0:st.scrollTop,this.props=[...this.props,{id:K.toString()+"/"+this.props.length,dataProvider:D,offset:O,limit:this.limit}],this.lastRequestTime=new Date().getTime()}render(){return this.currentScrollPosition&&window.requestAnimationFrame(()=>{document.scrollingElement&&(document.scrollingElement.scrollTop=this.currentScrollPosition),this.currentScrollPosition=void 0}),Array.isArray(this.props)?$$2`${c$k(this.props,q=>q.id,(q,O)=>{var D;let B=O==0?this.templates:(D=this.templates)==null?void 0:D.filter(U=>U.getAttribute("data-value")!="no-item");return $$2`<sonic-list fetch .itemPropertyMap="${this.itemPropertyMap}" debug="${l$j(this.defferedDebug)}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${q.dataProvider}" idKey="${this.idKey}" .templates="${B}"></sonic-list>`})}`:w$1}};e$5.instanceCounter=0,s$5([e$b({type:Array})],e$5.prototype,"templates",2),s$5([e$b({type:Object})],e$5.prototype,"itemPropertyMap",2),s$5([e$b()],e$5.prototype,"targetRequestDuration",2),s$5([e$b()],e$5.prototype,"limit",2),s$5([e$b()],e$5.prototype,"offset",2),s$5([e$b()],e$5.prototype,"filteredFields",2),s$5([e$b({type:String})],e$5.prototype,"dataProviderExpression",2),s$5([e$b({type:String})],e$5.prototype,"idKey",2),e$5=s$5([n$j(P)],e$5);try{customElements.define(P,e$5)}catch{}var g$4=Object.defineProperty,f$c=Object.getOwnPropertyDescriptor,o$8=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$c(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&g$4(O,B,U),U};const p$f="sonic-submit";let Submit=class extends L$1(s$a){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.api=null}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",()=>this.submit()),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",q=>{q.key==="Enter"&&this.submit()}),super.connectedCallback(),this.api=new a$q(this.getApiConfiguration())}async submit(){var Z,G,st,tt,Q;const q=PublisherManager$1.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(q.isFormValid=!0,q.invalidate(),!q.isFormValid.get())return;this.publisher.disabled=!0,q.isFormValid;let O=((Z=this.getAttribute("method"))==null?void 0:Z.toLocaleLowerCase())||"post",B=q.get();delete B.isFormValid;let D=PublisherManager$1.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get(),U=null,W=this.getAncestorAttributeValue("dataProvider"),K=this.endPoint||W;switch(Loader.show(),O){case"put":U=await((G=this.api)==null?void 0:G.put(K,B,D));break;case"delete":U=await((st=this.api)==null?void 0:st.delete(K,B,D));break;case"get":U=await((tt=this.api)==null?void 0:tt.get(K));break;default:U=await((Q=this.api)==null?void 0:Q.post(K,B,D));break}Loader.hide(),U||(U={messages:[{content:"Network Error",status:"error"}]});let Y=this.getAncestorAttributeValue("clearedDataOnSuccess");Y&&Y.split(" ").forEach(rt=>PublisherManager$1.get(rt).set({})),this.submitResultKey&&(U=a$p.traverse(U,this.submitResultKey.split("."),!0)),PublisherManager$1.getInstance().get(this.getAncestorAttributeValue("submitResultDataProvider")).set(U),this.publisher.disabled=!1}render(){return $$2`<div ?data-disabled="${this.disabled}"><slot></slot></div>`}};Submit.styles=r$k`[data-disabled]{ opacity: 0.3; pointer-events: none; user-select: none; }`,o$8([e$b({type:String})],Submit.prototype,"submitResultKey",2),o$8([e$b({type:Boolean})],Submit.prototype,"disabled",2),o$8([e$b({type:String})],Submit.prototype,"endPoint",2),Submit=o$8([n$j(p$f)],Submit);try{customElements.define(p$f,Submit)}catch{}var commonjsGlobal=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},urlPattern={exports:{}};(function(q,O){var B=[].slice;(function(D,U){return O!==null?q.exports=U():D.UrlPattern=U()})(commonjsGlobal,function(){var D,U,W,K,Y,Z,G,st,tt,Q,rt,ot,nt,ht,ct;return tt=function(X){return X.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},G=function(X,J){var et,it,at;for(at=[],et=-1,it=X.length;++et<it;)at=at.concat(J(X[et]));return at},ht=function(X,J){var et,it,at;for(at="",et=-1,it=X.length;++et<it;)at+=J(X[et]);return at},nt=function(X){return new RegExp(X.toString()+"|").exec("").length-1},rt=function(X,J){var et,it,at,lt,dt;for(lt={},et=-1,at=X.length;++et<at;)it=X[et],dt=J[et],dt!=null&&(lt[it]!=null?(Array.isArray(lt[it])||(lt[it]=[lt[it]]),lt[it].push(dt)):lt[it]=dt);return lt},D={},D.Result=function(X,J){this.value=X,this.rest=J},D.Tagged=function(X,J){this.tag=X,this.value=J},D.tag=function(X,J){return function(et){var it,at;if(it=J(et),it!=null)return at=new D.Tagged(X,it.value),new D.Result(at,it.rest)}},D.regex=function(X){return function(J){var et,it;if(et=X.exec(J),et!=null)return it=et[0],new D.Result(it,J.slice(it.length))}},D.sequence=function(){var X;return X=1<=arguments.length?B.call(arguments,0):[],function(J){var et,it,at,lt,dt,pt;for(et=-1,it=X.length,pt=[],lt=J;++et<it;){if(at=X[et],dt=at(lt),dt==null)return;pt.push(dt.value),lt=dt.rest}return new D.Result(pt,lt)}},D.pick=function(){var X,J;return X=arguments[0],J=2<=arguments.length?B.call(arguments,1):[],function(et){var it,at;if(at=D.sequence.apply(D,J)(et),at!=null)return it=at.value,at.value=it[X],at}},D.string=function(X){var J;return J=X.length,function(et){if(et.slice(0,J)===X)return new D.Result(X,et.slice(J))}},D.lazy=function(X){var J;return J=null,function(et){return J==null&&(J=X()),J(et)}},D.baseMany=function(X,J,et,it,at){var lt,dt,pt,ft;for(pt=at,ft=et?"":[];!(J!=null&&(lt=J(pt),lt!=null)||(dt=X(pt),dt==null));)et?ft+=dt.value:ft.push(dt.value),pt=dt.rest;if(!(it&&ft.length===0))return new D.Result(ft,pt)},D.many1=function(X){return function(J){return D.baseMany(X,null,!1,!0,J)}},D.concatMany1Till=function(X,J){return function(et){return D.baseMany(X,J,!0,!0,et)}},D.firstChoice=function(){var X;return X=1<=arguments.length?B.call(arguments,0):[],function(J){var et,it,at,lt;for(et=-1,it=X.length;++et<it;)if(at=X[et],lt=at(J),lt!=null)return lt}},ot=function(X){var J;return J={},J.wildcard=D.tag("wildcard",D.string(X.wildcardChar)),J.optional=D.tag("optional",D.pick(1,D.string(X.optionalSegmentStartChar),D.lazy(function(){return J.pattern}),D.string(X.optionalSegmentEndChar))),J.name=D.regex(new RegExp("^["+X.segmentNameCharset+"]+")),J.named=D.tag("named",D.pick(1,D.string(X.segmentNameStartChar),D.lazy(function(){return J.name}))),J.escapedChar=D.pick(1,D.string(X.escapeChar),D.regex(/^./)),J.static=D.tag("static",D.concatMany1Till(D.firstChoice(D.lazy(function(){return J.escapedChar}),D.regex(/^./)),D.firstChoice(D.string(X.segmentNameStartChar),D.string(X.optionalSegmentStartChar),D.string(X.optionalSegmentEndChar),J.wildcard))),J.token=D.lazy(function(){return D.firstChoice(J.wildcard,J.optional,J.named,J.static)}),J.pattern=D.many1(D.lazy(function(){return J.token})),J},st={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},Z=function(X,J){if(Array.isArray(X))return ht(X,function(et){return Z(et,J)});switch(X.tag){case"wildcard":return"(.*?)";case"named":return"(["+J+"]+)";case"static":return tt(X.value);case"optional":return"(?:"+Z(X.value,J)+")?"}},Y=function(X,J){return J==null&&(J=st.segmentValueCharset),"^"+Z(X,J)+"$"},K=function(X){if(Array.isArray(X))return G(X,K);switch(X.tag){case"wildcard":return["_"];case"named":return[X.value];case"static":return[];case"optional":return K(X.value)}},Q=function(X,J,et,it){var at,lt,dt,pt;if(it==null&&(it=!1),pt=X[J],pt==null){if(it)throw new Error("no values provided for key `"+J+"`");return}if(at=et[J]||0,lt=Array.isArray(pt)?pt.length-1:0,at>lt){if(it)throw new Error("too few values provided for key `"+J+"`");return}return dt=Array.isArray(pt)?pt[at]:pt,it&&(et[J]=at+1),dt},W=function(X,J,et){var it,at;if(Array.isArray(X)){for(it=-1,at=X.length;++it<at;)if(W(X[it],J,et))return!0;return!1}switch(X.tag){case"wildcard":return Q(J,"_",et,!1)!=null;case"named":return Q(J,X.value,et,!1)!=null;case"static":return!1;case"optional":return W(X.value,J,et)}},ct=function(X,J,et){if(Array.isArray(X))return ht(X,function(it){return ct(it,J,et)});switch(X.tag){case"wildcard":return Q(J,"_",et,!0);case"named":return Q(J,X.value,et,!0);case"static":return X.value;case"optional":return W(X.value,J,et)?ct(X.value,J,et):""}},U=function(X,J){var et,it,at,lt,dt;if(X instanceof U){this.isRegex=X.isRegex,this.regex=X.regex,this.ast=X.ast,this.names=X.names;return}if(this.isRegex=X instanceof RegExp,!(typeof X=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=X,J!=null){if(!Array.isArray(J))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(et=nt(this.regex),J.length!==et)throw new Error("regex contains "+et+" groups but array of group names contains "+J.length);this.names=J}return}if(X==="")throw new Error("argument must not be the empty string");if(dt=X.replace(/\s+/g,""),dt!==X)throw new Error("argument must not contain whitespace");if(it={escapeChar:(J!=null?J.escapeChar:void 0)||st.escapeChar,segmentNameStartChar:(J!=null?J.segmentNameStartChar:void 0)||st.segmentNameStartChar,segmentNameCharset:(J!=null?J.segmentNameCharset:void 0)||st.segmentNameCharset,segmentValueCharset:(J!=null?J.segmentValueCharset:void 0)||st.segmentValueCharset,optionalSegmentStartChar:(J!=null?J.optionalSegmentStartChar:void 0)||st.optionalSegmentStartChar,optionalSegmentEndChar:(J!=null?J.optionalSegmentEndChar:void 0)||st.optionalSegmentEndChar,wildcardChar:(J!=null?J.wildcardChar:void 0)||st.wildcardChar},lt=ot(it),at=lt.pattern(X),at==null)throw new Error("couldn't parse pattern");if(at.rest!=="")throw new Error("could only partially parse pattern");this.ast=at.value,this.regex=new RegExp(Y(this.ast,it.segmentValueCharset)),this.names=K(this.ast)},U.prototype.match=function(X){var J,et;return et=this.regex.exec(X),et==null?null:(J=et.slice(1),this.names?rt(this.names,J):J)},U.prototype.stringify=function(X){if(X==null&&(X={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(X!==Object(X))throw new Error("argument must be an object or undefined");return ct(this.ast,X,{})},U.escapeForRegex=tt,U.concatMap=G,U.stringConcatMap=ht,U.regexGroupCount=nt,U.keysAndValuesToObject=rt,U.P=D,U.newParser=ot,U.defaultOptions=st,U.astNodeToRegexString=Y,U.astNodeToNames=K,U.getParam=Q,U.astNodeContainsSegmentsForProvidedParams=W,U.stringify=ct,U})})(urlPattern,urlPattern.exports);var f$b=urlPattern.exports,u$4=Object.defineProperty,g$3=Object.getOwnPropertyDescriptor,l$h=(q,O,B,D)=>{for(var U=D>1?void 0:D?g$3(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&u$4(O,B,U),U};const p$e="sonic-router";let SonicRouter=class extends L$1(T$2(s$a)){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",a$k.onChange(this),super.connectedCallback()}disconnectedCallback(){a$k.offChange(this),super.disconnectedCallback()}set location(q){this._location=q,this.requestUpdate()}get location(){return this._location}render(){let q=[];for(let O of this.templatePartsList){let B=O.getAttribute(this.templateValueAttribute),D=new RegExp(B),U=new f$b(B);D.test(this.location)?q.push(O):U.match(this.location)&&(O.setAttribute("mode","patternMatching"),q.push(O))}return $$2`${c$k(q,(O,B)=>B+new Date().getTime(),O=>{var B;if(O.title&&(document.title=O.title),O.hasAttribute("dataProviderExpression")){let D="",U=O.getAttribute("dataProviderExpression");if(O.getAttribute("mode")=="patternMatching"){const W=new f$b(O.getAttribute(this.templateValueAttribute));D=new f$b(U).stringify(W.match(this.location))}else{const W=new RegExp(O.getAttribute(this.templateValueAttribute));let K=(this.location+"").match(W);K&&(D=(B=K.shift())==null?void 0:B.replace(W,U))}return $$2`<div style="display:contents" dataProvider="${D}">${o$9(O)}</div>`}return o$9(O)})}`}};l$h([e$b()],SonicRouter.prototype,"location",1),SonicRouter=l$h([n$j(p$e)],SonicRouter);try{customElements.define(p$e,SonicRouter)}catch{}var c$d=Object.defineProperty,h$8=Object.getOwnPropertyDescriptor,r$a=(q,O,B,D)=>{for(var U=D>1?void 0:D?h$8(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$d(O,B,U),U};const p$d="sonic-redirect";let SonicRedirect=class extends L$1(s$a){constructor(){super(...arguments),this.udpateCallBack=()=>{}}connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(!this.props)return;let q=this.getAttribute("onData").split("."),O=a$p.traverse(this.props,q);O&&!(a$p.isObject(O)&&O)&&a$k.changeFromComponent(this)}};SonicRedirect=r$a([n$j(p$d)],SonicRedirect);try{customElements.define(p$d,SonicRedirect)}catch{}var b$2=Object.defineProperty,A=Object.getOwnPropertyDescriptor,d$j=(q,O,B,D)=>{for(var U=D>1?void 0:D?A(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&b$2(O,B,U),U};const g$2="sonic-states";let SonicStates=class extends L$1(T$2(s$a)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=null}connectedCallback(){if(super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;let q=this.statePath.split(".");for(let O of q)this.statePublisher=this.statePublisher[O];this.onAssign=O=>{this.state=O,this.requestUpdate()},this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher.offAssign(this.onAssign),super.disconnectedCallback()}render(){let q=[],O=this.state;(!Array.isArray(O)&&a$p.isObject(O)||O===void 0)&&(O="");for(let B of this.templatePartsList){let D=B.getAttribute(this.templateValueAttribute),U=O;if(this.inverted&&(U=D,D=O),D==""&&(D=this.inverted?".*?":"^$"),new RegExp(D).test(U))q.push(B),B.removeAttribute("mode");else{let W=new f$b(D);W.names.length>0&&W.match(U)&&(B.setAttribute("mode","patternMatching"),q.push(B))}}return $$2`${c$k(q,(B,D)=>D+new Date().getTime(),B=>{var D;if(B.title&&(document.title=B.title),B.hasAttribute("dataProviderExpression")){let U=B.getAttribute("dataProviderExpression"),W="",K=O,Y=B.getAttribute(this.templateValueAttribute);if(this.inverted&&(K=Y,Y=O),Y==""&&(Y=this.inverted?"*":"^$"),B.getAttribute("mode")=="patternMatching"){const Z=new f$b(Y);W=new f$b(U).stringify(Z.match(K))}else{const Z=new RegExp(Y);let G=(K+"").match(Z);G&&(W=(D=G.shift())==null?void 0:D.replace(Z,U))}return $$2`<div style="display:contents" dataProvider="${W}">${o$9(B)}</div>`}return o$9(B)})}`}};d$j([e$b()],SonicStates.prototype,"state",2),d$j([e$b({type:Boolean,reflect:!0})],SonicStates.prototype,"inverted",2),SonicStates=d$j([n$j(g$2)],SonicStates);try{customElements.define(g$2,SonicStates)}catch{}var a$e=Object.defineProperty,d$i=Object.getOwnPropertyDescriptor,n$c=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$i(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&a$e(O,B,U),U};const R="sonic-scope";let SonicScope=class extends s$a{createRenderRoot(){return this}render(){return $$2`<slot></slot>`}};SonicScope=n$c([n$j(R)],SonicScope);var p$c=Object.defineProperty,f$a=Object.getOwnPropertyDescriptor,a$d=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$a(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$c(O,B,U),U};const h$7="sonic-example";let SonicComponent=class extends L$1(s$a){constructor(){super(...arguments),this.text="Example"}render(){return $$2`${this.text}`}};a$d([e$b()],SonicComponent.prototype,"text",2),SonicComponent=a$d([n$j(h$7)],SonicComponent);const coreVariables=r$k`:host { /* polices*/ --sc-font-family-base: "Inter var", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --sc-font-weight-base: 400; --sc-font-style-base: normal; --sc-headings-font-family: var(--sc-font-family-base); --sc-headings-font-style: var(--sc-font-style-base); --sc-headings-line-height: 1.1; --sc-headings-font-weight: 700; --sc-headings-text-transform: none; /* Button*/ --sc-btn-font-weight: var(--sc-font-weight-base); --sc-btn-font-family: var(--sc-font-family-base); --sc-btn-font-style: var(--sc-font-style-base); /* ROUNDED*/ --sc-rounded-sm: calc(var(--sc-rounded) * 0.5); --sc-rounded: 0.35rem; --sc-rounded-md: calc(var(--sc-rounded) * 1.8); --sc-rounded-lg: calc(var(--sc-rounded) * 3.5); --sc-rounded-xl: calc(var(--sc-rounded) * 7); --sc-btn-rounded: calc(var(--sc-rounded) * 1.2); /* Placeholder */ --sc-placeholder-bg: rgba(17, 24, 39, 0.05); /* Images*/ --sc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --sc-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --sc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --sc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --sc-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); /* formulaires*/ --sc-border-width: max(1px, 0.085rem); --sc-form-border-width: var(--sc-border-width); --sc-input-bg: var(--sc-base-100); --sc-input-border-color: var(--sc-input-bg); --sc-input-rounded: calc(var(--sc-rounded) * 1.2); /*Couleurs -- textes sur images*/ --sc-contrast-content: #fff; --sc-contrast: #0f172a; /*Scrollbar*/ --sc-scrollbar-bg : var(--sc-base-400); }`,light=r$k`:host { /*Boutons*/ --sc-primary: var(--sc-base-800); --sc-info: #2563eb; --sc-danger: #f43f5e; --sc-warning: #f97316; --sc-success: #14b8a6; --sc-primary-content: var(--sc-base); --sc-info-content: var(--sc-base); --sc-danger-content: var(--sc-base); --sc-warning-content: var(--sc-base); --sc-success-content: var(--sc-base); /*Bases*/ --sc-base: #fff; --sc-base-50: #f8fafc; --sc-base-100: #f1f5f9; --sc-base-200: #e2e8f0; --sc-base-300: #cbd5e1; --sc-base-400: #94a3b8; --sc-base-500: #64748b; --sc-base-600: #475569; --sc-base-700: #334155; --sc-base-800: #1e293b; --sc-base-900: #0f172a; --sc-base-content: var(--sc-base-700); /*formulaires*/ --sc-input-bg: var(--sc-base-100); --sc-input-color: var(--sc-base-content); }`,a$c=r$k`--sc-primary: var(--sc-dark-primary, var(--sc-base-700)); --sc-info: var(--sc-dark-info, #3abff8); --sc-danger: var(--sc-dark-danger, #f87272); --sc-warning: var(--sc-dark-warning, #fbbd23); --sc-success: var(--sc-dark-success, #36d399); --sc-primary-content: var(--sc-dark-primary-content, #002b3d); --sc-info-content: var(--sc-dark-info-content, #002b3d); --sc-danger-content: var(--sc-dark-danger-content, #382800); --sc-warning-content: var(--sc-dark-warning-content, #382800); --sc-success-content: var(--sc-dark-success-content, #003320); --sc-base: var(--sc-dark-base, #1d2634); --sc-base-50: var(--sc-dark-base-50, #1f2937); --sc-base-100: var(--sc-dark-base-100, #252C36); --sc-base-200: var(--sc-dark-base-200, #2c3543); --sc-base-300: var(--sc-dark-base-300, #38414e); --sc-base-400: var(--sc-dark-base-400, #515964); --sc-base-500: var(--sc-dark-base-500, #828891); --sc-base-600: var(--sc-dark-base-600, #b4b8be); --sc-base-700: var(--sc-dark-base-700, #cdd0d5); --sc-base-800: var(--sc-dark-base-800, #d9dce0); --sc-base-900: var(--sc-dark-base-900, #e5e7eb); --sc-base-content: var(--sc-dark-base-content, #e5e7eb);`,dark=r$k`:host([theme="dark"]) { ${a$c} } @media (prefers-color-scheme: dark) { :host([theme="auto"]) { ${a$c} } }`;var y$3=Object.defineProperty,h$6=Object.getOwnPropertyDescriptor,a$b=(q,O,B,D)=>{for(var U=D>1?void 0:D?h$6(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&y$3(O,B,U),U};const C="sonic-theme";let Theme=class extends s$a{constructor(){super(...arguments),this.theme="light"}connectedCallback(){super.connectedCallback(),window.addEventListener("message",q=>this.receiveMessage(q),!1),this.postCSSVars()}postCSSVars(){const q=document.styleSheets,O=q.length;let B=[];for(let D=0;D<O;D++){let U=q[D];U.href&&(U.href.includes("googleapis")||U.href.includes("typekit.net"))&&B.push(U.href)}document.querySelectorAll("iframe").forEach(D=>{var U;return(U=D.contentWindow)==null?void 0:U.postMessage({type:"SonicTheme",variables:this.getCssVariables(),fonts:B},"*")})}receiveMessage(q){let O=q.data;!O.type||O.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){let q=[],O=[...Theme.styles.map(U=>U.styleSheet),...Array.from(document.styleSheets)];for(let U of O)try{let W=U==null?void 0:U.cssRules;for(let K of W)if(K.style)for(let Y of K.style)q.includes(Y)||Y.indexOf("--sc")!==0||q.push(Y)}catch{}let B=window.getComputedStyle(this),D={};return q.forEach(U=>D[U]=B.getPropertyValue(U)),D}render(){return $$2`<slot></slot>`}};Theme.styles=[light,dark,coreVariables,r$k`:host([background]) { display: block !important; background: var(--sc-base) !important; } :host([color]) { color: var(--sc-base-content); } :host([font]) { font-family: var(--sc-font-family-base); font-weight: var(--sc-font-weight-base); font-style: var(--sc-font-style-base); }`],a$b([e$b({type:String,reflect:!0})],Theme.prototype,"theme",2),Theme=a$b([n$j(C)],Theme);var n$b=Object.defineProperty,i$f=Object.getOwnPropertyDescriptor,r$9=(q,O,B,D)=>{for(var U=D>1?void 0:D?i$f(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&n$b(O,B,U),U};const b$1="sonic-badge";let Badge=class extends s$a{constructor(){super(...arguments),this.type="default",this.variant="default",this.size="md"}render(){return $$2`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};Badge.styles=[r$k`:host { --sc-badge-gap: 0.3em; --sc-badge-py: 0.15em; --sc-badge-px: 0.66em; --sc-badge-fs: 1rem; --sc-badge-color: var(--sc-base-content, #1f2937); --sc-badge-bg: var(--sc-base-200, #e5e7eb); --sc-badge-border-with: var(--sc-form-border-width, 0.1rem); --sc-badge-border-color: transparent; --sc-badge-border: var(--sc-badge-border-with) solid var(--sc-badge-border-color); --sc-badge-rounded: 9999px; --sc-badge-line-height: 1.15; --sc-badge-fw: var(--sc-font-weight-base); display: inline-flex; align-items:center; box-sizing: border-box; line-height: var(--sc-badge-line-height); border-radius: var(--sc-badge-rounded); background: var(--sc-badge-bg); color: var(--sc-badge-color); font-family: var(--sc-badge-ff, var(--sc-font-family-base, inherit)); font-weight: var(--sc-badge-fw); padding-top: var(--sc-badge-py); padding-bottom: var(--sc-badge-py); padding-left: var(--sc-badge-px); padding-right: var(--sc-badge-px); min-height: calc(var(--sc-badge-px) * 2); border: var(--sc-badge-border); } /*TYPES*/ :host([type="primary"]) { --sc-badge-color: var(--sc-primary-content); --sc-badge-bg: var(--sc-primary); } :host([type="warning"]) { --sc-badge-color: var(--sc-warning-content); --sc-badge-bg: var(--sc-warning); } :host([type="danger"]) { --sc-badge-color: var(--sc-danger-content); --sc-badge-bg: var(--sc-danger); } :host([type="info"]) { --sc-badge-color: var(--sc-info-content); --sc-badge-bg: var(--sc-info); } :host([type="success"]) { --sc-badge-color: var(--sc-success-content); --sc-badge-bg: var(--sc-success); } :host([type="neutral"]) { --sc-badge-color: var(--sc-base); --sc-badge-bg: var(--sc-base-content); } /*SIZE*/ :host { font-size: var(--sc-badge-fs); gap: var(--sc-badge-gap); } :host([size="xs"]) { --sc-badge-fs: 0.68rem; --sc-badge-gap: 0.35em; } :host([size="sm"]) { --sc-badge-fs: 0.85rem; --sc-badge-gap: 0.35em; } :host([size="lg"]) { --sc-badge-line-height: 1.2; --sc-badge-fs: 1.25rem; --sc-badge-gap: 0.5em; } :host([size="xl"]) { --sc-badge-line-height: 1.2; --sc-badge-fs: 1.5rem; --sc-badge-gap: 0.5em; } /*OUTLINE*/ :host([variant="outline"][type]) { border-width: var(--sc-badge-border-with) !important; border-color: var(--sc-badge-bg); color: var(--sc-badge-bg); background: transparent; } :host([variant="outline"][type="default"]) { border-color: var(--sc-base-400); color: var(--sc-base-500); background: transparent; } /*GHOST*/ :host([variant="ghost"][type]) { color: var(--sc-badge-bg); background: transparent; padding: 0; } :host([variant="ghost"][type="default"]) { color: var(--sc-badge-color); background: transparent; }`],r$9([e$b({type:String,reflect:!0})],Badge.prototype,"type",2),r$9([e$b({type:String,reflect:!0})],Badge.prototype,"variant",2),r$9([e$b({type:String,reflect:!0})],Badge.prototype,"size",2),Badge=r$9([n$j(b$1)],Badge);try{customElements.define(b$1,Badge)}catch{}class r$8{static fixBlankLink(O){const B="electron",D=typeof require>"u"?null:require(B);typeof D&&O.target=="_blank"&&O.addEventListener("click",()=>{D==null||D.shell.openExternal(O.href)})}}var d$h=Object.defineProperty,f$9=Object.getOwnPropertyDescriptor,o$7=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$9(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$h(O,B,U),U};const p$b="sonic-link";let Link=class extends s$a{constructor(){super(...arguments),this.href="",this._location="",this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(q){this._location=q,a$k.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(a$k.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){a$k.offChange(this),super.disconnectedCallback()}set target(q){this._target=q,r$8.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(q){q.preventDefault(),a$k.changeFromComponent(this)}render(){return this.href?$$2`<a href="${this.href}" target="${l$j(this.target)}" @click="${this.pushState?this.handlePushState:null}"><slot></slot></a>`:$$2`<slot></slot>`}};Link.styles=[r$k`a { color: inherit; text-decoration: none; display:contents; }`],o$7([e$b({type:String})],Link.prototype,"href",2),o$7([e$b({type:String})],Link.prototype,"autoActive",2),o$7([e$b({type:String})],Link.prototype,"target",1),o$7([e$b({type:Boolean})],Link.prototype,"pushState",2),Link=o$7([n$j(p$b)],Link);try{customElements.define(p$b,Link)}catch{}var p$a=Object.defineProperty,l$g=Object.getOwnPropertyDescriptor,s$4=(q,O,B,D)=>{for(var U=D>1?void 0:D?l$g(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$a(O,B,U),U};const i$e="sonic-progress";let Progress=class extends s$a{constructor(){super(...arguments),this.max=100,this.type="default",this.size="md"}render(){return $$2`<progress value="${l$j(this.value)}" max="${this.max}"></progress><div class="slot-container"><slot></slot><slot name="remaining"></slot></div>`}};Progress.styles=[r$k`:host { --sc-progress-bg: var(--sc-input-bg, var(--sc-base-100, #f5f5f5)); --sc-progress-color: var(--sc-base-content, #1f2937); --sc-progress-height: .6rem; --sc-progress-fs: 1rem; --sc-progress-fw: 500; --sc-progress-rounded: var(--sc-rounded-lg); display: block; line-height: 1.2; font-weight:var(--sc-progress-fw); font-size:var(--sc-progress-fs); color:var(--sc-progress-color); } progress { position: relative; width: 100%; -webkit-appearance: none; appearance: none; overflow: hidden; border:none; height: var(--sc-progress-height); border-radius: var(--sc-progress-rounded); background-color: var(--sc-progress-bg); color: var(--sc-progress-color); } progress::-moz-progress-bar { background-color: var(--sc-progress-color); border-radius: var(--sc-progress-rounded); } progress:not([value])::-moz-progress-bar { background-color: var(--sc-progress-bg); } progress::-webkit-progress-bar { background-color: var(--sc-progress-bg); } progress::-webkit-progress-value { background-color: var(--sc-progress-color); border-radius: var(--sc-progress-rounded); } /* Indeterminate */ progress:indeterminate:after { background-color: var(--sc-progress-color); content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 33.333333%; border-radius: var(--sc-progress-rounded); animation: progress-loading 3s infinite ease-in-out; } @keyframes progress-loading { 50% { left: 107%; } } /* COLOR TYPES */ :host([type="warning"]) { --sc-progress-color: var(--sc-warning); } :host([type="danger"]) { --sc-progress-color: var(--sc-danger); } :host([type="info"]) { --sc-progress-color: var(--sc-info); } :host([type="success"]) { --sc-progress-color: var(--sc-success); } /* SIZES */ :host([size="xs"]) { --sc-progress-height:.25rem; --sc-progress-fs: 0.68rem; } :host([size="sm"]) { --sc-progress-height:.4rem; --sc-progress-fs: 0.85rem; } :host([size="lg"]) { --sc-progress-height:1rem; --sc-progress-fs: 1.25rem; } :host([size="xl"]) { --sc-progress-height:1.5rem; --sc-progress-fs: 1.5rem; } slot[name="remaining"] { font-weight:var(--sc-font-weight-base); color:var(--sc-base-400); font-size:.85em; margin-top:.5em; } .slot-container { display:flex; justify-content: space-between; gap:.5em; }`],s$4([e$b({type:Number})],Progress.prototype,"value",2),s$4([e$b({type:Number})],Progress.prototype,"max",2),s$4([e$b({type:String,reflect:!0})],Progress.prototype,"type",2),s$4([e$b({type:String,reflect:!0})],Progress.prototype,"size",2),Progress=s$4([n$j(i$e)],Progress);try{customElements.define(i$e,Progress)}catch{}const formControl=r$k`* { box-sizing: border-box; } :host { --sc-input-height: var(--sc-form-height, 2.5em); --sc-input-border-width: var(--sc-form-border-width, 0.1rem); --sc-input-color: var(--sc-base-content, #1f2937); --sc-item-rounded-tr: var(--sc-input-rounded, var(--sc-rounded)); --sc-item-rounded-tl: var(--sc-input-rounded, var(--sc-rounded)); --sc-item-rounded-bl: var(--sc-input-rounded, var(--sc-rounded)); --sc-item-rounded-br: var(--sc-input-rounded, var(--sc-rounded)); --sc-input-ff: inherit; --sc-input-py: 0.6em; --sc-input-px: 1.15em; --sc-input-prefix-color: var(--sc-input-color); --sc-input-prefix-bg: var(--sc-input-bg); --sc-input-prefix-border-color: var(--sc-input-border-color); --sc-input-suffix-color: var(--sc-input-color); --sc-input-suffix-bg: var(--sc-input-bg); --sc-input-suffix-border-color: var(--sc-input-border-color); --sc-label-fs: var(--sc-input-fs); --sc-label-fw: normal; } .form-element { display: block; flex-grow: 1; width: 100%; line-height: 1.1; color: var(--sc-input-color); border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl); font-family: var(--sc-input-ff); background-color: var(--sc-input-bg, var(--sc-base, #fff)); border: var(--sc-input-border-width) solid var(--sc-input-border-color, var(--sc-base-300, #aaa)); width: 100%; font-size: var(--sc-input-fs); padding-top: var(--sc-input-py); padding-bottom: var(--sc-input-py); padding-left: var(--sc-input-px); padding-right: var(--sc-input-px); min-height: var(--sc-input-height); } label { font-size: var(--sc-label-fs); font-weight: var(--sc-label-fw); line-height: 1.2; } .form-control { display: flex; width: 100%; } /*Suffix*/ :host(:not([inlineContent])) .has-suffix slot[name="suffix"], :host(:not([inlineContent])) .has-prefix slot[name="prefix"] { min-width: var(--sc-input-height); box-sizing: border-box; display: flex; align-items: center; justify-content: center; line-height: 1.1; flex-shrink: 0; padding-left: calc(-1 * var(--sc-input-px)); padding-right: calc(-1 * var(--sc-input-px)); } :host(:not([inlineContent])) slot[name="prefix"] { border-radius: var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl); background-color: var(--sc-input-prefix-bg); color: var(--sc-input-prefix-color); border: var(--sc-input-border-width) solid var(--sc-input-prefix-border-color); margin-right: calc(-1 * var(--sc-input-border-width)); } :host(:not([inlineContent])) slot[name="suffix"] { border-radius: 0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0; background-color: var(--sc-input-suffix-bg); color: var(--sc-input-suffix-color); border: var(--sc-input-border-width) solid var(--sc-input-suffix-border-color); margin-left: calc(-1 * var(--sc-input-border-width)); } :host(:not([inlineContent])) .has-prefix .form-element { border-top-left-radius: 0; border-bottom-left-radius: 0; } :host(:not([inlineContent])) .has-suffix .form-element { border-top-right-radius: 0; border-bottom-right-radius: 0; } /*InlineCONTENT */ :host([inlineContent]) { --sc-input-py: 0; } :host([inlineContent]) .form-element { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2em; } /*Disabled */ :host([disabled]) .form-element-container { cursor: not-allowed; } /*SIZE*/ :host { --sc-input-fs: 1rem; } :host([size="xs"]) { --sc-input-fs: 0.75rem; } :host([size="sm"]) { --sc-input-fs: 0.85rem; } :host([size="lg"]) { --sc-input-fs: 1.2rem; } :host([variant="ghost"]) .form-element { --sc-input-bg: transparent; } /*Disbaled*/ :host([disabled]) .form-element { pointer-events: none; background-color: var(--sc-base-100); border-color: transparent; color: var(--sc-base-400); } /*PLACEHOLDER*/ ::placeholder { color: inherit; opacity: 0.45; } :focus::placeholder { opacity: 0; } /*HOVER*/ :host(:not([disabled])) .form-element:hover, .form-element:focus-visible, .form-element:focus { filter: brightness(0.97); outline: none; } .form-label { margin-bottom: 0.22em; display: block; } .form-description { color: var(--sc-base-400); font-size: 0.85em; margin-top: 0.2em; display: block; } .form-element > slot, .form-element .form-element { all: unset !important; } /*Utilitaires*/ .hidden { display: none; } .contents { display: contents; } /*ERROR*/ :host([error]) { --sc-input-border-color: var(--sc-danger); } :host input:visited{ display:none; } :host([touched]) :not(:focus):invalid { --sc-input-border-color: var(--sc-danger); --sc-input-color: var(--sc-danger); } :host([touched]) :not(:focus):invalid + .select-chevron{ --sc-input-color: var(--sc-danger); } /*VALID*/ :host([touched]) :not([value=""]):not(:focus):valid { --sc-input-border-color: var(--sc-success); --sc-input-color: var(--sc-success); } :host([touched]) :not(:focus):valid + .select-chevron{ --sc-input-color: var(--sc-success); }`;var s$3=Object.defineProperty,d$g=Object.getOwnPropertyDescriptor,l$f=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$g(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&s$3(O,B,U),U};const m$b=q=>{class O extends q{constructor(...D){super(),this.type="text",this.tabindex=null,this.autocomplete=null}validateFormElement(){var U;const D=(U=this.shadowRoot)==null?void 0:U.querySelector("input");!D||D.checkValidity()||(this.getFormPublisher().isFormValid=!1,D.reportValidity())}}return l$f([e$b({type:String})],O.prototype,"type",2),l$f([e$b({type:String})],O.prototype,"tabindex",2),l$f([e$b({type:String})],O.prototype,"autocomplete",2),O};/**
111
111
  * @license
112
112
  * Copyright 2018 Google LLC
113
113
  * SPDX-License-Identifier: BSD-3-Clause
114
- */const o$6=e$9(class extends i$o{constructor(q){var O;if(super(q),q.type!==t$8.ATTRIBUTE||q.name!=="class"||((O=q.strings)===null||O===void 0?void 0:O.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(q){return" "+Object.keys(q).filter(O=>q[O]).join(" ")+" "}update(q,[O]){var B,D;if(this.et===void 0){this.et=new Set,q.strings!==void 0&&(this.st=new Set(q.strings.join(" ").split(/\s/).filter(W=>W!=="")));for(const W in O)O[W]&&!(!((B=this.st)===null||B===void 0)&&B.has(W))&&this.et.add(W);return this.render(O)}const U=q.element.classList;this.et.forEach(W=>{W in O||(U.remove(W),this.et.delete(W))});for(const W in O){const K=!!O[W];K===this.et.has(W)||((D=this.st)===null||D===void 0?void 0:D.has(W))||(K?(U.add(W),this.et.add(W)):(U.remove(W),this.et.delete(W)))}return b$5}});var p$8=Object.defineProperty,g$1=Object.getOwnPropertyDescriptor,e$4=(q,O,B,D)=>{for(var U=D>1?void 0:D?g$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$8(O,B,U),U};const c$e="sonic-input";let Input=class extends m$b(V(L$1(s$9))){constructor(){super(...arguments),this.size="",this.list=null,this.placeholder="",this.readonly=!1,this.pattern=null,this.min=null,this.max=null,this.step=null,this.minlength=null,this.maxlength=null,this.label="",this.description="",this.inlineContent=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}updated(){var q,O,B,D;this.hasLabel=!!(this.label||((q=this.slotLabelNodes)==null?void 0:q.length)),this.hasDescription=!!(this.description||((O=this.slotDescriptionNodes)==null?void 0:O.length)),this.hasSuffix=!!((B=this.slotSuffixNodes)!=null&&B.length),this.hasPrefix=!!((D=this.slotPrefixNodes)!=null&&D.length)}onSlotChange(){this.requestUpdate()}render(){const q={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return $$2`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?this.label:""}<slot name="label" @slotchange="${this.onSlotChange}"></slot></label><div class="form-control ${o$6(q)}"><div class="${this.inlineContent?"form-element form-element-wrapper":"contents"}"><slot name="prefix" @slotchange="${this.onSlotChange}"></slot><input id="form-element" part="input" class="form-element input" type="${this.type}" @input="${this.handleChange}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" list="${l$i(this.list)}" autofocus="${l$i(this.autofocus)}" required="${l$i(this.required)}" tabindex="${l$i(this.tabindex)}" pattern="${l$i(this.pattern)}" min="${l$i(this.min)}" max="${l$i(this.max)}" step="${l$i(this.step)}" minlength="${l$i(this.minlength)}" maxlength="${l$i(this.maxlength)}" placeholder="${this.placeholder}" .name="${this.name}" .value="${this.value}" autocomplete="${l$i(this.autocomplete)}"><slot name="suffix" @slotchange="${this.onSlotChange}"></slot></div></div><slot name="description" class="${this.hasDescription?"form-description":"hidden"}">${this.description?$$2`${this.description}`:""}</slot>`}};Input.styles=[formControl],e$4([e$b({type:String})],Input.prototype,"size",2),e$4([e$b({type:String})],Input.prototype,"list",2),e$4([e$b({type:String})],Input.prototype,"placeholder",2),e$4([e$b({type:Boolean})],Input.prototype,"readonly",2),e$4([e$b({type:String})],Input.prototype,"pattern",2),e$4([e$b({type:String})],Input.prototype,"min",2),e$4([e$b({type:String})],Input.prototype,"max",2),e$4([e$b({type:String})],Input.prototype,"step",2),e$4([e$b({type:String})],Input.prototype,"minlength",2),e$4([e$b({type:String})],Input.prototype,"maxlength",2),e$4([e$b({type:String})],Input.prototype,"label",2),e$4([e$b({type:String})],Input.prototype,"description",2),e$4([e$b({type:Boolean,reflect:!0})],Input.prototype,"inlineContent",2),e$4([o$c({slot:"label"})],Input.prototype,"slotLabelNodes",2),e$4([o$c({slot:"description"})],Input.prototype,"slotDescriptionNodes",2),e$4([o$c({slot:"suffix"})],Input.prototype,"slotSuffixNodes",2),e$4([o$c({slot:"prefix"})],Input.prototype,"slotPrefixNodes",2),e$4([t$a()],Input.prototype,"hasDescription",2),e$4([t$a()],Input.prototype,"hasLabel",2),e$4([t$a()],Input.prototype,"hasSuffix",2),e$4([t$a()],Input.prototype,"hasPrefix",2),Input=e$4([n$j(c$e)],Input);try{customElements.define(c$e,Input)}catch{}var h$5=Object.defineProperty,m$a=Object.getOwnPropertyDescriptor,t$5=(q,O,B,D)=>{for(var U=D>1?void 0:D?m$a(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&h$5(O,B,U),U};const p$7="sonic-checkbox";let Checkbox=class extends d$l(m$b(V(L$1(s$9)))){constructor(){super(...arguments),this.iconName="check",this.description="",this.label="",this.hasDescription=!1}updated(){var q;this.hasDescription=!!(this.description||((q=this.slotDescriptionNodes)==null?void 0:q.length))}connectedCallback(){this.type="checkbox",super.connectedCallback()}render(){return $$2`<label class="checkbox-container ${this.disabled?"disabled":""}"><span class="icon-container"><input type="${this.type}" @change="${this.handleChange}" .disabled="${l$i(this.disabled)}" .required="${l$i(this.required)}" .checked="${l$i(this.checked)}" .name="${this.name}" .value="${this.value}" autofocus="${l$i(this.autofocus)}"><sonic-icon name="${this.iconName}" class="sc-input-icon"></sonic-icon></span><div class="checkbox-text">${this.label?this.label:""}<slot></slot><slot name="description" class="${this.hasDescription?"description":"hidden"}">${this.description?$$2`${this.description}`:""}<slot></slot></slot></div></label>`}};Checkbox.styles=[r$o`* { box-sizing: border-box; } .checkbox-container { min-height: 1.4em; display: flex; gap: 0.5em; line-height: 1.2; align-items: flex-start; } .icon-container { position: relative; display: flex; flex-shrink: 0; } input { appearance: none; flex-shrink: 0; height: 1.5em; width: 1.5em; display: block; cursor: pointer; border-radius: 0.25em; transition: 0.2s; outline: none; margin: 0; background-color: var(--sc-base-200); } input:focus, :host(:not([disabled])) input:active { box-shadow: 0 0 0 2px var(--sc-primary); } :host(:not([disabled])) label { cursor: pointer; } sonic-icon { line-height: 0; position: absolute; top: 50%; left: 50%; transform: translateX(-50%) translateY(-50%) scale(0); transition: transform 0.2s ease-in-out; color: var(--sc-primary-content); } /* .checkbox-text { align-self: center; } */ .description { color: var(--sc-base-400); font-size: 0.85em; margin-top: 0.2em; display: block; } /*Active */ input:checked, input[checked="true"] { background: var(--sc-primary); } input:checked + sonic-icon, input[checked="true"] + sonic-icon { transform: translateX(-50%) translateY(-50%) scale(1); } /*DISABLED */ .disabled { cursor: not-allowed; } .disabled input { opacity: 0.4; } .disabled .checkbox-text { opacity: 0.6; } ::slotted(a) { color: inherit; text-decoration: underline !important; } ::slotted(a:hover) { text-decoration: none !important; } /*Utils */ .hidden { display: none; }`],t$5([e$b({type:String})],Checkbox.prototype,"iconName",2),t$5([e$b({type:String})],Checkbox.prototype,"description",2),t$5([e$b({type:String})],Checkbox.prototype,"label",2),t$5([o$c({slot:"description"})],Checkbox.prototype,"slotDescriptionNodes",2),t$5([e$b({type:Boolean})],Checkbox.prototype,"hasDescription",2),Checkbox=t$5([n$j(p$7)],Checkbox);try{customElements.define(p$7,Checkbox)}catch{}var d$d=Object.defineProperty,h$4=Object.getOwnPropertyDescriptor,n$9=(q,O,B,D)=>{for(var U=D>1?void 0:D?h$4(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$d(O,B,U),U};const l$d="sonic-radio";let Radio=class extends Checkbox{constructor(){super()}connectedCallback(){this.radio=!0,super.connectedCallback(),this.type="radio"}};Radio.styles=[Checkbox.styles,r$o`:host input { border-radius: 50%; } :host sonic-icon { border-radius: 50%; overflow: hidden; background-color:var(--sc-primary-content); line-height:0; display:block; font-size:0; height:10px; width:10px; }`],Radio=n$9([n$j(l$d)],Radio);try{customElements.define(l$d,Radio)}catch{}var m$9=Object.defineProperty,c$d=Object.getOwnPropertyDescriptor,t$4=(q,O,B,D)=>{for(var U=D>1?void 0:D?c$d(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$9(O,B,U),U};const d$c="sonic-select";let Select=class extends V(L$1(s$9)){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=null,this.size="",this.selectSize=null,this._options=[],this._value="",this.label="",this.description="",this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(q){this._options=q,!this.value&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}get value(){return this._value}set value(q){!q||this._value!=q&&(this._value=q,this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?PublisherManager$1.getInstance().get(this.formDataProvider)[this._name]=q:this.publisher&&(this.publisher[this._name]=q),this.requestUpdate())}connectedCallback(){super.connectedCallback();let q=this.querySelectorAll("option");q.length>0&&(this.options=Array.from(q).map(O=>({value:O.value,wording:O.text})))}updated(){var q,O,B,D;this.hasLabel=!!(this.label||((q=this.slotLabelNodes)==null?void 0:q.length)),this.hasDescription=!!(this.description||((O=this.slotDescriptionNodes)==null?void 0:O.length)),this.hasSuffix=!!((B=this.slotSuffixNodes)!=null&&B.length),this.hasPrefix=!!((D=this.slotPrefixNodes)!=null&&D.length)}onSlotChange(){this.requestUpdate()}validateFormElement(){var O;const q=(O=this.shadowRoot)==null?void 0:O.querySelector("select");!q||q.checkValidity()||(this.getFormPublisher().isFormValid=!1,q.reportValidity())}render(){const q={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return $$2`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?this.label:""}<slot name="label" @slotchange="${this.onSlotChange}"></slot></label><div class="form-control ${o$6(q)}"><slot name="prefix" @slotchange="${this.onSlotChange}"></slot><div class="form-select-wrapper"><select @change="${this.handleChange}" disabled="${l$i(this.multiple)}" size="${l$i(this.selectSize)}" autofocus="${l$i(this.autofocus)}" required="${l$i(this.required)}" .value="${this.value}" class="form-element">${c$m(this.options,O=>O[this.valueKey],O=>{const B=this.value==O[this.valueKey]?"selected":null;return $$2`<option selected="${l$i(B)}" value="${O[this.valueKey]}">${O[this.wordingKey]}</option>`})}<slot></slot></select><sonic-icon name="nav-arrow-down" size="${this.size}"></sonic-icon></div><slot name="suffix" @slotchange="${this.onSlotChange}"></slot></div><slot name="description" class="${this.hasDescription?"form-description":"hidden"}">${this.description?$$2`${this.description}`:""}</slot>`}};Select.styles=[formControl,r$o`.form-element { appearance: none; padding-right: 2.5em; } .form-select-wrapper { position: relative; width: 100%; } sonic-icon { position: absolute; right: 1em; top: 50%; pointer-events: none; transform: translateY(-50%); } option { padding: 0.1rem 5rem; color: var(--sc-base-content); background: var(--sc-base); }`],t$4([e$b({type:String})],Select.prototype,"valueKey",2),t$4([e$b({type:String})],Select.prototype,"wordingKey",2),t$4([e$b({type:Boolean})],Select.prototype,"multiple",2),t$4([e$b({type:String})],Select.prototype,"size",2),t$4([e$b({type:String})],Select.prototype,"selectSize",2),t$4([e$b({type:Array})],Select.prototype,"options",1),t$4([e$b()],Select.prototype,"value",1),t$4([e$b({type:String})],Select.prototype,"label",2),t$4([e$b({type:String})],Select.prototype,"description",2),t$4([o$c({slot:"label"})],Select.prototype,"slotLabelNodes",2),t$4([o$c({slot:"description"})],Select.prototype,"slotDescriptionNodes",2),t$4([o$c({slot:"suffix"})],Select.prototype,"slotSuffixNodes",2),t$4([o$c({slot:"prefix"})],Select.prototype,"slotPrefixNodes",2),t$4([t$a()],Select.prototype,"hasDescription",2),t$4([t$a()],Select.prototype,"hasLabel",2),t$4([t$a()],Select.prototype,"hasSuffix",2),t$4([t$a()],Select.prototype,"hasPrefix",2),Select=t$4([n$j(d$c)],Select);try{customElements.define(d$c,Select)}catch{}var c$c=Object.defineProperty,u$2=Object.getOwnPropertyDescriptor,t$3=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$2(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$c(O,B,U),U};const p$6="sonic-textarea";let Textarea=class extends m$b(V(L$1(s$9))){constructor(){super(...arguments),this.size="",this.rows="",this.cols="",this.maxlength="",this.minlength="",this.wrap=null,this.readonly=null,this.placeholder="",this.label="",this.description="",this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.slotClasses={}}updated(){var q,O,B,D;this.hasLabel=!!(this.label||((q=this.slotLabelNodes)==null?void 0:q.length)),this.hasDescription=!!(this.description||((O=this.slotDescriptionNodes)==null?void 0:O.length)),this.hasSuffix=!!((B=this.slotSuffixNodes)!=null&&B.length),this.hasPrefix=!!((D=this.slotPrefixNodes)!=null&&D.length)}onSlotChange(){this.requestUpdate()}validateFormElement(){var O;const q=(O=this.shadowRoot)==null?void 0:O.querySelector("textarea");!q||q.checkValidity()||(this.getFormPublisher().isFormValid=!1,q.reportValidity())}render(){return $$2`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?this.label:""}<slot name="label" @slotchange="${this.onSlotChange}"></slot></label><div class="form-control"><textarea @input="${this.handleChange}" ?disabled="${this.disabled}" ?required="${this.required}" autocomplete="${l$i(this.autocomplete)}" autofocus="${l$i(this.autofocus)}" rows="${l$i(this.rows)}" cols="${l$i(this.cols)}" maxlength="${l$i(this.maxlength)}" minlength="${l$i(this.minlength)}" ?readonly="${this.readonly}" spellcheck="${l$i(this.spellcheck)}" wrap="${l$i(this.wrap)}" class="form-element textarea" placeholder="${this.placeholder}">
115
- ${this.value}</textarea></div><slot name="description" class="${this.hasDescription?"form-description":"hidden"}">${this.description?$$2`${this.description}`:""}</slot>`}};Textarea.styles=[formControl,r$o`textarea { font-size: inherit; }`],t$3([e$b({type:String})],Textarea.prototype,"size",2),t$3([e$b({type:String})],Textarea.prototype,"rows",2),t$3([e$b({type:String})],Textarea.prototype,"cols",2),t$3([e$b({type:String})],Textarea.prototype,"maxlength",2),t$3([e$b({type:String})],Textarea.prototype,"minlength",2),t$3([e$b({type:String})],Textarea.prototype,"wrap",2),t$3([e$b({type:Boolean})],Textarea.prototype,"readonly",2),t$3([e$b({type:String})],Textarea.prototype,"placeholder",2),t$3([e$b({type:String})],Textarea.prototype,"label",2),t$3([e$b({type:String})],Textarea.prototype,"description",2),t$3([o$c({slot:"label"})],Textarea.prototype,"slotLabelNodes",2),t$3([o$c({slot:"description"})],Textarea.prototype,"slotDescriptionNodes",2),t$3([o$c({slot:"suffix"})],Textarea.prototype,"slotSuffixNodes",2),t$3([o$c({slot:"prefix"})],Textarea.prototype,"slotPrefixNodes",2),t$3([t$a()],Textarea.prototype,"hasDescription",2),t$3([t$a()],Textarea.prototype,"hasLabel",2),t$3([t$a()],Textarea.prototype,"hasSuffix",2),t$3([t$a()],Textarea.prototype,"hasPrefix",2),t$3([e$b()],Textarea.prototype,"slotClasses",2),Textarea=t$3([n$j(p$6)],Textarea);try{customElements.define(p$6,Textarea)}catch{}var c$b=Object.defineProperty,f$a=Object.getOwnPropertyDescriptor,o$5=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$a(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$b(O,B,U),U};const a$a="sonic-fieldset";let Fieldset=class extends L$1(s$9){constructor(){super(...arguments),this.disabled=!1,this.form=""}render(){return $$2`<fieldset form="${l$i(this.form)}" ?disabled="${this.disabled}"><slot></slot></fieldset>`}};Fieldset.styles=[r$o`:host { --sc-fieldset-mt: 0; --sc-fieldset-mb: 1rem; --sc-fieldset-border-color: var(--sc-base-200); --sc-fieldset-border-width: var(--sc-form-border-width); margin-top: var(--sc-fieldset-mt); margin-bottom: var(--sc-fieldset-mb); display: block; border: var(--sc-fieldset-border-width) solid var(--sc-fieldset-border-color) !important; padding: 1.8rem 1.25rem; border-radius: var(--sc-rounded-lg); } fieldset { all: unset; display: contents; } ::slotted(sonic-legend) { margin-bottom: 1.5rem; display: block; }`],o$5([e$b({type:Boolean,reflect:!0})],Fieldset.prototype,"disabled",2),o$5([e$b({type:String})],Fieldset.prototype,"form",2),Fieldset=o$5([n$j(a$a)],Fieldset);try{customElements.define(a$a,Fieldset)}catch{}var c$a=Object.defineProperty,a$9=Object.getOwnPropertyDescriptor,n$8=(q,O,B,D)=>{for(var U=D>1?void 0:D?a$9(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$a(O,B,U),U};let LegendDescription=class extends s$9{render(){return $$2`<slot></slot>`}};LegendDescription.styles=[r$o`:host { color: var(--sc-neutral-500); font-size: 1.25rem; line-height: 1.2; display: block; font-weight: var(--sc-font-weight-base); font-style: var(--sc-font-style-base); margin-top: 0.25em; }`],LegendDescription=n$8([n$j("sonic-legend-description")],LegendDescription);try{customElements.define("sonic-legend-description",LegendDescription)}catch{}var d$b=Object.defineProperty,h$3=Object.getOwnPropertyDescriptor,i$f=(q,O,B,D)=>{for(var U=D>1?void 0:D?h$3(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$b(O,B,U),U};const g="sonic-legend";let Legend=class extends s$9{constructor(){super(...arguments),this.description="",this.label=""}render(){return $$2`<legend part="legend">${this.iconName?$$2`<div class="icon"><sonic-icon name="${this.iconName}" prefix="${l$i(this.iconPrefix)}" library="${l$i(this.iconLibray)}"></sonic-icon></div>`:""}<div class="legend-content">${this.label} ${this.description?$$2`<sonic-legend-description>${this.description}</sonic-legend-description>`:""}<slot></slot></div><slot name="suffix"></slot></legend>`}};Legend.styles=[r$o`:host { --sc-legend-font-size: 1.75rem; --sc-legend-font-weight: var(--sc-font-weight-base); --sc-legend-font-style: var(--sc-headings-font-style); --sc-legend-family: var(--sc-headings-font-family); --sc-legend-line-height: var(--sc-headings-line-height); display: flex; width: 100%; } legend { font-size: var(--sc-legend-font-size); font-weight: var(--sc-legend-font-weight); font-style: var(--sc-legend-font-style); font-family: var(--sc-legend-font-family); line-height: var(--sc-legend-line-height); padding: 0; display: flex; width: 100%; align-items: flex-start; gap: 0.5em; } slot[name="suffix"] { display: block; margin-left: auto; flex-shrink: 0; } .legend-content { flex-grow: 1; }`],i$f([e$b({type:String})],Legend.prototype,"description",2),i$f([e$b({type:String})],Legend.prototype,"label",2),i$f([e$b({type:String})],Legend.prototype,"iconName",2),i$f([e$b({type:String})],Legend.prototype,"iconPrefix",2),i$f([e$b({type:String})],Legend.prototype,"iconLibray",2),Legend=i$f([n$j(g)],Legend);try{customElements.define(g,Legend)}catch{}class s$1{constructor(O,{target:B,config:D,callback:U,skipInitial:W}){this.t=!1,this.i=!1,this.callback=()=>!0,(this.h=O).addController(this),this.o=B===null||B!=null?B:this.h,this.l=D,this.t=W!=null?W:this.t,this.callback=U!=null?U:this.callback,window.ResizeObserver?this.u=new ResizeObserver(K=>{this.handleChanges(K),this.h.requestUpdate()}):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(O){this.value=this.callback(O,this.u)}hostConnected(){this.o&&this.observe(this.o)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.t&&this.i&&this.handleChanges([]),this.i=!1}observe(O){this.u.observe(O,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}}var m$8=Object.defineProperty,n$7=Object.getOwnPropertyDescriptor,l$c=(q,O,B,D)=>{for(var U=D>1?void 0:D?n$7(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$8(O,B,U),U};const c$9="sonic-form-layout";let FormLayout=class extends L$1(s$9){constructor(){super(...arguments),this._resizeController=new s$1(this,{})}render(){return $$2`<div class="${this.offsetWidth>440?"cq--md":""}"><slot></slot></div>`}};FormLayout.styles=[r$o`:host { display: block; } div { display: grid; grid-gap: 1.5rem; align-items: flex-start; } .cq--md { grid-gap: 1.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); } ::slotted(sonic-radio), ::slotted(sonic-checkbox), ::slotted(sonic-form-actions), ::slotted(sonic-divider), ::slotted(sonic-textarea) { grid-column: 1 / -1; } ::slotted(sonic-divider) { --sc-divider-my: 0; }`],FormLayout=l$c([n$j(c$9)],FormLayout);try{customElements.define(c$9,FormLayout)}catch{}var o$4=Object.defineProperty,f$9=Object.getOwnPropertyDescriptor,c$8=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$9(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&o$4(O,B,U),U};const n$6="sonic-form-actions";let FormActions=class extends s$9{render(){return $$2`<slot></slot>`}};FormActions.styles=[r$o`:host{ display:flex; gap:.3rem; }`],FormActions=c$8([n$j(n$6)],FormActions);try{customElements.define(n$6,FormActions)}catch{}var c$7=Object.defineProperty,y$2=Object.getOwnPropertyDescriptor,d$a=(q,O,B,D)=>{for(var U=D>1?void 0:D?y$2(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$7(O,B,U),U};const i$e="sonic-group";let Group=class extends s$9{updated(){const q=this.querySelectorAll("sonic-input, sonic-button"),O=q.length;O>1&&q.forEach((B,D)=>{D===0?(B.style.setProperty("--sc-item-rounded-tr","0"),B.style.setProperty("--sc-item-rounded-br","0")):D===O-1?(B.style.setProperty("--sc-item-rounded-tl","0"),B.style.setProperty("--sc-item-rounded-bl","0")):(B.style.setProperty("--sc-item-rounded-tr","0"),B.style.setProperty("--sc-item-rounded-br","0"),B.style.setProperty("--sc-item-rounded-tl","0"),B.style.setProperty("--sc-item-rounded-bl","0"))})}render(){return $$2`<slot></slot>`}};Group.styles=[r$o`:host { display: inline-flex; vertical-align: middle; } slot { width: 100%; display: flex; align-items: flex-end; }`],Group=d$a([n$j(i$e)],Group);try{customElements.define(i$e,Group)}catch{}var h$2=Object.defineProperty,l$b=Object.getOwnPropertyDescriptor,t$2=(q,O,B,D)=>{for(var U=D>1?void 0:D?l$b(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&h$2(O,B,U),U};const c$6="sonic-image";let Image=class extends s$9{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.shadow="none",this.cover=!1}render(){const q={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return $$2`<div part="image"><picture part="picture"><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style="${i$l(q)}"></picture></div>`}};Image.styles=[r$o`:host { --sc-img-radius: 0; --sc-img-bg: var(--sc-placeholder-bg); border-radius: var(--sc-img-radius); display: block; width: 100%; background: var(--sc-img-bg); } img { width: 100%; vertical-align: middle; object-fit: cover; } img[src=""] { visibility: hidden; } /*Rounded*/ :host([rounded]) { --sc-img-radius: var(--sc-rounded); overflow: hidden; } :host([rounded="sm"]) { --sc-img-radius: var(--sc-rounded-sm); } :host([rounded="md"]) { --sc-img-radius: var(--sc-rounded-md); } :host([rounded="lg"]) { --sc-img-radius: var(--sc-rounded-lg); } :host([rounded="xl"]) { --sc-img-radius: var(--sc-rounded-xl); } /*Cercle*/ :host([rounded="full"]) { --sc-img-radius: 50% !important; } :host([rounded="none"]) { --sc-img-radius: 0 !important; } /*OMBRE*/ :host([shadow]) > div, :host([shadow="md"]) > div, :host([shadow="true"]) > div { box-shadow: var(--sc-shadow); } :host([shadow="sm"]) > div { box-shadow: var(--sc-shadow-sm); } :host([shadow="none"]) > div { box-shadow: none; } :host([shadow="lg"]) > div { box-shadow: var(--sc-shadow-lg); } :host([cover]), :host([cover]) > div, :host([cover]) img { position: absolute !important; left: 0 !important; top: 0 !important; right: 0 !important; bottom: 0 !important; height: 100% !important; width: 100% !important; }`],t$2([e$b({type:String})],Image.prototype,"rounded",2),t$2([e$b({type:String})],Image.prototype,"src",2),t$2([e$b({type:String})],Image.prototype,"alt",2),t$2([e$b({type:String})],Image.prototype,"loading",2),t$2([e$b({type:String})],Image.prototype,"ratio",2),t$2([e$b({type:String})],Image.prototype,"objectPosition",2),t$2([e$b({type:String})],Image.prototype,"imageRendering",2),t$2([e$b({type:String,reflect:!0})],Image.prototype,"shadow",2),t$2([e$b({type:Boolean,reflect:!0})],Image.prototype,"cover",2),Image=t$2([n$j(c$6)],Image);try{customElements.define(c$6,Image)}catch{}var y$1=Object.defineProperty,m$7=Object.getOwnPropertyDescriptor,e$3=(q,O,B,D)=>{for(var U=D>1?void 0:D?m$7(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&y$1(O,B,U),U};const $="sonic-taxonomy";let Taxonomy=class extends s$9{constructor(){super(...arguments),this.icon={},this.taxonomy=[],this.separator=",&nbsp;",this.key="",this.type="default",this.variant="default",this.size="md"}render(){if(!this.taxonomy)return w$1;let q=this.key+"_display",O=this.taxonomy.filter(B=>B!=null&&(B[q]===!0||B[q]=="1"||!B.hasOwnProperty(q)));return O.length===0?(this.style.display="none",w$1):(this.style.removeProperty("display"),$$2`<sonic-badge type="${this.type}" variant="${this.variant}" size="${this.size}"><sonic-icon slot="prefix" name="${this.icon.name}" prefix="${this.icon.prefix}"></sonic-icon><span class="taxonomy-list">${c$m(O,B=>B[this.key+"_id"],B=>$$2`<span>${B[this.key+"_name"]}</span><span class="sonic-taxonomy-separator">${o$a(this.separator)}</span>`)}</span></sonic-badge>`)}};Taxonomy.styles=r$o`:host .sonic-taxonomy-separator:last-child { display: none; } .taxonomy-list { display: flex; flex-wrap: wrap; }`,e$3([e$b({type:Object})],Taxonomy.prototype,"icon",2),e$3([e$b({type:Array})],Taxonomy.prototype,"taxonomy",2),e$3([e$b({type:String})],Taxonomy.prototype,"separator",2),e$3([e$b({type:String})],Taxonomy.prototype,"key",2),e$3([e$b({type:String,reflect:!0})],Taxonomy.prototype,"type",2),e$3([e$b({type:String,reflect:!0})],Taxonomy.prototype,"variant",2),e$3([e$b({type:String,reflect:!0})],Taxonomy.prototype,"size",2),Taxonomy=e$3([n$j($)],Taxonomy);try{customElements.define("sonic-taxonomy",Taxonomy)}catch{}var n$5=Object.defineProperty,l$a=Object.getOwnPropertyDescriptor,h$1=(q,O,B,D)=>{for(var U=D>1?void 0:D?l$a(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&n$5(O,B,U),U};const o$3="sonic-menu-item";let MenuItem=class extends Button{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="primary"),this.hasAttribute("shape")||(this.shape="block"),this.hasAttribute("align")||(this.align="left"),super.connectedCallback()}};MenuItem=h$1([n$j(o$3)],MenuItem);try{customElements.define(o$3,MenuItem)}catch{}var m$6=Object.defineProperty,p$5=Object.getOwnPropertyDescriptor,t$1=(q,O,B,D)=>{for(var U=D>1?void 0:D?p$5(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$6(O,B,U),U};const d$9="sonic-menu";let MenuItems=class extends s$9{constructor(){super(...arguments),this.size="",this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.minWidth="0",this.hasMoreElements=!1}checkIfMore(){var q;this.hasMoreElements=!!((q=this.moreElements)!=null&&q.length)}updated(q){const O=this.querySelector(".more-btn");this.size&&O&&O.setAttribute("size",this.size),this.querySelectorAll("sonic-divider").forEach(B=>{B.hasAttribute("size")||B.setAttribute("size","xs")}),super.updated(q)}mainSlotChange(){this.setChildrenSize(this.menuChildren)}setChildrenSize(q){q.forEach(O=>{this.size&&O.setAttribute("size",this.size),this.align&&O.setAttribute("align",this.align),this.direction=="row"&&O.getAttribute("shape")=="block"&&O.setAttribute("shape","default")})}render(){const q={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},O=this.direction=="row",B={display:"block",alignSelf:O?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},D={marginLeft:O?"":".55em"};return $$2`<menu part="menu" class="shadowable" style="${i$l(q)}"><slot @slotchange="${this.mainSlotChange}"></slot><sonic-pop style="${i$l(B)}" class="${this.hasMoreElements?"":"hidden"}"><sonic-menu-item style="${i$l(D)}" class="more-btn" shape="${this.moreShape}" align="center"><sonic-icon size="xl" name="${O?"more-vert":"more-horiz"}"></sonic-icon></sonic-menu-item><slot name="more" @slotchange="${this.checkIfMore}" slot="content"></slot></sonic-pop></menu>`}};MenuItems.styles=[r$o`:host { display: block; --sc-menu-gap:.15rem; } :host > menu { display: flex; border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em); margin: 0; padding: 0.35em; } .hidden { display:none !important; } /*OMBRE*/ :host([shadow]) .shadowable, :host([shadow="md"]) .shadowable, :host([shadow="true"]) .shadowable { box-shadow: var(--sc-shadow); } :host([shadow="sm"]) .shadowable { box-shadow: var(--sc-shadow-sm); } :host([shadow="lg"]) .shadowable { box-shadow: var(--sc-shadow-lg); } :host([shadow="none"]) .shadowable { box-shadow: none; }`],t$1([e$b({type:String,reflect:!0})],MenuItems.prototype,"size",2),t$1([e$b({type:String,reflect:!0})],MenuItems.prototype,"direction",2),t$1([e$b({type:String})],MenuItems.prototype,"gap",2),t$1([e$b({type:String,reflect:!0})],MenuItems.prototype,"align",2),t$1([e$b({type:String,reflect:!0})],MenuItems.prototype,"shadow",2),t$1([e$b({type:String})],MenuItems.prototype,"moreShape",2),t$1([e$b({type:String})],MenuItems.prototype,"minWidth",2),t$1([l$p({selector:"sonic-menu-item"})],MenuItems.prototype,"menuChildren",2),t$1([l$p({slot:"more",selector:"*"})],MenuItems.prototype,"moreElements",2),t$1([t$a()],MenuItems.prototype,"hasMoreElements",2),MenuItems=t$1([n$j(d$9)],MenuItems);try{customElements.define(d$9,MenuItems)}catch{}var l$9=Object.defineProperty,d$8=Object.getOwnPropertyDescriptor,n$4=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$8(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l$9(O,B,U),U};const i$d="sonic-modal-actions";let ModalActions=class extends s$9{firstUpdated(){var q;(q=this.buttons)==null||q.forEach(O=>{O.addEventListener("click",()=>{var B;O.getAttribute("hideModal")!="false"&&((B=this.closest("sonic-modal"))==null||B.hide())})})}render(){return $$2`<slot></slot>`}};ModalActions.styles=[r$o`:host { display: flex; gap: 0.5rem; margin-top: auto; padding-top: 1rem; }`],n$4([l$p({selector:"sonic-button"})],ModalActions.prototype,"buttons",2),ModalActions=n$4([n$j(i$d)],ModalActions);try{customElements.define(i$d,ModalActions)}catch{}var h=Object.defineProperty,a$8=Object.getOwnPropertyDescriptor,r$b=(q,O,B,D)=>{for(var U=D>1?void 0:D?a$8(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&h(O,B,U),U};const c$5="sonic-modal-title";let ModalTitle=class extends s$9{render(){return $$2`<slot></slot>`}};ModalTitle.styles=[r$o`:host { font-weight: bold; font-size: 1.5rem; display: block; line-height: var(--sc-headings-line-height); font-family: var(--sc-headings-font-family); }`],ModalTitle=r$b([n$j(c$5)],ModalTitle);try{customElements.define(c$5,ModalTitle)}catch{}var a$7=Object.defineProperty,f$8=Object.getOwnPropertyDescriptor,c$4=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$8(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&a$7(O,B,U),U};const i$c="sonic-modal-subtitle";let ModalSubTitle=class extends s$9{render(){return $$2`<slot></slot>`}};ModalSubTitle.styles=[r$o`:host { font-size: 1.1rem; display: block; text-transform: uppercase; line-height: var(--sc-headings-line-height); font-family: var(--sc-headings-font-family); }`],ModalSubTitle=c$4([n$j(i$c)],ModalSubTitle);try{customElements.define(i$c,ModalSubTitle)}catch{}var p$4=Object.defineProperty,a$6=Object.getOwnPropertyDescriptor,l$8=(q,O,B,D)=>{for(var U=D>1?void 0:D?a$6(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$4(O,B,U),U};const o$2="sonic-modal-content";let ModalContent=class extends s$9{render(){return $$2`<slot></slot>`}};ModalContent.styles=[r$o`:host { display: block; }`],ModalContent=l$8([n$j(o$2)],ModalContent);try{customElements.define(o$2,ModalContent)}catch{}var m$5=Object.defineProperty,l$7=Object.getOwnPropertyDescriptor,r$a=(q,O,B,D)=>{for(var U=D>1?void 0:D?l$7(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$5(O,B,U),U};const a$5="sonic-modal-close";let ModalClose=class extends s$9{render(){return $$2`<sonic-button shape="circle" variant="ghost" @click="${this.handleClick}"><sonic-icon name="cancel" size="lg"></sonic-icon></sonic-button>`}handleClick(){this.closest("sonic-modal").hide()}};ModalClose.styles=[r$o`:host { position: absolute; right: 0.6rem; top: 0.6rem; z-index: 20; }`],ModalClose=r$a([n$j(a$5)],ModalClose);try{customElements.define(a$5,ModalClose)}catch{}var p$3=Object.defineProperty,u$1=Object.getOwnPropertyDescriptor,t=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$3(O,B,U),U};const s="sonic-modal";let Modal=class extends L$1(s$9){constructor(){super(...arguments),this.hideOnOverlayClick=!0,this.hideOnEscape=!0,this.align="center",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.fullScreen=!1,this.visible=!1}static create(q){const O=document.createElement(s);return O.innerHTML=`<sonic-modal-close></sonic-modal-close><sonic-modal-content>${q.content}</sonic-modal-content>`||"",(document.querySelector("sonic-theme")||document.body).appendChild(O),O.show(),O}connectedCallback(){super.connectedCallback()}updated(){const q=this;document.addEventListener("keydown",this.handleEscape),q.closeBtn.forEach(O=>{O.addEventListener("click",function(){q.hide()},{once:!0})})}render(){if(this.visible==!1)return w$1;this.handleFullsceen();const q={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},O={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return $$2`<div class="modal-wrapper" style="${i$l(O)}" ${$$1({out:f$j})} tabindex="0"><div part="modal" class="modal" style="${i$l(q)}" ${$$1({keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]})}><div class="modal-content"><slot></slot></div></div></div><div class="overlay" @click="${this.hideOnOverlayClick?this.hide:""}" ${$$1({keyframeOptions:{duration:500},in:p$f,out:[{opacity:0,pointerEvents:"none"}]})}></div>`}show(){var q,O;this.visible=!0,(q=this.modalElement)==null||q.setAttribute("tabindex","0"),(O=this.modalElement)==null||O.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var q;this.visible=!1,(q=this.modalElement)==null||q.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide"))}dispose(){this.hide(),this.remove()}handleEscape(q){q.key==="Escape"&&[...document.querySelectorAll(s)].forEach(O=>{this.hideOnEscape==!0&&O.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};if(Modal.styles=[r$o`:host { --sc-modal-py: 2.5rem; --sc-modal-px: 1.5rem; --sc-modal-content: var(--sc-base-content); --sc-modal-bg: var(--sc-base); --sc-modal-max-w: min(100vw, 64ch); --sc-modal-max-h: 80vh; --sc-modal-scrollbar-bg: var(--sc-base-300); --sc-modal-rounded: var(--sc-rounded-lg); } * { box-sizing: border-box; } .modal-wrapper { position: fixed; bottom: 0; left: 0; width: 100%; z-index: 990; text-align: center; align-items: center; justify-content: center; flex-direction: column; display: flex; pointer-events: none; } /*SCROLLBAR*/ .modal-content::-webkit-scrollbar-track { z-index: 20; background-color: transparent; } .modal-content::-webkit-scrollbar { width: 0.9rem; background-color: transparent; } .modal-content::-webkit-scrollbar-thumb { background-color: var(--sc-modal-scrollbar-bg); border: 0.3rem solid rgba(0, 0, 0, 0); background-clip: padding-box; border-radius: var(--sc-modal-rounded); } .modal-content { overflow-y: auto; display: flex; flex-direction: column; text-align: center; align-items: center; min-height: 10rem; } .modal { background: var(--sc-base); width: 100%; box-shadow: var(--sc-shadow-lg); border-radius: var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0; pointer-events: auto; overflow: hidden; transform: translateZ(0); } .overlay { background: var(--sc-base-200); left: 0; top: 0; right: 0; bottom: 0; z-index: 900; opacity: 0.8; position: fixed; } ::slotted(sonic-modal-title) { margin-bottom: 1rem; } ::slotted(sonic-modal-subtitle) { margin-top: -0.45rem; margin-bottom: 1rem; } @media (max-width: 767.5px) { .modal-wrapper, .modal { max-width: none !important; width: 100% !important; } } @media (min-width: 768px) { .modal-wrapper { top: 50%; left: 50%; bottom: auto; right: auto; transform: translateX(-50%) translateY(-50%); } .modal { top: 50%; bottom: auto; right: auto; border-radius: var(--sc-modal-rounded); } } :host([align="left"]) .modal-content { text-align: left; align-items: flex-start; } :host([align="right"]) .modal-content { text-align: right; align-items: flex-end; } /* Border radius */ :host([rounded="none"]) modal { --sc-img-radius: 0 !important; }`],t([e$b({type:Boolean,reflect:!0})],Modal.prototype,"hideOnOverlayClick",2),t([e$b({type:Boolean,reflect:!0})],Modal.prototype,"hideOnEscape",2),t([e$b({type:String,reflect:!0})],Modal.prototype,"align",2),t([e$b({type:String})],Modal.prototype,"padding",2),t([e$b({type:String})],Modal.prototype,"maxWidth",2),t([e$b({type:String})],Modal.prototype,"maxHeight",2),t([e$b({type:String})],Modal.prototype,"width",2),t([e$b({type:String})],Modal.prototype,"height",2),t([e$b({type:Boolean,reflect:!0})],Modal.prototype,"fullScreen",2),t([e$b({type:Boolean,reflect:!0})],Modal.prototype,"visible",2),t([i$q(".modal-wrapper")],Modal.prototype,"modalWrapper",2),t([i$q(".modal")],Modal.prototype,"modalElement",2),t([l$p({selector:"sonic-modal-close"})],Modal.prototype,"closeBtn",2),Modal=t([n$j(s)],Modal),typeof window<"u"){let q=window;q.SonicModal=Modal}try{customElements.define(s,Modal)}catch{}var u=Object.defineProperty,f$7=Object.getOwnPropertyDescriptor,e$2=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$7(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&u(O,B,U),U};const v$2={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"},d$7="sonic-alert";let Alert=class extends s$9{constructor(){super(...arguments),this.label="",this.text="",this.size="md",this.background=!1,this.status="default"}render(){return $$2`<div part="alert" class="alert"><div>${this.status&&$$2`<sonic-icon name="${v$2[this.status]}"></sonic-icon>`}</div><div>${this.label?$$2`<span class="label">${this.label} :</span>`:w$1} ${this.text}<slot><slot></slot></slot></div></div>`}};Alert.styles=[r$o`:host { --sc-alert-color: inherit; --sc-alert-rounded: var(--sc-rounded); --sc-alert-fw: var(--sc-font-weight-base); --sc-alert-fst: var(--sc-font-style-base); --sc-alert-fs: 1rem; --sc-alert-label-fw: bold; display: block; font-size: var(--sc-alert-fs); font-weight: var(--sc-alert-fw); font-style: var(--sc-alert-fst); } .alert { color: var(--sc-alert-color); position: relative; display: flex; gap: 0.4em; line-height: 1.2; border-radius: var(--sc-alert-rounded); } .label { font-weight: var(--sc-alert-label-fw); } :host([status="warning"]) { --sc-alert-color: var(--sc-warning); } :host([status="error"]) { --sc-alert-color: var(--sc-danger); } :host([status="info"]) { --sc-alert-color: var(--sc-info); } :host([status="success"]) { --sc-alert-color: var(--sc-success); } /*background*/ :host([background]) .alert { background: var(--sc-base); padding: 0.8em 1.15em; } :host([background]) .alert:before { background-color: currentColor; content: ""; display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; opacity: 0.08; border-radius: var(--sc-alert-rounded); pointer-events: none; } :host([background]) > div { z-index: 2; position: relative; } /*SIZE*/ :host([size="xs"]) { --sc-alert-fs: 0.75rem; } :host([size="sm"]) { --sc-alert-fs: 0.85rem; } :host([size="lg"]) { --sc-alert-fs: 1.2rem; } /*Rounded*/ :host([size="xs"]) .alert { --sc-alert-rounded: var(--sc-rounded-sm); } :host([size="sm"]) .alert { --sc-alert-rounded: var(--sc-rounded-sm); }`],e$2([e$b({type:String})],Alert.prototype,"label",2),e$2([e$b({type:String})],Alert.prototype,"text",2),e$2([e$b({type:String,reflect:!0})],Alert.prototype,"size",2),e$2([e$b({type:Boolean,reflect:!0})],Alert.prototype,"background",2),e$2([e$b({type:String,reflect:!0})],Alert.prototype,"status",2),Alert=e$2([n$j(d$7)],Alert);try{customElements.define(d$7,Alert)}catch{}var m$4=Object.defineProperty,d$6=Object.getOwnPropertyDescriptor,a$4=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$6(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$4(O,B,U),U};const f$6="sonic-toast-message-subscriber";let MessageSubscriber=class extends L$1(s$9){constructor(){super(...arguments),this._messages=[],this.success=null,this.status=null,this._message="",this._data=""}get messages(){return this._messages}set messages(q){this._messages=q,this.messages&&q.forEach(O=>{O.type=="public"&&SonicToast$1.add({text:O.content,status:O.status})})}get message(){return this._message}set message(q){this._message=q,!!this.message&&this.props.success===!1&&(this.props.public_message||SonicToast$1.add({text:this.message,status:"error"}))}get data(){return this._data}set data(q){this._data=q;const O={text:"Votre produit a bien \xE9t\xE9 ajout\xE9",status:"success"};Array.isArray(this.data)&&this.props.success===!0&&SonicToast$1.add(O),this.data==""&&this.props.status===!0&&SonicToast$1.add(O),this.props.success===!1&&(this.props.public_message||SonicToast$1.add({text:this.data,status:"error"}))}render(){return w$1}};a$4([e$b({type:Boolean})],MessageSubscriber.prototype,"success",2),a$4([e$b({type:Boolean})],MessageSubscriber.prototype,"status",2),a$4([e$b({type:Array})],MessageSubscriber.prototype,"messages",1),a$4([e$b({type:String})],MessageSubscriber.prototype,"message",1),a$4([e$b()],MessageSubscriber.prototype,"data",1),MessageSubscriber=a$4([n$j(f$6)],MessageSubscriber);var c$3=Object.defineProperty,m$3=Object.getOwnPropertyDescriptor,i$b=(q,O,B,D)=>{for(var U=D>1?void 0:D?m$3(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$3(O,B,U),U};const d$5="sonic-tooltip";let Tooltip=class extends s$9{constructor(){super(...arguments),this.label="",this.disabled=!1}render(){let q=this.disabled||this.label==""?"disabled":"";return $$2`<div data-tooltip-text="${this.label.trim().replace("&nbsp;"," ")}" class="tooltip ${q}"><slot></slot></div>`}};Tooltip.styles=[r$o`.tooltip { position: relative; display: flex; align-items: center; text-align: center; } .tooltip:before { position: absolute; content: attr(data-tooltip-text); font-size: 0.85rem; display: block; opacity: 0; pointer-events: none; bottom: calc(100% + 0.25rem); left: 50%; transform: translateX(-50%); background: var(--sc-base-content, #111827); padding: 0.25rem; border-radius: 0.25rem; color: var(--sc-base, #fff); z-index: 999; display: none; line-height: 1.1; width: max-content; max-width: 20rem; } .tooltip:not(.disabled):hover:before { opacity: 1; display: block; }`],i$b([e$b({type:String})],Tooltip.prototype,"label",2),i$b([e$b({type:Boolean})],Tooltip.prototype,"disabled",2),Tooltip=i$b([n$j(d$5)],Tooltip);try{customElements.define(d$5,Tooltip)}catch{}var k=Object.defineProperty,v$1=Object.getOwnPropertyDescriptor,r$9=(q,O,B,D)=>{for(var U=D>1?void 0:D?v$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&k(O,B,U),U};const x="sonic-pop";let Pop=class extends s$9{constructor(){super(...arguments),this.open=!1,this.toggle="true",this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=Number.NaN,this.lastContentY=Number.NaN}runPositioning(){!this.positioningRuns||(this.positioningRuns=!0,this._setUpMenu(this.placement),window.requestAnimationFrame(()=>this.runPositioning()))}_toggle(q){this.open&&this.toggle=="false"||q.type=="keydown"&&(q.key!="ArrowDown"||this.open)||(this.open=!this.open,this.open?this._show():this._hide())}_show(){this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=Number.NaN,this.lastContentY=Number.NaN,this.runPositioning())}_hide(){this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1}_handleClosePop(q){let O=q.composedPath(),B=O[0];Pop.pops.forEach(D=>{const U=O.includes(D),W=O.includes(D.querySelector('[slot="content"]')),K=r$l.getAncestorAttributeValue(B,"data-on-select")==="keep";q.type=="pointerdown"&&U||q.type=="click"&&(U&&K||!W)||D._hide()})}connectedCallback(){super.connectedCallback(),Pop.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop)),Pop.pops.add(this)}disconnectedCallback(){super.disconnectedCallback(),Pop.pops.delete(this),Pop.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop))}_setUpMenu(q){var ht;const O=(ht=this.popContent)==null?void 0:ht.getBoundingClientRect(),B=8,D=20,U=this.getBoundingClientRect();if(!this.offsetParent)return;let W=this.offsetParent.getBoundingClientRect(),K=U.left-W.left,Y=U.top-W.top,Z=K,G=Y,st=Y-O.height-B,tt=K-O.width-2*B,Q=K+U.width+2*B,rt=Y+U.height+B;switch(q){case"bottom":G=rt;break;case"top":G=st;break;case"left":Z=tt;break;case"right":Z=Q;break}let ot=window.innerWidth-Q-W.left-O.width-D;ot<0&&q==="right"&&(Z=tt),ot<0&&["top","bottom"].includes(q)&&(Z=Math.max(Z+ot,tt+U.width)),-W.left-tt>D&&q==="left"&&(Z=Q);let nt=window.innerHeight-rt-W.top-O.height-D;nt<0&&q==="bottom"&&(G=st),nt<0&&["left","right"].includes(q)&&(G=Math.max(G+nt,st+U.height)),-W.top-st>-D&&q==="top"&&(G=rt),this.lastContentX=Z,this.lastContentY=G,Object.assign(this.popContent.style,{left:`${Z}px`,top:`${G}px`})}render(){return $$2`<slot @click="${this._toggle}" @keydown="${this._toggle}" class="contents"></slot><slot name="content" tabindex="-1" part="content" class="${this.open?"is-open":""}"></slot>`}};Pop.pops=new Set,Pop.styles=[r$o`:host { display: inline-block; vertical-align: middle; } slot[name="content"] { background-color: var(--sc-base); position: absolute; z-index: 50; display: block; transform: translateY(1rem) scale(0.95); opacity: 0; pointer-events: none; transition-duration: 0.15s ; transition-timing-function: ease; transition-property:all; border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em); } slot[name="content"].is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; transition-property:scale, opacity; transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225); } /*OMBRE*/ :host([shadow]) slot[name="content"], :host([shadow="md"]) slot[name="content"], :host([shadow="true"]) slot[name="content"] { box-shadow: var(--sc-shadow); } :host([shadow="sm"]) slot[name="content"] { box-shadow: var(--sc-shadow-sm); } :host([shadow="none"]) slot[name="content"] { box-shadow: none; } :host([shadow="lg"]) slot[name="content"] { box-shadow: var(--sc-shadow-lg); }`],r$9([t$a()],Pop.prototype,"open",2),r$9([i$q("slot:not([name=content])")],Pop.prototype,"popBtn",2),r$9([i$q("slot[name=content]")],Pop.prototype,"popContent",2),r$9([e$b({type:String})],Pop.prototype,"toggle",2),r$9([e$b({type:String,reflect:!0})],Pop.prototype,"shadow",2),r$9([e$b({type:String})],Pop.prototype,"placement",2),Pop=r$9([n$j(x)],Pop);try{customElements.define(x,Pop)}catch{}var l$6=Object.defineProperty,v=Object.getOwnPropertyDescriptor,r$8=(q,O,B,D)=>{for(var U=D>1?void 0:D?v(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l$6(O,B,U),U};const p$2="sonic-divider";let Divider=class extends s$9{constructor(){super(...arguments),this.label="",this.size="md",this.align="center"}firstUpdated(){var q,O;(this.label||((q=this.slotNodes)==null?void 0:q.length))&&((O=this.divider)==null||O.classList.add("has-text"))}render(){return $$2`<div part="divider"><span class="text">${this.label}<slot></slot></span></div>`}};Divider.styles=[r$o`:host { --sc-divider-my: 0.5rem; --sc-divider-mx: 0; --sc-divider-border-width: min(2px, 0.15rem); --sc-divider-border-color: var(--sc-base-200); --sc-divider-border-style: solid; --sc-divider-color: var(--sc-base-500); --sc-divider-ff: var(--sc-font-family-base); --sc-divider-fs: 1rem; --sc-divider-fw: var(--sc-font-weight-base); --sc-divider-fst: var(--sc-font-style-base); margin: var(--sc-divider-my) var(--sc-divider-mx); font-size: var(--sc-divider-fs); font-style: var(--sc-divider-fst); font-family: var(--sc-divider-ff); font-weight: var(--sc-divider-fw); color: var(--sc-divider-color); display: block; } /*SIZE*/ :host([size="xs"]) { --sc-divider-my: 0.5rem; --sc-divider-fs: 0.75rem; } :host([size="sm"]) { --sc-divider-my: 0.75rem; --sc-divider-fs: 0.85rem; } :host([size="md"]) { --sc-divider-my: 1.25rem; } :host([size="lg"]) { --sc-divider-my: 1.85rem; } :host([size="xl"]) { --sc-divider-my: 2.25rem; } :host([size="2xl"]) { --sc-divider-my: 3rem; } div { display: flex; align-items: center; width: 100%; } div:before { content: ""; flex-grow: 1; border-top: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color); width: 100%; } div:after { content: ""; flex-grow: 1; border-top: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color); width: 100%; } /*ALIGNEMENT*/ :host([align="left"]) div:before { display: none; } :host([align="right"]) div:after { display: none; } /*TEXT*/ .text { flex-shrink: 0; max-width: 80%; } .no-text .text { display: none; } .has-text { gap: 0.5rem; }`],r$8([o$c()],Divider.prototype,"slotNodes",2),r$8([i$q("div")],Divider.prototype,"divider",2),r$8([e$b({type:String})],Divider.prototype,"label",2),r$8([e$b({type:String,reflect:!0})],Divider.prototype,"size",2),r$8([e$b({type:String,reflect:!0})],Divider.prototype,"align",2),Divider=r$8([n$j("sonic-divider")],Divider);try{customElements.define(p$2,Divider)}catch{}var i$a=Object.defineProperty,a$3=Object.getOwnPropertyDescriptor,f$5=(q,O,B,D)=>{for(var U=D>1?void 0:D?a$3(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&i$a(O,B,U),U};const c$2="sonic-card-header-description";let CardHeaderDescription=class extends s$9{render(){return $$2`<div><slot></slot></div>`}};CardHeaderDescription.styles=[r$o`div { margin-top: .1em; font-family: var(--sc-font-family-base); font-size: .7em; font-weight: var(--sc-font-style-base); }`],CardHeaderDescription=f$5([n$j(c$2)],CardHeaderDescription);try{customElements.define(c$2,CardHeaderDescription)}catch{}var l$5=Object.defineProperty,f$4=Object.getOwnPropertyDescriptor,r$7=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$4(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l$5(O,B,U),U};const d$4="sonic-card-header";let CardHeader=class extends s$9{render(){return $$2`<div class="header"><div class="header-content">${this.label} ${this.description?$$2`<sonic-card-header-description>${this.description}</sonic-card-header-description>`:""}<slot></slot></div><slot name="suffix"></slot></div>`}};CardHeader.styles=[r$o`:host { --sc-card-header-mb: 1rem; --sc-card-header-font-size: 1.875rem; --sc-card-header-font-weight: var(--sc-headings-font-weight); --sc-card-header-font-style: var(--sc-headings-font-style); --sc-card-header-family: var(--sc-headings-font-family); --sc-card-header-line-height: var(--sc-headings-line-height); } .header { display: flex; align-items: flex-start; gap: .5em 1em; margin-bottom: var(--sc-card-header-mb); line-height: var(--sc-card-header-line-height); font-family: var(--sc-card-header-font-family); font-size: var(--sc-card-header-font-size); font-style: var(--sc-card-header-font-style); font-weight: var(--sc-card-header-font-weight); } .header-content { flex-grow: 1; } slot[name="suffix"] { flex-shrink: 0; }`],r$7([e$b()],CardHeader.prototype,"label",2),r$7([e$b()],CardHeader.prototype,"description",2),CardHeader=r$7([n$j(d$4)],CardHeader);try{customElements.define(d$4,CardHeader)}catch{}var i$9=Object.defineProperty,f$3=Object.getOwnPropertyDescriptor,r$6=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$3(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&i$9(O,B,U),U};const n$3="sonic-card-main";let CardMain=class extends s$9{render(){return $$2`<div><slot></slot></div>`}};CardMain.styles=[r$o`:host { }`],CardMain=r$6([n$j(n$3)],CardMain);try{customElements.define(n$3,CardMain)}catch{}var f$2=Object.defineProperty,r$5=Object.getOwnPropertyDescriptor,i$8=(q,O,B,D)=>{for(var U=D>1?void 0:D?r$5(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&f$2(O,B,U),U};const o$1="sonic-card-footer";let CardFooter=class extends s$9{render(){return $$2`<slot></slot>`}};CardFooter.styles=[r$o`:host { }`],CardFooter=i$8([n$j(o$1)],CardFooter);try{customElements.define(o$1,CardFooter)}catch{}var i$7=Object.defineProperty,l$4=Object.getOwnPropertyDescriptor,d$3=(q,O,B,D)=>{for(var U=D>1?void 0:D?l$4(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&i$7(O,B,U),U};const n$2="sonic-card";let Card=class extends s$9{constructor(){super(...arguments),this.type="default"}render(){return $$2`<div part="card" class="card"><slot></slot></div>`}};Card.styles=[r$o`:host { --sc-card-padding: 1.5rem; --sc-card-color: var(--sc-base-content); --sc-card-bg: var(--sc-base); --sc-card-rounded: var(--sc-rounded-lg); --sc-card-shadow: var(--sc-shadow-lg); } .card { padding: var(--sc-card-padding); background-color: var(--sc-card-bg); border-radius: var(--sc-card-rounded); box-shadow: var(--sc-card-shadow); color: var(--sc-card-color); } /*TYPES*/ :host([type="primary"]) { --sc-card-color: var(--sc-primary-content); --sc-badge-bg: var(--sc-primary); } :host([type="warning"]) { --sc-card-color: var(--sc-warning-content); --sc-card-bg: var(--sc-warning); } :host([type="danger"]) { --sc-card-color: var(--sc-danger-content); --sc-card-bg: var(--sc-danger); } :host([type="info"]) { --sc-card-color: var(--sc-info-content); --sc-card-bg: var(--sc-info); } :host([type="success"]) { --sc-card-color: var(--sc-success-content); --sc-card-bg: var(--sc-success); } :host([type="light"]) { --sc-card-color: var(--sc-base-content); --sc-card-bg: var(--sc-base-100); } :host([type="neutral"]) { --sc-card-color: var(--sc-base); --sc-card-bg: var(--sc-base-content); } :host([type="invert"]) { --sc-card-color: var(--sc-base); --sc-card-bg: var(--sc-base-900); }`],d$3([e$b({type:String,reflect:!0})],Card.prototype,"type",2),Card=d$3([n$j(n$2)],Card);try{customElements.define(n$2,Card)}catch{}var l$3=Object.defineProperty,d$2=Object.getOwnPropertyDescriptor,r$4=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$2(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l$3(O,B,U),U};const i$6="sonic-tr";let TableTr=class extends s$9{render(){return $$2`<slot></slot>`}};TableTr.styles=[r$o`:host { display: table-row; }`],TableTr=r$4([n$j(i$6)],TableTr);try{customElements.define(i$6,TableTr)}catch{}var m$2=Object.defineProperty,f$1=Object.getOwnPropertyDescriptor,r$3=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$2(O,B,U),U};const c$1="sonic-th";let TableTh=class extends s$9{render(){const q={textAlign:this.align};return $$2`<th part="th" style="${i$l(q)}" colspan="${l$i(this.colSpan)}" rowspan="${l$i(this.rowSpan)}"><slot></slot></th>`}};TableTh.styles=[r$o`:host { display: contents; } th { all:inherit; display:table-cell; text-transform: var(--sc-table-th-tt); font-weight:var(--sc-table-th-fw); font-size:var(--sc-table-th-fs); padding: var(--sc-table-th-py) var(--sc-table-th-px); }`],r$3([e$b({type:Number})],TableTh.prototype,"colSpan",2),r$3([e$b({type:Number})],TableTh.prototype,"rowSpan",2),r$3([e$b({type:String})],TableTh.prototype,"align",2),TableTh=r$3([n$j(c$1)],TableTh);try{customElements.define(c$1,TableTh)}catch{}var c=Object.defineProperty,y=Object.getOwnPropertyDescriptor,r$2=(q,O,B,D)=>{for(var U=D>1?void 0:D?y(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c(O,B,U),U};const a$2="sonic-td";let TableTd=class extends s$9{render(){const q={textAlign:this.align};return $$2`<td part="td" style="${i$l(q)}" colspan="${l$i(this.colSpan)}" rowspan="${l$i(this.rowSpan)}"><slot></slot></td>`}};TableTd.styles=[r$o`:host { display: contents; } td { all:inherit; display:table-cell; padding: var(--sc-table-td-py) var(--sc-table-td-px); }`],r$2([e$b({type:Number})],TableTd.prototype,"colSpan",2),r$2([e$b({type:Number})],TableTd.prototype,"rowSpan",2),r$2([e$b({type:String})],TableTd.prototype,"align",2),TableTd=r$2([n$j(a$2)],TableTd);try{customElements.define(a$2,TableTd)}catch{}var l$2=Object.defineProperty,p$1=Object.getOwnPropertyDescriptor,n$1=(q,O,B,D)=>{for(var U=D>1?void 0:D?p$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l$2(O,B,U),U};const i$5="sonic-thead";let TableThead=class extends s$9{render(){return $$2`<slot></slot>`}};TableThead.styles=[r$o`:host { display: table-header-group; }`],TableThead=n$1([n$j(i$5)],TableThead);try{customElements.define(i$5,TableThead)}catch{}var a$1=Object.defineProperty,m$1=Object.getOwnPropertyDescriptor,d$1=(q,O,B,D)=>{for(var U=D>1?void 0:D?m$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&a$1(O,B,U),U};const i$4="sonic-tbody";let TableTbody=class extends s$9{render(){return $$2`<tbody><slot></slot></tbody>`}};TableTbody.styles=[r$o`:host { display: table-row-group; } ::slotted(sonic-tr:nth-child(odd)){ background:var(--sc-base-50); } ::slotted(sonic-tr:hover) { background:var(--sc-base-100); } ::slotted(sonic-tr:not(:last-child)){ border-bottom:var(--sc-form-border-width) solid var(--sc-base-200) !important; }`],TableTbody=d$1([n$j(i$4)],TableTbody);try{customElements.define(i$4,TableTbody)}catch{}var l$1=Object.defineProperty,d=Object.getOwnPropertyDescriptor,r$1=(q,O,B,D)=>{for(var U=D>1?void 0:D?d(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l$1(O,B,U),U};const i$3="sonic-tfoot";let TableTfoot=class extends s$9{render(){return $$2`<tfoot><slot></slot></tfoot>`}};TableTfoot.styles=[r$o`:host { display: contents; }`],TableTfoot=r$1([n$j(i$3)],TableTfoot);try{customElements.define(i$3,TableTfoot)}catch{}var l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,n=(q,O,B,D)=>{for(var U=D>1?void 0:D?a(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l(O,B,U),U};const i$2="sonic-caption";let TableCaption=class extends s$9{render(){return $$2`<slot></slot>`}};TableCaption.styles=[r$o`:host { display:table-caption; font-size:.75rem; color:var(--sc-base-400); text-align:center; } :host:before{ content:"—"; margin-right:.25em; } :host:after{ content:"—"; margin-left:.25em; }`],TableCaption=n([n$j(i$2)],TableCaption);try{customElements.define(i$2,TableCaption)}catch{}var p=Object.defineProperty,f=Object.getOwnPropertyDescriptor,e$1=(q,O,B,D)=>{for(var U=D>1?void 0:D?f(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p(O,B,U),U};const m="sonic-table";let Table=class extends s$9{constructor(){super(...arguments),this.size="md",this.striped=!1,this.sticky=!1,this.hover=!1}render(){return $$2`<div class="table-container"><div class="table" ?striped="${this.striped}" ?hover="${this.hover}" ?sticky="${this.sticky}"><slot></slot></div></div>`}};Table.styles=[r$o`:host { --sc-table-fw: var(--sc-font-weight-base); --sc-table-fst: var(--sc-font-style-base); --sc-table-fs: 1rem; --sc-table-th-fs: .85em; --sc-table-th-fw: bold; --sc-table-th-tt: uppercase; --sc-table-th-px: var(--sc-table-td-px); --sc-table-th-py: var(--sc-table-td-py); --sc-table-td-px: .5rem; --sc-table-td-py: .3rem; display:block; } .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; } .table { width: 100%; font-size: var(--sc-table-fs); display: table; } /*SIZES*/ :host([size="2xs"]) { --sc-table-fs: 0.6rem; } :host([size="xs"]) { --sc-table-fs: 0.75rem; } :host([size="sm"]) { --sc-table-fs: 0.85rem; } :host([size="lg"]) { --sc-table-fs: 1.2rem; } :host([size="xl"]) { --sc-table-fs: 1.5rem; }`],e$1([e$b({type:String,reflect:!0})],Table.prototype,"size",2),e$1([e$b({type:Boolean,reflect:!0})],Table.prototype,"striped",2),e$1([e$b({type:Boolean,reflect:!0})],Table.prototype,"sticky",2),e$1([e$b({type:Boolean,reflect:!0})],Table.prototype,"hover",2),Table=e$1([n$j(m)],Table);try{customElements.define(m,Table)}catch{}let i$1=window;i$1.SonicPublisherManager||(i$1.SonicPublisherManager=PublisherManager$1),i$1.SonicDataBindObserver||(i$1.SonicDataBindObserver=l$o);const Fetcher=L,FormCheckable=d$l,FormElement=V,FormInput=m$b,Subscriber=L$1,TemplatesContainer=T$2;let e=window;e["concorde-mixins"]=e["concorde-mixins"]||{},e["concorde-mixins"]={Fetcher,FormCheckable,FormElement,FormInput,Subscriber,TemplatesContainer};class i{static areEqual(O,B){return O.length===B.length?O.every((D,U)=>D===B[U]):!1}static from2d(O){return{to1D:()=>{let B=[];return O.forEach(D=>B=B.concat(D)),this.from(B)}}}static from(O){return{get:()=>O||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:B=>{if(O.length<1)return!0;let D=(O[0]||{})[B];return O.every(U=>(U||{})[B]==D)}})})}),value:()=>({forKey:B=>i.from(O.map(D=>D[B]))}),copy:()=>({fromKey:B=>({toKey:D=>{O.forEach(U=>{U[D]=Array.isArray(U[B])?[...U[B]]:typeof U[B]=="object"&&U[B]!=null?ut({},U[B]):U[B]})}})})}),map:B=>i.from(O.map(B)),filter:B=>i.from(O.filter(B)),find:B=>O.find(B),some:B=>O.some(B),every:B=>O.every(B),group:()=>({byKey:B=>{let D=[],U=new Map;for(let W of O){let K=W[B];if(!U.has(K)){let Y=D.length;U.set(K,Y);let Z={items:[]};Z[B]=K,D.push(Z)}D[U.get(K)].items.push(W)}return i.from(D)}}),without:()=>({duplicates:()=>({forKey:B=>{let D=[...new Set(O.map(U=>U[B]))];return i.from(D.map(U=>O.find(W=>W[B]==U)))}}),itemsIn:B=>({havingSameValue:()=>({forKey:D=>{let U=(W,K)=>Y=>W[K]!=Y[K];return i.from(O.filter(W=>B.every(U(W,D))))}})})})}}}const Arrays=i,DataBindObserver=l$o,Format=r$j,HTML=r$l,LocationHandler=a$j,Objects=a$o,PublisherProxy=Publisher,PublisherManager=PublisherManager$1,api=r$k;let r=window;r["concorde-utils"]=r["concorde-utils"]||{},r["concorde-utils"]={Arrays,DataBindObserver,Format,HTML,LocationHandler,Objects,PublisherProxy,PublisherManager,api};const SonicToast=SonicToast$1,SonicModal=Modal;let o=window;o["concorde-components"]=o["concorde-components"]||{},o["concorde-components"]={SonicToast,SonicModal};
114
+ */const o$6=e$9(class extends i$n{constructor(q){var O;if(super(q),q.type!==t$8.ATTRIBUTE||q.name!=="class"||((O=q.strings)===null||O===void 0?void 0:O.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(q){return" "+Object.keys(q).filter(O=>q[O]).join(" ")+" "}update(q,[O]){var B,D;if(this.et===void 0){this.et=new Set,q.strings!==void 0&&(this.st=new Set(q.strings.join(" ").split(/\s/).filter(W=>W!=="")));for(const W in O)O[W]&&!(!((B=this.st)===null||B===void 0)&&B.has(W))&&this.et.add(W);return this.render(O)}const U=q.element.classList;this.et.forEach(W=>{W in O||(U.remove(W),this.et.delete(W))});for(const W in O){const K=!!O[W];K===this.et.has(W)||((D=this.st)===null||D===void 0?void 0:D.has(W))||(K?(U.add(W),this.et.add(W)):(U.remove(W),this.et.delete(W)))}return b$6}});var p$9=Object.defineProperty,g$1=Object.getOwnPropertyDescriptor,e$4=(q,O,B,D)=>{for(var U=D>1?void 0:D?g$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$9(O,B,U),U};const c$c="sonic-input";let Input=class extends m$b(V(L$1(s$a))){constructor(){super(...arguments),this.size="",this.list=null,this.placeholder="",this.readonly=!1,this.pattern=null,this.min=null,this.max=null,this.step=null,this.minlength=null,this.maxlength=null,this.label="",this.description="",this.inlineContent=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}updated(){var q,O,B,D;this.hasLabel=!!(this.label||((q=this.slotLabelNodes)==null?void 0:q.length)),this.hasDescription=!!(this.description||((O=this.slotDescriptionNodes)==null?void 0:O.length)),this.hasSuffix=!!((B=this.slotSuffixNodes)!=null&&B.length),this.hasPrefix=!!((D=this.slotPrefixNodes)!=null&&D.length)}onSlotChange(){this.requestUpdate()}render(){const q={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return $$2`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?this.label:""}<slot name="label" @slotchange="${this.onSlotChange}"></slot></label><div class="form-control ${o$6(q)}"><div class="${this.inlineContent?"form-element form-element-wrapper":"contents"}"><slot name="prefix" @slotchange="${this.onSlotChange}"></slot><input id="form-element" part="input" class="form-element input" type="${this.type}" @input="${this.handleChange}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" list="${l$j(this.list)}" autofocus="${l$j(this.autofocus)}" required="${l$j(this.required)}" tabindex="${l$j(this.tabindex)}" pattern="${l$j(this.pattern)}" min="${l$j(this.min)}" max="${l$j(this.max)}" step="${l$j(this.step)}" minlength="${l$j(this.minlength)}" maxlength="${l$j(this.maxlength)}" placeholder="${this.placeholder}" .name="${this.name}" .value="${this.value}" autocomplete="${l$j(this.autocomplete)}"><slot name="suffix" @slotchange="${this.onSlotChange}"></slot></div></div><slot name="description" class="${this.hasDescription?"form-description":"hidden"}">${this.description?$$2`${this.description}`:""}</slot>`}};Input.styles=[formControl],e$4([e$b({type:String})],Input.prototype,"size",2),e$4([e$b({type:String})],Input.prototype,"list",2),e$4([e$b({type:String})],Input.prototype,"placeholder",2),e$4([e$b({type:Boolean})],Input.prototype,"readonly",2),e$4([e$b({type:String})],Input.prototype,"pattern",2),e$4([e$b({type:String})],Input.prototype,"min",2),e$4([e$b({type:String})],Input.prototype,"max",2),e$4([e$b({type:String})],Input.prototype,"step",2),e$4([e$b({type:String})],Input.prototype,"minlength",2),e$4([e$b({type:String})],Input.prototype,"maxlength",2),e$4([e$b({type:String})],Input.prototype,"label",2),e$4([e$b({type:String})],Input.prototype,"description",2),e$4([e$b({type:Boolean,reflect:!0})],Input.prototype,"inlineContent",2),e$4([o$c({slot:"label"})],Input.prototype,"slotLabelNodes",2),e$4([o$c({slot:"description"})],Input.prototype,"slotDescriptionNodes",2),e$4([o$c({slot:"suffix"})],Input.prototype,"slotSuffixNodes",2),e$4([o$c({slot:"prefix"})],Input.prototype,"slotPrefixNodes",2),e$4([t$a()],Input.prototype,"hasDescription",2),e$4([t$a()],Input.prototype,"hasLabel",2),e$4([t$a()],Input.prototype,"hasSuffix",2),e$4([t$a()],Input.prototype,"hasPrefix",2),Input=e$4([n$j(c$c)],Input);try{customElements.define(c$c,Input)}catch{}var h$5=Object.defineProperty,u$3=Object.getOwnPropertyDescriptor,e$3=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$3(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&h$5(O,B,U),U};const p$8="sonic-checkbox";let Checkbox=class extends d$m(m$b(V(L$1(s$a)))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.description="",this.label="",this.hasDescription=!1}updated(){var q;this.hasDescription=!!(this.description||((q=this.slotDescriptionNodes)==null?void 0:q.length))}connectedCallback(){this.type="checkbox",super.connectedCallback()}render(){return $$2`<label class="checkbox-container ${this.disabled?"disabled":""}"><span class="icon-container"><input type="${this.type}" @change="${this.handleChange}" .disabled="${l$j(this.disabled)}" .required="${l$j(this.required)}" .checked="${l$j(this.checked)}" .name="${this.name}" .value="${this.value}" autofocus="${l$j(this.autofocus)}"><sonic-icon name="${this.iconName}" class="sc-input-icon"></sonic-icon></span><div class="checkbox-text">${this.label?this.label:""}<slot></slot><slot name="description" class="${this.hasDescription?"description":"hidden"}">${this.description?$$2`${this.description}`:""}<slot></slot></slot></div></label>`}};Checkbox.styles=[r$k`:host{ --sc-checkbox-border-width: var(--sc-form-border-width); --sc-checkbox-border-color: transparent; } * { box-sizing: border-box; } .checkbox-container { min-height: 1.4em; display: flex; gap: 0.5em; line-height: 1.2; align-items: flex-start; } .icon-container { position: relative; display: flex; flex-shrink: 0; } input { appearance: none; flex-shrink: 0; height: 1.5em; width: 1.5em; display: block; cursor: pointer; border-radius: 0.25em; transition: 0.2s; outline: none; margin: 0; background-color: var(--sc-base-200); border:var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color); } input:focus, :host(:not([disabled])) input:active { box-shadow: 0 0 0 2px var(--sc-primary); } :host(:not([disabled])) label { cursor: pointer; } sonic-icon { line-height: 0; position: absolute; top: 50%; left: 50%; transform: translateX(-50%) translateY(-50%) scale(0); transition: transform 0.2s ease-in-out; color: var(--sc-primary-content); } /* .checkbox-text { align-self: center; } */ .description { color: var(--sc-base-400); font-size: 0.85em; margin-top: 0.2em; display: block; } /*Active */ input:checked, input[checked="true"] { background: var(--sc-primary); } input:checked + sonic-icon, input[checked="true"] + sonic-icon { transform: translateX(-50%) translateY(-50%) scale(1); } /*DISABLED */ .disabled { cursor: not-allowed; } .disabled input { opacity: 0.4; } .disabled .checkbox-text { opacity: 0.6; } ::slotted(a) { color: inherit; text-decoration: underline !important; } ::slotted(a:hover) { text-decoration: none !important; } /*Utils */ .hidden { display: none; } /*ERROR*/ :host([touched]) .checkbox-container:has(input:not(:focus):invalid) { --sc-checkbox-border-color:var(--sc-danger); } :host([touched]) .checkbox-container:has(input:not(:focus):invalid) .checkbox-text{ color:var(--sc-danger); }`],e$3([e$b({type:Boolean,reflect:!0})],Checkbox.prototype,"touched",2),e$3([e$b({type:String})],Checkbox.prototype,"iconName",2),e$3([e$b({type:String})],Checkbox.prototype,"description",2),e$3([e$b({type:String})],Checkbox.prototype,"label",2),e$3([o$c({slot:"description"})],Checkbox.prototype,"slotDescriptionNodes",2),e$3([e$b({type:Boolean})],Checkbox.prototype,"hasDescription",2),Checkbox=e$3([n$j(p$8)],Checkbox);try{customElements.define(p$8,Checkbox)}catch{}var d$f=Object.defineProperty,h$4=Object.getOwnPropertyDescriptor,n$a=(q,O,B,D)=>{for(var U=D>1?void 0:D?h$4(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$f(O,B,U),U};const l$e="sonic-radio";let Radio=class extends Checkbox{constructor(){super()}connectedCallback(){this.radio=!0,super.connectedCallback(),this.type="radio"}};Radio.styles=[Checkbox.styles,r$k`:host input { border-radius: 50%; } :host sonic-icon { border-radius: 50%; overflow: hidden; background-color:var(--sc-primary-content); line-height:0; display:block; font-size:0; height:10px; width:10px; }`],Radio=n$a([n$j(l$e)],Radio);try{customElements.define(l$e,Radio)}catch{}var m$a=Object.defineProperty,c$b=Object.getOwnPropertyDescriptor,t$5=(q,O,B,D)=>{for(var U=D>1?void 0:D?c$b(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$a(O,B,U),U};const d$e="sonic-select";let Select=class extends V(L$1(s$a)){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=null,this.size="",this.selectSize=null,this._options=[],this._value="",this.label="",this.description="",this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(q){this._options=q,!this.value&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}get value(){return this._value}set value(q){!q||this._value!=q&&(this._value=q,this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?PublisherManager$1.getInstance().get(this.formDataProvider)[this._name]=q:this.publisher&&(this.publisher[this._name]=q),this.requestUpdate())}connectedCallback(){super.connectedCallback();let q=this.querySelectorAll("option");q.length>0&&(this.options=Array.from(q).map(O=>({value:O.value,wording:O.text})))}updated(){var q,O,B,D;this.hasLabel=!!(this.label||((q=this.slotLabelNodes)==null?void 0:q.length)),this.hasDescription=!!(this.description||((O=this.slotDescriptionNodes)==null?void 0:O.length)),this.hasSuffix=!!((B=this.slotSuffixNodes)!=null&&B.length),this.hasPrefix=!!((D=this.slotPrefixNodes)!=null&&D.length)}onSlotChange(){this.requestUpdate()}validateFormElement(){var O;const q=(O=this.shadowRoot)==null?void 0:O.querySelector("select");!q||q.checkValidity()||(this.getFormPublisher().isFormValid=!1,q.reportValidity())}render(){const q={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return $$2`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?this.label:""}<slot name="label" @slotchange="${this.onSlotChange}"></slot></label><div class="form-control ${o$6(q)}"><slot name="prefix" @slotchange="${this.onSlotChange}"></slot><div class="form-select-wrapper"><select @change="${this.handleChange}" disabled="${l$j(this.multiple)}" size="${l$j(this.selectSize)}" autofocus="${l$j(this.autofocus)}" required="${l$j(this.required)}" .value="${this.value}" class="form-element">${c$k(this.options,O=>O[this.valueKey],O=>{const B=this.value==O[this.valueKey]?"selected":null;return $$2`<option selected="${l$j(B)}" value="${O[this.valueKey]}">${O[this.wordingKey]}</option>`})}<slot></slot></select><sonic-icon class="select-chevron" name="nav-arrow-down" size="${this.size}"></sonic-icon></div><slot name="suffix" @slotchange="${this.onSlotChange}"></slot></div><slot name="description" class="${this.hasDescription?"form-description":"hidden"}">${this.description?$$2`${this.description}`:""}</slot>`}};Select.styles=[formControl,r$k`.form-element { appearance: none; padding-right: 2.5em; } .form-select-wrapper { position: relative; width: 100%; } sonic-icon { position: absolute; right: 1em; top: 50%; pointer-events: none; transform: translateY(-50%); color:var(--sc-input-color); } option { padding: 0.1rem 5rem; color: var(--sc-base-content); background: var(--sc-base); }`],t$5([e$b({type:String})],Select.prototype,"valueKey",2),t$5([e$b({type:String})],Select.prototype,"wordingKey",2),t$5([e$b({type:Boolean})],Select.prototype,"multiple",2),t$5([e$b({type:String})],Select.prototype,"size",2),t$5([e$b({type:String})],Select.prototype,"selectSize",2),t$5([e$b({type:Array})],Select.prototype,"options",1),t$5([e$b()],Select.prototype,"value",1),t$5([e$b({type:String})],Select.prototype,"label",2),t$5([e$b({type:String})],Select.prototype,"description",2),t$5([o$c({slot:"label"})],Select.prototype,"slotLabelNodes",2),t$5([o$c({slot:"description"})],Select.prototype,"slotDescriptionNodes",2),t$5([o$c({slot:"suffix"})],Select.prototype,"slotSuffixNodes",2),t$5([o$c({slot:"prefix"})],Select.prototype,"slotPrefixNodes",2),t$5([t$a()],Select.prototype,"hasDescription",2),t$5([t$a()],Select.prototype,"hasLabel",2),t$5([t$a()],Select.prototype,"hasSuffix",2),t$5([t$a()],Select.prototype,"hasPrefix",2),Select=t$5([n$j(d$e)],Select);try{customElements.define(d$e,Select)}catch{}var p$7=Object.defineProperty,u$2=Object.getOwnPropertyDescriptor,t$4=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$2(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$7(O,B,U),U};const f$8="sonic-textarea";let Textarea=class extends m$b(V(L$1(s$a))){constructor(){super(...arguments),this.size="",this.rows="",this.cols="",this.maxlength="",this.minlength="",this.wrap=null,this.readonly=null,this.placeholder="",this.label="",this.description="",this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.slotClasses={}}updated(){var q,O,B,D;this.hasLabel=!!(this.label||((q=this.slotLabelNodes)==null?void 0:q.length)),this.hasDescription=!!(this.description||((O=this.slotDescriptionNodes)==null?void 0:O.length)),this.hasSuffix=!!((B=this.slotSuffixNodes)!=null&&B.length),this.hasPrefix=!!((D=this.slotPrefixNodes)!=null&&D.length)}onSlotChange(){this.requestUpdate()}validateFormElement(){var O;const q=(O=this.shadowRoot)==null?void 0:O.querySelector("textarea");!q||q.checkValidity()||(this.getFormPublisher().isFormValid=!1,q.reportValidity())}render(){return $$2`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?this.label:""}<slot name="label" @slotchange="${this.onSlotChange}"></slot></label><div class="form-control"><textarea @input="${this.handleChange}" ?disabled="${this.disabled}" ?required="${this.required}" autocomplete="${l$j(this.autocomplete)}" autofocus="${l$j(this.autofocus)}" rows="${l$j(this.rows)}" cols="${l$j(this.cols)}" maxlength="${l$j(this.maxlength)}" minlength="${l$j(this.minlength)}" ?readonly="${this.readonly}" spellcheck="${l$j(this.spellcheck)}" wrap="${l$j(this.wrap)}" class="form-element textarea custom-scroll" placeholder="${this.placeholder}">
115
+ ${this.value}</textarea></div><slot name="description" class="${this.hasDescription?"form-description":"hidden"}">${this.description?$$2`${this.description}`:""}</slot>`}};Textarea.styles=[formControl,customScroll,r$k`textarea { font-size: inherit; }`],t$4([e$b({type:String})],Textarea.prototype,"size",2),t$4([e$b({type:String})],Textarea.prototype,"rows",2),t$4([e$b({type:String})],Textarea.prototype,"cols",2),t$4([e$b({type:String})],Textarea.prototype,"maxlength",2),t$4([e$b({type:String})],Textarea.prototype,"minlength",2),t$4([e$b({type:String})],Textarea.prototype,"wrap",2),t$4([e$b({type:Boolean})],Textarea.prototype,"readonly",2),t$4([e$b({type:String})],Textarea.prototype,"placeholder",2),t$4([e$b({type:String})],Textarea.prototype,"label",2),t$4([e$b({type:String})],Textarea.prototype,"description",2),t$4([o$c({slot:"label"})],Textarea.prototype,"slotLabelNodes",2),t$4([o$c({slot:"description"})],Textarea.prototype,"slotDescriptionNodes",2),t$4([o$c({slot:"suffix"})],Textarea.prototype,"slotSuffixNodes",2),t$4([o$c({slot:"prefix"})],Textarea.prototype,"slotPrefixNodes",2),t$4([t$a()],Textarea.prototype,"hasDescription",2),t$4([t$a()],Textarea.prototype,"hasLabel",2),t$4([t$a()],Textarea.prototype,"hasSuffix",2),t$4([t$a()],Textarea.prototype,"hasPrefix",2),t$4([e$b()],Textarea.prototype,"slotClasses",2),Textarea=t$4([n$j(f$8)],Textarea);try{customElements.define(f$8,Textarea)}catch{}var c$a=Object.defineProperty,f$7=Object.getOwnPropertyDescriptor,o$5=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$7(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$a(O,B,U),U};const a$a="sonic-fieldset";let Fieldset=class extends L$1(s$a){constructor(){super(...arguments),this.disabled=!1}render(){return $$2`<fieldset form="${l$j(this.form)}" ?disabled="${this.disabled}"><slot></slot></fieldset>`}};Fieldset.styles=[r$k`:host { --sc-fieldset-mt: 0; --sc-fieldset-mb: 1rem; --sc-fieldset-border-color: var(--sc-base-200); --sc-fieldset-border-width: var(--sc-form-border-width); margin-top: var(--sc-fieldset-mt); margin-bottom: var(--sc-fieldset-mb); display: block; border: var(--sc-fieldset-border-width) solid var(--sc-fieldset-border-color) !important; padding: 1.8rem 1.25rem; border-radius: var(--sc-rounded-lg); } fieldset { all: unset; display: contents; } ::slotted(sonic-legend) { margin-bottom: 1.5rem; display: block; }`],o$5([e$b({type:Boolean,reflect:!0})],Fieldset.prototype,"disabled",2),o$5([e$b({type:String})],Fieldset.prototype,"form",2),Fieldset=o$5([n$j(a$a)],Fieldset);try{customElements.define(a$a,Fieldset)}catch{}var c$9=Object.defineProperty,a$9=Object.getOwnPropertyDescriptor,n$9=(q,O,B,D)=>{for(var U=D>1?void 0:D?a$9(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$9(O,B,U),U};let LegendDescription=class extends s$a{render(){return $$2`<slot></slot>`}};LegendDescription.styles=[r$k`:host { color: var(--sc-neutral-500); font-size: 1.25rem; line-height: 1.2; display: block; font-weight: var(--sc-font-weight-base); font-style: var(--sc-font-style-base); margin-top: 0.25em; }`],LegendDescription=n$9([n$j("sonic-legend-description")],LegendDescription);try{customElements.define("sonic-legend-description",LegendDescription)}catch{}var d$d=Object.defineProperty,h$3=Object.getOwnPropertyDescriptor,i$d=(q,O,B,D)=>{for(var U=D>1?void 0:D?h$3(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$d(O,B,U),U};const g="sonic-legend";let Legend=class extends s$a{render(){return $$2`<legend part="legend">${this.iconName?$$2`<div class="icon"><sonic-icon name="${this.iconName}" prefix="${l$j(this.iconPrefix)}" library="${l$j(this.iconLibrary)}"></sonic-icon></div>`:""}<div class="legend-content">${this.label} ${this.description?$$2`<sonic-legend-description>${this.description}</sonic-legend-description>`:""}<slot></slot></div><slot name="suffix"></slot></legend>`}};Legend.styles=[r$k`:host { --sc-legend-font-size: 1.75rem; --sc-legend-font-weight: var(--sc-font-weight-base); --sc-legend-font-style: var(--sc-headings-font-style); --sc-legend-family: var(--sc-headings-font-family); --sc-legend-line-height: var(--sc-headings-line-height); display: flex; width: 100%; } legend { font-size: var(--sc-legend-font-size); font-weight: var(--sc-legend-font-weight); font-style: var(--sc-legend-font-style); font-family: var(--sc-legend-font-family); line-height: var(--sc-legend-line-height); padding: 0; display: flex; width: 100%; align-items: flex-start; gap: 0.5em; } slot[name="suffix"] { display: block; margin-left: auto; flex-shrink: 0; } .legend-content { flex-grow: 1; }`],i$d([e$b({type:String})],Legend.prototype,"description",2),i$d([e$b({type:String})],Legend.prototype,"label",2),i$d([e$b({type:String})],Legend.prototype,"iconName",2),i$d([e$b({type:String})],Legend.prototype,"iconLibrary",2),i$d([e$b({type:String})],Legend.prototype,"iconPrefix",2),Legend=i$d([n$j(g)],Legend);try{customElements.define(g,Legend)}catch{}class s$2{constructor(O,{target:B,config:D,callback:U,skipInitial:W}){this.t=!1,this.i=!1,this.callback=()=>!0,(this.h=O).addController(this),this.o=B===null||B!=null?B:this.h,this.l=D,this.t=W!=null?W:this.t,this.callback=U!=null?U:this.callback,window.ResizeObserver?this.u=new ResizeObserver(K=>{this.handleChanges(K),this.h.requestUpdate()}):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(O){this.value=this.callback(O,this.u)}hostConnected(){this.o&&this.observe(this.o)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.t&&this.i&&this.handleChanges([]),this.i=!1}observe(O){this.u.observe(O,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}}var m$9=Object.defineProperty,n$8=Object.getOwnPropertyDescriptor,l$d=(q,O,B,D)=>{for(var U=D>1?void 0:D?n$8(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$9(O,B,U),U};const c$8="sonic-form-layout";let FormLayout=class extends L$1(s$a){constructor(){super(...arguments),this._resizeController=new s$2(this,{})}render(){return $$2`<div class="${this.offsetWidth>440?"cq--md":""}"><slot></slot></div>`}};FormLayout.styles=[r$k`:host { display: block; } div { display: grid; grid-gap: 1.5rem; align-items: flex-start; } .cq--md { grid-gap: 1.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); } ::slotted(sonic-radio), ::slotted(sonic-checkbox), ::slotted(sonic-form-actions), ::slotted(sonic-divider), ::slotted(sonic-textarea) { grid-column: 1 / -1; } ::slotted(sonic-divider) { --sc-divider-my: 0; }`],FormLayout=l$d([n$j(c$8)],FormLayout);try{customElements.define(c$8,FormLayout)}catch{}var o$4=Object.defineProperty,f$6=Object.getOwnPropertyDescriptor,c$7=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$6(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&o$4(O,B,U),U};const n$7="sonic-form-actions";let FormActions=class extends s$a{render(){return $$2`<slot></slot>`}};FormActions.styles=[r$k`:host{ display:flex; gap:.3rem; }`],FormActions=c$7([n$j(n$7)],FormActions);try{customElements.define(n$7,FormActions)}catch{}var c$6=Object.defineProperty,y$2=Object.getOwnPropertyDescriptor,d$c=(q,O,B,D)=>{for(var U=D>1?void 0:D?y$2(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$6(O,B,U),U};const i$c="sonic-group";let Group=class extends s$a{updated(){const q=this.querySelectorAll("sonic-input, sonic-button"),O=q.length;O>1&&q.forEach((B,D)=>{D===0?(B.style.setProperty("--sc-item-rounded-tr","0"),B.style.setProperty("--sc-item-rounded-br","0")):D===O-1?(B.style.setProperty("--sc-item-rounded-tl","0"),B.style.setProperty("--sc-item-rounded-bl","0")):(B.style.setProperty("--sc-item-rounded-tr","0"),B.style.setProperty("--sc-item-rounded-br","0"),B.style.setProperty("--sc-item-rounded-tl","0"),B.style.setProperty("--sc-item-rounded-bl","0"))})}render(){return $$2`<slot></slot>`}};Group.styles=[r$k`:host { display: inline-flex; vertical-align: middle; } slot { width: 100%; display: flex; align-items: flex-end; }`],Group=d$c([n$j(i$c)],Group);try{customElements.define(i$c,Group)}catch{}var h$2=Object.defineProperty,l$c=Object.getOwnPropertyDescriptor,t$3=(q,O,B,D)=>{for(var U=D>1?void 0:D?l$c(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&h$2(O,B,U),U};const c$5="sonic-image";let Image=class extends s$a{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.shadow="none",this.cover=!1}render(){const q={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return $$2`<div part="image"><picture part="picture"><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style="${i$k(q)}"></picture></div>`}};Image.styles=[r$k`:host { --sc-img-radius: 0; --sc-img-bg: var(--sc-placeholder-bg); border-radius: var(--sc-img-radius); display: block; width: 100%; background: var(--sc-img-bg); } img { width: 100%; vertical-align: middle; object-fit: cover; } img[src=""] { visibility: hidden; } /*Rounded*/ :host([rounded]) { --sc-img-radius: var(--sc-rounded); overflow: hidden; } :host([rounded="sm"]) { --sc-img-radius: var(--sc-rounded-sm); } :host([rounded="md"]) { --sc-img-radius: var(--sc-rounded-md); } :host([rounded="lg"]) { --sc-img-radius: var(--sc-rounded-lg); } :host([rounded="xl"]) { --sc-img-radius: var(--sc-rounded-xl); } /*Cercle*/ :host([rounded="full"]) { --sc-img-radius: 50% !important; } :host([rounded="none"]) { --sc-img-radius: 0 !important; } /*OMBRE*/ :host([shadow]) > div, :host([shadow="md"]) > div, :host([shadow="true"]) > div { box-shadow: var(--sc-shadow); } :host([shadow="sm"]) > div { box-shadow: var(--sc-shadow-sm); } :host([shadow="none"]) > div { box-shadow: none; } :host([shadow="lg"]) > div { box-shadow: var(--sc-shadow-lg); } :host([cover]), :host([cover]) > div, :host([cover]) img { position: absolute !important; left: 0 !important; top: 0 !important; right: 0 !important; bottom: 0 !important; height: 100% !important; width: 100% !important; }`],t$3([e$b({type:String})],Image.prototype,"rounded",2),t$3([e$b({type:String})],Image.prototype,"src",2),t$3([e$b({type:String})],Image.prototype,"alt",2),t$3([e$b({type:String})],Image.prototype,"loading",2),t$3([e$b({type:String})],Image.prototype,"ratio",2),t$3([e$b({type:String})],Image.prototype,"objectPosition",2),t$3([e$b({type:String})],Image.prototype,"imageRendering",2),t$3([e$b({type:String,reflect:!0})],Image.prototype,"shadow",2),t$3([e$b({type:Boolean,reflect:!0})],Image.prototype,"cover",2),Image=t$3([n$j(c$5)],Image);try{customElements.define(c$5,Image)}catch{}var y$1=Object.defineProperty,m$8=Object.getOwnPropertyDescriptor,e$2=(q,O,B,D)=>{for(var U=D>1?void 0:D?m$8(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&y$1(O,B,U),U};const $="sonic-taxonomy";let Taxonomy=class extends s$a{constructor(){super(...arguments),this.icon={},this.taxonomy=[],this.separator=",&nbsp;",this.key="",this.type="default",this.variant="default",this.size="md"}render(){if(!this.taxonomy)return w$1;let q=this.key+"_display",O=this.taxonomy.filter(B=>B!=null&&(B[q]===!0||B[q]=="1"||!B.hasOwnProperty(q)));return O.length===0?(this.style.display="none",w$1):(this.style.removeProperty("display"),$$2`<sonic-badge type="${this.type}" variant="${this.variant}" size="${this.size}"><sonic-icon slot="prefix" name="${this.icon.name}" prefix="${this.icon.prefix}"></sonic-icon><span class="taxonomy-list">${c$k(O,B=>B[this.key+"_id"],B=>$$2`<span>${B[this.key+"_name"]}</span><span class="sonic-taxonomy-separator">${o$a(this.separator)}</span>`)}</span></sonic-badge>`)}};Taxonomy.styles=r$k`:host .sonic-taxonomy-separator:last-child { display: none; } .taxonomy-list { display: flex; flex-wrap: wrap; }`,e$2([e$b({type:Object})],Taxonomy.prototype,"icon",2),e$2([e$b({type:Array})],Taxonomy.prototype,"taxonomy",2),e$2([e$b({type:String})],Taxonomy.prototype,"separator",2),e$2([e$b({type:String})],Taxonomy.prototype,"key",2),e$2([e$b({type:String,reflect:!0})],Taxonomy.prototype,"type",2),e$2([e$b({type:String,reflect:!0})],Taxonomy.prototype,"variant",2),e$2([e$b({type:String,reflect:!0})],Taxonomy.prototype,"size",2),Taxonomy=e$2([n$j($)],Taxonomy);try{customElements.define("sonic-taxonomy",Taxonomy)}catch{}var n$6=Object.defineProperty,l$b=Object.getOwnPropertyDescriptor,h$1=(q,O,B,D)=>{for(var U=D>1?void 0:D?l$b(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&n$6(O,B,U),U};const o$3="sonic-menu-item";let MenuItem=class extends Button{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="primary"),this.hasAttribute("shape")||(this.shape="block"),this.hasAttribute("align")||(this.align="left"),super.connectedCallback()}};MenuItem=h$1([n$j(o$3)],MenuItem);try{customElements.define(o$3,MenuItem)}catch{}var m$7=Object.defineProperty,p$6=Object.getOwnPropertyDescriptor,t$2=(q,O,B,D)=>{for(var U=D>1?void 0:D?p$6(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$7(O,B,U),U};const d$b="sonic-menu";let MenuItems=class extends s$a{constructor(){super(...arguments),this.size="",this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.minWidth="0",this.hasMoreElements=!1}checkIfMore(){var q;this.hasMoreElements=!!((q=this.moreElements)!=null&&q.length)}updated(q){const O=this.querySelector(".more-btn");this.size&&O&&O.setAttribute("size",this.size),this.querySelectorAll("sonic-divider").forEach(B=>{B.hasAttribute("size")||B.setAttribute("size","xs")}),super.updated(q)}mainSlotChange(){this.setChildrenSize(this.menuChildren)}setChildrenSize(q){q.forEach(O=>{this.size&&O.setAttribute("size",this.size),this.align&&O.setAttribute("align",this.align),this.direction=="row"&&O.getAttribute("shape")=="block"&&O.setAttribute("shape","default")})}render(){const q={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},O=this.direction=="row",B={display:"block",alignSelf:O?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},D={marginLeft:O?"":".55em"};return $$2`<menu part="menu" class="shadowable" style="${i$k(q)}"><slot @slotchange="${this.mainSlotChange}"></slot><sonic-pop style="${i$k(B)}" class="${this.hasMoreElements?"":"hidden"}"><sonic-menu-item style="${i$k(D)}" class="more-btn" shape="${this.moreShape}" align="center"><sonic-icon size="xl" name="${O?"more-vert":"more-horiz"}"></sonic-icon></sonic-menu-item><slot name="more" @slotchange="${this.checkIfMore}" slot="content"></slot></sonic-pop></menu>`}};MenuItems.styles=[r$k`:host { display: block; --sc-menu-gap:.15rem; } :host > menu { display: flex; border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em); margin: 0; padding: 0.35em; } .hidden { display:none !important; } /*OMBRE*/ :host([shadow]) .shadowable, :host([shadow="md"]) .shadowable, :host([shadow="true"]) .shadowable { box-shadow: var(--sc-shadow); } :host([shadow="sm"]) .shadowable { box-shadow: var(--sc-shadow-sm); } :host([shadow="lg"]) .shadowable { box-shadow: var(--sc-shadow-lg); } :host([shadow="none"]) .shadowable { box-shadow: none; }`],t$2([e$b({type:String,reflect:!0})],MenuItems.prototype,"size",2),t$2([e$b({type:String,reflect:!0})],MenuItems.prototype,"direction",2),t$2([e$b({type:String})],MenuItems.prototype,"gap",2),t$2([e$b({type:String,reflect:!0})],MenuItems.prototype,"align",2),t$2([e$b({type:String,reflect:!0})],MenuItems.prototype,"shadow",2),t$2([e$b({type:String})],MenuItems.prototype,"moreShape",2),t$2([e$b({type:String})],MenuItems.prototype,"minWidth",2),t$2([l$q({selector:"sonic-menu-item"})],MenuItems.prototype,"menuChildren",2),t$2([l$q({slot:"more",selector:"*"})],MenuItems.prototype,"moreElements",2),t$2([t$a()],MenuItems.prototype,"hasMoreElements",2),MenuItems=t$2([n$j(d$b)],MenuItems);try{customElements.define(d$b,MenuItems)}catch{}var l$a=Object.defineProperty,d$a=Object.getOwnPropertyDescriptor,n$5=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$a(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l$a(O,B,U),U};const i$b="sonic-modal-actions";let ModalActions=class extends s$a{firstUpdated(){var q;(q=this.buttons)==null||q.forEach(O=>{O.addEventListener("click",()=>{var B;O.getAttribute("hideModal")!="false"&&((B=this.closest("sonic-modal"))==null||B.hide())})})}render(){return $$2`<slot></slot>`}};ModalActions.styles=[r$k`:host { display: flex; gap: 0.5rem; margin-top: auto; padding-top: 1rem; }`],n$5([l$q({selector:"sonic-button"})],ModalActions.prototype,"buttons",2),ModalActions=n$5([n$j(i$b)],ModalActions);try{customElements.define(i$b,ModalActions)}catch{}var h=Object.defineProperty,a$8=Object.getOwnPropertyDescriptor,r$7=(q,O,B,D)=>{for(var U=D>1?void 0:D?a$8(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&h(O,B,U),U};const c$4="sonic-modal-title";let ModalTitle=class extends s$a{render(){return $$2`<slot></slot>`}};ModalTitle.styles=[r$k`:host { font-weight: bold; font-size: 1.5rem; display: block; line-height: var(--sc-headings-line-height); font-family: var(--sc-headings-font-family); }`],ModalTitle=r$7([n$j(c$4)],ModalTitle);try{customElements.define(c$4,ModalTitle)}catch{}var a$7=Object.defineProperty,f$5=Object.getOwnPropertyDescriptor,c$3=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$5(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&a$7(O,B,U),U};const i$a="sonic-modal-subtitle";let ModalSubTitle=class extends s$a{render(){return $$2`<slot></slot>`}};ModalSubTitle.styles=[r$k`:host { font-size: 1.1rem; display: block; text-transform: uppercase; line-height: var(--sc-headings-line-height); font-family: var(--sc-headings-font-family); }`],ModalSubTitle=c$3([n$j(i$a)],ModalSubTitle);try{customElements.define(i$a,ModalSubTitle)}catch{}var p$5=Object.defineProperty,a$6=Object.getOwnPropertyDescriptor,l$9=(q,O,B,D)=>{for(var U=D>1?void 0:D?a$6(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$5(O,B,U),U};const o$2="sonic-modal-content";let ModalContent=class extends s$a{render(){return $$2`<slot></slot>`}};ModalContent.styles=[r$k`:host { display: block; }`],ModalContent=l$9([n$j(o$2)],ModalContent);try{customElements.define(o$2,ModalContent)}catch{}var m$6=Object.defineProperty,l$8=Object.getOwnPropertyDescriptor,r$6=(q,O,B,D)=>{for(var U=D>1?void 0:D?l$8(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$6(O,B,U),U};const a$5="sonic-modal-close";let ModalClose=class extends s$a{render(){return $$2`<sonic-button shape="circle" variant="ghost" @click="${this.handleClick}"><sonic-icon name="cancel" size="lg"></sonic-icon></sonic-button>`}handleClick(){this.closest("sonic-modal").hide()}};ModalClose.styles=[r$k`:host { position: absolute; right: 0.6rem; top: 0.6rem; z-index: 20; }`],ModalClose=r$6([n$j(a$5)],ModalClose);try{customElements.define(a$5,ModalClose)}catch{}var p$4=Object.defineProperty,u$1=Object.getOwnPropertyDescriptor,t$1=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$4(O,B,U),U};const s$1="sonic-modal";let Modal=class extends L$1(s$a){constructor(){super(...arguments),this.hideOnOverlayClick=!0,this.hideOnEscape=!0,this.align="center",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.fullScreen=!1,this.visible=!1}static create(q){const O=document.createElement(s$1);return O.innerHTML=`<sonic-modal-close></sonic-modal-close><sonic-modal-content>${q.content}</sonic-modal-content>`||"",(document.querySelector("sonic-theme")||document.body).appendChild(O),O.show(),O}connectedCallback(){super.connectedCallback()}updated(){const q=this;document.addEventListener("keydown",this.handleEscape),q.closeBtn.forEach(O=>{O.addEventListener("click",function(){q.hide()},{once:!0})})}render(){if(this.visible==!1)return w$1;this.handleFullsceen();const q={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},O={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return $$2`<div class="modal-wrapper" style="${i$k(O)}" ${$$1({out:f$f})} tabindex="0"><div part="modal" class="modal custom-scroll" style="${i$k(q)}" ${$$1({keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]})}><div class="modal-content"><slot></slot></div></div></div><div class="overlay" @click="${this.hideOnOverlayClick?this.hide:""}" ${$$1({keyframeOptions:{duration:500},in:p$g,out:[{opacity:0,pointerEvents:"none"}]})}></div>`}show(){var q,O;this.visible=!0,(q=this.modalElement)==null||q.setAttribute("tabindex","0"),(O=this.modalElement)==null||O.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var q;this.visible=!1,(q=this.modalElement)==null||q.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide"))}dispose(){this.hide(),this.remove()}handleEscape(q){q.key==="Escape"&&[...document.querySelectorAll(s$1)].forEach(O=>{this.hideOnEscape==!0&&O.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};if(Modal.styles=[customScroll,r$k`:host { --sc-modal-py: 2.5rem; --sc-modal-px: 1.5rem; --sc-modal-content: var(--sc-base-content); --sc-modal-bg: var(--sc-base); --sc-modal-max-w: min(100vw, 64ch); --sc-modal-max-h: 80vh; --sc-modal-scrollbar-bg: var(--sc-base-300); --sc-modal-rounded: var(--sc-rounded-lg); } * { box-sizing: border-box; } .modal-wrapper { position: fixed; bottom: 0; left: 0; width: 100%; z-index: 990; text-align: center; align-items: center; justify-content: center; flex-direction: column; display: flex; pointer-events: none; } .modal-content { overflow-y: auto; display: flex; flex-direction: column; text-align: center; align-items: center; min-height: 10rem; } .modal { background: var(--sc-base); width: 100%; box-shadow: var(--sc-shadow-lg); border-radius: var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0; pointer-events: auto; /*overflow: hidden;*/ transform: translateZ(0); } .overlay { background: var(--sc-base-200); left: 0; top: 0; right: 0; bottom: 0; z-index: 900; opacity: 0.8; position: fixed; } ::slotted(sonic-modal-title) { margin-bottom: 1rem; } ::slotted(sonic-modal-subtitle) { margin-top: -0.45rem; margin-bottom: 1rem; } @media (max-width: 767.5px) { .modal-wrapper, .modal { max-width: none !important; width: 100% !important; } } @media (min-width: 768px) { .modal-wrapper { top: 50%; left: 50%; bottom: auto; right: auto; transform: translateX(-50%) translateY(-50%); } .modal { top: 50%; bottom: auto; right: auto; border-radius: var(--sc-modal-rounded); } } :host([align="left"]) .modal-content { text-align: left; align-items: flex-start; } :host([align="right"]) .modal-content { text-align: right; align-items: flex-end; } /* Border radius */ :host([rounded="none"]) modal { --sc-img-radius: 0 !important; }`],t$1([e$b({type:Boolean,reflect:!0})],Modal.prototype,"hideOnOverlayClick",2),t$1([e$b({type:Boolean,reflect:!0})],Modal.prototype,"hideOnEscape",2),t$1([e$b({type:String,reflect:!0})],Modal.prototype,"align",2),t$1([e$b({type:String})],Modal.prototype,"padding",2),t$1([e$b({type:String})],Modal.prototype,"maxWidth",2),t$1([e$b({type:String})],Modal.prototype,"maxHeight",2),t$1([e$b({type:String})],Modal.prototype,"width",2),t$1([e$b({type:String})],Modal.prototype,"height",2),t$1([e$b({type:Boolean,reflect:!0})],Modal.prototype,"fullScreen",2),t$1([e$b({type:Boolean,reflect:!0})],Modal.prototype,"visible",2),t$1([i$p(".modal-wrapper")],Modal.prototype,"modalWrapper",2),t$1([i$p(".modal")],Modal.prototype,"modalElement",2),t$1([l$q({selector:"sonic-modal-close"})],Modal.prototype,"closeBtn",2),Modal=t$1([n$j(s$1)],Modal),typeof window<"u"){let q=window;q.SonicModal=Modal}try{customElements.define(s$1,Modal)}catch{}var u=Object.defineProperty,f$4=Object.getOwnPropertyDescriptor,e$1=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$4(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&u(O,B,U),U};const v$2={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"},d$9="sonic-alert";let Alert=class extends s$a{constructor(){super(...arguments),this.label="",this.text="",this.size="md",this.background=!1,this.status="default"}render(){return $$2`<div part="alert" class="alert"><div>${this.status&&$$2`<sonic-icon name="${v$2[this.status]}"></sonic-icon>`}</div><div>${this.label?$$2`<span class="label">${this.label} :</span>`:w$1} ${this.text}<slot></slot></div></div>`}};Alert.styles=[r$k`:host { --sc-alert-color: inherit; --sc-alert-rounded: var(--sc-rounded); --sc-alert-fw: var(--sc-font-weight-base); --sc-alert-fst: var(--sc-font-style-base); --sc-alert-fs: 1rem; --sc-alert-label-fw: bold; display: block; font-size: var(--sc-alert-fs); font-weight: var(--sc-alert-fw); font-style: var(--sc-alert-fst); } .alert { color: var(--sc-alert-color); position: relative; display: flex; gap: 0.4em; line-height: 1.2; border-radius: var(--sc-alert-rounded); } .label { font-weight: var(--sc-alert-label-fw); } :host([status="warning"]) { --sc-alert-color: var(--sc-warning); } :host([status="error"]) { --sc-alert-color: var(--sc-danger); } :host([status="info"]) { --sc-alert-color: var(--sc-info); } :host([status="success"]) { --sc-alert-color: var(--sc-success); } /*background*/ :host([background]) .alert { background: var(--sc-base); padding: 0.8em 1.15em; } :host([background]) .alert:before { background-color: currentColor; content: ""; display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; opacity: 0.08; border-radius: var(--sc-alert-rounded); pointer-events: none; } :host([background]) > div { z-index: 2; position: relative; } /*SIZE*/ :host([size="xs"]) { --sc-alert-fs: 0.75rem; } :host([size="sm"]) { --sc-alert-fs: 0.85rem; } :host([size="lg"]) { --sc-alert-fs: 1.2rem; } /*Rounded*/ :host([size="xs"]) .alert { --sc-alert-rounded: var(--sc-rounded-sm); } :host([size="sm"]) .alert { --sc-alert-rounded: var(--sc-rounded-sm); }`],e$1([e$b({type:String})],Alert.prototype,"label",2),e$1([e$b({type:String})],Alert.prototype,"text",2),e$1([e$b({type:String,reflect:!0})],Alert.prototype,"size",2),e$1([e$b({type:Boolean,reflect:!0})],Alert.prototype,"background",2),e$1([e$b({type:String,reflect:!0})],Alert.prototype,"status",2),Alert=e$1([n$j(d$9)],Alert);try{customElements.define(d$9,Alert)}catch{}var m$5=Object.defineProperty,d$8=Object.getOwnPropertyDescriptor,a$4=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$8(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$5(O,B,U),U};const f$3="sonic-toast-message-subscriber";let MessageSubscriber=class extends L$1(s$a){constructor(){super(...arguments),this._messages=[],this.success=null,this.status=null,this._message="",this._data=""}get messages(){return this._messages}set messages(q){this._messages=q,this.messages&&q.forEach(O=>{O.type=="public"&&SonicToast$1.add({text:O.content,status:O.status})})}get message(){return this._message}set message(q){this._message=q,!!this.message&&this.props.success===!1&&(this.props.public_message||SonicToast$1.add({text:this.message,status:"error"}))}get data(){return this._data}set data(q){this._data=q;const O={text:"Votre produit a bien \xE9t\xE9 ajout\xE9",status:"success"};Array.isArray(this.data)&&this.props.success===!0&&SonicToast$1.add(O),this.data==""&&this.props.status===!0&&SonicToast$1.add(O),this.props.success===!1&&(this.props.public_message||SonicToast$1.add({text:this.data,status:"error"}))}render(){return w$1}};a$4([e$b({type:Boolean})],MessageSubscriber.prototype,"success",2),a$4([e$b({type:Boolean})],MessageSubscriber.prototype,"status",2),a$4([e$b({type:Array})],MessageSubscriber.prototype,"messages",1),a$4([e$b({type:String})],MessageSubscriber.prototype,"message",1),a$4([e$b()],MessageSubscriber.prototype,"data",1),MessageSubscriber=a$4([n$j(f$3)],MessageSubscriber);var c$2=Object.defineProperty,m$4=Object.getOwnPropertyDescriptor,i$9=(q,O,B,D)=>{for(var U=D>1?void 0:D?m$4(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&c$2(O,B,U),U};const d$7="sonic-tooltip";let Tooltip=class extends s$a{constructor(){super(...arguments),this.label="",this.disabled=!1}render(){let q=this.disabled||this.label==""?"disabled":"";return $$2`<div data-tooltip-text="${this.label.trim().replace("&nbsp;"," ")}" class="tooltip ${q}"><slot></slot></div>`}};Tooltip.styles=[r$k`.tooltip { position: relative; display: flex; align-items: center; text-align: center; } .tooltip:before { position: absolute; content: attr(data-tooltip-text); font-size: 0.85rem; display: block; opacity: 0; pointer-events: none; bottom: calc(100% + 0.25rem); left: 50%; transform: translateX(-50%); background: var(--sc-base-content, #111827); padding: 0.25rem; border-radius: 0.25rem; color: var(--sc-base, #fff); z-index: 999; display: none; line-height: 1.1; width: max-content; max-width: 20rem; } .tooltip:not(.disabled):hover:before { opacity: 1; display: block; }`],i$9([e$b({type:String})],Tooltip.prototype,"label",2),i$9([e$b({type:Boolean})],Tooltip.prototype,"disabled",2),Tooltip=i$9([n$j(d$7)],Tooltip);try{customElements.define(d$7,Tooltip)}catch{}var k=Object.defineProperty,v$1=Object.getOwnPropertyDescriptor,r$5=(q,O,B,D)=>{for(var U=D>1?void 0:D?v$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&k(O,B,U),U};const x="sonic-pop";let Pop=class extends s$a{constructor(){super(...arguments),this.open=!1,this.toggle="true",this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=Number.NaN,this.lastContentY=Number.NaN}runPositioning(){!this.positioningRuns||(this.positioningRuns=!0,this._setUpMenu(this.placement),window.requestAnimationFrame(()=>this.runPositioning()))}_toggle(q){this.open&&this.toggle=="false"||q.type=="keydown"&&(q.key!="ArrowDown"||this.open)||(this.open=!this.open,this.open?this._show():this._hide())}_show(){this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=Number.NaN,this.lastContentY=Number.NaN,this.runPositioning())}_hide(){this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1}_handleClosePop(q){let O=q.composedPath(),B=O[0];Pop.pops.forEach(D=>{const U=O.includes(D),W=O.includes(D.querySelector('[slot="content"]')),K=r$h.getAncestorAttributeValue(B,"data-on-select")==="keep";q.type=="pointerdown"&&U||q.type=="click"&&(U&&K||!W)||D._hide()})}connectedCallback(){super.connectedCallback(),Pop.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop)),Pop.pops.add(this)}disconnectedCallback(){super.disconnectedCallback(),Pop.pops.delete(this),Pop.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop))}_setUpMenu(q){var ht;const O=(ht=this.popContent)==null?void 0:ht.getBoundingClientRect(),B=8,D=20,U=this.getBoundingClientRect();if(!this.offsetParent)return;let W=this.offsetParent.getBoundingClientRect(),K=U.left-W.left,Y=U.top-W.top,Z=K,G=Y,st=Y-O.height-B,tt=K-O.width-2*B,Q=K+U.width+2*B,rt=Y+U.height+B;switch(q){case"bottom":G=rt;break;case"top":G=st;break;case"left":Z=tt;break;case"right":Z=Q;break}let ot=window.innerWidth-Q-W.left-O.width-D;ot<0&&q==="right"&&(Z=tt),ot<0&&["top","bottom"].includes(q)&&(Z=Math.max(Z+ot,tt+U.width)),-W.left-tt>D&&q==="left"&&(Z=Q);let nt=window.innerHeight-rt-W.top-O.height-D;nt<0&&q==="bottom"&&(G=st),nt<0&&["left","right"].includes(q)&&(G=Math.max(G+nt,st+U.height)),-W.top-st>-D&&q==="top"&&(G=rt),this.lastContentX=Z,this.lastContentY=G,Object.assign(this.popContent.style,{left:`${Z}px`,top:`${G}px`})}render(){return $$2`<slot @click="${this._toggle}" @keydown="${this._toggle}" class="contents"></slot><slot name="content" tabindex="-1" part="content" class="${this.open?"is-open":""}"></slot>`}};Pop.pops=new Set,Pop.styles=[r$k`:host { display: inline-block; vertical-align: middle; } slot[name="content"] { background-color: var(--sc-base); position: absolute; z-index: 50; display: block; transform: translateY(1rem) scale(0.95); opacity: 0; pointer-events: none; transition-duration: 0.15s ; transition-timing-function: ease; transition-property:all; border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em); } slot[name="content"].is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; transition-property:scale, opacity; transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225); } /*OMBRE*/ :host([shadow]) slot[name="content"], :host([shadow="md"]) slot[name="content"], :host([shadow="true"]) slot[name="content"] { box-shadow: var(--sc-shadow); } :host([shadow="sm"]) slot[name="content"] { box-shadow: var(--sc-shadow-sm); } :host([shadow="none"]) slot[name="content"] { box-shadow: none; } :host([shadow="lg"]) slot[name="content"] { box-shadow: var(--sc-shadow-lg); }`],r$5([t$a()],Pop.prototype,"open",2),r$5([i$p("slot:not([name=content])")],Pop.prototype,"popBtn",2),r$5([i$p("slot[name=content]")],Pop.prototype,"popContent",2),r$5([e$b({type:String})],Pop.prototype,"toggle",2),r$5([e$b({type:String,reflect:!0})],Pop.prototype,"shadow",2),r$5([e$b({type:String})],Pop.prototype,"placement",2),Pop=r$5([n$j(x)],Pop);try{customElements.define(x,Pop)}catch{}var l$7=Object.defineProperty,v=Object.getOwnPropertyDescriptor,r$4=(q,O,B,D)=>{for(var U=D>1?void 0:D?v(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l$7(O,B,U),U};const p$3="sonic-divider";let Divider=class extends s$a{constructor(){super(...arguments),this.label="",this.size="md",this.align="center"}firstUpdated(){var q,O;(this.label||((q=this.slotNodes)==null?void 0:q.length))&&((O=this.divider)==null||O.classList.add("has-text"))}render(){return $$2`<div part="divider"><span class="text">${this.label}<slot></slot></span></div>`}};Divider.styles=[r$k`:host { --sc-divider-my: 0.5rem; --sc-divider-mx: 0; --sc-divider-border-width: min(2px, 0.15rem); --sc-divider-border-color: var(--sc-base-200); --sc-divider-border-style: solid; --sc-divider-color: var(--sc-base-500); --sc-divider-ff: var(--sc-font-family-base); --sc-divider-fs: 1rem; --sc-divider-fw: var(--sc-font-weight-base); --sc-divider-fst: var(--sc-font-style-base); margin: var(--sc-divider-my) var(--sc-divider-mx); font-size: var(--sc-divider-fs); font-style: var(--sc-divider-fst); font-family: var(--sc-divider-ff); font-weight: var(--sc-divider-fw); color: var(--sc-divider-color); display: block; } /*SIZE*/ :host([size="xs"]) { --sc-divider-my: 0.5rem; --sc-divider-fs: 0.75rem; } :host([size="sm"]) { --sc-divider-my: 0.75rem; --sc-divider-fs: 0.85rem; } :host([size="md"]) { --sc-divider-my: 1.25rem; } :host([size="lg"]) { --sc-divider-my: 1.85rem; } :host([size="xl"]) { --sc-divider-my: 2.25rem; } :host([size="2xl"]) { --sc-divider-my: 3rem; } div { display: flex; align-items: center; width: 100%; } div:before { content: ""; flex-grow: 1; border-top: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color); width: 100%; } div:after { content: ""; flex-grow: 1; border-top: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color); width: 100%; } /*ALIGNEMENT*/ :host([align="left"]) div:before { display: none; } :host([align="right"]) div:after { display: none; } /*TEXT*/ .text { flex-shrink: 0; max-width: 80%; } .no-text .text { display: none; } .has-text { gap: 0.5rem; }`],r$4([o$c()],Divider.prototype,"slotNodes",2),r$4([i$p("div")],Divider.prototype,"divider",2),r$4([e$b({type:String})],Divider.prototype,"label",2),r$4([e$b({type:String,reflect:!0})],Divider.prototype,"size",2),r$4([e$b({type:String,reflect:!0})],Divider.prototype,"align",2),Divider=r$4([n$j("sonic-divider")],Divider);try{customElements.define(p$3,Divider)}catch{}var i$8=Object.defineProperty,a$3=Object.getOwnPropertyDescriptor,f$2=(q,O,B,D)=>{for(var U=D>1?void 0:D?a$3(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&i$8(O,B,U),U};const c$1="sonic-card-header-description";let CardHeaderDescription=class extends s$a{render(){return $$2`<div><slot></slot></div>`}};CardHeaderDescription.styles=[r$k`div { margin-top: .1em; font-family: var(--sc-font-family-base); font-size: .7em; font-weight: var(--sc-font-style-base); }`],CardHeaderDescription=f$2([n$j(c$1)],CardHeaderDescription);try{customElements.define(c$1,CardHeaderDescription)}catch{}var l$6=Object.defineProperty,f$1=Object.getOwnPropertyDescriptor,r$3=(q,O,B,D)=>{for(var U=D>1?void 0:D?f$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l$6(O,B,U),U};const d$6="sonic-card-header";let CardHeader=class extends s$a{render(){return $$2`<div class="header"><div class="header-content">${this.label} ${this.description?$$2`<sonic-card-header-description>${this.description}</sonic-card-header-description>`:""}<slot></slot></div><slot name="suffix"></slot></div>`}};CardHeader.styles=[r$k`:host { --sc-card-header-mb: 1rem; --sc-card-header-font-size: 1.875rem; --sc-card-header-font-weight: var(--sc-headings-font-weight); --sc-card-header-font-style: var(--sc-headings-font-style); --sc-card-header-family: var(--sc-headings-font-family); --sc-card-header-line-height: var(--sc-headings-line-height); } .header { display: flex; align-items: flex-start; gap: .5em 1em; margin-bottom: var(--sc-card-header-mb); line-height: var(--sc-card-header-line-height); font-family: var(--sc-card-header-font-family); font-size: var(--sc-card-header-font-size); font-style: var(--sc-card-header-font-style); font-weight: var(--sc-card-header-font-weight); } .header-content { flex-grow: 1; } slot[name="suffix"] { flex-shrink: 0; }`],r$3([e$b()],CardHeader.prototype,"label",2),r$3([e$b()],CardHeader.prototype,"description",2),CardHeader=r$3([n$j(d$6)],CardHeader);try{customElements.define(d$6,CardHeader)}catch{}var i$7=Object.defineProperty,d$5=Object.getOwnPropertyDescriptor,l$5=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$5(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&i$7(O,B,U),U};const n$4="sonic-card-main";let CardMain=class extends s$a{render(){return $$2`<div><slot></slot></div>`}};CardMain=l$5([n$j(n$4)],CardMain);try{customElements.define(n$4,CardMain)}catch{}var i$6=Object.defineProperty,f=Object.getOwnPropertyDescriptor,o$1=(q,O,B,D)=>{for(var U=D>1?void 0:D?f(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&i$6(O,B,U),U};const r$2="sonic-card-footer";let CardFooter=class extends s$a{render(){return $$2`<slot></slot>`}};CardFooter=o$1([n$j(r$2)],CardFooter);try{customElements.define(r$2,CardFooter)}catch{}var i$5=Object.defineProperty,l$4=Object.getOwnPropertyDescriptor,d$4=(q,O,B,D)=>{for(var U=D>1?void 0:D?l$4(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&i$5(O,B,U),U};const n$3="sonic-card";let Card=class extends s$a{constructor(){super(...arguments),this.type="default"}render(){return $$2`<div part="card" class="card"><slot></slot></div>`}};Card.styles=[r$k`:host { --sc-card-padding: 1.5rem; --sc-card-color: var(--sc-base-content); --sc-card-bg: var(--sc-base); --sc-card-rounded: var(--sc-rounded-lg); --sc-card-shadow: var(--sc-shadow-lg); } .card { padding: var(--sc-card-padding); background-color: var(--sc-card-bg); border-radius: var(--sc-card-rounded); box-shadow: var(--sc-card-shadow); color: var(--sc-card-color); } /*TYPES*/ :host([type="primary"]) { --sc-card-color: var(--sc-primary-content); --sc-badge-bg: var(--sc-primary); } :host([type="warning"]) { --sc-card-color: var(--sc-warning-content); --sc-card-bg: var(--sc-warning); } :host([type="danger"]) { --sc-card-color: var(--sc-danger-content); --sc-card-bg: var(--sc-danger); } :host([type="info"]) { --sc-card-color: var(--sc-info-content); --sc-card-bg: var(--sc-info); } :host([type="success"]) { --sc-card-color: var(--sc-success-content); --sc-card-bg: var(--sc-success); } :host([type="light"]) { --sc-card-color: var(--sc-base-content); --sc-card-bg: var(--sc-base-100); } :host([type="neutral"]) { --sc-card-color: var(--sc-base); --sc-card-bg: var(--sc-base-content); } :host([type="invert"]) { --sc-card-color: var(--sc-base); --sc-card-bg: var(--sc-base-900); }`],d$4([e$b({type:String,reflect:!0})],Card.prototype,"type",2),Card=d$4([n$j(n$3)],Card);try{customElements.define(n$3,Card)}catch{}const typesColor=r$k`:host{ --sc-color:inherit; color:var(--sc-color); } :host([type="primary"]) { --sc-color: var(--sc-primary); } :host([type="warning"]) { --sc-color: var(--sc-warning); } :host([type="danger"]) { --sc-color: var(--sc-danger); } :host([type="info"]) { --sc-color: var(--sc-info); } :host([type="success"]) { --sc-color: var(--sc-success); } .inherit-color{ color:var(--sc-color); }`;r$k`:host{ --sc-color:inherit; --sc-bg:inherit; color:var(--sc-color); background:var(--sc-bg); } :host([type="primary"]) { --sc-color: var(--sc-primary-content); --sc-bg: var(--sc-primary); } :host([type="warning"]) { --sc-color: var(--sc-warning-content); --sc-bg: var(--sc-warning); } :host([type="danger"]) { --sc-color: var(--sc-danger-content); --sc-bg: var(--sc-danger); } :host([type="info"]) { --sc-color: var(--sc-info-content); --sc-bg: var(--sc-info); } :host([type="success"]) { --sc-color: var(--sc-success-content); --sc-bg: var(--sc-success); } .inherit-bg{ color:inherit; }`;var l$3=Object.defineProperty,p$2=Object.getOwnPropertyDescriptor,n$2=(q,O,B,D)=>{for(var U=D>1?void 0:D?p$2(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l$3(O,B,U),U};const i$4="sonic-tr";let TableTr=class extends s$a{render(){return $$2`<slot></slot>`}};TableTr.styles=[typesColor,r$k`:host { display: table-row; }`],TableTr=n$2([n$j(i$4)],TableTr);try{customElements.define(i$4,TableTr)}catch{}var m$3=Object.defineProperty,d$3=Object.getOwnPropertyDescriptor,r$1=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$3(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&m$3(O,B,U),U};const l$2="sonic-th";let TableTh=class extends s$a{render(){const q={textAlign:this.align,minWidth:this.minWidth};return $$2`<th part="th" style="${i$k(q)}" colspan="${l$j(this.colSpan)}" rowspan="${l$j(this.rowSpan)}"><slot></slot></th>`}};TableTh.styles=[typesColor,r$k`:host { display: contents; background:var(--sc-table-bg); position:sticky; top:0; z-index:20; } th { all: inherit; display: table-cell; border-bottom: calc(var(--sc-border-width) * 1.5) solid var(--sc-table-border-color); text-transform: var(--sc-table-th-tt); font-weight: var(--sc-table-th-fw); font-size: var(--sc-table-th-fs); padding: var(--sc-table-th-py) var(--sc-table-th-px); }`],r$1([e$b({type:Number})],TableTh.prototype,"colSpan",2),r$1([e$b({type:Number})],TableTh.prototype,"rowSpan",2),r$1([e$b({type:String})],TableTh.prototype,"align",2),r$1([e$b({type:String})],TableTh.prototype,"minWidth",2),TableTh=r$1([n$j(l$2)],TableTh);try{customElements.define(l$2,TableTh)}catch{}var a$2=Object.defineProperty,y=Object.getOwnPropertyDescriptor,s=(q,O,B,D)=>{for(var U=D>1?void 0:D?y(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&a$2(O,B,U),U};const c="sonic-td";let TableTd=class extends s$a{render(){const q={textAlign:this.align,minWidth:this.minWidth};return $$2`<td part="td" style="${i$k(q)}" colspan="${l$j(this.colSpan)}" rowspan="${l$j(this.rowSpan)}"><slot></slot></td>`}};TableTd.styles=[typesColor,r$k`:host { display: contents; } td { all: inherit; display: table-cell; padding: var(--sc-table-td-py) var(--sc-table-td-px); }`],s([e$b({type:Number})],TableTd.prototype,"colSpan",2),s([e$b({type:Number})],TableTd.prototype,"rowSpan",2),s([e$b({type:String})],TableTd.prototype,"align",2),s([e$b({type:String})],TableTd.prototype,"minWidth",2),TableTd=s([n$j(c)],TableTd);try{customElements.define(c,TableTd)}catch{}var l$1=Object.defineProperty,p$1=Object.getOwnPropertyDescriptor,n$1=(q,O,B,D)=>{for(var U=D>1?void 0:D?p$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l$1(O,B,U),U};const i$3="sonic-thead";let TableThead=class extends s$a{render(){return $$2`<slot></slot>`}};TableThead.styles=[r$k`:host { display: table-header-group; }`],TableThead=n$1([n$j(i$3)],TableThead);try{customElements.define(i$3,TableThead)}catch{}var a$1=Object.defineProperty,m$2=Object.getOwnPropertyDescriptor,d$2=(q,O,B,D)=>{for(var U=D>1?void 0:D?m$2(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&a$1(O,B,U),U};const i$2="sonic-tbody";let TableTbody=class extends s$a{render(){return $$2`<tbody><slot></slot></tbody>`}};TableTbody.styles=[r$k`:host { display: table-row-group; } ::slotted(sonic-tr:nth-child(odd)){ background:var(--sc-base-50); } ::slotted(sonic-tr:hover) { background:var(--sc-base-100); } ::slotted(sonic-tr:not(:last-child)){ border-bottom:var(--sc-form-border-width) solid var(--sc-base-200) !important; }`],TableTbody=d$2([n$j(i$2)],TableTbody);try{customElements.define(i$2,TableTbody)}catch{}var l=Object.defineProperty,d$1=Object.getOwnPropertyDescriptor,r=(q,O,B,D)=>{for(var U=D>1?void 0:D?d$1(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&l(O,B,U),U};const i$1="sonic-tfoot";let TableTfoot=class extends s$a{render(){return $$2`<tfoot><slot></slot></tfoot>`}};TableTfoot.styles=[r$k`:host { display: contents; }`],TableTfoot=r([n$j(i$1)],TableTfoot);try{customElements.define(i$1,TableTfoot)}catch{}var n=Object.defineProperty,d=Object.getOwnPropertyDescriptor,a=(q,O,B,D)=>{for(var U=D>1?void 0:D?d(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&n(O,B,U),U};const m$1="sonic-caption";let TableCaption=class extends s$a{render(){return $$2`<slot></slot>`}};TableCaption.styles=[r$k`:host { display:table-caption; font-size:.75rem; color:var(--sc-table-caption-color); padding: var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py) ); }`],TableCaption=a([n$j(m$1)],TableCaption);try{customElements.define(m$1,TableCaption)}catch{}var b=Object.defineProperty,p=Object.getOwnPropertyDescriptor,t=(q,O,B,D)=>{for(var U=D>1?void 0:D?p(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&b(O,B,U),U};const m="sonic-table";let Table=class extends s$a{constructor(){super(...arguments),this.size="md",this.striped=!1,this.sticky=!1,this.bordered=!1,this.hover=!1}render(){const q={maxHeight:this.maxHeight};return $$2`<div class="table-container custom-scroll" style="${i$k(q)}"><div class="table" ?striped="${this.striped}" ?hover="${this.hover}" ?sticky="${this.sticky}"><slot></slot></div></div>`}};Table.styles=[customScroll,r$k`:host { --sc-table-fw: var(--sc-font-weight-base); --sc-table-fst: var(--sc-font-style-base); --sc-table-fs: 1rem; --sc-table-border-color: var(--sc-base-200); --sc-table-caption-color: var(--sc-base-400); --sc-table-bg: var(--sc-base); --sc-table-th-fs: .85em; --sc-table-th-fw: bold; --sc-table-th-tt: uppercase; --sc-table-th-px: var(--sc-table-td-px); --sc-table-th-py: calc(1.8 * var(--sc-table-td-py) ); --sc-table-td-px: .5em; --sc-table-td-py: .5em; display:block; } .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; } .table { width: 100%; font-size: var(--sc-table-fs); display: table; box-sizing:border-box; } /*SIZES*/ :host([size="2xs"]) { --sc-table-fs: 0.6rem; } :host([size="xs"]) { --sc-table-fs: 0.75rem; } :host([size="sm"]) { --sc-table-fs: 0.85rem; } :host([size="lg"]) { --sc-table-fs: 1.2rem; } :host([size="xl"]) { --sc-table-fs: 1.5rem; } :host([bordered]) .table-container { border:var(--sc-border-width) solid var(--sc-table-border-color) !important; }`],t([e$b({type:String,reflect:!0})],Table.prototype,"size",2),t([e$b({type:Boolean,reflect:!0})],Table.prototype,"striped",2),t([e$b({type:Boolean,reflect:!0})],Table.prototype,"sticky",2),t([e$b({type:Boolean,reflect:!0})],Table.prototype,"bordered",2),t([e$b({type:Boolean,reflect:!0})],Table.prototype,"hover",2),t([e$b({type:String})],Table.prototype,"maxHeight",2),Table=t([n$j(m)],Table);try{customElements.define(m,Table)}catch{}let i=window;i.SonicPublisherManager||(i.SonicPublisherManager=PublisherManager$1),i.SonicDataBindObserver||(i.SonicDataBindObserver=l$p);const Fetcher=L,FormCheckable=d$m,FormElement=V,FormInput=m$b,Subscriber=L$1,TemplatesContainer=T$2;let e=window;e["concorde-mixins"]=e["concorde-mixins"]||{},e["concorde-mixins"]={Fetcher,FormCheckable,FormElement,FormInput,Subscriber,TemplatesContainer};const SonicToast=SonicToast$1,SonicModal=Modal;let o=window;o["concorde-components"]=o["concorde-components"]||{},o["concorde-components"]={SonicToast,SonicModal};