@supersoniks/concorde 5.0.4 → 5.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/.agents/skills/concorde-component-docs/SKILL.md +194 -0
  2. package/.agents/skills/concorde-component-docs/template.md +45 -0
  3. package/ai/cursor/rules/concorde-theme.mdc +1 -1
  4. package/ai/cursor/rules/concorde.mdc +1 -1
  5. package/ai/skills/concorde/SKILL.md +1 -1
  6. package/ai/skills/concorde-theme/SKILL.md +21 -10
  7. package/build-infos.json +1 -1
  8. package/concorde-core.bundle.js +528 -534
  9. package/concorde-core.es.js +4257 -4212
  10. package/dist/concorde-core.bundle.js +528 -534
  11. package/dist/concorde-core.es.js +4257 -4212
  12. package/dist/docs-mock-api-sw.js +2 -0
  13. package/dist/docs-mock-api-sw.js.map +2 -2
  14. package/docs/assets/index-CD4WyL6o.css +1 -0
  15. package/docs/assets/{index-D8MVWqY6.js → index-wVZpLVYW.js} +1221 -1350
  16. package/docs/crawl/core/components/ui/alert/alert.html +172 -71
  17. package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +113 -5
  18. package/docs/crawl/core/components/ui/badge/badge.html +157 -79
  19. package/docs/crawl/core/components/ui/button/button.html +1 -0
  20. package/docs/crawl/core/components/ui/captcha/captcha.html +90 -8
  21. package/docs/crawl/core/components/ui/card/card.html +222 -68
  22. package/docs/crawl/core/components/ui/divider/divider.html +117 -31
  23. package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +232 -101
  24. package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +95 -52
  25. package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +97 -38
  26. package/docs/crawl/core/components/ui/form/input/input.html +3 -3
  27. package/docs/crawl/core/components/ui/form/textarea/textarea.html +3 -3
  28. package/docs/crawl/core/components/ui/group/group.html +60 -38
  29. package/docs/crawl/core/components/ui/icon/icon.html +136 -47
  30. package/docs/crawl/core/components/ui/image/image.html +244 -56
  31. package/docs/crawl/core/components/ui/link/link.html +67 -9
  32. package/docs/crawl/core/components/ui/loader/loader.html +97 -23
  33. package/docs/crawl/core/components/ui/menu/menu.html +162 -90
  34. package/docs/crawl/core/components/ui/modal/modal.html +275 -50
  35. package/docs/crawl/core/components/ui/pop/pop.html +260 -66
  36. package/docs/crawl/core/components/ui/progress/progress.html +103 -30
  37. package/docs/crawl/core/components/ui/table/table.html +303 -171
  38. package/docs/crawl/core/components/ui/theme/theme.html +131 -0
  39. package/docs/crawl/core/components/ui/toast/toast.html +170 -59
  40. package/docs/crawl/core/components/ui/tooltip/tooltip.html +90 -29
  41. package/docs/crawl/docs/_decorators/ancestor-attribute.html +3 -2
  42. package/docs/crawl/docs/_getting-started/concorde-outside.html +3 -3
  43. package/docs/crawl/docs/_getting-started/start.html +1 -1
  44. package/docs/crawl/docs/_getting-started/theming.html +311 -63
  45. package/docs/crawl/hubs/form-components.html +75 -53
  46. package/docs/crawl/index.html +7 -6
  47. package/docs/docs-mock-api-sw.js +2 -0
  48. package/docs/docs-mock-api-sw.js.map +2 -2
  49. package/docs/index.html +9 -7
  50. package/docs/llms-full.txt +1703 -456
  51. package/docs/llms.txt +25 -32
  52. package/docs/sitemap.xml +3 -0
  53. package/docs/src/core/components/functional/fetch/fetch.md +0 -0
  54. package/docs/src/core/components/functional/if/if.md +0 -0
  55. package/docs/src/core/components/functional/list/list.md +0 -0
  56. package/docs/src/core/components/functional/router/router.md +0 -0
  57. package/docs/src/core/components/functional/sdui/sdui.md +0 -0
  58. package/docs/src/core/components/functional/states/states.md +0 -0
  59. package/docs/src/core/components/functional/submit/submit.md +0 -0
  60. package/docs/src/core/components/ui/alert/alert.md +147 -72
  61. package/docs/src/core/components/ui/alert-messages/alert-messages.md +85 -0
  62. package/docs/src/core/components/ui/badge/badge.md +141 -80
  63. package/docs/src/core/components/ui/button/button.md +1 -0
  64. package/docs/src/core/components/ui/captcha/captcha.md +65 -6
  65. package/docs/src/core/components/ui/card/card.md +183 -65
  66. package/docs/src/core/components/ui/divider/divider.md +107 -13
  67. package/docs/src/core/components/ui/form/fieldset/fieldset.md +175 -99
  68. package/docs/src/core/components/ui/form/form-actions/form-actions.md +75 -52
  69. package/docs/src/core/components/ui/form/form-layout/form-layout.md +109 -34
  70. package/docs/src/core/components/ui/form/input/input.md +1 -1
  71. package/docs/src/core/components/ui/form/radio/radio.md +0 -0
  72. package/docs/src/core/components/ui/form/select/select.md +0 -0
  73. package/docs/src/core/components/ui/form/switch/switch.md +0 -0
  74. package/docs/src/core/components/ui/form/textarea/textarea.md +1 -1
  75. package/docs/src/core/components/ui/group/group.md +36 -36
  76. package/docs/src/core/components/ui/icon/icon.md +132 -43
  77. package/docs/src/core/components/ui/image/image.md +179 -53
  78. package/docs/src/core/components/ui/link/link.md +45 -7
  79. package/docs/src/core/components/ui/loader/loader.md +79 -22
  80. package/docs/src/core/components/ui/menu/menu.md +133 -92
  81. package/docs/src/core/components/ui/modal/modal.md +163 -47
  82. package/docs/src/core/components/ui/pop/pop.md +262 -64
  83. package/docs/src/core/components/ui/progress/progress.md +76 -30
  84. package/docs/src/core/components/ui/table/table.md +147 -171
  85. package/docs/src/core/components/ui/theme/theme.md +122 -0
  86. package/docs/src/core/components/ui/toast/toast.md +108 -58
  87. package/docs/src/core/components/ui/tooltip/tooltip.md +68 -26
  88. package/docs/src/docs/_core-concept/subscriber.md +0 -0
  89. package/docs/src/docs/_decorators/ancestor-attribute.md +3 -2
  90. package/docs/src/docs/_getting-started/concorde-outside.md +3 -3
  91. package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -0
  92. package/docs/src/docs/_getting-started/pubsub.md +0 -0
  93. package/docs/src/docs/_getting-started/start.md +1 -1
  94. package/docs/src/docs/_getting-started/theming.md +223 -61
  95. package/docs/src/docs/search/docs-search.json +3083 -348
  96. package/docs/src/tsconfig.json +63 -3
  97. package/gitlab/job_tests.sh +0 -0
  98. package/index.html +4 -2
  99. package/package.json +7 -1
  100. package/public/docs-mock-api-sw.js +2 -0
  101. package/public/docs-mock-api-sw.js.map +2 -2
  102. package/scripts/post-build-docs.js +0 -0
  103. package/scripts/post-build.mjs +0 -0
  104. package/src/core/components/functional/fetch/fetch.md +0 -0
  105. package/src/core/components/functional/if/if.md +0 -0
  106. package/src/core/components/functional/list/list.demo.ts +0 -0
  107. package/src/core/components/functional/list/list.md +0 -0
  108. package/src/core/components/functional/router/router.md +0 -0
  109. package/src/core/components/functional/router/router.ts +0 -0
  110. package/src/core/components/functional/sdui/sdui.md +0 -0
  111. package/src/core/components/functional/states/states.md +0 -0
  112. package/src/core/components/functional/submit/submit.md +0 -0
  113. package/src/core/components/functional/subscriber/subscriber.ts +0 -0
  114. package/src/core/components/ui/_css/align.ts +1 -0
  115. package/src/core/components/ui/_css/size.ts +0 -0
  116. package/src/core/components/ui/_css/type.ts +86 -8
  117. package/src/core/components/ui/_i18n/ui-aria-labels.ts +8 -0
  118. package/src/core/components/ui/alert/alert.md +21 -2
  119. package/src/core/components/ui/alert-messages/alert-messages.md +85 -0
  120. package/src/core/components/ui/badge/badge.md +19 -6
  121. package/src/core/components/ui/badge/badge.ts +8 -9
  122. package/src/core/components/ui/button/button.ts +5 -15
  123. package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
  124. package/src/core/components/ui/captcha/captcha.md +65 -6
  125. package/src/core/components/ui/card/card.md +73 -10
  126. package/src/core/components/ui/card/card.ts +24 -22
  127. package/src/core/components/ui/divider/divider.md +107 -13
  128. package/src/core/components/ui/divider/divider.ts +40 -33
  129. package/src/core/components/ui/form/fieldset/fieldset.md +175 -99
  130. package/src/core/components/ui/form/fieldset/fieldset.ts +15 -28
  131. package/src/core/components/ui/form/fieldset/legend.ts +13 -13
  132. package/src/core/components/ui/form/form-actions/form-actions.md +75 -52
  133. package/src/core/components/ui/form/form-actions/form-actions.ts +7 -5
  134. package/src/core/components/ui/form/form-layout/form-layout.md +109 -34
  135. package/src/core/components/ui/form/form-layout/form-layout.ts +27 -24
  136. package/src/core/components/ui/form/radio/radio.md +0 -0
  137. package/src/core/components/ui/form/select/select.md +0 -0
  138. package/src/core/components/ui/form/switch/switch.md +0 -0
  139. package/src/core/components/ui/form/textarea/textarea.ts +4 -3
  140. package/src/core/components/ui/group/group.md +36 -36
  141. package/src/core/components/ui/group/group.ts +5 -10
  142. package/src/core/components/ui/icon/icon.md +132 -43
  143. package/src/core/components/ui/image/image.md +35 -3
  144. package/src/core/components/ui/link/link.md +43 -5
  145. package/src/core/components/ui/loader/loader.md +79 -22
  146. package/src/core/components/ui/loader/loader.ts +67 -27
  147. package/src/core/components/ui/loader/styles/fixed.ts +6 -11
  148. package/src/core/components/ui/menu/menu.md +133 -92
  149. package/src/core/components/ui/menu/menu.ts +53 -58
  150. package/src/core/components/ui/modal/modal.md +163 -47
  151. package/src/core/components/ui/modal/modal.ts +2 -4
  152. package/src/core/components/ui/pop/pop.md +217 -123
  153. package/src/core/components/ui/pop/pop.ts +0 -1
  154. package/src/core/components/ui/progress/progress.md +76 -30
  155. package/src/core/components/ui/progress/progress.ts +25 -56
  156. package/src/core/components/ui/table/table-caption.ts +2 -2
  157. package/src/core/components/ui/table/table-tbody.ts +3 -3
  158. package/src/core/components/ui/table/table-td.ts +23 -18
  159. package/src/core/components/ui/table/table-th.ts +8 -8
  160. package/src/core/components/ui/table/table-tr.ts +4 -4
  161. package/src/core/components/ui/table/table.md +147 -171
  162. package/src/core/components/ui/table/table.ts +20 -19
  163. package/src/core/components/ui/theme/theme-collection/auto.ts +15 -0
  164. package/src/core/components/ui/theme/theme-collection/core-variables.ts +8 -31
  165. package/src/core/components/ui/theme/theme-collection/dark.ts +1 -7
  166. package/src/core/components/ui/theme/theme-collection/light.ts +30 -26
  167. package/src/core/components/ui/theme/theme.md +122 -0
  168. package/src/core/components/ui/theme/theme.ts +30 -7
  169. package/src/core/components/ui/toast/toast-item.ts +6 -9
  170. package/src/core/components/ui/toast/toast.md +108 -58
  171. package/src/core/components/ui/toast/types.ts +1 -1
  172. package/src/core/components/ui/tooltip/tooltip.md +68 -26
  173. package/src/core/mixins/Subscriber.ts +0 -0
  174. package/src/core/utils/DataBindObserver.ts +0 -0
  175. package/src/core/utils/Objects.ts +0 -0
  176. package/src/core/utils/route.ts +0 -0
  177. package/src/docs/_core-concept/subscriber.md +0 -0
  178. package/src/docs/_getting-started/my-first-subscriber.md +0 -0
  179. package/src/docs/_getting-started/pubsub.md +0 -0
  180. package/src/docs/_getting-started/start.md +1 -1
  181. package/src/docs/_getting-started/theming.md +223 -61
  182. package/src/docs/code.ts +125 -58
  183. package/src/docs/example/users.ts +0 -0
  184. package/src/docs/header/header.ts +62 -54
  185. package/src/docs/mock-api/router.ts +2 -0
  186. package/src/docs/navigation/navigation.ts +6 -3
  187. package/src/docs/search/docs-search.json +2504 -399
  188. package/src/docs/search/markdown-renderer.ts +6 -6
  189. package/src/docs/search/page.ts +0 -0
  190. package/src/docs/search/search.ts +4 -4
  191. package/src/docs/tailwind/css/tailwind.css +6 -5
  192. package/src/tsconfig.json +18 -0
  193. package/src/tsconfig.tsbuildinfo +1 -1
  194. package/tailwind.config.js +19 -0
  195. package/.github/workflows/ci.yml +0 -21
  196. package/.github-export-ignore +0 -30
  197. package/CONTRIBUTING.md +0 -59
  198. package/DEV.md +0 -54
  199. package/LICENSE +0 -21
  200. package/OPEN_SOURCE_CHECKPOINT.md +0 -133
  201. package/docs/assets/index-DiD0qYvE.css +0 -1
  202. package/docs/src/tsconfig.declarations.json +0 -22
  203. package/docs/src/tsconfig.emit.json +0 -23
  204. package/gitlab/job_github_mirror.sh +0 -39
  205. package/scripts/github-export.mjs +0 -150
  206. package/src/css.d.ts +0 -19
  207. package/src/tsconfig.declarations.json +0 -22
  208. package/src/tsconfig.emit.json +0 -23
@@ -1,82 +1,82 @@
1
- (function(ze){typeof define=="function"&&define.amd?define(ze):ze()})((function(){"use strict";var Te,st;let ze=class Ct{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,s)=>{const i=s.indexOf("=");return e[s.substring(0,i).trim()]=s.substring(i+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,s){for(;e;){if(!s(e))return;e=e.parentNode||e.host}}static overflowMatches(e,s){return s.includes(e.overflowY)||s.includes(e.overflowX)}static findAncestorByOverflow(e,s){let i=e;for(;i;){if(i instanceof Element&&i.nodeType===1){const r=window.getComputedStyle(i);if(Ct.overflowMatches(r,s))return i}i=Ct.nextComposedAncestor(i)}return null}static getScrollableAncestor(e){return Ct.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return Ct.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const s=e.toLowerCase();return s===e?[e]:[e,s]}static readScopeAttributeOnElement(e,s){for(const i of Ct.scopeAttributeNames(s))if(e.hasAttribute(i))return e.getAttribute(i)??"";return null}static getAncestorAttributeValue(e,s){if(!e)return null;let i=e;for(;i;){if(i instanceof HTMLElement){const n=Ct.readScopeAttributeOnElement(i,s);if(n!=null)return n}const r=i.parentNode||i.host;if(!r)break;i=r}return null}static getApiConfiguration(e){const s=Ct.getAncestorAttributeValue(e,"token"),i=Ct.getAncestorAttributeValue(e,"addHTTPResponse")!=null,r=Ct.getAncestorAttributeValue(e,"serviceURL");let n=null,o=null;const c=Ct.getAncestorAttributeValue(e,"tokenProvider"),d=Ct.getAncestorAttributeValue(e,"eventsApiToken");s||(n=Ct.getAncestorAttributeValue(e,"userName"),o=Ct.getAncestorAttributeValue(e,"password"));const m=Ct.getAncestorAttributeValue(e,"credentials")||void 0,A=e.getAttribute("cache"),g=e.hasAttribute("blockUntilDone"),f=e.hasAttribute("keepAlive");return{serviceURL:r,token:s,userName:n,password:o,authToken:d,tokenProvider:c,addHTTPResponse:i,credentials:m,cache:A,blockUntilDone:g,keepAlive:f}}static getClosestElement(e,s){for(;!(e.nodeName&&e.nodeName.toLowerCase()===s)&&(e.parentNode||e.host);)e=e.parentNode||e.host;return e.nodeName?e:null}static getClosestForm(e){return Ct.getClosestElement(e,"form")}static getAncestorsByTagNames(e,s){const i=new Set(s.map(o=>o.toLowerCase())),r=[];let n=e.parentNode||e.host;for(;n;)n instanceof Element&&i.has(n.tagName.toLowerCase())&&r.push(n),n=n.parentNode||n.host;return r}static getAncestorsBySelectors(e,s){const i=[];let r=e.parentNode||e.host;for(;r;){if(r instanceof Element)for(const n of s)try{if(r.matches(n)){i.push(r);break}}catch{}r=r.parentNode||r.host}return i}static async loadJS(e){return new Promise(async i=>{const r=document.createElement("script");r.src=e,r.onload=()=>i(!0),r.onerror=()=>i(!0),document.head.appendChild(r)})}static async loadCSS(e){return new Promise(async i=>{const r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,r.onload=()=>i(!0),r.onerror=()=>i(!0),document.head.appendChild(r)})}};const dn=t=>{const e=document.documentElement,s=new MutationObserver(r=>{for(let n of r)n.type==="attributes"&&n.attributeName==="lang"&&t()}),i={attributes:!0,attributeFilter:["lang"]};s.observe(e,i)};let Mr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,s="",i="long"){s||(s=ze.getLanguage());const r=(m,A)=>[Math.floor(m/A),m%A];function n(m,A,g){return new Intl.NumberFormat(m,{style:"unit",unit:A,unitDisplay:g}).format}const[o,c]=r(e,60),d=[];return o&&d.push(n(s,"hour",i)(o)),c&&d.push(n(s,"minute",i)(c)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(d)}static js(e){try{return Function("return "+e)()}catch{return""}}};class ko{constructor(e){this.path=e}toString(){return this.path}}function $o(t){return new Proxy(t,{get(e,s){if(s==="path")return e.path;if(s==="toString")return e.toString.bind(e);if(s===Symbol.toStringTag)return"DataProviderKey";if(typeof s=="symbol")return e[s];const i=e.path?`${e.path}.${String(s)}`:String(s);return $o(new ko(i))}})}const Ul=/\$\{|\{\$/;function ql(t){return Ul.test(t)}function pi(t){const e=typeof t=="string"?t:t.path;if(ql(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const ks=function(t){return this instanceof ks?$o(new ko(t)):new ks(t)};let lt=class Cs{static shallowEqual(e,s,i=!0){const r=Object.keys(e),n=Object.keys(s);if(r.length!==n.length&&i)return!1;for(const o of r){const c=e[o],d=s[o];if(i?c!==d:c!=d)return!1}return!0}static deepEqual(e,s,i=!0){const r=Object.keys(e),n=Object.keys(s);if(r.length!==n.length&&i)return!1;for(const o of r){const c=e[o],d=s[o],m=Cs.isObject(c)&&Cs.isObject(d),A=i?c!==d:c!=d;if(m&&!Cs.deepEqual(c,d)||!m&&A)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return Cs.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,s,i=!1){for(const r of s){const n=e[r];if(n===void 0)return;i&&Cs.isObject(n)?e=Object.assign(Array.isArray(n)?[]:{},e,n):e=e[r]}return e}static traverseDotNotation(e,s,i=!1){return Cs.traverse(e,s.split("."),i)}static getURLSearchArray(e,s=""){let i=[];for(let r in e){const n=e[r];s&&(r=s+"["+r+"]"),Cs.isObject(n)?i=[...i,...this.getURLSearchArray(n,r)]:i.push(`${r}=${n}`)}return i}static getURLSearchString(e){return Cs.getURLSearchArray(e,"").join("&")}};const qt=lt.traverseDotNotation;let Bl=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(s=>{setTimeout(s,e)})}},Do="sonic";typeof __SONIC_PREFIX__<"u"&&(Do=__SONIC_PREFIX__);let Eo=Do.replace(/-([a-z])/g,t=>t[1].toUpperCase());const fi=Eo.charAt(0).toUpperCase()+Eo.slice(1),Hl=new Set(["localStorageMode","expirationDelayMs","invalidateOnPageShow"]);function Oo(t){return t==null||typeof t!="object"||Array.isArray(t)?!1:Object.keys(t).some(e=>Hl.has(e))}function gi(t){return Object.prototype.hasOwnProperty.call(t,"__value")}function $s(t){return typeof t=="object"&&t!==null}let ur="sonic";typeof __SONIC_PREFIX__>"u"&&(ur="sonic");const pn=ur=="sonic"?"publisher-proxies-data":ur+"-publisher-proxies-data",qs=class qs{constructor(e,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e in this._proxies_.keys())e!="_parent_"&&this._proxies_.get(e)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),qs.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!ve.changed){ve.changed=!0,ve.saveId++;const s=ve.saveId;setTimeout(()=>ve.getInstance().saveToLocalStorage(s),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(r=>{r(i)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,s){this._fillListeners_.forEach(i=>{i[e]!==s&&(i[e]=s)}),this._publishTemplateFilling_(e,s)}_publishTemplateFilling_(e,s){this._templateFillListeners_.forEach(i=>{const r=Object.getOwnPropertyDescriptor(i,e);r&&!r.set&&!r.writable||(i.propertyMap&&i.propertyMap[e]&&(e=i.propertyMap[e]),typeof i[e]<"u"&&i[e]!==s&&(i[e]=s))})}onAssign(e,s=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),s&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.add(e)}offFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.delete(e)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const s in this._value_){let i=s;const r=this._value_[s];e.propertyMap&&e.propertyMap[s]&&(i=e.propertyMap[s]),typeof e[s]<"u"&&e[s]!==r&&(e[i]=r)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const s in this._value_){const i=this._value_[s];e[s]!==i&&(e[s]=i)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,s=!1){if(this._value_===e||$s(this._value_)&&$s(e)&&e&&gi(this._value_)&&gi(e)&&this._value_.__value===e.__value||!$s(e)&&e===this._value_.__value)return!0;this._value_=$s(e)?e:{__value:e},this._cachedGet_=void 0;const i=gi(this._value_);if(this._parentKey_&&this.parent){const r=gi(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:r});else{const n=[];n[Number(this._parentKey_)]=r,this.parent.set(n)}else this.parent._value_[this._parentKey_]=r}if(i)return this._proxies_.forEach((r,n)=>{n!="_parent_"&&(r.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const r in this._value_)this._value_[r]===void 0&&delete this._value_[r];if(this._proxies_.forEach((r,n)=>{const o=this._value_[n];n!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(n))&&(r.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),$s(this._value_))for(const r in this._value_){const n=e[r],c=$s(n)?n:{__value:n};if(!this._proxies_.has(r)){this._publishDynamicFilling_(r,n);continue}this._proxies_.get(r)?.set(c,!0),this._publishDynamicFilling_(r,n)}return!0}get(){if(Vl(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(qs.instancesCounter++,this._instanceCounter_=qs.instancesCounter),qs.instances.set(this._instanceCounter_,this),"<"+ur+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+ur+"-publisher-proxy>"}};qs.instances=new Map,qs.instancesCounter=0;let Ir=qs;const mi=[];function Vl(t){mi.length>0&&mi[0].add(t)}function To(){mi.unshift(new Set)}function Lo(){return mi.shift()}const Me=class Me{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],Me.instance!=null)throw"Singleton / use getInstance";Me.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),Me.initPageShowHandler()}static initPageShowHandler(){Me.pageShowHandlerInitialized||(Me.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&Me.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let i=localStorage.getItem(pn),r=null;if(i&&(r=await this.decompress(i,"gzip")),r)try{this.localStorageData=JSON.parse(r)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(pn,i),this.localStorageData={};const n=1e3*60*60*12;for(const o in this.localStorageData){const c=this.localStorageData[o],d=new Date().getTime()-(c.expirationDelayMs||n);c.lastModifiationMS<d&&delete this.localStorageData[o]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const s=Me.instances.get(e);return s||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new Me)}return Me.instance==null?new Me:Me.instance}static get(e,s){return Me.getInstance().get(e,s)}async setLocalData(e,s){await this.isLocalStrorageReady,e.set(this.localStorageData[s+"¤lang_"+ze.getLanguage()]?.data||e.get())}get(e,s){const i=s?.localStorageMode==="enabled",r=s?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const c=fn({});this.set(e,c)}const n=this.publishers.get(e);return i&&this.initialisedData.indexOf(e)===-1&&(s?.expirationDelayMs&&(n._expiration_delay_=s.expirationDelayMs),n._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(n,e)),r&&(n._invalidate_on_page_show_=r),this.publishers.get(e)}set(e,s){this.publishers.set(e,s)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==Me.saveId&&e%10!=0))try{if(!Me.changed||Me.saving)return;Me.saving=!0,Me.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const r of s){const n=this.publishers.get(r);if(!n?._is_savable_)continue;const o=n?.get();o&&(this.localStorageData[r+"¤lang_"+ze.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:n._expiration_delay_,data:o},i=!0)}if(i){const r=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(pn,r)}if(Me.saving=!1,Me.changed){Me.saveId++;const r=Me.saveId;setTimeout(()=>this.saveToLocalStorage(r),1e3)}}catch{Me.saving=!1}}async compress(e,s){const i=new TextEncoder().encode(e),r=window,n=new r.CompressionStream(s),o=n.writable.getWriter();o.write(i),o.close();const c=await new Response(n.readable).arrayBuffer(),d=new Uint8Array(c);let m="";for(let A=0;A<d.length;A++)m+=String.fromCharCode(d[A]);return btoa(m)}async decompress(e,s){const i=atob(e),n=Uint8Array.from(i,A=>A.charCodeAt(0)).buffer,o=window,c=new o.DecompressionStream(s),d=c.writable.getWriter();d.write(n),d.close();const m=await new Response(c.readable).arrayBuffer();return new TextDecoder().decode(m)}};Me.buildDate="Thu Oct 01 2026 13:53:43 GMT+0200 (Central European Summer Time)",Me.changed=!1,Me.saving=!1,Me.saveId=0,Me.instance=null,Me.instances=new Map,Me.pageShowHandlerInitialized=!1;let ve=Me;if(typeof window<"u"){const t=window;t[fi+"PublisherManager"]=t[fi+"PublisherManager"]||ve}const Wl=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function Kl(t,e){return{get:function(s,i){if(typeof i=="string"&&Wl.has(i))return t[i];if(i==Symbol.toPrimitive)return()=>e().get();if(!t._proxies_.has(i)){const r=t._value_[i],n=fn($s(r)?r:{__value:r},t,i);n._proxies_.set("_parent_",e()),t._proxies_.set(i,n)}return t._proxies_.get(i)},set:function(s,i,r){if(i=="_value_")return t._value_=r,!0;if(i=="_cachedGet_")return t._cachedGet_=r,!0;if(i=="_assignmentId_")return t._assignmentId_=r,!0;if(i=="_is_savable_")return t._is_savable_=r,!0;if(i=="_expiration_delay_")return t._expiration_delay_=r,!0;if(i=="_invalidate_on_page_show_")return t._invalidate_on_page_show_=r,!0;if(i=="_instanceCounter_")return t._instanceCounter_=r,!0;if(!t._proxies_.has(i)){const o=fn({},t,i);o._proxies_.set("_parent_",e()),t._proxies_.set(i,o)}return t._value_[i]!==r&&(t._value_[i]=r,t._publishDynamicFilling_(i,r),t._proxies_.get(i)?.set($s(r)?r:{__value:r})),!0},deleteProperty:function(s,i){return t._publishDynamicFilling_(i,null),t._proxies_.get(i)?.set(null),delete t._value_[i]},has:function(s,i){return i in t._value_&&i!="_lockInternalMutationPublishing_"},defineProperty:function(s,i,r){return r&&"value"in r&&(t._value_[i]=r.value),!0},getOwnPropertyDescriptor:function(s,i){return{enumerable:!0,configurable:!0}},ownKeys:function(s){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}}}function fn(t,e=null,s){const i=new Ir(t,e,s);let r=null;const n=Kl(i,()=>r);return r=new Proxy(i,n),r}class Gl extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ir.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(ur+"-publisher-proxy",Gl)}catch{}const bi=(t,e)=>{if(typeof t=="function"){const s=t;return To(),s(),Lo()}if(typeof t=="string"){const s=t.split("."),i=s.shift()||"";let r=ve.get(i,e);r=lt.traverse(r,s);const n=new Set;return n.add(r),n}return new Set([t])};function Yl(t){const e=pi(t);return bi(e).values().next().value?.get()}function vi(t,e,s){const i=pi(t);return bi(i,s).values().next().value}function Zl(t,e){return Oo(e)?vi(t,void 0,e):vi(t)}function yi(t,e){return Oo(e)?vi(t,void 0,e):vi(t)}function Jl(t,e){const s=pi(t);bi(s).values().next().value?.set(e)}let wi=(Te=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(Te.observedElements.keys()).forEach(e=>Te.unObserve(e)))}static observe(e){if(!e||!Te.enabled||Te.observedElements.has(e))return;const s=new MutationObserver(Te.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(e,i),e.querySelectorAll("[data-bind]").forEach(r=>Te.addPublisherListeners(r)),Te.observedElements.set(e,s)}static unObserve(e){if(!e)return;const s=this.observedElements.get(e);s&&(s.disconnect(),e.querySelectorAll("[data-bind]").forEach(i=>Te.removePublisherListeners(i)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Te.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Te.addPublisherListeners(s)):e.childNodes.forEach(s=>Te.onAdded(s))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Te.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Te.removePublisherListeners(s)):e.childNodes.forEach(s=>Te.onRemoved(s))}static onMutation(e){for(const s of e)switch(s.type){case"attributes":Te.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{Te.onAdded(i)}),s.removedNodes.forEach(i=>{Te.onRemoved(i)});break}}static removePublisherListeners(e){const s=Te.publisherListeners.get(e);s&&(Te.publisherListeners.delete(e),s.forEach(i=>{i.publisher?.offAssign(i.onAssign)}))}static getVariablesDescriptor(e){let s=e.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[e],s=s.filter(i=>i.length>0),{expression:e.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(r=>r.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,r=>r.substring(1).toUpperCase()),bindedVariablesDescriptor:Te.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(e,s){if(!s)return e;for(const i of s)if(i!="_self_"){if(!e)return null;e=e[i]}return e}static addPublisherListeners(e){Te.removePublisherListeners(e);const s=ze.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!s)return;const i=ve.getInstance().get(s),r=Te.getDataBindItems(e),n=[];r.forEach(o=>{const c=o.bindedVariablesDescriptor,d=o.propertyToUpdate;for(const m of c.variables){const A=m;let g=i;g=Te.getSubPublisher(i,A);const f=e,k={publisher:g,onAssign:()=>{const E=c.variables.map(B=>Te.getSubPublisher(i,B)?.get());let O=c.expression,z=!1;if(E.length==1&&c.variables[0].join(".")==O.substring(1)){let B=E[0];B===null&&(B=""),f[d]=B;return}for(let B=0;B<E.length;B++){let S=E[B];const y=c.variables[B];S===null&&(z=!0,S=void 0),O=O.replace("$"+y.join("."),S)}if(O.indexOf("|")!=-1){const B=O.indexOf("|");if(B==0)O=Mr.js(O.substring(1));else{const S=O.substring(0,B),y=O.substring(B+1),I=Mr[S];O=z?"":I?I(y):O}}else O=z?"":O;f[d]=O}};g?.onAssign(k.onAssign),n.push(k)}}),Te.publisherListeners.set(e,n)}},Te.observedElements=new Map,Te.enabled=!0,Te.publisherListeners=new Map,Te);wi.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=wi);/**
1
+ (function(ze){typeof define=="function"&&define.amd?define(ze):ze()})((function(){"use strict";var Te,st;let ze=class kt{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,s)=>{const r=s.indexOf("=");return e[s.substring(0,r).trim()]=s.substring(r+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,s){for(;e;){if(!s(e))return;e=e.parentNode||e.host}}static overflowMatches(e,s){return s.includes(e.overflowY)||s.includes(e.overflowX)}static findAncestorByOverflow(e,s){let r=e;for(;r;){if(r instanceof Element&&r.nodeType===1){const i=window.getComputedStyle(r);if(kt.overflowMatches(i,s))return r}r=kt.nextComposedAncestor(r)}return null}static getScrollableAncestor(e){return kt.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return kt.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const s=e.toLowerCase();return s===e?[e]:[e,s]}static readScopeAttributeOnElement(e,s){for(const r of kt.scopeAttributeNames(s))if(e.hasAttribute(r))return e.getAttribute(r)??"";return null}static getAncestorAttributeValue(e,s){if(!e)return null;let r=e;for(;r;){if(r instanceof HTMLElement){const n=kt.readScopeAttributeOnElement(r,s);if(n!=null)return n}const i=r.parentNode||r.host;if(!i)break;r=i}return null}static getApiConfiguration(e){const s=kt.getAncestorAttributeValue(e,"token"),r=kt.getAncestorAttributeValue(e,"addHTTPResponse")!=null,i=kt.getAncestorAttributeValue(e,"serviceURL");let n=null,o=null;const c=kt.getAncestorAttributeValue(e,"tokenProvider"),d=kt.getAncestorAttributeValue(e,"eventsApiToken");s||(n=kt.getAncestorAttributeValue(e,"userName"),o=kt.getAncestorAttributeValue(e,"password"));const g=kt.getAncestorAttributeValue(e,"credentials")||void 0,A=e.getAttribute("cache"),m=e.hasAttribute("blockUntilDone"),f=e.hasAttribute("keepAlive");return{serviceURL:i,token:s,userName:n,password:o,authToken:d,tokenProvider:c,addHTTPResponse:r,credentials:g,cache:A,blockUntilDone:m,keepAlive:f}}static getClosestElement(e,s){for(;!(e.nodeName&&e.nodeName.toLowerCase()===s)&&(e.parentNode||e.host);)e=e.parentNode||e.host;return e.nodeName?e:null}static getClosestForm(e){return kt.getClosestElement(e,"form")}static getAncestorsByTagNames(e,s){const r=new Set(s.map(o=>o.toLowerCase())),i=[];let n=e.parentNode||e.host;for(;n;)n instanceof Element&&r.has(n.tagName.toLowerCase())&&i.push(n),n=n.parentNode||n.host;return i}static getAncestorsBySelectors(e,s){const r=[];let i=e.parentNode||e.host;for(;i;){if(i instanceof Element)for(const n of s)try{if(i.matches(n)){r.push(i);break}}catch{}i=i.parentNode||i.host}return r}static async loadJS(e){return new Promise(async r=>{const i=document.createElement("script");i.src=e,i.onload=()=>r(!0),i.onerror=()=>r(!0),document.head.appendChild(i)})}static async loadCSS(e){return new Promise(async r=>{const i=document.createElement("link");i.type="text/css",i.rel="stylesheet",i.href=e,i.onload=()=>r(!0),i.onerror=()=>r(!0),document.head.appendChild(i)})}};const gn=t=>{const e=document.documentElement,s=new MutationObserver(i=>{for(let n of i)n.type==="attributes"&&n.attributeName==="lang"&&t()}),r={attributes:!0,attributeFilter:["lang"]};s.observe(e,r)};let Ir=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,s="",r="long"){s||(s=ze.getLanguage());const i=(g,A)=>[Math.floor(g/A),g%A];function n(g,A,m){return new Intl.NumberFormat(g,{style:"unit",unit:A,unitDisplay:m}).format}const[o,c]=i(e,60),d=[];return o&&d.push(n(s,"hour",r)(o)),c&&d.push(n(s,"minute",r)(c)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(d)}static js(e){try{return Function("return "+e)()}catch{return""}}};class Eo{constructor(e){this.path=e}toString(){return this.path}}function Oo(t){return new Proxy(t,{get(e,s){if(s==="path")return e.path;if(s==="toString")return e.toString.bind(e);if(s===Symbol.toStringTag)return"DataProviderKey";if(typeof s=="symbol")return e[s];const r=e.path?`${e.path}.${String(s)}`:String(s);return Oo(new Eo(r))}})}const Vl=/\$\{|\{\$/;function Wl(t){return Vl.test(t)}function fi(t){const e=typeof t=="string"?t:t.path;if(Wl(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const Cs=function(t){return this instanceof Cs?Oo(new Eo(t)):new Cs(t)};let ht=class As{static shallowEqual(e,s,r=!0){const i=Object.keys(e),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const c=e[o],d=s[o];if(r?c!==d:c!=d)return!1}return!0}static deepEqual(e,s,r=!0){const i=Object.keys(e),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const c=e[o],d=s[o],g=As.isObject(c)&&As.isObject(d),A=r?c!==d:c!=d;if(g&&!As.deepEqual(c,d)||!g&&A)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return As.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,s,r=!1){for(const i of s){const n=e[i];if(n===void 0)return;r&&As.isObject(n)?e=Object.assign(Array.isArray(n)?[]:{},e,n):e=e[i]}return e}static traverseDotNotation(e,s,r=!1){return As.traverse(e,s.split("."),r)}static getURLSearchArray(e,s=""){let r=[];for(let i in e){const n=e[i];s&&(i=s+"["+i+"]"),As.isObject(n)?r=[...r,...this.getURLSearchArray(n,i)]:r.push(`${i}=${n}`)}return r}static getURLSearchString(e){return As.getURLSearchArray(e,"").join("&")}};const qt=ht.traverseDotNotation;let Kl=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(s=>{setTimeout(s,e)})}},To="sonic";typeof __SONIC_PREFIX__<"u"&&(To=__SONIC_PREFIX__);let Lo=To.replace(/-([a-z])/g,t=>t[1].toUpperCase());const mi=Lo.charAt(0).toUpperCase()+Lo.slice(1),Gl=new Set(["localStorageMode","expirationDelayMs","invalidateOnPageShow"]);function Mo(t){return t==null||typeof t!="object"||Array.isArray(t)?!1:Object.keys(t).some(e=>Gl.has(e))}function gi(t){return Object.prototype.hasOwnProperty.call(t,"__value")}function ks(t){return typeof t=="object"&&t!==null}let ur="sonic";typeof __SONIC_PREFIX__>"u"&&(ur="sonic");const bn=ur=="sonic"?"publisher-proxies-data":ur+"-publisher-proxies-data",qs=class qs{constructor(e,s,r){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=s||null,this._parentKey_=r,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e in this._proxies_.keys())e!="_parent_"&&this._proxies_.get(e)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),qs.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!ve.changed){ve.changed=!0,ve.saveId++;const s=ve.saveId;setTimeout(()=>ve.getInstance().saveToLocalStorage(s),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(i=>{i(r)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,s){this._fillListeners_.forEach(r=>{r[e]!==s&&(r[e]=s)}),this._publishTemplateFilling_(e,s)}_publishTemplateFilling_(e,s){this._templateFillListeners_.forEach(r=>{const i=Object.getOwnPropertyDescriptor(r,e);i&&!i.set&&!i.writable||(r.propertyMap&&r.propertyMap[e]&&(e=r.propertyMap[e]),typeof r[e]<"u"&&r[e]!==s&&(r[e]=s))})}onAssign(e,s=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),s&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.add(e)}offFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.delete(e)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const s in this._value_){let r=s;const i=this._value_[s];e.propertyMap&&e.propertyMap[s]&&(r=e.propertyMap[s]),typeof e[s]<"u"&&e[s]!==i&&(e[r]=i)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const s in this._value_){const r=this._value_[s];e[s]!==r&&(e[s]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,s=!1){if(this._value_===e||ks(this._value_)&&ks(e)&&e&&gi(this._value_)&&gi(e)&&this._value_.__value===e.__value||!ks(e)&&e===this._value_.__value)return!0;this._value_=ks(e)?e:{__value:e},this._cachedGet_=void 0;const r=gi(this._value_);if(this._parentKey_&&this.parent){const i=gi(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:i});else{const n=[];n[Number(this._parentKey_)]=i,this.parent.set(n)}else this.parent._value_[this._parentKey_]=i}if(r)return this._proxies_.forEach((i,n)=>{n!="_parent_"&&(i.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const i in this._value_)this._value_[i]===void 0&&delete this._value_[i];if(this._proxies_.forEach((i,n)=>{const o=this._value_[n];n!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(n))&&(i.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),ks(this._value_))for(const i in this._value_){const n=e[i],c=ks(n)?n:{__value:n};if(!this._proxies_.has(i)){this._publishDynamicFilling_(i,n);continue}this._proxies_.get(i)?.set(c,!0),this._publishDynamicFilling_(i,n)}return!0}get(){if(Yl(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(qs.instancesCounter++,this._instanceCounter_=qs.instancesCounter),qs.instances.set(this._instanceCounter_,this),"<"+ur+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+ur+"-publisher-proxy>"}};qs.instances=new Map,qs.instancesCounter=0;let Nr=qs;const bi=[];function Yl(t){bi.length>0&&bi[0].add(t)}function Io(){bi.unshift(new Set)}function No(){return bi.shift()}const Me=class Me{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],Me.instance!=null)throw"Singleton / use getInstance";Me.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),Me.initPageShowHandler()}static initPageShowHandler(){Me.pageShowHandlerInitialized||(Me.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&Me.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let r=localStorage.getItem(bn),i=null;if(r&&(i=await this.decompress(r,"gzip")),i)try{this.localStorageData=JSON.parse(i)}catch{this.localStorageData={}}else r=await this.compress("{}","gzip"),localStorage.setItem(bn,r),this.localStorageData={};const n=1e3*60*60*12;for(const o in this.localStorageData){const c=this.localStorageData[o],d=new Date().getTime()-(c.expirationDelayMs||n);c.lastModifiationMS<d&&delete this.localStorageData[o]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const s=Me.instances.get(e);return s||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new Me)}return Me.instance==null?new Me:Me.instance}static get(e,s){return Me.getInstance().get(e,s)}async setLocalData(e,s){await this.isLocalStrorageReady,e.set(this.localStorageData[s+"¤lang_"+ze.getLanguage()]?.data||e.get())}get(e,s){const r=s?.localStorageMode==="enabled",i=s?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const c=vn({});this.set(e,c)}const n=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(s?.expirationDelayMs&&(n._expiration_delay_=s.expirationDelayMs),n._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(n,e)),i&&(n._invalidate_on_page_show_=i),this.publishers.get(e)}set(e,s){this.publishers.set(e,s)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==Me.saveId&&e%10!=0))try{if(!Me.changed||Me.saving)return;Me.saving=!0,Me.changed=!1;const s=Array.from(this.publishers.keys());let r=!1;for(const i of s){const n=this.publishers.get(i);if(!n?._is_savable_)continue;const o=n?.get();o&&(this.localStorageData[i+"¤lang_"+ze.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:n._expiration_delay_,data:o},r=!0)}if(r){const i=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(bn,i)}if(Me.saving=!1,Me.changed){Me.saveId++;const i=Me.saveId;setTimeout(()=>this.saveToLocalStorage(i),1e3)}}catch{Me.saving=!1}}async compress(e,s){const r=new TextEncoder().encode(e),i=window,n=new i.CompressionStream(s),o=n.writable.getWriter();o.write(r),o.close();const c=await new Response(n.readable).arrayBuffer(),d=new Uint8Array(c);let g="";for(let A=0;A<d.length;A++)g+=String.fromCharCode(d[A]);return btoa(g)}async decompress(e,s){const r=atob(e),n=Uint8Array.from(r,A=>A.charCodeAt(0)).buffer,o=window,c=new o.DecompressionStream(s),d=c.writable.getWriter();d.write(n),d.close();const g=await new Response(c.readable).arrayBuffer();return new TextDecoder().decode(g)}};Me.buildDate="Mon Oct 05 2026 13:03:43 GMT+0200 (Central European Summer Time)",Me.changed=!1,Me.saving=!1,Me.saveId=0,Me.instance=null,Me.instances=new Map,Me.pageShowHandlerInitialized=!1;let ve=Me;if(typeof window<"u"){const t=window;t[mi+"PublisherManager"]=t[mi+"PublisherManager"]||ve}const Zl=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function Jl(t,e){return{get:function(s,r){if(typeof r=="string"&&Zl.has(r))return t[r];if(r==Symbol.toPrimitive)return()=>e().get();if(!t._proxies_.has(r)){const i=t._value_[r],n=vn(ks(i)?i:{__value:i},t,r);n._proxies_.set("_parent_",e()),t._proxies_.set(r,n)}return t._proxies_.get(r)},set:function(s,r,i){if(r=="_value_")return t._value_=i,!0;if(r=="_cachedGet_")return t._cachedGet_=i,!0;if(r=="_assignmentId_")return t._assignmentId_=i,!0;if(r=="_is_savable_")return t._is_savable_=i,!0;if(r=="_expiration_delay_")return t._expiration_delay_=i,!0;if(r=="_invalidate_on_page_show_")return t._invalidate_on_page_show_=i,!0;if(r=="_instanceCounter_")return t._instanceCounter_=i,!0;if(!t._proxies_.has(r)){const o=vn({},t,r);o._proxies_.set("_parent_",e()),t._proxies_.set(r,o)}return t._value_[r]!==i&&(t._value_[r]=i,t._publishDynamicFilling_(r,i),t._proxies_.get(r)?.set(ks(i)?i:{__value:i})),!0},deleteProperty:function(s,r){return t._publishDynamicFilling_(r,null),t._proxies_.get(r)?.set(null),delete t._value_[r]},has:function(s,r){return r in t._value_&&r!="_lockInternalMutationPublishing_"},defineProperty:function(s,r,i){return i&&"value"in i&&(t._value_[r]=i.value),!0},getOwnPropertyDescriptor:function(s,r){return{enumerable:!0,configurable:!0}},ownKeys:function(s){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}}}function vn(t,e=null,s){const r=new Nr(t,e,s);let i=null;const n=Jl(r,()=>i);return i=new Proxy(r,n),i}class Ql extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Nr.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(ur+"-publisher-proxy",Ql)}catch{}const vi=(t,e)=>{if(typeof t=="function"){const s=t;return Io(),s(),No()}if(typeof t=="string"){const s=t.split("."),r=s.shift()||"";let i=ve.get(r,e);i=ht.traverse(i,s);const n=new Set;return n.add(i),n}return new Set([t])};function Xl(t){const e=fi(t);return vi(e).values().next().value?.get()}function yi(t,e,s){const r=fi(t);return vi(r,s).values().next().value}function ec(t,e){return Mo(e)?yi(t,void 0,e):yi(t)}function wi(t,e){return Mo(e)?yi(t,void 0,e):yi(t)}function tc(t,e){const s=fi(t);vi(s).values().next().value?.set(e)}let _i=(Te=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(Te.observedElements.keys()).forEach(e=>Te.unObserve(e)))}static observe(e){if(!e||!Te.enabled||Te.observedElements.has(e))return;const s=new MutationObserver(Te.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],s.observe(e,r),e.querySelectorAll("[data-bind]").forEach(i=>Te.addPublisherListeners(i)),Te.observedElements.set(e,s)}static unObserve(e){if(!e)return;const s=this.observedElements.get(e);s&&(s.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>Te.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Te.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Te.addPublisherListeners(s)):e.childNodes.forEach(s=>Te.onAdded(s))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Te.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Te.removePublisherListeners(s)):e.childNodes.forEach(s=>Te.onRemoved(s))}static onMutation(e){for(const s of e)switch(s.type){case"attributes":Te.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(r=>{Te.onAdded(r)}),s.removedNodes.forEach(r=>{Te.onRemoved(r)});break}}static removePublisherListeners(e){const s=Te.publisherListeners.get(e);s&&(Te.publisherListeners.delete(e),s.forEach(r=>{r.publisher?.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let s=e.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(r=>r.replace("$","")):s=[e],s=s.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:s.map(r=>r.split(/\b\.\b/).map(i=>i.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,i=>i.substring(1).toUpperCase()),bindedVariablesDescriptor:Te.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(e,s){if(!s)return e;for(const r of s)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){Te.removePublisherListeners(e);const s=ze.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!s)return;const r=ve.getInstance().get(s),i=Te.getDataBindItems(e),n=[];i.forEach(o=>{const c=o.bindedVariablesDescriptor,d=o.propertyToUpdate;for(const g of c.variables){const A=g;let m=r;m=Te.getSubPublisher(r,A);const f=e,k={publisher:m,onAssign:()=>{const E=c.variables.map(H=>Te.getSubPublisher(r,H)?.get());let O=c.expression,z=!1;if(E.length==1&&c.variables[0].join(".")==O.substring(1)){let H=E[0];H===null&&(H=""),f[d]=H;return}for(let H=0;H<E.length;H++){let S=E[H];const y=c.variables[H];S===null&&(z=!0,S=void 0),O=O.replace("$"+y.join("."),S)}if(O.indexOf("|")!=-1){const H=O.indexOf("|");if(H==0)O=Ir.js(O.substring(1));else{const S=O.substring(0,H),y=O.substring(H+1),I=Ir[S];O=z?"":I?I(y):O}}else O=z?"":O;f[d]=O}};m?.onAssign(k.onAssign),n.push(k)}}),Te.publisherListeners.set(e,n)}},Te.observedElements=new Map,Te.enabled=!0,Te.publisherListeners=new Map,Te);_i.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=_i);/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const Q=t=>(e,s)=>{s!==void 0?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};/**
5
+ */const X=t=>(e,s)=>{s!==void 0?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};/**
6
6
  * @license
7
7
  * Copyright 2019 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const _i=globalThis,gn=_i.ShadowRoot&&(_i.ShadyCSS===void 0||_i.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mn=Symbol(),Mo=new WeakMap;let bn=class{constructor(e,s,i){if(this._$cssResult$=!0,i!==mn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=s}get styleSheet(){let e=this.o;const s=this.t;if(gn&&e===void 0){const i=s!==void 0&&s.length===1;i&&(e=Mo.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Mo.set(s,e))}return e}toString(){return this.cssText}};const Ql=t=>new bn(typeof t=="string"?t:t+"",void 0,mn),X=(t,...e)=>{const s=t.length===1?t[0]:e.reduce(((i,r,n)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[n+1]),t[0]);return new bn(s,t,mn)},Xl=(t,e)=>{if(gn)t.adoptedStyleSheets=e.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(const s of e){const i=document.createElement("style"),r=_i.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=s.cssText,t.appendChild(i)}},Io=gn?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(const i of e.cssRules)s+=i.cssText;return Ql(s)})(t):t;/**
9
+ */const Si=globalThis,yn=Si.ShadowRoot&&(Si.ShadyCSS===void 0||Si.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,wn=Symbol(),Fo=new WeakMap;let _n=class{constructor(e,s,r){if(this._$cssResult$=!0,r!==wn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=s}get styleSheet(){let e=this.o;const s=this.t;if(yn&&e===void 0){const r=s!==void 0&&s.length===1;r&&(e=Fo.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Fo.set(s,e))}return e}toString(){return this.cssText}};const sc=t=>new _n(typeof t=="string"?t:t+"",void 0,wn),Z=(t,...e)=>{const s=t.length===1?t[0]:e.reduce(((r,i,n)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new _n(s,t,wn)},rc=(t,e)=>{if(yn)t.adoptedStyleSheets=e.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(const s of e){const r=document.createElement("style"),i=Si.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=s.cssText,t.appendChild(r)}},Ro=yn?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(const r of e.cssRules)s+=r.cssText;return sc(s)})(t):t;/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const{is:ec,defineProperty:tc,getOwnPropertyDescriptor:sc,getOwnPropertyNames:rc,getOwnPropertySymbols:ic,getPrototypeOf:nc}=Object,Si=globalThis,No=Si.trustedTypes,oc=No?No.emptyScript:"",ac=Si.reactiveElementPolyfillSupport,Nr=(t,e)=>t,Pi={toAttribute(t,e){switch(e){case Boolean:t=t?oc:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=t!==null;break;case Number:s=t===null?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},vn=(t,e)=>!ec(t,e),Fo={attribute:!0,type:String,converter:Pi,reflect:!1,useDefault:!1,hasChanged:vn};Symbol.metadata??=Symbol("metadata"),Si.litPropertyMetadata??=new WeakMap;let dr=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,s=Fo){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(e,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(e,i,s);r!==void 0&&tc(this.prototype,e,r)}}static getPropertyDescriptor(e,s,i){const{get:r,set:n}=sc(this.prototype,e)??{get(){return this[s]},set(o){this[s]=o}};return{get:r,set(o){const c=r?.call(this);n?.call(this,o),this.requestUpdate(e,c,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Fo}static _$Ei(){if(this.hasOwnProperty(Nr("elementProperties")))return;const e=nc(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Nr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Nr("properties"))){const s=this.properties,i=[...rc(s),...ic(s)];for(const r of i)this.createProperty(r,s[r])}const e=this[Symbol.metadata];if(e!==null){const s=litPropertyMetadata.get(e);if(s!==void 0)for(const[i,r]of s)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[s,i]of this.elementProperties){const r=this._$Eu(s,i);r!==void 0&&this._$Eh.set(r,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)s.unshift(Io(r))}else e!==void 0&&s.push(Io(e));return s}static _$Eu(e,s){const i=s.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Xl(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,s,i){this._$AK(e,i)}_$ET(e,s){const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const n=(i.converter?.toAttribute!==void 0?i.converter:Pi).toAttribute(s,i.type);this._$Em=e,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(e,s){const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const n=i.getPropertyOptions(r),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:Pi;this._$Em=r;const c=o.fromAttribute(s,n.type);this[r]=c??this._$Ej?.get(r)??c,this._$Em=null}}requestUpdate(e,s,i){if(e!==void 0){const r=this.constructor,n=this[e];if(i??=r.getPropertyOptions(e),!((i.hasChanged??vn)(n,s)||i.useDefault&&i.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,i))))return;this.C(e,s,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,s,{useDefault:i,reflect:r,wrapped:n},o){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??s??this[e]),n!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(s=void 0),this._$AL.set(e,s)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,n]of i){const{wrapped:o}=n,c=this[r];o!==!0||this._$AL.has(r)||c===void 0||this.C(r,void 0,n,c)}}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this._$EO?.forEach((i=>i.hostUpdate?.())),this.update(s)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(s)}willUpdate(e){}_$AE(e){this._$EO?.forEach((s=>s.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((s=>this._$ET(s,this[s]))),this._$EM()}updated(e){}firstUpdated(e){}};dr.elementStyles=[],dr.shadowRootOptions={mode:"open"},dr[Nr("elementProperties")]=new Map,dr[Nr("finalized")]=new Map,ac?.({ReactiveElement:dr}),(Si.reactiveElementVersions??=[]).push("2.1.1");/**
13
+ */const{is:ic,defineProperty:nc,getOwnPropertyDescriptor:oc,getOwnPropertyNames:ac,getOwnPropertySymbols:lc,getPrototypeOf:cc}=Object,Pi=globalThis,jo=Pi.trustedTypes,hc=jo?jo.emptyScript:"",uc=Pi.reactiveElementPolyfillSupport,Fr=(t,e)=>t,xi={toAttribute(t,e){switch(e){case Boolean:t=t?hc:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=t!==null;break;case Number:s=t===null?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},Sn=(t,e)=>!ic(t,e),zo={attribute:!0,type:String,converter:xi,reflect:!1,useDefault:!1,hasChanged:Sn};Symbol.metadata??=Symbol("metadata"),Pi.litPropertyMetadata??=new WeakMap;let dr=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,s=zo){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(e,s),!s.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,s);i!==void 0&&nc(this.prototype,e,i)}}static getPropertyDescriptor(e,s,r){const{get:i,set:n}=oc(this.prototype,e)??{get(){return this[s]},set(o){this[s]=o}};return{get:i,set(o){const c=i?.call(this);n?.call(this,o),this.requestUpdate(e,c,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??zo}static _$Ei(){if(this.hasOwnProperty(Fr("elementProperties")))return;const e=cc(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Fr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Fr("properties"))){const s=this.properties,r=[...ac(s),...lc(s)];for(const i of r)this.createProperty(i,s[i])}const e=this[Symbol.metadata];if(e!==null){const s=litPropertyMetadata.get(e);if(s!==void 0)for(const[r,i]of s)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[s,r]of this.elementProperties){const i=this._$Eu(s,r);i!==void 0&&this._$Eh.set(i,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)s.unshift(Ro(i))}else e!==void 0&&s.push(Ro(e));return s}static _$Eu(e,s){const r=s.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,s=this.constructor.elementProperties;for(const r of s.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return rc(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,s,r){this._$AK(e,r)}_$ET(e,s){const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const n=(r.converter?.toAttribute!==void 0?r.converter:xi).toAttribute(s,r.type);this._$Em=e,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,s){const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const n=r.getPropertyOptions(i),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:xi;this._$Em=i;const c=o.fromAttribute(s,n.type);this[i]=c??this._$Ej?.get(i)??c,this._$Em=null}}requestUpdate(e,s,r){if(e!==void 0){const i=this.constructor,n=this[e];if(r??=i.getPropertyOptions(e),!((r.hasChanged??Sn)(n,s)||r.useDefault&&r.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,s,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,s,{useDefault:r,reflect:i,wrapped:n},o){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??s??this[e]),n!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(s=void 0),this._$AL.set(e,s)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,n]of r){const{wrapped:o}=n,c=this[i];o!==!0||this._$AL.has(i)||c===void 0||this.C(i,void 0,n,c)}}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(s)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(s)}willUpdate(e){}_$AE(e){this._$EO?.forEach((s=>s.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((s=>this._$ET(s,this[s]))),this._$EM()}updated(e){}firstUpdated(e){}};dr.elementStyles=[],dr.shadowRootOptions={mode:"open"},dr[Fr("elementProperties")]=new Map,dr[Fr("finalized")]=new Map,uc?.({ReactiveElement:dr}),(Pi.reactiveElementVersions??=[]).push("2.1.1");/**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
- */const lc={attribute:!0,type:String,converter:Pi,reflect:!1,hasChanged:vn},cc=(t=lc,e,s)=>{const{kind:i,metadata:r}=s;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),i==="setter"&&((t=Object.create(t)).wrapped=!0),n.set(s.name,t),i==="accessor"){const{name:o}=s;return{set(c){const d=e.get.call(this);e.set.call(this,c),this.requestUpdate(o,d,t)},init(c){return c!==void 0&&this.C(o,void 0,t,c),c}}}if(i==="setter"){const{name:o}=s;return function(c){const d=this[o];e.call(this,c),this.requestUpdate(o,d,t)}}throw Error("Unsupported decorator location: "+i)};function h(t){return(e,s)=>typeof s=="object"?cc(t,e,s):((i,r,n)=>{const o=r.hasOwnProperty(n);return r.constructor.createProperty(n,i),o?Object.getOwnPropertyDescriptor(r,n):void 0})(t,e,s)}/**
17
+ */const dc={attribute:!0,type:String,converter:xi,reflect:!1,hasChanged:Sn},pc=(t=dc,e,s)=>{const{kind:r,metadata:i}=s;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),r==="setter"&&((t=Object.create(t)).wrapped=!0),n.set(s.name,t),r==="accessor"){const{name:o}=s;return{set(c){const d=e.get.call(this);e.set.call(this,c),this.requestUpdate(o,d,t)},init(c){return c!==void 0&&this.C(o,void 0,t,c),c}}}if(r==="setter"){const{name:o}=s;return function(c){const d=this[o];e.call(this,c),this.requestUpdate(o,d,t)}}throw Error("Unsupported decorator location: "+r)};function h(t){return(e,s)=>typeof s=="object"?pc(t,e,s):((r,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,r),o?Object.getOwnPropertyDescriptor(i,n):void 0})(t,e,s)}/**
18
18
  * @license
19
19
  * Copyright 2017 Google LLC
20
20
  * SPDX-License-Identifier: BSD-3-Clause
21
- */function Ae(t){return h({...t,state:!0,attribute:!1})}/**
21
+ */function xe(t){return h({...t,state:!0,attribute:!1})}/**
22
22
  * @license
23
23
  * Copyright 2017 Google LLC
24
24
  * SPDX-License-Identifier: BSD-3-Clause
25
- */const yn=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,s),s);/**
25
+ */const Pn=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,s),s);/**
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
29
- */function fs(t,e){return(s,i,r)=>{const n=o=>o.renderRoot?.querySelector(t)??null;return yn(s,i,{get(){return n(this)}})}}/**
29
+ */function $s(t,e){return(s,r,i)=>{const n=o=>o.renderRoot?.querySelector(t)??null;return Pn(s,r,{get(){return n(this)}})}}/**
30
30
  * @license
31
31
  * Copyright 2021 Google LLC
32
32
  * SPDX-License-Identifier: BSD-3-Clause
33
- */function Fr(t){return(e,s)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}]`:":not([name])");return yn(e,s,{get(){const o=this.renderRoot?.querySelector(n),c=o?.assignedElements(t)??[];return r===void 0?c:c.filter((d=>d.matches(r)))}})}}/**
33
+ */function Rr(t){return(e,s)=>{const{slot:r,selector:i}=t??{},n="slot"+(r?`[name=${r}]`:":not([name])");return Pn(e,s,{get(){const o=this.renderRoot?.querySelector(n),c=o?.assignedElements(t)??[];return i===void 0?c:c.filter((d=>d.matches(i)))}})}}/**
34
34
  * @license
35
35
  * Copyright 2017 Google LLC
36
36
  * SPDX-License-Identifier: BSD-3-Clause
37
- */function mt(t){return(e,s)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return yn(e,s,{get(){return this.renderRoot?.querySelector(r)?.assignedNodes(t)??[]}})}}/**
37
+ */function bt(t){return(e,s)=>{const{slot:r}=t??{},i="slot"+(r?`[name=${r}]`:":not([name])");return Pn(e,s,{get(){return this.renderRoot?.querySelector(i)?.assignedNodes(t)??[]}})}}/**
38
38
  * @license
39
39
  * Copyright 2017 Google LLC
40
40
  * SPDX-License-Identifier: BSD-3-Clause
41
- */const wn=globalThis,xi=wn.trustedTypes,Ro=xi?xi.createPolicy("lit-html",{createHTML:t=>t}):void 0,jo="$lit$",Ds=`lit$${Math.random().toFixed(9).slice(2)}$`,zo="?"+Ds,hc=`<${zo}>`,Vs=document,Rr=()=>Vs.createComment(""),jr=t=>t===null||typeof t!="object"&&typeof t!="function",_n=Array.isArray,uc=t=>_n(t)||typeof t?.[Symbol.iterator]=="function",Sn=`[
42
- \f\r]`,zr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Uo=/-->/g,qo=/>/g,Ws=RegExp(`>|${Sn}(?:([^\\s"'>=/]+)(${Sn}*=${Sn}*(?:[^
43
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Bo=/'/g,Ho=/"/g,Vo=/^(?:script|style|textarea|title)$/i,dc=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),R=dc(1),Ft=Symbol.for("lit-noChange"),se=Symbol.for("lit-nothing"),Wo=new WeakMap,Ks=Vs.createTreeWalker(Vs,129);function Ko(t,e){if(!_n(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ro!==void 0?Ro.createHTML(e):e}const pc=(t,e)=>{const s=t.length-1,i=[];let r,n=e===2?"<svg>":e===3?"<math>":"",o=zr;for(let c=0;c<s;c++){const d=t[c];let m,A,g=-1,f=0;for(;f<d.length&&(o.lastIndex=f,A=o.exec(d),A!==null);)f=o.lastIndex,o===zr?A[1]==="!--"?o=Uo:A[1]!==void 0?o=qo:A[2]!==void 0?(Vo.test(A[2])&&(r=RegExp("</"+A[2],"g")),o=Ws):A[3]!==void 0&&(o=Ws):o===Ws?A[0]===">"?(o=r??zr,g=-1):A[1]===void 0?g=-2:(g=o.lastIndex-A[2].length,m=A[1],o=A[3]===void 0?Ws:A[3]==='"'?Ho:Bo):o===Ho||o===Bo?o=Ws:o===Uo||o===qo?o=zr:(o=Ws,r=void 0);const k=o===Ws&&t[c+1].startsWith("/>")?" ":"";n+=o===zr?d+hc:g>=0?(i.push(m),d.slice(0,g)+jo+d.slice(g)+Ds+k):d+Ds+(g===-2?c:k)}return[Ko(t,n+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};let Pn=class zl{constructor({strings:e,_$litType$:s},i){let r;this.parts=[];let n=0,o=0;const c=e.length-1,d=this.parts,[m,A]=pc(e,s);if(this.el=zl.createElement(m,i),Ks.currentNode=this.el.content,s===2||s===3){const g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(r=Ks.nextNode())!==null&&d.length<c;){if(r.nodeType===1){if(r.hasAttributes())for(const g of r.getAttributeNames())if(g.endsWith(jo)){const f=A[o++],k=r.getAttribute(g).split(Ds),E=/([.?@])?(.*)/.exec(f);d.push({type:1,index:n,name:E[2],strings:k,ctor:E[1]==="."?gc:E[1]==="?"?mc:E[1]==="@"?bc:Ai}),r.removeAttribute(g)}else g.startsWith(Ds)&&(d.push({type:6,index:n}),r.removeAttribute(g));if(Vo.test(r.tagName)){const g=r.textContent.split(Ds),f=g.length-1;if(f>0){r.textContent=xi?xi.emptyScript:"";for(let k=0;k<f;k++)r.append(g[k],Rr()),Ks.nextNode(),d.push({type:2,index:++n});r.append(g[f],Rr())}}}else if(r.nodeType===8)if(r.data===zo)d.push({type:2,index:n});else{let g=-1;for(;(g=r.data.indexOf(Ds,g+1))!==-1;)d.push({type:7,index:n}),g+=Ds.length-1}n++}}static createElement(e,s){const i=Vs.createElement("template");return i.innerHTML=e,i}};function pr(t,e,s=t,i){if(e===Ft)return e;let r=i!==void 0?s._$Co?.[i]:s._$Cl;const n=jr(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(t),r._$AT(t,s,i)),i!==void 0?(s._$Co??=[])[i]=r:s._$Cl=r),r!==void 0&&(e=pr(t,r._$AS(t,e.values),r,i)),e}let fc=class{constructor(e,s){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:s},parts:i}=this._$AD,r=(e?.creationScope??Vs).importNode(s,!0);Ks.currentNode=r;let n=Ks.nextNode(),o=0,c=0,d=i[0];for(;d!==void 0;){if(o===d.index){let m;d.type===2?m=new fr(n,n.nextSibling,this,e):d.type===1?m=new d.ctor(n,d.name,d.strings,this,e):d.type===6&&(m=new vc(n,this,e)),this._$AV.push(m),d=i[++c]}o!==d?.index&&(n=Ks.nextNode(),o++)}return Ks.currentNode=Vs,r}p(e){let s=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,s),s+=i.strings.length-2):i._$AI(e[s])),s++}};class fr{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,s,i,r){this.type=2,this._$AH=se,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&e?.nodeType===11&&(e=s.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,s=this){e=pr(this,e,s),jr(e)?e===se||e==null||e===""?(this._$AH!==se&&this._$AR(),this._$AH=se):e!==this._$AH&&e!==Ft&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):uc(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==se&&jr(this._$AH)?this._$AA.nextSibling.data=e:this.T(Vs.createTextNode(e)),this._$AH=e}$(e){const{values:s,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Pn.createElement(Ko(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(s);else{const n=new fc(r,this),o=n.u(this.options);n.p(s),this.T(o),this._$AH=n}}_$AC(e){let s=Wo.get(e.strings);return s===void 0&&Wo.set(e.strings,s=new Pn(e)),s}k(e){_n(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,r=0;for(const n of e)r===s.length?s.push(i=new fr(this.O(Rr()),this.O(Rr()),this,this.options)):i=s[r],i._$AI(n),r++;r<s.length&&(this._$AR(i&&i._$AB.nextSibling,r),s.length=r)}_$AR(e=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class Ai{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,s,i,r,n){this.type=1,this._$AH=se,this._$AN=void 0,this.element=e,this.name=s,this._$AM=r,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=se}_$AI(e,s=this,i,r){const n=this.strings;let o=!1;if(n===void 0)e=pr(this,e,s,0),o=!jr(e)||e!==this._$AH&&e!==Ft,o&&(this._$AH=e);else{const c=e;let d,m;for(e=n[0],d=0;d<n.length-1;d++)m=pr(this,c[i+d],s,d),m===Ft&&(m=this._$AH[d]),o||=!jr(m)||m!==this._$AH[d],m===se?e=se:e!==se&&(e+=(m??"")+n[d+1]),this._$AH[d]=m}o&&!r&&this.j(e)}j(e){e===se?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class gc extends Ai{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===se?void 0:e}}class mc extends Ai{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==se)}}class bc extends Ai{constructor(e,s,i,r,n){super(e,s,i,r,n),this.type=5}_$AI(e,s=this){if((e=pr(this,e,s,0)??se)===Ft)return;const i=this._$AH,r=e===se&&i!==se||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,n=e!==se&&(i===se||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class vc{constructor(e,s,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){pr(this,e)}}const yc={I:fr},wc=wn.litHtmlPolyfillSupport;wc?.(Pn,fr),(wn.litHtmlVersions??=[]).push("3.3.1");const _c=(t,e,s)=>{const i=s?.renderBefore??e;let r=i._$litPart$;if(r===void 0){const n=s?.renderBefore??null;i._$litPart$=r=new fr(e.insertBefore(Rr(),n),n,void 0,s??{})}return r._$AI(t),r};/**
41
+ */const xn=globalThis,Ai=xn.trustedTypes,Uo=Ai?Ai.createPolicy("lit-html",{createHTML:t=>t}):void 0,qo="$lit$",Ds=`lit$${Math.random().toFixed(9).slice(2)}$`,Ho="?"+Ds,fc=`<${Ho}>`,Vs=document,jr=()=>Vs.createComment(""),zr=t=>t===null||typeof t!="object"&&typeof t!="function",An=Array.isArray,mc=t=>An(t)||typeof t?.[Symbol.iterator]=="function",Cn=`[
42
+ \f\r]`,Ur=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Bo=/-->/g,Vo=/>/g,Ws=RegExp(`>|${Cn}(?:([^\\s"'>=/]+)(${Cn}*=${Cn}*(?:[^
43
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Wo=/'/g,Ko=/"/g,Go=/^(?:script|style|textarea|title)$/i,gc=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),R=gc(1),Rt=Symbol.for("lit-noChange"),ee=Symbol.for("lit-nothing"),Yo=new WeakMap,Ks=Vs.createTreeWalker(Vs,129);function Zo(t,e){if(!An(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Uo!==void 0?Uo.createHTML(e):e}const bc=(t,e)=>{const s=t.length-1,r=[];let i,n=e===2?"<svg>":e===3?"<math>":"",o=Ur;for(let c=0;c<s;c++){const d=t[c];let g,A,m=-1,f=0;for(;f<d.length&&(o.lastIndex=f,A=o.exec(d),A!==null);)f=o.lastIndex,o===Ur?A[1]==="!--"?o=Bo:A[1]!==void 0?o=Vo:A[2]!==void 0?(Go.test(A[2])&&(i=RegExp("</"+A[2],"g")),o=Ws):A[3]!==void 0&&(o=Ws):o===Ws?A[0]===">"?(o=i??Ur,m=-1):A[1]===void 0?m=-2:(m=o.lastIndex-A[2].length,g=A[1],o=A[3]===void 0?Ws:A[3]==='"'?Ko:Wo):o===Ko||o===Wo?o=Ws:o===Bo||o===Vo?o=Ur:(o=Ws,i=void 0);const k=o===Ws&&t[c+1].startsWith("/>")?" ":"";n+=o===Ur?d+fc:m>=0?(r.push(g),d.slice(0,m)+qo+d.slice(m)+Ds+k):d+Ds+(m===-2?c:k)}return[Zo(t,n+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};let kn=class Bl{constructor({strings:e,_$litType$:s},r){let i;this.parts=[];let n=0,o=0;const c=e.length-1,d=this.parts,[g,A]=bc(e,s);if(this.el=Bl.createElement(g,r),Ks.currentNode=this.el.content,s===2||s===3){const m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(i=Ks.nextNode())!==null&&d.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const m of i.getAttributeNames())if(m.endsWith(qo)){const f=A[o++],k=i.getAttribute(m).split(Ds),E=/([.?@])?(.*)/.exec(f);d.push({type:1,index:n,name:E[2],strings:k,ctor:E[1]==="."?yc:E[1]==="?"?wc:E[1]==="@"?_c:Ci}),i.removeAttribute(m)}else m.startsWith(Ds)&&(d.push({type:6,index:n}),i.removeAttribute(m));if(Go.test(i.tagName)){const m=i.textContent.split(Ds),f=m.length-1;if(f>0){i.textContent=Ai?Ai.emptyScript:"";for(let k=0;k<f;k++)i.append(m[k],jr()),Ks.nextNode(),d.push({type:2,index:++n});i.append(m[f],jr())}}}else if(i.nodeType===8)if(i.data===Ho)d.push({type:2,index:n});else{let m=-1;for(;(m=i.data.indexOf(Ds,m+1))!==-1;)d.push({type:7,index:n}),m+=Ds.length-1}n++}}static createElement(e,s){const r=Vs.createElement("template");return r.innerHTML=e,r}};function pr(t,e,s=t,r){if(e===Rt)return e;let i=r!==void 0?s._$Co?.[r]:s._$Cl;const n=zr(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(t),i._$AT(t,s,r)),r!==void 0?(s._$Co??=[])[r]=i:s._$Cl=i),i!==void 0&&(e=pr(t,i._$AS(t,e.values),i,r)),e}let vc=class{constructor(e,s){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:s},parts:r}=this._$AD,i=(e?.creationScope??Vs).importNode(s,!0);Ks.currentNode=i;let n=Ks.nextNode(),o=0,c=0,d=r[0];for(;d!==void 0;){if(o===d.index){let g;d.type===2?g=new fr(n,n.nextSibling,this,e):d.type===1?g=new d.ctor(n,d.name,d.strings,this,e):d.type===6&&(g=new Sc(n,this,e)),this._$AV.push(g),d=r[++c]}o!==d?.index&&(n=Ks.nextNode(),o++)}return Ks.currentNode=Vs,i}p(e){let s=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,s),s+=r.strings.length-2):r._$AI(e[s])),s++}};class fr{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,s,r,i){this.type=2,this._$AH=ee,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&e?.nodeType===11&&(e=s.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,s=this){e=pr(this,e,s),zr(e)?e===ee||e==null||e===""?(this._$AH!==ee&&this._$AR(),this._$AH=ee):e!==this._$AH&&e!==Rt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):mc(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==ee&&zr(this._$AH)?this._$AA.nextSibling.data=e:this.T(Vs.createTextNode(e)),this._$AH=e}$(e){const{values:s,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=kn.createElement(Zo(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(s);else{const n=new vc(i,this),o=n.u(this.options);n.p(s),this.T(o),this._$AH=n}}_$AC(e){let s=Yo.get(e.strings);return s===void 0&&Yo.set(e.strings,s=new kn(e)),s}k(e){An(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let r,i=0;for(const n of e)i===s.length?s.push(r=new fr(this.O(jr()),this.O(jr()),this,this.options)):r=s[i],r._$AI(n),i++;i<s.length&&(this._$AR(r&&r._$AB.nextSibling,i),s.length=i)}_$AR(e=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class Ci{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,s,r,i,n){this.type=1,this._$AH=ee,this._$AN=void 0,this.element=e,this.name=s,this._$AM=i,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=ee}_$AI(e,s=this,r,i){const n=this.strings;let o=!1;if(n===void 0)e=pr(this,e,s,0),o=!zr(e)||e!==this._$AH&&e!==Rt,o&&(this._$AH=e);else{const c=e;let d,g;for(e=n[0],d=0;d<n.length-1;d++)g=pr(this,c[r+d],s,d),g===Rt&&(g=this._$AH[d]),o||=!zr(g)||g!==this._$AH[d],g===ee?e=ee:e!==ee&&(e+=(g??"")+n[d+1]),this._$AH[d]=g}o&&!i&&this.j(e)}j(e){e===ee?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class yc extends Ci{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===ee?void 0:e}}class wc extends Ci{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==ee)}}class _c extends Ci{constructor(e,s,r,i,n){super(e,s,r,i,n),this.type=5}_$AI(e,s=this){if((e=pr(this,e,s,0)??ee)===Rt)return;const r=this._$AH,i=e===ee&&r!==ee||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==ee&&(r===ee||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Sc{constructor(e,s,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=s,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){pr(this,e)}}const Pc={I:fr},xc=xn.litHtmlPolyfillSupport;xc?.(kn,fr),(xn.litHtmlVersions??=[]).push("3.3.1");const Ac=(t,e,s)=>{const r=s?.renderBefore??e;let i=r._$litPart$;if(i===void 0){const n=s?.renderBefore??null;r._$litPart$=i=new fr(e.insertBefore(jr(),n),n,void 0,s??{})}return i._$AI(t),i};/**
44
44
  * @license
45
45
  * Copyright 2020 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
- */const{I:Sc}=yc,Pc=t=>t.strings===void 0,Go=()=>document.createComment(""),Ur=(t,e,s)=>{const i=t._$AA.parentNode,r=e===void 0?t._$AB:e._$AA;if(s===void 0){const n=i.insertBefore(Go(),r),o=i.insertBefore(Go(),r);s=new Sc(n,o,t,t.options)}else{const n=s._$AB.nextSibling,o=s._$AM,c=o!==t;if(c){let d;s._$AQ?.(t),s._$AM=t,s._$AP!==void 0&&(d=t._$AU)!==o._$AU&&s._$AP(d)}if(n!==r||c){let d=s._$AA;for(;d!==n;){const m=d.nextSibling;i.insertBefore(d,r),d=m}}}return s},Gs=(t,e,s=t)=>(t._$AI(e,s),t),xc={},Ac=(t,e=xc)=>t._$AH=e,Cc=t=>t._$AH,xn=t=>{t._$AR(),t._$AA.remove()};/**
47
+ */const{I:Cc}=Pc,kc=t=>t.strings===void 0,Jo=()=>document.createComment(""),qr=(t,e,s)=>{const r=t._$AA.parentNode,i=e===void 0?t._$AB:e._$AA;if(s===void 0){const n=r.insertBefore(Jo(),i),o=r.insertBefore(Jo(),i);s=new Cc(n,o,t,t.options)}else{const n=s._$AB.nextSibling,o=s._$AM,c=o!==t;if(c){let d;s._$AQ?.(t),s._$AM=t,s._$AP!==void 0&&(d=t._$AU)!==o._$AU&&s._$AP(d)}if(n!==i||c){let d=s._$AA;for(;d!==n;){const g=d.nextSibling;r.insertBefore(d,i),d=g}}}return s},Gs=(t,e,s=t)=>(t._$AI(e,s),t),$c={},Dc=(t,e=$c)=>t._$AH=e,Ec=t=>t._$AH,$n=t=>{t._$AR(),t._$AA.remove()};/**
48
48
  * @license
49
49
  * Copyright 2017 Google LLC
50
50
  * SPDX-License-Identifier: BSD-3-Clause
51
- */const Ys={ATTRIBUTE:1,CHILD:2},Es=t=>(...e)=>({_$litDirective$:t,values:e});let gr=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,i){this._$Ct=e,this._$AM=s,this._$Ci=i}_$AS(e,s){return this.update(e,s)}update(e,s){return this.render(...s)}};/**
51
+ */const Ys={ATTRIBUTE:1,CHILD:2},Es=t=>(...e)=>({_$litDirective$:t,values:e});let mr=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,r){this._$Ct=e,this._$AM=s,this._$Ci=r}_$AS(e,s){return this.update(e,s)}update(e,s){return this.render(...s)}};/**
52
52
  * @license
53
53
  * Copyright 2017 Google LLC
54
54
  * SPDX-License-Identifier: BSD-3-Clause
55
- */const qr=(t,e)=>{const s=t._$AN;if(s===void 0)return!1;for(const i of s)i._$AO?.(e,!1),qr(i,e);return!0},Ci=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while(s?.size===0)},Yo=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Dc(e)}};function kc(t){this._$AN!==void 0?(Ci(this),this._$AM=t,Yo(this)):this._$AM=t}function $c(t,e=!1,s=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(i))for(let n=s;n<i.length;n++)qr(i[n],!1),Ci(i[n]);else i!=null&&(qr(i,!1),Ci(i));else qr(this,t)}const Dc=t=>{t.type==Ys.CHILD&&(t._$AP??=$c,t._$AQ??=kc)};class An extends gr{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,i){super._$AT(e,s,i),Yo(this),this.isConnected=e._$AU}_$AO(e,s=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),s&&(qr(this,e),Ci(this))}setValue(e){if(Pc(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
55
+ */const Hr=(t,e)=>{const s=t._$AN;if(s===void 0)return!1;for(const r of s)r._$AO?.(e,!1),Hr(r,e);return!0},ki=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while(s?.size===0)},Qo=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Lc(e)}};function Oc(t){this._$AN!==void 0?(ki(this),this._$AM=t,Qo(this)):this._$AM=t}function Tc(t,e=!1,s=0){const r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(r))for(let n=s;n<r.length;n++)Hr(r[n],!1),ki(r[n]);else r!=null&&(Hr(r,!1),ki(r));else Hr(this,t)}const Lc=t=>{t.type==Ys.CHILD&&(t._$AP??=Tc,t._$AQ??=Oc)};class Dn extends mr{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,r){super._$AT(e,s,r),Qo(this),this.isConnected=e._$AU}_$AO(e,s=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),s&&(Hr(this,e),ki(this))}setValue(e){if(kc(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
56
56
  * @license
57
57
  * Copyright 2017 Google LLC
58
58
  * SPDX-License-Identifier: BSD-3-Clause
59
- */const Cn=globalThis;let J=class extends dr{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=_c(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Ft}};J._$litElement$=!0,J.finalized=!0,Cn.litElementHydrateSupport?.({LitElement:J});const Ec=Cn.litElementPolyfillSupport;Ec?.({LitElement:J}),(Cn.litElementVersions??=[]).push("4.2.1");function Zo(t){if(t==null||typeof t!="object"||Array.isArray(t))return t;const e={...t};return delete e._sonic_http_response_,e}const Re=class Re{constructor(e){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!1,this.serviceURL=e.serviceURL,this.blockUntilDone=e.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=e.userName,this.password=e.password,e.token&&(this.token=e.token),this.tokenProvider=e.tokenProvider,this.authToken=e.authToken,this.addHTTPResponse=e.addHTTPResponse||!1,this.credentials=e.credentials,this.cache=e.cache||"default",this.keepAlive=e.keepAlive||!1}set token(e){if(this._token=e,!e){Re.tokens.delete(this.serviceURL);return}Re.invalidTokens.includes(e)||Re.tokens.set(this.serviceURL,e)}get token(){return Re.invalidTokens.includes(this._token)?Re.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(Re.invalidTokens.includes(e)||(Re.invalidTokens.push(e),this.token=null))}async handleResult(e,s){Re.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const i=e.headers.get("content-type")?.toLowerCase(),r=e.status;let n={};if(!i||i.indexOf("text/")==0)n={text:await e.text()};else try{n=await e.json()}catch{n={}}if(this.addHTTPResponse&&lt.isObject(n)&&(n._sonic_http_response_=e),r===498&&!Re.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),s.apiMethod==="get"){const c=await this.get(s.path,s.additionalHeaders);if(c==null)throw new Error("GET retry failed after token refresh");n=c}else n=await this[s.apiMethod](s.path,s.data,s.method,s.additionalHeaders);return yi("sonic-api").lastResponse.set({http:e,processed:n}),n}async auth(){if(this.token)return;if(Re.tokens.has(this.serviceURL)){this.token=Re.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const s=new URL(this.serviceURL),i=s.protocol+"//"+s.host,r=await fetch(this.computeURL(this.tokenProvider,{serviceHost:i}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const n=await r.json();n.token?this.token=n.token:Re.failledTokenUpdates.set(this.serviceURL,!0)}catch{Re.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,s){const i=ve.get(e),r=new URLSearchParams(s.split("?")[1]||""),n=i.get();let o=[];Array.isArray(n)?o=n:o=[n];const c=[];let d=Number.POSITIVE_INFINITY,m=0,A=0;if(r.has("limit")&&(d=parseInt(r.get("limit")||"0"),A++),r.has("offset")&&(m=parseInt(r.get("offset")||"0"),A++),A>0&&(r.delete("limit"),r.delete("offset")),r.size===0)return o.slice(m,m+d);for(const[g,f]of r.entries()){const k=f.split(",").map(E=>E.trim());for(const E of k)for(const O of o)if(typeof O!="object")isNaN(+O)?O.toString().toLowerCase().includes(f.toLowerCase())&&c.push(O):O===f&&c.push(O);else{const z=O;if(!z[g])continue;isNaN(+z[g])?z[g]?.toString().toLowerCase().includes(E.toLowerCase())&&c.push(O):z[g]===E&&c.push(O)}}return c.slice(m,m+d)}firstCallDone(){return new Promise(e=>{if(!Re.firstCallDoneFlags.has(this.serviceURL))Re.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const s=()=>{[void 0,"loading"].includes(Re.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(s):e(!0)};s()}})}async get(e,s){const i=/dataProvider\((.*?)\)(.*?)$/;if(i.test(e)){this.blockUntilDone&&(await this.firstCallDone(),Re.firstCallDoneFlags.set(this.serviceURL,"loading"));const m=e.match(i);if(!m)throw new Error("dataProvider path is not valid");return await this.localGet(m[1],m[2])}const r={apiMethod:"get",path:e,additionalHeaders:s},n=await this.createHeaders(s),o=this.computeURL(e),c=JSON.stringify({url:o,headers:n,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),Re.firstCallDoneFlags.set(this.serviceURL,"loading")),!Re.loadingGetPromises.has(c)){const m=new Promise(async A=>{try{const g=await fetch(o,{headers:n,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),f=await this.handleResult(g,r);A({processed:f,response:this.lastResult})}catch{Re.firstCallDoneFlags.set(this.serviceURL,"error"),A(null)}});Re.loadingGetPromises.set(c,m)}const d=await Re.loadingGetPromises.get(c);return Re.loadingGetPromises.delete(c),d?(this.lastResult=d.response,d.processed):null}async getDetailed(e,s){const i=/dataProvider\((.*?)\)(.*?)$/.test(e),r=await this.get(e,s);if(r==null)return;const n=Zo(r),o=this.computeURL(e);if(i)return{request:new Request(o,{method:"GET"}),result:n};const c=await this.createHeaders(s);return{request:new Request(o,{method:"GET",headers:new Headers(c),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:n}}async sendDetailed(e,s,i,r){const n=await this.send(e,s,i,r);if(n==null)return;const o=Zo(n),c=this.computeURL(e),d=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...r});return{request:new Request(c,{method:i,headers:new Headers(d),credentials:this.credentials,body:JSON.stringify(s),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,s,i){return this.sendDetailed(e,s,"POST",i)}async putDetailed(e,s,i){return this.sendDetailed(e,s,"PUT",i)}async patchDetailed(e,s,i){return this.sendDetailed(e,s,"PATCH",i)}async createHeaders(e){await this.auth();const s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=ze.getLanguage(),e&&Object.assign(s,e),s}computeURL(e,s={}){let i="";e.startsWith("http")?i=e:i=this.serviceURL+"/"+e,i.startsWith("http")||(i=window.location.origin+i);const r=new URL(i);for(const n in s)r.searchParams.set(n,s[n]);return r.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,s,i="POST",r){const n={apiMethod:"send",path:e,additionalHeaders:r,method:i,data:s},o=await this.createHeaders(r);o.Accept="application/json",o["Content-Type"]="application/json";const c=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:i,body:JSON.stringify(s),keepalive:this.keepAlive});return await this.handleResult(c,n)}async submitFormData(e,s,i="POST",r){const n={apiMethod:"submitFormData",path:e,additionalHeaders:r,method:i,data:s},o=await this.createHeaders(r);o.Accept="application/json";const c=new FormData,d=s;for(const A in d)c.set(A,d[A]);const m=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:i,body:c,keepalive:this.keepAlive});return await this.handleResult(m,n)}async put(e,s,i){return this.send(e,s,"PUT",i)}async post(e,s,i){return this.send(e,s,"POST",i)}async patch(e,s,i){return this.send(e,s,"PATCH",i)}async delete(e,s,i){return this.send(e,s,"delete",i)}};Re.loadingGetPromises=new Map,Re.tokens=new Map,Re.invalidTokens=[],Re.failledTokenUpdates=new Map,Re.firstCallDoneFlags=new Map;let Os=Re;ze.getApiConfiguration(document.body||document.documentElement);const Oc=async(t,e)=>{};/**
59
+ */const En=globalThis;let Q=class extends dr{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ac(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Rt}};Q._$litElement$=!0,Q.finalized=!0,En.litElementHydrateSupport?.({LitElement:Q});const Mc=En.litElementPolyfillSupport;Mc?.({LitElement:Q}),(En.litElementVersions??=[]).push("4.2.1");function Xo(t){if(t==null||typeof t!="object"||Array.isArray(t))return t;const e={...t};return delete e._sonic_http_response_,e}const Re=class Re{constructor(e){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!1,this.serviceURL=e.serviceURL,this.blockUntilDone=e.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=e.userName,this.password=e.password,e.token&&(this.token=e.token),this.tokenProvider=e.tokenProvider,this.authToken=e.authToken,this.addHTTPResponse=e.addHTTPResponse||!1,this.credentials=e.credentials,this.cache=e.cache||"default",this.keepAlive=e.keepAlive||!1}set token(e){if(this._token=e,!e){Re.tokens.delete(this.serviceURL);return}Re.invalidTokens.includes(e)||Re.tokens.set(this.serviceURL,e)}get token(){return Re.invalidTokens.includes(this._token)?Re.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(Re.invalidTokens.includes(e)||(Re.invalidTokens.push(e),this.token=null))}async handleResult(e,s){Re.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const r=e.headers.get("content-type")?.toLowerCase(),i=e.status;let n={};if(!r||r.indexOf("text/")==0)n={text:await e.text()};else try{n=await e.json()}catch{n={}}if(this.addHTTPResponse&&ht.isObject(n)&&(n._sonic_http_response_=e),i===498&&!Re.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),s.apiMethod==="get"){const c=await this.get(s.path,s.additionalHeaders);if(c==null)throw new Error("GET retry failed after token refresh");n=c}else n=await this[s.apiMethod](s.path,s.data,s.method,s.additionalHeaders);return wi("sonic-api").lastResponse.set({http:e,processed:n}),n}async auth(){if(this.token)return;if(Re.tokens.has(this.serviceURL)){this.token=Re.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const s=new URL(this.serviceURL),r=s.protocol+"//"+s.host,i=await fetch(this.computeURL(this.tokenProvider,{serviceHost:r}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const n=await i.json();n.token?this.token=n.token:Re.failledTokenUpdates.set(this.serviceURL,!0)}catch{Re.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,s){const r=ve.get(e),i=new URLSearchParams(s.split("?")[1]||""),n=r.get();let o=[];Array.isArray(n)?o=n:o=[n];const c=[];let d=Number.POSITIVE_INFINITY,g=0,A=0;if(i.has("limit")&&(d=parseInt(i.get("limit")||"0"),A++),i.has("offset")&&(g=parseInt(i.get("offset")||"0"),A++),A>0&&(i.delete("limit"),i.delete("offset")),i.size===0)return o.slice(g,g+d);for(const[m,f]of i.entries()){const k=f.split(",").map(E=>E.trim());for(const E of k)for(const O of o)if(typeof O!="object")isNaN(+O)?O.toString().toLowerCase().includes(f.toLowerCase())&&c.push(O):O===f&&c.push(O);else{const z=O;if(!z[m])continue;isNaN(+z[m])?z[m]?.toString().toLowerCase().includes(E.toLowerCase())&&c.push(O):z[m]===E&&c.push(O)}}return c.slice(g,g+d)}firstCallDone(){return new Promise(e=>{if(!Re.firstCallDoneFlags.has(this.serviceURL))Re.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const s=()=>{[void 0,"loading"].includes(Re.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(s):e(!0)};s()}})}async get(e,s){const r=/dataProvider\((.*?)\)(.*?)$/;if(r.test(e)){this.blockUntilDone&&(await this.firstCallDone(),Re.firstCallDoneFlags.set(this.serviceURL,"loading"));const g=e.match(r);if(!g)throw new Error("dataProvider path is not valid");return await this.localGet(g[1],g[2])}const i={apiMethod:"get",path:e,additionalHeaders:s},n=await this.createHeaders(s),o=this.computeURL(e),c=JSON.stringify({url:o,headers:n,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),Re.firstCallDoneFlags.set(this.serviceURL,"loading")),!Re.loadingGetPromises.has(c)){const g=new Promise(async A=>{try{const m=await fetch(o,{headers:n,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),f=await this.handleResult(m,i);A({processed:f,response:this.lastResult})}catch{Re.firstCallDoneFlags.set(this.serviceURL,"error"),A(null)}});Re.loadingGetPromises.set(c,g)}const d=await Re.loadingGetPromises.get(c);return Re.loadingGetPromises.delete(c),d?(this.lastResult=d.response,d.processed):null}async getDetailed(e,s){const r=/dataProvider\((.*?)\)(.*?)$/.test(e),i=await this.get(e,s);if(i==null)return;const n=Xo(i),o=this.computeURL(e);if(r)return{request:new Request(o,{method:"GET"}),result:n};const c=await this.createHeaders(s);return{request:new Request(o,{method:"GET",headers:new Headers(c),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:n}}async sendDetailed(e,s,r,i){const n=await this.send(e,s,r,i);if(n==null)return;const o=Xo(n),c=this.computeURL(e),d=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...i});return{request:new Request(c,{method:r,headers:new Headers(d),credentials:this.credentials,body:JSON.stringify(s),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,s,r){return this.sendDetailed(e,s,"POST",r)}async putDetailed(e,s,r){return this.sendDetailed(e,s,"PUT",r)}async patchDetailed(e,s,r){return this.sendDetailed(e,s,"PATCH",r)}async createHeaders(e){await this.auth();const s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=ze.getLanguage(),e&&Object.assign(s,e),s}computeURL(e,s={}){let r="";e.startsWith("http")?r=e:r=this.serviceURL+"/"+e,r.startsWith("http")||(r=window.location.origin+r);const i=new URL(r);for(const n in s)i.searchParams.set(n,s[n]);return i.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,s,r="POST",i){const n={apiMethod:"send",path:e,additionalHeaders:i,method:r,data:s},o=await this.createHeaders(i);o.Accept="application/json",o["Content-Type"]="application/json";const c=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:JSON.stringify(s),keepalive:this.keepAlive});return await this.handleResult(c,n)}async submitFormData(e,s,r="POST",i){const n={apiMethod:"submitFormData",path:e,additionalHeaders:i,method:r,data:s},o=await this.createHeaders(i);o.Accept="application/json";const c=new FormData,d=s;for(const A in d)c.set(A,d[A]);const g=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:c,keepalive:this.keepAlive});return await this.handleResult(g,n)}async put(e,s,r){return this.send(e,s,"PUT",r)}async post(e,s,r){return this.send(e,s,"POST",r)}async patch(e,s,r){return this.send(e,s,"PATCH",r)}async delete(e,s,r){return this.send(e,s,"delete",r)}};Re.loadingGetPromises=new Map,Re.tokens=new Map,Re.invalidTokens=[],Re.failledTokenUpdates=new Map,Re.firstCallDoneFlags=new Map;let Os=Re;ze.getApiConfiguration(document.body||document.documentElement);const Ic=async(t,e)=>{};/**
60
60
  * @license
61
61
  * Copyright 2017 Google LLC
62
62
  * SPDX-License-Identifier: BSD-3-Clause
63
- */let kn=class extends gr{constructor(e){if(super(e),this.it=se,e.type!==Ys.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===se||e==null)return this._t=void 0,this.it=e;if(e===Ft)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const s=[e];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};kn.directiveName="unsafeHTML",kn.resultType=1;const He=Es(kn),$n=new Map,Jo=t=>{if(!t)return null;const e=ze.getApiConfiguration(t),s=ze.getAncestorAttributeValue(t,"wordingProvider"),i=ze.getAncestorAttributeValue(t,"wordingVersionProvider"),r={apiConfiguration:e,wordingProvider:s,wordingVersionProvider:i};let n=null;for(const[o,c]of $n)if(lt.deepEqual(o,r)){n=c;break}return n||(n={api:new Os(e),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:s,callIndex:0,wordingVersionProvider:i,apiCallKey:r},$n.set(r,n)),n},Qo="",We=class We extends An{constructor(e){super(e),this.useUnsafeHTML=!1,this.onAssign=s=>{const i=this.useUnsafeHTML?He(s):s;this.setValue(i)},this.node=e.options.host}unsubscribe(){We.publisher["wording_"+this.key].offAssign(this.onAssign)}render(e,s=!1){return this.useUnsafeHTML=s,this.key!==e&&(this.key=e,this.isConnected&&this.subscribe(e)),Ft}static async callApi(e,s,i=!0,r){if(await ve.getInstance().isLocalStrorageReady,We.firstCall){We.firstCall=!1,dn(We.reloadWordings);const A=Object.keys(We.publisher.get());for(const g of A)We.publisher.get()[g]===Qo&&delete We.publisher[g]}if(e){const A=ze.getAncestorAttributeValue(e,"wordingVersionProvider");A&&yi(A).onAssign(We.handleVersionProvider(e))}let n=We.publisher.get()["wording_"+s]!=null;const o=r||Jo(e);if(!o)return;if(n&&s!==""){o.translatedKeys.add(s);return}o.callIndex++;const c=o.callIndex,d=o.wordingProvider??"";if(!d&&i){window.setTimeout(async()=>{We.callApi(null,s,!1,o)},1e3);return}const m=o.api;window.queueMicrotask(async()=>{if(n=We.publisher["wording_"+s].get()!=null,!n&&s!==""&&(o.keysToTranslate.add(s),We.publisher["wording_"+s].set(Qo)),c!==o.callIndex)return;const A=Array.from(o.keysToTranslate);if(!A.length)return;const g=d.split("?"),f=g.shift(),k=(g.length>0?g.join("?")+"&":"")+"labels[]="+A.join("&labels[]="),E=f+"?"+k;o.translatedKeys=new Set([...o.translatedKeys,...o.keysToTranslate]),o.keysToTranslate.clear();const O=await m.get(E);for(const z in O)We.publisher["wording_"+z].set(O[z])})}static reloadWordings(){for(const e of $n.values())e.keysToTranslate=new Set(e.translatedKeys),e.keysToTranslate.size>0&&We.callApi(null,"",!1,e)}static handleVersionProvider(e){const s=Jo(e),i=n=>{};if(!s)return i;if(We.versionProviderHandlers.has(s))return We.versionProviderHandlers.get(s)||i;const r=function(n){if(!s.wordingVersionProvider)return;const c=We.publisher.get().__wording_versions__??[];if(n==null)return;const d=c.find(m=>m.serviceURL===s.api.serviceURL)||{serviceURL:s.api.serviceURL,version:0};c.includes(d)||c.push(d),n!==d.version&&(d.version=n,We.publisher.set({__wording_versions__:c}),We.reloadWordings())};return We.versionProviderHandlers.set(s,r),r}subscribe(e){this.unsubscribe(),We.publisher["wording_"+e].onAssign(this.onAssign),We.callApi(this.node,e)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};We.publisher=ve.get("sonic-wording",{localStorageMode:"enabled"}),We.firstCall=!0,We.versionProviderHandlers=new Map;let mr=We;const Tc=Es(mr);var Lc=Object.defineProperty,Mc=Object.getOwnPropertyDescriptor,ss=(t,e,s,i)=>{for(var r=i>1?void 0:i?Mc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Lc(e,s,r),r};let ki=!1,Dn=new Set;const kt=(t,e)=>{var r;const s=(r=class extends t{constructor(...o){super(),this.collectDependenciesVersion=0,this.displayContents=!1,this.noAutoFill=!1,this.forceAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.shouldRenderLazy=!0,this.defferedDebug=null,this.debug=null,this.onAssign=c=>{this.props=c}}hasAncestorAttribute(o){return this.getAncestorAttributeValue(o)!=null}getAncestorAttributeValue(o){return ze.getAncestorAttributeValue(this,o)}get props(){return this._props!==null||!this.publisher?this._props:this.publisher.get()}set props(o){typeof o=="string"&&["{","["].includes(o.trim().charAt(0))&&(o=JSON.parse(o)),o!=this._props&&(this._props=o,this.publisher&&this.publisher.get()!=o&&this.publisher.set(o),this.requestUpdate())}updated(o){super.updated(o);const d=[...(this.shadowRoot||this).children].filter(A=>A.tagName!="STYLE"),m=this.displayContents?"contents":d.length==0?"none":null;m?this.style.display=m:this.style.removeProperty("display")}connectedCallback(){if(r.instanceCounter++,this.hasAttribute("lazyRendering")){const o={root:null,threshold:.9};let c=!0;const d=new IntersectionObserver(m=>{for(const A of m)if(c&&A.isIntersecting){c=!1,d.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},o);d.observe(this)}else this.initWording(),this.shouldRenderLazy=!1;this.initPublisher(),this.addDebugger(),super.connectedCallback()}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),mr.publisher.stopTemplateFilling(this),this.onAssign&&this.publisher?.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const o=this.debug.style;o.position="fixed",o.top="0",o.right="0",o.margin="auto",o.borderRadius=".7rem",o.backgroundColor="#0f1729",o.color="#c5d4f9",o.padding="16px 16px",o.margin="16px 16px",o.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",o.overflowY="auto",o.zIndex="99999999",o.maxHeight="calc(100vh - 32px)",o.fontFamily="Consolas, monospace",o.maxWidth="min(50vw,25rem)",o.fontSize="12px",o.minWidth="300px",o.overflowWrap="break-word",o.resize="vertical"}this.addEventListener("click",o=>{o.ctrlKey&&(o.preventDefault(),ki=!ki)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{ki||this.removeDebugger(),document.body.appendChild(this.debug),Dn.add(this.debug)}),this.addEventListener("mouseout",()=>{ki||this.removeDebugger()}),this.publisher?.onInternalMutation(()=>{this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
63
+ */let On=class extends mr{constructor(e){if(super(e),this.it=ee,e.type!==Ys.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===ee||e==null)return this._t=void 0,this.it=e;if(e===Rt)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const s=[e];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};On.directiveName="unsafeHTML",On.resultType=1;const Be=Es(On),Tn=new Map,ea=t=>{if(!t)return null;const e=ze.getApiConfiguration(t),s=ze.getAncestorAttributeValue(t,"wordingProvider"),r=ze.getAncestorAttributeValue(t,"wordingVersionProvider"),i={apiConfiguration:e,wordingProvider:s,wordingVersionProvider:r};let n=null;for(const[o,c]of Tn)if(ht.deepEqual(o,i)){n=c;break}return n||(n={api:new Os(e),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:s,callIndex:0,wordingVersionProvider:r,apiCallKey:i},Tn.set(i,n)),n},ta="",We=class We extends Dn{constructor(e){super(e),this.useUnsafeHTML=!1,this.onAssign=s=>{const r=this.useUnsafeHTML?Be(s):s;this.setValue(r)},this.node=e.options.host}unsubscribe(){We.publisher["wording_"+this.key].offAssign(this.onAssign)}render(e,s=!1){return this.useUnsafeHTML=s,this.key!==e&&(this.key=e,this.isConnected&&this.subscribe(e)),Rt}static async callApi(e,s,r=!0,i){if(await ve.getInstance().isLocalStrorageReady,We.firstCall){We.firstCall=!1,gn(We.reloadWordings);const A=Object.keys(We.publisher.get());for(const m of A)We.publisher.get()[m]===ta&&delete We.publisher[m]}if(e){const A=ze.getAncestorAttributeValue(e,"wordingVersionProvider");A&&wi(A).onAssign(We.handleVersionProvider(e))}let n=We.publisher.get()["wording_"+s]!=null;const o=i||ea(e);if(!o)return;if(n&&s!==""){o.translatedKeys.add(s);return}o.callIndex++;const c=o.callIndex,d=o.wordingProvider??"";if(!d&&r){window.setTimeout(async()=>{We.callApi(null,s,!1,o)},1e3);return}const g=o.api;window.queueMicrotask(async()=>{if(n=We.publisher["wording_"+s].get()!=null,!n&&s!==""&&(o.keysToTranslate.add(s),We.publisher["wording_"+s].set(ta)),c!==o.callIndex)return;const A=Array.from(o.keysToTranslate);if(!A.length)return;const m=d.split("?"),f=m.shift(),k=(m.length>0?m.join("?")+"&":"")+"labels[]="+A.join("&labels[]="),E=f+"?"+k;o.translatedKeys=new Set([...o.translatedKeys,...o.keysToTranslate]),o.keysToTranslate.clear();const O=await g.get(E);for(const z in O)We.publisher["wording_"+z].set(O[z])})}static reloadWordings(){for(const e of Tn.values())e.keysToTranslate=new Set(e.translatedKeys),e.keysToTranslate.size>0&&We.callApi(null,"",!1,e)}static handleVersionProvider(e){const s=ea(e),r=n=>{};if(!s)return r;if(We.versionProviderHandlers.has(s))return We.versionProviderHandlers.get(s)||r;const i=function(n){if(!s.wordingVersionProvider)return;const c=We.publisher.get().__wording_versions__??[];if(n==null)return;const d=c.find(g=>g.serviceURL===s.api.serviceURL)||{serviceURL:s.api.serviceURL,version:0};c.includes(d)||c.push(d),n!==d.version&&(d.version=n,We.publisher.set({__wording_versions__:c}),We.reloadWordings())};return We.versionProviderHandlers.set(s,i),i}subscribe(e){this.unsubscribe(),We.publisher["wording_"+e].onAssign(this.onAssign),We.callApi(this.node,e)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};We.publisher=ve.get("sonic-wording",{localStorageMode:"enabled"}),We.firstCall=!0,We.versionProviderHandlers=new Map;let gr=We;const Nc=Es(gr);var Fc=Object.defineProperty,Rc=Object.getOwnPropertyDescriptor,rs=(t,e,s,r)=>{for(var i=r>1?void 0:r?Rc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Fc(e,s,i),i};let $i=!1,Ln=new Set;const Ot=(t,e)=>{var i;const s=(i=class extends t{constructor(...o){super(),this.collectDependenciesVersion=0,this.displayContents=!1,this.noAutoFill=!1,this.forceAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.shouldRenderLazy=!0,this.defferedDebug=null,this.debug=null,this.onAssign=c=>{this.props=c}}hasAncestorAttribute(o){return this.getAncestorAttributeValue(o)!=null}getAncestorAttributeValue(o){return ze.getAncestorAttributeValue(this,o)}get props(){return this._props!==null||!this.publisher?this._props:this.publisher.get()}set props(o){typeof o=="string"&&["{","["].includes(o.trim().charAt(0))&&(o=JSON.parse(o)),o!=this._props&&(this._props=o,this.publisher&&this.publisher.get()!=o&&this.publisher.set(o),this.requestUpdate())}updated(o){super.updated(o);const d=[...(this.shadowRoot||this).children].filter(A=>A.tagName!="STYLE"),g=this.displayContents?"contents":d.length==0?"none":null;g?this.style.display=g:this.style.removeProperty("display")}connectedCallback(){if(i.instanceCounter++,this.hasAttribute("lazyRendering")){const o={root:null,threshold:.9};let c=!0;const d=new IntersectionObserver(g=>{for(const A of g)if(c&&A.isIntersecting){c=!1,d.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},o);d.observe(this)}else this.initWording(),this.shouldRenderLazy=!1;this.initPublisher(),this.addDebugger(),super.connectedCallback()}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),gr.publisher.stopTemplateFilling(this),this.onAssign&&this.publisher?.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const o=this.debug.style;o.position="fixed",o.top="0",o.right="0",o.margin="auto",o.borderRadius=".7rem",o.backgroundColor="#0f1729",o.color="#c5d4f9",o.padding="16px 16px",o.margin="16px 16px",o.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",o.overflowY="auto",o.zIndex="99999999",o.maxHeight="calc(100vh - 32px)",o.fontFamily="Consolas, monospace",o.maxWidth="min(50vw,25rem)",o.fontSize="12px",o.minWidth="300px",o.overflowWrap="break-word",o.resize="vertical"}this.addEventListener("click",o=>{o.ctrlKey&&(o.preventDefault(),$i=!$i)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{$i||this.removeDebugger(),document.body.appendChild(this.debug),Ln.add(this.debug)}),this.addEventListener("mouseout",()=>{$i||this.removeDebugger()}),this.publisher?.onInternalMutation(()=>{this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
64
64
  <div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px;">
65
65
  Variable disponible dans la console<br>
66
66
  ctrl + Clique : épingler / désépingler
67
67
  </div>
68
- <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){Dn.forEach(o=>{document.body.contains(o)&&document.body.removeChild(o)}),Dn=new Set}getApiConfiguration(){return ze.getApiConfiguration(this)}async initWording(){const o=Object.getOwnPropertyNames(this.constructor.prototype);for(const c of o)c.indexOf("wording_")==0&&mr.callApi(this,c.substring(8));mr.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const o=super.createRenderRoot();return wi.observe(o),o}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const o=ve.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let c=this.dataProvider;if(!c&&this._props&&(this.dataProvider=c="__subscriber__"+r.instanceCounter),c){this.bindPublisher&&o.set(c,this.bindPublisher());let d=o.get(c,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=c,this.hasAttribute("subDataProvider")){const m=this.getAttribute("subDataProvider");this.dataProvider=c+"/"+m,d=lt.traverse(d,m.split(".")),o.set(this.dataProvider,d),this.publisher=d}this.publisher=d}this.hasAttribute("lazyRendering")||this.startPublisher()}startPublisher(){this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}},r.instanceCounter=0,r);return ss([h({type:Number})],s.prototype,"collectDependenciesVersion",2),ss([h({type:Boolean})],s.prototype,"displayContents",2),ss([h({type:Boolean})],s.prototype,"noAutoFill",2),ss([h({type:Boolean})],s.prototype,"forceAutoFill",2),ss([h({type:Object})],s.prototype,"propertyMap",2),ss([h({type:String,attribute:"data-title"})],s.prototype,"title",2),ss([h({reflect:!0})],s.prototype,"dataProvider",2),ss([h()],s.prototype,"bindPublisher",2),ss([h()],s.prototype,"props",1),ss([Ae()],s.prototype,"shouldRenderLazy",2),s};var Ic=Object.defineProperty,Nc=(t,e,s,i)=>{for(var r=void 0,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(e,s,r)||r);return r&&Ic(e,s,r),r};const Br=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const i=this.templates||[...this.querySelectorAll("template")];for(const r of i)r.hasAttribute(this.templateValueAttribute)&&(this.templateParts[r.getAttribute(this.templateValueAttribute)]=r,this.templatePartsList.push(r)),r.hasAttribute("skeleton")&&(this.templateParts.skeleton=r),r.hasAttribute("no-result")&&(this.templateParts["no-result"]=r),r.hasAttribute("no-item")&&(this.templateParts["no-item"]=r);this.templateList=i.filter(r=>!r.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=i),super.connectedCallback()}}return Nc([h({type:Array})],e.prototype,"templates"),e};var Fc=Object.defineProperty,Rc=Object.getOwnPropertyDescriptor,Xe=(t,e,s,i)=>{for(var r=i>1?void 0:i?Rc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Fc(e,s,r),r};const jc="sonic-date";dn(()=>Ue.updateComponentsLanguage());let Ue=class extends kt(Br(J)){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=0,this.computedStartDate=0,this.end_date=0,this.computedEndDate=0,this.hide_hours=!1,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}static updateComponentsLanguage(){Ue.dateCompnents.forEach(t=>t.pageLanguage=ze.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){t||(t="Du %s au %s"),this._wording_billet_periode_validite=t,this.duAu=this.wording_billet_periode_validite?.split("%s").map(e=>e.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=ze.getLanguage(),Ue.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),Ue.dateCompnents.delete(this)}getDatesParts(t,e,s){const i=this.startDateObject;i.setTime(t*1e3);let r=[];if(e>0){const n=this.endDateObject;n.setTime(e*1e3);const o=i.toDateString()==n.toDateString();if((!o||this.hide_hours)&&(delete s.hour,delete s.minute),r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,n),!o){const d=r.find(m=>m.type=="literal"&&m.source=="shared"&&m.value.trim().length>0);d&&(d.value=" "+this.duAu[1]+" ",d.type="to"),this.designMode||r.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i);return this.designMode&&r.forEach(n=>n.value=n.value.replace(/,/g," ")),r[0].value=Mr.ucFirst(r[0].value),r.filter(n=>n.hidden!==!0)}dateStringToSeconds(t){return new Date(t).getTime()/1e3}willUpdate(t){if(this.computedStartDate=0,this.computedEndDate=0,this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.computedStartDate=this.date),this.start_date_string&&(this.computedStartDate=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),this.start_date&&(this.computedStartDate=this.start_date),!(!this.computedStartDate&&!this.now&&!this.end_date)&&(this.computedStartDate||(this.computedStartDate=Date.now()/1e3),this.end_date&&(this.computedEndDate=this.end_date),this.computedEndDate>0&&this.computedEndDate<this.computedStartDate)){const e=this.computedStartDate;this.computedStartDate=this.computedEndDate,this.computedEndDate=e}}render(){if(!this.renderIf||!this.computedStartDate&&!this.now&&!this.computedEndDate)return se;const t={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(t.weekday=this.weekday||"short"),this.hour!=="hidden"&&(t.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(t.minute=this.minute||"2-digit"),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.computedStartDate,this.computedEndDate,t);return He(`${e.map(s=>{const i=this.templateParts[s.type];if(i){const o=document.importNode(i.content,!0).children[0];return o.innerText.trim()==""&&(o.innerText=s.value),o.outerHTML}const r=document.createElement("span");return r.innerText=s.value,r.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};Ue.dateCompnents=new Set,Xe([h()],Ue.prototype,"wording_billet_periode_validite",1),Xe([h({type:Boolean})],Ue.prototype,"designMode",2),Xe([h({type:String})],Ue.prototype,"time_zone",2),Xe([h({type:Number})],Ue.prototype,"date",2),Xe([h({type:String})],Ue.prototype,"date_string",2),Xe([h({type:String})],Ue.prototype,"start_date_string",2),Xe([h({type:String})],Ue.prototype,"end_date_string",2),Xe([h({type:Number})],Ue.prototype,"start_date",2),Xe([h({type:Number})],Ue.prototype,"end_date",2),Xe([h({type:Boolean})],Ue.prototype,"hide_hours",2),Xe([h({type:String})],Ue.prototype,"era",2),Xe([h({type:String})],Ue.prototype,"year",2),Xe([h({type:String})],Ue.prototype,"month",2),Xe([h({type:String})],Ue.prototype,"day",2),Xe([h({type:String})],Ue.prototype,"weekday",2),Xe([h({type:String})],Ue.prototype,"hour",2),Xe([h({type:Boolean})],Ue.prototype,"hour12",2),Xe([h({type:String})],Ue.prototype,"minute",2),Xe([h({type:String})],Ue.prototype,"language",2),Xe([h({type:Boolean})],Ue.prototype,"renderIf",2),Xe([h({type:Boolean})],Ue.prototype,"now",2),Ue=Xe([Q(jc)],Ue);let ht=(st=class{static listen(){if(!st.listening)return;const e=document.location?.href.replace(document.location.origin,"");st.prevURL&&st.prevURL!=e&&(st.prevURL=e,st.listeners.forEach(s=>{s.location=e})),window.requestAnimationFrame(st.listen)}static offChange(e){const s=st.listeners.indexOf(e);s!=-1&&(st.listeners.splice(s,1),st.listeners.length==0&&(st.listening=!1))}static onChange(e){st.listening||(st.listening=!0,st.listen()),st.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const s=e.goBack,i=document.referrer;if(s!=null){const m=document.location.origin,A=(s||m).toString(),f=i.indexOf("http")==0?new URL(i).origin!=m:!1,k=i=="",E=history.length<3,O=k&&E,z=A!=document.location.href;if(f&&z||O){const S=history.state||{};S.concorde=S.concorde||{},S.concorde.hasDoneHistoryBack=!0,history.pushState(S,document.title),history.back(),document.location.replace(A)}else history.back();return}let r=e.getAttribute("to")||"";if(r||(r=e.href?.toString()||""),!r)return;if(r.indexOf("#")==0){document.location.hash=r.substring(1);return}const n=new URL(r,document.location.href),o=n.pathname.split("/"),c=[];let d="";for(const m of o)m!=d&&c.push(m),d=m;r="/"+c.join("/")+n.search+(n.hash?n.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",r):e.hasAttribute("replaceState")?history.replaceState(null,"",r):document.location.href=r}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const s=e.href?.toString()||"";if(e.href&&s.indexOf("http")!=0){const i=new URL(s,document.location.href),r=new URL(e.location||"",document.location.origin);let n=!1;e.autoActive=="strict"?n=i.pathname==r.pathname&&i.hash==r.hash&&i.search==r.search:e.autoActive=="strict-path-only"?n=i.pathname==r.pathname&&i.hash==r.hash:n=r.href.indexOf(i.href)==0,n?e.setAttribute("active","true"):e.removeAttribute("active")}}},st.listeners=[],st.listening=!1,st.prevURL=document.location?.href.replace(document.location.origin,""),st);/**
68
+ <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){Ln.forEach(o=>{document.body.contains(o)&&document.body.removeChild(o)}),Ln=new Set}getApiConfiguration(){return ze.getApiConfiguration(this)}async initWording(){const o=Object.getOwnPropertyNames(this.constructor.prototype);for(const c of o)c.indexOf("wording_")==0&&gr.callApi(this,c.substring(8));gr.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const o=super.createRenderRoot();return _i.observe(o),o}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const o=ve.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let c=this.dataProvider;if(!c&&this._props&&(this.dataProvider=c="__subscriber__"+i.instanceCounter),c){this.bindPublisher&&o.set(c,this.bindPublisher());let d=o.get(c,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=c,this.hasAttribute("subDataProvider")){const g=this.getAttribute("subDataProvider");this.dataProvider=c+"/"+g,d=ht.traverse(d,g.split(".")),o.set(this.dataProvider,d),this.publisher=d}this.publisher=d}this.hasAttribute("lazyRendering")||this.startPublisher()}startPublisher(){this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}},i.instanceCounter=0,i);return rs([h({type:Number})],s.prototype,"collectDependenciesVersion",2),rs([h({type:Boolean})],s.prototype,"displayContents",2),rs([h({type:Boolean})],s.prototype,"noAutoFill",2),rs([h({type:Boolean})],s.prototype,"forceAutoFill",2),rs([h({type:Object})],s.prototype,"propertyMap",2),rs([h({type:String,attribute:"data-title"})],s.prototype,"title",2),rs([h({reflect:!0})],s.prototype,"dataProvider",2),rs([h()],s.prototype,"bindPublisher",2),rs([h()],s.prototype,"props",1),rs([xe()],s.prototype,"shouldRenderLazy",2),s};var jc=Object.defineProperty,zc=(t,e,s,r)=>{for(var i=void 0,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(e,s,i)||i);return i&&jc(e,s,i),i};const Br=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const r=this.templates||[...this.querySelectorAll("template")];for(const i of r)i.hasAttribute(this.templateValueAttribute)&&(this.templateParts[i.getAttribute(this.templateValueAttribute)]=i,this.templatePartsList.push(i)),i.hasAttribute("skeleton")&&(this.templateParts.skeleton=i),i.hasAttribute("no-result")&&(this.templateParts["no-result"]=i),i.hasAttribute("no-item")&&(this.templateParts["no-item"]=i);this.templateList=r.filter(i=>!i.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=r),super.connectedCallback()}}return zc([h({type:Array})],e.prototype,"templates"),e};var Uc=Object.defineProperty,qc=Object.getOwnPropertyDescriptor,Xe=(t,e,s,r)=>{for(var i=r>1?void 0:r?qc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Uc(e,s,i),i};const Hc="sonic-date";gn(()=>Ue.updateComponentsLanguage());let Ue=class extends Ot(Br(Q)){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=0,this.computedStartDate=0,this.end_date=0,this.computedEndDate=0,this.hide_hours=!1,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}static updateComponentsLanguage(){Ue.dateCompnents.forEach(t=>t.pageLanguage=ze.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){t||(t="Du %s au %s"),this._wording_billet_periode_validite=t,this.duAu=this.wording_billet_periode_validite?.split("%s").map(e=>e.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=ze.getLanguage(),Ue.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),Ue.dateCompnents.delete(this)}getDatesParts(t,e,s){const r=this.startDateObject;r.setTime(t*1e3);let i=[];if(e>0){const n=this.endDateObject;n.setTime(e*1e3);const o=r.toDateString()==n.toDateString();if((!o||this.hide_hours)&&(delete s.hour,delete s.minute),i=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(r,n),!o){const d=i.find(g=>g.type=="literal"&&g.source=="shared"&&g.value.trim().length>0);d&&(d.value=" "+this.duAu[1]+" ",d.type="to"),this.designMode||i.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else i=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(r);return this.designMode&&i.forEach(n=>n.value=n.value.replace(/,/g," ")),i[0].value=Ir.ucFirst(i[0].value),i.filter(n=>n.hidden!==!0)}dateStringToSeconds(t){return new Date(t).getTime()/1e3}willUpdate(t){if(this.computedStartDate=0,this.computedEndDate=0,this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.computedStartDate=this.date),this.start_date_string&&(this.computedStartDate=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),this.start_date&&(this.computedStartDate=this.start_date),!(!this.computedStartDate&&!this.now&&!this.end_date)&&(this.computedStartDate||(this.computedStartDate=Date.now()/1e3),this.end_date&&(this.computedEndDate=this.end_date),this.computedEndDate>0&&this.computedEndDate<this.computedStartDate)){const e=this.computedStartDate;this.computedStartDate=this.computedEndDate,this.computedEndDate=e}}render(){if(!this.renderIf||!this.computedStartDate&&!this.now&&!this.computedEndDate)return ee;const t={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(t.weekday=this.weekday||"short"),this.hour!=="hidden"&&(t.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(t.minute=this.minute||"2-digit"),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.computedStartDate,this.computedEndDate,t);return Be(`${e.map(s=>{const r=this.templateParts[s.type];if(r){const o=document.importNode(r.content,!0).children[0];return o.innerText.trim()==""&&(o.innerText=s.value),o.outerHTML}const i=document.createElement("span");return i.innerText=s.value,i.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};Ue.dateCompnents=new Set,Xe([h()],Ue.prototype,"wording_billet_periode_validite",1),Xe([h({type:Boolean})],Ue.prototype,"designMode",2),Xe([h({type:String})],Ue.prototype,"time_zone",2),Xe([h({type:Number})],Ue.prototype,"date",2),Xe([h({type:String})],Ue.prototype,"date_string",2),Xe([h({type:String})],Ue.prototype,"start_date_string",2),Xe([h({type:String})],Ue.prototype,"end_date_string",2),Xe([h({type:Number})],Ue.prototype,"start_date",2),Xe([h({type:Number})],Ue.prototype,"end_date",2),Xe([h({type:Boolean})],Ue.prototype,"hide_hours",2),Xe([h({type:String})],Ue.prototype,"era",2),Xe([h({type:String})],Ue.prototype,"year",2),Xe([h({type:String})],Ue.prototype,"month",2),Xe([h({type:String})],Ue.prototype,"day",2),Xe([h({type:String})],Ue.prototype,"weekday",2),Xe([h({type:String})],Ue.prototype,"hour",2),Xe([h({type:Boolean})],Ue.prototype,"hour12",2),Xe([h({type:String})],Ue.prototype,"minute",2),Xe([h({type:String})],Ue.prototype,"language",2),Xe([h({type:Boolean})],Ue.prototype,"renderIf",2),Xe([h({type:Boolean})],Ue.prototype,"now",2),Ue=Xe([X(Hc)],Ue);let dt=(st=class{static listen(){if(!st.listening)return;const e=document.location?.href.replace(document.location.origin,"");st.prevURL&&st.prevURL!=e&&(st.prevURL=e,st.listeners.forEach(s=>{s.location=e})),window.requestAnimationFrame(st.listen)}static offChange(e){const s=st.listeners.indexOf(e);s!=-1&&(st.listeners.splice(s,1),st.listeners.length==0&&(st.listening=!1))}static onChange(e){st.listening||(st.listening=!0,st.listen()),st.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const s=e.goBack,r=document.referrer;if(s!=null){const g=document.location.origin,A=(s||g).toString(),f=r.indexOf("http")==0?new URL(r).origin!=g:!1,k=r=="",E=history.length<3,O=k&&E,z=A!=document.location.href;if(f&&z||O){const S=history.state||{};S.concorde=S.concorde||{},S.concorde.hasDoneHistoryBack=!0,history.pushState(S,document.title),history.back(),document.location.replace(A)}else history.back();return}let i=e.getAttribute("to")||"";if(i||(i=e.href?.toString()||""),!i)return;if(i.indexOf("#")==0){document.location.hash=i.substring(1);return}const n=new URL(i,document.location.href),o=n.pathname.split("/"),c=[];let d="";for(const g of o)g!=d&&c.push(g),d=g;i="/"+c.join("/")+n.search+(n.hash?n.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",i):e.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const s=e.href?.toString()||"";if(e.href&&s.indexOf("http")!=0){const r=new URL(s,document.location.href),i=new URL(e.location||"",document.location.origin);let n=!1;e.autoActive=="strict"?n=r.pathname==i.pathname&&r.hash==i.hash&&r.search==i.search:e.autoActive=="strict-path-only"?n=r.pathname==i.pathname&&r.hash==i.hash:n=i.href.indexOf(r.href)==0,n?e.setAttribute("active","true"):e.removeAttribute("active")}}},st.listeners=[],st.listening=!1,st.prevURL=document.location?.href.replace(document.location.origin,""),st);/**
69
69
  * @license
70
70
  * Copyright 2018 Google LLC
71
71
  * SPDX-License-Identifier: BSD-3-Clause
72
- */const Xo="important",zc=" !"+Xo,$t=Es(class extends gr{constructor(t){if(super(t),t.type!==Ys.ATTRIBUTE||t.name!=="style"||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const i=t[s];return i==null?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const i of this.ft)e[i]==null&&(this.ft.delete(i),i.includes("-")?s.removeProperty(i):s[i]=null);for(const i in e){const r=e[i];if(r!=null){this.ft.add(i);const n=typeof r=="string"&&r.endsWith(zc);i.includes("-")||n?s.setProperty(i,n?r.slice(0,-11):r,n?Xo:""):s[i]=r}}return Ft}});var Uc=Object.defineProperty,qc=Object.getOwnPropertyDescriptor,Jt=(t,e,s,i)=>{for(var r=i>1?void 0:i?qc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Uc(e,s,r),r};const $i=new Map,br=t=>{class e extends t{constructor(...i){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,this.ariaLabel=null,this.ariaLabelledby=null,this.formDataProvider="",this._name="",this._value="",this.onFormValueAssign=async r=>{this.setFormValueFromPublisher(r)},this.onFormDataInValidate=()=>{const r=this.getFormPublisher();r&&r.isFormValid.get()&&this.validateFormElement()}}hasAncestorAttribute(i){return ze.getAncestorAttributeValue(this,i)!=null}getAncestorAttributeValue(i){return ze.getAncestorAttributeValue(this,i)||""}get name(){return this._name}set name(i){this.hasAttribute("name")&&!this.forceAutoFill&&(i=this.getAttribute("name")),this._name=i,this.requestUpdate()}validateFormElement(){}unsetOnDisconnect(){return this.hasAttribute("unsetOnDisconnect")}updateDataValue(){this.getAttribute("name")&&this.getFormPublisher()&&(this.setFormPublisherValue(this.getValueForFormPublisher()),this.setFormValueFromPublisher(this.getFormPublisherValue()))}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")||""),this.formDataProvider?ve.get(this.formDataProvider):null}setFormPublisherValue(i){const r=this.getFormPublisher();r&&qt(r,this.name).set(i)}getFormPublisherValue(){const i=this.getFormPublisher();return i?qt(i,this.name).get():null}getValueForFormPublisher(){return this.value}setFormValueFromPublisher(i){this.value=i}get value(){return this._value}set value(i){i==null&&(i=""),lt.isObject(i)&&Object.prototype.hasOwnProperty.call(i,"__value")&&i._value==null&&(i=""),this._value!=i&&(this._value=i,this.updateDataValue(),this.requestUpdate())}initFormPublisher(){let i=this.getFormPublisher();const r=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&i&&qt(i,this._name).offAssign(this.onFormValueAssign),this.name||(this._name=this.getAttribute("name")||""),this.value||(this._value=this.getAttribute("value")),i=this.getFormPublisher(),this._name&&i&&(qt(i,this._name).onAssign(this.onFormValueAssign),i.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),r&&(this.value=r)}handleBlur(){this.touched=!0}handleChange(i){this.value=i.target.value;const r=new Event("change");this.dispatchEvent(r)}addKeyboardNavigation(){const i=this.getAncestorAttributeValue("data-keyboard-nav")||"";if(!i)return;const r=i.split(" "),n=r[0];if(!n)return;for(const c of r){$i.has(c)||$i.set(c,[]);const d=$i.get(c);d?.indexOf(this)==-1&&d.push(this)}const o=$i.get(n);this.addEventListener("keydown",c=>{const d=c;if(!["ArrowDown","ArrowUp"].includes(d.key))return;const m="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",A=o?.filter(k=>{const E=k.shadowRoot?.querySelector(m);if(!E)return!1;const O=window.getComputedStyle(E);return O.display!=="none"&&O.display!==""&&O.pointerEvents!="none"&&O.visibility!=="hidden"&&E.getBoundingClientRect().width>0});let g=null;if(d.key=="ArrowDown"&&A){const k=A.indexOf(this);k==A.length-1?g=A[0]:g=A[k+1]}else if(d.key=="ArrowUp"&&A){const k=A.indexOf(this);k==0?g=A[A.length-1]:g=A[k-1]}const f=g?.shadowRoot?.querySelector(m);f&&f.focus&&(f.focus(),c.preventDefault(),c.stopPropagation())})}focus(){this.shadowRoot?.querySelector("[data-form-element], button")?.focus()}connectedCallback(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")||""),super.connectedCallback(),this.initFormPublisher(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback();const i=this.getFormPublisher();this._name&&i&&(qt(i,this._name).offAssign(this.onFormValueAssign),i.offFormInvalidate(this.onFormDataInValidate))}}return Jt([h({type:Boolean,reflect:!0})],e.prototype,"touched",2),Jt([h({type:Boolean})],e.prototype,"error",2),Jt([h({type:Boolean})],e.prototype,"autofocus",2),Jt([h({type:Boolean})],e.prototype,"required",2),Jt([h({type:Boolean})],e.prototype,"forceAutoFill",2),Jt([h({type:Boolean,reflect:!0})],e.prototype,"disabled",2),Jt([h({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),Jt([h({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),Jt([h({type:String})],e.prototype,"formDataProvider",2),Jt([h()],e.prototype,"name",1),Jt([h()],e.prototype,"value",1),e};let Bc=class hr{static areEqual(e,s){return e.length===s.length?e.every((i,r)=>i===s[r]):!1}static from2d(e){return{to1D:()=>{let s=[];return e.forEach(i=>s=s.concat(i)),this.from(s)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(e.length<1)return!0;const i=(e[0]||{})[s];return e.every(r=>(r||{})[s]==i)}})})}),value:()=>({forKey:s=>hr.from(e.map(i=>i[s]))}),copy:()=>({fromKey:s=>({toKey:i=>{e.forEach(r=>{r[i]=Array.isArray(r[s])?[...r[s]]:typeof r[s]=="object"&&r[s]!=null?{...r[s]}:r[s]})}})})}),map:s=>hr.from(e.map(s)),filter:s=>hr.from(e.filter(s)),find:s=>e.find(s),some:s=>e.some(s),every:s=>e.every(s),group:()=>({byKey:s=>{const i=[],r=new Map;for(const n of e){const o=n[s];if(!r.has(o)){const c=i.length;r.set(o,c);const d={items:[]};d[s]=o,i.push(d)}i[r.get(o)].items.push(n)}return hr.from(i)}}),without:()=>({duplicates:()=>({forKey:s=>{const i=[...new Set(e.map(r=>r[s]))];return hr.from(i.map(r=>e.find(n=>n[s]==r)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:i=>{const r=(n,o)=>c=>n[o]!=c[o];return hr.from(e.filter(n=>s.every(r(n,i))))}})})})}}};var ea=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ta(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Hr={exports:{}},Hc=Hr.exports,sa;function Vc(){return sa||(sa=1,(function(t,e){var s=[].slice;(function(i,r){return e!==null?t.exports=r():i.UrlPattern=r()})(Hc,function(){var i,r,n,o,c,d,m,A,g,f,k,E,O,z,B;return g=function(S){return S.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},m=function(S,y){var I,C,D;for(D=[],I=-1,C=S.length;++I<C;)D=D.concat(y(S[I]));return D},z=function(S,y){var I,C,D;for(D="",I=-1,C=S.length;++I<C;)D+=y(S[I]);return D},O=function(S){return new RegExp(S.toString()+"|").exec("").length-1},k=function(S,y){var I,C,D,Y,j;for(Y={},I=-1,D=S.length;++I<D;)C=S[I],j=y[I],j!=null&&(Y[C]!=null?(Array.isArray(Y[C])||(Y[C]=[Y[C]]),Y[C].push(j)):Y[C]=j);return Y},i={},i.Result=function(S,y){this.value=S,this.rest=y},i.Tagged=function(S,y){this.tag=S,this.value=y},i.tag=function(S,y){return function(I){var C,D;if(C=y(I),C!=null)return D=new i.Tagged(S,C.value),new i.Result(D,C.rest)}},i.regex=function(S){return function(y){var I,C;if(I=S.exec(y),I!=null)return C=I[0],new i.Result(C,y.slice(C.length))}},i.sequence=function(){var S;return S=1<=arguments.length?s.call(arguments,0):[],function(y){var I,C,D,Y,j,ne;for(I=-1,C=S.length,ne=[],Y=y;++I<C;){if(D=S[I],j=D(Y),j==null)return;ne.push(j.value),Y=j.rest}return new i.Result(ne,Y)}},i.pick=function(){var S,y;return S=arguments[0],y=2<=arguments.length?s.call(arguments,1):[],function(I){var C,D;if(D=i.sequence.apply(i,y)(I),D!=null)return C=D.value,D.value=C[S],D}},i.string=function(S){var y;return y=S.length,function(I){if(I.slice(0,y)===S)return new i.Result(S,I.slice(y))}},i.lazy=function(S){var y;return y=null,function(I){return y==null&&(y=S()),y(I)}},i.baseMany=function(S,y,I,C,D){var Y,j,ne,re;for(ne=D,re=I?"":[];!(y!=null&&(Y=y(ne),Y!=null)||(j=S(ne),j==null));)I?re+=j.value:re.push(j.value),ne=j.rest;if(!(C&&re.length===0))return new i.Result(re,ne)},i.many1=function(S){return function(y){return i.baseMany(S,null,!1,!0,y)}},i.concatMany1Till=function(S,y){return function(I){return i.baseMany(S,y,!0,!0,I)}},i.firstChoice=function(){var S;return S=1<=arguments.length?s.call(arguments,0):[],function(y){var I,C,D,Y;for(I=-1,C=S.length;++I<C;)if(D=S[I],Y=D(y),Y!=null)return Y}},E=function(S){var y;return y={},y.wildcard=i.tag("wildcard",i.string(S.wildcardChar)),y.optional=i.tag("optional",i.pick(1,i.string(S.optionalSegmentStartChar),i.lazy(function(){return y.pattern}),i.string(S.optionalSegmentEndChar))),y.name=i.regex(new RegExp("^["+S.segmentNameCharset+"]+")),y.named=i.tag("named",i.pick(1,i.string(S.segmentNameStartChar),i.lazy(function(){return y.name}))),y.escapedChar=i.pick(1,i.string(S.escapeChar),i.regex(/^./)),y.static=i.tag("static",i.concatMany1Till(i.firstChoice(i.lazy(function(){return y.escapedChar}),i.regex(/^./)),i.firstChoice(i.string(S.segmentNameStartChar),i.string(S.optionalSegmentStartChar),i.string(S.optionalSegmentEndChar),y.wildcard))),y.token=i.lazy(function(){return i.firstChoice(y.wildcard,y.optional,y.named,y.static)}),y.pattern=i.many1(i.lazy(function(){return y.token})),y},A={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},d=function(S,y){if(Array.isArray(S))return z(S,function(I){return d(I,y)});switch(S.tag){case"wildcard":return"(.*?)";case"named":return"(["+y+"]+)";case"static":return g(S.value);case"optional":return"(?:"+d(S.value,y)+")?"}},c=function(S,y){return y==null&&(y=A.segmentValueCharset),"^"+d(S,y)+"$"},o=function(S){if(Array.isArray(S))return m(S,o);switch(S.tag){case"wildcard":return["_"];case"named":return[S.value];case"static":return[];case"optional":return o(S.value)}},f=function(S,y,I,C){var D,Y,j,ne;if(C==null&&(C=!1),ne=S[y],ne==null){if(C)throw new Error("no values provided for key `"+y+"`");return}if(D=I[y]||0,Y=Array.isArray(ne)?ne.length-1:0,D>Y){if(C)throw new Error("too few values provided for key `"+y+"`");return}return j=Array.isArray(ne)?ne[D]:ne,C&&(I[y]=D+1),j},n=function(S,y,I){var C,D;if(Array.isArray(S)){for(C=-1,D=S.length;++C<D;)if(n(S[C],y,I))return!0;return!1}switch(S.tag){case"wildcard":return f(y,"_",I,!1)!=null;case"named":return f(y,S.value,I,!1)!=null;case"static":return!1;case"optional":return n(S.value,y,I)}},B=function(S,y,I){if(Array.isArray(S))return z(S,function(C){return B(C,y,I)});switch(S.tag){case"wildcard":return f(y,"_",I,!0);case"named":return f(y,S.value,I,!0);case"static":return S.value;case"optional":return n(S.value,y,I)?B(S.value,y,I):""}},r=function(S,y){var I,C,D,Y,j;if(S instanceof r){this.isRegex=S.isRegex,this.regex=S.regex,this.ast=S.ast,this.names=S.names;return}if(this.isRegex=S instanceof RegExp,!(typeof S=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=S,y!=null){if(!Array.isArray(y))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(I=O(this.regex),y.length!==I)throw new Error("regex contains "+I+" groups but array of group names contains "+y.length);this.names=y}return}if(S==="")throw new Error("argument must not be the empty string");if(j=S.replace(/\s+/g,""),j!==S)throw new Error("argument must not contain whitespace");if(C={escapeChar:y?.escapeChar||A.escapeChar,segmentNameStartChar:y?.segmentNameStartChar||A.segmentNameStartChar,segmentNameCharset:y?.segmentNameCharset||A.segmentNameCharset,segmentValueCharset:y?.segmentValueCharset||A.segmentValueCharset,optionalSegmentStartChar:y?.optionalSegmentStartChar||A.optionalSegmentStartChar,optionalSegmentEndChar:y?.optionalSegmentEndChar||A.optionalSegmentEndChar,wildcardChar:y?.wildcardChar||A.wildcardChar},Y=E(C),D=Y.pattern(S),D==null)throw new Error("couldn't parse pattern");if(D.rest!=="")throw new Error("could only partially parse pattern");this.ast=D.value,this.regex=new RegExp(c(this.ast,C.segmentValueCharset)),this.names=o(this.ast)},r.prototype.match=function(S){var y,I;return I=this.regex.exec(S),I==null?null:(y=I.slice(1),this.names?k(this.names,y):y)},r.prototype.stringify=function(S){if(S==null&&(S={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(S!==Object(S))throw new Error("argument must be an object or undefined");return B(this.ast,S,{})},r.escapeForRegex=g,r.concatMap=m,r.stringConcatMap=z,r.regexGroupCount=O,r.keysAndValuesToObject=k,r.P=i,r.newParser=E,r.defaultOptions=A,r.astNodeToRegexString=c,r.astNodeToNames=o,r.getParam=f,r.astNodeContainsSegmentsForProvidedParams=n,r.stringify=B,r})})(Hr,Hr.exports)),Hr.exports}var Wc=Vc();const gs=ta(Wc);class Di{constructor(e){this.path=Di.normalizePath(e)}getDataProviderKey(){return new ks(this.path)}static normalizePath(e){const s=String(e).trim();if(!s)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(s)){let d;try{d=new URL(s)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return d.pathname=d.pathname.replace(/\/+/g,"/"),d.href}const i=s.indexOf("?"),r=s.indexOf("#");let n=s.length;i>=0&&(n=Math.min(n,i)),r>=0&&(n=Math.min(n,r));let o=s.slice(0,n);const c=s.slice(n);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&c)throw new RangeError("Endpoint: path cannot be empty");return o+c}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}const Kc=50,Gc=1e4,Yc=100,En=new Map;function Ei(t){return pi(t)}function Vr(t){return t.split(".")[0]??t}function Oi(t){const e=t.split("."),s=e.shift();let i=ve.get(s);return e.length&&(i=lt.traverse(i,e)),i}function Zc(t){return t==null?!0:Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t.length===0:!1}function Jc(t){return Array.isArray(t)?t.length:0}function Qc(t,e){for(const o of e)if(o===t||t.startsWith(o+".")||o.startsWith(t+"."))throw new Error(`[derive] Cycle détecté : la sortie "${t}" chevauche l'entrée "${o}".`);const s=Vr(t),i=new Map;for(const[o,c]of En)i.set(Vr(o),new Set(c));i.set(s,new Set(e.map(Vr)));const r=new Set,n=o=>{if(r.has(o))return!0;r.add(o);for(const c of i.get(o)??[])if(n(c))return!0;return r.delete(o),!1};if(n(s))throw new Error(`[derive] Cycle détecté (chaîne) : la sortie "${t}" dépend indirectement d'elle-même.`)}function Xc(t,e){En.set(t,new Set(e.map(s=>Vr(s))))}function eh(t){En.delete(t)}function th(t){return`${Vr(Ei(t))}/_state_`}function Ti(t,e){const s=th(t);ve.get(s).set(e)}function sh(t,e,s,i){const r=typeof t.compute=="function"?t:{inputs:t,compute:e,output:s,variables:i},n=r.debounceMs??Kc,o=r.maxInputItems??Gc,c=r.isEmpty??Zc,d=Ei(r.output),m=Object.entries(r.inputs).map(([ie,U])=>({alias:ie,path:Ei(U)})),A=m.map(ie=>ie.path),g=r.variables?Ei(r.variables):null;Qc(d,A),Xc(d,A);const f=Oi(d);let k,E=!1,O=0,z=null,B=!1,S="";const y=ie=>{E=!0,k=ie,f.set(ie),E=!1},I=()=>{E||B||(typeof console<"u"&&console.warn&&console.warn(`[derive] Écriture ignorée sur la sortie readonly "${d}".`),k!==void 0&&(E=!0,f.set(k),E=!1))};f.onAssign(I,!1);const C=()=>{const ie={};for(const{alias:U,path:le}of m){const pe=Oi(le).get(),Be=Jc(pe);Be>o&&typeof console<"u"&&console.warn&&console.warn(`[derive] Entrée "${le}" : ${Be} éléments (> ${o}). Agrégation lourde — envisager un plafond côté fetch.`),ie[U]=pe}return ie},D=()=>g?Oi(g).get()??{}:{},Y=async()=>{if(B)return;const ie=++O;Ti(d,{status:"loading",error:null});const U=C(),le=D(),pe=JSON.stringify({inputs:U,vars:le});if(pe===S&&k!==void 0){Ti(d,{status:c(k)?"empty":"ready",error:null});return}const Be=typeof performance<"u"?performance.now():Date.now();try{const he=await Promise.resolve(r.compute(U,le));if(B||ie!==O)return;const me=(typeof performance<"u"?performance.now():Date.now())-Be;me>Yc&&typeof console<"u"&&console.warn&&console.warn(`[derive] Évaluation longue (${Math.round(me)} ms) → "${d}".`),S=pe,y(he),Ti(d,{status:c(he)?"empty":"ready",error:null})}catch(he){if(B||ie!==O)return;const me=he instanceof Error?he.message:String(he);typeof console<"u"&&console.error&&console.error(`[derive] Erreur sur "${d}" :`,me),Ti(d,{status:"error",error:me})}},j=()=>{B||(z&&clearTimeout(z),z=setTimeout(()=>{z=null,Y()},n))},ne=[],re=ie=>{const U=Oi(ie),le=()=>j();U.onInternalMutation(le),ne.push({pub:U,handler:le})};for(const{path:ie}of m)re(ie);return g&&re(g),j(),{stop(){if(!B){B=!0,z&&clearTimeout(z);for(const{pub:ie,handler:U}of ne)ie.offInternalMutation(U);f.offAssign(I),eh(d)}},recompute(){S="",Y()}}}function Li(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var On={exports:{}},ra;function rh(){return ra||(ra=1,(function(t,e){(function(s){t.exports=s()})(function(){return(function(){function s(i,r,n){function o(m,A){if(!r[m]){if(!i[m]){var g=typeof Li=="function"&&Li;if(!A&&g)return g(m,!0);if(c)return c(m,!0);var f=new Error("Cannot find module '"+m+"'");throw f.code="MODULE_NOT_FOUND",f}var k=r[m]={exports:{}};i[m][0].call(k.exports,function(E){var O=i[m][1][E];return o(O||E)},k,k.exports,s,i,r,n)}return r[m].exports}for(var c=typeof Li=="function"&&Li,d=0;d<n.length;d++)o(n[d]);return o}return s})()({1:[function(s,i,r){const n=s("./utils"),o=(function(){const c=n.stringToArray,d=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],m=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],A=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],g=["Thousand","Million","Billion","Trillion"];function f(T,M){var $=function(q,V,N){var G="";if(q<=19)G=(V?" and ":"")+(N?m[q]:d[q]);else if(q<100){const Ce=Math.floor(q/10),ge=q%10;G=(V?" and ":"")+A[Ce-2],ge>0?G+="-"+$(ge,!1,N):N&&(G=G.substring(0,G.length-1)+"ieth")}else if(q<1e3){const Ce=Math.floor(q/100),ge=q%100;G=(V?", ":"")+d[Ce]+" Hundred",ge>0?G+=$(ge,!0,N):N&&(G+="th")}else{var ae=Math.floor(Math.log10(q)/3);ae>g.length&&(ae=g.length);const Ce=Math.pow(10,ae*3),ge=Math.floor(q/Ce),fe=q-ge*Ce;G=(V?", ":"")+$(ge,!1,!1)+" "+g[ae-1],fe>0?G+=$(fe,!0,N):N&&(G+="th")}return G},F=$(T,!1,M);return F}const k=Object.create(null);d.forEach(function(T,M){k[T.toLowerCase()]=M}),m.forEach(function(T,M){k[T.toLowerCase()]=M}),A.forEach(function(T,M){const $=T.toLowerCase();k[$]=(M+2)*10,k[$.substring(0,T.length-1)+"ieth"]=k[$]}),k.hundredth=100,g.forEach(function(T,M){const $=T.toLowerCase(),F=Math.pow(10,(M+1)*3);k[$]=F,k[$+"th"]=F});function E(T){const $=T.split(/,\s|\sand\s|[\s\\-]/).map(V=>k[V]);let F=[0];return $.forEach(V=>{if(V<100){let N=F.pop();N>=1e3&&(F.push(N),N=0),F.push(N+V)}else F.push(F.pop()*V)}),F.reduce((V,N)=>V+N,0)}const O=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],z={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function B(T){for(var M=0;M<O.length;M++){const $=O[M];if(T>=$[0])return $[1]+B(T-$[0])}return""}function S(T){for(var M=0,$=1,F=T.length-1;F>=0;F--){const q=T[F],V=z[q];V<$?M-=V:($=V,M+=V)}return M}function y(T,M){for(var $=[],F=M.charCodeAt(0);T>0;)$.unshift(String.fromCharCode((T-1)%26+F)),T=Math.floor((T-1)/26);return $.join("")}function I(T,M){for(var $=M.charCodeAt(0),F=0,q=0;q<T.length;q++)F+=(T.charCodeAt(T.length-q-1)-$+1)*Math.pow(26,q);return F}function C(T,M){if(typeof T>"u")return;T=Math.floor(T);const $=re(M);return j(T,$)}const D={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},Y={UPPER:"upper",LOWER:"lower",TITLE:"title"};function j(T,M){let $;const F=T<0;switch(T=Math.abs(T),M.primary){case D.LETTERS:$=y(T,M.case===Y.UPPER?"A":"a");break;case D.ROMAN:$=B(T),M.case===Y.UPPER&&($=$.toUpperCase());break;case D.WORDS:$=f(T,M.ordinal),M.case===Y.UPPER?$=$.toUpperCase():M.case===Y.LOWER&&($=$.toLowerCase());break;case D.DECIMAL:$=""+T;var q=M.mandatoryDigits-$.length;if(q>0){var V=new Array(q+1).join("0");$=V+$}if(M.zeroCode!==48&&($=c($).map(Ce=>String.fromCodePoint(Ce.codePointAt(0)+M.zeroCode-48)).join("")),M.regular){const Ce=Math.floor(($.length-1)/M.groupingSeparators.position);for(let ge=Ce;ge>0;ge--){const fe=$.length-ge*M.groupingSeparators.position;$=$.substr(0,fe)+M.groupingSeparators.character+$.substr(fe)}}else M.groupingSeparators.reverse().forEach(Ce=>{const ge=$.length-Ce.position;$=$.substr(0,ge)+Ce.character+$.substr(ge)});if(M.ordinal){var N={1:"st",2:"nd",3:"rd"},G=$[$.length-1],ae=N[G];(!ae||$.length>1&&$[$.length-2]==="1")&&(ae="th"),$=$+ae}break;case D.SEQUENCE:throw{code:"D3130",value:M.token}}return F&&($="-"+$),$}const ne=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function re(T){const M={type:"integer",primary:D.DECIMAL,case:Y.LOWER,ordinal:!1};let $,F;const q=T.lastIndexOf(";");switch(q===-1?$=T:($=T.substring(0,q),F=T.substring(q+1),F[0]==="o"&&(M.ordinal=!0)),$){case"A":M.case=Y.UPPER;case"a":M.primary=D.LETTERS;break;case"I":M.case=Y.UPPER;case"i":M.primary=D.ROMAN;break;case"W":M.case=Y.UPPER,M.primary=D.WORDS;break;case"Ww":M.case=Y.TITLE,M.primary=D.WORDS;break;case"w":M.primary=D.WORDS;break;default:{let V=null,N=0,G=0,ae=[],Ce=0;if(c($).map(fe=>fe.codePointAt(0)).reverse().forEach(fe=>{let ue=!1;for(let De=0;De<ne.length;De++){const de=ne[De];if(fe>=de&&fe<=de+9){if(ue=!0,N++,Ce++,V===null)V=de;else if(de!==V)throw{code:"D3131"};break}}ue||(fe===35?(Ce++,G++):ae.push({position:Ce,character:String.fromCodePoint(fe)}))}),N>0){M.primary=D.DECIMAL,M.zeroCode=V,M.mandatoryDigits=N,M.optionalDigits=G;const ue=function(De){if(De.length===0)return 0;const de=De[0].character;for(let it=1;it<De.length;it++)if(De[it].character!==de)return 0;const ft=De.map(it=>it.position),Yt=function(it,St){return St===0?it:Yt(St,it%St)},_t=ft.reduce(Yt);for(let it=1;it<=ft.length;it++)if(ft.indexOf(it*_t)===-1)return 0;return _t}(ae);ue>0?(M.regular=!0,M.groupingSeparators={position:ue,character:ae[0].character}):(M.regular=!1,M.groupingSeparators=ae)}else M.primary=D.SEQUENCE,M.token=$}}return M}const ie={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function U(T){var M=[];const $={type:"datetime",parts:M},F=function(ue,De){if(De>ue){let de=T.substring(ue,De);de=de.split("]]").join("]"),M.push({type:"literal",value:de})}};for(var q=0,V=0;V<T.length;){if(T.charAt(V)==="["){if(T.charAt(V+1)==="["){F(q,V),M.push({type:"literal",value:"["}),V+=2,q=V;continue}if(F(q,V),q=V,V=T.indexOf("]",q),V===-1)throw{code:"D3135"};let ue=T.substring(q+1,V);ue=ue.split(/\s+/).join("");var N={type:"marker",component:ue.charAt(0)},G=ue.lastIndexOf(","),ae;if(G!==-1){const De=ue.substring(G+1),de=De.indexOf("-");let ft,Yt;const _t=function(St){if(!(typeof St>"u"||St==="*"))return parseInt(St)};de===-1?ft=De:(ft=De.substring(0,de),Yt=De.substring(de+1));const it={min:_t(ft),max:_t(Yt)};N.width=it,ae=ue.substring(1,G)}else ae=ue.substring(1);if(ae.length===1)N.presentation1=ae;else if(ae.length>1){var Ce=ae.charAt(ae.length-1);"atco".indexOf(Ce)!==-1?(N.presentation2=Ce,Ce==="o"&&(N.ordinal=!0),N.presentation1=ae.substring(0,ae.length-1)):N.presentation1=ae}else N.presentation1=ie[N.component];if(typeof N.presentation1>"u")throw{code:"D3132",value:N.component};if(N.presentation1[0]==="n")N.names=Y.LOWER;else if(N.presentation1[0]==="N")N.presentation1[1]==="n"?N.names=Y.TITLE:N.names=Y.UPPER;else if("YMDdFWwXxHhmsf".indexOf(N.component)!==-1){var ge=N.presentation1;if(N.presentation2&&(ge+=";"+N.presentation2),N.integerFormat=re(ge),N.width&&N.width.min!==void 0&&N.integerFormat.mandatoryDigits<N.width.min&&(N.integerFormat.mandatoryDigits=N.width.min),N.component==="Y")if(N.n=-1,N.width&&N.width.max!==void 0)N.n=N.width.max,N.integerFormat.mandatoryDigits=N.n;else{var fe=N.integerFormat.mandatoryDigits+N.integerFormat.optionalDigits;fe>=2&&(N.n=fe)}const De=M[M.length-1];De&&De.integerFormat&&(De.integerFormat.parseWidth=De.integerFormat.mandatoryDigits)}(N.component==="Z"||N.component==="z")&&(N.integerFormat=re(N.presentation1)),M.push(N),q=V+1}V++}return F(q,V),$}const le=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["January","February","March","April","May","June","July","August","September","October","November","December"],Be=1e3*60*60*24,he=function(T){const M=Date.UTC(T.year,T.month);var $=new Date(M).getUTCDay();return $===0&&($=7),$>4?M+(8-$)*Be:M-($-1)*Be},me=function(T,M){return{year:T,month:M,nextMonth:function(){return M===11?me(T+1,0):me(T,M+1)},previousMonth:function(){return M===0?me(T-1,11):me(T,M-1)},nextYear:function(){return me(T+1,M)},previousYear:function(){return me(T-1,M)}}},$e=function(T,M){return(M-T)/(Be*7)+1},ce=(T,M)=>{let $;switch(M){case"Y":$=T.getUTCFullYear();break;case"M":$=T.getUTCMonth()+1;break;case"D":$=T.getUTCDate();break;case"d":{const F=Date.UTC(T.getUTCFullYear(),T.getUTCMonth(),T.getUTCDate()),q=Date.UTC(T.getUTCFullYear(),0);$=(F-q)/Be+1;break}case"F":$=T.getUTCDay(),$===0&&($=7);break;case"W":{const F=me(T.getUTCFullYear(),0),q=he(F),V=Date.UTC(F.year,T.getUTCMonth(),T.getUTCDate());let N=$e(q,V);if(N>52){const G=he(F.nextYear());V>=G&&(N=1)}else if(N<1){const G=he(F.previousYear());N=$e(G,V)}$=Math.floor(N);break}case"w":{const F=me(T.getUTCFullYear(),T.getUTCMonth()),q=he(F),V=Date.UTC(F.year,F.month,T.getUTCDate());let N=$e(q,V);if(N>4){const G=he(F.nextMonth());V>=G&&(N=1)}else if(N<1){const G=he(F.previousMonth());N=$e(G,V)}$=Math.floor(N);break}case"X":{const F=me(T.getUTCFullYear(),0),q=he(F),V=he(F.nextYear()),N=T.getTime();N<q?$=F.year-1:N>=V?$=F.year+1:$=F.year;break}case"x":{const F=me(T.getUTCFullYear(),T.getUTCMonth()),q=he(F),V=F.nextMonth(),N=he(V),G=T.getTime();G<q?$=F.previousMonth().month+1:G>=N?$=V.month+1:$=F.month+1;break}case"H":$=T.getUTCHours();break;case"h":$=T.getUTCHours(),$=$%12,$===0&&($=12);break;case"P":$=T.getUTCHours()>=12?"pm":"am";break;case"m":$=T.getUTCMinutes();break;case"s":$=T.getUTCSeconds();break;case"f":$=T.getUTCMilliseconds();break;case"Z":case"z":break;case"C":$="ISO";break;case"E":$="ISO";break}return $};let W=null;function xe(T,M,$){var F=0,q=0;if(typeof $<"u"){const ge=parseInt($);F=Math.floor(ge/100),q=ge%100}var V=function(ge,fe){var ue=ce(ge,fe.component);if("YMDdFWwXxHhms".indexOf(fe.component)!==-1)if(fe.component==="Y"&&fe.n!==-1&&(ue=ue%Math.pow(10,fe.n)),fe.names){if(fe.component==="M"||fe.component==="x")ue=pe[ue-1];else if(fe.component==="F")ue=le[ue];else throw{code:"D3133",value:fe.component};fe.names===Y.UPPER?ue=ue.toUpperCase():fe.names===Y.LOWER&&(ue=ue.toLowerCase()),fe.width&&ue.length>fe.width.max&&(ue=ue.substring(0,fe.width.max))}else ue=j(ue,fe.integerFormat);else if(fe.component==="f")ue=j(ue,fe.integerFormat);else if(fe.component==="Z"||fe.component==="z"){const De=F*100+q;if(fe.integerFormat.regular)ue=j(De,fe.integerFormat);else{const de=fe.integerFormat.mandatoryDigits;if(de===1||de===2)ue=j(F,fe.integerFormat),q!==0&&(ue+=":"+C(q,"00"));else if(de===3||de===4)ue=j(De,fe.integerFormat);else throw{code:"D3134",value:de}}De>=0&&(ue="+"+ue),fe.component==="z"&&(ue="GMT"+ue),De===0&&fe.presentation2==="t"&&(ue="Z")}else fe.component==="P"&&fe.names===Y.UPPER&&(ue=ue.toUpperCase());return ue};let N;typeof M>"u"?(W===null&&(W=U("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),N=W):N=U(M);const G=(60*F+q)*60*1e3,ae=new Date(T+G);let Ce="";return N.parts.forEach(function(ge){ge.type==="literal"?Ce+=ge.value:Ce+=V(ae,ge)}),Ce}function b(T){var M=Object.create(null);if(T.type==="datetime")M.type="datetime",M.parts=T.parts.map(function($){var F=Object.create(null);if($.type==="literal")F.regex=$.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if($.component==="Z"||$.component==="z"){let V;Array.isArray($.integerFormat.groupingSeparators)||(V=$.integerFormat.groupingSeparators),F.regex="",$.component==="z"&&(F.regex="GMT"),F.regex+="[-+][0-9]+",V&&(F.regex+=V.character+"[0-9]+"),F.parse=function(N){$.component==="z"&&(N=N.substring(3));let G=0,ae=0;return V?(G=Number.parseInt(N.substring(0,N.indexOf(V.character))),ae=Number.parseInt(N.substring(N.indexOf(V.character)+1))):N.length-1<=2?G=Number.parseInt(N):(G=Number.parseInt(N.substring(0,3)),ae=Number.parseInt(N.substring(3))),G*60+ae}}else if($.component==="f")F.regex="[0-9]+",F.parse=function(V){return parseFloat("0."+V.substring(0,3))*1e3};else if($.integerFormat)F=b($.integerFormat);else{F.regex="[a-zA-Z]+";var q=Object.create(null);if($.component==="M"||$.component==="x")pe.forEach(function(V,N){$.width&&$.width.max?q[V.substring(0,$.width.max)]=N+1:q[V]=N+1});else if($.component==="F")le.forEach(function(V,N){N>0&&($.width&&$.width.max?q[V.substring(0,$.width.max)]=N:q[V]=N)});else if($.component==="P")q={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:$.component};F.parse=function(V){return q[V]}}return F.component=$.component,F});else{M.type="integer";const $=T.case===Y.UPPER;switch(T.primary){case D.LETTERS:M.regex=$?"[A-Z]+":"[a-z]+",M.parse=function(F){return I(F,$?"A":"a")};break;case D.ROMAN:M.regex=$?"[MDCLXVI]+":"[mdclxvi]+",M.parse=function(F){return S($?F:F.toUpperCase())};break;case D.WORDS:M.regex="(?:"+n.keys(k).concat("and","[\\-, ]").join("|")+")+",M.parse=function(F){return E(F.toLowerCase())};break;case D.DECIMAL:M.regex="[0-9]",T.parseWidth?M.regex+=`{${T.parseWidth}}`:M.regex+="+",T.ordinal&&(M.regex+="(?:th|st|nd|rd)"),M.parse=function(F){let q=F;return T.ordinal&&(q=F.substring(0,F.length-2)),T.regular?q=q.split(",").join(""):T.groupingSeparators.forEach(V=>{q=q.split(V.character).join("")}),T.zeroCode!==48&&(q=q.split("").map(V=>String.fromCodePoint(V.codePointAt(0)-T.zeroCode+48)).join("")),parseInt(q)};break;case D.SEQUENCE:throw{code:"D3130",value:T.token}}}return M}function _(T,M){if(typeof T>"u")return;const $=re(M);return b($).parse(T)}function ee(T,M){const $=U(M),F=b($),q="^"+F.parts.map(ae=>"("+ae.regex+")").join("")+"$";var N=new RegExp(q,"i").exec(T);if(N!==null){const de=Object.create(null);for(let u=1;u<N.length;u++){const v=F.parts[u-1];v.parse&&(de[v.component]=v.parse(N[u]))}if(Object.getOwnPropertyNames(de).length===0)return;let ft=0;const Yt=u=>{ft<<=1,ft+=u?1:0},_t=u=>!(~u&ft)&&!!(u&ft);"YXMxWwdD".split("").forEach(u=>Yt(de[u]));const St=!_t(161)&&_t(130),xs=_t(84),Er=!xs&&_t(72);ft=0,"PHhmsf".split("").forEach(u=>Yt(de[u]));const Z=!_t(23)&&_t(47),es=(St?"YD":xs?"XxwF":Er?"XWF":"YMD")+(Z?"Phmsf":"Hmsf"),ci=this.environment.timestamp;let ds=!1,lr=!1;if(es.split("").forEach(u=>{if(typeof de[u]>"u")ds?(de[u]="MDd".indexOf(u)!==-1?1:0,lr=!0):de[u]=ce(ci,u);else if(ds=!0,lr)throw{code:"D3136"}}),de.M>0?de.M-=1:de.M=0,St){const u=Date.UTC(de.Y,0),v=(de.d-1)*1e3*60*60*24,w=new Date(u+v);de.M=w.getUTCMonth(),de.D=w.getUTCDate()}if(xs)throw{code:"D3136"};if(Er)throw{code:"D3136"};Z&&(de.H=de.h===12?0:de.h,de.P===1&&(de.H+=12));var G=Date.UTC(de.Y,de.M,de.D,de.H,de.m,de.s,de.f);return(de.Z||de.z)&&(G-=(de.Z||de.z)*60*1e3),G}}var we=new RegExp("^\\d{4}(-[01]\\d)?(-[0-3]\\d)?(T[0-2]\\d:[0-5]\\d:[0-5]\\d)?(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function Pe(T,M){if(!(typeof T>"u"))if(typeof M>"u"){if(!we.test(T))throw{stack:new Error().stack,code:"D3110",value:T};return Date.parse(T)}else return ee.call(this,T,M)}function Ee(T,M,$){if(!(typeof T>"u"))return xe.call(this,T,M,$)}return{formatInteger:C,parseInteger:_,fromMillis:Ee,toMillis:Pe}})();i.exports=o},{"./utils":6}],2:[function(s,i,r){(function(n){(function(){var o=s("./utils");const c=(()=>{var d=o.isNumeric,m=o.isArrayOfStrings,A=o.isArrayOfNumbers,g=o.isSequence,f=o.isFunction,k=o.isLambda,E=o.isPromise,O=o.getFunctionArity,z=o.isDeepEqual,B=o.stringToArray;function S(a){if(!(typeof a>"u")){var l=0;return a.forEach(function(p){l+=p}),l}}function y(a){return typeof a>"u"?0:a.length}function I(a){if(!(typeof a>"u"||a.length===0))return Math.max.apply(Math,a)}function C(a){if(!(typeof a>"u"||a.length===0))return Math.min.apply(Math,a)}function D(a){if(!(typeof a>"u"||a.length===0)){var l=0;return a.forEach(function(p){l+=p}),l/a.length}}function Y(a,l=!1){if(!(typeof a>"u")){var p;if(typeof a=="string")p=a;else if(f(a))p="";else{if(typeof a=="number"&&!isFinite(a))throw{code:"D3001",value:a,stack:new Error().stack};var x=l?2:0;Array.isArray(a)&&a.outerWrapper&&(a=a[0]),p=JSON.stringify(a,function(P,L){return typeof L<"u"&&L!==null&&d(L)?L.toPrecision&&!Number.isInteger(L)?Number(L.toPrecision(15)):L:L&&f(L)?"":L},x)}return p}}function j(a,l,p){if(!(typeof a>"u")){var x=B(a),P=x.length;if(P+l<0&&(l=0),typeof p<"u"){if(p<=0)return"";var L=l>=0?l+p:P+l+p;return x.slice(l,L).join("")}return x.slice(l).join("")}}function ne(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(0,p):a}}function re(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(p+l.length):a}}function ie(a){if(!(typeof a>"u"))return a.toLowerCase()}function U(a){if(!(typeof a>"u"))return a.toUpperCase()}function le(a){if(!(typeof a>"u"))return B(a).length}function pe(a){if(!(typeof a>"u")){var l=a.replace(/[ \t\n\r]+/gm," ");return l.charAt(0)===" "&&(l=l.substring(1)),l.charAt(l.length-1)===" "&&(l=l.substring(0,l.length-1)),l}}function Be(a,l,p){if(!(typeof a>"u")){(typeof p>"u"||p.length===0)&&(p=" ");var x;l=Math.trunc(l);var P=Math.abs(l)-le(a);if(P>0){var L=new Array(P+1).join(p);p.length>1&&(L=j(L,0,P)),l>0?x=a+L:x=L+a}else x=a;return x}}async function he(a,l){var p=a.apply(this,[l]);if(E(p)&&(p=await p),p&&!(typeof p.start=="number"||p.end==="number"||Array.isArray(p.groups)||f(p.next)))throw{code:"T1010",stack:new Error().stack};return p}async function me(a,l){if(!(typeof a>"u"||typeof l>"u")){var p;if(typeof l=="string")p=a.indexOf(l)!==-1;else{var x=await he(l,a);p=typeof x<"u"}return p}}async function $e(a,l,p){if(!(typeof a>"u")){if(p<0)throw{stack:new Error().stack,value:p,code:"D3040",index:3};var x=this.createSequence();if(typeof p>"u"||p>0){var P=0,L=await he(l,a);if(typeof L<"u")for(;typeof L<"u"&&(typeof p>"u"||P<p);)x.push({match:L.match,index:L.start,groups:L.groups}),L=await he(L.next),P++}return x}}async function ce(a,l,p,x){if(!(typeof a>"u")){var P=this;if(l==="")throw{code:"D3010",stack:new Error().stack,value:l,index:2};if(x<0)throw{code:"D3011",stack:new Error().stack,value:x,index:4};var L;typeof p=="string"?L=function(Ge){for(var nt="",Ie=0,Qe=p.indexOf("$",Ie);Qe!==-1&&Ie<p.length;){nt+=p.substring(Ie,Qe),Ie=Qe+1;var Zt=p.charAt(Ie);if(Zt==="$")nt+="$",Ie++;else if(Zt==="0")nt+=Ge.match,Ie++;else{var Pt;if(Ge.groups.length===0?Pt=1:Pt=Math.floor(Math.log(Ge.groups.length)*Math.LOG10E)+1,Qe=parseInt(p.substring(Ie,Ie+Pt),10),Pt>1&&Qe>Ge.groups.length&&(Qe=parseInt(p.substring(Ie,Ie+Pt-1),10)),isNaN(Qe))nt+="$";else{if(Ge.groups.length>0){var ps=Ge.groups[Qe-1];typeof ps<"u"&&(nt+=ps)}Ie+=Qe.toString().length}}Qe=p.indexOf("$",Ie)}return nt+=p.substring(Ie),nt}:L=p;var H="",K=0;if(typeof x>"u"||x>0){var _e=0;if(typeof l=="string"){for(var oe=a.indexOf(l,K);oe!==-1&&(typeof x>"u"||_e<x);)H+=a.substring(K,oe),H+=p,K=oe+l.length,_e++,oe=a.indexOf(l,K);H+=a.substring(K)}else{var je=await he(l,a);if(typeof je<"u"){for(;typeof je<"u"&&(typeof x>"u"||_e<x);){H+=a.substring(K,je.start);var Ke=L.apply(P,[je]);if(E(Ke)&&(Ke=await Ke),typeof Ke=="string")H+=Ke;else throw{code:"D3012",stack:new Error().stack,value:Ke};K=je.start+je.match.length,_e++,je=await he(je.next)}H+=a.substring(K)}else H=a}}else H=a;return H}}function W(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.btoa:function(p){return new n.Buffer.from(p,"binary").toString("base64")};return l(a)}}function xe(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.atob:function(p){return new n.Buffer.from(p,"base64").toString("binary")};return l(a)}}function b(a){if(!(typeof a>"u")){var l;try{l=encodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrlComponent"}}return l}}function _(a){if(!(typeof a>"u")){var l;try{l=encodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrl"}}return l}}function ee(a){if(!(typeof a>"u")){var l;try{l=decodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrlComponent"}}return l}}function we(a){if(!(typeof a>"u")){var l;try{l=decodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrl"}}return l}}async function Pe(a,l,p){if(!(typeof a>"u")){if(p<0)throw{code:"D3020",stack:new Error().stack,value:p,index:3};var x=[];if(typeof p>"u"||p>0)if(typeof l=="string")x=a.split(l,p);else{var P=0,L=await he(l,a);if(typeof L<"u"){for(var H=0;typeof L<"u"&&(typeof p>"u"||P<p);)x.push(a.substring(H,L.start)),H=L.end,L=await he(L.next),P++;(typeof p>"u"||P<p)&&x.push(a.substring(H))}else x.push(a)}return x}}function Ee(a,l){if(!(typeof a>"u"))return typeof l>"u"&&(l=""),a.join(l)}function T(a,l,p){if(!(typeof a>"u")){var x={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},P=x;typeof p<"u"&&o.keys(p).forEach(function(be){P[be]=p[be]});for(var L=[],H=P["zero-digit"].charCodeAt(0),K=H;K<H+10;K++)L.push(String.fromCharCode(K));var _e=L.concat([P["decimal-separator"],P["exponent-separator"],P["grouping-separator"],P.digit,P["pattern-separator"]]),oe=l.split(P["pattern-separator"]);if(oe.length>2)throw{code:"D3080",stack:new Error().stack};var je=function(be){var Ze=(function(){for(var ct,Ut=0;Ut<be.length;Ut++)if(ct=be.charAt(Ut),_e.indexOf(ct)!==-1&&ct!==P["exponent-separator"])return be.substring(0,Ut);return""})(),At=(function(){for(var ct,Ut=be.length-1;Ut>=0;Ut--)if(ct=be.charAt(Ut),_e.indexOf(ct)!==-1&&ct!==P["exponent-separator"])return be.substring(Ut+1);return""})(),Ye=be.substring(Ze.length,be.length-At.length),It,Hs,Nt,cr,zt=be.indexOf(P["exponent-separator"],Ze.length);zt===-1||zt>be.length-At.length?(It=Ye,Hs=void 0):(It=Ye.substring(0,zt),Hs=Ye.substring(zt+1));var ts=It.indexOf(P["decimal-separator"]);return ts===-1?(Nt=It,cr=At):(Nt=It.substring(0,ts),cr=It.substring(ts+1)),{prefix:Ze,suffix:At,activePart:Ye,mantissaPart:It,exponentPart:Hs,integerPart:Nt,fractionalPart:cr,subpicture:be}},Ke=function(be){var Ze,At,Ye=be.subpicture,It=Ye.indexOf(P["decimal-separator"]);It!==Ye.lastIndexOf(P["decimal-separator"])&&(Ze="D3081"),Ye.indexOf(P.percent)!==Ye.lastIndexOf(P.percent)&&(Ze="D3082"),Ye.indexOf(P["per-mille"])!==Ye.lastIndexOf(P["per-mille"])&&(Ze="D3083"),Ye.indexOf(P.percent)!==-1&&Ye.indexOf(P["per-mille"])!==-1&&(Ze="D3084");var Hs=!1;for(At=0;At<be.mantissaPart.length;At++){var Nt=be.mantissaPart.charAt(At);if(L.indexOf(Nt)!==-1||Nt===P.digit){Hs=!0;break}}Hs||(Ze="D3085");var cr=be.activePart.split("").map(function(ct){return _e.indexOf(ct)===-1?"p":"a"}).join("");cr.indexOf("p")!==-1&&(Ze="D3086"),It!==-1?(Ye.charAt(It-1)===P["grouping-separator"]||Ye.charAt(It+1)===P["grouping-separator"])&&(Ze="D3087"):be.integerPart.charAt(be.integerPart.length-1)===P["grouping-separator"]&&(Ze="D3088"),Ye.indexOf(P["grouping-separator"]+P["grouping-separator"])!==-1&&(Ze="D3089");var zt=be.integerPart.indexOf(P.digit);zt!==-1&&be.integerPart.substring(0,zt).split("").filter(function(ct){return L.indexOf(ct)>-1}).length>0&&(Ze="D3090"),zt=be.fractionalPart.lastIndexOf(P.digit),zt!==-1&&be.fractionalPart.substring(zt).split("").filter(function(ct){return L.indexOf(ct)>-1}).length>0&&(Ze="D3091");var ts=typeof be.exponentPart=="string";if(ts&&be.exponentPart.length>0&&(Ye.indexOf(P.percent)!==-1||Ye.indexOf(P["per-mille"])!==-1)&&(Ze="D3092"),ts&&(be.exponentPart.length===0||be.exponentPart.split("").filter(function(ct){return L.indexOf(ct)===-1}).length>0)&&(Ze="D3093"),Ze)throw{code:Ze,stack:new Error().stack}},Ge=function(be){var Ze=function(gt,hn){for(var di=[],As=gt.indexOf(P["grouping-separator"]);As!==-1;){var un=(hn?gt.substring(0,As):gt.substring(As)).split("").filter(function(Lr){return L.indexOf(Lr)!==-1||Lr===P.digit}).length;di.push(un),As=be.integerPart.indexOf(P["grouping-separator"],As+1)}return di},At=Ze(be.integerPart),Ye=function(gt){if(gt.length===0)return 0;for(var hn=function(un,Lr){return Lr===0?un:hn(Lr,un%Lr)},di=gt.reduce(hn),As=1;As<=gt.length;As++)if(gt.indexOf(As*di)===-1)return 0;return di},It=Ye(At),Hs=Ze(be.fractionalPart,!0),Nt=be.integerPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length,cr=Nt,zt=be.fractionalPart.split(""),ts=zt.filter(function(gt){return L.indexOf(gt)!==-1}).length,ct=zt.filter(function(gt){return L.indexOf(gt)!==-1||gt===P.digit}).length,Ut=typeof be.exponentPart=="string";Nt===0&&ct===0&&(Ut?(ts=1,ct=1):Nt=1),Ut&&Nt===0&&be.integerPart.indexOf(P.digit)!==-1&&(Nt=1),Nt===0&&ts===0&&(ts=1);var jl=0;return Ut&&(jl=be.exponentPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length),{integerPartGroupingPositions:At,regularGrouping:It,minimumIntegerPartSize:Nt,scalingFactor:cr,prefix:be.prefix,fractionalPartGroupingPositions:Hs,minimumFactionalPartSize:ts,maximumFactionalPartSize:ct,minimumExponentSize:jl,suffix:be.suffix,picture:be.subpicture}},nt=oe.map(je);nt.forEach(Ke);var Ie=nt.map(Ge),Qe=P["minus-sign"],Zt=P["zero-digit"],Pt=P["decimal-separator"],ps=P["grouping-separator"];Ie.length===1&&(Ie.push(JSON.parse(JSON.stringify(Ie[0]))),Ie[1].prefix=Qe+Ie[1].prefix);var ot;a>=0?ot=Ie[0]:ot=Ie[1];var hi;ot.picture.indexOf(P.percent)!==-1?hi=a*100:ot.picture.indexOf(P["per-mille"])!==-1?hi=a*1e3:hi=a;var Bs,Tr;if(ot.minimumExponentSize===0)Bs=hi;else{var Wg=Math.pow(10,ot.scalingFactor),Kg=Math.pow(10,ot.scalingFactor-1);if(Bs=hi,Tr=0,Bs!==0){for(;Math.abs(Bs)<Kg;)Bs*=10,Tr-=1;for(;Math.abs(Bs)>Wg;)Bs/=10,Tr+=1}}var Gg=N(Bs,ot.maximumFactionalPartSize),Fl=function(be,Ze){var At=Math.abs(be).toFixed(Ze);return Zt!=="0"&&(At=At.split("").map(function(Ye){return Ye>="0"&&Ye<="9"?L[Ye.charCodeAt(0)-48]:Ye}).join("")),At},ke=Fl(Gg,ot.maximumFactionalPartSize),xt=ke.indexOf(".");for(xt===-1?ke=ke+Pt:ke=ke.replace(".",Pt);ke.charAt(0)===Zt;)ke=ke.substring(1);for(;ke.charAt(ke.length-1)===Zt;)ke=ke.substring(0,ke.length-1);xt=ke.indexOf(Pt);var ui=ot.minimumIntegerPartSize-xt,Rl=ot.minimumFactionalPartSize-(ke.length-xt-1);if(ke=(ui>0?new Array(ui+1).join(Zt):"")+ke,ke=ke+(Rl>0?new Array(Rl+1).join(Zt):""),xt=ke.indexOf(Pt),ot.regularGrouping>0)for(var Yg=Math.floor((xt-1)/ot.regularGrouping),ln=1;ln<=Yg;ln++)ke=[ke.slice(0,xt-ln*ot.regularGrouping),ps,ke.slice(xt-ln*ot.regularGrouping)].join("");else ot.integerPartGroupingPositions.forEach(function(be){ke=[ke.slice(0,xt-be),ps,ke.slice(xt-be)].join(""),xt++});if(xt=ke.indexOf(Pt),ot.fractionalPartGroupingPositions.forEach(function(be){ke=[ke.slice(0,be+xt+1),ps,ke.slice(be+xt+1)].join("")}),xt=ke.indexOf(Pt),(ot.picture.indexOf(Pt)===-1||xt===ke.length-1)&&(ke=ke.substring(0,ke.length-1)),typeof Tr<"u"){var cn=Fl(Tr,0);ui=ot.minimumExponentSize-cn.length,ui>0&&(cn=new Array(ui+1).join(Zt)+cn),ke=ke+P["exponent-separator"]+(Tr<0?Qe:"")+cn}return ke=ot.prefix+ke+ot.suffix,ke}}function M(a,l){if(!(typeof a>"u")){if(a=N(a),typeof l>"u"?l=10:l=N(l),l<2||l>36)throw{code:"D3100",stack:new Error().stack,value:l};var p=a.toString(l);return p}}function $(a){var l;if(!(typeof a>"u")){if(typeof a=="number")l=a;else if(typeof a=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(a)&&!isNaN(parseFloat(a))&&isFinite(a))l=parseFloat(a);else if(typeof a=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(a))l=Number(a);else if(a===!0)l=1;else if(a===!1)l=0;else throw{code:"D3030",value:a,stack:new Error().stack,index:1};return l}}function F(a){var l;if(!(typeof a>"u"))return l=Math.abs(a),l}function q(a){var l;if(!(typeof a>"u"))return l=Math.floor(a),l}function V(a){var l;if(!(typeof a>"u"))return l=Math.ceil(a),l}function N(a,l){var p;if(!(typeof a>"u")){if(l){var x=a.toString().split("e");a=+(x[0]+"e"+(x[1]?+x[1]+l:l))}p=Math.round(a);var P=p-a;return Math.abs(P)===.5&&Math.abs(p%2)===1&&(p=p-1),l&&(x=p.toString().split("e"),p=+(x[0]+"e"+(x[1]?+x[1]-l:-l))),Object.is(p,-0)&&(p=0),p}}function G(a){var l;if(!(typeof a>"u")){if(a<0)throw{stack:new Error().stack,code:"D3060",index:1,value:a};return l=Math.sqrt(a),l}}function ae(a,l){var p;if(!(typeof a>"u")){if(p=Math.pow(a,l),!isFinite(p))throw{stack:new Error().stack,code:"D3061",index:1,value:a,exp:l};return p}}function Ce(){return Math.random()}function ge(a){if(!(typeof a>"u")){var l=!1;if(Array.isArray(a)){if(a.length===1)l=ge(a[0]);else if(a.length>1){var p=a.filter(function(x){return ge(x)});l=p.length>0}}else typeof a=="string"?a.length>0&&(l=!0):d(a)?a!==0&&(l=!0):a!==null&&typeof a=="object"&&!f(a)?o.keys(a).length>0&&(l=!0):typeof a=="boolean"&&a===!0&&(l=!0);return l}}function fe(a){if(!(typeof a>"u"))return!ge(a)}function ue(a,l,p,x){var P=[l],L=O(a);return L>=2&&P.push(p),L>=3&&P.push(x),P}async function De(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),x=0;x<a.length;x++){var P=ue(l,a[x],x,a),L=await l.apply(this,P);typeof L<"u"&&p.push(L)}return p}}async function de(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),x=0;x<a.length;x++){var P=a[x],L=ue(l,P,x,a),H=await l.apply(this,L);ge(H)&&p.push(P)}return p}}async function ft(a,l){if(!(typeof a>"u")){for(var p=!1,x,P=0;P<a.length;P++){var L=a[P],H=!0;if(typeof l<"u"){var K=ue(l,L,P,a),_e=await l.apply(this,K);H=ge(_e)}if(H)if(!p)x=L,p=!0;else throw{stack:new Error().stack,code:"D3138",index:P}}if(!p)throw{stack:new Error().stack,code:"D3139"};return x}}function Yt(){for(var a=[],l=Array.prototype.slice.call(arguments),p=Math.min.apply(Math,l.map(function(L){return Array.isArray(L)?L.length:0})),x=0;x<p;x++){var P=l.map(L=>L[x]);a.push(P)}return a}async function _t(a,l,p){if(!(typeof a>"u")){var x,P=O(l);if(P<2)throw{stack:new Error().stack,code:"D3050",index:1};var L;for(typeof p>"u"&&a.length>0?(x=a[0],L=1):(x=p,L=0);L<a.length;){var H=[x,a[L]];P>=3&&H.push(L),P>=4&&H.push(a),x=await l.apply(this,H),L++}return x}}function it(a){var l=this.createSequence();if(Array.isArray(a)){for(var p=Object.create(null),x=0;x<a.length;x++){var P=it.call(this,a[x]);P.forEach(function(L){p[L]=!0})}l=it.call(this,p)}else a!==null&&typeof a=="object"&&!f(a)&&o.keys(a).forEach(L=>l.push(L));return l}function St(a,l){var p;if(Array.isArray(a)){p=this.createSequence();for(var x=0;x<a.length;x++){var P=St.call(this,a[x],l);typeof P<"u"&&(Array.isArray(P)?P.forEach(L=>p.push(L)):p.push(P))}}else a!==null&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,l)&&!f(a)&&(p=a[l]);return p}function xs(a,l){if(typeof a>"u")return l;if(typeof l>"u")return a;Array.isArray(a)||(a=this.createSequence(a)),Array.isArray(l)||(l=[l]);const p=a.length+l.length;if(this.options&&p>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:p};return a.concat(l)}function Er(a){return!(typeof a>"u")}function Or(a){var l=this.createSequence();if(Array.isArray(a))for(var p=0;p<a.length;p++)l=xs.call(this,l,Or.call(this,a[p]));else if(a!==null&&typeof a=="object"&&!k(a))for(const P of o.keys(a)){var x=Object.create(null);x[P]=a[P],l.push(x)}else l=a;return l}function Z(a){if(!(typeof a>"u")){var l=Object.create(null);return a.forEach(function(p){for(const x of o.keys(p))l[x]=p[x]}),l}}function on(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=a.length,p=new Array(l),x=0;x<l;x++)p[l-x-1]=a[x];return p}}async function an(a,l){var p=this.createSequence();for(const L of o.keys(a)){var x=ue(l,a[L],L,a),P=await l.apply(this,x);typeof P<"u"&&p.push(P)}return p}function es(a){throw{code:"D3137",stack:new Error().stack,message:a||"$error() function evaluated"}}function ci(a,l){if(!a)throw{code:"D3141",stack:new Error().stack,message:l||"$assert() statement failed"}}function ds(a){if(a!==void 0)return a===null?"null":d(a)?"number":typeof a=="string"?"string":typeof a=="boolean"?"boolean":Array.isArray(a)?"array":f(a)?"function":"object"}async function lr(a,l){if(!(typeof a>"u")){if(a.length<=1)return a;var p;if(typeof l>"u"){if(!A(a)&&!m(a))throw{stack:new Error().stack,code:"D3070",index:1};p=async function(H,K){return H>K}}else p=l;var x=async function(H,K){var _e=async function(je,Ke,Ge){Ke.length===0?Array.prototype.push.apply(je,Ge):Ge.length===0?Array.prototype.push.apply(je,Ke):await p(Ke[0],Ge[0])?(je.push(Ge[0]),await _e(je,Ke,Ge.slice(1))):(je.push(Ke[0]),await _e(je,Ke.slice(1),Ge))},oe=[];return await _e(oe,H,K),oe},P=async function(H){if(!Array.isArray(H)||H.length<=1)return H;var K=Math.floor(H.length/2),_e=H.slice(0,K),oe=H.slice(K);return _e=await P(_e),oe=await P(oe),await x(_e,oe)},L=await P(a);return L}}function u(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=new Array(a.length),p=0;p<a.length;p++){var x=Math.floor(Math.random()*(p+1));p!==x&&(l[p]=l[x]),l[x]=a[p]}return l}}function v(a){if(!(typeof a>"u")){if(!Array.isArray(a)||a.length<=1)return a;for(var l=g(a)?this.createSequence():[],p=0;p<a.length;p++){for(var x=a[p],P=!1,L=0;L<l.length;L++)if(z(x,l[L])){P=!0;break}P||l.push(x)}return l}}async function w(a,l){var p=Object.create(null);for(const H of o.keys(a)){var x=a[H],P=ue(l,x,H,a),L=await l.apply(this,P);ge(L)&&(p[H]=x)}return o.keys(p).length===0&&(p=void 0),p}return{sum:S,count:y,max:I,min:C,average:D,string:Y,substring:j,substringBefore:ne,substringAfter:re,lowercase:ie,uppercase:U,length:le,trim:pe,pad:Be,match:$e,contains:me,replace:ce,split:Pe,join:Ee,formatNumber:T,formatBase:M,number:$,floor:q,ceil:V,round:N,abs:F,sqrt:G,power:ae,random:Ce,boolean:ge,not:fe,map:De,zip:Yt,filter:de,single:ft,foldLeft:_t,sift:w,keys:it,lookup:St,append:xs,exists:Er,spread:Or,merge:Z,reverse:on,each:an,error:es,assert:ci,type:ds,sort:lr,shuffle:u,distinct:v,base64encode:W,base64decode:xe,encodeUrlComponent:b,encodeUrl:_,decodeUrlComponent:ee,decodeUrl:we}})();i.exports=c}).call(this)}).call(this,typeof ea<"u"?ea:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(s,i,r){var n=s("./datetime"),o=s("./functions"),c=s("./utils"),d=s("./parser"),m=s("./signature"),A=(function(){var g=c.isNumeric,f=c.isArrayOfStrings,k=c.isArrayOfNumbers,E=c.isSequence,O=c.isFunction,z=c.isLambda,B=c.isIterable,S=c.isPromise,y=c.getFunctionArity,I=c.isDeepEqual,C=es(null);async function D(u,v,w){var a;w.base.depth++,w.base.guardrails();var l=w.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(l&&await l(u,v,w),u.type){case"path":a=await Y(u,v,w);break;case"binary":a=await le(u,v,w);break;case"unary":a=await pe(u,v,w);break;case"name":a=Be(u,v,w);break;case"string":case"number":case"value":a=he(u);break;case"wildcard":a=me(u,v,w);break;case"descendant":a=ce(u,v,w);break;case"parent":a=w.lookup(u.slot.label);break;case"condition":a=await q(u,v,w);break;case"block":a=await V(u,v,w);break;case"bind":a=await F(u,v,w);break;case"regex":a=N(u,v,w);break;case"function":a=await ue(u,v,w);break;case"variable":a=G(u,v,w);break;case"lambda":a=ft(u,v,w);break;case"partial":a=await Yt(u,v,w);break;case"apply":a=await fe(u,v,w);break;case"transform":a=Ce(u,v,w);break}if(Object.prototype.hasOwnProperty.call(u,"predicate"))for(var p=0;p<u.predicate.length;p++)a=await U(u.predicate[p].expr,a,w);u.type!=="path"&&Object.prototype.hasOwnProperty.call(u,"group")&&(a=await T(u.group,a,w));var x=w.lookup(Symbol.for("jsonata.__evaluate_exit"));return x&&await x(u,v,w,a),a&&E(a)&&!a.tupleStream&&(u.keepArray&&(a.keepSingleton=!0),a.length===0?a=void 0:a.length===1&&(a=a.keepSingleton?a:a[0])),w.base.depth--,a}async function Y(u,v,w){var a;Array.isArray(v)&&u.steps[0].type!=="variable"?a=v:a=w.base.createSequence(v);for(var l,p=!1,x=void 0,P=0;P<u.steps.length;P++){var L=u.steps[P];if(L.tuple&&(p=!0),P===0&&L.consarray?l=await D(L,a,w):p?x=await ie(L,a,x,w):l=await ne(L,a,w,P===u.steps.length-1),!p&&(typeof l>"u"||l.length===0))break;typeof L.focus>"u"&&(a=l)}if(p)if(u.tuple)l=x;else for(l=w.base.createSequence(),P=0;P<x.length;P++)l.push(x[P]["@"]);return u.keepSingletonArray&&(Array.isArray(l)&&l.cons&&!l.sequence&&(l=w.base.createSequence(l)),l.keepSingleton=!0),Object.prototype.hasOwnProperty.call(u,"group")&&(l=await T(u.group,p?x:l,w)),l}function j(u,v){var w=es(u);for(const a of c.keys(v))w.bind(a,v[a]);return w}async function ne(u,v,w,a){var l;if(u.type==="sort")return l=await ae(u,v,w),u.stages&&(l=await re(u.stages,l,w)),l;l=w.base.createSequence();for(var p=0;p<v.length;p++){var x=await D(u,v[p],w);if(u.stages)for(var P=0;P<u.stages.length;P++)x=await U(u.stages[P].expr,x,w);typeof x<"u"&&l.push(x)}var L=w.base.createSequence();return a&&l.length===1&&Array.isArray(l[0])&&!E(l[0])?L=l[0]:Array.prototype.forEach.call(l,function(H){!Array.isArray(H)||H.cons?L.push(H):Array.prototype.forEach.call(H,K=>L.push(K))}),L}async function re(u,v,w){for(var a=v,l=0;l<u.length;l++){var p=u[l];switch(p.type){case"filter":a=await U(p.expr,a,w);break;case"index":for(var x=0;x<a.length;x++){var P=a[x];P[p.value]=x}break}}return a}async function ie(u,v,w,a){var l;if(u.type==="sort"){if(w)l=await ae(u,w,a);else{var p=await ae(u,v,a);l=a.base.createSequence(),l.tupleStream=!0;for(var x=0;x<p.length;x++){var P={"@":p[x]};P[u.index]=x,l.push(P)}}return u.stages&&(l=await re(u.stages,l,a)),l}l=a.base.createSequence(),l.tupleStream=!0;var L=a;w===void 0&&(w=v.map(oe=>({"@":oe})));for(var H=0;H<w.length;H++){L=j(a,w[H]);var K=await D(u,w[H]["@"],L);if(typeof K<"u"){Array.isArray(K)||(K=[K]);for(var _e=0;_e<K.length;_e++)P=Object.create(null),Object.assign(P,w[H]),K.tupleStream?Object.assign(P,K[_e]):(u.focus?(P[u.focus]=K[_e],P["@"]=w[H]["@"]):P["@"]=K[_e],u.index&&(P[u.index]=_e),u.ancestor&&(P[u.ancestor.label]=w[H]["@"])),l.push(P)}}return u.stages&&(l=await re(u.stages,l,a)),l}async function U(u,v,w){var a=w.base.createSequence();if(v&&v.tupleStream&&(a.tupleStream=!0),Array.isArray(v)||(v=w.base.createSequence(v)),u.type==="number"){var l=Math.floor(u.value);l<0&&(l=v.length+l);var p=await v[l];typeof p<"u"&&(Array.isArray(p)?a=p:a.push(p))}else for(l=0;l<v.length;l++){var p=v[l],x=p,P=w;v.tupleStream&&(x=p["@"],P=j(w,p));var L=await D(u,x,P);g(L)&&(L=[L]),k(L)?Array.prototype.forEach.call(L,function(K){var _e=Math.floor(K);_e<0&&(_e=v.length+_e),_e===l&&a.push(p)}):o.boolean(L)&&a.push(p)}return a}async function le(u,v,w){var a,l=await D(u.lhs,v,w),p=u.value,x=async()=>await D(u.rhs,v,w);if(p==="and"||p==="or")try{return await we(l,x,p)}catch(L){throw L.position=u.position,L.token=p,L}var P=await x();try{switch(p){case"+":case"-":case"*":case"/":case"%":a=xe(l,P,p);break;case"=":case"!=":a=b(l,P,p);break;case"<":case"<=":case">":case">=":a=_(l,P,p);break;case"&":a=Ee(l,P);break;case"..":a=$(l,P,w);break;case"in":a=ee(l,P);break}}catch(L){throw L.position=u.position,L.token=p,L}return a}async function pe(u,v,w){var a,l={options:w.base.options,createSequence:w.base.createSequence};switch(u.value){case"-":if(a=await D(u.expression,v,w),typeof a>"u")a=void 0;else if(g(a))a=-a;else throw{code:"D1002",stack:new Error().stack,position:u.position,token:u.value,value:a};break;case"[":a=[];let P=await Promise.all(u.expressions.map(async(L,H)=>(w.isParallelCall=H>0,[L,await D(L,v,w)])));for(let L of P){var[p,x]=L;typeof x<"u"&&(p.value==="["?a.push(x):a=o.append.call(l,a,x))}u.consarray&&Object.defineProperty(a,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":a=await T(u,v,w);break}return a}function Be(u,v,w){var a={createSequence:w.base.createSequence};return o.lookup.call(a,v,u.value)}function he(u){return u.value}function me(u,v,w){var a={options:w.base.options,createSequence:w.base.createSequence},l=a.createSequence();return Array.isArray(v)&&v.outerWrapper&&v.length>0&&(v=v[0]),v!==null&&typeof v=="object"&&!O(v)&&c.keys(v).forEach(function(p){var x=v[p];Array.isArray(x)?(x=$e(x),l=o.append.call(a,l,x)):l.push(x)}),l}function $e(u,v){return typeof v>"u"&&(v=[]),Array.isArray(u)?Array.prototype.forEach.call(u,function(w){$e(w,v)}):v.push(u),v}function ce(u,v,w){var a,l=w.base.createSequence();return typeof v<"u"&&(W(v,l),l.length===1?a=l[0]:a=l),a}function W(u,v){Array.isArray(u)||v.push(u),Array.isArray(u)?Array.prototype.forEach.call(u,function(w){W(w,v)}):u!==null&&typeof u=="object"&&!O(u)&&c.keys(u).forEach(function(w){W(u[w],v)})}function xe(u,v,w){var a;if(typeof u<"u"&&!g(u))throw{code:"T2001",stack:new Error().stack,value:u};if(typeof v<"u"&&!g(v))throw{code:"T2002",stack:new Error().stack,value:v};if(typeof u>"u"||typeof v>"u")return a;switch(w){case"+":a=u+v;break;case"-":a=u-v;break;case"*":a=u*v;break;case"/":a=u/v;break;case"%":a=u%v;break}return a}function b(u,v,w){var a,l=typeof u,p=typeof v;if(l==="undefined"||p==="undefined")return!1;switch(w){case"=":a=I(u,v);break;case"!=":a=!I(u,v);break}return a}function _(u,v,w){var a,l=typeof u,p=typeof v,x=l==="undefined"||l==="string"||l==="number",P=p==="undefined"||p==="string"||p==="number";if(!x||!P)throw{code:"T2010",stack:new Error().stack,value:l==="string"||l==="number"?v:u};if(!(l==="undefined"||p==="undefined")){if(l!==p)throw{code:"T2009",stack:new Error().stack,value:u,value2:v};switch(w){case"<":a=u<v;break;case"<=":a=u<=v;break;case">":a=u>v;break;case">=":a=u>=v;break}return a}}function ee(u,v){var w=!1;if(typeof u>"u"||typeof v>"u")return!1;Array.isArray(v)||(v=[v]);for(var a=0;a<v.length;a++)if(v[a]===u){w=!0;break}return w}async function we(u,v,w){var a,l=Pe(u);switch(w){case"and":a=l&&Pe(await v());break;case"or":a=l||Pe(await v());break}return a}function Pe(u){var v=o.boolean(u);return typeof v>"u"?!1:v}function Ee(u,v){var w,a="",l="";return typeof u<"u"&&(a=o.string(u)),typeof v<"u"&&(l=o.string(v)),w=a.concat(l),w}async function T(u,v,w){var a=Object.create(null),l=Object.create(null),p=!!(v&&v.tupleStream),x={options:w.base.options,createSequence:w.base.createSequence};Array.isArray(v)||(w.base.options,v=x.createSequence(v)),v.length===0&&!p&&v.push(void 0);for(var P=0;P<v.length;P++)for(var L=v[P],H=p?j(w,L):w,K=0;K<u.lhs.length;K++){var _e=u.lhs[K],oe=await D(_e[0],p?L["@"]:L,H);if(typeof oe!="string"&&oe!==void 0)throw{code:"T1003",stack:new Error().stack,position:u.position,value:oe};if(oe!==void 0){if(oe==="_jsonata_lambda"||oe==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:u.position,value:oe};var je={data:L,exprIndex:K};if(Object.prototype.hasOwnProperty.call(l,oe)){if(l[oe].exprIndex!==K)throw{code:"D1009",stack:new Error().stack,position:u.position,value:oe};l[oe].data=o.append.call(x,l[oe].data,L)}else l[oe]=je}}let Ke=await Promise.all(c.keys(l).map(async(nt,Ie)=>{let Qe=l[nt];var Zt=Qe.data,Pt=w;if(p){var ps=M(Qe.data,w);Zt=ps["@"],delete ps["@"],Pt=j(w,ps)}return w.isParallelCall=Ie>0,[nt,await D(u.lhs[Qe.exprIndex][1],Zt,Pt)]}));for(let nt of Ke){var[oe,Ge]=await nt;typeof Ge<"u"&&(a[oe]=Ge)}return a}function M(u,v){if(!Array.isArray(u))return u;var w=Object.create(null),a={options:v.base.options,createSequence:v.base.createSequence};Object.assign(w,u[0]);for(var l=1;l<u.length;l++)for(const p of c.keys(u[l]))w[p]=o.append.call(a,w[p],u[l][p]);return w}function $(u,v,w){var a;if(typeof u<"u"&&!Number.isInteger(u))throw{code:"T2003",stack:new Error().stack,value:u};if(typeof v<"u"&&!Number.isInteger(v))throw{code:"T2004",stack:new Error().stack,value:v};if(typeof u>"u"||typeof v>"u"||u>v)return a;var l=v-u+1;if(l>1e7)throw{code:"D2014",stack:new Error().stack,value:l};if(w.base.options&&l>w.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};a=new Array(l);for(var p=u,x=0;p<=v;p++,x++)a[x]=p;return a.sequence=!0,a}async function F(u,v,w){var a=await D(u.rhs,v,w);return w.bind(u.lhs.value,a),a}async function q(u,v,w){var a,l=await D(u.condition,v,w);return o.boolean(l)?a=await D(u.then,v,w):typeof u.else<"u"&&(a=await D(u.else,v,w)),a}async function V(u,v,w){for(var a,l=es(w),p=0;p<u.expressions.length;p++)a=await D(u.expressions[p],v,l);return a}function N(u,v,w){var a=new w.base.RegexEngine(u.value),l=function(p,x){var P;a.lastIndex=x||0;var L=a.exec(p);if(L!==null){if(P={match:L[0],start:L.index,end:L.index+L[0].length,groups:[]},L.length>1)for(var H=1;H<L.length;H++)P.groups.push(L[H]);P.next=function(){if(!(a.lastIndex>=p.length)){var K=l(p,a.lastIndex);if(K&&K.match==="")throw{code:"D1004",stack:new Error().stack,position:u.position,value:u.value.source};return K}}}return P};return l}function G(u,v,w){var a;return u.value===""?a=v&&v.outerWrapper?v[0]:v:a=w.lookup(u.value),a}async function ae(u,v,w){var a,l=v,p=!!v.tupleStream,x=async function(L,H){for(var K=0,_e=0;K===0&&_e<u.terms.length;_e++){var oe=u.terms[_e],je=L,Ke=w;p&&(je=L["@"],Ke=j(w,L));var Ge=await D(oe.expression,je,Ke);je=H,Ke=w,p&&(je=H["@"],Ke=j(w,H));var nt=await D(oe.expression,je,Ke),Ie=typeof Ge,Qe=typeof nt;if(Ie==="undefined"){K=Qe==="undefined"?0:1;continue}if(Qe==="undefined"){K=-1;continue}if(!(Ie==="string"||Ie==="number")||!(Qe==="string"||Qe==="number"))throw{code:"T2008",stack:new Error().stack,position:u.position,value:Ie==="string"||Ie==="number"?nt:Ge};if(Ie!==Qe)throw{code:"T2007",stack:new Error().stack,position:u.position,value:Ge,value2:nt};Ge!==nt&&(Ge<nt?K=-1:K=1,oe.descending===!0&&(K=-K))}return K===1},P={environment:w,input:v};return a=await o.sort.apply(P,[l,x]),a}function Ce(u,v,w){var a=async function(l){if(!(typeof l>"u")){var p=w.lookup("clone");if(!O(p))throw{code:"T2013",stack:new Error().stack,position:u.position};var x=await De(p,[l],null,w),P=await D(u.pattern,x,w);if(typeof P<"u"){Array.isArray(P)||(P=[P]);for(var L=0;L<P.length;L++){var H=P[L],K=await D(u.update,H,w),_e=typeof K;if(_e!=="undefined"){if(_e!=="object"||K===null||Array.isArray(K))throw{code:"T2011",stack:new Error().stack,position:u.update.position,value:K};for(const Ge of c.keys(K))H[Ge]=K[Ge]}if(typeof u.delete<"u"){var oe=await D(u.delete,H,w);if(typeof oe<"u"){var je=oe;if(Array.isArray(oe)||(oe=[oe]),!f(oe))throw{code:"T2012",stack:new Error().stack,position:u.delete.position,value:je};for(var Ke=0;Ke<oe.length;Ke++)typeof H=="object"&&H!==null&&delete H[oe[Ke]]}}}}return x}};return Z(a,"<(oa):o>")}var ge=d("function($f, $g) { function($x){ $g($f($x)) } }");async function fe(u,v,w){var a,l=await D(u.lhs,v,w);if(u.rhs.type==="function")a=await ue(u.rhs,v,w,{context:l});else{var p=await D(u.rhs,v,w);if(!O(p))throw{code:"T2006",stack:new Error().stack,position:u.position,value:p};if(O(l)){var x=await D(ge,null,w);a=await De(x,[l,p],null,w)}else a=await De(p,[l],null,w)}return a}async function ue(u,v,w,a){var l,p=await D(u.procedure,v,w);if(typeof p>"u"&&u.procedure.type==="path"&&w.lookup(u.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:u.position,token:u.procedure.steps[0].value};var x=[];typeof a<"u"&&x.push(a.context);for(var P=0;P<u.arguments.length;P++){const H=await D(u.arguments[P],v,w);if(O(H)){const K=async function(..._e){return await De(H,_e,null,w)};K.arity=y(H),x.push(K)}else x.push(H)}var L=u.procedure.type==="path"?u.procedure.steps[0].value:u.procedure.value;try{typeof p=="object"&&(p.token=L,p.position=u.position),l=await De(p,x,v,w)}catch(H){throw H.position||(H.position=u.position),H.token||(H.token=L),H}return l}async function De(u,v,w,a){var l;for(l=await de(u,v,w,a);z(l)&&l.thunk===!0;){var p=await D(l.body.procedure,l.input,l.environment);l.body.procedure.type==="variable"&&(p.token=l.body.procedure.value),p.position=l.body.procedure.position;for(var x=[],P=0;P<l.body.arguments.length;P++)x.push(await D(l.body.arguments[P],l.input,l.environment));l=await de(p,x,w,a)}return l}async function de(u,v,w,a){var l;try{var p=v;if(u&&(p=_t(u.signature,v,w)),z(u))l=await it(u,p);else if(u&&u._jsonata_function===!0){var x={environment:a,input:w,options:a.base.options,createSequence:a.base.createSequence};l=u.implementation.apply(x,p),B(l)&&(l=l.next().value),S(l)&&(l=await l)}else if(typeof u=="function")l=u.apply(w,p),S(l)&&(l=await l);else throw{code:"T1006",stack:new Error().stack}}catch(P){throw u&&(typeof P.token>"u"&&typeof u.token<"u"&&(P.token=u.token),P.position=u.position||P.position),P}return l}function ft(u,v,w){var a={_jsonata_lambda:!0,input:v,environment:w,arguments:u.arguments,signature:u.signature,body:u.body};return u.thunk===!0&&(a.thunk=!0),a.apply=async function(l,p){return await De(a,p,v,l?l.environment:w)},a}async function Yt(u,v,w){for(var a,l=[],p=0;p<u.arguments.length;p++){var x=u.arguments[p];x.type==="operator"&&x.value==="?"?l.push(x):l.push(await D(x,v,w))}var P=await D(u.procedure,v,w);if(typeof P>"u"&&u.procedure.type==="path"&&w.lookup(u.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:u.position,token:u.procedure.steps[0].value};if(z(P))a=St(P,l,w);else if(P&&P._jsonata_function===!0)a=xs(P.implementation,l,w);else if(typeof P=="function")a=xs(P,l,w);else throw{code:"T1008",stack:new Error().stack,position:u.position,token:u.procedure.type==="path"?u.procedure.steps[0].value:u.procedure.value};return a}function _t(u,v,w){if(typeof u>"u")return v;var a=u.validate(v,w);return a}async function it(u,v){var w,a=es(u.environment);return Array.prototype.forEach.call(u.arguments,function(l,p){a.bind(l.value,v[p])}),typeof u.body=="function"?w=await Er(u.body,a):w=await D(u.body,u.input,a),w}function St(u,v,w){var a=es(u.environment||w),l=[];Array.prototype.forEach.call(u.arguments,function(x,P){var L=v[P];L&&L.type==="operator"&&L.value==="?"?l.push(x):a.bind(x.value,L)});var p={_jsonata_lambda:!0,input:u.input,environment:a,arguments:l,body:u.body};return p}function xs(u,v,w){var a=Or(u);a=a.map(function(P){return"$"+P.trim()});var l="function("+a.join(", ")+"){ _ }",p=d(l);p.body=u;var x=St(p,v,w);return x}async function Er(u,v){var w=Or(u),a=w.map(function(x){return v.lookup(x.trim())}),l={environment:v,createSequence:v.base.createSequence},p=u.apply(l,a);return S(p)&&(p=await p),p}function Or(u){var v=u.toString(),w=/\(([^)]*)\)/.exec(v)[1],a=w.split(",");return a}function Z(u,v){var w={_jsonata_function:!0,implementation:u};return typeof v<"u"&&(w.signature=m(v)),w}async function on(u,v){if(!(typeof u>"u")){var w=this.input;typeof v<"u"&&(w=v,Array.isArray(w)&&!E(w)&&(w=this.createSequence(w),w.outerWrapper=!0));try{var a=d(u,!1)}catch(p){throw ds(p),{stack:new Error().stack,code:"D3120",value:p.message,error:p}}try{var l=await D(a,w,this.environment)}catch(p){throw ds(p),{stack:new Error().stack,code:"D3121",value:p.message,error:p}}return l}}function an(u){if(!(typeof u>"u"))return JSON.parse(o.string(u))}function es(u){var v=Object.create(null);const w={bind:function(l,p){v[l]=p},lookup:function(l){var p;return Object.prototype.hasOwnProperty.call(v,l)?p=v[l]:u&&(p=u.lookup(l)),p},timestamp:u?u.timestamp:null,async:u?u.async:!1,isParallelCall:u?u.isParallelCall:!1,global:u?u.global:{ancestry:[null]}};if(u){var a=u.lookup(Symbol.for("jsonata.__createFrame_push"));a&&a(u,w),w.base=u.base}return w}C.bind("sum",Z(o.sum,"<a<n>:n>")),C.bind("count",Z(o.count,"<a:n>")),C.bind("max",Z(o.max,"<a<n>:n>")),C.bind("min",Z(o.min,"<a<n>:n>")),C.bind("average",Z(o.average,"<a<n>:n>")),C.bind("string",Z(o.string,"<x-b?:s>")),C.bind("substring",Z(o.substring,"<s-nn?:s>")),C.bind("substringBefore",Z(o.substringBefore,"<s-s:s>")),C.bind("substringAfter",Z(o.substringAfter,"<s-s:s>")),C.bind("lowercase",Z(o.lowercase,"<s-:s>")),C.bind("uppercase",Z(o.uppercase,"<s-:s>")),C.bind("length",Z(o.length,"<s-:n>")),C.bind("trim",Z(o.trim,"<s-:s>")),C.bind("pad",Z(o.pad,"<s-ns?:s>")),C.bind("match",Z(o.match,"<s-f<s:o>n?:a<o>>")),C.bind("contains",Z(o.contains,"<s-(sf):b>")),C.bind("replace",Z(o.replace,"<s-(sf)(sf)n?:s>")),C.bind("split",Z(o.split,"<s-(sf)n?:a<s>>")),C.bind("join",Z(o.join,"<a<s>s?:s>")),C.bind("formatNumber",Z(o.formatNumber,"<n-so?:s>")),C.bind("formatBase",Z(o.formatBase,"<n-n?:s>")),C.bind("formatInteger",Z(n.formatInteger,"<n-s:s>")),C.bind("parseInteger",Z(n.parseInteger,"<s-s:n>")),C.bind("number",Z(o.number,"<(nsb)-:n>")),C.bind("floor",Z(o.floor,"<n-:n>")),C.bind("ceil",Z(o.ceil,"<n-:n>")),C.bind("round",Z(o.round,"<n-n?:n>")),C.bind("abs",Z(o.abs,"<n-:n>")),C.bind("sqrt",Z(o.sqrt,"<n-:n>")),C.bind("power",Z(o.power,"<n-n:n>")),C.bind("random",Z(o.random,"<:n>")),C.bind("boolean",Z(o.boolean,"<x-:b>")),C.bind("not",Z(o.not,"<x-:b>")),C.bind("map",Z(o.map,"<af>")),C.bind("zip",Z(o.zip,"<a+>")),C.bind("filter",Z(o.filter,"<af>")),C.bind("single",Z(o.single,"<af?>")),C.bind("reduce",Z(o.foldLeft,"<afj?:j>")),C.bind("sift",Z(o.sift,"<o-f?:o>")),C.bind("keys",Z(o.keys,"<x-:a<s>>")),C.bind("lookup",Z(o.lookup,"<x-s:x>")),C.bind("append",Z(o.append,"<xx:a>")),C.bind("exists",Z(o.exists,"<x:b>")),C.bind("spread",Z(o.spread,"<x-:a<o>>")),C.bind("merge",Z(o.merge,"<a<o>:o>")),C.bind("reverse",Z(o.reverse,"<a:a>")),C.bind("each",Z(o.each,"<o-f:a>")),C.bind("error",Z(o.error,"<s?:x>")),C.bind("assert",Z(o.assert,"<bs?:x>")),C.bind("type",Z(o.type,"<x:s>")),C.bind("sort",Z(o.sort,"<af?:a>")),C.bind("shuffle",Z(o.shuffle,"<a:a>")),C.bind("distinct",Z(o.distinct,"<x:x>")),C.bind("base64encode",Z(o.base64encode,"<s-:s>")),C.bind("base64decode",Z(o.base64decode,"<s-:s>")),C.bind("encodeUrlComponent",Z(o.encodeUrlComponent,"<s-:s>")),C.bind("encodeUrl",Z(o.encodeUrl,"<s-:s>")),C.bind("decodeUrlComponent",Z(o.decodeUrlComponent,"<s-:s>")),C.bind("decodeUrl",Z(o.decodeUrl,"<s-:s>")),C.bind("eval",Z(on,"<sx?:x>")),C.bind("toMillis",Z(n.toMillis,"<s-s?:n>")),C.bind("fromMillis",Z(n.fromMillis,"<n-s?s?:s>")),C.bind("clone",Z(an,"<(oa)-:o>"));var ci={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",D1011:"Stack overflow. Check for non-terminating recursive function. Consider rewriting as tail-recursive",D1012:"Evaluation timeout after {{value}} milliseconds. Check for infinite loop",D1013:"Object property names starting with _jsonata_ are reserved for internal use: {{value}}",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e7. Attempted to allocate {{value}}.",D2015:"The maximum sequence length of {{value}} was exceeded.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function ds(u){var v=ci[u.code];if(typeof v<"u"){var w=v.replace(/\{\{\{([^}]+)}}}/g,function(){return u[arguments[1]]});w=w.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(u[arguments[1]])}),u.message=w}}function lr(u,v){var w,a;try{w=d(u,v&&v.recover),a=w.errors,delete w.errors}catch(x){throw ds(x),x}var l=es(C),p=new Date;return l.bind("now",Z(function(x,P){return n.fromMillis(p.getTime(),x,P)},"<s?s?:s>")),l.bind("millis",Z(function(){return p.getTime()},"<:n>")),{evaluate:async function(x,P,L){if(typeof a<"u"){var H={code:"S0500",position:0};throw ds(H),H}const K=es(l);for(const oe of c.keys(P))K.bind(oe,P[oe]);if(K.bind("$",x),p=new Date,K.timestamp=p,K.options=v,K.createSequence=function(){var oe=[];return v&&v.sequence&&(oe.push=function(...je){if(oe.length+je.length>v.sequence)throw{code:"D2015",stack:new Error().stack,value:v.sequence};return Array.prototype.push.apply(oe,je)}),oe.sequence=!0,arguments.length===1&&oe.push(arguments[0]),oe},Array.isArray(x)&&!E(x)&&(x=K.createSequence(x),x.outerWrapper=!0),v&&(v.timeout||v.stack)){const oe=Date.now();K.guardrails=function(){if(v.stack>0&&K.depth>v.stack)throw{code:"D1011",value:v.stack,stack:new Error().stack};if(v.timeout>0&&Date.now()-oe>v.timeout)throw{code:"D1012",value:v.timeout,stack:new Error().stack}}}else K.guardrails=function(){};K.base=K,K.depth=0,v&&v.RegexEngine?K.RegexEngine=v.RegexEngine:K.RegexEngine=RegExp;var _e;try{return _e=await D(w,x,K),typeof L=="function"&&L(null,_e),_e}catch(oe){throw ds(oe),oe}},assign:function(x,P){l.bind(x,P)},registerFunction:function(x,P,L){var H=Z(P,L);l.bind(x,H)},ast:function(){return w},errors:function(){return a}}}return lr.parser=d,lr})();i.exports=A},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(s,i,r){var n=s("./signature");const o=(()=>{var c={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},d={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
73
- `,r:"\r",t:" "},m=function(g){var f=0,k=g.length,E=function(B,S){var y={type:B,value:S,position:f};return y},O=function(){for(var B=f,S=0,y,I,C=function(Y){if(g.charAt(Y)==="/"&&S===0){for(var j=0;g.charAt(Y-(j+1))==="\\";)j++;if(j%2===0)return!0}return!1};f<k;){var D=g.charAt(f);if(C(f)){if(y=g.substring(B,f),y==="")throw{code:"S0301",stack:new Error().stack,position:f};for(f++,D=g.charAt(f),B=f;D==="i"||D==="m";)f++,D=g.charAt(f);return I=g.substring(B,f)+"g",new RegExp(y,I)}(D==="("||D==="["||D==="{")&&g.charAt(f-1)!=="\\"&&S++,(D===")"||D==="]"||D==="}")&&g.charAt(f-1)!=="\\"&&S--,f++}throw{code:"S0302",stack:new Error().stack,position:f}},z=function(B){if(f>=k)return null;for(var S=g.charAt(f);f<k&&`
74
- \r\v`.indexOf(S)>-1;)f++,S=g.charAt(f);if(S==="/"&&g.charAt(f+1)==="*"){var y=f;for(f+=2,S=g.charAt(f);!(S==="*"&&g.charAt(f+1)==="/");)if(S=g.charAt(++f),f>=k)throw{code:"S0106",stack:new Error().stack,position:y};return f+=2,S=g.charAt(f),z(B)}if(B!==!0&&S==="/")return f++,E("regex",O());if(S==="."&&g.charAt(f+1)===".")return f+=2,E("operator","..");if(S===":"&&g.charAt(f+1)==="=")return f+=2,E("operator",":=");if(S==="!"&&g.charAt(f+1)==="=")return f+=2,E("operator","!=");if(S===">"&&g.charAt(f+1)==="=")return f+=2,E("operator",">=");if(S==="<"&&g.charAt(f+1)==="=")return f+=2,E("operator","<=");if(S==="*"&&g.charAt(f+1)==="*")return f+=2,E("operator","**");if(S==="~"&&g.charAt(f+1)===">")return f+=2,E("operator","~>");if(S==="?"&&g.charAt(f+1)===":")return f+=2,E("operator","?:");if(S==="?"&&g.charAt(f+1)==="?")return f+=2,E("operator","??");if(Object.prototype.hasOwnProperty.call(c,S))return f++,E("operator",S);if(S==='"'||S==="'"){var I=S;f++;for(var C="";f<k;){if(S=g.charAt(f),S==="\\")if(f++,S=g.charAt(f),Object.prototype.hasOwnProperty.call(d,S))C+=d[S];else if(S==="u"){var D=g.substr(f+1,4);if(/^[0-9a-fA-F]+$/.test(D)){var Y=parseInt(D,16);C+=String.fromCharCode(Y),f+=4}else throw{code:"S0104",stack:new Error().stack,position:f}}else throw{code:"S0103",stack:new Error().stack,position:f,token:S};else{if(S===I)return f++,E("string",C);C+=S}f++}throw{code:"S0101",stack:new Error().stack,position:f}}var j=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,ne=j.exec(g.substring(f));if(ne!==null){var re=parseFloat(ne[0]);if(!isNaN(re)&&isFinite(re))return f+=ne[0].length,E("number",re);throw{code:"S0102",stack:new Error().stack,position:f,token:ne[0]}}var ie;if(S==="`"){f++;var U=g.indexOf("`",f);if(U!==-1)return ie=g.substring(f,U),f=U+1,E("name",ie);throw f=k,{code:"S0105",stack:new Error().stack,position:f}}for(var le=f,pe;;)if(pe=g.charAt(le),le===k||`
75
- \r\v`.indexOf(pe)>-1||Object.prototype.hasOwnProperty.call(c,pe)){if(g.charAt(f)==="$")return ie=g.substring(f+1,le),f=le,E("variable",ie);switch(ie=g.substring(f,le),f=le,ie){case"or":case"in":case"and":return E("operator",ie);case"true":return E("value",!0);case"false":return E("value",!1);case"null":return E("value",null);default:return f===k&&ie===""?null:E("name",ie)}}else le++};return z},A=function(g,f){var k,E,O=Object.create(null),z=[],B=function(){var b=[];k.id!=="(end)"&&b.push({type:k.type,value:k.value,position:k.position});for(var _=E();_!==null;)b.push(_),_=E();return b},S={nud:function(){var b={code:"S0211",token:this.value,position:this.position};if(f)return b.remaining=B(),b.type="error",z.push(b),b;throw b.stack=new Error().stack,b}},y=function(b,_){var ee=O[b];return _=_||0,ee?_>=ee.lbp&&(ee.lbp=_):(ee=Object.create(S),ee.id=ee.value=b,ee.lbp=_,O[b]=ee),ee},I=function(b){if(f){b.remaining=B(),z.push(b);var _=O["(error)"];return k=Object.create(_),k.error=b,k.type="(error)",k}else throw b.stack=new Error().stack,b},C=function(b,_){if(b&&k.id!==b){var ee;k.id==="(end)"?ee="S0203":ee="S0202";var we={code:ee,position:k.position,token:k.value,value:b};return I(we)}var Pe=E(_);if(Pe===null)return k=O["(end)"],k.position=g.length,k;var Ee=Pe.value,T=Pe.type,M;switch(T){case"name":case"variable":M=O["(name)"];break;case"operator":if(M=O[Ee],!M)return I({code:"S0204",stack:new Error().stack,position:Pe.position,token:Ee});break;case"string":case"number":case"value":M=O["(literal)"];break;case"regex":T="regex",M=O["(regex)"];break;default:return I({code:"S0205",stack:new Error().stack,position:Pe.position,token:Ee})}return k=Object.create(M),k.value=Ee,k.type=T,k.position=Pe.position,k},D=function(b){var _,ee=k;for(C(null,!0),_=ee.nud();b<k.lbp;)ee=k,C(),_=ee.led(_);return _},Y=function(b){var _=y(b,0);_.nud=function(){return this}},j=function(b,_,ee){var we=_||c[b],Pe=y(b,we);return Pe.led=ee||function(Ee){return this.lhs=Ee,this.rhs=D(we),this.type="binary",this},Pe},ne=function(b,_,ee){var we=y(b,_);return we.led=ee,we},re=function(b,_){var ee=y(b);return ee.nud=_||function(){return this.expression=D(70),this.type="unary",this},ee};Y("(end)"),Y("(name)"),Y("(literal)"),Y("(regex)"),y(":"),y(";"),y(","),y(")"),y("]"),y("}"),y(".."),j("."),j("+"),j("-"),j("*"),j("/"),j("%"),j("="),j("<"),j(">"),j("!="),j("<="),j(">="),j("&"),j("and"),j("or"),j("in"),Y("and"),Y("or"),Y("in"),re("-"),j("~>"),j("??",c["??"],function(b){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(b))]},this.then=b,this.else=D(0),this}),ne("(error)",10,function(b){return this.lhs=b,this.error=k.error,this.remaining=B(),this.type="error",this}),re("*",function(){return this.type="wildcard",this}),re("**",function(){return this.type="descendant",this}),re("%",function(){return this.type="parent",this}),j("(",c["("],function(b){if(this.procedure=b,this.type="function",this.arguments=[],k.id!==")")for(;k.type==="operator"&&k.id==="?"?(this.type="partial",this.arguments.push(k),C("?")):this.arguments.push(D(0)),k.id===",";)C(",");if(C(")",!0),b.type==="name"&&(b.value==="function"||b.value==="λ")){if(this.arguments.forEach(function(Ee,T){if(Ee.type!=="variable")return I({code:"S0208",stack:new Error().stack,position:Ee.position,token:Ee.value,value:T+1})}),this.type="lambda",k.id==="<"){for(var _=k.position,ee=1,we="<";ee>0&&k.id!=="{"&&k.id!=="(end)";){var Pe=C();Pe.id===">"?ee--:Pe.id==="<"&&ee++,we+=Pe.value}C(">");try{this.signature=n(we)}catch(Ee){return Ee.position=_+Ee.offset,I(Ee)}}C("{"),this.body=D(0),C("}")}return this}),re("(",function(){for(var b=[];k.id!==")"&&(b.push(D(0)),k.id===";");)C(";");return C(")",!0),this.type="block",this.expressions=b,this}),re("[",function(){var b=[];if(k.id!=="]")for(;;){var _=D(0);if(k.id===".."){var ee={type:"binary",value:"..",position:k.position,lhs:_};C(".."),ee.rhs=D(0),_=ee}if(b.push(_),k.id!==",")break;C(",")}return C("]",!0),this.expressions=b,this.type="unary",this}),j("[",c["["],function(b){if(k.id==="]"){for(var _=b;_&&_.type==="binary"&&_.value==="[";)_=_.lhs;return _.keepArray=!0,C("]"),b}else return this.lhs=b,this.rhs=D(c["]"]),this.type="binary",C("]",!0),this}),j("^",c["^"],function(b){C("(");for(var _=[];;){var ee={descending:!1};if(k.id==="<"?C("<"):k.id===">"&&(ee.descending=!0,C(">")),ee.expression=D(0),_.push(ee),k.id!==",")break;C(",")}return C(")"),this.lhs=b,this.rhs=_,this.type="binary",this});var ie=function(b){var _=[];if(k.id!=="}")for(;;){var ee=D(0);C(":");var we=D(0);if(_.push([ee,we]),k.id!==",")break;C(",")}return C("}",!0),typeof b>"u"?(this.lhs=_,this.type="unary"):(this.lhs=b,this.rhs=_,this.type="binary"),this};re("{",ie),j("{",c["{"],ie),ne(":=",c[":="],function(b){return b.type!=="variable"?I({code:"S0212",stack:new Error().stack,position:b.position,token:b.value}):(this.lhs=b,this.rhs=D(c[":="]-1),this.type="binary",this)}),j("@",c["@"],function(b){return this.lhs=b,this.rhs=D(c["@"]),this.rhs.type!=="variable"?I({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),j("#",c["#"],function(b){return this.lhs=b,this.rhs=D(c["#"]),this.rhs.type!=="variable"?I({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),j("?",c["?"],function(b){return this.type="condition",this.condition=b,this.then=D(0),k.id===":"&&(C(":"),this.else=D(0)),this}),j("?:",c["?:"],function(b){return this.type="condition",this.condition=JSON.parse(JSON.stringify(b)),this.then=b,this.else=D(0),this}),re("|",function(){return this.type="transform",this.pattern=D(0),C("|"),this.update=D(0),k.id===","&&(C(","),this.delete=D(0)),C("|"),this});var U=function(b){var _;if(b.type==="function"&&!b.predicate){var ee={type:"lambda",thunk:!0,arguments:[],position:b.position};ee.body=b,_=ee}else if(b.type==="condition")b.then=U(b.then),typeof b.else<"u"&&(b.else=U(b.else)),_=b;else if(b.type==="block"){var we=b.expressions.length;we>0&&(b.expressions[we-1]=U(b.expressions[we-1])),_=b}else _=b;return _},le=0,pe=0,Be=[],he=function(b,_){switch(b.type){case"name":case"wildcard":_.level--,_.level===0&&(typeof b.ancestor>"u"||(Be[_.index].slot.label=b.ancestor.label),b.ancestor=_,b.tuple=!0);break;case"parent":_.level++;break;case"block":b.expressions.length>0&&(b.tuple=!0,_=he(b.expressions[b.expressions.length-1],_));break;case"path":b.tuple=!0;var ee=b.steps.length-1;for(_=he(b.steps[ee--],_);_.level>0&&ee>=0;)_=he(b.steps[ee--],_);break;default:throw{code:"S0217",token:b.type,position:b.position}}return _},me=function(b,_){if(typeof _.seekingParent<"u"||_.type==="parent"){var ee=typeof _.seekingParent<"u"?_.seekingParent:[];_.type==="parent"&&ee.push(_.slot),typeof b.seekingParent>"u"?b.seekingParent=ee:Array.prototype.push.apply(b.seekingParent,ee)}},$e=function(b){var _=b.steps.length-1,ee=b.steps[_],we=typeof ee.seekingParent<"u"?ee.seekingParent:[];ee.type==="parent"&&we.push(ee.slot);for(var Pe=0;Pe<we.length;Pe++){var Ee=we[Pe];for(_=b.steps.length-2;Ee.level>0;){if(_<0){typeof b.seekingParent>"u"?b.seekingParent=[Ee]:b.seekingParent.push(Ee);break}for(var T=b.steps[_--];_>=0&&T.focus&&b.steps[_].focus;)T=b.steps[_--];Ee=he(T,Ee)}}},ce=function(b){var _;switch(b.type){case"binary":switch(b.value){case".":var ee=ce(b.lhs);ee.type==="path"?_=ee:_={type:"path",steps:[ee]},ee.type==="parent"&&(_.seekingParent=[ee.slot]);var we=ce(b.rhs);we.type==="path"?Array.prototype.push.apply(_.steps,we.steps):(typeof we.predicate<"u"&&(we.stages=we.predicate,delete we.predicate),_.steps.push(we)),_.steps.filter(function(G){if(G.type==="number"||G.type==="value")throw{code:"S0213",stack:new Error().stack,position:G.position,value:G.value};return G.type==="string"}).forEach(function(G){G.type="name"}),_.steps.filter(function(G){return G.keepArray===!0}).length>0&&(_.keepSingletonArray=!0);var Pe=_.steps[0];Pe.type==="unary"&&Pe.value==="["&&(Pe.consarray=!0);var Ee=_.steps[_.steps.length-1];Ee.type==="unary"&&Ee.value==="["&&(Ee.consarray=!0),$e(_);break;case"[":_=ce(b.lhs);var T=_,M="predicate";if(_.type==="path"&&(T=_.steps[_.steps.length-1],M="stages"),typeof T.group<"u")throw{code:"S0209",stack:new Error().stack,position:b.position};typeof T[M]>"u"&&(T[M]=[]);var $=ce(b.rhs);typeof $.seekingParent<"u"&&($.seekingParent.forEach(G=>{G.level===1?he(T,G):G.level--}),me(T,$)),T[M].push({type:"filter",expr:$,position:b.position});break;case"{":if(_=ce(b.lhs),typeof _.group<"u")throw{code:"S0210",stack:new Error().stack,position:b.position};_.group={lhs:b.rhs.map(function(G){return[ce(G[0]),ce(G[1])]}),position:b.position};break;case"^":_=ce(b.lhs),_.type!=="path"&&(_={type:"path",steps:[_]});var F={type:"sort",position:b.position};F.terms=b.rhs.map(function(G){var ae=ce(G.expression);return me(F,ae),{descending:G.descending,expression:ae}}),_.steps.push(F),$e(_);break;case":=":_={type:"bind",value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),me(_,_.rhs);break;case"@":if(_=ce(b.lhs),T=_,_.type==="path"&&(T=_.steps[_.steps.length-1]),typeof T.stages<"u"||typeof T.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:b.position};if(T.type==="sort")throw{code:"S0216",stack:new Error().stack,position:b.position};b.keepArray&&(T.keepArray=!0),T.focus=b.rhs.value,T.tuple=!0;break;case"#":_=ce(b.lhs),T=_,_.type==="path"?T=_.steps[_.steps.length-1]:(_={type:"path",steps:[_]},typeof T.predicate<"u"&&(T.stages=T.predicate,delete T.predicate)),typeof T.stages>"u"?T.index=b.rhs.value:T.stages.push({type:"index",value:b.rhs.value,position:b.position}),T.tuple=!0;break;case"~>":_={type:"apply",value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),_.keepArray=_.lhs.keepArray||_.rhs.keepArray;break;default:_={type:b.type,value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),me(_,_.lhs),me(_,_.rhs)}break;case"unary":_={type:b.type,value:b.value,position:b.position},b.value==="["?_.expressions=b.expressions.map(function(G){var ae=ce(G);return me(_,ae),ae}):b.value==="{"?_.lhs=b.lhs.map(function(G){var ae=ce(G[0]);me(_,ae);var Ce=ce(G[1]);return me(_,Ce),[ae,Ce]}):(_.expression=ce(b.expression),b.value==="-"&&_.expression.type==="number"?(_=_.expression,_.value=-_.value):me(_,_.expression));break;case"function":case"partial":_={type:b.type,name:b.name,value:b.value,position:b.position},_.arguments=b.arguments.map(function(G){var ae=ce(G);return me(_,ae),ae}),_.procedure=ce(b.procedure);break;case"lambda":_={type:b.type,arguments:b.arguments,signature:b.signature,position:b.position};var q=ce(b.body);_.body=U(q);break;case"condition":_={type:b.type,position:b.position},_.condition=ce(b.condition),me(_,_.condition),_.then=ce(b.then),me(_,_.then),typeof b.else<"u"&&(_.else=ce(b.else),me(_,_.else));break;case"transform":_={type:b.type,position:b.position},_.pattern=ce(b.pattern),_.update=ce(b.update),typeof b.delete<"u"&&(_.delete=ce(b.delete));break;case"block":_={type:b.type,position:b.position},_.expressions=b.expressions.map(function(G){var ae=ce(G);return me(_,ae),(ae.consarray||ae.type==="path"&&ae.steps[0].consarray)&&(_.consarray=!0),ae});break;case"name":_={type:"path",steps:[b]},b.keepArray&&(_.keepSingletonArray=!0);break;case"parent":_={type:"parent",slot:{label:"!"+le++,level:1,index:pe++}},Be.push(_);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":_=b;break;case"operator":if(b.value==="and"||b.value==="or"||b.value==="in")b.type="name",_=ce(b);else if(b.value==="?")_=b;else throw{code:"S0201",stack:new Error().stack,position:b.position,token:b.value};break;case"error":_=b,b.lhs&&(_=ce(b.lhs));break;default:var V="S0206";b.id==="(end)"&&(V="S0207");var N={code:V,position:b.position,token:b.value};if(f)return z.push(N),{type:"error",error:N};throw N.stack=new Error().stack,N}return b.keepArray&&(_.keepArray=!0),_};E=m(g),C();var W=D(0);if(k.id!=="(end)"){var xe={code:"S0201",position:k.position,token:k.value};I(xe)}if(W=ce(W),W.type==="parent"||typeof W.seekingParent<"u")throw{code:"S0217",token:W.type,position:W.position};return z.length>0&&(W.errors=z),W};return A})();i.exports=o},{"./signature":5}],5:[function(s,i,r){var n=s("./utils");const o=(()=>{var c={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function d(m){for(var A=1,g=[],f=Object.create(null),k=f;A<m.length;){var E=m.charAt(A);if(E===":")break;var O=function(){g.push(f),k=f,f=Object.create(null)},z=function(j,ne,re,ie){for(var U=1,le=ne;le<j.length;)if(le++,E=j.charAt(le),E===ie){if(U--,U===0)break}else E===re&&U++;return le};switch(E){case"s":case"n":case"b":case"l":case"o":f.regex="["+E+"m]",f.type=E,O();break;case"a":f.regex="[asnblfom]",f.type=E,f.array=!0,O();break;case"f":f.regex="f",f.type=E,O();break;case"j":f.regex="[asnblom]",f.type=E,O();break;case"x":f.regex="[asnblfom]",f.type=E,O();break;case"-":k.context=!0,k.contextRegex=new RegExp(k.regex),k.regex+="?";break;case"?":case"+":k.regex+=E;break;case"(":var B=z(m,A,"(",")"),S=m.substring(A+1,B);if(S.indexOf("<")===-1)f.regex="["+S+"m]";else throw{code:"S0402",stack:new Error().stack,value:S,offset:A};f.type="("+S+")",A=B,O();break;case"<":if(k.type==="a"||k.type==="f"){var y=z(m,A,"<",">");k.subtype=m.substring(A+1,y),A=y}else throw{code:"S0401",stack:new Error().stack,value:k.type,offset:A};break}A++}var I="^"+g.map(function(j){return"("+j.regex+")"}).join("")+"$",C=new RegExp(I),D=function(j){var ne;if(n.isFunction(j))ne="f";else{var re=typeof j;switch(re){case"string":ne="s";break;case"number":ne="n";break;case"boolean":ne="b";break;case"object":j===null?ne="l":Array.isArray(j)?ne="a":ne="o";break;case"undefined":default:ne="m"}}return ne},Y=function(j,ne){for(var re="^",ie=0,U=0;U<g.length;U++){re+=g[U].regex;var le=ne.match(re);if(le===null)throw{code:"T0410",stack:new Error().stack,value:j[ie],index:ie+1};ie=le[0].length}throw{code:"T0410",stack:new Error().stack,value:j[ie],index:ie+1}};return{definition:m,validate:function(j,ne){var re="";j.forEach(function(pe){re+=D(pe)});var ie=C.exec(re);if(ie){var U=[],le=0;return g.forEach(function(pe,Be){var he=j[le],me=ie[Be+1];if(me==="")if(pe.context&&pe.contextRegex){var $e=D(ne);if(pe.contextRegex.test($e))U.push(ne);else throw{code:"T0411",stack:new Error().stack,value:ne,index:le+1}}else U.push(he),le++;else me.split("").forEach(function(ce){if(he=j[le],pe.type==="a"){if(ce==="m")he=void 0;else{var W=!0;if(typeof pe.subtype<"u"){if(ce!=="a"&&me!==pe.subtype)W=!1;else if(ce==="a"&&he.length>0){var xe=D(he[0]);if(xe!==pe.subtype.charAt(0))W=!1;else{var b=he.filter(function(_){return D(_)!==xe});W=b.length===0}}}if(!W)throw{code:"T0412",stack:new Error().stack,value:he,index:le+1,type:c[pe.subtype]};ce!=="a"&&(he=[he])}U.push(he),le++}else U.push(he),le++})}),U}Y(j,re)}}}return d})();i.exports=o},{"./utils":6}],6:[function(s,i,r){const n=(()=>{function o(y){var I=!1;if(typeof y=="number"&&(I=!isNaN(y),I&&!isFinite(y)))throw{code:"D1001",value:y,stack:new Error().stack};return I}function c(y){var I=!1;return Array.isArray(y)&&(I=y.filter(function(C){return typeof C!="string"}).length===0),I}function d(y){var I=!1;return Array.isArray(y)&&(I=y.filter(function(C){return!o(C)}).length===0),I}function m(y){return y.sequence===!0&&Array.isArray(y)}function A(y){return y&&(y._jsonata_function===!0||y._jsonata_lambda===!0)||typeof y=="function"}function g(y){var I=typeof y.arity=="number"?y.arity:typeof y.implementation=="function"?y.implementation.length:typeof y.length=="number"?y.length:y.arguments.length;return I}function f(y){return y&&y._jsonata_lambda===!0}var k=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function E(y){return typeof y=="object"&&y!==null&&k in y&&"next"in y&&typeof y.next=="function"}function O(y,I){if(y===I)return!0;if(typeof y=="object"&&typeof I=="object"&&y!==null&&I!==null){if(Array.isArray(y)&&Array.isArray(I)){if(y.length!==I.length)return!1;for(var C=0;C<y.length;C++)if(!O(y[C],I[C]))return!1;return!0}var D=Object.getOwnPropertyNames(y),Y=Object.getOwnPropertyNames(I);if(D.length!==Y.length)return!1;for(D=D.sort(),Y=Y.sort(),C=0;C<D.length;C++)if(D[C]!==Y[C])return!1;for(C=0;C<D.length;C++){var j=D[C];if(!O(y[j],I[j]))return!1}return!0}return!1}function z(y){return typeof y=="object"&&y!==null&&"then"in y&&typeof y.then=="function"}function B(y){var I=[];for(let C of y)I.push(C);return I}function S(y){return typeof y=="object"&&y!==null?Object.keys(y):[]}return{isNumeric:o,isArrayOfStrings:c,isArrayOfNumbers:d,isSequence:m,isFunction:A,isLambda:f,isIterable:E,getFunctionArity:g,isDeepEqual:O,stringToArray:B,isPromise:z,keys:S}})();i.exports=n},{}]},{},[3])(3)})})(On)),On.exports}var ih=rh();const nh=ta(ih);function oh(t){t.registerFunction("ucFirst",e=>Mr.ucFirst(String(e??""))),t.registerFunction("currency",(e,s="fr-FR",i="EUR")=>{const r=Number(e);return Number.isNaN(r)?String(e??""):new Intl.NumberFormat(String(s),{style:"currency",currency:String(i)}).format(r)}),t.registerFunction("percent",(e,s="fr-FR",i=0)=>{const r=Number(e);return Number.isNaN(r)?String(e??""):new Intl.NumberFormat(String(s),{style:"percent",maximumFractionDigits:Number(i)||0}).format(r)}),t.registerFunction("date",(e,s="fr-FR",i)=>{const r=e instanceof Date?e:new Date(String(e));if(Number.isNaN(r.getTime()))return String(e??"");let n={dateStyle:"medium"};if(i)try{n=JSON.parse(String(i))}catch{}return new Intl.DateTimeFormat(String(s),n).format(r)}),t.registerFunction("toChart",(e,s="label",i="value",r="")=>{const n=Array.isArray(e)?e:[],o=[],c=[];for(const d of n){if(!d||typeof d!="object")continue;const m=d;o.push(String(m[String(s)]??"")),c.push(Number(m[String(i)]??0))}return{labels:o,datasets:[{label:String(r||""),data:c}]}})}const ia=new Map,na=8e3;function ah(t){if(!t||!t.trim())throw new Error("[sonic-jsonata] expression vide.");if(t.length>na)throw new Error(`[sonic-jsonata] expression trop longue (${t.length} > ${na}).`);const e=ia.get(t);if(e)return e;try{const s=nh(t);return oh(s),ia.set(t,s),s}catch(s){const i=s instanceof Error?s.message:typeof s=="object"&&s&&"message"in s?String(s.message):String(s);throw new Error(`[sonic-jsonata] Syntaxe JSONata invalide : ${i}`)}}function lh(t,e){if(!e||typeof e!="object")return;const s=e.type;if(typeof s=="string"&&!(s==="array"&&Array.isArray(t)||s==="object"&&t!==null&&typeof t=="object"&&!Array.isArray(t)||s==="string"&&typeof t=="string"||s==="number"&&typeof t=="number"||s==="boolean"&&typeof t=="boolean"||s==="null"&&t===null))throw new Error(`[sonic-jsonata] outputSchema : type attendu "${s}", reçu ${ch(t)}.`);if(Array.isArray(e.required)&&t&&typeof t=="object"){const i=t;for(const r of e.required)if(typeof r=="string"&&!(r in i))throw new Error(`[sonic-jsonata] outputSchema : propriété requise manquante "${r}".`)}}function ch(t){return t===null?"null":Array.isArray(t)?"array":typeof t}const hh=150,oa=10,uh=200,dh=16,aa=new WeakMap;let la=!1;function ms(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function vr(t){if(t===window)return{x:window.scrollX,y:window.scrollY};const e=t;return{x:e.scrollLeft,y:e.scrollTop}}function ph(t,e,s){if(t===window){window.scrollTo(e,s);return}const i=t;typeof i.scrollTo=="function"?i.scrollTo(e,s):(i.scrollLeft=e,i.scrollTop=s)}function fh(t){if(t===window){const s=document.documentElement;return Math.max(0,s.scrollHeight-window.innerHeight)}const e=t;return Math.max(0,e.scrollHeight-e.clientHeight)}function Zs(t){let e=aa.get(t);if(!e){const s=vr(t);e={x:s.x,y:s.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},aa.set(t,e)}return e}function Mi(t){Zs(t).userEngaged=!0}function Ii(t){const e=Zs(t);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},hh)}function ca(t,e){return e-t>=uh}function yr(t){if(!ms())return;const e=Zs(t);if(e.restoring)return;const s=vr(t);if(ca(s.y,e.y)){Ln(t);return}e.x=s.x,e.y=s.y}function Tn(t){if(!ms())return;const e=Zs(t),s=fh(t),i=e.x,r=s>0?Math.min(e.y,s):e.y,{x:n,y:o}=vr(t);if(!(Math.abs(i-n)<=oa&&Math.abs(r-o)<=oa)){e.restoring=!0;try{ph(t,i,r)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function gh(t,e={x:0,y:0}){if(!ms())return;const s=Zs(t);if(e==="current"){const i=vr(t);s.x=i.x,s.y=i.y;return}s.x=e.x??0,s.y=e.y??0}function Ln(t){const e=Zs(t);if(e.stickyFrames=dh,e.raf)return;const s=()=>{e.raf=0,Tn(t),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(s))};e.raf=requestAnimationFrame(s)}function Mn(t){Ln(t)}function Js(t){if(!ms())return;const e=Zs(t);if(e.watching)return;e.watching=!0;const s=t===window?window:t,i=()=>{if(e.restoring)return;const{y:E}=vr(t);if(ca(E,e.y)){Ln(t);return}if(e.userEngaged){yr(t),Ii(t);return}yr(t)},r=E=>ha(E)===t,n=E=>{r(E)&&(yr(t),Mi(t))},o=E=>{r(E)&&Ii(t)},c=E=>{r(E)&&(yr(t),Mi(t),Ii(t))};s.addEventListener("scroll",i,{passive:!0}),s.addEventListener("touchstart",n,{passive:!0}),s.addEventListener("touchend",o,{passive:!0}),s.addEventListener("touchcancel",o,{passive:!0}),s.addEventListener("wheel",c,{passive:!0}),s.addEventListener("pointerdown",n,{passive:!0}),s.addEventListener("pointerup",o,{passive:!0}),s.addEventListener("pointercancel",o,{passive:!0});const d=vr(t);if(e.x=d.x,e.y=d.y,t===window){const E=new ResizeObserver(()=>Mn(window));E.observe(document.documentElement),e.resizeObserver=E;return}const m=t,A=new ResizeObserver(()=>Mn(m));A.observe(m);for(const E of Array.from(m.children))A.observe(E);e.resizeObserver=A;const g=()=>Mn(m),f=new MutationObserver(E=>{for(const O of E)if(O.type==="childList")for(const z of Array.from(O.addedNodes))z instanceof Element&&A.observe(z);g()});f.observe(m,{childList:!0,subtree:!0,characterData:!0});const k=m.getRootNode();k instanceof ShadowRoot&&k.host&&f.observe(k.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=f}function ha(t){for(const e of t.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&ua(e))return e;return window}function ua(t){if(!(t instanceof HTMLElement)||t===document.documentElement||t===document.body)return!1;const e=getComputedStyle(t).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function In(t){for(const s of t.composedPath())s===window||s===document||s instanceof HTMLElement&&ua(s)&&Js(s);const e=ha(t);Js(e),t.type==="wheel"?(yr(e),Mi(e),Ii(e)):(t.type==="touchstart"||t.type==="pointerdown")&&(yr(e),Mi(e))}function Ni(t){t instanceof Element&&t.classList?.contains("custom-scroll")&&Js(t),t.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&Js(e)})}function Nn(t){Ni(t),new MutationObserver(s=>{for(const i of s)for(const r of Array.from(i.addedNodes))r instanceof Element&&Ni(r)}).observe(t,{childList:!0,subtree:!0})}function Fn(t){t.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(Nn(e.shadowRoot),Fn(e.shadowRoot))})}function mh(){const t=Element.prototype;if(t.__safariScrollGuardPatched)return;t.__safariScrollGuardPatched=!0;const e=t.attachShadow;t.attachShadow=function(i){const r=e.call(this,i);return Nn(r),r}}function da(){if(typeof window>"u"||la||(la=!0,!ms()))return;Js(window),mh();const t={capture:!0,passive:!0};window.addEventListener("wheel",In,t),window.addEventListener("touchstart",In,t),window.addEventListener("pointerdown",In,t);const e=()=>{Ni(document),Fn(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(i=>{for(const r of i)for(const n of Array.from(r.addedNodes))n instanceof Element&&(Ni(n),n.shadowRoot&&Nn(n.shadowRoot),Fn(n))}).observe(document.documentElement,{childList:!0,subtree:!0})}const bh=Bl,vh=Bc,yh=wi,wh=Mr,bs=ze,_h=ht,Wr=lt,Sh=Os,Ph=gs;da(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:bh,Arrays:vh,DataBindObserver:yh,Format:wh,HTML:bs,LocationHandler:_h,Objects:Wr,PublisherManager:ve,api:Sh,URLPattern:Ph,Endpoint:Di,DataProviderKey:ks};var xh=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,Kr=(t,e,s,i)=>{for(var r=i>1?void 0:i?Ah(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&xh(e,s,r),r};const Rn=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{const i=this.getAttribute("name"),r=this.getCheckAllPublisher(),n=this.getFormPublisher();if(r?.hasCheckAll.get()&&!this.checksAll()&&r&&n&&i){if(this.getFormPublisherValue()?.length)(this.checked===null||r.checkMode.get()=="noneChecked"||r.checkMode.get()==null)&&r.checkMode.set("someUnchecked");else{r.checkMode.set("noneChecked");return}const o=this.getFormPublisherValue(),c=r.values.get();if(c&&c.length){let d=c.length;for(const m of c)o.indexOf(m)==-1&&(d-=1);d==c.length&&r.checkMode.set("allChecked"),d==0&&r.checkMode.set("noneChecked")}c.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(this.checked=null)}},this.onChecksAllRequest=i=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),i=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),i=="noneChecked"&&(this.checked=null),i=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(i){if(this.value==i||(this.hasAttribute("value")&&!this.forceAutoFill&&(i=this.getAttribute("value")),this._value==i)||i==null||(this._value=i,!this.value))return;if(this.getFormPublisher()&&this.name){let n=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=n==i?!0:null),Array.isArray(n)||(n=[]),n.indexOf(i)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(i){if(this.setCheckedValue(i),this.checksAll()){const r=this.getCheckAllPublisher();r&&(this.checked===!0?r.checkMode.set("allChecked"):this.checked===null&&(r.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const i=this.shadowRoot?.querySelector("input");if(!i||i.checkValidity())return;const r=this.getFormPublisher();if(r){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;r.isFormValid=!1,i.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(i){this._checked!=i&&(this._checked=i,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const i=this.checked===!0?this.radio?!0:null:!0;this.checked=i;const r=new Event("change");this.dispatchEvent(r)}getValueForFormPublisher(){let i=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:i;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(i)||(i=[]);const r=i.slice(0),n=r.indexOf(this.value);return this.checked===!0&&n===-1&&!this.checksAll()&&r.push(this.value),this.checked===null&&n!==-1&&r.splice(n,1),r}setFormValueFromPublisher(i){if(this.unique||this.radio){this.checked=this.value==i?!0:null;return}Array.isArray(i)||(i=[]),!this.checksAll()&&(this.checked=i.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const i=this.formDataProvider,r=this.getAttribute("name");return!i||!r?null:ve.get(i+"/"+r+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const i=this.getCheckAllPublisher();if(i&&(i.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const r=i.values.get().slice(0),n=r.indexOf(this.value);n!=-1&&(r.splice(n,1),i.values.set(r))}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const n=this.getFormPublisherValue();n&&Array.isArray(n)&&n.indexOf(this.value)!==-1&&(this.checked=!0)}const r=this.getCheckAllPublisher();r&&(r.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&r.hasCheckAll.set(!0),r.values.get()||r.values.set([]),this.checksAll()||r.values.set([...r.values.get(),this.value])),this.hasAttribute("checked")&&setTimeout(()=>this.checked=!0,1)}}return Kr([h()],e.prototype,"value",1),Kr([h()],e.prototype,"forceAutoFill",2),Kr([h({type:Boolean})],e.prototype,"unique",2),Kr([h({type:Boolean})],e.prototype,"radio",2),Kr([h()],e.prototype,"checked",1),e};/**
72
+ */const sa="important",Bc=" !"+sa,$t=Es(class extends mr{constructor(t){if(super(t),t.type!==Ys.ATTRIBUTE||t.name!=="style"||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const r=t[s];return r==null?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:s}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?s.removeProperty(r):s[r]=null);for(const r in e){const i=e[r];if(i!=null){this.ft.add(r);const n=typeof i=="string"&&i.endsWith(Bc);r.includes("-")||n?s.setProperty(r,n?i.slice(0,-11):i,n?sa:""):s[r]=i}}return Rt}});var Vc=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,Zt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Wc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Vc(e,s,i),i};const Di=new Map,br=t=>{class e extends t{constructor(...r){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,this.ariaLabel=null,this.ariaLabelledby=null,this.formDataProvider="",this._name="",this._value="",this.onFormValueAssign=async i=>{this.setFormValueFromPublisher(i)},this.onFormDataInValidate=()=>{const i=this.getFormPublisher();i&&i.isFormValid.get()&&this.validateFormElement()}}hasAncestorAttribute(r){return ze.getAncestorAttributeValue(this,r)!=null}getAncestorAttributeValue(r){return ze.getAncestorAttributeValue(this,r)||""}get name(){return this._name}set name(r){this.hasAttribute("name")&&!this.forceAutoFill&&(r=this.getAttribute("name")),this._name=r,this.requestUpdate()}validateFormElement(){}unsetOnDisconnect(){return this.hasAttribute("unsetOnDisconnect")}updateDataValue(){this.getAttribute("name")&&this.getFormPublisher()&&(this.setFormPublisherValue(this.getValueForFormPublisher()),this.setFormValueFromPublisher(this.getFormPublisherValue()))}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")||""),this.formDataProvider?ve.get(this.formDataProvider):null}setFormPublisherValue(r){const i=this.getFormPublisher();i&&qt(i,this.name).set(r)}getFormPublisherValue(){const r=this.getFormPublisher();return r?qt(r,this.name).get():null}getValueForFormPublisher(){return this.value}setFormValueFromPublisher(r){this.value=r}get value(){return this._value}set value(r){r==null&&(r=""),ht.isObject(r)&&Object.prototype.hasOwnProperty.call(r,"__value")&&r._value==null&&(r=""),this._value!=r&&(this._value=r,this.updateDataValue(),this.requestUpdate())}initFormPublisher(){let r=this.getFormPublisher();const i=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&r&&qt(r,this._name).offAssign(this.onFormValueAssign),this.name||(this._name=this.getAttribute("name")||""),this.value||(this._value=this.getAttribute("value")),r=this.getFormPublisher(),this._name&&r&&(qt(r,this._name).onAssign(this.onFormValueAssign),r.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),i&&(this.value=i)}handleBlur(){this.touched=!0}handleChange(r){this.value=r.target.value;const i=new Event("change");this.dispatchEvent(i)}addKeyboardNavigation(){const r=this.getAncestorAttributeValue("data-keyboard-nav")||"";if(!r)return;const i=r.split(" "),n=i[0];if(!n)return;for(const c of i){Di.has(c)||Di.set(c,[]);const d=Di.get(c);d?.indexOf(this)==-1&&d.push(this)}const o=Di.get(n);this.addEventListener("keydown",c=>{const d=c;if(!["ArrowDown","ArrowUp"].includes(d.key))return;const g="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",A=o?.filter(k=>{const E=k.shadowRoot?.querySelector(g);if(!E)return!1;const O=window.getComputedStyle(E);return O.display!=="none"&&O.display!==""&&O.pointerEvents!="none"&&O.visibility!=="hidden"&&E.getBoundingClientRect().width>0});let m=null;if(d.key=="ArrowDown"&&A){const k=A.indexOf(this);k==A.length-1?m=A[0]:m=A[k+1]}else if(d.key=="ArrowUp"&&A){const k=A.indexOf(this);k==0?m=A[A.length-1]:m=A[k-1]}const f=m?.shadowRoot?.querySelector(g);f&&f.focus&&(f.focus(),c.preventDefault(),c.stopPropagation())})}focus(){this.shadowRoot?.querySelector("[data-form-element], button")?.focus()}connectedCallback(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")||""),super.connectedCallback(),this.initFormPublisher(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback();const r=this.getFormPublisher();this._name&&r&&(qt(r,this._name).offAssign(this.onFormValueAssign),r.offFormInvalidate(this.onFormDataInValidate))}}return Zt([h({type:Boolean,reflect:!0})],e.prototype,"touched",2),Zt([h({type:Boolean})],e.prototype,"error",2),Zt([h({type:Boolean})],e.prototype,"autofocus",2),Zt([h({type:Boolean})],e.prototype,"required",2),Zt([h({type:Boolean})],e.prototype,"forceAutoFill",2),Zt([h({type:Boolean,reflect:!0})],e.prototype,"disabled",2),Zt([h({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),Zt([h({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),Zt([h({type:String})],e.prototype,"formDataProvider",2),Zt([h()],e.prototype,"name",1),Zt([h()],e.prototype,"value",1),e};let Kc=class hr{static areEqual(e,s){return e.length===s.length?e.every((r,i)=>r===s[i]):!1}static from2d(e){return{to1D:()=>{let s=[];return e.forEach(r=>s=s.concat(r)),this.from(s)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(e.length<1)return!0;const r=(e[0]||{})[s];return e.every(i=>(i||{})[s]==r)}})})}),value:()=>({forKey:s=>hr.from(e.map(r=>r[s]))}),copy:()=>({fromKey:s=>({toKey:r=>{e.forEach(i=>{i[r]=Array.isArray(i[s])?[...i[s]]:typeof i[s]=="object"&&i[s]!=null?{...i[s]}:i[s]})}})})}),map:s=>hr.from(e.map(s)),filter:s=>hr.from(e.filter(s)),find:s=>e.find(s),some:s=>e.some(s),every:s=>e.every(s),group:()=>({byKey:s=>{const r=[],i=new Map;for(const n of e){const o=n[s];if(!i.has(o)){const c=r.length;i.set(o,c);const d={items:[]};d[s]=o,r.push(d)}r[i.get(o)].items.push(n)}return hr.from(r)}}),without:()=>({duplicates:()=>({forKey:s=>{const r=[...new Set(e.map(i=>i[s]))];return hr.from(r.map(i=>e.find(n=>n[s]==i)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:r=>{const i=(n,o)=>c=>n[o]!=c[o];return hr.from(e.filter(n=>s.every(i(n,r))))}})})})}}};var ra=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ia(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Vr={exports:{}},Gc=Vr.exports,na;function Yc(){return na||(na=1,(function(t,e){var s=[].slice;(function(r,i){return e!==null?t.exports=i():r.UrlPattern=i()})(Gc,function(){var r,i,n,o,c,d,g,A,m,f,k,E,O,z,H;return m=function(S){return S.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},g=function(S,y){var I,C,D;for(D=[],I=-1,C=S.length;++I<C;)D=D.concat(y(S[I]));return D},z=function(S,y){var I,C,D;for(D="",I=-1,C=S.length;++I<C;)D+=y(S[I]);return D},O=function(S){return new RegExp(S.toString()+"|").exec("").length-1},k=function(S,y){var I,C,D,Y,j;for(Y={},I=-1,D=S.length;++I<D;)C=S[I],j=y[I],j!=null&&(Y[C]!=null?(Array.isArray(Y[C])||(Y[C]=[Y[C]]),Y[C].push(j)):Y[C]=j);return Y},r={},r.Result=function(S,y){this.value=S,this.rest=y},r.Tagged=function(S,y){this.tag=S,this.value=y},r.tag=function(S,y){return function(I){var C,D;if(C=y(I),C!=null)return D=new r.Tagged(S,C.value),new r.Result(D,C.rest)}},r.regex=function(S){return function(y){var I,C;if(I=S.exec(y),I!=null)return C=I[0],new r.Result(C,y.slice(C.length))}},r.sequence=function(){var S;return S=1<=arguments.length?s.call(arguments,0):[],function(y){var I,C,D,Y,j,ne;for(I=-1,C=S.length,ne=[],Y=y;++I<C;){if(D=S[I],j=D(Y),j==null)return;ne.push(j.value),Y=j.rest}return new r.Result(ne,Y)}},r.pick=function(){var S,y;return S=arguments[0],y=2<=arguments.length?s.call(arguments,1):[],function(I){var C,D;if(D=r.sequence.apply(r,y)(I),D!=null)return C=D.value,D.value=C[S],D}},r.string=function(S){var y;return y=S.length,function(I){if(I.slice(0,y)===S)return new r.Result(S,I.slice(y))}},r.lazy=function(S){var y;return y=null,function(I){return y==null&&(y=S()),y(I)}},r.baseMany=function(S,y,I,C,D){var Y,j,ne,re;for(ne=D,re=I?"":[];!(y!=null&&(Y=y(ne),Y!=null)||(j=S(ne),j==null));)I?re+=j.value:re.push(j.value),ne=j.rest;if(!(C&&re.length===0))return new r.Result(re,ne)},r.many1=function(S){return function(y){return r.baseMany(S,null,!1,!0,y)}},r.concatMany1Till=function(S,y){return function(I){return r.baseMany(S,y,!0,!0,I)}},r.firstChoice=function(){var S;return S=1<=arguments.length?s.call(arguments,0):[],function(y){var I,C,D,Y;for(I=-1,C=S.length;++I<C;)if(D=S[I],Y=D(y),Y!=null)return Y}},E=function(S){var y;return y={},y.wildcard=r.tag("wildcard",r.string(S.wildcardChar)),y.optional=r.tag("optional",r.pick(1,r.string(S.optionalSegmentStartChar),r.lazy(function(){return y.pattern}),r.string(S.optionalSegmentEndChar))),y.name=r.regex(new RegExp("^["+S.segmentNameCharset+"]+")),y.named=r.tag("named",r.pick(1,r.string(S.segmentNameStartChar),r.lazy(function(){return y.name}))),y.escapedChar=r.pick(1,r.string(S.escapeChar),r.regex(/^./)),y.static=r.tag("static",r.concatMany1Till(r.firstChoice(r.lazy(function(){return y.escapedChar}),r.regex(/^./)),r.firstChoice(r.string(S.segmentNameStartChar),r.string(S.optionalSegmentStartChar),r.string(S.optionalSegmentEndChar),y.wildcard))),y.token=r.lazy(function(){return r.firstChoice(y.wildcard,y.optional,y.named,y.static)}),y.pattern=r.many1(r.lazy(function(){return y.token})),y},A={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},d=function(S,y){if(Array.isArray(S))return z(S,function(I){return d(I,y)});switch(S.tag){case"wildcard":return"(.*?)";case"named":return"(["+y+"]+)";case"static":return m(S.value);case"optional":return"(?:"+d(S.value,y)+")?"}},c=function(S,y){return y==null&&(y=A.segmentValueCharset),"^"+d(S,y)+"$"},o=function(S){if(Array.isArray(S))return g(S,o);switch(S.tag){case"wildcard":return["_"];case"named":return[S.value];case"static":return[];case"optional":return o(S.value)}},f=function(S,y,I,C){var D,Y,j,ne;if(C==null&&(C=!1),ne=S[y],ne==null){if(C)throw new Error("no values provided for key `"+y+"`");return}if(D=I[y]||0,Y=Array.isArray(ne)?ne.length-1:0,D>Y){if(C)throw new Error("too few values provided for key `"+y+"`");return}return j=Array.isArray(ne)?ne[D]:ne,C&&(I[y]=D+1),j},n=function(S,y,I){var C,D;if(Array.isArray(S)){for(C=-1,D=S.length;++C<D;)if(n(S[C],y,I))return!0;return!1}switch(S.tag){case"wildcard":return f(y,"_",I,!1)!=null;case"named":return f(y,S.value,I,!1)!=null;case"static":return!1;case"optional":return n(S.value,y,I)}},H=function(S,y,I){if(Array.isArray(S))return z(S,function(C){return H(C,y,I)});switch(S.tag){case"wildcard":return f(y,"_",I,!0);case"named":return f(y,S.value,I,!0);case"static":return S.value;case"optional":return n(S.value,y,I)?H(S.value,y,I):""}},i=function(S,y){var I,C,D,Y,j;if(S instanceof i){this.isRegex=S.isRegex,this.regex=S.regex,this.ast=S.ast,this.names=S.names;return}if(this.isRegex=S instanceof RegExp,!(typeof S=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=S,y!=null){if(!Array.isArray(y))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(I=O(this.regex),y.length!==I)throw new Error("regex contains "+I+" groups but array of group names contains "+y.length);this.names=y}return}if(S==="")throw new Error("argument must not be the empty string");if(j=S.replace(/\s+/g,""),j!==S)throw new Error("argument must not contain whitespace");if(C={escapeChar:y?.escapeChar||A.escapeChar,segmentNameStartChar:y?.segmentNameStartChar||A.segmentNameStartChar,segmentNameCharset:y?.segmentNameCharset||A.segmentNameCharset,segmentValueCharset:y?.segmentValueCharset||A.segmentValueCharset,optionalSegmentStartChar:y?.optionalSegmentStartChar||A.optionalSegmentStartChar,optionalSegmentEndChar:y?.optionalSegmentEndChar||A.optionalSegmentEndChar,wildcardChar:y?.wildcardChar||A.wildcardChar},Y=E(C),D=Y.pattern(S),D==null)throw new Error("couldn't parse pattern");if(D.rest!=="")throw new Error("could only partially parse pattern");this.ast=D.value,this.regex=new RegExp(c(this.ast,C.segmentValueCharset)),this.names=o(this.ast)},i.prototype.match=function(S){var y,I;return I=this.regex.exec(S),I==null?null:(y=I.slice(1),this.names?k(this.names,y):y)},i.prototype.stringify=function(S){if(S==null&&(S={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(S!==Object(S))throw new Error("argument must be an object or undefined");return H(this.ast,S,{})},i.escapeForRegex=m,i.concatMap=g,i.stringConcatMap=z,i.regexGroupCount=O,i.keysAndValuesToObject=k,i.P=r,i.newParser=E,i.defaultOptions=A,i.astNodeToRegexString=c,i.astNodeToNames=o,i.getParam=f,i.astNodeContainsSegmentsForProvidedParams=n,i.stringify=H,i})})(Vr,Vr.exports)),Vr.exports}var Zc=Yc();const fs=ia(Zc);class Ei{constructor(e){this.path=Ei.normalizePath(e)}getDataProviderKey(){return new Cs(this.path)}static normalizePath(e){const s=String(e).trim();if(!s)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(s)){let d;try{d=new URL(s)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return d.pathname=d.pathname.replace(/\/+/g,"/"),d.href}const r=s.indexOf("?"),i=s.indexOf("#");let n=s.length;r>=0&&(n=Math.min(n,r)),i>=0&&(n=Math.min(n,i));let o=s.slice(0,n);const c=s.slice(n);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&c)throw new RangeError("Endpoint: path cannot be empty");return o+c}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}const Jc=50,Qc=1e4,Xc=100,Mn=new Map;function Oi(t){return fi(t)}function Wr(t){return t.split(".")[0]??t}function Ti(t){const e=t.split("."),s=e.shift();let r=ve.get(s);return e.length&&(r=ht.traverse(r,e)),r}function eh(t){return t==null?!0:Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t.length===0:!1}function th(t){return Array.isArray(t)?t.length:0}function sh(t,e){for(const o of e)if(o===t||t.startsWith(o+".")||o.startsWith(t+"."))throw new Error(`[derive] Cycle détecté : la sortie "${t}" chevauche l'entrée "${o}".`);const s=Wr(t),r=new Map;for(const[o,c]of Mn)r.set(Wr(o),new Set(c));r.set(s,new Set(e.map(Wr)));const i=new Set,n=o=>{if(i.has(o))return!0;i.add(o);for(const c of r.get(o)??[])if(n(c))return!0;return i.delete(o),!1};if(n(s))throw new Error(`[derive] Cycle détecté (chaîne) : la sortie "${t}" dépend indirectement d'elle-même.`)}function rh(t,e){Mn.set(t,new Set(e.map(s=>Wr(s))))}function ih(t){Mn.delete(t)}function nh(t){return`${Wr(Oi(t))}/_state_`}function Li(t,e){const s=nh(t);ve.get(s).set(e)}function oh(t,e,s,r){const i=typeof t.compute=="function"?t:{inputs:t,compute:e,output:s,variables:r},n=i.debounceMs??Jc,o=i.maxInputItems??Qc,c=i.isEmpty??eh,d=Oi(i.output),g=Object.entries(i.inputs).map(([ie,U])=>({alias:ie,path:Oi(U)})),A=g.map(ie=>ie.path),m=i.variables?Oi(i.variables):null;sh(d,A),rh(d,A);const f=Ti(d);let k,E=!1,O=0,z=null,H=!1,S="";const y=ie=>{E=!0,k=ie,f.set(ie),E=!1},I=()=>{E||H||(typeof console<"u"&&console.warn&&console.warn(`[derive] Écriture ignorée sur la sortie readonly "${d}".`),k!==void 0&&(E=!0,f.set(k),E=!1))};f.onAssign(I,!1);const C=()=>{const ie={};for(const{alias:U,path:le}of g){const pe=Ti(le).get(),He=th(pe);He>o&&typeof console<"u"&&console.warn&&console.warn(`[derive] Entrée "${le}" : ${He} éléments (> ${o}). Agrégation lourde — envisager un plafond côté fetch.`),ie[U]=pe}return ie},D=()=>m?Ti(m).get()??{}:{},Y=async()=>{if(H)return;const ie=++O;Li(d,{status:"loading",error:null});const U=C(),le=D(),pe=JSON.stringify({inputs:U,vars:le});if(pe===S&&k!==void 0){Li(d,{status:c(k)?"empty":"ready",error:null});return}const He=typeof performance<"u"?performance.now():Date.now();try{const he=await Promise.resolve(i.compute(U,le));if(H||ie!==O)return;const ge=(typeof performance<"u"?performance.now():Date.now())-He;ge>Xc&&typeof console<"u"&&console.warn&&console.warn(`[derive] Évaluation longue (${Math.round(ge)} ms) → "${d}".`),S=pe,y(he),Li(d,{status:c(he)?"empty":"ready",error:null})}catch(he){if(H||ie!==O)return;const ge=he instanceof Error?he.message:String(he);typeof console<"u"&&console.error&&console.error(`[derive] Erreur sur "${d}" :`,ge),Li(d,{status:"error",error:ge})}},j=()=>{H||(z&&clearTimeout(z),z=setTimeout(()=>{z=null,Y()},n))},ne=[],re=ie=>{const U=Ti(ie),le=()=>j();U.onInternalMutation(le),ne.push({pub:U,handler:le})};for(const{path:ie}of g)re(ie);return m&&re(m),j(),{stop(){if(!H){H=!0,z&&clearTimeout(z);for(const{pub:ie,handler:U}of ne)ie.offInternalMutation(U);f.offAssign(I),ih(d)}},recompute(){S="",Y()}}}function Mi(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var In={exports:{}},oa;function ah(){return oa||(oa=1,(function(t,e){(function(s){t.exports=s()})(function(){return(function(){function s(r,i,n){function o(g,A){if(!i[g]){if(!r[g]){var m=typeof Mi=="function"&&Mi;if(!A&&m)return m(g,!0);if(c)return c(g,!0);var f=new Error("Cannot find module '"+g+"'");throw f.code="MODULE_NOT_FOUND",f}var k=i[g]={exports:{}};r[g][0].call(k.exports,function(E){var O=r[g][1][E];return o(O||E)},k,k.exports,s,r,i,n)}return i[g].exports}for(var c=typeof Mi=="function"&&Mi,d=0;d<n.length;d++)o(n[d]);return o}return s})()({1:[function(s,r,i){const n=s("./utils"),o=(function(){const c=n.stringToArray,d=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],g=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],A=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],m=["Thousand","Million","Billion","Trillion"];function f(T,M){var $=function(q,V,N){var G="";if(q<=19)G=(V?" and ":"")+(N?g[q]:d[q]);else if(q<100){const Ce=Math.floor(q/10),me=q%10;G=(V?" and ":"")+A[Ce-2],me>0?G+="-"+$(me,!1,N):N&&(G=G.substring(0,G.length-1)+"ieth")}else if(q<1e3){const Ce=Math.floor(q/100),me=q%100;G=(V?", ":"")+d[Ce]+" Hundred",me>0?G+=$(me,!0,N):N&&(G+="th")}else{var ae=Math.floor(Math.log10(q)/3);ae>m.length&&(ae=m.length);const Ce=Math.pow(10,ae*3),me=Math.floor(q/Ce),fe=q-me*Ce;G=(V?", ":"")+$(me,!1,!1)+" "+m[ae-1],fe>0?G+=$(fe,!0,N):N&&(G+="th")}return G},F=$(T,!1,M);return F}const k=Object.create(null);d.forEach(function(T,M){k[T.toLowerCase()]=M}),g.forEach(function(T,M){k[T.toLowerCase()]=M}),A.forEach(function(T,M){const $=T.toLowerCase();k[$]=(M+2)*10,k[$.substring(0,T.length-1)+"ieth"]=k[$]}),k.hundredth=100,m.forEach(function(T,M){const $=T.toLowerCase(),F=Math.pow(10,(M+1)*3);k[$]=F,k[$+"th"]=F});function E(T){const $=T.split(/,\s|\sand\s|[\s\\-]/).map(V=>k[V]);let F=[0];return $.forEach(V=>{if(V<100){let N=F.pop();N>=1e3&&(F.push(N),N=0),F.push(N+V)}else F.push(F.pop()*V)}),F.reduce((V,N)=>V+N,0)}const O=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],z={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function H(T){for(var M=0;M<O.length;M++){const $=O[M];if(T>=$[0])return $[1]+H(T-$[0])}return""}function S(T){for(var M=0,$=1,F=T.length-1;F>=0;F--){const q=T[F],V=z[q];V<$?M-=V:($=V,M+=V)}return M}function y(T,M){for(var $=[],F=M.charCodeAt(0);T>0;)$.unshift(String.fromCharCode((T-1)%26+F)),T=Math.floor((T-1)/26);return $.join("")}function I(T,M){for(var $=M.charCodeAt(0),F=0,q=0;q<T.length;q++)F+=(T.charCodeAt(T.length-q-1)-$+1)*Math.pow(26,q);return F}function C(T,M){if(typeof T>"u")return;T=Math.floor(T);const $=re(M);return j(T,$)}const D={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},Y={UPPER:"upper",LOWER:"lower",TITLE:"title"};function j(T,M){let $;const F=T<0;switch(T=Math.abs(T),M.primary){case D.LETTERS:$=y(T,M.case===Y.UPPER?"A":"a");break;case D.ROMAN:$=H(T),M.case===Y.UPPER&&($=$.toUpperCase());break;case D.WORDS:$=f(T,M.ordinal),M.case===Y.UPPER?$=$.toUpperCase():M.case===Y.LOWER&&($=$.toLowerCase());break;case D.DECIMAL:$=""+T;var q=M.mandatoryDigits-$.length;if(q>0){var V=new Array(q+1).join("0");$=V+$}if(M.zeroCode!==48&&($=c($).map(Ce=>String.fromCodePoint(Ce.codePointAt(0)+M.zeroCode-48)).join("")),M.regular){const Ce=Math.floor(($.length-1)/M.groupingSeparators.position);for(let me=Ce;me>0;me--){const fe=$.length-me*M.groupingSeparators.position;$=$.substr(0,fe)+M.groupingSeparators.character+$.substr(fe)}}else M.groupingSeparators.reverse().forEach(Ce=>{const me=$.length-Ce.position;$=$.substr(0,me)+Ce.character+$.substr(me)});if(M.ordinal){var N={1:"st",2:"nd",3:"rd"},G=$[$.length-1],ae=N[G];(!ae||$.length>1&&$[$.length-2]==="1")&&(ae="th"),$=$+ae}break;case D.SEQUENCE:throw{code:"D3130",value:M.token}}return F&&($="-"+$),$}const ne=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function re(T){const M={type:"integer",primary:D.DECIMAL,case:Y.LOWER,ordinal:!1};let $,F;const q=T.lastIndexOf(";");switch(q===-1?$=T:($=T.substring(0,q),F=T.substring(q+1),F[0]==="o"&&(M.ordinal=!0)),$){case"A":M.case=Y.UPPER;case"a":M.primary=D.LETTERS;break;case"I":M.case=Y.UPPER;case"i":M.primary=D.ROMAN;break;case"W":M.case=Y.UPPER,M.primary=D.WORDS;break;case"Ww":M.case=Y.TITLE,M.primary=D.WORDS;break;case"w":M.primary=D.WORDS;break;default:{let V=null,N=0,G=0,ae=[],Ce=0;if(c($).map(fe=>fe.codePointAt(0)).reverse().forEach(fe=>{let ue=!1;for(let De=0;De<ne.length;De++){const de=ne[De];if(fe>=de&&fe<=de+9){if(ue=!0,N++,Ce++,V===null)V=de;else if(de!==V)throw{code:"D3131"};break}}ue||(fe===35?(Ce++,G++):ae.push({position:Ce,character:String.fromCodePoint(fe)}))}),N>0){M.primary=D.DECIMAL,M.zeroCode=V,M.mandatoryDigits=N,M.optionalDigits=G;const ue=function(De){if(De.length===0)return 0;const de=De[0].character;for(let it=1;it<De.length;it++)if(De[it].character!==de)return 0;const mt=De.map(it=>it.position),Gt=function(it,Pt){return Pt===0?it:Gt(Pt,it%Pt)},St=mt.reduce(Gt);for(let it=1;it<=mt.length;it++)if(mt.indexOf(it*St)===-1)return 0;return St}(ae);ue>0?(M.regular=!0,M.groupingSeparators={position:ue,character:ae[0].character}):(M.regular=!1,M.groupingSeparators=ae)}else M.primary=D.SEQUENCE,M.token=$}}return M}const ie={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function U(T){var M=[];const $={type:"datetime",parts:M},F=function(ue,De){if(De>ue){let de=T.substring(ue,De);de=de.split("]]").join("]"),M.push({type:"literal",value:de})}};for(var q=0,V=0;V<T.length;){if(T.charAt(V)==="["){if(T.charAt(V+1)==="["){F(q,V),M.push({type:"literal",value:"["}),V+=2,q=V;continue}if(F(q,V),q=V,V=T.indexOf("]",q),V===-1)throw{code:"D3135"};let ue=T.substring(q+1,V);ue=ue.split(/\s+/).join("");var N={type:"marker",component:ue.charAt(0)},G=ue.lastIndexOf(","),ae;if(G!==-1){const De=ue.substring(G+1),de=De.indexOf("-");let mt,Gt;const St=function(Pt){if(!(typeof Pt>"u"||Pt==="*"))return parseInt(Pt)};de===-1?mt=De:(mt=De.substring(0,de),Gt=De.substring(de+1));const it={min:St(mt),max:St(Gt)};N.width=it,ae=ue.substring(1,G)}else ae=ue.substring(1);if(ae.length===1)N.presentation1=ae;else if(ae.length>1){var Ce=ae.charAt(ae.length-1);"atco".indexOf(Ce)!==-1?(N.presentation2=Ce,Ce==="o"&&(N.ordinal=!0),N.presentation1=ae.substring(0,ae.length-1)):N.presentation1=ae}else N.presentation1=ie[N.component];if(typeof N.presentation1>"u")throw{code:"D3132",value:N.component};if(N.presentation1[0]==="n")N.names=Y.LOWER;else if(N.presentation1[0]==="N")N.presentation1[1]==="n"?N.names=Y.TITLE:N.names=Y.UPPER;else if("YMDdFWwXxHhmsf".indexOf(N.component)!==-1){var me=N.presentation1;if(N.presentation2&&(me+=";"+N.presentation2),N.integerFormat=re(me),N.width&&N.width.min!==void 0&&N.integerFormat.mandatoryDigits<N.width.min&&(N.integerFormat.mandatoryDigits=N.width.min),N.component==="Y")if(N.n=-1,N.width&&N.width.max!==void 0)N.n=N.width.max,N.integerFormat.mandatoryDigits=N.n;else{var fe=N.integerFormat.mandatoryDigits+N.integerFormat.optionalDigits;fe>=2&&(N.n=fe)}const De=M[M.length-1];De&&De.integerFormat&&(De.integerFormat.parseWidth=De.integerFormat.mandatoryDigits)}(N.component==="Z"||N.component==="z")&&(N.integerFormat=re(N.presentation1)),M.push(N),q=V+1}V++}return F(q,V),$}const le=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["January","February","March","April","May","June","July","August","September","October","November","December"],He=1e3*60*60*24,he=function(T){const M=Date.UTC(T.year,T.month);var $=new Date(M).getUTCDay();return $===0&&($=7),$>4?M+(8-$)*He:M-($-1)*He},ge=function(T,M){return{year:T,month:M,nextMonth:function(){return M===11?ge(T+1,0):ge(T,M+1)},previousMonth:function(){return M===0?ge(T-1,11):ge(T,M-1)},nextYear:function(){return ge(T+1,M)},previousYear:function(){return ge(T-1,M)}}},$e=function(T,M){return(M-T)/(He*7)+1},ce=(T,M)=>{let $;switch(M){case"Y":$=T.getUTCFullYear();break;case"M":$=T.getUTCMonth()+1;break;case"D":$=T.getUTCDate();break;case"d":{const F=Date.UTC(T.getUTCFullYear(),T.getUTCMonth(),T.getUTCDate()),q=Date.UTC(T.getUTCFullYear(),0);$=(F-q)/He+1;break}case"F":$=T.getUTCDay(),$===0&&($=7);break;case"W":{const F=ge(T.getUTCFullYear(),0),q=he(F),V=Date.UTC(F.year,T.getUTCMonth(),T.getUTCDate());let N=$e(q,V);if(N>52){const G=he(F.nextYear());V>=G&&(N=1)}else if(N<1){const G=he(F.previousYear());N=$e(G,V)}$=Math.floor(N);break}case"w":{const F=ge(T.getUTCFullYear(),T.getUTCMonth()),q=he(F),V=Date.UTC(F.year,F.month,T.getUTCDate());let N=$e(q,V);if(N>4){const G=he(F.nextMonth());V>=G&&(N=1)}else if(N<1){const G=he(F.previousMonth());N=$e(G,V)}$=Math.floor(N);break}case"X":{const F=ge(T.getUTCFullYear(),0),q=he(F),V=he(F.nextYear()),N=T.getTime();N<q?$=F.year-1:N>=V?$=F.year+1:$=F.year;break}case"x":{const F=ge(T.getUTCFullYear(),T.getUTCMonth()),q=he(F),V=F.nextMonth(),N=he(V),G=T.getTime();G<q?$=F.previousMonth().month+1:G>=N?$=V.month+1:$=F.month+1;break}case"H":$=T.getUTCHours();break;case"h":$=T.getUTCHours(),$=$%12,$===0&&($=12);break;case"P":$=T.getUTCHours()>=12?"pm":"am";break;case"m":$=T.getUTCMinutes();break;case"s":$=T.getUTCSeconds();break;case"f":$=T.getUTCMilliseconds();break;case"Z":case"z":break;case"C":$="ISO";break;case"E":$="ISO";break}return $};let W=null;function Ae(T,M,$){var F=0,q=0;if(typeof $<"u"){const me=parseInt($);F=Math.floor(me/100),q=me%100}var V=function(me,fe){var ue=ce(me,fe.component);if("YMDdFWwXxHhms".indexOf(fe.component)!==-1)if(fe.component==="Y"&&fe.n!==-1&&(ue=ue%Math.pow(10,fe.n)),fe.names){if(fe.component==="M"||fe.component==="x")ue=pe[ue-1];else if(fe.component==="F")ue=le[ue];else throw{code:"D3133",value:fe.component};fe.names===Y.UPPER?ue=ue.toUpperCase():fe.names===Y.LOWER&&(ue=ue.toLowerCase()),fe.width&&ue.length>fe.width.max&&(ue=ue.substring(0,fe.width.max))}else ue=j(ue,fe.integerFormat);else if(fe.component==="f")ue=j(ue,fe.integerFormat);else if(fe.component==="Z"||fe.component==="z"){const De=F*100+q;if(fe.integerFormat.regular)ue=j(De,fe.integerFormat);else{const de=fe.integerFormat.mandatoryDigits;if(de===1||de===2)ue=j(F,fe.integerFormat),q!==0&&(ue+=":"+C(q,"00"));else if(de===3||de===4)ue=j(De,fe.integerFormat);else throw{code:"D3134",value:de}}De>=0&&(ue="+"+ue),fe.component==="z"&&(ue="GMT"+ue),De===0&&fe.presentation2==="t"&&(ue="Z")}else fe.component==="P"&&fe.names===Y.UPPER&&(ue=ue.toUpperCase());return ue};let N;typeof M>"u"?(W===null&&(W=U("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),N=W):N=U(M);const G=(60*F+q)*60*1e3,ae=new Date(T+G);let Ce="";return N.parts.forEach(function(me){me.type==="literal"?Ce+=me.value:Ce+=V(ae,me)}),Ce}function b(T){var M=Object.create(null);if(T.type==="datetime")M.type="datetime",M.parts=T.parts.map(function($){var F=Object.create(null);if($.type==="literal")F.regex=$.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if($.component==="Z"||$.component==="z"){let V;Array.isArray($.integerFormat.groupingSeparators)||(V=$.integerFormat.groupingSeparators),F.regex="",$.component==="z"&&(F.regex="GMT"),F.regex+="[-+][0-9]+",V&&(F.regex+=V.character+"[0-9]+"),F.parse=function(N){$.component==="z"&&(N=N.substring(3));let G=0,ae=0;return V?(G=Number.parseInt(N.substring(0,N.indexOf(V.character))),ae=Number.parseInt(N.substring(N.indexOf(V.character)+1))):N.length-1<=2?G=Number.parseInt(N):(G=Number.parseInt(N.substring(0,3)),ae=Number.parseInt(N.substring(3))),G*60+ae}}else if($.component==="f")F.regex="[0-9]+",F.parse=function(V){return parseFloat("0."+V.substring(0,3))*1e3};else if($.integerFormat)F=b($.integerFormat);else{F.regex="[a-zA-Z]+";var q=Object.create(null);if($.component==="M"||$.component==="x")pe.forEach(function(V,N){$.width&&$.width.max?q[V.substring(0,$.width.max)]=N+1:q[V]=N+1});else if($.component==="F")le.forEach(function(V,N){N>0&&($.width&&$.width.max?q[V.substring(0,$.width.max)]=N:q[V]=N)});else if($.component==="P")q={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:$.component};F.parse=function(V){return q[V]}}return F.component=$.component,F});else{M.type="integer";const $=T.case===Y.UPPER;switch(T.primary){case D.LETTERS:M.regex=$?"[A-Z]+":"[a-z]+",M.parse=function(F){return I(F,$?"A":"a")};break;case D.ROMAN:M.regex=$?"[MDCLXVI]+":"[mdclxvi]+",M.parse=function(F){return S($?F:F.toUpperCase())};break;case D.WORDS:M.regex="(?:"+n.keys(k).concat("and","[\\-, ]").join("|")+")+",M.parse=function(F){return E(F.toLowerCase())};break;case D.DECIMAL:M.regex="[0-9]",T.parseWidth?M.regex+=`{${T.parseWidth}}`:M.regex+="+",T.ordinal&&(M.regex+="(?:th|st|nd|rd)"),M.parse=function(F){let q=F;return T.ordinal&&(q=F.substring(0,F.length-2)),T.regular?q=q.split(",").join(""):T.groupingSeparators.forEach(V=>{q=q.split(V.character).join("")}),T.zeroCode!==48&&(q=q.split("").map(V=>String.fromCodePoint(V.codePointAt(0)-T.zeroCode+48)).join("")),parseInt(q)};break;case D.SEQUENCE:throw{code:"D3130",value:T.token}}}return M}function _(T,M){if(typeof T>"u")return;const $=re(M);return b($).parse(T)}function te(T,M){const $=U(M),F=b($),q="^"+F.parts.map(ae=>"("+ae.regex+")").join("")+"$";var N=new RegExp(q,"i").exec(T);if(N!==null){const de=Object.create(null);for(let u=1;u<N.length;u++){const v=F.parts[u-1];v.parse&&(de[v.component]=v.parse(N[u]))}if(Object.getOwnPropertyNames(de).length===0)return;let mt=0;const Gt=u=>{mt<<=1,mt+=u?1:0},St=u=>!(~u&mt)&&!!(u&mt);"YXMxWwdD".split("").forEach(u=>Gt(de[u]));const Pt=!St(161)&&St(130),Ps=St(84),Or=!Ps&&St(72);mt=0,"PHhmsf".split("").forEach(u=>Gt(de[u]));const J=!St(23)&&St(47),ts=(Pt?"YD":Ps?"XxwF":Or?"XWF":"YMD")+(J?"Phmsf":"Hmsf"),hi=this.environment.timestamp;let ds=!1,lr=!1;if(ts.split("").forEach(u=>{if(typeof de[u]>"u")ds?(de[u]="MDd".indexOf(u)!==-1?1:0,lr=!0):de[u]=ce(hi,u);else if(ds=!0,lr)throw{code:"D3136"}}),de.M>0?de.M-=1:de.M=0,Pt){const u=Date.UTC(de.Y,0),v=(de.d-1)*1e3*60*60*24,w=new Date(u+v);de.M=w.getUTCMonth(),de.D=w.getUTCDate()}if(Ps)throw{code:"D3136"};if(Or)throw{code:"D3136"};J&&(de.H=de.h===12?0:de.h,de.P===1&&(de.H+=12));var G=Date.UTC(de.Y,de.M,de.D,de.H,de.m,de.s,de.f);return(de.Z||de.z)&&(G-=(de.Z||de.z)*60*1e3),G}}var we=new RegExp("^\\d{4}(-[01]\\d)?(-[0-3]\\d)?(T[0-2]\\d:[0-5]\\d:[0-5]\\d)?(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function Pe(T,M){if(!(typeof T>"u"))if(typeof M>"u"){if(!we.test(T))throw{stack:new Error().stack,code:"D3110",value:T};return Date.parse(T)}else return te.call(this,T,M)}function Ee(T,M,$){if(!(typeof T>"u"))return Ae.call(this,T,M,$)}return{formatInteger:C,parseInteger:_,fromMillis:Ee,toMillis:Pe}})();r.exports=o},{"./utils":6}],2:[function(s,r,i){(function(n){(function(){var o=s("./utils");const c=(()=>{var d=o.isNumeric,g=o.isArrayOfStrings,A=o.isArrayOfNumbers,m=o.isSequence,f=o.isFunction,k=o.isLambda,E=o.isPromise,O=o.getFunctionArity,z=o.isDeepEqual,H=o.stringToArray;function S(a){if(!(typeof a>"u")){var l=0;return a.forEach(function(p){l+=p}),l}}function y(a){return typeof a>"u"?0:a.length}function I(a){if(!(typeof a>"u"||a.length===0))return Math.max.apply(Math,a)}function C(a){if(!(typeof a>"u"||a.length===0))return Math.min.apply(Math,a)}function D(a){if(!(typeof a>"u"||a.length===0)){var l=0;return a.forEach(function(p){l+=p}),l/a.length}}function Y(a,l=!1){if(!(typeof a>"u")){var p;if(typeof a=="string")p=a;else if(f(a))p="";else{if(typeof a=="number"&&!isFinite(a))throw{code:"D3001",value:a,stack:new Error().stack};var x=l?2:0;Array.isArray(a)&&a.outerWrapper&&(a=a[0]),p=JSON.stringify(a,function(P,L){return typeof L<"u"&&L!==null&&d(L)?L.toPrecision&&!Number.isInteger(L)?Number(L.toPrecision(15)):L:L&&f(L)?"":L},x)}return p}}function j(a,l,p){if(!(typeof a>"u")){var x=H(a),P=x.length;if(P+l<0&&(l=0),typeof p<"u"){if(p<=0)return"";var L=l>=0?l+p:P+l+p;return x.slice(l,L).join("")}return x.slice(l).join("")}}function ne(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(0,p):a}}function re(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(p+l.length):a}}function ie(a){if(!(typeof a>"u"))return a.toLowerCase()}function U(a){if(!(typeof a>"u"))return a.toUpperCase()}function le(a){if(!(typeof a>"u"))return H(a).length}function pe(a){if(!(typeof a>"u")){var l=a.replace(/[ \t\n\r]+/gm," ");return l.charAt(0)===" "&&(l=l.substring(1)),l.charAt(l.length-1)===" "&&(l=l.substring(0,l.length-1)),l}}function He(a,l,p){if(!(typeof a>"u")){(typeof p>"u"||p.length===0)&&(p=" ");var x;l=Math.trunc(l);var P=Math.abs(l)-le(a);if(P>0){var L=new Array(P+1).join(p);p.length>1&&(L=j(L,0,P)),l>0?x=a+L:x=L+a}else x=a;return x}}async function he(a,l){var p=a.apply(this,[l]);if(E(p)&&(p=await p),p&&!(typeof p.start=="number"||p.end==="number"||Array.isArray(p.groups)||f(p.next)))throw{code:"T1010",stack:new Error().stack};return p}async function ge(a,l){if(!(typeof a>"u"||typeof l>"u")){var p;if(typeof l=="string")p=a.indexOf(l)!==-1;else{var x=await he(l,a);p=typeof x<"u"}return p}}async function $e(a,l,p){if(!(typeof a>"u")){if(p<0)throw{stack:new Error().stack,value:p,code:"D3040",index:3};var x=this.createSequence();if(typeof p>"u"||p>0){var P=0,L=await he(l,a);if(typeof L<"u")for(;typeof L<"u"&&(typeof p>"u"||P<p);)x.push({match:L.match,index:L.start,groups:L.groups}),L=await he(L.next),P++}return x}}async function ce(a,l,p,x){if(!(typeof a>"u")){var P=this;if(l==="")throw{code:"D3010",stack:new Error().stack,value:l,index:2};if(x<0)throw{code:"D3011",stack:new Error().stack,value:x,index:4};var L;typeof p=="string"?L=function(Ge){for(var nt="",Ie=0,Qe=p.indexOf("$",Ie);Qe!==-1&&Ie<p.length;){nt+=p.substring(Ie,Qe),Ie=Qe+1;var Yt=p.charAt(Ie);if(Yt==="$")nt+="$",Ie++;else if(Yt==="0")nt+=Ge.match,Ie++;else{var xt;if(Ge.groups.length===0?xt=1:xt=Math.floor(Math.log(Ge.groups.length)*Math.LOG10E)+1,Qe=parseInt(p.substring(Ie,Ie+xt),10),xt>1&&Qe>Ge.groups.length&&(Qe=parseInt(p.substring(Ie,Ie+xt-1),10)),isNaN(Qe))nt+="$";else{if(Ge.groups.length>0){var ps=Ge.groups[Qe-1];typeof ps<"u"&&(nt+=ps)}Ie+=Qe.toString().length}}Qe=p.indexOf("$",Ie)}return nt+=p.substring(Ie),nt}:L=p;var B="",K=0;if(typeof x>"u"||x>0){var _e=0;if(typeof l=="string"){for(var oe=a.indexOf(l,K);oe!==-1&&(typeof x>"u"||_e<x);)B+=a.substring(K,oe),B+=p,K=oe+l.length,_e++,oe=a.indexOf(l,K);B+=a.substring(K)}else{var je=await he(l,a);if(typeof je<"u"){for(;typeof je<"u"&&(typeof x>"u"||_e<x);){B+=a.substring(K,je.start);var Ke=L.apply(P,[je]);if(E(Ke)&&(Ke=await Ke),typeof Ke=="string")B+=Ke;else throw{code:"D3012",stack:new Error().stack,value:Ke};K=je.start+je.match.length,_e++,je=await he(je.next)}B+=a.substring(K)}else B=a}}else B=a;return B}}function W(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.btoa:function(p){return new n.Buffer.from(p,"binary").toString("base64")};return l(a)}}function Ae(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.atob:function(p){return new n.Buffer.from(p,"base64").toString("binary")};return l(a)}}function b(a){if(!(typeof a>"u")){var l;try{l=encodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrlComponent"}}return l}}function _(a){if(!(typeof a>"u")){var l;try{l=encodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrl"}}return l}}function te(a){if(!(typeof a>"u")){var l;try{l=decodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrlComponent"}}return l}}function we(a){if(!(typeof a>"u")){var l;try{l=decodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrl"}}return l}}async function Pe(a,l,p){if(!(typeof a>"u")){if(p<0)throw{code:"D3020",stack:new Error().stack,value:p,index:3};var x=[];if(typeof p>"u"||p>0)if(typeof l=="string")x=a.split(l,p);else{var P=0,L=await he(l,a);if(typeof L<"u"){for(var B=0;typeof L<"u"&&(typeof p>"u"||P<p);)x.push(a.substring(B,L.start)),B=L.end,L=await he(L.next),P++;(typeof p>"u"||P<p)&&x.push(a.substring(B))}else x.push(a)}return x}}function Ee(a,l){if(!(typeof a>"u"))return typeof l>"u"&&(l=""),a.join(l)}function T(a,l,p){if(!(typeof a>"u")){var x={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},P=x;typeof p<"u"&&o.keys(p).forEach(function(be){P[be]=p[be]});for(var L=[],B=P["zero-digit"].charCodeAt(0),K=B;K<B+10;K++)L.push(String.fromCharCode(K));var _e=L.concat([P["decimal-separator"],P["exponent-separator"],P["grouping-separator"],P.digit,P["pattern-separator"]]),oe=l.split(P["pattern-separator"]);if(oe.length>2)throw{code:"D3080",stack:new Error().stack};var je=function(be){var Ze=(function(){for(var ut,Ut=0;Ut<be.length;Ut++)if(ut=be.charAt(Ut),_e.indexOf(ut)!==-1&&ut!==P["exponent-separator"])return be.substring(0,Ut);return""})(),Ct=(function(){for(var ut,Ut=be.length-1;Ut>=0;Ut--)if(ut=be.charAt(Ut),_e.indexOf(ut)!==-1&&ut!==P["exponent-separator"])return be.substring(Ut+1);return""})(),Ye=be.substring(Ze.length,be.length-Ct.length),Nt,Bs,Ft,cr,zt=be.indexOf(P["exponent-separator"],Ze.length);zt===-1||zt>be.length-Ct.length?(Nt=Ye,Bs=void 0):(Nt=Ye.substring(0,zt),Bs=Ye.substring(zt+1));var ss=Nt.indexOf(P["decimal-separator"]);return ss===-1?(Ft=Nt,cr=Ct):(Ft=Nt.substring(0,ss),cr=Nt.substring(ss+1)),{prefix:Ze,suffix:Ct,activePart:Ye,mantissaPart:Nt,exponentPart:Bs,integerPart:Ft,fractionalPart:cr,subpicture:be}},Ke=function(be){var Ze,Ct,Ye=be.subpicture,Nt=Ye.indexOf(P["decimal-separator"]);Nt!==Ye.lastIndexOf(P["decimal-separator"])&&(Ze="D3081"),Ye.indexOf(P.percent)!==Ye.lastIndexOf(P.percent)&&(Ze="D3082"),Ye.indexOf(P["per-mille"])!==Ye.lastIndexOf(P["per-mille"])&&(Ze="D3083"),Ye.indexOf(P.percent)!==-1&&Ye.indexOf(P["per-mille"])!==-1&&(Ze="D3084");var Bs=!1;for(Ct=0;Ct<be.mantissaPart.length;Ct++){var Ft=be.mantissaPart.charAt(Ct);if(L.indexOf(Ft)!==-1||Ft===P.digit){Bs=!0;break}}Bs||(Ze="D3085");var cr=be.activePart.split("").map(function(ut){return _e.indexOf(ut)===-1?"p":"a"}).join("");cr.indexOf("p")!==-1&&(Ze="D3086"),Nt!==-1?(Ye.charAt(Nt-1)===P["grouping-separator"]||Ye.charAt(Nt+1)===P["grouping-separator"])&&(Ze="D3087"):be.integerPart.charAt(be.integerPart.length-1)===P["grouping-separator"]&&(Ze="D3088"),Ye.indexOf(P["grouping-separator"]+P["grouping-separator"])!==-1&&(Ze="D3089");var zt=be.integerPart.indexOf(P.digit);zt!==-1&&be.integerPart.substring(0,zt).split("").filter(function(ut){return L.indexOf(ut)>-1}).length>0&&(Ze="D3090"),zt=be.fractionalPart.lastIndexOf(P.digit),zt!==-1&&be.fractionalPart.substring(zt).split("").filter(function(ut){return L.indexOf(ut)>-1}).length>0&&(Ze="D3091");var ss=typeof be.exponentPart=="string";if(ss&&be.exponentPart.length>0&&(Ye.indexOf(P.percent)!==-1||Ye.indexOf(P["per-mille"])!==-1)&&(Ze="D3092"),ss&&(be.exponentPart.length===0||be.exponentPart.split("").filter(function(ut){return L.indexOf(ut)===-1}).length>0)&&(Ze="D3093"),Ze)throw{code:Ze,stack:new Error().stack}},Ge=function(be){var Ze=function(gt,fn){for(var pi=[],xs=gt.indexOf(P["grouping-separator"]);xs!==-1;){var mn=(fn?gt.substring(0,xs):gt.substring(xs)).split("").filter(function(Mr){return L.indexOf(Mr)!==-1||Mr===P.digit}).length;pi.push(mn),xs=be.integerPart.indexOf(P["grouping-separator"],xs+1)}return pi},Ct=Ze(be.integerPart),Ye=function(gt){if(gt.length===0)return 0;for(var fn=function(mn,Mr){return Mr===0?mn:fn(Mr,mn%Mr)},pi=gt.reduce(fn),xs=1;xs<=gt.length;xs++)if(gt.indexOf(xs*pi)===-1)return 0;return pi},Nt=Ye(Ct),Bs=Ze(be.fractionalPart,!0),Ft=be.integerPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length,cr=Ft,zt=be.fractionalPart.split(""),ss=zt.filter(function(gt){return L.indexOf(gt)!==-1}).length,ut=zt.filter(function(gt){return L.indexOf(gt)!==-1||gt===P.digit}).length,Ut=typeof be.exponentPart=="string";Ft===0&&ut===0&&(Ut?(ss=1,ut=1):Ft=1),Ut&&Ft===0&&be.integerPart.indexOf(P.digit)!==-1&&(Ft=1),Ft===0&&ss===0&&(ss=1);var Hl=0;return Ut&&(Hl=be.exponentPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length),{integerPartGroupingPositions:Ct,regularGrouping:Nt,minimumIntegerPartSize:Ft,scalingFactor:cr,prefix:be.prefix,fractionalPartGroupingPositions:Bs,minimumFactionalPartSize:ss,maximumFactionalPartSize:ut,minimumExponentSize:Hl,suffix:be.suffix,picture:be.subpicture}},nt=oe.map(je);nt.forEach(Ke);var Ie=nt.map(Ge),Qe=P["minus-sign"],Yt=P["zero-digit"],xt=P["decimal-separator"],ps=P["grouping-separator"];Ie.length===1&&(Ie.push(JSON.parse(JSON.stringify(Ie[0]))),Ie[1].prefix=Qe+Ie[1].prefix);var ot;a>=0?ot=Ie[0]:ot=Ie[1];var ui;ot.picture.indexOf(P.percent)!==-1?ui=a*100:ot.picture.indexOf(P["per-mille"])!==-1?ui=a*1e3:ui=a;var Hs,Lr;if(ot.minimumExponentSize===0)Hs=ui;else{var Ym=Math.pow(10,ot.scalingFactor),Zm=Math.pow(10,ot.scalingFactor-1);if(Hs=ui,Lr=0,Hs!==0){for(;Math.abs(Hs)<Zm;)Hs*=10,Lr-=1;for(;Math.abs(Hs)>Ym;)Hs/=10,Lr+=1}}var Jm=N(Hs,ot.maximumFactionalPartSize),Ul=function(be,Ze){var Ct=Math.abs(be).toFixed(Ze);return Yt!=="0"&&(Ct=Ct.split("").map(function(Ye){return Ye>="0"&&Ye<="9"?L[Ye.charCodeAt(0)-48]:Ye}).join("")),Ct},ke=Ul(Jm,ot.maximumFactionalPartSize),At=ke.indexOf(".");for(At===-1?ke=ke+xt:ke=ke.replace(".",xt);ke.charAt(0)===Yt;)ke=ke.substring(1);for(;ke.charAt(ke.length-1)===Yt;)ke=ke.substring(0,ke.length-1);At=ke.indexOf(xt);var di=ot.minimumIntegerPartSize-At,ql=ot.minimumFactionalPartSize-(ke.length-At-1);if(ke=(di>0?new Array(di+1).join(Yt):"")+ke,ke=ke+(ql>0?new Array(ql+1).join(Yt):""),At=ke.indexOf(xt),ot.regularGrouping>0)for(var Qm=Math.floor((At-1)/ot.regularGrouping),dn=1;dn<=Qm;dn++)ke=[ke.slice(0,At-dn*ot.regularGrouping),ps,ke.slice(At-dn*ot.regularGrouping)].join("");else ot.integerPartGroupingPositions.forEach(function(be){ke=[ke.slice(0,At-be),ps,ke.slice(At-be)].join(""),At++});if(At=ke.indexOf(xt),ot.fractionalPartGroupingPositions.forEach(function(be){ke=[ke.slice(0,be+At+1),ps,ke.slice(be+At+1)].join("")}),At=ke.indexOf(xt),(ot.picture.indexOf(xt)===-1||At===ke.length-1)&&(ke=ke.substring(0,ke.length-1)),typeof Lr<"u"){var pn=Ul(Lr,0);di=ot.minimumExponentSize-pn.length,di>0&&(pn=new Array(di+1).join(Yt)+pn),ke=ke+P["exponent-separator"]+(Lr<0?Qe:"")+pn}return ke=ot.prefix+ke+ot.suffix,ke}}function M(a,l){if(!(typeof a>"u")){if(a=N(a),typeof l>"u"?l=10:l=N(l),l<2||l>36)throw{code:"D3100",stack:new Error().stack,value:l};var p=a.toString(l);return p}}function $(a){var l;if(!(typeof a>"u")){if(typeof a=="number")l=a;else if(typeof a=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(a)&&!isNaN(parseFloat(a))&&isFinite(a))l=parseFloat(a);else if(typeof a=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(a))l=Number(a);else if(a===!0)l=1;else if(a===!1)l=0;else throw{code:"D3030",value:a,stack:new Error().stack,index:1};return l}}function F(a){var l;if(!(typeof a>"u"))return l=Math.abs(a),l}function q(a){var l;if(!(typeof a>"u"))return l=Math.floor(a),l}function V(a){var l;if(!(typeof a>"u"))return l=Math.ceil(a),l}function N(a,l){var p;if(!(typeof a>"u")){if(l){var x=a.toString().split("e");a=+(x[0]+"e"+(x[1]?+x[1]+l:l))}p=Math.round(a);var P=p-a;return Math.abs(P)===.5&&Math.abs(p%2)===1&&(p=p-1),l&&(x=p.toString().split("e"),p=+(x[0]+"e"+(x[1]?+x[1]-l:-l))),Object.is(p,-0)&&(p=0),p}}function G(a){var l;if(!(typeof a>"u")){if(a<0)throw{stack:new Error().stack,code:"D3060",index:1,value:a};return l=Math.sqrt(a),l}}function ae(a,l){var p;if(!(typeof a>"u")){if(p=Math.pow(a,l),!isFinite(p))throw{stack:new Error().stack,code:"D3061",index:1,value:a,exp:l};return p}}function Ce(){return Math.random()}function me(a){if(!(typeof a>"u")){var l=!1;if(Array.isArray(a)){if(a.length===1)l=me(a[0]);else if(a.length>1){var p=a.filter(function(x){return me(x)});l=p.length>0}}else typeof a=="string"?a.length>0&&(l=!0):d(a)?a!==0&&(l=!0):a!==null&&typeof a=="object"&&!f(a)?o.keys(a).length>0&&(l=!0):typeof a=="boolean"&&a===!0&&(l=!0);return l}}function fe(a){if(!(typeof a>"u"))return!me(a)}function ue(a,l,p,x){var P=[l],L=O(a);return L>=2&&P.push(p),L>=3&&P.push(x),P}async function De(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),x=0;x<a.length;x++){var P=ue(l,a[x],x,a),L=await l.apply(this,P);typeof L<"u"&&p.push(L)}return p}}async function de(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),x=0;x<a.length;x++){var P=a[x],L=ue(l,P,x,a),B=await l.apply(this,L);me(B)&&p.push(P)}return p}}async function mt(a,l){if(!(typeof a>"u")){for(var p=!1,x,P=0;P<a.length;P++){var L=a[P],B=!0;if(typeof l<"u"){var K=ue(l,L,P,a),_e=await l.apply(this,K);B=me(_e)}if(B)if(!p)x=L,p=!0;else throw{stack:new Error().stack,code:"D3138",index:P}}if(!p)throw{stack:new Error().stack,code:"D3139"};return x}}function Gt(){for(var a=[],l=Array.prototype.slice.call(arguments),p=Math.min.apply(Math,l.map(function(L){return Array.isArray(L)?L.length:0})),x=0;x<p;x++){var P=l.map(L=>L[x]);a.push(P)}return a}async function St(a,l,p){if(!(typeof a>"u")){var x,P=O(l);if(P<2)throw{stack:new Error().stack,code:"D3050",index:1};var L;for(typeof p>"u"&&a.length>0?(x=a[0],L=1):(x=p,L=0);L<a.length;){var B=[x,a[L]];P>=3&&B.push(L),P>=4&&B.push(a),x=await l.apply(this,B),L++}return x}}function it(a){var l=this.createSequence();if(Array.isArray(a)){for(var p=Object.create(null),x=0;x<a.length;x++){var P=it.call(this,a[x]);P.forEach(function(L){p[L]=!0})}l=it.call(this,p)}else a!==null&&typeof a=="object"&&!f(a)&&o.keys(a).forEach(L=>l.push(L));return l}function Pt(a,l){var p;if(Array.isArray(a)){p=this.createSequence();for(var x=0;x<a.length;x++){var P=Pt.call(this,a[x],l);typeof P<"u"&&(Array.isArray(P)?P.forEach(L=>p.push(L)):p.push(P))}}else a!==null&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,l)&&!f(a)&&(p=a[l]);return p}function Ps(a,l){if(typeof a>"u")return l;if(typeof l>"u")return a;Array.isArray(a)||(a=this.createSequence(a)),Array.isArray(l)||(l=[l]);const p=a.length+l.length;if(this.options&&p>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:p};return a.concat(l)}function Or(a){return!(typeof a>"u")}function Tr(a){var l=this.createSequence();if(Array.isArray(a))for(var p=0;p<a.length;p++)l=Ps.call(this,l,Tr.call(this,a[p]));else if(a!==null&&typeof a=="object"&&!k(a))for(const P of o.keys(a)){var x=Object.create(null);x[P]=a[P],l.push(x)}else l=a;return l}function J(a){if(!(typeof a>"u")){var l=Object.create(null);return a.forEach(function(p){for(const x of o.keys(p))l[x]=p[x]}),l}}function hn(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=a.length,p=new Array(l),x=0;x<l;x++)p[l-x-1]=a[x];return p}}async function un(a,l){var p=this.createSequence();for(const L of o.keys(a)){var x=ue(l,a[L],L,a),P=await l.apply(this,x);typeof P<"u"&&p.push(P)}return p}function ts(a){throw{code:"D3137",stack:new Error().stack,message:a||"$error() function evaluated"}}function hi(a,l){if(!a)throw{code:"D3141",stack:new Error().stack,message:l||"$assert() statement failed"}}function ds(a){if(a!==void 0)return a===null?"null":d(a)?"number":typeof a=="string"?"string":typeof a=="boolean"?"boolean":Array.isArray(a)?"array":f(a)?"function":"object"}async function lr(a,l){if(!(typeof a>"u")){if(a.length<=1)return a;var p;if(typeof l>"u"){if(!A(a)&&!g(a))throw{stack:new Error().stack,code:"D3070",index:1};p=async function(B,K){return B>K}}else p=l;var x=async function(B,K){var _e=async function(je,Ke,Ge){Ke.length===0?Array.prototype.push.apply(je,Ge):Ge.length===0?Array.prototype.push.apply(je,Ke):await p(Ke[0],Ge[0])?(je.push(Ge[0]),await _e(je,Ke,Ge.slice(1))):(je.push(Ke[0]),await _e(je,Ke.slice(1),Ge))},oe=[];return await _e(oe,B,K),oe},P=async function(B){if(!Array.isArray(B)||B.length<=1)return B;var K=Math.floor(B.length/2),_e=B.slice(0,K),oe=B.slice(K);return _e=await P(_e),oe=await P(oe),await x(_e,oe)},L=await P(a);return L}}function u(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=new Array(a.length),p=0;p<a.length;p++){var x=Math.floor(Math.random()*(p+1));p!==x&&(l[p]=l[x]),l[x]=a[p]}return l}}function v(a){if(!(typeof a>"u")){if(!Array.isArray(a)||a.length<=1)return a;for(var l=m(a)?this.createSequence():[],p=0;p<a.length;p++){for(var x=a[p],P=!1,L=0;L<l.length;L++)if(z(x,l[L])){P=!0;break}P||l.push(x)}return l}}async function w(a,l){var p=Object.create(null);for(const B of o.keys(a)){var x=a[B],P=ue(l,x,B,a),L=await l.apply(this,P);me(L)&&(p[B]=x)}return o.keys(p).length===0&&(p=void 0),p}return{sum:S,count:y,max:I,min:C,average:D,string:Y,substring:j,substringBefore:ne,substringAfter:re,lowercase:ie,uppercase:U,length:le,trim:pe,pad:He,match:$e,contains:ge,replace:ce,split:Pe,join:Ee,formatNumber:T,formatBase:M,number:$,floor:q,ceil:V,round:N,abs:F,sqrt:G,power:ae,random:Ce,boolean:me,not:fe,map:De,zip:Gt,filter:de,single:mt,foldLeft:St,sift:w,keys:it,lookup:Pt,append:Ps,exists:Or,spread:Tr,merge:J,reverse:hn,each:un,error:ts,assert:hi,type:ds,sort:lr,shuffle:u,distinct:v,base64encode:W,base64decode:Ae,encodeUrlComponent:b,encodeUrl:_,decodeUrlComponent:te,decodeUrl:we}})();r.exports=c}).call(this)}).call(this,typeof ra<"u"?ra:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(s,r,i){var n=s("./datetime"),o=s("./functions"),c=s("./utils"),d=s("./parser"),g=s("./signature"),A=(function(){var m=c.isNumeric,f=c.isArrayOfStrings,k=c.isArrayOfNumbers,E=c.isSequence,O=c.isFunction,z=c.isLambda,H=c.isIterable,S=c.isPromise,y=c.getFunctionArity,I=c.isDeepEqual,C=ts(null);async function D(u,v,w){var a;w.base.depth++,w.base.guardrails();var l=w.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(l&&await l(u,v,w),u.type){case"path":a=await Y(u,v,w);break;case"binary":a=await le(u,v,w);break;case"unary":a=await pe(u,v,w);break;case"name":a=He(u,v,w);break;case"string":case"number":case"value":a=he(u);break;case"wildcard":a=ge(u,v,w);break;case"descendant":a=ce(u,v,w);break;case"parent":a=w.lookup(u.slot.label);break;case"condition":a=await q(u,v,w);break;case"block":a=await V(u,v,w);break;case"bind":a=await F(u,v,w);break;case"regex":a=N(u,v,w);break;case"function":a=await ue(u,v,w);break;case"variable":a=G(u,v,w);break;case"lambda":a=mt(u,v,w);break;case"partial":a=await Gt(u,v,w);break;case"apply":a=await fe(u,v,w);break;case"transform":a=Ce(u,v,w);break}if(Object.prototype.hasOwnProperty.call(u,"predicate"))for(var p=0;p<u.predicate.length;p++)a=await U(u.predicate[p].expr,a,w);u.type!=="path"&&Object.prototype.hasOwnProperty.call(u,"group")&&(a=await T(u.group,a,w));var x=w.lookup(Symbol.for("jsonata.__evaluate_exit"));return x&&await x(u,v,w,a),a&&E(a)&&!a.tupleStream&&(u.keepArray&&(a.keepSingleton=!0),a.length===0?a=void 0:a.length===1&&(a=a.keepSingleton?a:a[0])),w.base.depth--,a}async function Y(u,v,w){var a;Array.isArray(v)&&u.steps[0].type!=="variable"?a=v:a=w.base.createSequence(v);for(var l,p=!1,x=void 0,P=0;P<u.steps.length;P++){var L=u.steps[P];if(L.tuple&&(p=!0),P===0&&L.consarray?l=await D(L,a,w):p?x=await ie(L,a,x,w):l=await ne(L,a,w,P===u.steps.length-1),!p&&(typeof l>"u"||l.length===0))break;typeof L.focus>"u"&&(a=l)}if(p)if(u.tuple)l=x;else for(l=w.base.createSequence(),P=0;P<x.length;P++)l.push(x[P]["@"]);return u.keepSingletonArray&&(Array.isArray(l)&&l.cons&&!l.sequence&&(l=w.base.createSequence(l)),l.keepSingleton=!0),Object.prototype.hasOwnProperty.call(u,"group")&&(l=await T(u.group,p?x:l,w)),l}function j(u,v){var w=ts(u);for(const a of c.keys(v))w.bind(a,v[a]);return w}async function ne(u,v,w,a){var l;if(u.type==="sort")return l=await ae(u,v,w),u.stages&&(l=await re(u.stages,l,w)),l;l=w.base.createSequence();for(var p=0;p<v.length;p++){var x=await D(u,v[p],w);if(u.stages)for(var P=0;P<u.stages.length;P++)x=await U(u.stages[P].expr,x,w);typeof x<"u"&&l.push(x)}var L=w.base.createSequence();return a&&l.length===1&&Array.isArray(l[0])&&!E(l[0])?L=l[0]:Array.prototype.forEach.call(l,function(B){!Array.isArray(B)||B.cons?L.push(B):Array.prototype.forEach.call(B,K=>L.push(K))}),L}async function re(u,v,w){for(var a=v,l=0;l<u.length;l++){var p=u[l];switch(p.type){case"filter":a=await U(p.expr,a,w);break;case"index":for(var x=0;x<a.length;x++){var P=a[x];P[p.value]=x}break}}return a}async function ie(u,v,w,a){var l;if(u.type==="sort"){if(w)l=await ae(u,w,a);else{var p=await ae(u,v,a);l=a.base.createSequence(),l.tupleStream=!0;for(var x=0;x<p.length;x++){var P={"@":p[x]};P[u.index]=x,l.push(P)}}return u.stages&&(l=await re(u.stages,l,a)),l}l=a.base.createSequence(),l.tupleStream=!0;var L=a;w===void 0&&(w=v.map(oe=>({"@":oe})));for(var B=0;B<w.length;B++){L=j(a,w[B]);var K=await D(u,w[B]["@"],L);if(typeof K<"u"){Array.isArray(K)||(K=[K]);for(var _e=0;_e<K.length;_e++)P=Object.create(null),Object.assign(P,w[B]),K.tupleStream?Object.assign(P,K[_e]):(u.focus?(P[u.focus]=K[_e],P["@"]=w[B]["@"]):P["@"]=K[_e],u.index&&(P[u.index]=_e),u.ancestor&&(P[u.ancestor.label]=w[B]["@"])),l.push(P)}}return u.stages&&(l=await re(u.stages,l,a)),l}async function U(u,v,w){var a=w.base.createSequence();if(v&&v.tupleStream&&(a.tupleStream=!0),Array.isArray(v)||(v=w.base.createSequence(v)),u.type==="number"){var l=Math.floor(u.value);l<0&&(l=v.length+l);var p=await v[l];typeof p<"u"&&(Array.isArray(p)?a=p:a.push(p))}else for(l=0;l<v.length;l++){var p=v[l],x=p,P=w;v.tupleStream&&(x=p["@"],P=j(w,p));var L=await D(u,x,P);m(L)&&(L=[L]),k(L)?Array.prototype.forEach.call(L,function(K){var _e=Math.floor(K);_e<0&&(_e=v.length+_e),_e===l&&a.push(p)}):o.boolean(L)&&a.push(p)}return a}async function le(u,v,w){var a,l=await D(u.lhs,v,w),p=u.value,x=async()=>await D(u.rhs,v,w);if(p==="and"||p==="or")try{return await we(l,x,p)}catch(L){throw L.position=u.position,L.token=p,L}var P=await x();try{switch(p){case"+":case"-":case"*":case"/":case"%":a=Ae(l,P,p);break;case"=":case"!=":a=b(l,P,p);break;case"<":case"<=":case">":case">=":a=_(l,P,p);break;case"&":a=Ee(l,P);break;case"..":a=$(l,P,w);break;case"in":a=te(l,P);break}}catch(L){throw L.position=u.position,L.token=p,L}return a}async function pe(u,v,w){var a,l={options:w.base.options,createSequence:w.base.createSequence};switch(u.value){case"-":if(a=await D(u.expression,v,w),typeof a>"u")a=void 0;else if(m(a))a=-a;else throw{code:"D1002",stack:new Error().stack,position:u.position,token:u.value,value:a};break;case"[":a=[];let P=await Promise.all(u.expressions.map(async(L,B)=>(w.isParallelCall=B>0,[L,await D(L,v,w)])));for(let L of P){var[p,x]=L;typeof x<"u"&&(p.value==="["?a.push(x):a=o.append.call(l,a,x))}u.consarray&&Object.defineProperty(a,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":a=await T(u,v,w);break}return a}function He(u,v,w){var a={createSequence:w.base.createSequence};return o.lookup.call(a,v,u.value)}function he(u){return u.value}function ge(u,v,w){var a={options:w.base.options,createSequence:w.base.createSequence},l=a.createSequence();return Array.isArray(v)&&v.outerWrapper&&v.length>0&&(v=v[0]),v!==null&&typeof v=="object"&&!O(v)&&c.keys(v).forEach(function(p){var x=v[p];Array.isArray(x)?(x=$e(x),l=o.append.call(a,l,x)):l.push(x)}),l}function $e(u,v){return typeof v>"u"&&(v=[]),Array.isArray(u)?Array.prototype.forEach.call(u,function(w){$e(w,v)}):v.push(u),v}function ce(u,v,w){var a,l=w.base.createSequence();return typeof v<"u"&&(W(v,l),l.length===1?a=l[0]:a=l),a}function W(u,v){Array.isArray(u)||v.push(u),Array.isArray(u)?Array.prototype.forEach.call(u,function(w){W(w,v)}):u!==null&&typeof u=="object"&&!O(u)&&c.keys(u).forEach(function(w){W(u[w],v)})}function Ae(u,v,w){var a;if(typeof u<"u"&&!m(u))throw{code:"T2001",stack:new Error().stack,value:u};if(typeof v<"u"&&!m(v))throw{code:"T2002",stack:new Error().stack,value:v};if(typeof u>"u"||typeof v>"u")return a;switch(w){case"+":a=u+v;break;case"-":a=u-v;break;case"*":a=u*v;break;case"/":a=u/v;break;case"%":a=u%v;break}return a}function b(u,v,w){var a,l=typeof u,p=typeof v;if(l==="undefined"||p==="undefined")return!1;switch(w){case"=":a=I(u,v);break;case"!=":a=!I(u,v);break}return a}function _(u,v,w){var a,l=typeof u,p=typeof v,x=l==="undefined"||l==="string"||l==="number",P=p==="undefined"||p==="string"||p==="number";if(!x||!P)throw{code:"T2010",stack:new Error().stack,value:l==="string"||l==="number"?v:u};if(!(l==="undefined"||p==="undefined")){if(l!==p)throw{code:"T2009",stack:new Error().stack,value:u,value2:v};switch(w){case"<":a=u<v;break;case"<=":a=u<=v;break;case">":a=u>v;break;case">=":a=u>=v;break}return a}}function te(u,v){var w=!1;if(typeof u>"u"||typeof v>"u")return!1;Array.isArray(v)||(v=[v]);for(var a=0;a<v.length;a++)if(v[a]===u){w=!0;break}return w}async function we(u,v,w){var a,l=Pe(u);switch(w){case"and":a=l&&Pe(await v());break;case"or":a=l||Pe(await v());break}return a}function Pe(u){var v=o.boolean(u);return typeof v>"u"?!1:v}function Ee(u,v){var w,a="",l="";return typeof u<"u"&&(a=o.string(u)),typeof v<"u"&&(l=o.string(v)),w=a.concat(l),w}async function T(u,v,w){var a=Object.create(null),l=Object.create(null),p=!!(v&&v.tupleStream),x={options:w.base.options,createSequence:w.base.createSequence};Array.isArray(v)||(w.base.options,v=x.createSequence(v)),v.length===0&&!p&&v.push(void 0);for(var P=0;P<v.length;P++)for(var L=v[P],B=p?j(w,L):w,K=0;K<u.lhs.length;K++){var _e=u.lhs[K],oe=await D(_e[0],p?L["@"]:L,B);if(typeof oe!="string"&&oe!==void 0)throw{code:"T1003",stack:new Error().stack,position:u.position,value:oe};if(oe!==void 0){if(oe==="_jsonata_lambda"||oe==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:u.position,value:oe};var je={data:L,exprIndex:K};if(Object.prototype.hasOwnProperty.call(l,oe)){if(l[oe].exprIndex!==K)throw{code:"D1009",stack:new Error().stack,position:u.position,value:oe};l[oe].data=o.append.call(x,l[oe].data,L)}else l[oe]=je}}let Ke=await Promise.all(c.keys(l).map(async(nt,Ie)=>{let Qe=l[nt];var Yt=Qe.data,xt=w;if(p){var ps=M(Qe.data,w);Yt=ps["@"],delete ps["@"],xt=j(w,ps)}return w.isParallelCall=Ie>0,[nt,await D(u.lhs[Qe.exprIndex][1],Yt,xt)]}));for(let nt of Ke){var[oe,Ge]=await nt;typeof Ge<"u"&&(a[oe]=Ge)}return a}function M(u,v){if(!Array.isArray(u))return u;var w=Object.create(null),a={options:v.base.options,createSequence:v.base.createSequence};Object.assign(w,u[0]);for(var l=1;l<u.length;l++)for(const p of c.keys(u[l]))w[p]=o.append.call(a,w[p],u[l][p]);return w}function $(u,v,w){var a;if(typeof u<"u"&&!Number.isInteger(u))throw{code:"T2003",stack:new Error().stack,value:u};if(typeof v<"u"&&!Number.isInteger(v))throw{code:"T2004",stack:new Error().stack,value:v};if(typeof u>"u"||typeof v>"u"||u>v)return a;var l=v-u+1;if(l>1e7)throw{code:"D2014",stack:new Error().stack,value:l};if(w.base.options&&l>w.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};a=new Array(l);for(var p=u,x=0;p<=v;p++,x++)a[x]=p;return a.sequence=!0,a}async function F(u,v,w){var a=await D(u.rhs,v,w);return w.bind(u.lhs.value,a),a}async function q(u,v,w){var a,l=await D(u.condition,v,w);return o.boolean(l)?a=await D(u.then,v,w):typeof u.else<"u"&&(a=await D(u.else,v,w)),a}async function V(u,v,w){for(var a,l=ts(w),p=0;p<u.expressions.length;p++)a=await D(u.expressions[p],v,l);return a}function N(u,v,w){var a=new w.base.RegexEngine(u.value),l=function(p,x){var P;a.lastIndex=x||0;var L=a.exec(p);if(L!==null){if(P={match:L[0],start:L.index,end:L.index+L[0].length,groups:[]},L.length>1)for(var B=1;B<L.length;B++)P.groups.push(L[B]);P.next=function(){if(!(a.lastIndex>=p.length)){var K=l(p,a.lastIndex);if(K&&K.match==="")throw{code:"D1004",stack:new Error().stack,position:u.position,value:u.value.source};return K}}}return P};return l}function G(u,v,w){var a;return u.value===""?a=v&&v.outerWrapper?v[0]:v:a=w.lookup(u.value),a}async function ae(u,v,w){var a,l=v,p=!!v.tupleStream,x=async function(L,B){for(var K=0,_e=0;K===0&&_e<u.terms.length;_e++){var oe=u.terms[_e],je=L,Ke=w;p&&(je=L["@"],Ke=j(w,L));var Ge=await D(oe.expression,je,Ke);je=B,Ke=w,p&&(je=B["@"],Ke=j(w,B));var nt=await D(oe.expression,je,Ke),Ie=typeof Ge,Qe=typeof nt;if(Ie==="undefined"){K=Qe==="undefined"?0:1;continue}if(Qe==="undefined"){K=-1;continue}if(!(Ie==="string"||Ie==="number")||!(Qe==="string"||Qe==="number"))throw{code:"T2008",stack:new Error().stack,position:u.position,value:Ie==="string"||Ie==="number"?nt:Ge};if(Ie!==Qe)throw{code:"T2007",stack:new Error().stack,position:u.position,value:Ge,value2:nt};Ge!==nt&&(Ge<nt?K=-1:K=1,oe.descending===!0&&(K=-K))}return K===1},P={environment:w,input:v};return a=await o.sort.apply(P,[l,x]),a}function Ce(u,v,w){var a=async function(l){if(!(typeof l>"u")){var p=w.lookup("clone");if(!O(p))throw{code:"T2013",stack:new Error().stack,position:u.position};var x=await De(p,[l],null,w),P=await D(u.pattern,x,w);if(typeof P<"u"){Array.isArray(P)||(P=[P]);for(var L=0;L<P.length;L++){var B=P[L],K=await D(u.update,B,w),_e=typeof K;if(_e!=="undefined"){if(_e!=="object"||K===null||Array.isArray(K))throw{code:"T2011",stack:new Error().stack,position:u.update.position,value:K};for(const Ge of c.keys(K))B[Ge]=K[Ge]}if(typeof u.delete<"u"){var oe=await D(u.delete,B,w);if(typeof oe<"u"){var je=oe;if(Array.isArray(oe)||(oe=[oe]),!f(oe))throw{code:"T2012",stack:new Error().stack,position:u.delete.position,value:je};for(var Ke=0;Ke<oe.length;Ke++)typeof B=="object"&&B!==null&&delete B[oe[Ke]]}}}}return x}};return J(a,"<(oa):o>")}var me=d("function($f, $g) { function($x){ $g($f($x)) } }");async function fe(u,v,w){var a,l=await D(u.lhs,v,w);if(u.rhs.type==="function")a=await ue(u.rhs,v,w,{context:l});else{var p=await D(u.rhs,v,w);if(!O(p))throw{code:"T2006",stack:new Error().stack,position:u.position,value:p};if(O(l)){var x=await D(me,null,w);a=await De(x,[l,p],null,w)}else a=await De(p,[l],null,w)}return a}async function ue(u,v,w,a){var l,p=await D(u.procedure,v,w);if(typeof p>"u"&&u.procedure.type==="path"&&w.lookup(u.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:u.position,token:u.procedure.steps[0].value};var x=[];typeof a<"u"&&x.push(a.context);for(var P=0;P<u.arguments.length;P++){const B=await D(u.arguments[P],v,w);if(O(B)){const K=async function(..._e){return await De(B,_e,null,w)};K.arity=y(B),x.push(K)}else x.push(B)}var L=u.procedure.type==="path"?u.procedure.steps[0].value:u.procedure.value;try{typeof p=="object"&&(p.token=L,p.position=u.position),l=await De(p,x,v,w)}catch(B){throw B.position||(B.position=u.position),B.token||(B.token=L),B}return l}async function De(u,v,w,a){var l;for(l=await de(u,v,w,a);z(l)&&l.thunk===!0;){var p=await D(l.body.procedure,l.input,l.environment);l.body.procedure.type==="variable"&&(p.token=l.body.procedure.value),p.position=l.body.procedure.position;for(var x=[],P=0;P<l.body.arguments.length;P++)x.push(await D(l.body.arguments[P],l.input,l.environment));l=await de(p,x,w,a)}return l}async function de(u,v,w,a){var l;try{var p=v;if(u&&(p=St(u.signature,v,w)),z(u))l=await it(u,p);else if(u&&u._jsonata_function===!0){var x={environment:a,input:w,options:a.base.options,createSequence:a.base.createSequence};l=u.implementation.apply(x,p),H(l)&&(l=l.next().value),S(l)&&(l=await l)}else if(typeof u=="function")l=u.apply(w,p),S(l)&&(l=await l);else throw{code:"T1006",stack:new Error().stack}}catch(P){throw u&&(typeof P.token>"u"&&typeof u.token<"u"&&(P.token=u.token),P.position=u.position||P.position),P}return l}function mt(u,v,w){var a={_jsonata_lambda:!0,input:v,environment:w,arguments:u.arguments,signature:u.signature,body:u.body};return u.thunk===!0&&(a.thunk=!0),a.apply=async function(l,p){return await De(a,p,v,l?l.environment:w)},a}async function Gt(u,v,w){for(var a,l=[],p=0;p<u.arguments.length;p++){var x=u.arguments[p];x.type==="operator"&&x.value==="?"?l.push(x):l.push(await D(x,v,w))}var P=await D(u.procedure,v,w);if(typeof P>"u"&&u.procedure.type==="path"&&w.lookup(u.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:u.position,token:u.procedure.steps[0].value};if(z(P))a=Pt(P,l,w);else if(P&&P._jsonata_function===!0)a=Ps(P.implementation,l,w);else if(typeof P=="function")a=Ps(P,l,w);else throw{code:"T1008",stack:new Error().stack,position:u.position,token:u.procedure.type==="path"?u.procedure.steps[0].value:u.procedure.value};return a}function St(u,v,w){if(typeof u>"u")return v;var a=u.validate(v,w);return a}async function it(u,v){var w,a=ts(u.environment);return Array.prototype.forEach.call(u.arguments,function(l,p){a.bind(l.value,v[p])}),typeof u.body=="function"?w=await Or(u.body,a):w=await D(u.body,u.input,a),w}function Pt(u,v,w){var a=ts(u.environment||w),l=[];Array.prototype.forEach.call(u.arguments,function(x,P){var L=v[P];L&&L.type==="operator"&&L.value==="?"?l.push(x):a.bind(x.value,L)});var p={_jsonata_lambda:!0,input:u.input,environment:a,arguments:l,body:u.body};return p}function Ps(u,v,w){var a=Tr(u);a=a.map(function(P){return"$"+P.trim()});var l="function("+a.join(", ")+"){ _ }",p=d(l);p.body=u;var x=Pt(p,v,w);return x}async function Or(u,v){var w=Tr(u),a=w.map(function(x){return v.lookup(x.trim())}),l={environment:v,createSequence:v.base.createSequence},p=u.apply(l,a);return S(p)&&(p=await p),p}function Tr(u){var v=u.toString(),w=/\(([^)]*)\)/.exec(v)[1],a=w.split(",");return a}function J(u,v){var w={_jsonata_function:!0,implementation:u};return typeof v<"u"&&(w.signature=g(v)),w}async function hn(u,v){if(!(typeof u>"u")){var w=this.input;typeof v<"u"&&(w=v,Array.isArray(w)&&!E(w)&&(w=this.createSequence(w),w.outerWrapper=!0));try{var a=d(u,!1)}catch(p){throw ds(p),{stack:new Error().stack,code:"D3120",value:p.message,error:p}}try{var l=await D(a,w,this.environment)}catch(p){throw ds(p),{stack:new Error().stack,code:"D3121",value:p.message,error:p}}return l}}function un(u){if(!(typeof u>"u"))return JSON.parse(o.string(u))}function ts(u){var v=Object.create(null);const w={bind:function(l,p){v[l]=p},lookup:function(l){var p;return Object.prototype.hasOwnProperty.call(v,l)?p=v[l]:u&&(p=u.lookup(l)),p},timestamp:u?u.timestamp:null,async:u?u.async:!1,isParallelCall:u?u.isParallelCall:!1,global:u?u.global:{ancestry:[null]}};if(u){var a=u.lookup(Symbol.for("jsonata.__createFrame_push"));a&&a(u,w),w.base=u.base}return w}C.bind("sum",J(o.sum,"<a<n>:n>")),C.bind("count",J(o.count,"<a:n>")),C.bind("max",J(o.max,"<a<n>:n>")),C.bind("min",J(o.min,"<a<n>:n>")),C.bind("average",J(o.average,"<a<n>:n>")),C.bind("string",J(o.string,"<x-b?:s>")),C.bind("substring",J(o.substring,"<s-nn?:s>")),C.bind("substringBefore",J(o.substringBefore,"<s-s:s>")),C.bind("substringAfter",J(o.substringAfter,"<s-s:s>")),C.bind("lowercase",J(o.lowercase,"<s-:s>")),C.bind("uppercase",J(o.uppercase,"<s-:s>")),C.bind("length",J(o.length,"<s-:n>")),C.bind("trim",J(o.trim,"<s-:s>")),C.bind("pad",J(o.pad,"<s-ns?:s>")),C.bind("match",J(o.match,"<s-f<s:o>n?:a<o>>")),C.bind("contains",J(o.contains,"<s-(sf):b>")),C.bind("replace",J(o.replace,"<s-(sf)(sf)n?:s>")),C.bind("split",J(o.split,"<s-(sf)n?:a<s>>")),C.bind("join",J(o.join,"<a<s>s?:s>")),C.bind("formatNumber",J(o.formatNumber,"<n-so?:s>")),C.bind("formatBase",J(o.formatBase,"<n-n?:s>")),C.bind("formatInteger",J(n.formatInteger,"<n-s:s>")),C.bind("parseInteger",J(n.parseInteger,"<s-s:n>")),C.bind("number",J(o.number,"<(nsb)-:n>")),C.bind("floor",J(o.floor,"<n-:n>")),C.bind("ceil",J(o.ceil,"<n-:n>")),C.bind("round",J(o.round,"<n-n?:n>")),C.bind("abs",J(o.abs,"<n-:n>")),C.bind("sqrt",J(o.sqrt,"<n-:n>")),C.bind("power",J(o.power,"<n-n:n>")),C.bind("random",J(o.random,"<:n>")),C.bind("boolean",J(o.boolean,"<x-:b>")),C.bind("not",J(o.not,"<x-:b>")),C.bind("map",J(o.map,"<af>")),C.bind("zip",J(o.zip,"<a+>")),C.bind("filter",J(o.filter,"<af>")),C.bind("single",J(o.single,"<af?>")),C.bind("reduce",J(o.foldLeft,"<afj?:j>")),C.bind("sift",J(o.sift,"<o-f?:o>")),C.bind("keys",J(o.keys,"<x-:a<s>>")),C.bind("lookup",J(o.lookup,"<x-s:x>")),C.bind("append",J(o.append,"<xx:a>")),C.bind("exists",J(o.exists,"<x:b>")),C.bind("spread",J(o.spread,"<x-:a<o>>")),C.bind("merge",J(o.merge,"<a<o>:o>")),C.bind("reverse",J(o.reverse,"<a:a>")),C.bind("each",J(o.each,"<o-f:a>")),C.bind("error",J(o.error,"<s?:x>")),C.bind("assert",J(o.assert,"<bs?:x>")),C.bind("type",J(o.type,"<x:s>")),C.bind("sort",J(o.sort,"<af?:a>")),C.bind("shuffle",J(o.shuffle,"<a:a>")),C.bind("distinct",J(o.distinct,"<x:x>")),C.bind("base64encode",J(o.base64encode,"<s-:s>")),C.bind("base64decode",J(o.base64decode,"<s-:s>")),C.bind("encodeUrlComponent",J(o.encodeUrlComponent,"<s-:s>")),C.bind("encodeUrl",J(o.encodeUrl,"<s-:s>")),C.bind("decodeUrlComponent",J(o.decodeUrlComponent,"<s-:s>")),C.bind("decodeUrl",J(o.decodeUrl,"<s-:s>")),C.bind("eval",J(hn,"<sx?:x>")),C.bind("toMillis",J(n.toMillis,"<s-s?:n>")),C.bind("fromMillis",J(n.fromMillis,"<n-s?s?:s>")),C.bind("clone",J(un,"<(oa)-:o>"));var hi={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",D1011:"Stack overflow. Check for non-terminating recursive function. Consider rewriting as tail-recursive",D1012:"Evaluation timeout after {{value}} milliseconds. Check for infinite loop",D1013:"Object property names starting with _jsonata_ are reserved for internal use: {{value}}",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e7. Attempted to allocate {{value}}.",D2015:"The maximum sequence length of {{value}} was exceeded.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function ds(u){var v=hi[u.code];if(typeof v<"u"){var w=v.replace(/\{\{\{([^}]+)}}}/g,function(){return u[arguments[1]]});w=w.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(u[arguments[1]])}),u.message=w}}function lr(u,v){var w,a;try{w=d(u,v&&v.recover),a=w.errors,delete w.errors}catch(x){throw ds(x),x}var l=ts(C),p=new Date;return l.bind("now",J(function(x,P){return n.fromMillis(p.getTime(),x,P)},"<s?s?:s>")),l.bind("millis",J(function(){return p.getTime()},"<:n>")),{evaluate:async function(x,P,L){if(typeof a<"u"){var B={code:"S0500",position:0};throw ds(B),B}const K=ts(l);for(const oe of c.keys(P))K.bind(oe,P[oe]);if(K.bind("$",x),p=new Date,K.timestamp=p,K.options=v,K.createSequence=function(){var oe=[];return v&&v.sequence&&(oe.push=function(...je){if(oe.length+je.length>v.sequence)throw{code:"D2015",stack:new Error().stack,value:v.sequence};return Array.prototype.push.apply(oe,je)}),oe.sequence=!0,arguments.length===1&&oe.push(arguments[0]),oe},Array.isArray(x)&&!E(x)&&(x=K.createSequence(x),x.outerWrapper=!0),v&&(v.timeout||v.stack)){const oe=Date.now();K.guardrails=function(){if(v.stack>0&&K.depth>v.stack)throw{code:"D1011",value:v.stack,stack:new Error().stack};if(v.timeout>0&&Date.now()-oe>v.timeout)throw{code:"D1012",value:v.timeout,stack:new Error().stack}}}else K.guardrails=function(){};K.base=K,K.depth=0,v&&v.RegexEngine?K.RegexEngine=v.RegexEngine:K.RegexEngine=RegExp;var _e;try{return _e=await D(w,x,K),typeof L=="function"&&L(null,_e),_e}catch(oe){throw ds(oe),oe}},assign:function(x,P){l.bind(x,P)},registerFunction:function(x,P,L){var B=J(P,L);l.bind(x,B)},ast:function(){return w},errors:function(){return a}}}return lr.parser=d,lr})();r.exports=A},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(s,r,i){var n=s("./signature");const o=(()=>{var c={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},d={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
73
+ `,r:"\r",t:" "},g=function(m){var f=0,k=m.length,E=function(H,S){var y={type:H,value:S,position:f};return y},O=function(){for(var H=f,S=0,y,I,C=function(Y){if(m.charAt(Y)==="/"&&S===0){for(var j=0;m.charAt(Y-(j+1))==="\\";)j++;if(j%2===0)return!0}return!1};f<k;){var D=m.charAt(f);if(C(f)){if(y=m.substring(H,f),y==="")throw{code:"S0301",stack:new Error().stack,position:f};for(f++,D=m.charAt(f),H=f;D==="i"||D==="m";)f++,D=m.charAt(f);return I=m.substring(H,f)+"g",new RegExp(y,I)}(D==="("||D==="["||D==="{")&&m.charAt(f-1)!=="\\"&&S++,(D===")"||D==="]"||D==="}")&&m.charAt(f-1)!=="\\"&&S--,f++}throw{code:"S0302",stack:new Error().stack,position:f}},z=function(H){if(f>=k)return null;for(var S=m.charAt(f);f<k&&`
74
+ \r\v`.indexOf(S)>-1;)f++,S=m.charAt(f);if(S==="/"&&m.charAt(f+1)==="*"){var y=f;for(f+=2,S=m.charAt(f);!(S==="*"&&m.charAt(f+1)==="/");)if(S=m.charAt(++f),f>=k)throw{code:"S0106",stack:new Error().stack,position:y};return f+=2,S=m.charAt(f),z(H)}if(H!==!0&&S==="/")return f++,E("regex",O());if(S==="."&&m.charAt(f+1)===".")return f+=2,E("operator","..");if(S===":"&&m.charAt(f+1)==="=")return f+=2,E("operator",":=");if(S==="!"&&m.charAt(f+1)==="=")return f+=2,E("operator","!=");if(S===">"&&m.charAt(f+1)==="=")return f+=2,E("operator",">=");if(S==="<"&&m.charAt(f+1)==="=")return f+=2,E("operator","<=");if(S==="*"&&m.charAt(f+1)==="*")return f+=2,E("operator","**");if(S==="~"&&m.charAt(f+1)===">")return f+=2,E("operator","~>");if(S==="?"&&m.charAt(f+1)===":")return f+=2,E("operator","?:");if(S==="?"&&m.charAt(f+1)==="?")return f+=2,E("operator","??");if(Object.prototype.hasOwnProperty.call(c,S))return f++,E("operator",S);if(S==='"'||S==="'"){var I=S;f++;for(var C="";f<k;){if(S=m.charAt(f),S==="\\")if(f++,S=m.charAt(f),Object.prototype.hasOwnProperty.call(d,S))C+=d[S];else if(S==="u"){var D=m.substr(f+1,4);if(/^[0-9a-fA-F]+$/.test(D)){var Y=parseInt(D,16);C+=String.fromCharCode(Y),f+=4}else throw{code:"S0104",stack:new Error().stack,position:f}}else throw{code:"S0103",stack:new Error().stack,position:f,token:S};else{if(S===I)return f++,E("string",C);C+=S}f++}throw{code:"S0101",stack:new Error().stack,position:f}}var j=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,ne=j.exec(m.substring(f));if(ne!==null){var re=parseFloat(ne[0]);if(!isNaN(re)&&isFinite(re))return f+=ne[0].length,E("number",re);throw{code:"S0102",stack:new Error().stack,position:f,token:ne[0]}}var ie;if(S==="`"){f++;var U=m.indexOf("`",f);if(U!==-1)return ie=m.substring(f,U),f=U+1,E("name",ie);throw f=k,{code:"S0105",stack:new Error().stack,position:f}}for(var le=f,pe;;)if(pe=m.charAt(le),le===k||`
75
+ \r\v`.indexOf(pe)>-1||Object.prototype.hasOwnProperty.call(c,pe)){if(m.charAt(f)==="$")return ie=m.substring(f+1,le),f=le,E("variable",ie);switch(ie=m.substring(f,le),f=le,ie){case"or":case"in":case"and":return E("operator",ie);case"true":return E("value",!0);case"false":return E("value",!1);case"null":return E("value",null);default:return f===k&&ie===""?null:E("name",ie)}}else le++};return z},A=function(m,f){var k,E,O=Object.create(null),z=[],H=function(){var b=[];k.id!=="(end)"&&b.push({type:k.type,value:k.value,position:k.position});for(var _=E();_!==null;)b.push(_),_=E();return b},S={nud:function(){var b={code:"S0211",token:this.value,position:this.position};if(f)return b.remaining=H(),b.type="error",z.push(b),b;throw b.stack=new Error().stack,b}},y=function(b,_){var te=O[b];return _=_||0,te?_>=te.lbp&&(te.lbp=_):(te=Object.create(S),te.id=te.value=b,te.lbp=_,O[b]=te),te},I=function(b){if(f){b.remaining=H(),z.push(b);var _=O["(error)"];return k=Object.create(_),k.error=b,k.type="(error)",k}else throw b.stack=new Error().stack,b},C=function(b,_){if(b&&k.id!==b){var te;k.id==="(end)"?te="S0203":te="S0202";var we={code:te,position:k.position,token:k.value,value:b};return I(we)}var Pe=E(_);if(Pe===null)return k=O["(end)"],k.position=m.length,k;var Ee=Pe.value,T=Pe.type,M;switch(T){case"name":case"variable":M=O["(name)"];break;case"operator":if(M=O[Ee],!M)return I({code:"S0204",stack:new Error().stack,position:Pe.position,token:Ee});break;case"string":case"number":case"value":M=O["(literal)"];break;case"regex":T="regex",M=O["(regex)"];break;default:return I({code:"S0205",stack:new Error().stack,position:Pe.position,token:Ee})}return k=Object.create(M),k.value=Ee,k.type=T,k.position=Pe.position,k},D=function(b){var _,te=k;for(C(null,!0),_=te.nud();b<k.lbp;)te=k,C(),_=te.led(_);return _},Y=function(b){var _=y(b,0);_.nud=function(){return this}},j=function(b,_,te){var we=_||c[b],Pe=y(b,we);return Pe.led=te||function(Ee){return this.lhs=Ee,this.rhs=D(we),this.type="binary",this},Pe},ne=function(b,_,te){var we=y(b,_);return we.led=te,we},re=function(b,_){var te=y(b);return te.nud=_||function(){return this.expression=D(70),this.type="unary",this},te};Y("(end)"),Y("(name)"),Y("(literal)"),Y("(regex)"),y(":"),y(";"),y(","),y(")"),y("]"),y("}"),y(".."),j("."),j("+"),j("-"),j("*"),j("/"),j("%"),j("="),j("<"),j(">"),j("!="),j("<="),j(">="),j("&"),j("and"),j("or"),j("in"),Y("and"),Y("or"),Y("in"),re("-"),j("~>"),j("??",c["??"],function(b){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(b))]},this.then=b,this.else=D(0),this}),ne("(error)",10,function(b){return this.lhs=b,this.error=k.error,this.remaining=H(),this.type="error",this}),re("*",function(){return this.type="wildcard",this}),re("**",function(){return this.type="descendant",this}),re("%",function(){return this.type="parent",this}),j("(",c["("],function(b){if(this.procedure=b,this.type="function",this.arguments=[],k.id!==")")for(;k.type==="operator"&&k.id==="?"?(this.type="partial",this.arguments.push(k),C("?")):this.arguments.push(D(0)),k.id===",";)C(",");if(C(")",!0),b.type==="name"&&(b.value==="function"||b.value==="λ")){if(this.arguments.forEach(function(Ee,T){if(Ee.type!=="variable")return I({code:"S0208",stack:new Error().stack,position:Ee.position,token:Ee.value,value:T+1})}),this.type="lambda",k.id==="<"){for(var _=k.position,te=1,we="<";te>0&&k.id!=="{"&&k.id!=="(end)";){var Pe=C();Pe.id===">"?te--:Pe.id==="<"&&te++,we+=Pe.value}C(">");try{this.signature=n(we)}catch(Ee){return Ee.position=_+Ee.offset,I(Ee)}}C("{"),this.body=D(0),C("}")}return this}),re("(",function(){for(var b=[];k.id!==")"&&(b.push(D(0)),k.id===";");)C(";");return C(")",!0),this.type="block",this.expressions=b,this}),re("[",function(){var b=[];if(k.id!=="]")for(;;){var _=D(0);if(k.id===".."){var te={type:"binary",value:"..",position:k.position,lhs:_};C(".."),te.rhs=D(0),_=te}if(b.push(_),k.id!==",")break;C(",")}return C("]",!0),this.expressions=b,this.type="unary",this}),j("[",c["["],function(b){if(k.id==="]"){for(var _=b;_&&_.type==="binary"&&_.value==="[";)_=_.lhs;return _.keepArray=!0,C("]"),b}else return this.lhs=b,this.rhs=D(c["]"]),this.type="binary",C("]",!0),this}),j("^",c["^"],function(b){C("(");for(var _=[];;){var te={descending:!1};if(k.id==="<"?C("<"):k.id===">"&&(te.descending=!0,C(">")),te.expression=D(0),_.push(te),k.id!==",")break;C(",")}return C(")"),this.lhs=b,this.rhs=_,this.type="binary",this});var ie=function(b){var _=[];if(k.id!=="}")for(;;){var te=D(0);C(":");var we=D(0);if(_.push([te,we]),k.id!==",")break;C(",")}return C("}",!0),typeof b>"u"?(this.lhs=_,this.type="unary"):(this.lhs=b,this.rhs=_,this.type="binary"),this};re("{",ie),j("{",c["{"],ie),ne(":=",c[":="],function(b){return b.type!=="variable"?I({code:"S0212",stack:new Error().stack,position:b.position,token:b.value}):(this.lhs=b,this.rhs=D(c[":="]-1),this.type="binary",this)}),j("@",c["@"],function(b){return this.lhs=b,this.rhs=D(c["@"]),this.rhs.type!=="variable"?I({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),j("#",c["#"],function(b){return this.lhs=b,this.rhs=D(c["#"]),this.rhs.type!=="variable"?I({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),j("?",c["?"],function(b){return this.type="condition",this.condition=b,this.then=D(0),k.id===":"&&(C(":"),this.else=D(0)),this}),j("?:",c["?:"],function(b){return this.type="condition",this.condition=JSON.parse(JSON.stringify(b)),this.then=b,this.else=D(0),this}),re("|",function(){return this.type="transform",this.pattern=D(0),C("|"),this.update=D(0),k.id===","&&(C(","),this.delete=D(0)),C("|"),this});var U=function(b){var _;if(b.type==="function"&&!b.predicate){var te={type:"lambda",thunk:!0,arguments:[],position:b.position};te.body=b,_=te}else if(b.type==="condition")b.then=U(b.then),typeof b.else<"u"&&(b.else=U(b.else)),_=b;else if(b.type==="block"){var we=b.expressions.length;we>0&&(b.expressions[we-1]=U(b.expressions[we-1])),_=b}else _=b;return _},le=0,pe=0,He=[],he=function(b,_){switch(b.type){case"name":case"wildcard":_.level--,_.level===0&&(typeof b.ancestor>"u"||(He[_.index].slot.label=b.ancestor.label),b.ancestor=_,b.tuple=!0);break;case"parent":_.level++;break;case"block":b.expressions.length>0&&(b.tuple=!0,_=he(b.expressions[b.expressions.length-1],_));break;case"path":b.tuple=!0;var te=b.steps.length-1;for(_=he(b.steps[te--],_);_.level>0&&te>=0;)_=he(b.steps[te--],_);break;default:throw{code:"S0217",token:b.type,position:b.position}}return _},ge=function(b,_){if(typeof _.seekingParent<"u"||_.type==="parent"){var te=typeof _.seekingParent<"u"?_.seekingParent:[];_.type==="parent"&&te.push(_.slot),typeof b.seekingParent>"u"?b.seekingParent=te:Array.prototype.push.apply(b.seekingParent,te)}},$e=function(b){var _=b.steps.length-1,te=b.steps[_],we=typeof te.seekingParent<"u"?te.seekingParent:[];te.type==="parent"&&we.push(te.slot);for(var Pe=0;Pe<we.length;Pe++){var Ee=we[Pe];for(_=b.steps.length-2;Ee.level>0;){if(_<0){typeof b.seekingParent>"u"?b.seekingParent=[Ee]:b.seekingParent.push(Ee);break}for(var T=b.steps[_--];_>=0&&T.focus&&b.steps[_].focus;)T=b.steps[_--];Ee=he(T,Ee)}}},ce=function(b){var _;switch(b.type){case"binary":switch(b.value){case".":var te=ce(b.lhs);te.type==="path"?_=te:_={type:"path",steps:[te]},te.type==="parent"&&(_.seekingParent=[te.slot]);var we=ce(b.rhs);we.type==="path"?Array.prototype.push.apply(_.steps,we.steps):(typeof we.predicate<"u"&&(we.stages=we.predicate,delete we.predicate),_.steps.push(we)),_.steps.filter(function(G){if(G.type==="number"||G.type==="value")throw{code:"S0213",stack:new Error().stack,position:G.position,value:G.value};return G.type==="string"}).forEach(function(G){G.type="name"}),_.steps.filter(function(G){return G.keepArray===!0}).length>0&&(_.keepSingletonArray=!0);var Pe=_.steps[0];Pe.type==="unary"&&Pe.value==="["&&(Pe.consarray=!0);var Ee=_.steps[_.steps.length-1];Ee.type==="unary"&&Ee.value==="["&&(Ee.consarray=!0),$e(_);break;case"[":_=ce(b.lhs);var T=_,M="predicate";if(_.type==="path"&&(T=_.steps[_.steps.length-1],M="stages"),typeof T.group<"u")throw{code:"S0209",stack:new Error().stack,position:b.position};typeof T[M]>"u"&&(T[M]=[]);var $=ce(b.rhs);typeof $.seekingParent<"u"&&($.seekingParent.forEach(G=>{G.level===1?he(T,G):G.level--}),ge(T,$)),T[M].push({type:"filter",expr:$,position:b.position});break;case"{":if(_=ce(b.lhs),typeof _.group<"u")throw{code:"S0210",stack:new Error().stack,position:b.position};_.group={lhs:b.rhs.map(function(G){return[ce(G[0]),ce(G[1])]}),position:b.position};break;case"^":_=ce(b.lhs),_.type!=="path"&&(_={type:"path",steps:[_]});var F={type:"sort",position:b.position};F.terms=b.rhs.map(function(G){var ae=ce(G.expression);return ge(F,ae),{descending:G.descending,expression:ae}}),_.steps.push(F),$e(_);break;case":=":_={type:"bind",value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),ge(_,_.rhs);break;case"@":if(_=ce(b.lhs),T=_,_.type==="path"&&(T=_.steps[_.steps.length-1]),typeof T.stages<"u"||typeof T.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:b.position};if(T.type==="sort")throw{code:"S0216",stack:new Error().stack,position:b.position};b.keepArray&&(T.keepArray=!0),T.focus=b.rhs.value,T.tuple=!0;break;case"#":_=ce(b.lhs),T=_,_.type==="path"?T=_.steps[_.steps.length-1]:(_={type:"path",steps:[_]},typeof T.predicate<"u"&&(T.stages=T.predicate,delete T.predicate)),typeof T.stages>"u"?T.index=b.rhs.value:T.stages.push({type:"index",value:b.rhs.value,position:b.position}),T.tuple=!0;break;case"~>":_={type:"apply",value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),_.keepArray=_.lhs.keepArray||_.rhs.keepArray;break;default:_={type:b.type,value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),ge(_,_.lhs),ge(_,_.rhs)}break;case"unary":_={type:b.type,value:b.value,position:b.position},b.value==="["?_.expressions=b.expressions.map(function(G){var ae=ce(G);return ge(_,ae),ae}):b.value==="{"?_.lhs=b.lhs.map(function(G){var ae=ce(G[0]);ge(_,ae);var Ce=ce(G[1]);return ge(_,Ce),[ae,Ce]}):(_.expression=ce(b.expression),b.value==="-"&&_.expression.type==="number"?(_=_.expression,_.value=-_.value):ge(_,_.expression));break;case"function":case"partial":_={type:b.type,name:b.name,value:b.value,position:b.position},_.arguments=b.arguments.map(function(G){var ae=ce(G);return ge(_,ae),ae}),_.procedure=ce(b.procedure);break;case"lambda":_={type:b.type,arguments:b.arguments,signature:b.signature,position:b.position};var q=ce(b.body);_.body=U(q);break;case"condition":_={type:b.type,position:b.position},_.condition=ce(b.condition),ge(_,_.condition),_.then=ce(b.then),ge(_,_.then),typeof b.else<"u"&&(_.else=ce(b.else),ge(_,_.else));break;case"transform":_={type:b.type,position:b.position},_.pattern=ce(b.pattern),_.update=ce(b.update),typeof b.delete<"u"&&(_.delete=ce(b.delete));break;case"block":_={type:b.type,position:b.position},_.expressions=b.expressions.map(function(G){var ae=ce(G);return ge(_,ae),(ae.consarray||ae.type==="path"&&ae.steps[0].consarray)&&(_.consarray=!0),ae});break;case"name":_={type:"path",steps:[b]},b.keepArray&&(_.keepSingletonArray=!0);break;case"parent":_={type:"parent",slot:{label:"!"+le++,level:1,index:pe++}},He.push(_);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":_=b;break;case"operator":if(b.value==="and"||b.value==="or"||b.value==="in")b.type="name",_=ce(b);else if(b.value==="?")_=b;else throw{code:"S0201",stack:new Error().stack,position:b.position,token:b.value};break;case"error":_=b,b.lhs&&(_=ce(b.lhs));break;default:var V="S0206";b.id==="(end)"&&(V="S0207");var N={code:V,position:b.position,token:b.value};if(f)return z.push(N),{type:"error",error:N};throw N.stack=new Error().stack,N}return b.keepArray&&(_.keepArray=!0),_};E=g(m),C();var W=D(0);if(k.id!=="(end)"){var Ae={code:"S0201",position:k.position,token:k.value};I(Ae)}if(W=ce(W),W.type==="parent"||typeof W.seekingParent<"u")throw{code:"S0217",token:W.type,position:W.position};return z.length>0&&(W.errors=z),W};return A})();r.exports=o},{"./signature":5}],5:[function(s,r,i){var n=s("./utils");const o=(()=>{var c={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function d(g){for(var A=1,m=[],f=Object.create(null),k=f;A<g.length;){var E=g.charAt(A);if(E===":")break;var O=function(){m.push(f),k=f,f=Object.create(null)},z=function(j,ne,re,ie){for(var U=1,le=ne;le<j.length;)if(le++,E=j.charAt(le),E===ie){if(U--,U===0)break}else E===re&&U++;return le};switch(E){case"s":case"n":case"b":case"l":case"o":f.regex="["+E+"m]",f.type=E,O();break;case"a":f.regex="[asnblfom]",f.type=E,f.array=!0,O();break;case"f":f.regex="f",f.type=E,O();break;case"j":f.regex="[asnblom]",f.type=E,O();break;case"x":f.regex="[asnblfom]",f.type=E,O();break;case"-":k.context=!0,k.contextRegex=new RegExp(k.regex),k.regex+="?";break;case"?":case"+":k.regex+=E;break;case"(":var H=z(g,A,"(",")"),S=g.substring(A+1,H);if(S.indexOf("<")===-1)f.regex="["+S+"m]";else throw{code:"S0402",stack:new Error().stack,value:S,offset:A};f.type="("+S+")",A=H,O();break;case"<":if(k.type==="a"||k.type==="f"){var y=z(g,A,"<",">");k.subtype=g.substring(A+1,y),A=y}else throw{code:"S0401",stack:new Error().stack,value:k.type,offset:A};break}A++}var I="^"+m.map(function(j){return"("+j.regex+")"}).join("")+"$",C=new RegExp(I),D=function(j){var ne;if(n.isFunction(j))ne="f";else{var re=typeof j;switch(re){case"string":ne="s";break;case"number":ne="n";break;case"boolean":ne="b";break;case"object":j===null?ne="l":Array.isArray(j)?ne="a":ne="o";break;case"undefined":default:ne="m"}}return ne},Y=function(j,ne){for(var re="^",ie=0,U=0;U<m.length;U++){re+=m[U].regex;var le=ne.match(re);if(le===null)throw{code:"T0410",stack:new Error().stack,value:j[ie],index:ie+1};ie=le[0].length}throw{code:"T0410",stack:new Error().stack,value:j[ie],index:ie+1}};return{definition:g,validate:function(j,ne){var re="";j.forEach(function(pe){re+=D(pe)});var ie=C.exec(re);if(ie){var U=[],le=0;return m.forEach(function(pe,He){var he=j[le],ge=ie[He+1];if(ge==="")if(pe.context&&pe.contextRegex){var $e=D(ne);if(pe.contextRegex.test($e))U.push(ne);else throw{code:"T0411",stack:new Error().stack,value:ne,index:le+1}}else U.push(he),le++;else ge.split("").forEach(function(ce){if(he=j[le],pe.type==="a"){if(ce==="m")he=void 0;else{var W=!0;if(typeof pe.subtype<"u"){if(ce!=="a"&&ge!==pe.subtype)W=!1;else if(ce==="a"&&he.length>0){var Ae=D(he[0]);if(Ae!==pe.subtype.charAt(0))W=!1;else{var b=he.filter(function(_){return D(_)!==Ae});W=b.length===0}}}if(!W)throw{code:"T0412",stack:new Error().stack,value:he,index:le+1,type:c[pe.subtype]};ce!=="a"&&(he=[he])}U.push(he),le++}else U.push(he),le++})}),U}Y(j,re)}}}return d})();r.exports=o},{"./utils":6}],6:[function(s,r,i){const n=(()=>{function o(y){var I=!1;if(typeof y=="number"&&(I=!isNaN(y),I&&!isFinite(y)))throw{code:"D1001",value:y,stack:new Error().stack};return I}function c(y){var I=!1;return Array.isArray(y)&&(I=y.filter(function(C){return typeof C!="string"}).length===0),I}function d(y){var I=!1;return Array.isArray(y)&&(I=y.filter(function(C){return!o(C)}).length===0),I}function g(y){return y.sequence===!0&&Array.isArray(y)}function A(y){return y&&(y._jsonata_function===!0||y._jsonata_lambda===!0)||typeof y=="function"}function m(y){var I=typeof y.arity=="number"?y.arity:typeof y.implementation=="function"?y.implementation.length:typeof y.length=="number"?y.length:y.arguments.length;return I}function f(y){return y&&y._jsonata_lambda===!0}var k=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function E(y){return typeof y=="object"&&y!==null&&k in y&&"next"in y&&typeof y.next=="function"}function O(y,I){if(y===I)return!0;if(typeof y=="object"&&typeof I=="object"&&y!==null&&I!==null){if(Array.isArray(y)&&Array.isArray(I)){if(y.length!==I.length)return!1;for(var C=0;C<y.length;C++)if(!O(y[C],I[C]))return!1;return!0}var D=Object.getOwnPropertyNames(y),Y=Object.getOwnPropertyNames(I);if(D.length!==Y.length)return!1;for(D=D.sort(),Y=Y.sort(),C=0;C<D.length;C++)if(D[C]!==Y[C])return!1;for(C=0;C<D.length;C++){var j=D[C];if(!O(y[j],I[j]))return!1}return!0}return!1}function z(y){return typeof y=="object"&&y!==null&&"then"in y&&typeof y.then=="function"}function H(y){var I=[];for(let C of y)I.push(C);return I}function S(y){return typeof y=="object"&&y!==null?Object.keys(y):[]}return{isNumeric:o,isArrayOfStrings:c,isArrayOfNumbers:d,isSequence:g,isFunction:A,isLambda:f,isIterable:E,getFunctionArity:m,isDeepEqual:O,stringToArray:H,isPromise:z,keys:S}})();r.exports=n},{}]},{},[3])(3)})})(In)),In.exports}var lh=ah();const ch=ia(lh);function hh(t){t.registerFunction("ucFirst",e=>Ir.ucFirst(String(e??""))),t.registerFunction("currency",(e,s="fr-FR",r="EUR")=>{const i=Number(e);return Number.isNaN(i)?String(e??""):new Intl.NumberFormat(String(s),{style:"currency",currency:String(r)}).format(i)}),t.registerFunction("percent",(e,s="fr-FR",r=0)=>{const i=Number(e);return Number.isNaN(i)?String(e??""):new Intl.NumberFormat(String(s),{style:"percent",maximumFractionDigits:Number(r)||0}).format(i)}),t.registerFunction("date",(e,s="fr-FR",r)=>{const i=e instanceof Date?e:new Date(String(e));if(Number.isNaN(i.getTime()))return String(e??"");let n={dateStyle:"medium"};if(r)try{n=JSON.parse(String(r))}catch{}return new Intl.DateTimeFormat(String(s),n).format(i)}),t.registerFunction("toChart",(e,s="label",r="value",i="")=>{const n=Array.isArray(e)?e:[],o=[],c=[];for(const d of n){if(!d||typeof d!="object")continue;const g=d;o.push(String(g[String(s)]??"")),c.push(Number(g[String(r)]??0))}return{labels:o,datasets:[{label:String(i||""),data:c}]}})}const aa=new Map,la=8e3;function uh(t){if(!t||!t.trim())throw new Error("[sonic-jsonata] expression vide.");if(t.length>la)throw new Error(`[sonic-jsonata] expression trop longue (${t.length} > ${la}).`);const e=aa.get(t);if(e)return e;try{const s=ch(t);return hh(s),aa.set(t,s),s}catch(s){const r=s instanceof Error?s.message:typeof s=="object"&&s&&"message"in s?String(s.message):String(s);throw new Error(`[sonic-jsonata] Syntaxe JSONata invalide : ${r}`)}}function dh(t,e){if(!e||typeof e!="object")return;const s=e.type;if(typeof s=="string"&&!(s==="array"&&Array.isArray(t)||s==="object"&&t!==null&&typeof t=="object"&&!Array.isArray(t)||s==="string"&&typeof t=="string"||s==="number"&&typeof t=="number"||s==="boolean"&&typeof t=="boolean"||s==="null"&&t===null))throw new Error(`[sonic-jsonata] outputSchema : type attendu "${s}", reçu ${ph(t)}.`);if(Array.isArray(e.required)&&t&&typeof t=="object"){const r=t;for(const i of e.required)if(typeof i=="string"&&!(i in r))throw new Error(`[sonic-jsonata] outputSchema : propriété requise manquante "${i}".`)}}function ph(t){return t===null?"null":Array.isArray(t)?"array":typeof t}const fh=150,ca=10,mh=200,gh=16,ha=new WeakMap;let ua=!1;function ms(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function vr(t){if(t===window)return{x:window.scrollX,y:window.scrollY};const e=t;return{x:e.scrollLeft,y:e.scrollTop}}function bh(t,e,s){if(t===window){window.scrollTo(e,s);return}const r=t;typeof r.scrollTo=="function"?r.scrollTo(e,s):(r.scrollLeft=e,r.scrollTop=s)}function vh(t){if(t===window){const s=document.documentElement;return Math.max(0,s.scrollHeight-window.innerHeight)}const e=t;return Math.max(0,e.scrollHeight-e.clientHeight)}function Zs(t){let e=ha.get(t);if(!e){const s=vr(t);e={x:s.x,y:s.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},ha.set(t,e)}return e}function Ii(t){Zs(t).userEngaged=!0}function Ni(t){const e=Zs(t);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},fh)}function da(t,e){return e-t>=mh}function yr(t){if(!ms())return;const e=Zs(t);if(e.restoring)return;const s=vr(t);if(da(s.y,e.y)){Fn(t);return}e.x=s.x,e.y=s.y}function Nn(t){if(!ms())return;const e=Zs(t),s=vh(t),r=e.x,i=s>0?Math.min(e.y,s):e.y,{x:n,y:o}=vr(t);if(!(Math.abs(r-n)<=ca&&Math.abs(i-o)<=ca)){e.restoring=!0;try{bh(t,r,i)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function yh(t,e={x:0,y:0}){if(!ms())return;const s=Zs(t);if(e==="current"){const r=vr(t);s.x=r.x,s.y=r.y;return}s.x=e.x??0,s.y=e.y??0}function Fn(t){const e=Zs(t);if(e.stickyFrames=gh,e.raf)return;const s=()=>{e.raf=0,Nn(t),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(s))};e.raf=requestAnimationFrame(s)}function Rn(t){Fn(t)}function Js(t){if(!ms())return;const e=Zs(t);if(e.watching)return;e.watching=!0;const s=t===window?window:t,r=()=>{if(e.restoring)return;const{y:E}=vr(t);if(da(E,e.y)){Fn(t);return}if(e.userEngaged){yr(t),Ni(t);return}yr(t)},i=E=>pa(E)===t,n=E=>{i(E)&&(yr(t),Ii(t))},o=E=>{i(E)&&Ni(t)},c=E=>{i(E)&&(yr(t),Ii(t),Ni(t))};s.addEventListener("scroll",r,{passive:!0}),s.addEventListener("touchstart",n,{passive:!0}),s.addEventListener("touchend",o,{passive:!0}),s.addEventListener("touchcancel",o,{passive:!0}),s.addEventListener("wheel",c,{passive:!0}),s.addEventListener("pointerdown",n,{passive:!0}),s.addEventListener("pointerup",o,{passive:!0}),s.addEventListener("pointercancel",o,{passive:!0});const d=vr(t);if(e.x=d.x,e.y=d.y,t===window){const E=new ResizeObserver(()=>Rn(window));E.observe(document.documentElement),e.resizeObserver=E;return}const g=t,A=new ResizeObserver(()=>Rn(g));A.observe(g);for(const E of Array.from(g.children))A.observe(E);e.resizeObserver=A;const m=()=>Rn(g),f=new MutationObserver(E=>{for(const O of E)if(O.type==="childList")for(const z of Array.from(O.addedNodes))z instanceof Element&&A.observe(z);m()});f.observe(g,{childList:!0,subtree:!0,characterData:!0});const k=g.getRootNode();k instanceof ShadowRoot&&k.host&&f.observe(k.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=f}function pa(t){for(const e of t.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&fa(e))return e;return window}function fa(t){if(!(t instanceof HTMLElement)||t===document.documentElement||t===document.body)return!1;const e=getComputedStyle(t).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function jn(t){for(const s of t.composedPath())s===window||s===document||s instanceof HTMLElement&&fa(s)&&Js(s);const e=pa(t);Js(e),t.type==="wheel"?(yr(e),Ii(e),Ni(e)):(t.type==="touchstart"||t.type==="pointerdown")&&(yr(e),Ii(e))}function Fi(t){t instanceof Element&&t.classList?.contains("custom-scroll")&&Js(t),t.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&Js(e)})}function zn(t){Fi(t),new MutationObserver(s=>{for(const r of s)for(const i of Array.from(r.addedNodes))i instanceof Element&&Fi(i)}).observe(t,{childList:!0,subtree:!0})}function Un(t){t.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(zn(e.shadowRoot),Un(e.shadowRoot))})}function wh(){const t=Element.prototype;if(t.__safariScrollGuardPatched)return;t.__safariScrollGuardPatched=!0;const e=t.attachShadow;t.attachShadow=function(r){const i=e.call(this,r);return zn(i),i}}function ma(){if(typeof window>"u"||ua||(ua=!0,!ms()))return;Js(window),wh();const t={capture:!0,passive:!0};window.addEventListener("wheel",jn,t),window.addEventListener("touchstart",jn,t),window.addEventListener("pointerdown",jn,t);const e=()=>{Fi(document),Un(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(r=>{for(const i of r)for(const n of Array.from(i.addedNodes))n instanceof Element&&(Fi(n),n.shadowRoot&&zn(n.shadowRoot),Un(n))}).observe(document.documentElement,{childList:!0,subtree:!0})}const _h=Kl,Sh=Kc,Ph=_i,xh=Ir,gs=ze,Ah=dt,Kr=ht,Ch=Os,kh=fs;ma(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:_h,Arrays:Sh,DataBindObserver:Ph,Format:xh,HTML:gs,LocationHandler:Ah,Objects:Kr,PublisherManager:ve,api:Ch,URLPattern:kh,Endpoint:Ei,DataProviderKey:Cs};var $h=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,Gr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Dh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&$h(e,s,i),i};const qn=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{const r=this.getAttribute("name"),i=this.getCheckAllPublisher(),n=this.getFormPublisher();if(i?.hasCheckAll.get()&&!this.checksAll()&&i&&n&&r){if(this.getFormPublisherValue()?.length)(this.checked===null||i.checkMode.get()=="noneChecked"||i.checkMode.get()==null)&&i.checkMode.set("someUnchecked");else{i.checkMode.set("noneChecked");return}const o=this.getFormPublisherValue(),c=i.values.get();if(c&&c.length){let d=c.length;for(const g of c)o.indexOf(g)==-1&&(d-=1);d==c.length&&i.checkMode.set("allChecked"),d==0&&i.checkMode.set("noneChecked")}c.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(this.checked=null)}},this.onChecksAllRequest=r=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),r=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),r=="noneChecked"&&(this.checked=null),r=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(r){if(this.value==r||(this.hasAttribute("value")&&!this.forceAutoFill&&(r=this.getAttribute("value")),this._value==r)||r==null||(this._value=r,!this.value))return;if(this.getFormPublisher()&&this.name){let n=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=n==r?!0:null),Array.isArray(n)||(n=[]),n.indexOf(r)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(r){if(this.setCheckedValue(r),this.checksAll()){const i=this.getCheckAllPublisher();i&&(this.checked===!0?i.checkMode.set("allChecked"):this.checked===null&&(i.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const r=this.shadowRoot?.querySelector("input");if(!r||r.checkValidity())return;const i=this.getFormPublisher();if(i){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;i.isFormValid=!1,r.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(r){this._checked!=r&&(this._checked=r,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const r=this.checked===!0?this.radio?!0:null:!0;this.checked=r;const i=new Event("change");this.dispatchEvent(i)}getValueForFormPublisher(){let r=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:r;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(r)||(r=[]);const i=r.slice(0),n=i.indexOf(this.value);return this.checked===!0&&n===-1&&!this.checksAll()&&i.push(this.value),this.checked===null&&n!==-1&&i.splice(n,1),i}setFormValueFromPublisher(r){if(this.unique||this.radio){this.checked=this.value==r?!0:null;return}Array.isArray(r)||(r=[]),!this.checksAll()&&(this.checked=r.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const r=this.formDataProvider,i=this.getAttribute("name");return!r||!i?null:ve.get(r+"/"+i+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const r=this.getCheckAllPublisher();if(r&&(r.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const i=r.values.get().slice(0),n=i.indexOf(this.value);n!=-1&&(i.splice(n,1),r.values.set(i))}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const n=this.getFormPublisherValue();n&&Array.isArray(n)&&n.indexOf(this.value)!==-1&&(this.checked=!0)}const i=this.getCheckAllPublisher();i&&(i.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&i.hasCheckAll.set(!0),i.values.get()||i.values.set([]),this.checksAll()||i.values.set([...i.values.get(),this.value])),this.hasAttribute("checked")&&setTimeout(()=>this.checked=!0,1)}}return Gr([h()],e.prototype,"value",1),Gr([h()],e.prototype,"forceAutoFill",2),Gr([h({type:Boolean})],e.prototype,"unique",2),Gr([h({type:Boolean})],e.prototype,"radio",2),Gr([h()],e.prototype,"checked",1),e};/**
76
76
  * @license
77
77
  * Copyright 2018 Google LLC
78
78
  * SPDX-License-Identifier: BSD-3-Clause
79
- */const te=t=>t??se,rs=X`
79
+ */const se=t=>t??ee,Jt=Z`
80
80
  /*SIZES*/
81
81
  :host {
82
82
  --sc-_fs: 1rem;
@@ -109,42 +109,34 @@
109
109
  :host([size="inherit"]) {
110
110
  --sc-_fs: 1em;
111
111
  }
112
- `;var Ch=Object.defineProperty,kh=Object.getOwnPropertyDescriptor,Ve=(t,e,s,i)=>{for(var r=i>1?void 0:i?kh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ch(e,s,r),r};const $h="sonic-button";let Ne=class extends Rn(br(J)){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.download=null,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this.autoRepeat=!1,this.pointerDownTime=0,this.lastRepeatTime=0,this.isRepeating=!1,this.handleRepeatend=()=>{window.removeEventListener("pointerup",this.handleRepeatend),window.removeEventListener("blur",this.handleRepeatend),this.autoRepeat&&(this.isRepeating=!1)},this.location=""}set href(t){this._href=t??"";const e=this._href.toString();e&&e.indexOf("http")!=0?ht.onChange(this):ht.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),ht.changeFromComponent(this)}handleChange(t){if(!(t?.type=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(t?.preventDefault(),t?.stopPropagation(),ht.changeFromComponent(this)),this.hasAttribute("reset"))){const e=this.getAttribute("reset"),s=e?ve.get(e):this.getFormPublisher();s&&s.set({})}}handleRepeatStart(t){this.autoRepeat&&(this.handleChange(t),this.pointerDownTime=Date.now(),this.isRepeating=!0,this.repeat()),window.addEventListener("pointerup",this.handleRepeatend),window.addEventListener("blur",this.handleRepeatend)}repeat(){if(this.isRepeating){if(this.hasAttribute("disabled")){this.isRepeating=!1;return}window.requestAnimationFrame(this.repeat.bind(this)),!(Date.now()-this.pointerDownTime<500)&&(Date.now()-this.lastRepeatTime<100||(this.handleChange(),this.lastRepeatTime=Date.now()))}}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){ht.offChange(this),super.disconnectedCallback()}willUpdate(t){(t.has("href")||t.has("autoActive"))&&ht.updateComponentActiveState(this),t.has("location")&&ht.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,textAlign:this.align,minWidth:this.minWidth},e=R`
112
+ `;var Eh=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,Ve=(t,e,s,r)=>{for(var i=r>1?void 0:r?Oh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Eh(e,s,i),i};const Th="sonic-button";let Ne=class extends qn(br(Q)){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.download=null,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this.autoRepeat=!1,this.pointerDownTime=0,this.lastRepeatTime=0,this.isRepeating=!1,this.handleRepeatend=()=>{window.removeEventListener("pointerup",this.handleRepeatend),window.removeEventListener("blur",this.handleRepeatend),this.autoRepeat&&(this.isRepeating=!1)},this.location=""}set href(t){this._href=t??"";const e=this._href.toString();e&&e.indexOf("http")!=0?dt.onChange(this):dt.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),dt.changeFromComponent(this)}handleChange(t){if(!(t?.type=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(t?.preventDefault(),t?.stopPropagation(),dt.changeFromComponent(this)),this.hasAttribute("reset"))){const e=this.getAttribute("reset"),s=e?ve.get(e):this.getFormPublisher();s&&s.set({})}}handleRepeatStart(t){this.autoRepeat&&(this.handleChange(t),this.pointerDownTime=Date.now(),this.isRepeating=!0,this.repeat()),window.addEventListener("pointerup",this.handleRepeatend),window.addEventListener("blur",this.handleRepeatend)}repeat(){if(this.isRepeating){if(this.hasAttribute("disabled")){this.isRepeating=!1;return}window.requestAnimationFrame(this.repeat.bind(this)),!(Date.now()-this.pointerDownTime<500)&&(Date.now()-this.lastRepeatTime<100||(this.handleChange(),this.lastRepeatTime=Date.now()))}}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){dt.offChange(this),super.disconnectedCallback()}willUpdate(t){(t.has("href")||t.has("autoActive"))&&dt.updateComponentActiveState(this),t.has("location")&&dt.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,textAlign:this.align,minWidth:this.minWidth},e=R`
113
113
  <button
114
114
  part="button"
115
115
  class=${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}
116
116
  style=${$t(t)}
117
- aria-controls=${te(this.ariaControls)}
118
- aria-expanded=${te(this.sonicAriaExpanded)}
119
- aria-label=${te(this.ariaLabel)}
120
- aria-labelledby=${te(this.ariaLabelledby)}
121
- aria-busy=${te(this.loading?"true":void 0)}
117
+ aria-controls=${se(this.ariaControls)}
118
+ aria-expanded=${se(this.sonicAriaExpanded)}
119
+ aria-label=${se(this.ariaLabel)}
120
+ aria-labelledby=${se(this.ariaLabelledby)}
121
+ aria-busy=${se(this.loading?"true":void 0)}
122
122
  ?disabled=${this.disabled}
123
123
  @click=${this.handleChange}
124
124
  @pointerdown=${this.handleRepeatStart}
125
125
  >
126
- <slot
127
- @slotchange=${this.onSlotChange}
128
- part="prefix"
129
- name="prefix"
130
- ></slot>
131
- <slot part="main" class="main-slot"></slot>
132
- <slot
133
- @slotchange=${this.onSlotChange}
134
- part="suffix"
135
- name="suffix"
136
- ></slot>
126
+ <slot @slotchange=${this.onSlotChange} name="prefix"></slot>
127
+ <slot class="main-slot"></slot>
128
+ <slot @slotchange=${this.onSlotChange} name="suffix"></slot>
137
129
  ${this.loading==!0?R`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}
138
130
  </button>
139
131
  `;return this.href?R`<a
140
132
  href="${this.href}"
141
- download=${te(this.download)}
142
- target=${te(this.target)}
143
- aria-label=${te(this.ariaLabel)}
144
- aria-labelledby=${te(this.ariaLabelledby)}
133
+ download=${se(this.download)}
134
+ target=${se(this.target)}
135
+ aria-label=${se(this.ariaLabel)}
136
+ aria-labelledby=${se(this.ariaLabelledby)}
145
137
  @click=${this.pushState||this.goBack!==null?this.handleNavigation:null}
146
138
  >${e}</a
147
- >`:R`${e}`}onSlotChange(){this.hasPrefix=!!this.prefixes?.length,this.hasSuffix=!!this.suffixes?.length}};Ne.styles=[rs,X`
139
+ >`:R`${e}`}onSlotChange(){this.hasPrefix=!!this.prefixes?.length,this.hasSuffix=!!this.suffixes?.length}};Ne.styles=[Jt,Z`
148
140
  * {
149
141
  box-sizing: border-box;
150
142
  }
@@ -511,11 +503,11 @@
511
503
  transform: translate(-50%, -50%) rotate(359deg);
512
504
  }
513
505
  }
514
- `],Ve([h({type:String,reflect:!0})],Ne.prototype,"type",2),Ve([h({type:String,reflect:!0})],Ne.prototype,"variant",2),Ve([h({type:String,reflect:!0})],Ne.prototype,"size",2),Ve([h({type:String,reflect:!0})],Ne.prototype,"shape",2),Ve([h({type:String})],Ne.prototype,"direction",2),Ve([h({type:String,reflect:!0})],Ne.prototype,"alignItems",2),Ve([h({type:String})],Ne.prototype,"justify",2),Ve([h({type:String,reflect:!0})],Ne.prototype,"align",2),Ve([h({type:String})],Ne.prototype,"minWidth",2),Ve([h({type:Boolean,reflect:!0})],Ne.prototype,"icon",2),Ve([h({type:String})],Ne.prototype,"download",2),Ve([h({type:String})],Ne.prototype,"autoActive",2),Ve([h({type:Boolean,reflect:!0})],Ne.prototype,"loading",2),Ve([Ae()],Ne.prototype,"hasPrefix",2),Ve([Ae()],Ne.prototype,"hasSuffix",2),Ve([Fr({flatten:!0,slot:"prefix"})],Ne.prototype,"prefixes",2),Ve([Fr({flatten:!0,slot:"suffix"})],Ne.prototype,"suffixes",2),Ve([h({type:String})],Ne.prototype,"target",2),Ve([h({type:String})],Ne.prototype,"href",1),Ve([h({type:String})],Ne.prototype,"goBack",2),Ve([h({type:Boolean})],Ne.prototype,"pushState",2),Ve([h({type:Boolean,reflect:!0})],Ne.prototype,"active",2),Ve([h({type:Boolean,reflect:!0})],Ne.prototype,"autoRepeat",2),Ve([h({type:String,attribute:"data-aria-controls"})],Ne.prototype,"ariaControls",2),Ve([h({type:Boolean,attribute:"data-aria-expanded"})],Ne.prototype,"sonicAriaExpanded",2),Ve([Ae()],Ne.prototype,"location",2),Ne=Ve([Q($h)],Ne);/**
506
+ `],Ve([h({type:String,reflect:!0})],Ne.prototype,"type",2),Ve([h({type:String,reflect:!0})],Ne.prototype,"variant",2),Ve([h({type:String,reflect:!0})],Ne.prototype,"size",2),Ve([h({type:String,reflect:!0})],Ne.prototype,"shape",2),Ve([h({type:String})],Ne.prototype,"direction",2),Ve([h({type:String,reflect:!0})],Ne.prototype,"alignItems",2),Ve([h({type:String})],Ne.prototype,"justify",2),Ve([h({type:String,reflect:!0})],Ne.prototype,"align",2),Ve([h({type:String})],Ne.prototype,"minWidth",2),Ve([h({type:Boolean,reflect:!0})],Ne.prototype,"icon",2),Ve([h({type:String})],Ne.prototype,"download",2),Ve([h({type:String})],Ne.prototype,"autoActive",2),Ve([h({type:Boolean,reflect:!0})],Ne.prototype,"loading",2),Ve([xe()],Ne.prototype,"hasPrefix",2),Ve([xe()],Ne.prototype,"hasSuffix",2),Ve([Rr({flatten:!0,slot:"prefix"})],Ne.prototype,"prefixes",2),Ve([Rr({flatten:!0,slot:"suffix"})],Ne.prototype,"suffixes",2),Ve([h({type:String})],Ne.prototype,"target",2),Ve([h({type:String})],Ne.prototype,"href",1),Ve([h({type:String})],Ne.prototype,"goBack",2),Ve([h({type:Boolean})],Ne.prototype,"pushState",2),Ve([h({type:Boolean,reflect:!0})],Ne.prototype,"active",2),Ve([h({type:Boolean,reflect:!0})],Ne.prototype,"autoRepeat",2),Ve([h({type:String,attribute:"data-aria-controls"})],Ne.prototype,"ariaControls",2),Ve([h({type:Boolean,attribute:"data-aria-expanded"})],Ne.prototype,"sonicAriaExpanded",2),Ve([xe()],Ne.prototype,"location",2),Ne=Ve([X(Th)],Ne);/**
515
507
  * @license
516
508
  * Copyright 2017 Google LLC
517
509
  * SPDX-License-Identifier: BSD-3-Clause
518
- */const pa=(t,e,s)=>{const i=new Map;for(let r=e;r<=s;r++)i.set(t[r],r);return i},Fi=Es(class extends gr{constructor(t){if(super(t),t.type!==Ys.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let i;s===void 0?s=e:e!==void 0&&(i=e);const r=[],n=[];let o=0;for(const c of t)r[o]=i?i(c,o):o,n[o]=s(c,o),o++;return{values:n,keys:r}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,i]){const r=Cc(t),{values:n,keys:o}=this.dt(e,s,i);if(!Array.isArray(r))return this.ut=o,n;const c=this.ut??=[],d=[];let m,A,g=0,f=r.length-1,k=0,E=n.length-1;for(;g<=f&&k<=E;)if(r[g]===null)g++;else if(r[f]===null)f--;else if(c[g]===o[k])d[k]=Gs(r[g],n[k]),g++,k++;else if(c[f]===o[E])d[E]=Gs(r[f],n[E]),f--,E--;else if(c[g]===o[E])d[E]=Gs(r[g],n[E]),Ur(t,d[E+1],r[g]),g++,E--;else if(c[f]===o[k])d[k]=Gs(r[f],n[k]),Ur(t,r[g],r[f]),f--,k++;else if(m===void 0&&(m=pa(o,k,E),A=pa(c,g,f)),m.has(c[g]))if(m.has(c[f])){const O=A.get(o[k]),z=O!==void 0?r[O]:null;if(z===null){const B=Ur(t,r[g]);Gs(B,n[k]),d[k]=B}else d[k]=Gs(z,n[k]),Ur(t,r[g],z),r[O]=null;k++}else xn(r[f]),f--;else xn(r[g]),g++;for(;k<=E;){const O=Ur(t,d[E+1]);Gs(O,n[k]),d[k++]=O}for(;g<=f;){const O=r[g++];O!==null&&xn(O)}return this.ut=o,Ac(t,d),Ft}}),Dh=new WeakMap;let fa=0;const jn=new Map,ga=new WeakSet,ma=()=>new Promise((t=>requestAnimationFrame(t))),ba=(t,e)=>{const s=t-e;return s===0?void 0:s},va=(t,e)=>{const s=t/e;return s===1?void 0:s},zn={left:(t,e)=>{const s=ba(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(t,e)=>{const s=ba(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateY(${s}px)`}},width:(t,e)=>{let s;e===0&&(e=1,s={width:"1px"});const i=va(t,e);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(t,e)=>{let s;e===0&&(e=1,s={height:"1px"});const i=va(t,e);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},Eh={duration:333,easing:"ease-in-out"},Oh=["left","top","width","height","opacity","color","background"],ya=new WeakMap;class Th extends An{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===Ys.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){this.resolveFinished?.(),this.finished=new Promise((e=>{this.l=e}))}async resolveFinished(){this.l?.(),this.l=void 0}render(e){return se}getController(){return Dh.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(e,[s]){const i=this.u===void 0;return i&&(this.u=e.options?.host,this.u.addController(this),this.u.updateComplete.then((r=>this.t=!0)),this.element=e.element,ya.set(this.element,this)),this.optionsOrCallback=s,(i||typeof s!="function")&&this.p(s),this.render(s)}p(e){e=e??{};const s=this.getController();s!==void 0&&((e={...s.defaultOptions,...e}).keyframeOptions={...s.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??=Oh,this.options=e}m(){const e={},s=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach((r=>{const n=s[r]??(zn[r]?void 0:i[r]),o=Number(n);e[r]=isNaN(o)?n+"":o})),e}v(){let e,s=!0;return this.options.guard&&(e=this.options.guard(),s=((i,r)=>{if(Array.isArray(i)){if(Array.isArray(r)&&r.length===i.length&&i.every(((n,o)=>n===r[o])))return!1}else if(r===i)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&s&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await ma;const s=this.O(),i=this.j(this.options.keyframeOptions,s),r=this.m();if(this.A!==void 0){const{from:n,to:o}=this.N(this.A,r,s);this.log("measured",[this.A,r,n,o]),e=this.calculateKeyframes(n,o)}else{const n=jn.get(this.options.inId);if(n){jn.delete(this.options.inId);const{from:o,to:c}=this.N(n,r,s);e=this.calculateKeyframes(o,c),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,fa++,e.forEach((d=>d.zIndex=fa))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,i)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){this.P=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel()}reconnected(){}async disconnected(){if(!this.h||(this.options.id!==void 0&&jn.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await ma(),this.i?.isConnected){const s=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,s),this.options.stabilizeOut){const i=this.m();this.log("stabilizing out");const r=this.A.left-i.left,n=this.A.top-i.top;getComputedStyle(this.element).position!=="static"||r===0&&n===0||(this.element.style.position="relative"),r!==0&&(this.element.style.left=r+"px"),n!==0&&(this.element.style.top=n+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(e){e&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let s=this.element.parentNode;s;s=s?.parentNode){const i=ya.get(s);i&&!i.isDisabled()&&i&&e.push(i)}return e}get isHostRendered(){const e=ga.has(this.u);return e||this.u.updateComplete.then((()=>{ga.add(this.u)})),e}j(e,s=this.O()){const i={...Eh};return s.forEach((r=>Object.assign(i,r.options.keyframeOptions))),Object.assign(i,e),i}N(e,s,i){e={...e},s={...s};const r=i.map((c=>c.animatingProperties)).filter((c=>c!==void 0));let n=1,o=1;return r.length>0&&(r.forEach((c=>{c.width&&(n/=c.width),c.height&&(o/=c.height)})),e.left!==void 0&&s.left!==void 0&&(e.left=n*e.left,s.left=n*s.left),e.top!==void 0&&s.top!==void 0&&(e.top=o*e.top,s.top=o*s.top)),{from:e,to:s}}calculateKeyframes(e,s,i=!1){const r={},n={};let o=!1;const c={};for(const d in s){const m=e[d],A=s[d];if(d in zn){const g=zn[d];if(m===void 0||A===void 0)continue;const f=g(m,A);f.transform!==void 0&&(c[d]=f.value,o=!0,r.transform=`${r.transform??""} ${f.transform}`,f.overrideFrom!==void 0&&Object.assign(r,f.overrideFrom))}else m!==A&&m!==void 0&&A!==void 0&&(o=!0,r[d]=m,n[d]=A)}return r.transformOrigin=n.transformOrigin=i?"center center":"top left",this.animatingProperties=c,o?[r,n]:void 0}async animate(e,s=this.options.keyframeOptions){this.start(),this.frames=e;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,s]),i=!0,this.webAnimation=this.element.animate(e,s);const r=this.getController();r?.add(this);try{await this.webAnimation.finished}catch{}r?.remove(this)}return this.didFinish(i),i}isAnimating(){return this.webAnimation?.playState==="running"||this.webAnimation?.pending}log(e,s){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,s)}}const Lh=Es(Th),Mh={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">
510
+ */const ga=(t,e,s)=>{const r=new Map;for(let i=e;i<=s;i++)r.set(t[i],i);return r},Ri=Es(class extends mr{constructor(t){if(super(t),t.type!==Ys.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let r;s===void 0?s=e:e!==void 0&&(r=e);const i=[],n=[];let o=0;for(const c of t)i[o]=r?r(c,o):o,n[o]=s(c,o),o++;return{values:n,keys:i}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,r]){const i=Ec(t),{values:n,keys:o}=this.dt(e,s,r);if(!Array.isArray(i))return this.ut=o,n;const c=this.ut??=[],d=[];let g,A,m=0,f=i.length-1,k=0,E=n.length-1;for(;m<=f&&k<=E;)if(i[m]===null)m++;else if(i[f]===null)f--;else if(c[m]===o[k])d[k]=Gs(i[m],n[k]),m++,k++;else if(c[f]===o[E])d[E]=Gs(i[f],n[E]),f--,E--;else if(c[m]===o[E])d[E]=Gs(i[m],n[E]),qr(t,d[E+1],i[m]),m++,E--;else if(c[f]===o[k])d[k]=Gs(i[f],n[k]),qr(t,i[m],i[f]),f--,k++;else if(g===void 0&&(g=ga(o,k,E),A=ga(c,m,f)),g.has(c[m]))if(g.has(c[f])){const O=A.get(o[k]),z=O!==void 0?i[O]:null;if(z===null){const H=qr(t,i[m]);Gs(H,n[k]),d[k]=H}else d[k]=Gs(z,n[k]),qr(t,i[m],z),i[O]=null;k++}else $n(i[f]),f--;else $n(i[m]),m++;for(;k<=E;){const O=qr(t,d[E+1]);Gs(O,n[k]),d[k++]=O}for(;m<=f;){const O=i[m++];O!==null&&$n(O)}return this.ut=o,Dc(t,d),Rt}}),Lh=new WeakMap;let ba=0;const Hn=new Map,va=new WeakSet,ya=()=>new Promise((t=>requestAnimationFrame(t))),wa=(t,e)=>{const s=t-e;return s===0?void 0:s},_a=(t,e)=>{const s=t/e;return s===1?void 0:s},Bn={left:(t,e)=>{const s=wa(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(t,e)=>{const s=wa(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateY(${s}px)`}},width:(t,e)=>{let s;e===0&&(e=1,s={width:"1px"});const r=_a(t,e);return{value:r,overrideFrom:s,transform:r==null||isNaN(r)?void 0:`scaleX(${r})`}},height:(t,e)=>{let s;e===0&&(e=1,s={height:"1px"});const r=_a(t,e);return{value:r,overrideFrom:s,transform:r==null||isNaN(r)?void 0:`scaleY(${r})`}}},Mh={duration:333,easing:"ease-in-out"},Ih=["left","top","width","height","opacity","color","background"],Sa=new WeakMap;class Nh extends Dn{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===Ys.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){this.resolveFinished?.(),this.finished=new Promise((e=>{this.l=e}))}async resolveFinished(){this.l?.(),this.l=void 0}render(e){return ee}getController(){return Lh.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(e,[s]){const r=this.u===void 0;return r&&(this.u=e.options?.host,this.u.addController(this),this.u.updateComplete.then((i=>this.t=!0)),this.element=e.element,Sa.set(this.element,this)),this.optionsOrCallback=s,(r||typeof s!="function")&&this.p(s),this.render(s)}p(e){e=e??{};const s=this.getController();s!==void 0&&((e={...s.defaultOptions,...e}).keyframeOptions={...s.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??=Ih,this.options=e}m(){const e={},s=this.element.getBoundingClientRect(),r=getComputedStyle(this.element);return this.options.properties.forEach((i=>{const n=s[i]??(Bn[i]?void 0:r[i]),o=Number(n);e[i]=isNaN(o)?n+"":o})),e}v(){let e,s=!0;return this.options.guard&&(e=this.options.guard(),s=((r,i)=>{if(Array.isArray(r)){if(Array.isArray(i)&&i.length===r.length&&r.every(((n,o)=>n===i[o])))return!1}else if(i===r)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&s&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await ya;const s=this.O(),r=this.j(this.options.keyframeOptions,s),i=this.m();if(this.A!==void 0){const{from:n,to:o}=this.N(this.A,i,s);this.log("measured",[this.A,i,n,o]),e=this.calculateKeyframes(n,o)}else{const n=Hn.get(this.options.inId);if(n){Hn.delete(this.options.inId);const{from:o,to:c}=this.N(n,i,s);e=this.calculateKeyframes(o,c),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,ba++,e.forEach((d=>d.zIndex=ba))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,r)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){this.P=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel()}reconnected(){}async disconnected(){if(!this.h||(this.options.id!==void 0&&Hn.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await ya(),this.i?.isConnected){const s=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,s),this.options.stabilizeOut){const r=this.m();this.log("stabilizing out");const i=this.A.left-r.left,n=this.A.top-r.top;getComputedStyle(this.element).position!=="static"||i===0&&n===0||(this.element.style.position="relative"),i!==0&&(this.element.style.left=i+"px"),n!==0&&(this.element.style.top=n+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(e){e&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let s=this.element.parentNode;s;s=s?.parentNode){const r=Sa.get(s);r&&!r.isDisabled()&&r&&e.push(r)}return e}get isHostRendered(){const e=va.has(this.u);return e||this.u.updateComplete.then((()=>{va.add(this.u)})),e}j(e,s=this.O()){const r={...Mh};return s.forEach((i=>Object.assign(r,i.options.keyframeOptions))),Object.assign(r,e),r}N(e,s,r){e={...e},s={...s};const i=r.map((c=>c.animatingProperties)).filter((c=>c!==void 0));let n=1,o=1;return i.length>0&&(i.forEach((c=>{c.width&&(n/=c.width),c.height&&(o/=c.height)})),e.left!==void 0&&s.left!==void 0&&(e.left=n*e.left,s.left=n*s.left),e.top!==void 0&&s.top!==void 0&&(e.top=o*e.top,s.top=o*s.top)),{from:e,to:s}}calculateKeyframes(e,s,r=!1){const i={},n={};let o=!1;const c={};for(const d in s){const g=e[d],A=s[d];if(d in Bn){const m=Bn[d];if(g===void 0||A===void 0)continue;const f=m(g,A);f.transform!==void 0&&(c[d]=f.value,o=!0,i.transform=`${i.transform??""} ${f.transform}`,f.overrideFrom!==void 0&&Object.assign(i,f.overrideFrom))}else g!==A&&g!==void 0&&A!==void 0&&(o=!0,i[d]=g,n[d]=A)}return i.transformOrigin=n.transformOrigin=r?"center center":"top left",this.animatingProperties=c,o?[i,n]:void 0}async animate(e,s=this.options.keyframeOptions){this.start(),this.frames=e;let r=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,s]),r=!0,this.webAnimation=this.element.animate(e,s);const i=this.getController();i?.add(this);try{await this.webAnimation.finished}catch{}i?.remove(this)}return this.didFinish(r),r}isAnimating(){return this.webAnimation?.playState==="running"||this.webAnimation?.pending}log(e,s){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,s)}}const Fh=Es(Nh),Rh={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">
519
511
  <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"/>
520
512
  </svg>
521
513
  `,"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">
@@ -551,7 +543,7 @@
551
543
  <path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
552
544
  <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"/>
553
545
  </svg>
554
- `}},Ri=new Map,wa={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"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/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"},custom:{url:"",defaultPrefix:""}};function Ih(t){let e=t.customLibraryPath,s=t.customLibraryDefaultPrefix;if(e==null){const i=document.querySelector("[customIconLibraryPath]");e=i?.getAttribute("customIconLibraryPath")??"",s==null&&(s=i?.getAttribute("customIconDefaultPrefix")??document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")??"")}return{url:e||"",defaultPrefix:s||""}}function Nh(t,e){return t in wa?t!=="custom"?wa[t]:Ih(e):null}const _a=sessionStorage.getItem("sonicIconsCache"),vs=_a?JSON.parse(_a):{icons:{},names:[]},Fh=100,Co=class Co{};Co.default={get:async e=>{const s=e.library;if(!e.name)return"";const i=e.name,r=Mh;if(!s)return He(r.core[e.name]||"");const n=Nh(s,e);if(n){if(s==="custom"&&!n.url)return"";const o=e.prefix||n.defaultPrefix||"",c=r[s]||{};r[s]=c;const d=s==="custom"?`${n.url}|${o}-${i}`:`${o}-${i}`;if(c[d])return He(c[d]);const m=(n.url||"").replace("$prefix",o).replace("$name",i);if(vs.icons[m]){const g=vs.icons[m];if(/^\s*<svg[\s>]/i.test(g||""))return c[d]=g,He(g);delete vs.icons[m]}if(!Ri.has(m)){const g=new Promise(async f=>{try{const k=await fetch(m);if(!k.ok){f("");return}try{const E=k.headers.get("content-type")||"";if(!E.includes("image/svg+xml")&&!E.includes("svg")){f("");return}const O=await k.text(),z=/^\s*<svg[\s>]/i.test(O);f(z?O:"")}catch{f("")}}catch{Oc(),f("")}});Ri.set(m,g)}const A=await Ri.get(m);if(Ri.delete(m),c[d]=A||"",A&&/^\s*<svg[\s>]/i.test(A)&&(vs.icons[m]=A,vs.names.push(m)),vs.names.length>Fh){const g=vs.names.shift();delete vs.icons[g]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(vs)),A?He(A):""}return He(r.core[e.name]||"")}};let Un=Co;function Rh(t){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(t)}function jh(t){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(t)}function zh(t){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(t)}function Qs(t){if(t.__is__setSubscribable__)return;t.__is__setSubscribable__=!0,t.__onBeforeConnected__=Rh,t.__onConnected__=jh,t.__onDisconnected__=zh;const e=t.connectedCallback;t.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(i=>i(this)),e?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(i=>i(this))};const s=t.disconnectedCallback;t.disconnectedCallback=function(){s?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(i=>i(this))}}function Uh(t){return t.trim().replace(/^this\./,"")}function qn(t,e){if(!e)return;const s=e.split(".").filter(Boolean);if(s.length===0)return;let i=t;for(const r of s){if(i==null||typeof i!="object")return;i=i[r]}return i}function qh(t,e){return!!(t==null||e?.skipEmptyPlaceholder&&t==="")}function Ot(t,e,s){let i=!1;const r=(c,d)=>{const m=Uh(d),A=qn(t,m);return qh(A,s)?(i=!0,""):`${A}`},n=e.replace(/\$\{([^}]+)\}/g,r).replace(/\{\$([^}]+)\}/g,r).trim();if(i||!n.length)return{ready:!1,path:null};const o=n.split(".").filter(Boolean);return o.length===0||!o[0]?{ready:!1,path:null}:{ready:!0,path:n}}function Bt(t){const e=[/\$\{([^}]+)\}/g,/\{\$([^}]+)\}/g],s=new Set;for(const i of e){let r;for(;(r=i.exec(t))!==null;){const n=(r[1]||"").trim().replace(/^this\./,"");if(!n)continue;const[o]=n.split(".");o&&s.add(o)}}return Array.from(s)}function Sa(t){return typeof t=="object"&&t!==null&&"path"in t&&typeof t.path=="string"}const Gr=new WeakMap,Yr=new Set;let wr=null;const Bh=8;function Hh(t){let e=Gr.get(t);return e||(e=new Map,Gr.set(t,e)),e}function Vh(t,e){const s=new Set;for(const[i,r]of e){const n=qn(t,i);Object.is(r.lastValue,n)||(r.lastValue=n,r.onChangeHandlers.forEach(o=>s.add(o)))}return s}function Wh(){wr=null;let t=0,e=!0;for(;e&&t<Bh;){e=!1,t+=1;for(const s of Yr){const i=Gr.get(s);if(!i||i.size===0)continue;const r=Vh(s,i);r.size!==0&&(e=!0,r.forEach(n=>n()))}}e&&console.warn("[concorde] dynamic property watch: limite de passes atteinte, boucle infinie probable"),Yr.size>0&&Pa()}function Pa(){wr===null&&(wr=requestAnimationFrame(Wh))}function Kh(){Yr.size===0&&wr!==null&&(cancelAnimationFrame(wr),wr=null)}function Ts(t,e,s,i,r){const n=String(i),o=Hh(s);let c=o.get(n);return c||(c={lastValue:qn(s,n),onChangeHandlers:new Set},o.set(n,c)),c.onChangeHandlers.add(r),Yr.add(s),Pa(),()=>{const d=Gr.get(s);if(!d)return;const m=d.get(n);m&&(m.onChangeHandlers.delete(r),m.onChangeHandlers.size===0&&d.delete(n),d.size===0&&(Gr.delete(s),Yr.delete(s),Kh()))}}const ji={watcherStore:Symbol("__bindDynamicWatcherStore__"),hooked:Symbol("__bindDynamicWillUpdateHooked__")},xa={watcherStore:"__publishDynamicWatcherStore__",hooked:"__publishDynamicWillUpdateHooked__"},Ls={watcherStore:"__getDynamicWatcherStore__",hooked:"__getDynamicWillUpdateHooked__"},Aa={watcherStore:Symbol("__onAssignDynamicWatcherStore__"),hooked:Symbol("__onAssignDynamicWillUpdateHooked__")};function Qt(t){const e=t.split(".").filter(r=>r.length>0);if(e.length===0)return null;const s=e.shift()||"";if(!s)return null;let i=ve.get(s);return i?(i=Wr.traverse(i,e),i):null}function Gh(t,e){const s=e?.reflect??!1,i={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},r=Bt(t),n=r.length>0;return function(o,c){if(!o)return;Qs(o);const d=`__bind_state_${c}`,m=`__bind_${c}_publisher__`,A=s?`__bind_${c}_updating_from_publisher__`:null;if(s){const g=Object.getOwnPropertyDescriptor(o,c),f=`__bind_${c}_value__`,k=`__bind_${c}_updating_from_publisher__`,E=g&&!g.get&&!g.set?g.value:void 0;Object.defineProperty(o,c,{get(){return g?.get?g.get.call(this):(!Object.prototype.hasOwnProperty.call(this,f)&&E!==void 0&&(this[f]=E),this[f])},set(O){g?.set?g.set.call(this,O):this[f]=O,!this[k]&&this[m]&&this[m].set(O)},enumerable:g?.enumerable??!0,configurable:g?.configurable??!0})}o.__onConnected__(g=>{const f=g[d]||(g[d]={cleanupWatchers:[],unsubscribePublisher:null,currentPath:null});f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(O=>O()),f.cleanupWatchers=[],f.currentPath=null;const k=O=>{if(!O){f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.currentPath=null,g[m]=null;return}if(O===f.currentPath)return;f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null);const z=Qt(O);if(!z){f.currentPath=null,g[m]=null;return}const B=S=>{s&&A&&(g[A]=!0),g[c]=S,s&&A&&(g[A]=!1)};z.onAssign(B),f.unsubscribePublisher=()=>{z.offAssign(B),g[m]===z&&(g[m]=null)},f.currentPath=O,g[m]=z},E=()=>{if(n){const O=Ot(g,t,i);if(!O.ready){k(null);return}k(O.path);return}k(t)};if(n)for(const O of r){const z=Ts(ji.watcherStore,ji.hooked,g,O,()=>E());f.cleanupWatchers.push(z)}E()}),o.__onDisconnected__(g=>{const f=g[d];f&&(f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(k=>k()),f.cleanupWatchers=[],f.currentPath=null,g[m]=null)})}}function Ca(t,e){const s=Sa(t)?t.path:t;return Gh(s,e)}function ka(t,e){const s=t.path,i={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},r=Bt(s);return function(n,o){Qs(n);const c=`__publish_${o}_publisher__`,d=`__publish_${o}_value__`,m=Object.getOwnPropertyDescriptor(n,o),A=m&&!m.get&&!m.set?m.value:void 0;Object.defineProperty(n,o,{get(){return m?.get?m.get.call(this):(!Object.prototype.hasOwnProperty.call(this,d)&&A!==void 0&&(this[d]=A),this[d])},set(g){m?.set?m.set.call(this,g):this[d]=g;const f=this[c];f&&f.set(g)},enumerable:m?.enumerable??!0,configurable:m?.configurable??!0}),n.__onConnected__(g=>{const f=g,k=`__publish_state_${o}`,E=f[k]||(f[k]={cleanupWatchers:[]}),O=()=>{let z;if(r.length){const S=Ot(g,s,i);z=S.ready?S.path:null}else z=s;const B=z?Qt(z):void 0;if(f[c]=B??null,B&&o in g){const S=f[o];S!==void 0&&B.set(S)}};if(E.cleanupWatchers.forEach(z=>z()),E.cleanupWatchers=[],r.length)for(const z of r)E.cleanupWatchers.push(Ts(xa.watcherStore,xa.hooked,f,z,O));O()}),n.__onDisconnected__(g=>{const f=g,k=`__publish_state_${o}`,E=f[k];E?.cleanupWatchers&&E.cleanupWatchers.forEach(O=>O()),f[c]=void 0})}}function $a(t){return Ca(t)}const Yh={nullish:t=>t==null,emptyString:t=>t==="",emptyObject:t=>typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===0,emptyArray:t=>Array.isArray(t)&&t.length===0};function Zh(t,e){return e.some(s=>Yh[s](t))}function Jh(t,e,s){if(!s.dispatchWhenUndefined&&t.slice(0,e).filter(r=>r!=null).length!==e)return!1;if(s.skip&&s.skip.length>0){for(let i=0;i<e;i++)if(Zh(t[i],s.skip))return!1}return!0}function Qh(...t){return Da({},t)}function Da(t,e){const s=e.map(r=>{const n=Bt(r);return{originalPath:r,dynamicDependencies:n,isDynamic:n.length>0}}),i={skipEmptyPlaceholder:t.skipEmptyPlaceholder};return function(r,n,o){Qs(r);const c=`__onAssign_state_${n}__`;let d;r.__onConnected__(m=>{const A=m[c]||(m[c]={cleanupWatchers:[],configurations:[]});A.cleanupWatchers.forEach(O=>O()),A.cleanupWatchers=[],A.configurations.forEach(O=>{O.unsubscribePublisher&&O.unsubscribePublisher()}),A.configurations=[];const g=[],f=[];for(let O=0;O<e.length;O++){const z=s[O],B=new Set,S=y=>{g[O]=y,Jh(g,e.length,t)&&B.forEach(I=>I(...g))};f.push({publisher:null,onAssign:S,callbacks:B,unsubscribePublisher:null,pathConfig:z,index:O})}const k=(O,z)=>{if(O.unsubscribePublisher&&(O.unsubscribePublisher(),O.unsubscribePublisher=null),g[O.index]=null,O.publisher=null,!z)return;const B=Qt(z);B&&(B.onAssign(O.onAssign),O.unsubscribePublisher=()=>{B.offAssign(O.onAssign),O.publisher===B&&(O.publisher=null)},O.publisher=B)},E=()=>{for(const O of f)if(O.pathConfig.isDynamic){const z=Ot(m,O.pathConfig.originalPath,i);if(!z.ready){k(O,null);continue}k(O,z.path)}else k(O,O.pathConfig.originalPath)};for(const O of f)if(O.pathConfig.isDynamic)for(const z of O.pathConfig.dynamicDependencies){const B=Ts(Aa.watcherStore,Aa.hooked,m,z,()=>E());A.cleanupWatchers.push(B)}d=o.value.bind(m);for(const O of f)O.callbacks.add(d);E(),A.configurations=f}),r.__onDisconnected__(m=>{const A=m[c];A&&(A.cleanupWatchers.forEach(g=>g()),A.cleanupWatchers=[],A.configurations.forEach(g=>{g.unsubscribePublisher&&g.unsubscribePublisher(),g.callbacks.delete(d)}),A.configurations=[])})}}function Xh(t){return Object.prototype.toString.call(t)==="[object DataProviderKey]"}function eu(...t){const e=t[t.length-1],s=e!==void 0&&!Xh(e),i=s?e:{},n=(s?t.slice(0,-1):t).map(o=>o.path);return Da({dispatchWhenUndefined:!i.waitForAllDefined,skip:i.skip,skipEmptyPlaceholder:i.skipEmptyPlaceholder},n)}function tu(){return function(t,e,s){let i=0;const r=s.value,n=t.constructor.prototype.disconnectedCallback;t.constructor.prototype.disconnectedCallback=function(){n?.apply(this),this.__removeAutoSubscribe__()};const o=t.connectedCallback;t.connectedCallback=function(){o?.call(this),this[e]()},s.value=function(...c){let d=new Set;const m=()=>{i++;const g=i;window.queueMicrotask(()=>{g===i&&this[e]()})};d.forEach(g=>{g.offAssign(m)}),To();const A=r.apply(this,c);return d=Lo()||new Set,d.forEach(g=>{g.onAssign(m,!1)}),this.__removeAutoSubscribe__=()=>{d.forEach(g=>{g.offAssign(m)})},A}}}function su(t){return function(e){Qs(e);for(const s of t){const i=s.split(".");if(i.length===0)continue;const r=i.shift()||"";let n=ve.get(r);n=Wr.traverse(n,i),e.__onConnected__(o=>{n.startTemplateFilling(o)}),e.__onDisconnected__(()=>{})}}}function ru(t){const e=[];let s=t;for(;s;)s instanceof Element&&e.push(s),s=s.parentNode||(s.host??null);return e}function iu(t){const e=t.parentNode||(t.getRootNode()?.host??null);return e instanceof Element?e:null}function Ea(t,e,s,i){const r=t,n=ze.getAncestorAttributeValue(t,e);!i.assignNull&&n===null||Object.is(r[s],n)||(r[s]=n)}const ye=class ye{static subscribe(e,s,i,r={assignNull:!0}){const n={component:e,attributeName:s,propertyKey:i,syncOptions:r,watchedAncestors:[],parentForReparent:null};return ye.subscriptions.add(n),ye.bindSubscription(n),()=>{ye.unsubscribe(n)}}static bindSubscription(e){ye.unbindWatchers(e);const s=ru(e.component);e.watchedAncestors=s;for(const r of s)ye.addAttrSlot(r,e.attributeName,e);const i=iu(e.component);e.parentForReparent=i,i&&ye.addParentSlot(i,e),ye.pendingRefresh.add(e),ye.scheduleRefresh()}static unbindWatchers(e){for(const s of e.watchedAncestors)ye.removeAttrSlot(s,e.attributeName,e);e.watchedAncestors=[],e.parentForReparent&&(ye.removeParentSlot(e.parentForReparent,e),e.parentForReparent=null)}static addAttrSlot(e,s,i){let r=ye.attrSlots.get(e);r||(r=new Map,ye.attrSlots.set(e,r));let n=r.get(s);if(!n){const o=ze.scopeAttributeNames(s),c=new Set,d=new MutationObserver(()=>{for(const m of c)ye.subscriptions.has(m)&&ye.pendingRefresh.add(m);ye.scheduleRefresh()});d.observe(e,{attributes:!0,attributeFilter:o}),n={observer:d,subscriptions:c},r.set(s,n)}n.subscriptions.add(i)}static removeAttrSlot(e,s,i){const r=ye.attrSlots.get(e);if(!r)return;const n=r.get(s);n&&(n.subscriptions.delete(i),!(n.subscriptions.size>0)&&(n.observer.disconnect(),r.delete(s)))}static addParentSlot(e,s){let i=ye.parentSlots.get(e);if(!i){const n=new Map,o=new MutationObserver(c=>{const d=new Set;for(const m of c)m.removedNodes.forEach(A=>{A instanceof Element&&d.add(A)}),m.addedNodes.forEach(A=>{A instanceof Element&&d.add(A)});for(const m of d){const A=n.get(m);if(A)for(const g of[...A])ye.subscriptions.has(g)&&ye.bindSubscription(g)}});o.observe(e,{childList:!0}),i={observer:o,byComponent:n},ye.parentSlots.set(e,i)}let r=i.byComponent.get(s.component);r||(r=new Set,i.byComponent.set(s.component,r)),r.add(s)}static removeParentSlot(e,s){const i=ye.parentSlots.get(e);if(!i)return;const r=i.byComponent.get(s.component);r&&(r.delete(s),r.size===0&&i.byComponent.delete(s.component)),!(i.byComponent.size>0)&&(i.observer.disconnect(),ye.parentSlots.delete(e))}static unsubscribe(e){ye.subscriptions.has(e)&&(ye.unbindWatchers(e),ye.subscriptions.delete(e),ye.pendingRefresh.delete(e),ye.subscriptions.size===0&&ye.cancelScheduledRefresh())}static scheduleRefresh(){ye.pendingRefresh.size!==0&&ye.animationFrameId===null&&(ye.animationFrameId=requestAnimationFrame(()=>{ye.flushRefresh()}))}static cancelScheduledRefresh(){ye.animationFrameId!==null&&(cancelAnimationFrame(ye.animationFrameId),ye.animationFrameId=null),ye.pendingRefresh.clear()}static flushRefresh(){ye.animationFrameId=null;const e=Array.from(ye.pendingRefresh);ye.pendingRefresh.clear();for(const s of e)ye.subscriptions.has(s)&&Ea(s.component,s.attributeName,s.propertyKey,s.syncOptions)}};ye.subscriptions=new Set,ye.pendingRefresh=new Set,ye.animationFrameId=null,ye.attrSlots=new WeakMap,ye.parentSlots=new WeakMap;let Bn=ye;function Hn(t,e){const s=e?.dynamic??!1,i=s;return function(r,n){if(!r||(Qs(r),r.__onBeforeConnected__(c=>{Ea(c,t,n,{assignNull:i})}),!s))return;let o=null;r.__onConnected__(c=>{o=Bn.subscribe(c,t,n,{assignNull:!0})}),r.__onDisconnected__(()=>{o?.(),o=null})}}var nu=Object.defineProperty,ou=Object.getOwnPropertyDescriptor,Xs=(t,e,s,i)=>{for(var r=i>1?void 0:i?ou(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&nu(e,s,r),r};const Vn=t=>h(t),au="sonic-icon";let ys=class extends J{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library="",this.customIconLibraryPath=null,this.customIconDefaultPrefix=null}async updateIcon(){this.iconText=await Un.default.get({name:this.name,prefix:this.prefix,library:this.library,customLibraryPath:this.customIconLibraryPath,customLibraryDefaultPrefix:this.customIconDefaultPrefix})}connectedCallback(){this.setAttribute("aria-hidden","true"),super.connectedCallback()}willUpdate(t){(t.has("name")||t.has("prefix")||t.has("library")||this.library==="custom"&&(t.has("customIconLibraryPath")||t.has("customIconDefaultPrefix")))&&this.updateIcon(),super.willUpdate(t)}render(){return this.iconText?this.iconText:se}};ys.styles=X`
546
+ `}},ji=new Map,Pa={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"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/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"},custom:{url:"",defaultPrefix:""}};function jh(t){let e=t.customLibraryPath,s=t.customLibraryDefaultPrefix;if(e==null){const r=document.querySelector("[customIconLibraryPath]");e=r?.getAttribute("customIconLibraryPath")??"",s==null&&(s=r?.getAttribute("customIconDefaultPrefix")??document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")??"")}return{url:e||"",defaultPrefix:s||""}}function zh(t,e){return t in Pa?t!=="custom"?Pa[t]:jh(e):null}const xa=sessionStorage.getItem("sonicIconsCache"),bs=xa?JSON.parse(xa):{icons:{},names:[]},Uh=100,Do=class Do{};Do.default={get:async e=>{const s=e.library;if(!e.name)return"";const r=e.name,i=Rh;if(!s)return Be(i.core[e.name]||"");const n=zh(s,e);if(n){if(s==="custom"&&!n.url)return"";const o=e.prefix||n.defaultPrefix||"",c=i[s]||{};i[s]=c;const d=s==="custom"?`${n.url}|${o}-${r}`:`${o}-${r}`;if(c[d])return Be(c[d]);const g=(n.url||"").replace("$prefix",o).replace("$name",r);if(bs.icons[g]){const m=bs.icons[g];if(/^\s*<svg[\s>]/i.test(m||""))return c[d]=m,Be(m);delete bs.icons[g]}if(!ji.has(g)){const m=new Promise(async f=>{try{const k=await fetch(g);if(!k.ok){f("");return}try{const E=k.headers.get("content-type")||"";if(!E.includes("image/svg+xml")&&!E.includes("svg")){f("");return}const O=await k.text(),z=/^\s*<svg[\s>]/i.test(O);f(z?O:"")}catch{f("")}}catch{Ic(),f("")}});ji.set(g,m)}const A=await ji.get(g);if(ji.delete(g),c[d]=A||"",A&&/^\s*<svg[\s>]/i.test(A)&&(bs.icons[g]=A,bs.names.push(g)),bs.names.length>Uh){const m=bs.names.shift();delete bs.icons[m]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(bs)),A?Be(A):""}return Be(i.core[e.name]||"")}};let Vn=Do;function qh(t){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(t)}function Hh(t){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(t)}function Bh(t){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(t)}function Qs(t){if(t.__is__setSubscribable__)return;t.__is__setSubscribable__=!0,t.__onBeforeConnected__=qh,t.__onConnected__=Hh,t.__onDisconnected__=Bh;const e=t.connectedCallback;t.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(r=>r(this)),e?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(r=>r(this))};const s=t.disconnectedCallback;t.disconnectedCallback=function(){s?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(r=>r(this))}}function Vh(t){return t.trim().replace(/^this\./,"")}function Wn(t,e){if(!e)return;const s=e.split(".").filter(Boolean);if(s.length===0)return;let r=t;for(const i of s){if(r==null||typeof r!="object")return;r=r[i]}return r}function Wh(t,e){return!!(t==null||e?.skipEmptyPlaceholder&&t==="")}function Tt(t,e,s){let r=!1;const i=(c,d)=>{const g=Vh(d),A=Wn(t,g);return Wh(A,s)?(r=!0,""):`${A}`},n=e.replace(/\$\{([^}]+)\}/g,i).replace(/\{\$([^}]+)\}/g,i).trim();if(r||!n.length)return{ready:!1,path:null};const o=n.split(".").filter(Boolean);return o.length===0||!o[0]?{ready:!1,path:null}:{ready:!0,path:n}}function Ht(t){const e=[/\$\{([^}]+)\}/g,/\{\$([^}]+)\}/g],s=new Set;for(const r of e){let i;for(;(i=r.exec(t))!==null;){const n=(i[1]||"").trim().replace(/^this\./,"");if(!n)continue;const[o]=n.split(".");o&&s.add(o)}}return Array.from(s)}function Aa(t){return typeof t=="object"&&t!==null&&"path"in t&&typeof t.path=="string"}const Yr=new WeakMap,Zr=new Set;let wr=null;const Kh=8;function Gh(t){let e=Yr.get(t);return e||(e=new Map,Yr.set(t,e)),e}function Yh(t,e){const s=new Set;for(const[r,i]of e){const n=Wn(t,r);Object.is(i.lastValue,n)||(i.lastValue=n,i.onChangeHandlers.forEach(o=>s.add(o)))}return s}function Zh(){wr=null;let t=0,e=!0;for(;e&&t<Kh;){e=!1,t+=1;for(const s of Zr){const r=Yr.get(s);if(!r||r.size===0)continue;const i=Yh(s,r);i.size!==0&&(e=!0,i.forEach(n=>n()))}}e&&console.warn("[concorde] dynamic property watch: limite de passes atteinte, boucle infinie probable"),Zr.size>0&&Ca()}function Ca(){wr===null&&(wr=requestAnimationFrame(Zh))}function Jh(){Zr.size===0&&wr!==null&&(cancelAnimationFrame(wr),wr=null)}function Ts(t,e,s,r,i){const n=String(r),o=Gh(s);let c=o.get(n);return c||(c={lastValue:Wn(s,n),onChangeHandlers:new Set},o.set(n,c)),c.onChangeHandlers.add(i),Zr.add(s),Ca(),()=>{const d=Yr.get(s);if(!d)return;const g=d.get(n);g&&(g.onChangeHandlers.delete(i),g.onChangeHandlers.size===0&&d.delete(n),d.size===0&&(Yr.delete(s),Zr.delete(s),Jh()))}}const zi={watcherStore:Symbol("__bindDynamicWatcherStore__"),hooked:Symbol("__bindDynamicWillUpdateHooked__")},ka={watcherStore:"__publishDynamicWatcherStore__",hooked:"__publishDynamicWillUpdateHooked__"},Ls={watcherStore:"__getDynamicWatcherStore__",hooked:"__getDynamicWillUpdateHooked__"},$a={watcherStore:Symbol("__onAssignDynamicWatcherStore__"),hooked:Symbol("__onAssignDynamicWillUpdateHooked__")};function Qt(t){const e=t.split(".").filter(i=>i.length>0);if(e.length===0)return null;const s=e.shift()||"";if(!s)return null;let r=ve.get(s);return r?(r=Kr.traverse(r,e),r):null}function Qh(t,e){const s=e?.reflect??!1,r={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},i=Ht(t),n=i.length>0;return function(o,c){if(!o)return;Qs(o);const d=`__bind_state_${c}`,g=`__bind_${c}_publisher__`,A=s?`__bind_${c}_updating_from_publisher__`:null;if(s){const m=Object.getOwnPropertyDescriptor(o,c),f=`__bind_${c}_value__`,k=`__bind_${c}_updating_from_publisher__`,E=m&&!m.get&&!m.set?m.value:void 0;Object.defineProperty(o,c,{get(){return m?.get?m.get.call(this):(!Object.prototype.hasOwnProperty.call(this,f)&&E!==void 0&&(this[f]=E),this[f])},set(O){m?.set?m.set.call(this,O):this[f]=O,!this[k]&&this[g]&&this[g].set(O)},enumerable:m?.enumerable??!0,configurable:m?.configurable??!0})}o.__onConnected__(m=>{const f=m[d]||(m[d]={cleanupWatchers:[],unsubscribePublisher:null,currentPath:null});f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(O=>O()),f.cleanupWatchers=[],f.currentPath=null;const k=O=>{if(!O){f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.currentPath=null,m[g]=null;return}if(O===f.currentPath)return;f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null);const z=Qt(O);if(!z){f.currentPath=null,m[g]=null;return}const H=S=>{s&&A&&(m[A]=!0),m[c]=S,s&&A&&(m[A]=!1)};z.onAssign(H),f.unsubscribePublisher=()=>{z.offAssign(H),m[g]===z&&(m[g]=null)},f.currentPath=O,m[g]=z},E=()=>{if(n){const O=Tt(m,t,r);if(!O.ready){k(null);return}k(O.path);return}k(t)};if(n)for(const O of i){const z=Ts(zi.watcherStore,zi.hooked,m,O,()=>E());f.cleanupWatchers.push(z)}E()}),o.__onDisconnected__(m=>{const f=m[d];f&&(f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(k=>k()),f.cleanupWatchers=[],f.currentPath=null,m[g]=null)})}}function Da(t,e){const s=Aa(t)?t.path:t;return Qh(s,e)}function Ea(t,e){const s=t.path,r={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},i=Ht(s);return function(n,o){Qs(n);const c=`__publish_${o}_publisher__`,d=`__publish_${o}_value__`,g=Object.getOwnPropertyDescriptor(n,o),A=g&&!g.get&&!g.set?g.value:void 0;Object.defineProperty(n,o,{get(){return g?.get?g.get.call(this):(!Object.prototype.hasOwnProperty.call(this,d)&&A!==void 0&&(this[d]=A),this[d])},set(m){g?.set?g.set.call(this,m):this[d]=m;const f=this[c];f&&f.set(m)},enumerable:g?.enumerable??!0,configurable:g?.configurable??!0}),n.__onConnected__(m=>{const f=m,k=`__publish_state_${o}`,E=f[k]||(f[k]={cleanupWatchers:[]}),O=()=>{let z;if(i.length){const S=Tt(m,s,r);z=S.ready?S.path:null}else z=s;const H=z?Qt(z):void 0;if(f[c]=H??null,H&&o in m){const S=f[o];S!==void 0&&H.set(S)}};if(E.cleanupWatchers.forEach(z=>z()),E.cleanupWatchers=[],i.length)for(const z of i)E.cleanupWatchers.push(Ts(ka.watcherStore,ka.hooked,f,z,O));O()}),n.__onDisconnected__(m=>{const f=m,k=`__publish_state_${o}`,E=f[k];E?.cleanupWatchers&&E.cleanupWatchers.forEach(O=>O()),f[c]=void 0})}}function Oa(t){return Da(t)}const Xh={nullish:t=>t==null,emptyString:t=>t==="",emptyObject:t=>typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===0,emptyArray:t=>Array.isArray(t)&&t.length===0};function eu(t,e){return e.some(s=>Xh[s](t))}function tu(t,e,s){if(!s.dispatchWhenUndefined&&t.slice(0,e).filter(i=>i!=null).length!==e)return!1;if(s.skip&&s.skip.length>0){for(let r=0;r<e;r++)if(eu(t[r],s.skip))return!1}return!0}function su(...t){return Ta({},t)}function Ta(t,e){const s=e.map(i=>{const n=Ht(i);return{originalPath:i,dynamicDependencies:n,isDynamic:n.length>0}}),r={skipEmptyPlaceholder:t.skipEmptyPlaceholder};return function(i,n,o){Qs(i);const c=`__onAssign_state_${n}__`;let d;i.__onConnected__(g=>{const A=g[c]||(g[c]={cleanupWatchers:[],configurations:[]});A.cleanupWatchers.forEach(O=>O()),A.cleanupWatchers=[],A.configurations.forEach(O=>{O.unsubscribePublisher&&O.unsubscribePublisher()}),A.configurations=[];const m=[],f=[];for(let O=0;O<e.length;O++){const z=s[O],H=new Set,S=y=>{m[O]=y,tu(m,e.length,t)&&H.forEach(I=>I(...m))};f.push({publisher:null,onAssign:S,callbacks:H,unsubscribePublisher:null,pathConfig:z,index:O})}const k=(O,z)=>{if(O.unsubscribePublisher&&(O.unsubscribePublisher(),O.unsubscribePublisher=null),m[O.index]=null,O.publisher=null,!z)return;const H=Qt(z);H&&(H.onAssign(O.onAssign),O.unsubscribePublisher=()=>{H.offAssign(O.onAssign),O.publisher===H&&(O.publisher=null)},O.publisher=H)},E=()=>{for(const O of f)if(O.pathConfig.isDynamic){const z=Tt(g,O.pathConfig.originalPath,r);if(!z.ready){k(O,null);continue}k(O,z.path)}else k(O,O.pathConfig.originalPath)};for(const O of f)if(O.pathConfig.isDynamic)for(const z of O.pathConfig.dynamicDependencies){const H=Ts($a.watcherStore,$a.hooked,g,z,()=>E());A.cleanupWatchers.push(H)}d=o.value.bind(g);for(const O of f)O.callbacks.add(d);E(),A.configurations=f}),i.__onDisconnected__(g=>{const A=g[c];A&&(A.cleanupWatchers.forEach(m=>m()),A.cleanupWatchers=[],A.configurations.forEach(m=>{m.unsubscribePublisher&&m.unsubscribePublisher(),m.callbacks.delete(d)}),A.configurations=[])})}}function ru(t){return Object.prototype.toString.call(t)==="[object DataProviderKey]"}function iu(...t){const e=t[t.length-1],s=e!==void 0&&!ru(e),r=s?e:{},n=(s?t.slice(0,-1):t).map(o=>o.path);return Ta({dispatchWhenUndefined:!r.waitForAllDefined,skip:r.skip,skipEmptyPlaceholder:r.skipEmptyPlaceholder},n)}function nu(){return function(t,e,s){let r=0;const i=s.value,n=t.constructor.prototype.disconnectedCallback;t.constructor.prototype.disconnectedCallback=function(){n?.apply(this),this.__removeAutoSubscribe__()};const o=t.connectedCallback;t.connectedCallback=function(){o?.call(this),this[e]()},s.value=function(...c){let d=new Set;const g=()=>{r++;const m=r;window.queueMicrotask(()=>{m===r&&this[e]()})};d.forEach(m=>{m.offAssign(g)}),Io();const A=i.apply(this,c);return d=No()||new Set,d.forEach(m=>{m.onAssign(g,!1)}),this.__removeAutoSubscribe__=()=>{d.forEach(m=>{m.offAssign(g)})},A}}}function ou(t){return function(e){Qs(e);for(const s of t){const r=s.split(".");if(r.length===0)continue;const i=r.shift()||"";let n=ve.get(i);n=Kr.traverse(n,r),e.__onConnected__(o=>{n.startTemplateFilling(o)}),e.__onDisconnected__(()=>{})}}}function au(t){const e=[];let s=t;for(;s;)s instanceof Element&&e.push(s),s=s.parentNode||(s.host??null);return e}function lu(t){const e=t.parentNode||(t.getRootNode()?.host??null);return e instanceof Element?e:null}function La(t,e,s,r){const i=t,n=ze.getAncestorAttributeValue(t,e);!r.assignNull&&n===null||Object.is(i[s],n)||(i[s]=n)}const ye=class ye{static subscribe(e,s,r,i={assignNull:!0}){const n={component:e,attributeName:s,propertyKey:r,syncOptions:i,watchedAncestors:[],parentForReparent:null};return ye.subscriptions.add(n),ye.bindSubscription(n),()=>{ye.unsubscribe(n)}}static bindSubscription(e){ye.unbindWatchers(e);const s=au(e.component);e.watchedAncestors=s;for(const i of s)ye.addAttrSlot(i,e.attributeName,e);const r=lu(e.component);e.parentForReparent=r,r&&ye.addParentSlot(r,e),ye.pendingRefresh.add(e),ye.scheduleRefresh()}static unbindWatchers(e){for(const s of e.watchedAncestors)ye.removeAttrSlot(s,e.attributeName,e);e.watchedAncestors=[],e.parentForReparent&&(ye.removeParentSlot(e.parentForReparent,e),e.parentForReparent=null)}static addAttrSlot(e,s,r){let i=ye.attrSlots.get(e);i||(i=new Map,ye.attrSlots.set(e,i));let n=i.get(s);if(!n){const o=ze.scopeAttributeNames(s),c=new Set,d=new MutationObserver(()=>{for(const g of c)ye.subscriptions.has(g)&&ye.pendingRefresh.add(g);ye.scheduleRefresh()});d.observe(e,{attributes:!0,attributeFilter:o}),n={observer:d,subscriptions:c},i.set(s,n)}n.subscriptions.add(r)}static removeAttrSlot(e,s,r){const i=ye.attrSlots.get(e);if(!i)return;const n=i.get(s);n&&(n.subscriptions.delete(r),!(n.subscriptions.size>0)&&(n.observer.disconnect(),i.delete(s)))}static addParentSlot(e,s){let r=ye.parentSlots.get(e);if(!r){const n=new Map,o=new MutationObserver(c=>{const d=new Set;for(const g of c)g.removedNodes.forEach(A=>{A instanceof Element&&d.add(A)}),g.addedNodes.forEach(A=>{A instanceof Element&&d.add(A)});for(const g of d){const A=n.get(g);if(A)for(const m of[...A])ye.subscriptions.has(m)&&ye.bindSubscription(m)}});o.observe(e,{childList:!0}),r={observer:o,byComponent:n},ye.parentSlots.set(e,r)}let i=r.byComponent.get(s.component);i||(i=new Set,r.byComponent.set(s.component,i)),i.add(s)}static removeParentSlot(e,s){const r=ye.parentSlots.get(e);if(!r)return;const i=r.byComponent.get(s.component);i&&(i.delete(s),i.size===0&&r.byComponent.delete(s.component)),!(r.byComponent.size>0)&&(r.observer.disconnect(),ye.parentSlots.delete(e))}static unsubscribe(e){ye.subscriptions.has(e)&&(ye.unbindWatchers(e),ye.subscriptions.delete(e),ye.pendingRefresh.delete(e),ye.subscriptions.size===0&&ye.cancelScheduledRefresh())}static scheduleRefresh(){ye.pendingRefresh.size!==0&&ye.animationFrameId===null&&(ye.animationFrameId=requestAnimationFrame(()=>{ye.flushRefresh()}))}static cancelScheduledRefresh(){ye.animationFrameId!==null&&(cancelAnimationFrame(ye.animationFrameId),ye.animationFrameId=null),ye.pendingRefresh.clear()}static flushRefresh(){ye.animationFrameId=null;const e=Array.from(ye.pendingRefresh);ye.pendingRefresh.clear();for(const s of e)ye.subscriptions.has(s)&&La(s.component,s.attributeName,s.propertyKey,s.syncOptions)}};ye.subscriptions=new Set,ye.pendingRefresh=new Set,ye.animationFrameId=null,ye.attrSlots=new WeakMap,ye.parentSlots=new WeakMap;let Kn=ye;function Gn(t,e){const s=e?.dynamic??!1,r=s;return function(i,n){if(!i||(Qs(i),i.__onBeforeConnected__(c=>{La(c,t,n,{assignNull:r})}),!s))return;let o=null;i.__onConnected__(c=>{o=Kn.subscribe(c,t,n,{assignNull:!0})}),i.__onDisconnected__(()=>{o?.(),o=null})}}var cu=Object.defineProperty,hu=Object.getOwnPropertyDescriptor,Xs=(t,e,s,r)=>{for(var i=r>1?void 0:r?hu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&cu(e,s,i),i};const Yn=t=>h(t),uu="sonic-icon";let vs=class extends Q{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library="",this.customIconLibraryPath=null,this.customIconDefaultPrefix=null}async updateIcon(){this.iconText=await Vn.default.get({name:this.name,prefix:this.prefix,library:this.library,customLibraryPath:this.customIconLibraryPath,customLibraryDefaultPrefix:this.customIconDefaultPrefix})}connectedCallback(){this.setAttribute("aria-hidden","true"),super.connectedCallback()}willUpdate(t){(t.has("name")||t.has("prefix")||t.has("library")||this.library==="custom"&&(t.has("customIconLibraryPath")||t.has("customIconDefaultPrefix")))&&this.updateIcon(),super.willUpdate(t)}render(){return this.iconText?this.iconText:ee}};vs.styles=Z`
555
547
  :host {
556
548
  line-height: 0.1em;
557
549
  width: fit-content;
@@ -601,7 +593,7 @@
601
593
  :host([size="3xl"]) svg {
602
594
  --_sc-icon-size: 2.8em;
603
595
  }
604
- `,Xs([Ae()],ys.prototype,"iconText",2),Xs([Vn({type:String})],ys.prototype,"name",2),Xs([Vn({type:String})],ys.prototype,"prefix",2),Xs([Vn({type:String})],ys.prototype,"library",2),Xs([Hn("customIconLibraryPath",{dynamic:!0}),Ae()],ys.prototype,"customIconLibraryPath",2),Xs([Hn("customIconDefaultPrefix",{dynamic:!0}),Ae()],ys.prototype,"customIconDefaultPrefix",2),ys=Xs([Q(au)],ys);function Wn(t){return t?t instanceof Object?t:He(t):se}const Oa=new WeakMap;function lu(t){const e=Oa.get(t);if(e)return e;const s=new CSSStyleSheet;return s.replaceSync(t.cssText),Oa.set(t,s),s}function cu(t){return t instanceof bn}function Kn(t){return t?(Array.isArray(t)?t:[t]).flatMap(s=>Array.isArray(s)?Kn(s):s instanceof CSSStyleSheet?[s]:cu(s)?[lu(s)]:[]):[]}da();const Zr=X`
596
+ `,Xs([xe()],vs.prototype,"iconText",2),Xs([Yn({type:String})],vs.prototype,"name",2),Xs([Yn({type:String})],vs.prototype,"prefix",2),Xs([Yn({type:String})],vs.prototype,"library",2),Xs([Gn("customIconLibraryPath",{dynamic:!0}),xe()],vs.prototype,"customIconLibraryPath",2),Xs([Gn("customIconDefaultPrefix",{dynamic:!0}),xe()],vs.prototype,"customIconDefaultPrefix",2),vs=Xs([X(uu)],vs);function Zn(t){return t?t instanceof Object?t:Be(t):ee}const Ma=new WeakMap;function du(t){const e=Ma.get(t);if(e)return e;const s=new CSSStyleSheet;return s.replaceSync(t.cssText),Ma.set(t,s),s}function pu(t){return t instanceof _n}function Jn(t){return t?(Array.isArray(t)?t:[t]).flatMap(s=>Array.isArray(s)?Jn(s):s instanceof CSSStyleSheet?[s]:pu(s)?[du(s)]:[]):[]}ma();const Jr=Z`
605
597
  .custom-scroll {
606
598
  overflow: auto !important;
607
599
  overflow-y: overlay !important;
@@ -623,7 +615,7 @@
623
615
  border: solid 0.15rem transparent;
624
616
  }
625
617
  }
626
- `;function Ta(t){try{const e=JSON.parse(localStorage.getItem(t)||"{}");return e&&typeof e=="object"?e:{}}catch{return{}}}function La(t,e){return!!Ta(t)[e]}function Ma(t,e){const s=Ta(t);s[e]=!0;try{localStorage.setItem(t,JSON.stringify(s))}catch{}}const Ia="sonic-toast-dismissed";function Na(t){return La(Ia,t)}function hu(t){Ma(Ia,t)}const uu=new Set(["en","fr","de","nl","es","it"]);function zi(t,e){const s=(ze.getLanguage()??"en").split("-")[0].toLowerCase();return uu.has(s)&&t[s]?t[s]:t.en}const ws={closeWindow:{en:"Close window",fr:"Fermer la fenêtre",de:"Fenster schließen",nl:"Venster sluiten",es:"Cerrar ventana",it:"Chiudi finestra"},closeAlert:{en:"Close",fr:"Fermer",de:"Schließen",nl:"Sluiten",es:"Cerrar",it:"Chiudi"},showPassword:{en:"Show password",fr:"Afficher le mot de passe",de:"Passwort anzeigen",nl:"Wachtwoord tonen",es:"Mostrar contraseña",it:"Mostra password"},hidePassword:{en:"Hide password",fr:"Masquer le mot de passe",de:"Passwort ausblenden",nl:"Wachtwoord verbergen",es:"Ocultar contraseña",it:"Nascondi password"},closeToast:{en:"Close notification",fr:"Fermer la notification",de:"Benachrichtigung schließen",nl:"Melding sluiten",es:"Cerrar notificación",it:"Chiudi notifica"},closeToastError:{en:"Close error message",fr:"Fermer le message d'erreur",de:"Fehlermeldung schließen",nl:"Foutmelding sluiten",es:"Cerrar mensaje de error",it:"Chiudi messaggio di errore"},closeToastWarning:{en:"Close warning",fr:"Fermer l'avertissement",de:"Warnung schließen",nl:"Waarschuwing sluiten",es:"Cerrar advertencia",it:"Chiudi avviso"},closeToastSuccess:{en:"Close success message",fr:"Fermer le message de succès",de:"Erfolgsmeldung schließen",nl:"Succesmelding sluiten",es:"Cerrar mensaje de éxito",it:"Chiudi messaggio di successo"},closeToastInfo:{en:"Close information message",fr:"Fermer l'information",de:"Information schließen",nl:"Informatie sluiten",es:"Cerrar información",it:"Chiudi informazione"}},du={error:ws.closeToastError,warning:ws.closeToastWarning,success:ws.closeToastSuccess,info:ws.closeToastInfo};function pu(t){const e=t?du[t]:void 0;return zi(e??ws.closeToast)}const Ui={default:"info-empty",info:"info-empty",success:"check-circled-outline",warning:"warning-circled-outline",error:"warning-circled-outline"};function Gn(t){if(t)return t==="danger"?"error":t in Ui?t:void 0}function Fa(t){return t==="error"?"alert":"status"}function Ra(t){return t==="error"?null:"polite"}const ja=X`
618
+ `;function Ia(t){try{const e=JSON.parse(localStorage.getItem(t)||"{}");return e&&typeof e=="object"?e:{}}catch{return{}}}function Na(t,e){return!!Ia(t)[e]}function Fa(t,e){const s=Ia(t);s[e]=!0;try{localStorage.setItem(t,JSON.stringify(s))}catch{}}const Ra="sonic-toast-dismissed";function ja(t){return Na(Ra,t)}function fu(t){Fa(Ra,t)}const mu=new Set(["en","fr","de","nl","es","it"]);function Qr(t,e){const s=(ze.getLanguage()??"en").split("-")[0].toLowerCase();return mu.has(s)&&t[s]?t[s]:t.en}const is={closeWindow:{en:"Close window",fr:"Fermer la fenêtre",de:"Fenster schließen",nl:"Venster sluiten",es:"Cerrar ventana",it:"Chiudi finestra"},closeAlert:{en:"Close",fr:"Fermer",de:"Schließen",nl:"Sluiten",es:"Cerrar",it:"Chiudi"},showPassword:{en:"Show password",fr:"Afficher le mot de passe",de:"Passwort anzeigen",nl:"Wachtwoord tonen",es:"Mostrar contraseña",it:"Mostra password"},hidePassword:{en:"Hide password",fr:"Masquer le mot de passe",de:"Passwort ausblenden",nl:"Wachtwoord verbergen",es:"Ocultar contraseña",it:"Nascondi password"},closeToast:{en:"Close notification",fr:"Fermer la notification",de:"Benachrichtigung schließen",nl:"Melding sluiten",es:"Cerrar notificación",it:"Chiudi notifica"},closeToastError:{en:"Close error message",fr:"Fermer le message d'erreur",de:"Fehlermeldung schließen",nl:"Foutmelding sluiten",es:"Cerrar mensaje de error",it:"Chiudi messaggio di errore"},closeToastWarning:{en:"Close warning",fr:"Fermer l'avertissement",de:"Warnung schließen",nl:"Waarschuwing sluiten",es:"Cerrar advertencia",it:"Chiudi avviso"},closeToastSuccess:{en:"Close success message",fr:"Fermer le message de succès",de:"Erfolgsmeldung schließen",nl:"Succesmelding sluiten",es:"Cerrar mensaje de éxito",it:"Chiudi messaggio di successo"},closeToastInfo:{en:"Close information message",fr:"Fermer l'information",de:"Information schließen",nl:"Informatie sluiten",es:"Cerrar información",it:"Chiudi informazione"},loading:{en:"Loading",fr:"Chargement en cours",de:"Wird geladen",nl:"Laden",es:"Cargando",it:"Caricamento in corso"}},gu={error:is.closeToastError,warning:is.closeToastWarning,success:is.closeToastSuccess,info:is.closeToastInfo};function bu(t){const e=t?gu[t]:void 0;return Qr(e??is.closeToast)}const Ui={default:"info-empty",info:"info-empty",success:"check-circled-outline",warning:"warning-circled-outline",error:"warning-circled-outline"};function Qn(t){if(t)return t==="danger"?"error":t in Ui?t:void 0}function za(t){return t==="error"?"alert":"status"}function Ua(t){return t==="error"?null:"polite"}const qa=Z`
627
619
  :host {
628
620
  --sc-_color: var(--sc-base-content, #000);
629
621
  color: var(--sc-_color);
@@ -645,9 +637,9 @@
645
637
  .inherit-color {
646
638
  color: var(--sc-_color);
647
639
  }
648
- `,Yn=X`
640
+ `,qi=Z`
649
641
  :host {
650
- --sc-_color: inherit;
642
+ --sc-_color: var(--sc-base-content, #000);
651
643
  color: var(--sc-_color);
652
644
  }
653
645
 
@@ -666,19 +658,84 @@
666
658
  :host([type="success"]) {
667
659
  --sc-_color: var(--sc-success, var(--sc-base-content, #000));
668
660
  }
661
+ :host([type="neutral"]) {
662
+ --sc-_color: var(--sc-base-content, #000);
663
+ }
669
664
 
670
665
  .inherit-color {
671
666
  color: var(--sc-_color);
672
667
  }
673
- `,za=X`
668
+ `,Ha=Z`
669
+ :host([type="default"][invert]) {
670
+ --sc-_color: var(--sc-base, #fff);
671
+ --sc-_bg: color-mix(
672
+ in srgb,
673
+ var(--sc-base-content, #000) 8%,
674
+ var(--sc-base, #fff)
675
+ );
676
+ }
677
+ :host([type="primary"][invert]) {
678
+ --sc-_color: var(--sc-primary-content, var(--sc-base, #fff));
679
+ --sc-_bg: color-mix(
680
+ in srgb,
681
+ var(--sc-primary, var(--sc-base-content, #000)) 85%,
682
+ var(--sc-primary-content, #fff)
683
+ );
684
+ }
685
+ :host([type="warning"][invert]) {
686
+ --sc-_color: var(--sc-warning-content, var(--sc-base, #fff));
687
+ --sc-_bg: color-mix(
688
+ in srgb,
689
+ var(--sc-warning, var(--sc-base-content, #000)) 85%,
690
+ var(--sc-warning-content, #fff)
691
+ );
692
+ }
693
+ :host([type="danger"][invert]) {
694
+ --sc-_color: var(--sc-danger-content, var(--sc-base, #fff));
695
+ --sc-_bg: color-mix(
696
+ in srgb,
697
+ var(--sc-danger, var(--sc-base-content, #000)) 85%,
698
+ var(--sc-danger-content, #fff)
699
+ );
700
+ }
701
+ :host([type="info"][invert]) {
702
+ --sc-_color: var(--sc-info-content, var(--sc-base, #fff));
703
+ --sc-_bg: color-mix(
704
+ in srgb,
705
+ var(--sc-info, var(--sc-base-content, #000)) 85%,
706
+ var(--sc-info-content, #fff)
707
+ );
708
+ }
709
+ :host([type="success"][invert]) {
710
+ --sc-_color: var(--sc-success-content, var(--sc-base, #fff));
711
+ --sc-_bg: color-mix(
712
+ in srgb,
713
+ var(--sc-success, var(--sc-base-content, #000)) 85%,
714
+ var(--sc-success-content, #fff)
715
+ );
716
+ }
717
+ :host([type="neutral"][invert]) {
718
+ --sc-_color: var(--sc-base, #fff);
719
+ --sc-_bg: color-mix(
720
+ in srgb,
721
+ var(--sc-base, #fff) 80%,
722
+ var(--sc-base-content, #000)
723
+ );
724
+ }
725
+ `,Ba=Z`
674
726
  :host {
675
- --sc-_color: inherit;
676
- --sc-_bg: inherit;
727
+ --sc-_bg: var(--sc-base-100, rgba(0, 0, 0, 0.07));
728
+ --sc-_color: var(--sc-base-content, #000);
677
729
  color: var(--sc-_color);
678
730
  background: var(--sc-_bg);
679
731
  }
680
732
 
681
733
  /*TYPES*/
734
+ :host([type="default"]),
735
+ :host([type="light"]) {
736
+ --sc-_bg: var(--sc-base-100, rgba(0, 0, 0, 0.07));
737
+ --sc-_color: var(--sc-base-content, #000);
738
+ }
682
739
  :host([type="primary"]) {
683
740
  --sc-_bg: var(--sc-primary, var(--sc-base-content, #000));
684
741
  --sc-_color: var(--sc-primary-content, var(--sc-base, #fff));
@@ -714,11 +771,6 @@
714
771
  --sc-_bg: var(--sc-base, #fff);
715
772
  --sc-_color: var(--sc-base-content, #000);
716
773
  }
717
- :host([type="default"]),
718
- :host([type="light"]) {
719
- --sc-_bg: var(--sc-base-100, rgba(0, 0, 0, 0.07));
720
- --sc-_color: var(--sc-base-content, #000);
721
- }
722
774
 
723
775
  :host([type="neutral"]) {
724
776
  --sc-_bg: var(--sc-base-content, #000);
@@ -733,15 +785,15 @@
733
785
  .inherit-bg {
734
786
  color: inherit;
735
787
  }
736
- `;var fu=Object.defineProperty,gu=Object.getOwnPropertyDescriptor,Tt=(t,e,s,i)=>{for(var r=i>1?void 0:i?gu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&fu(e,s,r),r};const Ua=6e3,mu="sonic-toast-item";let bt=class extends J{constructor(){super(...arguments),this.label="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.useSlot=!1,this.visible=!0,this._titleId="",this._dismissed=!1,this._adoptedStyleSheets=[],this._hideRemaining=Ua,this._hideStartedAt=0,this._hovered=!1,this._focused=!1,this._hidden=!1,this._onMouseEnter=()=>{this._hovered=!0,this._syncHideTimer()},this._onMouseLeave=()=>{this._hovered=!1,this._syncHideTimer()},this._onFocusIn=()=>{this._focused=!0,this._syncHideTimer()},this._onFocusOut=t=>{this.contains(t.relatedTarget)||(this._focused=!1,this._syncHideTimer())}}connectedCallback(){super.connectedCallback(),this.addEventListener("mouseenter",this._onMouseEnter),this.addEventListener("mouseleave",this._onMouseLeave),this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut)}disconnectedCallback(){this._clearHideTimer(),this.removeEventListener("mouseenter",this._onMouseEnter),this.removeEventListener("mouseleave",this._onMouseLeave),this.removeEventListener("focusin",this._onFocusIn),this.removeEventListener("focusout",this._onFocusOut),super.disconnectedCallback()}willUpdate(t){(t.has("dismissForever")||t.has("id"))&&(this._dismissed=this.dismissForever&&!!this.id&&Na(this.id)),super.willUpdate(t)}getAriaRole(){return Fa(Gn(this.status)??"default")}getAriaLive(){return Ra(Gn(this.status)??"default")}getTitleId(){return this._titleId?this._titleId:(this._titleId=this.id?`toast-title-${this.id}`:`toast-title-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,this._titleId)}render(){if(this._dismissed||!this.visible)return se;const t=this.label?this.getTitleId():void 0,e=!this.label&&typeof this.text=="string"?this.text.length>100?this.text.substring(0,100).replace(/\s+\S*$/,"")+"...":this.text:void 0,s=this.getAriaLive();return R`<div
788
+ `;var vu=Object.defineProperty,yu=Object.getOwnPropertyDescriptor,Lt=(t,e,s,r)=>{for(var i=r>1?void 0:r?yu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&vu(e,s,i),i};const Va=6e3,wu="sonic-toast-item";let vt=class extends Q{constructor(){super(...arguments),this.label="",this.id="",this.text="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.useSlot=!1,this.visible=!0,this._titleId="",this._dismissed=!1,this._adoptedStyleSheets=[],this._hideRemaining=Va,this._hideStartedAt=0,this._hovered=!1,this._focused=!1,this._hidden=!1,this._onMouseEnter=()=>{this._hovered=!0,this._syncHideTimer()},this._onMouseLeave=()=>{this._hovered=!1,this._syncHideTimer()},this._onFocusIn=()=>{this._focused=!0,this._syncHideTimer()},this._onFocusOut=t=>{this.contains(t.relatedTarget)||(this._focused=!1,this._syncHideTimer())}}connectedCallback(){super.connectedCallback(),this.addEventListener("mouseenter",this._onMouseEnter),this.addEventListener("mouseleave",this._onMouseLeave),this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut)}disconnectedCallback(){this._clearHideTimer(),this.removeEventListener("mouseenter",this._onMouseEnter),this.removeEventListener("mouseleave",this._onMouseLeave),this.removeEventListener("focusin",this._onFocusIn),this.removeEventListener("focusout",this._onFocusOut),super.disconnectedCallback()}willUpdate(t){(t.has("dismissForever")||t.has("id"))&&(this._dismissed=this.dismissForever&&!!this.id&&ja(this.id)),super.willUpdate(t)}getAriaRole(){return za(Qn(this.status)??"default")}getAriaLive(){return Ua(Qn(this.status)??"default")}getTitleId(){return this._titleId?this._titleId:(this._titleId=this.id?`toast-title-${this.id}`:`toast-title-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,this._titleId)}render(){if(this._dismissed||!this.visible)return ee;const t=this.label?this.getTitleId():void 0,e=!this.label&&typeof this.text=="string"?this.text.length>100?this.text.substring(0,100).replace(/\s+\S*$/,"")+"...":this.text:void 0,s=this.getAriaLive();return R`<div
737
789
  class="sonic-toast ${this.ghost?"ghost":""}"
738
790
  role=${this.getAriaRole()}
739
- aria-live=${s||se}
791
+ aria-live=${s||ee}
740
792
  aria-atomic="true"
741
- aria-label=${e||se}
793
+ aria-label=${e||ee}
742
794
  >
743
795
  <button
744
- aria-label=${pu(this.status)}
796
+ aria-label=${bu(this.status)}
745
797
  class="sonic-toast-close"
746
798
  @click=${()=>this.hide()}
747
799
  >
@@ -752,7 +804,7 @@
752
804
  style="max-height: ${this.maxHeight} ;"
753
805
  >
754
806
  ${this.status&&R`<sonic-icon
755
- name=${Ui[Gn(this.status)??"default"]}
807
+ name=${Ui[Qn(this.status)??"default"]}
756
808
  class="sonic-toast-icon"
757
809
  size="xl"
758
810
  aria-hidden="true"
@@ -760,13 +812,13 @@
760
812
 
761
813
  <div class="sonic-toast-text">
762
814
  ${this.label?R`<div class="sonic-toast-title" id=${t}>
763
- ${Wn(this.label)}
815
+ ${Zn(this.label)}
764
816
  </div>`:""}
765
- ${this.useSlot?se:Wn(this.text)}
817
+ ${this.useSlot?ee:Zn(this.text)}
766
818
  <slot></slot>
767
819
  </div>
768
820
  </div>
769
- </div>`}updated(t){t.has("styleSheet")&&this.syncAdoptedStyleSheets(),(t.has("preserve")||t.has("visible")||t.has("_dismissed"))&&this._syncHideTimer()}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=Kn(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...e,...t],this._adoptedStyleSheets=t}hide(){this._clearHideTimer(),this._hidden=!0,bs.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever&&hu(this.id),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this._hidden=!1,this._hideRemaining=Ua,this.visible=!0,this._syncHideTimer()}_syncHideTimer(){if(!(!this.preserve&&this.visible&&!this._hidden&&!this._dismissed&&!this._hovered&&!this._focused)){this._pauseHideTimer();return}this._hideTimer||(this._hideStartedAt=Date.now(),this._hideTimer=setTimeout(()=>{this._hideTimer=void 0,this.hide()},this._hideRemaining))}_pauseHideTimer(){this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=void 0,this._hideRemaining=Math.max(0,this._hideRemaining-(Date.now()-this._hideStartedAt)))}_clearHideTimer(){clearTimeout(this._hideTimer),this._hideTimer=void 0}};bt.styles=[Zr,ja,X`
821
+ </div>`}updated(t){t.has("styleSheet")&&this.syncAdoptedStyleSheets(),(t.has("preserve")||t.has("visible")||t.has("_dismissed"))&&this._syncHideTimer()}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=Jn(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...e,...t],this._adoptedStyleSheets=t}hide(){this._clearHideTimer(),this._hidden=!0,gs.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever&&fu(this.id),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this._hidden=!1,this._hideRemaining=Va,this.visible=!0,this._syncHideTimer()}_syncHideTimer(){if(!(!this.preserve&&this.visible&&!this._hidden&&!this._dismissed&&!this._hovered&&!this._focused)){this._pauseHideTimer();return}this._hideTimer||(this._hideStartedAt=Date.now(),this._hideTimer=setTimeout(()=>{this._hideTimer=void 0,this.hide()},this._hideRemaining))}_pauseHideTimer(){this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=void 0,this._hideRemaining=Math.max(0,this._hideRemaining-(Date.now()-this._hideStartedAt)))}_clearHideTimer(){clearTimeout(this._hideTimer),this._hideTimer=void 0}};vt.styles=[Jr,qa,Z`
770
822
  * {
771
823
  box-sizing: border-box;
772
824
  }
@@ -882,19 +934,16 @@
882
934
  }
883
935
 
884
936
  /*STATUS — accent via statusColor (--sc-_color) */
885
- :host([status]) .sonic-toast {
937
+ :host([status="success"]) .sonic-toast,
938
+ :host([status="error"]) .sonic-toast,
939
+ :host([status="info"]) .sonic-toast,
940
+ :host([status="warning"]) .sonic-toast {
886
941
  border-top: 3px solid var(--sc-_color);
887
942
  }
888
943
 
889
- :host([status="success"]) .sonic-toast:before,
890
- :host([status="error"]) .sonic-toast:before,
891
- :host([status="info"]) .sonic-toast:before,
892
- :host([status="warning"]) .sonic-toast:before {
893
- background-color: var(--sc-_color);
894
- }
895
-
896
944
  .sonic-toast:before {
897
945
  content: "";
946
+ background-color: var(--sc-_color);
898
947
  display: block;
899
948
  position: absolute;
900
949
  left: 0;
@@ -920,22 +969,8 @@
920
969
  opacity: 0.85;
921
970
  pointer-events: none;
922
971
  }
923
- `],Tt([h()],bt.prototype,"label",2),Tt([h({type:String})],bt.prototype,"id",2),Tt([h()],bt.prototype,"text",2),Tt([h({type:String,reflect:!0})],bt.prototype,"status",2),Tt([h({type:Boolean})],bt.prototype,"ghost",2),Tt([h({type:Boolean})],bt.prototype,"preserve",2),Tt([h({type:Boolean})],bt.prototype,"dismissForever",2),Tt([h({type:String})],bt.prototype,"maxHeight",2),Tt([h({type:Boolean})],bt.prototype,"useSlot",2),Tt([h({attribute:!1})],bt.prototype,"styleSheet",2),Tt([Ae()],bt.prototype,"visible",2),Tt([Ae()],bt.prototype,"_titleId",2),Tt([Ae()],bt.prototype,"_dismissed",2),bt=Tt([Q(mu)],bt);const bu=X`
972
+ `],Lt([h()],vt.prototype,"label",2),Lt([h({type:String})],vt.prototype,"id",2),Lt([h()],vt.prototype,"text",2),Lt([h({type:String,reflect:!0})],vt.prototype,"status",2),Lt([h({type:Boolean})],vt.prototype,"ghost",2),Lt([h({type:Boolean})],vt.prototype,"preserve",2),Lt([h({type:Boolean})],vt.prototype,"dismissForever",2),Lt([h({type:String})],vt.prototype,"maxHeight",2),Lt([h({type:Boolean})],vt.prototype,"useSlot",2),Lt([h({attribute:!1})],vt.prototype,"styleSheet",2),Lt([xe()],vt.prototype,"visible",2),Lt([xe()],vt.prototype,"_titleId",2),Lt([xe()],vt.prototype,"_dismissed",2),vt=Lt([X(wu)],vt);const _u=Z`
924
973
  :host {
925
- /* POLICES */
926
- /*
927
- --sc-font-family-base: "Inter var", "Inter", -apple-system, system-ui,
928
- BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
929
- sans-serif;
930
- --sc-font-weight-base: 400;
931
- --sc-font-style-base: normal;
932
-
933
- --sc-headings-font-family: var(--sc-font-family-base, sans-serif);
934
- --sc-headings-font-style: var(--sc-font-style-base, normal);
935
- --sc-headings-line-height: 1.1;
936
- --sc-headings-font-weight: 700;
937
- */
938
-
939
974
  /* ROUNDED*/
940
975
  --sc-rounded-sm: calc(var(--sc-rounded, 0px) * 0.5);
941
976
  --sc-rounded: 0.375rem;
@@ -943,15 +978,6 @@
943
978
  --sc-rounded-lg: calc(var(--sc-rounded, 0px) * 3);
944
979
  --sc-rounded-xl: calc(var(--sc-rounded, 0px) * 7);
945
980
 
946
- /* BOUTONS */
947
- /*
948
- --sc-btn-font-family: var(--sc-font-family-base, sans-serif); *
949
- --sc-btn-font-weight: 500;
950
- */
951
-
952
- /* Placeholder */
953
- /*--sc-placeholder-bg: rgba(17, 24, 39, 0.05); */
954
-
955
981
  /* 4 for rounded full*/
956
982
  --sc-btn-rounded-intensity: 1.4;
957
983
  --sc-rounded-size-intensity: calc((1em - 1rem) * 0.4);
@@ -961,14 +987,14 @@
961
987
  );
962
988
 
963
989
  /* OMBRES */
964
- --sc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1),
965
- 0 1px 2px -1px rgb(0 0 0 / 0.1);
966
- --sc-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
967
- 0 2px 4px -2px rgb(0 0 0 / 0.1);
968
- --sc-shadow-lg: 0 10px 15px 0px rgb(0 0 0 / 0.1),
969
- 0 4px 6px -4px rgb(0 0 0 / 0.1);
970
- --sc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
971
- 0 8px 10px -6px rgb(0 0 0 / 0.1);
990
+ --sc-shadow-sm:
991
+ 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
992
+ --sc-shadow:
993
+ 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
994
+ --sc-shadow-lg:
995
+ 0 10px 15px 0px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
996
+ --sc-shadow-xl:
997
+ 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
972
998
  --sc-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
973
999
 
974
1000
  /* Forms */
@@ -991,36 +1017,7 @@
991
1017
  --sc-contrast-content: #fff;
992
1018
  --sc-contrast: #000000;
993
1019
  }
994
- `,vu=X`
995
- :host([theme="light"]) {
996
- /*Boutons*/
997
- --sc-primary: var(--sc-base-800);
998
- --sc-info: #2563eb;
999
- --sc-danger: #f43f5e;
1000
- --sc-warning: #f97316;
1001
- --sc-success: #14b8a6;
1002
-
1003
- --sc-primary-content: var(--sc-base, #fff);
1004
- --sc-info-content: var(--sc-base, #fff);
1005
- --sc-danger-content: var(--sc-base, #fff);
1006
- --sc-warning-content: var(--sc-base, #fff);
1007
- --sc-success-content: var(--sc-base, #fff);
1008
-
1009
- /*Bases*/
1010
- --sc-base: #fff;
1011
- --sc-base-50: #f8fafc;
1012
- --sc-base-100: #f1f5f9;
1013
- --sc-base-200: #e2e8f0;
1014
- --sc-base-300: #cbd5e1;
1015
- --sc-base-400: #94a3b8;
1016
- --sc-base-500: #64748b;
1017
- --sc-base-600: #475569;
1018
- --sc-base-700: #334155;
1019
- --sc-base-800: #1e293b;
1020
- --sc-base-900: #0f172a;
1021
- --sc-base-content: var(--sc-base-700);
1022
- }
1023
- `,qa=X`
1020
+ `,Wa=Z`
1024
1021
  --sc-primary: var(--sc-dark-primary, var(--sc-base-700));
1025
1022
  --sc-info: var(--sc-dark-info, #3abff8);
1026
1023
  --sc-danger: var(--sc-dark-danger, #f87272);
@@ -1045,17 +1042,52 @@
1045
1042
  --sc-base-800: var(--sc-dark-base-800, #d9dce0);
1046
1043
  --sc-base-900: var(--sc-dark-base-900, #e5e7eb);
1047
1044
  --sc-base-content: var(--sc-dark-base-content, #e5e7eb);
1048
- `,yu=X`
1045
+ `,Su=Z`
1049
1046
  :host([theme="dark"]) {
1050
- ${qa}
1047
+ ${Wa}
1048
+ }
1049
+ `,Ka=Z`
1050
+ /*Boutons*/
1051
+ --sc-primary: var(--sc-base-800);
1052
+ --sc-info: #2563eb;
1053
+ --sc-danger: #f43f5e;
1054
+ --sc-warning: #f97316;
1055
+ --sc-success: #14b8a6;
1056
+
1057
+ --sc-primary-content: var(--sc-base, #fff);
1058
+ --sc-info-content: var(--sc-base, #fff);
1059
+ --sc-danger-content: var(--sc-base, #fff);
1060
+ --sc-warning-content: var(--sc-base, #fff);
1061
+ --sc-success-content: var(--sc-base, #fff);
1062
+
1063
+ /*Bases*/
1064
+ --sc-base: #fff;
1065
+ --sc-base-50: #f8fafc;
1066
+ --sc-base-100: #f1f5f9;
1067
+ --sc-base-200: #e2e8f0;
1068
+ --sc-base-300: #cbd5e1;
1069
+ --sc-base-400: #94a3b8;
1070
+ --sc-base-500: #64748b;
1071
+ --sc-base-600: #475569;
1072
+ --sc-base-700: #334155;
1073
+ --sc-base-800: #1e293b;
1074
+ --sc-base-900: #0f172a;
1075
+ --sc-base-content: var(--sc-base-700);
1076
+ `,Pu=Z`
1077
+ :host([theme="light"]) {
1078
+ ${Ka}
1079
+ }
1080
+ `,xu=Z`
1081
+ :host([theme="auto"]) {
1082
+ ${Ka}
1051
1083
  }
1052
1084
 
1053
1085
  @media (prefers-color-scheme: dark) {
1054
1086
  :host([theme="auto"]) {
1055
- ${qa}
1087
+ ${Wa}
1056
1088
  }
1057
1089
  }
1058
- `;var wu=Object.defineProperty,_u=Object.getOwnPropertyDescriptor,Jr=(t,e,s,i)=>{for(var r=i>1?void 0:i?_u(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&wu(e,s,r),r};const Su="sonic-theme";let Rt=class extends J{constructor(){super(),this.background=!1,this.color=!1,this.font=!1,Rt.instance=this}static getPopContainer(){return Rt.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",t=>this.receiveMessage(t),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){const t=document.styleSheets,e=t.length,s=[];for(let r=0;r<e;r++){const n=t[r];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const i={variables:this.getCssVariables(),fonts:s};ve.get("sonic-theme")?.set(i),document.querySelectorAll("iframe").forEach(r=>r.contentWindow?.postMessage({type:"SonicTheme",...i},"*"))}receiveMessage(t){const e=t.data;!e.type||e.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const t=[],e=[...Rt.styles.map(r=>r.styleSheet),...Array.from(document.styleSheets)];for(const r of e)try{if(!r)continue;const n=r.cssRules;for(const o of n){if(!("style"in o))continue;const c=o.style;for(const d of c)t.includes(d)||d.indexOf("--sc")!==0||t.push(d)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),i={};return t.forEach(r=>i[r]=s.getPropertyValue(r)),i}render(){return R`<slot></slot>`}};Rt.styles=[vu,yu,bu,X`
1090
+ `;var Au=Object.defineProperty,Cu=Object.getOwnPropertyDescriptor,Hi=(t,e,s,r)=>{for(var i=r>1?void 0:r?Cu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Au(e,s,i),i};const Ga="sonic-theme";let at=class extends Q{constructor(){super(...arguments),this.onWindowMessage=t=>this.receiveMessage(t),this.color=!1,this.font=!1}static adoptPopContainerInstance(t){at.instance=void 0;const e=document.querySelectorAll(Ga);for(let s=e.length-1;s>=0;s--){const r=e[s];if(r!==t&&r instanceof at&&r.isConnected){at.instance=r;return}}}static getPopContainer(){return at.instance?.isConnected?at.instance:(at.adoptPopContainerInstance(),at.instance??document.body)}connectedCallback(){super.connectedCallback(),at.instance=this,window.addEventListener("message",this.onWindowMessage,!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}disconnectedCallback(){window.removeEventListener("message",this.onWindowMessage,!1),at.instance===this&&at.adoptPopContainerInstance(this),super.disconnectedCallback()}postCSSVars(){const t=document.styleSheets,e=t.length,s=[];for(let i=0;i<e;i++){const n=t[i];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const r={variables:this.getCssVariables(),fonts:s};ve.get("sonic-theme")?.set(r),document.querySelectorAll("iframe").forEach(i=>i.contentWindow?.postMessage({type:"SonicTheme",...r},"*"))}receiveMessage(t){const e=t.data;!e.type||e.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const t=[],e=[...at.styles.map(i=>i.styleSheet),...Array.from(document.styleSheets)];for(const i of e)try{if(!i)continue;const n=i.cssRules;for(const o of n){if(!("style"in o))continue;const c=o.style;for(const d of c)t.includes(d)||d.indexOf("--sc")!==0||t.push(d)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),r={};return t.forEach(i=>r[i]=s.getPropertyValue(i)),r}render(){return R`<slot></slot>`}};at.styles=[Pu,Su,xu,_u,Z`
1059
1091
  :host([color]) {
1060
1092
  color: var(--sc-base-content, #000);
1061
1093
  }
@@ -1087,41 +1119,45 @@
1087
1119
  transition-property: scale, opacity;
1088
1120
  transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
1089
1121
  }
1090
- `],Jr([h({type:String,reflect:!0})],Rt.prototype,"theme",2),Jr([h({type:Boolean,reflect:!0})],Rt.prototype,"background",2),Jr([h({type:Boolean,reflect:!0})],Rt.prototype,"color",2),Jr([h({type:Boolean,reflect:!0})],Rt.prototype,"font",2),Rt=Jr([Q(Su)],Rt);var Pu=Object.defineProperty,xu=Object.getOwnPropertyDescriptor,Ba=(t,e,s,i)=>{for(var r=i>1?void 0:i?xu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Pu(e,s,r),r};let Ha=!1;function Va(t){if(t.label!==void 0)return t.label;if(t.title!==void 0)return Ha||(Ha=!0,console.warn("[concorde] Toast.title est déprécié, utiliser Toast.label.")),t.title}const Au="sonic-toast";let Se=class extends J{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const e=window.parent!=window;let s={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return e||(s={...s,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"45ch",flexDirection:"column-reverse"}),Se.handleExistingToastDelegation(),this.toasts?R`<div style=${$t(s)}>
1091
- ${Fi(this.toasts,i=>i.id,i=>R`
1122
+ `],Hi([h({type:String,reflect:!0})],at.prototype,"theme",2),Hi([h({type:Boolean,reflect:!0})],at.prototype,"color",2),Hi([h({type:Boolean,reflect:!0})],at.prototype,"font",2),at=Hi([X(Ga)],at);var ku=Object.defineProperty,$u=Object.getOwnPropertyDescriptor,Ya=(t,e,s,r)=>{for(var i=r>1?void 0:r?$u(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ku(e,s,i),i};let Za=!1;function Ja(t){if(t.label!==void 0)return t.label;if(t.title!==void 0)return Za||(Za=!0,console.warn("[concorde] Toast.title est déprécié, utiliser Toast.label.")),t.title}const Du="sonic-toast";let Se=class extends Q{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const e=window.parent!=window;let s={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return e||(s={...s,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"45ch",flexDirection:"column-reverse"}),Se.handleExistingToastDelegation(),this.toasts?R`<div style=${$t(s)}>
1123
+ ${Ri(this.toasts,r=>r.id,r=>R`
1092
1124
  <sonic-toast-item
1093
1125
  maxHeight=${e?"none":"10rem"}
1094
- status=${te(i.status)}
1095
- .label=${Va(i)}
1096
- .text=${i.useSlot?void 0:i.text}
1097
- .styleSheet=${i.styleSheet}
1098
- ?useSlot=${i.useSlot}
1099
- ?ghost=${i.ghost}
1100
- ?dismissForever=${i.dismissForever}
1101
- ?preserve=${i.preserve}
1102
- id=${te(i.id)}
1103
- @hide=${()=>this.removeItem(i)}
1104
- ${Lh({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})}
1126
+ status=${se(r.status)}
1127
+ .label=${Ja(r)}
1128
+ .text=${r.useSlot?void 0:r.text}
1129
+ .styleSheet=${r.styleSheet}
1130
+ ?useSlot=${r.useSlot}
1131
+ ?ghost=${r.ghost}
1132
+ ?dismissForever=${r.dismissForever}
1133
+ ?preserve=${r.preserve}
1134
+ id=${se(r.id)}
1135
+ @hide=${()=>this.removeItem(r)}
1136
+ ${Fh({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})}
1105
1137
  >
1106
- ${i.useSlot?Wn(i.text):se}
1138
+ ${r.useSlot?Zn(r.text):ee}
1107
1139
  </sonic-toast-item>
1108
1140
  `)}
1109
- </div>`:se}static removeAll(){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const e=Se.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.ghost))}static removeItemsByStatus(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:e},"*");return}const s=Se.getInstance();s&&(s.toasts=s.toasts.filter(i=>i.status!==e))}static removeItemById(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemById",id:e},"*");return}const s=Se.getInstance();s&&(s.toasts=s.toasts.filter(i=>i.id!==e))}static removeTemporaryItems(){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const e=Se.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.preserve))}static getInstance(){return Se.instance||(Se.instance=document.createElement("sonic-toast"),Rt.getPopContainer().prepend(Se.instance)),Se.instance}static add(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:e},"*");return}const s=Se.getInstance(),i=e.id??new Date().valueOf(),r=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>"),n=typeof e.text=="string"&&r.test(e.text),o={id:i,text:e.text,label:Va(e),status:e.status,preserve:n?!0:e.preserve,ghost:e.ghost,dismissForever:e.dismissForever,styleSheet:e.styleSheet,useSlot:e.useSlot};if(e.dismissForever&&e.id&&Na(e.id))return null;if(s?.toasts.length){const c={...o};for(const d of s.toasts){const m={...d};if(c.id=m.id=0,lt.shallowEqual(c,m))return null}}return s&&(s.toasts=[...s.toasts,o]),o}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const e=Se.getInstance();window.parent.postMessage({type:"addToasts",toasts:e.toasts},"*"),e.toasts=[]}static removeItem(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:e},"*");return}const s=Se.getInstance();s&&s.removeItem(e)}removeItem(e){e&&(this.toasts=this.toasts.filter(s=>(s={...s},delete s.id,!lt.shallowEqual(s,e,!1))))}};Se.delegateToasts=!1,Ba([h({type:Array})],Se.prototype,"toasts",2),Se=Ba([Q(Au)],Se),typeof window<"u"&&(window[fi+"Toast"]=window[fi+"Toast"]||Se);function Cu(){const t=s=>{s.data.type=="querySonicToastAvailability"&&s.source.postMessage({type:"sonicToastAvailable"},"*"),s.data.type=="removeItemsByStatus"&&Se.removeItemsByStatus(s.data.status),s.data.type=="removeItemById"&&Se.removeItemById(s.data.id),s.data.type=="removeTemporaryItems"&&Se.removeTemporaryItems(),s.data.type=="sonicToastAvailable"&&(Se.delegateToasts=!0,Se.handleExistingToastDelegation()),s.data.type=="addToasts"&&(Se.getInstance().toasts=[...Se.getInstance().toasts,...s.data.toasts]),s.data.type=="removeAllToasts"&&Se.removeAll(),s.data.type=="removeToast"&&Se.removeItem(s.data.toast),s.data.type=="addToast"&&Se.add(s.data.toast)},e=window.parent!=window;if(window.addEventListener("message",t,!1),e&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!e)for(const s of document.querySelectorAll("iframe"))s.contentWindow?.postMessage({type:"sonicToastAvailable"},"*")}Cu();var ku=Object.defineProperty,$u=Object.getOwnPropertyDescriptor,Qr=(t,e,s,i)=>{for(var r=i>1?void 0:i?$u(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&ku(e,s,r),r};const Du=new Set,Eu=new Set,Ou=t=>{for(const e of Eu)e(t)},Zn=new Set;let Jn=0;dn(async()=>{Jn++;const t=Jn,e=Array.from(Zn);for(;e.length>0;){if(t!=Jn)return;const s=e.splice(0,4);await Promise.all(s.map(i=>i.refetch()))}});const Qn=(t,e)=>{class s extends t{constructor(...r){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isFetchEnabled=!0,this.fetchedData=null,this._endPoint="",this.noErrorsRecordings=!1,this.requestId=0,this.refetchEveryMs=0,this._isFetching=!1,this._mustRefetch=!1,this.dataProvider=""}get props(){return super.props}set props(r){super.props=r}set endPoint(r){this._endPoint=r,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}handleStartFetching(){return this._isFetching?(this._mustRefetch=!0,"fetching"):(this._isFetching=!0,"okToFetch")}handleEndFetching(){this._isFetching=!1,this._mustRefetch&&(this._mustRefetch=!1,this._fetchData())}refetch(){return this._fetchData()}async _fetchData(){if(this.requestUpdate(),!this.isFetchEnabled||(this.api=new Os(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await ve.getInstance().isLocalStrorageReady,!this.isConnected))return;const r=ve.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(this.isLoading=!0,lt.isObject(this.props)&&Object.keys(this.props||{}).length>0&&this.isFirstLoad&&window.requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1}),this.handleStartFetching()==="fetching")return;let o=null;try{o=await this.api.get(this.endPoint||this.dataProvider||"",r)}catch{}if(this.handleEndFetching(),this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||Du.add(this),Ou(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&Se.add({text:"Network Error",status:"error"});else{this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs));return}if(this.key){const c=o._sonic_http_response_,d=this.key.split(".");o=lt.traverse(o,d,this.hasAttribute("preserveOtherKeys")),o&&lt.isObject(o)&&c&&(o._sonic_http_response_=c)}this.props=o,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs))}}disconnectedCallback(){super.disconnectedCallback(),Zn.delete(this),this.publisher?.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){this.lazyLoad=this.lazyLoad!==void 0?this.lazyLoad:this.hasAttribute("lazyload"),Zn.add(this),super.connectedCallback(),this.isFetchEnabled&&(this.key=this.key!=""?this.key:this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),this.publisher?.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const r=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),n={root:null,rootMargin:Math.max(window.innerWidth*r,window.innerHeight*r)+"px",threshold:.9};this.iObserver=new IntersectionObserver(d=>this.onIntersection(d),n);let c=[...(this.shadowRoot?this.shadowRoot:this).children].filter(d=>d.nodeName.toLowerCase()!="style")[0];if(c?.nodeName.toLocaleLowerCase()=="slot"&&(c=[...c.children].filter(d=>d.nodeName.toLowerCase()!="style")[0]),!c||c.nodeName.toLocaleLowerCase()=="template"){c=document.createElement("div");const d=c.style;d.pointerEvents="none",d.width="1px",d.height="1px",this.lazyLoadPlaceHolder=c,this.appendChild(c)}c?this.iObserver.observe(c):this.isFirstLoad&&this._fetchData()}onIntersection(r){for(const n of r)if(n.isIntersecting&&this.isFirstLoad){this._fetchData(),this.lazyLoadPlaceHolder?.remove(),this.lazyLoadPlaceHolder=void 0,this.iObserver?.disconnect();break}}}return Qr([h()],s.prototype,"noErrorsRecordings",2),Qr([h()],s.prototype,"props",1),Qr([h({type:String})],s.prototype,"endPoint",1),Qr([h()],s.prototype,"requestId",2),Qr([h({type:Number})],s.prototype,"refetchEveryMs",2),s};var Tu=Object.defineProperty,Lu=Object.getOwnPropertyDescriptor,er=(t,e,s,i)=>{for(var r=i>1?void 0:i?Lu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Tu(e,s,r),r};const qi=t=>{class e extends t{constructor(...i){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){const i=this.shadowRoot?.querySelector("input");if(!i||i.checkValidity())return;const r=this.getFormPublisher();r&&(r.isFormValid=!1),i.reportValidity()}set type(i){this.hasAttribute("type")&&!this.forceAutoFill&&(i=this.getAttribute("type")),this._type=i,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(i){this.hasAttribute("description")&&!this.forceAutoFill&&(i=this.getAttribute("description")),this._description=i,this.requestUpdate()}get label(){return this._label}set label(i){this.hasAttribute("label")&&!this.forceAutoFill&&(i=this.getAttribute("label")),this._label=i,this.requestUpdate()}}return er([h()],e.prototype,"forceAutoFill",2),er([h({type:String})],e.prototype,"type",1),er([h()],e.prototype,"description",1),er([h()],e.prototype,"label",1),er([h({type:String,reflect:!0})],e.prototype,"status",2),er([h({type:Number})],e.prototype,"tabindex",2),er([h({type:String})],e.prototype,"autocomplete",2),e},Wa=Qn,Mu=Rn,Ka=br,Ga=qi,tr=kt,Xn=Br;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Wa,FormCheckable:Mu,FormElement:Ka,FormInput:Ga,Subscriber:tr,TemplatesContainer:Xn};/**
1141
+ </div>`:ee}static removeAll(){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const e=Se.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.ghost))}static removeItemsByStatus(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:e},"*");return}const s=Se.getInstance();s&&(s.toasts=s.toasts.filter(r=>r.status!==e))}static removeItemById(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemById",id:e},"*");return}const s=Se.getInstance();s&&(s.toasts=s.toasts.filter(r=>r.id!==e))}static removeTemporaryItems(){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const e=Se.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.preserve))}static getInstance(){return Se.instance||(Se.instance=document.createElement("sonic-toast"),at.getPopContainer().prepend(Se.instance)),Se.instance}static add(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:e},"*");return}const s=Se.getInstance(),r=e.id??new Date().valueOf(),i=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>"),n=typeof e.text=="string"&&i.test(e.text),o={id:r,text:e.text,label:Ja(e),status:e.status,preserve:n?!0:e.preserve,ghost:e.ghost,dismissForever:e.dismissForever,styleSheet:e.styleSheet,useSlot:e.useSlot};if(e.dismissForever&&e.id&&ja(e.id))return null;if(s?.toasts.length){const c={...o};for(const d of s.toasts){const g={...d};if(c.id=g.id=0,ht.shallowEqual(c,g))return null}}return s&&(s.toasts=[...s.toasts,o]),o}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const e=Se.getInstance();window.parent.postMessage({type:"addToasts",toasts:e.toasts},"*"),e.toasts=[]}static removeItem(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:e},"*");return}const s=Se.getInstance();s&&s.removeItem(e)}removeItem(e){e&&(this.toasts=this.toasts.filter(s=>(s={...s},delete s.id,!ht.shallowEqual(s,e,!1))))}};Se.delegateToasts=!1,Ya([h({type:Array})],Se.prototype,"toasts",2),Se=Ya([X(Du)],Se),typeof window<"u"&&(window[mi+"Toast"]=window[mi+"Toast"]||Se);function Eu(){const t=s=>{s.data.type=="querySonicToastAvailability"&&s.source.postMessage({type:"sonicToastAvailable"},"*"),s.data.type=="removeItemsByStatus"&&Se.removeItemsByStatus(s.data.status),s.data.type=="removeItemById"&&Se.removeItemById(s.data.id),s.data.type=="removeTemporaryItems"&&Se.removeTemporaryItems(),s.data.type=="sonicToastAvailable"&&(Se.delegateToasts=!0,Se.handleExistingToastDelegation()),s.data.type=="addToasts"&&(Se.getInstance().toasts=[...Se.getInstance().toasts,...s.data.toasts]),s.data.type=="removeAllToasts"&&Se.removeAll(),s.data.type=="removeToast"&&Se.removeItem(s.data.toast),s.data.type=="addToast"&&Se.add(s.data.toast)},e=window.parent!=window;if(window.addEventListener("message",t,!1),e&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!e)for(const s of document.querySelectorAll("iframe"))s.contentWindow?.postMessage({type:"sonicToastAvailable"},"*")}Eu();var Ou=Object.defineProperty,Tu=Object.getOwnPropertyDescriptor,Xr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Tu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ou(e,s,i),i};const Lu=new Set,Mu=new Set,Iu=t=>{for(const e of Mu)e(t)},Xn=new Set;let eo=0;gn(async()=>{eo++;const t=eo,e=Array.from(Xn);for(;e.length>0;){if(t!=eo)return;const s=e.splice(0,4);await Promise.all(s.map(r=>r.refetch()))}});const to=(t,e)=>{class s extends t{constructor(...i){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isFetchEnabled=!0,this.fetchedData=null,this._endPoint="",this.noErrorsRecordings=!1,this.requestId=0,this.refetchEveryMs=0,this._isFetching=!1,this._mustRefetch=!1,this.dataProvider=""}get props(){return super.props}set props(i){super.props=i}set endPoint(i){this._endPoint=i,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}handleStartFetching(){return this._isFetching?(this._mustRefetch=!0,"fetching"):(this._isFetching=!0,"okToFetch")}handleEndFetching(){this._isFetching=!1,this._mustRefetch&&(this._mustRefetch=!1,this._fetchData())}refetch(){return this._fetchData()}async _fetchData(){if(this.requestUpdate(),!this.isFetchEnabled||(this.api=new Os(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await ve.getInstance().isLocalStrorageReady,!this.isConnected))return;const i=ve.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(this.isLoading=!0,ht.isObject(this.props)&&Object.keys(this.props||{}).length>0&&this.isFirstLoad&&window.requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1}),this.handleStartFetching()==="fetching")return;let o=null;try{o=await this.api.get(this.endPoint||this.dataProvider||"",i)}catch{}if(this.handleEndFetching(),this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||Lu.add(this),Iu(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&Se.add({text:"Network Error",status:"error"});else{this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs));return}if(this.key){const c=o._sonic_http_response_,d=this.key.split(".");o=ht.traverse(o,d,this.hasAttribute("preserveOtherKeys")),o&&ht.isObject(o)&&c&&(o._sonic_http_response_=c)}this.props=o,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs))}}disconnectedCallback(){super.disconnectedCallback(),Xn.delete(this),this.publisher?.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){this.lazyLoad=this.lazyLoad!==void 0?this.lazyLoad:this.hasAttribute("lazyload"),Xn.add(this),super.connectedCallback(),this.isFetchEnabled&&(this.key=this.key!=""?this.key:this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),this.publisher?.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const i=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),n={root:null,rootMargin:Math.max(window.innerWidth*i,window.innerHeight*i)+"px",threshold:.9};this.iObserver=new IntersectionObserver(d=>this.onIntersection(d),n);let c=[...(this.shadowRoot?this.shadowRoot:this).children].filter(d=>d.nodeName.toLowerCase()!="style")[0];if(c?.nodeName.toLocaleLowerCase()=="slot"&&(c=[...c.children].filter(d=>d.nodeName.toLowerCase()!="style")[0]),!c||c.nodeName.toLocaleLowerCase()=="template"){c=document.createElement("div");const d=c.style;d.pointerEvents="none",d.width="1px",d.height="1px",this.lazyLoadPlaceHolder=c,this.appendChild(c)}c?this.iObserver.observe(c):this.isFirstLoad&&this._fetchData()}onIntersection(i){for(const n of i)if(n.isIntersecting&&this.isFirstLoad){this._fetchData(),this.lazyLoadPlaceHolder?.remove(),this.lazyLoadPlaceHolder=void 0,this.iObserver?.disconnect();break}}}return Xr([h()],s.prototype,"noErrorsRecordings",2),Xr([h()],s.prototype,"props",1),Xr([h({type:String})],s.prototype,"endPoint",1),Xr([h()],s.prototype,"requestId",2),Xr([h({type:Number})],s.prototype,"refetchEveryMs",2),s};var Nu=Object.defineProperty,Fu=Object.getOwnPropertyDescriptor,er=(t,e,s,r)=>{for(var i=r>1?void 0:r?Fu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Nu(e,s,i),i};const Bi=t=>{class e extends t{constructor(...r){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){const r=this.shadowRoot?.querySelector("input");if(!r||r.checkValidity())return;const i=this.getFormPublisher();i&&(i.isFormValid=!1),r.reportValidity()}set type(r){this.hasAttribute("type")&&!this.forceAutoFill&&(r=this.getAttribute("type")),this._type=r,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(r){this.hasAttribute("description")&&!this.forceAutoFill&&(r=this.getAttribute("description")),this._description=r,this.requestUpdate()}get label(){return this._label}set label(r){this.hasAttribute("label")&&!this.forceAutoFill&&(r=this.getAttribute("label")),this._label=r,this.requestUpdate()}}return er([h()],e.prototype,"forceAutoFill",2),er([h({type:String})],e.prototype,"type",1),er([h()],e.prototype,"description",1),er([h()],e.prototype,"label",1),er([h({type:String,reflect:!0})],e.prototype,"status",2),er([h({type:Number})],e.prototype,"tabindex",2),er([h({type:String})],e.prototype,"autocomplete",2),e},Qa=to,Ru=qn,Xa=br,el=Bi,tr=Ot,so=Br;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Qa,FormCheckable:Ru,FormElement:Xa,FormInput:el,Subscriber:tr,TemplatesContainer:so};/**
1110
1142
  * @license
1111
1143
  * Copyright 2020 Google LLC
1112
1144
  * SPDX-License-Identifier: BSD-3-Clause
1113
- */const is=Es(class extends gr{constructor(t){if(super(t),t.type!==Ys.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?Ft:(this.vt=t,document.importNode(t.content,!0))}});var Iu=Object.defineProperty,Nu=Object.getOwnPropertyDescriptor,Ya=(t,e,s,i)=>{for(var r=i>1?void 0:i?Nu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Iu(e,s,r),r};const Fu="sonic-fetch";let Bi=class extends Qn(kt(Xn(J))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return se;const t=this.loader===!0||this.loader===""?"fixed":this.loader;return R`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){const t=this.templateParts.skeleton;return this.isLoading&&t?is(t):se}render(){return R`
1145
+ */const ns=Es(class extends mr{constructor(t){if(super(t),t.type!==Ys.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?Rt:(this.vt=t,document.importNode(t.content,!0))}});var ju=Object.defineProperty,zu=Object.getOwnPropertyDescriptor,tl=(t,e,s,r)=>{for(var i=r>1?void 0:r?zu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ju(e,s,i),i};const Uu="sonic-fetch";let Vi=class extends to(Ot(so(Q))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return ee;const t=this.loader===!0||this.loader===""?"fixed":this.loader;return R`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){const t=this.templateParts.skeleton;return this.isLoading&&t?ns(t):ee}render(){return R`
1114
1146
  ${this.renderSkeleton()} ${this.renderLoader()}
1115
- ${this.isLoading?se:R`<slot></slot>`}
1116
- `}};Bi.styles=[X`
1147
+ ${this.isLoading?ee:R`<slot></slot>`}
1148
+ `}};Vi.styles=[Z`
1117
1149
  :host {
1118
1150
  display: contents;
1119
1151
  }
1120
- `],Ya([h()],Bi.prototype,"loader",2),Bi=Ya([Q(Fu)],Bi);var Ru=Object.defineProperty,ju=Object.getOwnPropertyDescriptor,Za=(t,e,s,i)=>{for(var r=i>1?void 0:i?ju(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ru(e,s,r),r};const zu="sonic-if";let Hi=class extends J{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?R` <slot></slot> `:se}};Hi.styles=X`
1152
+ `],tl([h()],Vi.prototype,"loader",2),Vi=tl([X(Uu)],Vi);var qu=Object.defineProperty,Hu=Object.getOwnPropertyDescriptor,sl=(t,e,s,r)=>{for(var i=r>1?void 0:r?Hu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&qu(e,s,i),i};const Bu="sonic-if";let Wi=class extends Q{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?R` <slot></slot> `:ee}};Wi.styles=Z`
1121
1153
  :host {
1122
1154
  display: contents;
1123
1155
  }
1124
- `,Za([h({type:Boolean})],Hi.prototype,"condition",2),Hi=Za([Q(zu)],Hi);const Uu=X`
1156
+ `,sl([h({type:Boolean})],Wi.prototype,"condition",2),Wi=sl([X(Bu)],Wi);/**
1157
+ * @license
1158
+ * Copyright 2018 Google LLC
1159
+ * SPDX-License-Identifier: BSD-3-Clause
1160
+ */const Ki=Es(class extends mr{constructor(t){if(super(t),t.type!==Ys.ATTRIBUTE||t.name!=="class"||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in e)e[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(e)}const s=t.element.classList;for(const r of this.st)r in e||(s.remove(r),this.st.delete(r));for(const r in e){const i=!!e[r];i===this.st.has(r)||this.nt?.has(r)||(i?(s.add(r),this.st.add(r)):(s.remove(r),this.st.delete(r)))}return Rt}}),Vu=Z`
1125
1161
  :host([align="left"]) .sonic-loader--inline {
1126
1162
  margin-left: 0;
1127
1163
  }
@@ -1188,7 +1224,7 @@
1188
1224
  transform: translate(24px, 0);
1189
1225
  }
1190
1226
  }
1191
- `,qu=X`
1227
+ `,Wu=Z`
1192
1228
  @keyframes sonic-loader--fixed {
1193
1229
  0% {
1194
1230
  transform: scale(0);
@@ -1210,7 +1246,7 @@
1210
1246
  position: fixed;
1211
1247
  top: 50%;
1212
1248
  left: 50%;
1213
- transform: transateY(-50%) translateX(-50%);
1249
+ transform: translate(-50%, -50%);
1214
1250
  z-index: 999;
1215
1251
  }
1216
1252
 
@@ -1225,30 +1261,23 @@
1225
1261
  display: none !important;
1226
1262
  }
1227
1263
  .sonic-loader--fixed > div {
1228
- background-color: var(--sc-_loader-bg);
1229
- width: 5rem;
1230
- height: 5rem;
1231
- border-radius: 100%;
1232
- margin: 2px;
1233
- animation-fill-mode: both;
1234
1264
  position: absolute;
1235
- top: 0px;
1236
- opacity: 0;
1237
- margin: 0;
1238
1265
  top: -2.5rem;
1239
1266
  left: -2.5rem;
1240
1267
  width: 5rem;
1241
1268
  height: 5rem;
1242
- animation: sonic-loader--fixed 1s 0s linear infinite;
1269
+ border-radius: 100%;
1270
+ background-color: var(--sc-_loader-bg);
1271
+ opacity: 0;
1272
+ animation: sonic-loader--fixed 1s linear infinite;
1273
+ animation-fill-mode: both;
1243
1274
  }
1244
- `;var Bu=Object.defineProperty,Hu=Object.getOwnPropertyDescriptor,eo=(t,e,s,i)=>{for(var r=i>1?void 0:i?Hu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Bu(e,s,r),r};const Vu="sonic-loader";let ut=class extends J{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1}static show(t){ut.loader||(ut.loader=document.createElement("sonic-loader"));const e=ut.loader;t||(t={}),t.mode&&e.setAttribute("mode",t.mode),t.noDelay&&e.setAttribute("noDelay",""),t.container||(t.container=Rt.getPopContainer(),t.mode="fixed"),t.container.appendChild(e),ut.callCounter++}static hide(){ut.callCounter--,!(ut.callCounter>0)&&ut.loader&&ut.loader.remove()}render(){return R`<div
1245
- class="sonic-loader sonic-loader--${this.mode} ${this.noDelay?"sonic-loader--nodelay":""} "
1246
- >
1275
+ `;var Ku=Object.defineProperty,Gu=Object.getOwnPropertyDescriptor,Gi=(t,e,s,r)=>{for(var i=r>1?void 0:r?Gu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ku(e,s,i),i};const rl="sonic-loader";let lt=class extends Q{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1,this.announce=!1}static show(t={}){lt.loader||(lt.loader=document.createElement(rl));const e=lt.loader,s=t.container??at.getPopContainer(),r=t.container?t.mode??"fixed":"fixed",i=t.noDelay??!1;e.mode=r,e.noDelay=i,e.announce=t.announce??!1,s.appendChild(e),lt.callCounter++}static hide(){lt.callCounter<=0||(lt.callCounter--,!(lt.callCounter>0)&&lt.loader?.remove())}willUpdate(t){t.has("announce")&&this._syncAnnounceA11y()}_syncAnnounceA11y(){if(!this.announce){this.removeAttribute("role"),this.removeAttribute("aria-live"),this.removeAttribute("aria-label");return}this.setAttribute("role","status"),this.setAttribute("aria-live","polite"),this.setAttribute("aria-label",Qr(is.loading))}render(){const t={"sonic-loader":!0,[`sonic-loader--${this.mode}`]:!0,"sonic-loader--nodelay":this.noDelay};return R`<div aria-hidden="true" class=${Ki(t)}>
1247
1276
  <div></div>
1248
1277
  <div></div>
1249
1278
  <div></div>
1250
1279
  <div></div>
1251
- </div>`}};ut.styles=[Uu,qu,X`
1280
+ </div>`}};lt.styles=[Vu,Wu,Z`
1252
1281
  :host {
1253
1282
  --sc-_loader-bg: var(--sc-primary, currentColor);
1254
1283
  pointer-events: none;
@@ -1276,7 +1305,7 @@
1276
1305
  opacity: 1;
1277
1306
  }
1278
1307
  }
1279
- `],ut.callCounter=0,eo([h({type:String})],ut.prototype,"mode",2),eo([h({type:Boolean})],ut.prototype,"noDelay",2),ut=eo([Q(Vu)],ut);var Wu=Object.getOwnPropertyDescriptor,Ku=(t,e,s,i)=>{for(var r=i>1?void 0:i?Wu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Gu="sonic-subscriber";let Ja=class extends kt(J){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),this.children.length==0?this.style.display="none":this.style.display="contents"}render(){return R`<slot></slot> `}};Ja=Ku([Q(Gu)],Ja);var Yu=Object.defineProperty,Zu=Object.getOwnPropertyDescriptor,Xt=(t,e,s,i)=>{for(var r=i>1?void 0:i?Zu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Yu(e,s,r),r};const Ju="sonic-list";let Ht=class extends Qn(kt(Br(J))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id",this.limit=Number.POSITIVE_INFINITY,this.offset=0,this.loadingSize={width:0,height:0}}get items(){return this._items}set items(t){typeof t!="function"&&t!==void 0||(this._items=t,this.requestUpdate())}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}renderLoader(){if(!(this.isLoading&&this.loader!==void 0)||this.templateParts.skeleton)return se;const e=this.loader===!0||this.loader===""?"fixed":this.loader;return R`<sonic-loader mode=${e}></sonic-loader>`}renderSkeleton(){if(this.skeleton)return this.skeleton();const t=this.templateParts.skeleton;return this.isLoading&&t?is(t):se}renderSeparator(){if(this.separator)return this.separator();const t=this.templateParts.separator;return t?is(t):se}renderLoadingState(){return R`${this.renderSkeleton()} ${this.renderLoader()} `}renderNoResultState(){return R` <div
1308
+ `],lt.loader=null,lt.callCounter=0,Gi([h({type:String})],lt.prototype,"mode",2),Gi([h({type:Boolean})],lt.prototype,"noDelay",2),Gi([h({type:Boolean,reflect:!0})],lt.prototype,"announce",2),lt=Gi([X(rl)],lt);var Yu=Object.getOwnPropertyDescriptor,Zu=(t,e,s,r)=>{for(var i=r>1?void 0:r?Yu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Ju="sonic-subscriber";let il=class extends Ot(Q){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),this.children.length==0?this.style.display="none":this.style.display="contents"}render(){return R`<slot></slot> `}};il=Zu([X(Ju)],il);var Qu=Object.defineProperty,Xu=Object.getOwnPropertyDescriptor,Xt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Xu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Qu(e,s,i),i};const ed="sonic-list";let Bt=class extends to(Ot(Br(Q))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id",this.limit=Number.POSITIVE_INFINITY,this.offset=0,this.loadingSize={width:0,height:0}}get items(){return this._items}set items(t){typeof t!="function"&&t!==void 0||(this._items=t,this.requestUpdate())}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}renderLoader(){if(!(this.isLoading&&this.loader!==void 0)||this.templateParts.skeleton)return ee;const e=this.loader===!0||this.loader===""?"fixed":this.loader;return R`<sonic-loader mode=${e}></sonic-loader>`}renderSkeleton(){if(this.skeleton)return this.skeleton();const t=this.templateParts.skeleton;return this.isLoading&&t?ns(t):ee}renderSeparator(){if(this.separator)return this.separator();const t=this.templateParts.separator;return t?ns(t):ee}renderLoadingState(){return R`${this.renderSkeleton()} ${this.renderLoader()} `}renderNoResultState(){return R` <div
1280
1309
  style="color: var(--sc-base-400);
1281
1310
  font-size: 1.5em;
1282
1311
  margin: 4rem 0;
@@ -1287,7 +1316,7 @@
1287
1316
  ><span class="sonic-no-result-text"
1288
1317
  >${typeof this.props=="string"&&this.props==""?"Aucun résultat":this.props}</span
1289
1318
  >
1290
- </div>`}formatProps(){let t=this.props;if(t==null)return null;const e=t._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(t)||(s?t=Object.entries(t).map(([i,r])=>({key:i,value:r})):lt.isObject(t)&&Object.keys(t).length>0&&(!e||e.ok)?t=[t]:t=[]),t=t.filter(i=>i!=null),e&&(t._sonic_http_response_=e),t}updated(t){window.requestAnimationFrame(()=>{if(!this.isLoading){this.style.setProperty("--list-loader-height-display","none");return}this.style.setProperty("--list-loader-height-display","block"),this.loadingSize=this.getDisplayContentsSize(this)}),super.updated(t)}getAllRenderableElements(t){let e=[];function s(i){if(i.nodeType===Node.ELEMENT_NODE){const r=i.getBoundingClientRect();(r.width>0||r.height>0)&&e.push(i),i.childNodes.forEach(s),i.shadowRoot&&i.shadowRoot.childNodes.forEach(s)}}return s(t),e}getDisplayContentsSize(t){const e=this.getAllRenderableElements(t);if(e.length===0)return{width:0,height:0};const s=e.map(c=>c.getBoundingClientRect()),i=Math.min(...s.map(c=>c.left)),r=Math.max(...s.map(c=>c.right)),n=Math.min(...s.map(c=>c.top)),o=Math.max(...s.map(c=>c.bottom));return{width:r-i,height:o-n}}render(){return R`
1319
+ </div>`}formatProps(){let t=this.props;if(t==null)return null;const e=t._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(t)||(s?t=Object.entries(t).map(([r,i])=>({key:r,value:i})):ht.isObject(t)&&Object.keys(t).length>0&&(!e||e.ok)?t=[t]:t=[]),t=t.filter(r=>r!=null),e&&(t._sonic_http_response_=e),t}updated(t){window.requestAnimationFrame(()=>{if(!this.isLoading){this.style.setProperty("--list-loader-height-display","none");return}this.style.setProperty("--list-loader-height-display","block"),this.loadingSize=this.getDisplayContentsSize(this)}),super.updated(t)}getAllRenderableElements(t){let e=[];function s(r){if(r.nodeType===Node.ELEMENT_NODE){const i=r.getBoundingClientRect();(i.width>0||i.height>0)&&e.push(r),r.childNodes.forEach(s),r.shadowRoot&&r.shadowRoot.childNodes.forEach(s)}}return s(t),e}getDisplayContentsSize(t){const e=this.getAllRenderableElements(t);if(e.length===0)return{width:0,height:0};const s=e.map(c=>c.getBoundingClientRect()),r=Math.min(...s.map(c=>c.left)),i=Math.max(...s.map(c=>c.right)),n=Math.min(...s.map(c=>c.top)),o=Math.max(...s.map(c=>c.bottom));return{width:i-r,height:o-n}}render(){return R`
1291
1320
  ${this.renderContent()}
1292
1321
  <div
1293
1322
  style="grid-column: 1 / -1;min-height:${this.isLoading?0:this.loadingSize.height}px; width:0;float:left;display: var(--list-loader-height-display);"
@@ -1299,24 +1328,24 @@
1299
1328
  dataProvider="${this.dataProvider}/list-item/${s}"
1300
1329
  >
1301
1330
  ${this.items(t,e)}
1302
- </sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!lt.isObject(this.props))return R`<div></div>`;const i=this.formatProps();if((i?.length||0)==0){if(this.noItems)return this.noItems();if(this.templateParts["no-items"]=this.templateParts["no-items"]||this.templateParts["no-item"],this.templateParts["no-items"])return is(this.templateParts["no-items"])}const r=this.templateList.length;let n=-1;const o=this.hasAttribute("extractValues"),c=this.renderSeparator(),d=i?.length||0,m=i?.slice(this.offset,this.offset+this.limit);return R`
1303
- ${m?.map((A,g)=>{if(A==null)return se;let f=g,k=null;if(typeof A=="object"&&!Array.isArray(A)){o&&(f=A?.key);const y=A[this.templateKey];y&&typeof y=="string"&&(k=this.templateParts[y])}if(f=="_sonic_http_response_"||typeof f!="string"&&typeof f!="number")return se;const E=g>=d-1,O=g%2,z=this.publisher[f],B={key:f,even:O==0,odd:O==1,onlyChild:d==1,firstChild:g==0,lastChild:E};z._key_=f+"",z._metadata_={...z._metadata_.get(),...B};const S=this.handleProgrammaticTemplates(A,B,f);return S?R`${S}${E?se:c}`:(n++,k&&(n=-1),R`
1331
+ </sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!ht.isObject(this.props))return R`<div></div>`;const r=this.formatProps();if((r?.length||0)==0){if(this.noItems)return this.noItems();if(this.templateParts["no-items"]=this.templateParts["no-items"]||this.templateParts["no-item"],this.templateParts["no-items"])return ns(this.templateParts["no-items"])}const i=this.templateList.length;let n=-1;const o=this.hasAttribute("extractValues"),c=this.renderSeparator(),d=r?.length||0,g=r?.slice(this.offset,this.offset+this.limit);return R`
1332
+ ${g?.map((A,m)=>{if(A==null)return ee;let f=m,k=null;if(typeof A=="object"&&!Array.isArray(A)){o&&(f=A?.key);const y=A[this.templateKey];y&&typeof y=="string"&&(k=this.templateParts[y])}if(f=="_sonic_http_response_"||typeof f!="string"&&typeof f!="number")return ee;const E=m>=d-1,O=m%2,z=this.publisher[f],H={key:f,even:O==0,odd:O==1,onlyChild:d==1,firstChild:m==0,lastChild:E};z._key_=f+"",z._metadata_={...z._metadata_.get(),...H};const S=this.handleProgrammaticTemplates(A,H,f);return S?R`${S}${E?ee:c}`:(n++,k&&(n=-1),R`
1304
1333
  <sonic-subscriber
1305
1334
  ?debug=${this.defferedDebug===!0}
1306
1335
  .bindPublisher=${function(){return z}}
1307
1336
  .propertyMap?=${this.itemPropertyMap}
1308
1337
  dataProvider="${this.dataProvider}/list-item/${f}"
1309
1338
  >
1310
- ${is(k||this.templateList[n%r])}
1339
+ ${ns(k||this.templateList[n%i])}
1311
1340
  </sonic-subscriber>
1312
- ${E?se:c}
1341
+ ${E?ee:c}
1313
1342
  `)})}
1314
- `}};Xt([h({type:Object})],Ht.prototype,"itemPropertyMap",2),Xt([h({type:String})],Ht.prototype,"templateKey",2),Xt([h({type:String})],Ht.prototype,"idKey",2),Xt([h()],Ht.prototype,"loader",2),Xt([h()],Ht.prototype,"limit",2),Xt([h()],Ht.prototype,"offset",2),Xt([h({type:Function,attribute:!1})],Ht.prototype,"items",1),Xt([h({type:Function,attribute:!1})],Ht.prototype,"noItems",2),Xt([h({type:Function,attribute:!1})],Ht.prototype,"skeleton",2),Xt([h({type:Function,attribute:!1})],Ht.prototype,"separator",2),Ht=Xt([Q(Ju)],Ht);/**
1343
+ `}};Xt([h({type:Object})],Bt.prototype,"itemPropertyMap",2),Xt([h({type:String})],Bt.prototype,"templateKey",2),Xt([h({type:String})],Bt.prototype,"idKey",2),Xt([h()],Bt.prototype,"loader",2),Xt([h()],Bt.prototype,"limit",2),Xt([h()],Bt.prototype,"offset",2),Xt([h({type:Function,attribute:!1})],Bt.prototype,"items",1),Xt([h({type:Function,attribute:!1})],Bt.prototype,"noItems",2),Xt([h({type:Function,attribute:!1})],Bt.prototype,"skeleton",2),Xt([h({type:Function,attribute:!1})],Bt.prototype,"separator",2),Bt=Xt([X(ed)],Bt);/**
1315
1344
  * @license
1316
1345
  * Copyright 2021 Google LLC
1317
1346
  * SPDX-License-Identifier: BSD-3-Clause
1318
- */function*Qa(t,e){if(t!==void 0){let s=0;for(const i of t)yield e(i,s++)}}var Qu=Object.defineProperty,Xu=Object.getOwnPropertyDescriptor,dt=(t,e,s,i)=>{for(var r=i>1?void 0:i?Xu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Qu(e,s,r),r};const ed="sonic-queue";let rt=class extends kt(J){constructor(){super(...arguments),this.templates=null,this.items=null,this.noItems=null,this.skeleton=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.loader="inline",this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.filterTimeoutMs=400,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.updateFilteredContent=()=>{const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),i=this.filterPublisher?.get(),r=this.filteredFields.split(" ");for(const o in i){let c=i[o];Array.isArray(c)&&(c=c.filter(d=>d!==null)),!(this.filteredFields&&r.includes(o)||c==null||c.toString()==="")&&s.set(o,i[o].toString())}const n=s.toString();if(!(n==this.searchHash&&!this.isFirstRequest)){this.searchHash=n,gh(this.resolveScrollRoot(),{x:0,y:0});for(const o of this.listDataProviders)ve.getInstance().delete(o);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(async()=>{const o=this.resultCount;this.props=null,this.requestId++,this.resultCount=o,await ve.getInstance().isLocalStrorageReady,window.requestAnimationFrame(()=>this.next())},this.isFirstRequest?0:this.filterTimeoutMs),this.isFirstRequest=!1}},this.scrollRoot=null,this.scrollSyncActive=!1,this.mutationObserver=null,this.restoreGeneration=0,this.dataProviderExpression="",this.invalidateOnPageShow=!1,this.idKey="id",this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)ve.getInstance().delete(t),this.listDataProviders=[];this.filterPublisher?.offInternalMutation(this.updateFilteredContent),this.props=null,this.limit=5,this.offset=0,this.resultCount=0,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.nextHadEvent=!1,this.teardownScrollSync(),this.publisher.set({}),super.disconnectedCallback()}async connectedCallback(){this.instanceId=rt.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.filterTimeoutMs=parseInt(this.getAttribute("filterTimeoutMs")||"400"),this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+this.instanceId+"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=bs.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),this.ensureScrollSync(),super.connectedCallback(),this.publisher.set({}),this.key=this.getAttribute("key"),await ve.getInstance().isLocalStrorageReady,this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.configFilter()}configFilter(){const t=this.getAncestorAttributeValue("dataFilterProvider");if(!t){this.next();return}this.filterPublisher=ve.getInstance().get(t),this.filterPublisher?.onInternalMutation(this.updateFilteredContent)}resolveScrollRoot(){const t=bs.getScrollingAncestor(this);return!t||t===document.documentElement||t===document.body?window:t}isSafari(){return ms()}ensureScrollSync(){if(!ms()||!this.isConnected)return;const t=this.resolveScrollRoot();this.scrollRoot=t,Js(t),!this.scrollSyncActive&&(this.scrollSyncActive=!0,this.mutationObserver=new MutationObserver(()=>{this.scheduleRestoreAfterChildren()}),this.mutationObserver.observe(this,{childList:!0,subtree:!0,characterData:!0}))}teardownScrollSync(){this.restoreGeneration++,this.mutationObserver?.disconnect(),this.mutationObserver=null,this.scrollSyncActive=!1,this.scrollRoot=null}scheduleRestoreAfterChildren(){if(!ms()||!this.isConnected)return;const t=++this.restoreGeneration;(async()=>{if(await this.updateComplete,t!==this.restoreGeneration||!this.isConnected)return;const e=Array.from(this.querySelectorAll("sonic-list"));if(e.length&&await Promise.all(e.map(i=>i.updateComplete)),t!==this.restoreGeneration||!this.isConnected||(await new Promise(i=>requestAnimationFrame(()=>i())),await new Promise(i=>requestAnimationFrame(()=>i())),t!==this.restoreGeneration||!this.isConnected))return;const s=this.scrollRoot??this.resolveScrollRoot();Js(s),Tn(s)})()}updated(t){if(ms()){this.ensureScrollSync();const e=this.scrollRoot??this.resolveScrollRoot();Tn(e),this.scheduleRestoreAfterChildren()}super.updated(t)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(t){let e=this.offset;const i=new Date().getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!t,t){if(this.publisher.lastFetchedData=t.detail.fetchedData,t.detail.requestId<this.requestId)return;if(this.resultCount+=t.detail.props?.length||0,!t.detail.isFirstLoad||!t.detail.props?.length||this.dataProviderExpression.indexOf("$offset")==-1){this.publisher.resultCount=this.resultCount;return}}if(Array.isArray(this.props)){const g=this.props,f=g[g.length-1];e=parseInt(f.offset.toString())+parseInt(f.limit.toString())}else{const g=[];g.resultCount=this.resultCount,g.lastFetchedData=t?.detail.fetchedData||{},this.props=g}i>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/i*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let r=this.dataProviderExpression.replace("$offset",e+"").replace("$limit",this.limit+"");const n=r.split("?");let o=n.shift();const c=new URLSearchParams(n.join("?")),d=this.filterPublisher?.get(),m=this.filteredFields.split(" ");for(const g in d)this.filteredFields&&m.includes(g)||d[g]==null||d[g]==""||c.set(g,d[g]);this.searchHash||(this.searchHash=c.toString()),o=o+"?"+c.toString(),r=r+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(r);const A=[...this.props,{id:c.toString()+"/"+this.props.length,dataProvider:r,endPoint:o,offset:e,limit:this.limit}];A.resultCount=this.resultCount,A.lastFetchedData=t?.detail.fetchedData||{},this.props=A,this.lastRequestTime=new Date().getTime()}render(){if(this.isSafari()&&(this.scrollRoot=this.resolveScrollRoot(),this.ensureScrollSync()),!Array.isArray(this.props))return se;let t=!this.noLazyload;return this.props.length==1&&(t=!1),this.style.display="block",R`
1319
- ${Qa(this.props,(e,s)=>{const i=s==0?this.templates:this.templates?.filter(r=>r.getAttribute("data-value")!="no-item");return R`
1347
+ */function*nl(t,e){if(t!==void 0){let s=0;for(const r of t)yield e(r,s++)}}var td=Object.defineProperty,sd=Object.getOwnPropertyDescriptor,pt=(t,e,s,r)=>{for(var i=r>1?void 0:r?sd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&td(e,s,i),i};const rd="sonic-queue";let rt=class extends Ot(Q){constructor(){super(...arguments),this.templates=null,this.items=null,this.noItems=null,this.skeleton=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.loader="inline",this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.filterTimeoutMs=400,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.updateFilteredContent=()=>{const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),r=this.filterPublisher?.get(),i=this.filteredFields.split(" ");for(const o in r){let c=r[o];Array.isArray(c)&&(c=c.filter(d=>d!==null)),!(this.filteredFields&&i.includes(o)||c==null||c.toString()==="")&&s.set(o,r[o].toString())}const n=s.toString();if(!(n==this.searchHash&&!this.isFirstRequest)){this.searchHash=n,yh(this.resolveScrollRoot(),{x:0,y:0});for(const o of this.listDataProviders)ve.getInstance().delete(o);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(async()=>{const o=this.resultCount;this.props=null,this.requestId++,this.resultCount=o,await ve.getInstance().isLocalStrorageReady,window.requestAnimationFrame(()=>this.next())},this.isFirstRequest?0:this.filterTimeoutMs),this.isFirstRequest=!1}},this.scrollRoot=null,this.scrollSyncActive=!1,this.mutationObserver=null,this.restoreGeneration=0,this.dataProviderExpression="",this.invalidateOnPageShow=!1,this.idKey="id",this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)ve.getInstance().delete(t),this.listDataProviders=[];this.filterPublisher?.offInternalMutation(this.updateFilteredContent),this.props=null,this.limit=5,this.offset=0,this.resultCount=0,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.nextHadEvent=!1,this.teardownScrollSync(),this.publisher.set({}),super.disconnectedCallback()}async connectedCallback(){this.instanceId=rt.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.filterTimeoutMs=parseInt(this.getAttribute("filterTimeoutMs")||"400"),this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+this.instanceId+"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=gs.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),this.ensureScrollSync(),super.connectedCallback(),this.publisher.set({}),this.key=this.getAttribute("key"),await ve.getInstance().isLocalStrorageReady,this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.configFilter()}configFilter(){const t=this.getAncestorAttributeValue("dataFilterProvider");if(!t){this.next();return}this.filterPublisher=ve.getInstance().get(t),this.filterPublisher?.onInternalMutation(this.updateFilteredContent)}resolveScrollRoot(){const t=gs.getScrollingAncestor(this);return!t||t===document.documentElement||t===document.body?window:t}isSafari(){return ms()}ensureScrollSync(){if(!ms()||!this.isConnected)return;const t=this.resolveScrollRoot();this.scrollRoot=t,Js(t),!this.scrollSyncActive&&(this.scrollSyncActive=!0,this.mutationObserver=new MutationObserver(()=>{this.scheduleRestoreAfterChildren()}),this.mutationObserver.observe(this,{childList:!0,subtree:!0,characterData:!0}))}teardownScrollSync(){this.restoreGeneration++,this.mutationObserver?.disconnect(),this.mutationObserver=null,this.scrollSyncActive=!1,this.scrollRoot=null}scheduleRestoreAfterChildren(){if(!ms()||!this.isConnected)return;const t=++this.restoreGeneration;(async()=>{if(await this.updateComplete,t!==this.restoreGeneration||!this.isConnected)return;const e=Array.from(this.querySelectorAll("sonic-list"));if(e.length&&await Promise.all(e.map(r=>r.updateComplete)),t!==this.restoreGeneration||!this.isConnected||(await new Promise(r=>requestAnimationFrame(()=>r())),await new Promise(r=>requestAnimationFrame(()=>r())),t!==this.restoreGeneration||!this.isConnected))return;const s=this.scrollRoot??this.resolveScrollRoot();Js(s),Nn(s)})()}updated(t){if(ms()){this.ensureScrollSync();const e=this.scrollRoot??this.resolveScrollRoot();Nn(e),this.scheduleRestoreAfterChildren()}super.updated(t)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(t){let e=this.offset;const r=new Date().getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!t,t){if(this.publisher.lastFetchedData=t.detail.fetchedData,t.detail.requestId<this.requestId)return;if(this.resultCount+=t.detail.props?.length||0,!t.detail.isFirstLoad||!t.detail.props?.length||this.dataProviderExpression.indexOf("$offset")==-1){this.publisher.resultCount=this.resultCount;return}}if(Array.isArray(this.props)){const m=this.props,f=m[m.length-1];e=parseInt(f.offset.toString())+parseInt(f.limit.toString())}else{const m=[];m.resultCount=this.resultCount,m.lastFetchedData=t?.detail.fetchedData||{},this.props=m}r>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/r*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let i=this.dataProviderExpression.replace("$offset",e+"").replace("$limit",this.limit+"");const n=i.split("?");let o=n.shift();const c=new URLSearchParams(n.join("?")),d=this.filterPublisher?.get(),g=this.filteredFields.split(" ");for(const m in d)this.filteredFields&&g.includes(m)||d[m]==null||d[m]==""||c.set(m,d[m]);this.searchHash||(this.searchHash=c.toString()),o=o+"?"+c.toString(),i=i+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(i);const A=[...this.props,{id:c.toString()+"/"+this.props.length,dataProvider:i,endPoint:o,offset:e,limit:this.limit}];A.resultCount=this.resultCount,A.lastFetchedData=t?.detail.fetchedData||{},this.props=A,this.lastRequestTime=new Date().getTime()}render(){if(this.isSafari()&&(this.scrollRoot=this.resolveScrollRoot(),this.ensureScrollSync()),!Array.isArray(this.props))return ee;let t=!this.noLazyload;return this.props.length==1&&(t=!1),this.style.display="block",R`
1348
+ ${nl(this.props,(e,s)=>{const r=s==0?this.templates:this.templates?.filter(i=>i.getAttribute("data-value")!="no-item");return R`
1320
1349
  <sonic-list
1321
1350
  fetch
1322
1351
  loader="${this.loader}"
@@ -1335,47 +1364,47 @@
1335
1364
  dataProvider="${e.dataProvider}"
1336
1365
  endPoint="${e.endPoint}"
1337
1366
  idKey=${this.idKey}
1338
- .templates=${i}
1367
+ .templates=${r}
1339
1368
  .items=${this.items}
1340
1369
  .noItems=${s==0?this.noItems:void 0}
1341
1370
  .skeleton=${this.skeleton}
1342
1371
  >
1343
1372
  </sonic-list>
1344
1373
  `})}
1345
- `}};rt.instanceCounter=0,dt([h({type:Array})],rt.prototype,"templates",2),dt([h({type:Function,attribute:!1})],rt.prototype,"items",2),dt([h({type:Function,attribute:!1})],rt.prototype,"noItems",2),dt([h({type:Function,attribute:!1})],rt.prototype,"skeleton",2),dt([h({type:Object})],rt.prototype,"itemPropertyMap",2),dt([h()],rt.prototype,"cache",2),dt([h()],rt.prototype,"targetRequestDuration",2),dt([h()],rt.prototype,"limit",2),dt([h()],rt.prototype,"lazyBoundsRatio",2),dt([h()],rt.prototype,"offset",2),dt([h()],rt.prototype,"resultCount",2),dt([h({type:Boolean})],rt.prototype,"noLazyload",2),dt([h({type:String})],rt.prototype,"loader",2),dt([h()],rt.prototype,"filteredFields",2),dt([h({type:String})],rt.prototype,"dataProviderExpression",2),dt([h({type:Boolean})],rt.prototype,"invalidateOnPageShow",2),dt([h({type:String})],rt.prototype,"idKey",2),rt=dt([Q(ed)],rt);var td=Object.defineProperty,sd=Object.getOwnPropertyDescriptor,_r=(t,e,s,i)=>{for(var r=i>1?void 0:i?sd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&td(e,s,r),r};const rd="sonic-submit";let Ms=class extends kt(J){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null,this.clickTimeStamp=0,this.submit=async t=>{if(this.disabled||t instanceof KeyboardEvent&&t.key!=="Enter")return;t instanceof MouseEvent&&t.stopPropagation();const e=ve.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(e.isFormValid.set(!0),e.invalidateForm(),!e.isFormValid.get())return;if(this.disabled=!0,ut.show(),e.isFormValid,this.hasAttribute("native")){this.submitNativeForm(),ut.hide(),this.disabled=!1;return}const i=this.getAttribute("method")?.toLocaleLowerCase()||"post",r=this.hasAttribute("sendAsFormData"),n=e.get();delete n.isFormValid;const o=this.getAncestorAttributeValue("headersDataProvider"),c=o?ve.getInstance().get(o):null;let d={};c&&(d=c.get());let m=null;const A=this.getAncestorAttributeValue("dataProvider"),g=this.endPoint||A,f=async()=>{const E={...n};if(delete E.needsCaptchaValidation,delete d.needsCaptchaValidation,r)m=await this.api?.submitFormData(g,E,i,d);else switch(i){case"put":m=await this.api?.put(g,E,d);break;case"patch":m=await this.api?.patch(g,E,d);break;case"delete":m=await this.api?.delete(g,E,d);break;case"get":const y=new URLSearchParams;if(E)for(const C in E)y.append(C,E[C]);const I="?"+y.toString();m=await this.api?.get(g+I,d);break;default:m=await this.api?.post(g,E,d);break}ut.hide(),m?m._sonic_http_response_&&!m._sonic_http_response_.ok&&Object.keys(m).length===1&&(m.messages=[{content:"Network Error",status:"error"}]):m={messages:[{content:"Network Error",status:"error"}]};const O=this.getAncestorAttributeValue("clearedDataOnSuccess");O&&O.split(" ").forEach(y=>ve.get(y).set({}));const z=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",B=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";this.api?.lastResult?.ok&&E[z]&&E[B]&&this.saveCredentials(E[z],E[B]),this.submitResultKey&&(m=lt.traverse(m,this.submitResultKey.split("."),!0));const S=this.getAncestorAttributeValue("submitResultDataProvider");S&&ve.get(S).set(m),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:m,bubbles:!0,composed:!0}))},k=c?.needsCaptchaValidation.get()?c:e.needsCaptchaValidation.get()?e:null;if(k){k.captchaToken.set("request_token");const E=O=>{O!="request_token"?(f(),k.captchaToken.offAssign(E)):(ut.hide(),this.disabled=!1)};k.captchaToken.onAssign(E)}else f()}}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",this.submit),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",this.submit),super.connectedCallback(),this.api=new Os(this.getApiConfiguration())}submitNativeForm(){const t=bs.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider"),s={...ve.get(e).get()};delete s.needsCaptchaValidation;for(const r in s){if(r=="isFormValid")continue;let n=t.querySelector('input[name="'+r+'"], select[name="'+r+'"], textarea[name="'+r+'"]');n||(n=document.createElement("input"),n.type="hidden",n.name=r,t.appendChild(n));let o=s[r];Array.isArray(o)&&(o=o.join(",")),n.type==="checkbox"||n.type==="radio"?o&&(n.checked=!0):n.value=o}const i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",t.appendChild(i),i&&i.click()}async saveCredentials(t,e){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return R`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};Ms.styles=X`
1374
+ `}};rt.instanceCounter=0,pt([h({type:Array})],rt.prototype,"templates",2),pt([h({type:Function,attribute:!1})],rt.prototype,"items",2),pt([h({type:Function,attribute:!1})],rt.prototype,"noItems",2),pt([h({type:Function,attribute:!1})],rt.prototype,"skeleton",2),pt([h({type:Object})],rt.prototype,"itemPropertyMap",2),pt([h()],rt.prototype,"cache",2),pt([h()],rt.prototype,"targetRequestDuration",2),pt([h()],rt.prototype,"limit",2),pt([h()],rt.prototype,"lazyBoundsRatio",2),pt([h()],rt.prototype,"offset",2),pt([h()],rt.prototype,"resultCount",2),pt([h({type:Boolean})],rt.prototype,"noLazyload",2),pt([h({type:String})],rt.prototype,"loader",2),pt([h()],rt.prototype,"filteredFields",2),pt([h({type:String})],rt.prototype,"dataProviderExpression",2),pt([h({type:Boolean})],rt.prototype,"invalidateOnPageShow",2),pt([h({type:String})],rt.prototype,"idKey",2),rt=pt([X(rd)],rt);var id=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,_r=(t,e,s,r)=>{for(var i=r>1?void 0:r?nd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&id(e,s,i),i};const od="sonic-submit";let Ms=class extends Ot(Q){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null,this.clickTimeStamp=0,this.submit=async t=>{if(this.disabled||t instanceof KeyboardEvent&&t.key!=="Enter")return;t instanceof MouseEvent&&t.stopPropagation();const e=ve.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(e.isFormValid.set(!0),e.invalidateForm(),!e.isFormValid.get())return;if(this.disabled=!0,lt.show(),e.isFormValid,this.hasAttribute("native")){this.submitNativeForm(),lt.hide(),this.disabled=!1;return}const r=this.getAttribute("method")?.toLocaleLowerCase()||"post",i=this.hasAttribute("sendAsFormData"),n=e.get();delete n.isFormValid;const o=this.getAncestorAttributeValue("headersDataProvider"),c=o?ve.getInstance().get(o):null;let d={};c&&(d=c.get());let g=null;const A=this.getAncestorAttributeValue("dataProvider"),m=this.endPoint||A,f=async()=>{const E={...n};if(delete E.needsCaptchaValidation,delete d.needsCaptchaValidation,i)g=await this.api?.submitFormData(m,E,r,d);else switch(r){case"put":g=await this.api?.put(m,E,d);break;case"patch":g=await this.api?.patch(m,E,d);break;case"delete":g=await this.api?.delete(m,E,d);break;case"get":const y=new URLSearchParams;if(E)for(const C in E)y.append(C,E[C]);const I="?"+y.toString();g=await this.api?.get(m+I,d);break;default:g=await this.api?.post(m,E,d);break}lt.hide(),g?g._sonic_http_response_&&!g._sonic_http_response_.ok&&Object.keys(g).length===1&&(g.messages=[{content:"Network Error",status:"error"}]):g={messages:[{content:"Network Error",status:"error"}]};const O=this.getAncestorAttributeValue("clearedDataOnSuccess");O&&O.split(" ").forEach(y=>ve.get(y).set({}));const z=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",H=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";this.api?.lastResult?.ok&&E[z]&&E[H]&&this.saveCredentials(E[z],E[H]),this.submitResultKey&&(g=ht.traverse(g,this.submitResultKey.split("."),!0));const S=this.getAncestorAttributeValue("submitResultDataProvider");S&&ve.get(S).set(g),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:g,bubbles:!0,composed:!0}))},k=c?.needsCaptchaValidation.get()?c:e.needsCaptchaValidation.get()?e:null;if(k){k.captchaToken.set("request_token");const E=O=>{O!="request_token"?(f(),k.captchaToken.offAssign(E)):(lt.hide(),this.disabled=!1)};k.captchaToken.onAssign(E)}else f()}}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",this.submit),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",this.submit),super.connectedCallback(),this.api=new Os(this.getApiConfiguration())}submitNativeForm(){const t=gs.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider"),s={...ve.get(e).get()};delete s.needsCaptchaValidation;for(const i in s){if(i=="isFormValid")continue;let n=t.querySelector('input[name="'+i+'"], select[name="'+i+'"], textarea[name="'+i+'"]');n||(n=document.createElement("input"),n.type="hidden",n.name=i,t.appendChild(n));let o=s[i];Array.isArray(o)&&(o=o.join(",")),n.type==="checkbox"||n.type==="radio"?o&&(n.checked=!0):n.value=o}const r=document.createElement("input");r.name=this.name,r.style.display="none",r.value=this.value,r.type="submit",t.appendChild(r),r&&r.click()}async saveCredentials(t,e){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return R`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};Ms.styles=Z`
1346
1375
  [data-disabled] {
1347
1376
  opacity: 0.3;
1348
1377
  pointer-events: none;
1349
1378
  user-select: none;
1350
1379
  }
1351
- `,_r([h({type:String})],Ms.prototype,"submitResultKey",2),_r([h({type:Boolean})],Ms.prototype,"disabled",2),_r([h({type:String})],Ms.prototype,"endPoint",2),_r([h()],Ms.prototype,"name",2),_r([h()],Ms.prototype,"value",2),Ms=_r([Q(rd)],Ms);var id=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,Xr=(t,e,s,i)=>{for(var r=i>1?void 0:i?nd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&id(e,s,r),r};const od="sonic-router";let Sr=class extends Br(J){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}createRenderRoot(){return this}connectedCallback(){ht.onChange(this),super.connectedCallback()}disconnectedCallback(){ht.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}get cleanLocation(){const t=new URL(this.location,document.location.origin);return t.pathname+t.hash}get patternBasePath(){return this.basePath!==void 0?this.basePath:"(/)*"}get regExpBasePath(){return this.basePath!==void 0?"^"+this.basePath:""}handleroutes(){if(!this.routes)return[];const t=[];for(let[e,s]of Object.entries(this.routes)){if(e==="fallback"||!s)continue;const i=new RegExp(this.regExpBasePath+e);if(i.test(this.cleanLocation)){const r=i.exec(this.cleanLocation)||[e];r.shift(),t.push(s([...r]))}else try{const n=new gs(this.patternBasePath+e).match(this.cleanLocation);if(n){const o=n||{};t.push(s(o))}}catch{this.cleanLocation.indexOf((this.basePath||"")+e.replace(document.location.origin,""))!=-1&&t.push(s({}))}}return t.length==0&&this.routes?.fallback&&this.isConnected&&t.push(this.routes.fallback()),t}render(){const t=this.handleroutes();if(t.length>0)return R`${t}`;const e=[];for(const s of this.templatePartsList){const i=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(this.regExpBasePath+i).test(this.cleanLocation))e.push(s);else try{new gs(this.patternBasePath+i+"(/*)").match(this.cleanLocation)&&(s.setAttribute("mode","patternMatching"),e.push(s))}catch{this.cleanLocation.indexOf((this.basePath||"")+i.replace(document.location.origin,""))!=-1&&e.push(s)}}if(e.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const s=this.templateList.find(i=>i.hasAttribute("data-fallback"));s&&e.push(s)}return R`${Fi(e,(s,i)=>i+new Date().getTime(),s=>{if(s.title&&(document.title=s.title),s.hasAttribute("dataProviderExpression")){let i="";const r=s.getAttribute("dataProviderExpression")||"";if(s.getAttribute("mode")=="patternMatching"){const n=new gs("(/)*"+(s.getAttribute(this.templateValueAttribute)||"")+"*");i=new gs(r).stringify(n.match(this.cleanLocation))}else{const n=new RegExp(s.getAttribute(this.templateValueAttribute)||""),o=(this.cleanLocation+"").match(n);o&&(i=o.shift()?.replace(n,r)||"")}return R`<div
1380
+ `,_r([h({type:String})],Ms.prototype,"submitResultKey",2),_r([h({type:Boolean})],Ms.prototype,"disabled",2),_r([h({type:String})],Ms.prototype,"endPoint",2),_r([h()],Ms.prototype,"name",2),_r([h()],Ms.prototype,"value",2),Ms=_r([X(od)],Ms);var ad=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,ei=(t,e,s,r)=>{for(var i=r>1?void 0:r?ld(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ad(e,s,i),i};const cd="sonic-router";let Sr=class extends Br(Q){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}createRenderRoot(){return this}connectedCallback(){dt.onChange(this),super.connectedCallback()}disconnectedCallback(){dt.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}get cleanLocation(){const t=new URL(this.location,document.location.origin);return t.pathname+t.hash}get patternBasePath(){return this.basePath!==void 0?this.basePath:"(/)*"}get regExpBasePath(){return this.basePath!==void 0?"^"+this.basePath:""}handleroutes(){if(!this.routes)return[];const t=[];for(let[e,s]of Object.entries(this.routes)){if(e==="fallback"||!s)continue;const r=new RegExp(this.regExpBasePath+e);if(r.test(this.cleanLocation)){const i=r.exec(this.cleanLocation)||[e];i.shift(),t.push(s([...i]))}else try{const n=new fs(this.patternBasePath+e).match(this.cleanLocation);if(n){const o=n||{};t.push(s(o))}}catch{this.cleanLocation.indexOf((this.basePath||"")+e.replace(document.location.origin,""))!=-1&&t.push(s({}))}}return t.length==0&&this.routes?.fallback&&this.isConnected&&t.push(this.routes.fallback()),t}render(){const t=this.handleroutes();if(t.length>0)return R`${t}`;const e=[];for(const s of this.templatePartsList){const r=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(this.regExpBasePath+r).test(this.cleanLocation))e.push(s);else try{new fs(this.patternBasePath+r+"(/*)").match(this.cleanLocation)&&(s.setAttribute("mode","patternMatching"),e.push(s))}catch{this.cleanLocation.indexOf((this.basePath||"")+r.replace(document.location.origin,""))!=-1&&e.push(s)}}if(e.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const s=this.templateList.find(r=>r.hasAttribute("data-fallback"));s&&e.push(s)}return R`${Ri(e,(s,r)=>r+new Date().getTime(),s=>{if(s.title&&(document.title=s.title),s.hasAttribute("dataProviderExpression")){let r="";const i=s.getAttribute("dataProviderExpression")||"";if(s.getAttribute("mode")=="patternMatching"){const n=new fs("(/)*"+(s.getAttribute(this.templateValueAttribute)||"")+"*");r=new fs(i).stringify(n.match(this.cleanLocation))}else{const n=new RegExp(s.getAttribute(this.templateValueAttribute)||""),o=(this.cleanLocation+"").match(n);o&&(r=o.shift()?.replace(n,i)||"")}return R`<div
1352
1381
  style="display:contents"
1353
- dataProvider="${i}"
1382
+ dataProvider="${r}"
1354
1383
  >
1355
- ${is(s)}
1356
- </div>`}return is(s)})}`}};Xr([h({type:String})],Sr.prototype,"fallBackRoute",2),Xr([h({type:Object,attribute:!1})],Sr.prototype,"routes",2),Xr([h({type:String})],Sr.prototype,"basePath",2),Xr([h()],Sr.prototype,"location",1),Sr=Xr([Q(od)],Sr);var ad=Object.getOwnPropertyDescriptor,ld=(t,e,s,i)=>{for(var r=i>1?void 0:i?ad(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const cd="sonic-redirect";let Xa=class extends kt(J){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.hasAttribute("onAdded")){ht.changeFromComponent(this);return}if(!this.props)return;const t=this.getAttribute("onData").split("."),e=lt.traverse(this.props,t);e&&!(lt.isObject(e)&&e)&&ht.changeFromComponent(this)}};Xa=ld([Q(cd)],Xa);var hd=Object.defineProperty,ud=Object.getOwnPropertyDescriptor,Vi=(t,e,s,i)=>{for(var r=i>1?void 0:i?ud(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&hd(e,s,r),r};const dd="sonic-states";let ei=class extends kt(Br(J)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onStateAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const t=this.statePath.split(".");for(const e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onStateAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher?.offAssign(this.onStateAssign),super.disconnectedCallback()}handleStates(t){if(!this.states)return[];const e=[];for(const[s,i]of Object.entries(this.states)){if(s==="fallback"||!i)continue;const r=new RegExp(s);if(r.test(t)){const n=r.exec(t)||[s];n.shift(),e.push(i([...n]))}else try{const n=new gs("(/)*"+s+"*");if(n.match(t)){const o=n.match(t)||{};e.push(i(o))}}catch{t.indexOf(s.replace(document.location.origin,""))!=-1&&e.push(i({}))}}return e.length==0&&this.states?.fallback&&this.isConnected&&e.push(this.states.fallback()),e}render(){let t=this.state;(!Array.isArray(t)&&lt.isObject(t)||t===void 0)&&(t="");const e=this.handleStates(t);if(e.length>0)return R`${e}`;const s=[];for(const i of this.templatePartsList){let r=i.getAttribute(this.templateValueAttribute),n=t;if(this.inverted&&(n=r,r=t),r==""&&(r=this.inverted?".*?":"^$"),new RegExp(r).test(n+""))s.push(i),i.removeAttribute("mode");else{const c=new gs(r);c.names.length>0&&c.match(n)&&(i.setAttribute("mode","patternMatching"),s.push(i))}}return R`${Fi(s,(i,r)=>r+new Date().getTime(),i=>{if(i?.hasAttribute("dataProviderExpression")){const r=i.getAttribute("dataProviderExpression");let n="",o=t,c=i.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=c,c=t),c==""&&(c=this.inverted?"*":"^$"),i.getAttribute("mode")=="patternMatching"){const d=new gs(c);n=new gs(r).stringify(d.match(o))}else{const d=new RegExp(c),m=(o+"").match(d);m&&(n=m.shift()?.replace(d,r))}return R`<div
1384
+ ${ns(s)}
1385
+ </div>`}return ns(s)})}`}};ei([h({type:String})],Sr.prototype,"fallBackRoute",2),ei([h({type:Object,attribute:!1})],Sr.prototype,"routes",2),ei([h({type:String})],Sr.prototype,"basePath",2),ei([h()],Sr.prototype,"location",1),Sr=ei([X(cd)],Sr);var hd=Object.getOwnPropertyDescriptor,ud=(t,e,s,r)=>{for(var i=r>1?void 0:r?hd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const dd="sonic-redirect";let ol=class extends Ot(Q){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.hasAttribute("onAdded")){dt.changeFromComponent(this);return}if(!this.props)return;const t=this.getAttribute("onData").split("."),e=ht.traverse(this.props,t);e&&!(ht.isObject(e)&&e)&&dt.changeFromComponent(this)}};ol=ud([X(dd)],ol);var pd=Object.defineProperty,fd=Object.getOwnPropertyDescriptor,Yi=(t,e,s,r)=>{for(var i=r>1?void 0:r?fd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&pd(e,s,i),i};const md="sonic-states";let ti=class extends Ot(Br(Q)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onStateAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const t=this.statePath.split(".");for(const e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onStateAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher?.offAssign(this.onStateAssign),super.disconnectedCallback()}handleStates(t){if(!this.states)return[];const e=[];for(const[s,r]of Object.entries(this.states)){if(s==="fallback"||!r)continue;const i=new RegExp(s);if(i.test(t)){const n=i.exec(t)||[s];n.shift(),e.push(r([...n]))}else try{const n=new fs("(/)*"+s+"*");if(n.match(t)){const o=n.match(t)||{};e.push(r(o))}}catch{t.indexOf(s.replace(document.location.origin,""))!=-1&&e.push(r({}))}}return e.length==0&&this.states?.fallback&&this.isConnected&&e.push(this.states.fallback()),e}render(){let t=this.state;(!Array.isArray(t)&&ht.isObject(t)||t===void 0)&&(t="");const e=this.handleStates(t);if(e.length>0)return R`${e}`;const s=[];for(const r of this.templatePartsList){let i=r.getAttribute(this.templateValueAttribute),n=t;if(this.inverted&&(n=i,i=t),i==""&&(i=this.inverted?".*?":"^$"),new RegExp(i).test(n+""))s.push(r),r.removeAttribute("mode");else{const c=new fs(i);c.names.length>0&&c.match(n)&&(r.setAttribute("mode","patternMatching"),s.push(r))}}return R`${Ri(s,(r,i)=>i+new Date().getTime(),r=>{if(r?.hasAttribute("dataProviderExpression")){const i=r.getAttribute("dataProviderExpression");let n="",o=t,c=r.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=c,c=t),c==""&&(c=this.inverted?"*":"^$"),r.getAttribute("mode")=="patternMatching"){const d=new fs(c);n=new fs(i).stringify(d.match(o))}else{const d=new RegExp(c),g=(o+"").match(d);g&&(n=g.shift()?.replace(d,i))}return R`<div
1357
1386
  style="display:contents"
1358
1387
  dataProvider="${n}"
1359
1388
  >
1360
- ${is(i)}
1361
- </div>`}return is(i)})}`}};Vi([h()],ei.prototype,"state",2),Vi([h({type:Boolean,reflect:!0})],ei.prototype,"inverted",2),Vi([h({type:Object})],ei.prototype,"states",2),ei=Vi([Q(dd)],ei);var pd=Object.getOwnPropertyDescriptor,fd=(t,e,s,i)=>{for(var r=i>1?void 0:i?pd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const gd="sonic-scope";let el=class extends J{createRenderRoot(){return this}render(){return R`<slot></slot>`}};el=fd([Q(gd)],el);function tl(t){return t instanceof HTMLElement||t instanceof ShadowRoot?t:null}function sl(t){if(!t||typeof t.get!="function")return null;const e=t.get();return!e||typeof e!="object"||!("serviceURL"in e)?null:e}function to(t){const e=tl(t);return e?ze.getApiConfiguration(e):null}function so(t){return typeof t?.serviceURL=="string"&&t.serviceURL.length>0}const md=["serviceURL","serviceurl","token","credentials","tokenProvider","tokenprovider","userName","username","password","eventsApiToken","eventsapitoken"];function bd(t){return t instanceof HTMLElement&&typeof t.updateComplete<"u"}function rl(t){let e=null,s=[];return()=>{const i=new Promise((r,n)=>{s.push({resolve:r,reject:n})});return e!==null||(e=requestAnimationFrame(()=>{e=null;const r=s;s=[],t().then(n=>r.forEach(({resolve:o})=>o(n)),n=>r.forEach(({reject:o})=>o(n)))})),i}}function il(t,e){if(bd(t)){let s=!1;return t.updateComplete.then(()=>{s||e()}),()=>{s=!0}}return e(),()=>{}}function nl(t,e){const s=tl(t);if(!s)return()=>{};let i=!1;const r=()=>{i||so(to(t))&&(i=!0,e())};if(r(),i)return()=>{};const n=[],o=requestAnimationFrame(()=>r());n.push(()=>cancelAnimationFrame(o)),queueMicrotask(()=>r());const c=new MutationObserver(()=>r());let d=s;for(;d;)d instanceof Element&&c.observe(d,{attributes:!0,attributeFilter:[...md]}),d=d.parentNode||d.host;return n.push(()=>c.disconnect()),()=>{i=!0,n.forEach(m=>m())}}class ol{constructor(){this.bindings=new WeakMap}bind(e,s){const i={run:s};let r=this.bindings.get(e);return r||(r=new Set,this.bindings.set(e,r)),r.add(i),()=>{const n=this.bindings.get(e);n&&(n.delete(i),n.size===0&&this.bindings.delete(e))}}run(e){const s=[...this.bindings.get(e)??[]].map(({run:i})=>i());return s.length===0?Promise.resolve(void 0):s.length===1?s[0]:Promise.all(s).then(()=>{})}}let al=0;function vd(t){return t!==null&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function ll(t,e){const s=e?.when??"after";return(i,r,n)=>{const o=n.value;if(!o)return;const c=function(...d){if(s==="before")return t(this).then(()=>o.apply(this,d));const m=o.apply(this,d);return vd(m)?m.then(A=>t(this).then(()=>A)):t(this).then(()=>m)};n.value=c}}function yd(t,e){return ll(s=>t.refetch(s),e)}function wd(t,e){return ll(s=>t.send(s),e)}function Wi(t){t.configPublisher&&t.configMutationHandler&&t.configPublisher.offInternalMutation(t.configMutationHandler),t.configPublisher=null,t.configMutationHandler=null}function cl(t,e,s){const i=t.path,r=hl(e)?void 0:e,n=hl(e)?e:s,o={skipEmptyPlaceholder:n?.skipEmptyPlaceholder},c=r?.path,d=n?.triggerKey?.path,m=Bt(i),A=c?Bt(c):[],g=d?Bt(d):[],f=[...new Set([...m,...A,...g])],k=m.length>0,E=!!c,O=n?.refetchEveryMs??0,z=new ol,B=new WeakMap,S=new WeakSet,y=new WeakMap;let I;const C=function(D,Y,j){if(j){const re=j.value;if(!re)return;C.registerResultHandler(D,(ie,U)=>re.call(ie,U));return}if(!D)return;if(S.has(D)){y.get(D)?.add(Y);return}S.add(D),y.set(D,new Set([Y])),Qs(D);const ne=`__get_state_${Y}`;D.__onConnected__(re=>{const ie=re;let U=ie[ne];U||(U={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:O},ie[ne]=U),U.cleanupOperation?.(),U.cleanupOperation=null,U.cleanupWatchers.forEach(xe=>xe()),U.cleanupWatchers=[],U.requestGeneration++,U.refetchEveryMs=O,Pr(U);const le=()=>{Pr(U),!(!U.refetchEveryMs||U.refetchEveryMs<=0)&&(U.refetchTimeoutId=setTimeout(()=>{U.refetchTimeoutId=null,Be().catch(()=>{})},U.refetchEveryMs))},pe=xe=>{y.get(D)?.forEach(b=>{ie[b]=xe})},Be=async()=>{const xe=k?Ot(re,i,o):{ready:!0,path:i};if(!xe.ready||!xe.path){pe(void 0),le();return}let b=null;if(E&&c){const Pe=Ot(re,c,o);if(!Pe.ready||!Pe.path){pe(void 0),le();return}const Ee=Qt(Pe.path);b=sl(Ee)}else b=to(re);if(!so(b)){if(!E&&!U.scopeWatchCleanup){const Pe=nl(re,me);U.scopeWatchCleanup=Pe,U.cleanupWatchers.push(()=>{Pe(),U.scopeWatchCleanup=null})}le();return}const _=++U.requestGeneration,we=await new Os(b).getDetailed(xe.path);return _!==U.requestGeneration||(y.get(D)?.forEach(Pe=>{ie[Pe]=we}),le(),B.get(D)?.forEach(Pe=>Pe(re,we))),we},he=rl(Be),me=()=>{he().catch(()=>{})};U.cleanupOperation=z.bind(re,he);const $e=()=>{if(Ki(U),!d)return;const xe=Ot(re,d,o);if(!xe.ready||!xe.path)return;const b=Qt(xe.path);if(!b)return;const _=me;b.onInvalidate(_),U.triggerPublisher=b,U.triggerInvalidateHandler=_},ce=()=>{if(!E||!c)return;Wi(U);const xe=Ot(re,c,o);if(!xe.ready||!xe.path){pe(void 0);return}const b=Qt(xe.path);if(!b){pe(void 0);return}const _=me;b.onInternalMutation(_),U.configPublisher=b,U.configMutationHandler=_},W=()=>{$e(),ce(),E||me()};if(E||g.length){for(const xe of f){const b=Ts(Ls.watcherStore,Ls.hooked,re,xe,()=>W());U.cleanupWatchers.push(b)}W()}else{const xe=()=>{if(k)for(const b of m){const _=Ts(Ls.watcherStore,Ls.hooked,re,b,me);U.cleanupWatchers.push(_)}$e(),Be().catch(()=>{})};U.cleanupWatchers.push(il(re,xe))}}),D.__onDisconnected__(re=>{const ie=re,U=ie[ne];U&&(U.cleanupOperation?.(),U.cleanupOperation=null,Wi(U),Ki(U),Pr(U),U.cleanupWatchers.forEach(le=>le()),U.cleanupWatchers=[],U.requestGeneration++,y.get(D)?.forEach(le=>{ie[le]=void 0}))})};return C.refetch=D=>z.run(D),C.registerResultHandler=(D,Y)=>{let j=B.get(D);j||(j=new Set,B.set(D,j)),j.add(Y),S.has(D)||(I??=`__get_handler_${al++}`,C(D,I))},C}function hl(t){return!t||typeof t!="object"?!1:"skipEmptyPlaceholder"in t||"refetchEveryMs"in t||"triggerKey"in t}function ul(t){return!t||typeof t!="object"?!1:"refetchEveryMs"in t||"skipIfBodyMissing"in t||"autoPostOnBodyMutation"in t||"skipEmptyPlaceholder"in t||"triggerKey"in t}function dl(t){t.bodyPublisher&&t.bodyMutationHandler&&t.bodyPublisher.offInternalMutation(t.bodyMutationHandler),t.bodyPublisher=null,t.bodyMutationHandler=null}function Ki(t){t.triggerPublisher&&t.triggerInvalidateHandler&&t.triggerPublisher.offInvalidate(t.triggerInvalidateHandler),t.triggerPublisher=null,t.triggerInvalidateHandler=null}function Pr(t){t.refetchTimeoutId&&(clearTimeout(t.refetchTimeoutId),t.refetchTimeoutId=null)}function _d(t){if(!(!t||typeof t.get!="function"))return t.get()}function ro(t,e){return function(s,i,r,n){const o=s.path,c=i.path,d=ul(r)?void 0:r,m=ul(r)?r:n,A=d?.path,g=m?.triggerKey?.path,f=Bt(o),k=Bt(c),E=A?Bt(A):[],O=g?Bt(g):[],z=[...new Set([...f,...k,...E,...O])],B=f.length>0,S=!!A,y=m?.refetchEveryMs??0,I=m?.skipIfBodyMissing??!0,C=m?.autoPostOnBodyMutation??!0,D={skipEmptyPlaceholder:m?.skipEmptyPlaceholder},Y=`__${t.toLowerCase()}_state_`,j=new ol,ne=new WeakMap,re=new WeakSet,ie=new WeakMap;let U;const le=function(pe,Be,he){if(he){const $e=he.value;if(!$e)return;le.registerResultHandler(pe,(ce,W)=>$e.call(ce,W));return}if(!pe)return;if(re.has(pe)){ie.get(pe)?.add(Be);return}re.add(pe),ie.set(pe,new Set([Be])),Qs(pe);const me=`${Y}${Be}`;pe.__onConnected__($e=>{const ce=$e;let W=ce[me];W||(W={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,bodyPublisher:null,bodyMutationHandler:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:y,skipIfBodyMissing:I,autoPostOnBodyMutation:C},ce[me]=W),W.cleanupOperation?.(),W.cleanupOperation=null,W.cleanupWatchers.forEach($=>$()),W.cleanupWatchers=[],W.requestGeneration++,W.refetchEveryMs=y,W.skipIfBodyMissing=I,W.autoPostOnBodyMutation=C,Pr(W);const xe=()=>{Pr(W),!(!W.refetchEveryMs||W.refetchEveryMs<=0)&&(W.refetchTimeoutId=setTimeout(()=>{W.refetchTimeoutId=null,_().catch(()=>{})},W.refetchEveryMs))},b=$=>{ie.get(pe)?.forEach(F=>{ce[F]=$})},_=async()=>{const $=B?Ot($e,o,D):{ready:!0,path:o};if(!$.ready||!$.path){b(void 0),xe();return}const F=Ot($e,c,D);if(!F.ready||!F.path){b(void 0),xe();return}const q=Qt(F.path),V=_d(q);if(W.skipIfBodyMissing&&V==null){xe();return}let N=null;if(S&&A){const ge=Ot($e,A,D);if(!ge.ready||!ge.path){b(void 0),xe();return}const fe=Qt(ge.path);N=sl(fe)}else N=to($e);if(!so(N)){if(!S&&!W.scopeWatchCleanup){const ge=nl($e,we);W.scopeWatchCleanup=ge,W.cleanupWatchers.push(()=>{ge(),W.scopeWatchCleanup=null})}xe();return}const G=++W.requestGeneration,ae=new Os(N);let Ce;try{Ce=await e(ae,$.path,V)}catch(ge){throw G===W.requestGeneration&&ne.get(pe)?.forEach(fe=>fe($e,void 0)),ge}return G!==W.requestGeneration||(b(Ce),xe(),ne.get(pe)?.forEach(ge=>ge($e,Ce))),Ce},ee=rl(_),we=()=>{ee().catch(()=>{})};W.cleanupOperation=j.bind($e,ee);const Pe=()=>{if(dl(W),!W.autoPostOnBodyMutation)return;const $=Ot($e,c,D);if(!$.ready||!$.path)return;const F=Qt($.path);if(!F)return;const q=we;F.onInternalMutation(q),W.bodyPublisher=F,W.bodyMutationHandler=q},Ee=()=>{if(Ki(W),!g)return;const $=Ot($e,g,D);if(!$.ready||!$.path)return;const F=Qt($.path);if(!F)return;const q=we;F.onInvalidate(q),W.triggerPublisher=F,W.triggerInvalidateHandler=q},T=()=>{if(!S||!A)return;Wi(W);const $=Ot($e,A,D);if(!$.ready||!$.path){b(void 0);return}const F=Qt($.path);if(!F){b(void 0);return}const q=we;F.onInternalMutation(q),W.configPublisher=F,W.configMutationHandler=q},M=()=>{Pe(),Ee(),T(),W.autoPostOnBodyMutation&&we()};if(S||k.length||O.length){for(const $ of z){const F=Ts(Ls.watcherStore,Ls.hooked,$e,$,()=>M());W.cleanupWatchers.push(F)}M()}else{const $=()=>{if(B)for(const F of f){const q=Ts(Ls.watcherStore,Ls.hooked,$e,F,we);W.cleanupWatchers.push(q)}Pe(),Ee(),W.autoPostOnBodyMutation&&we()};W.cleanupWatchers.push(il($e,$))}}),pe.__onDisconnected__($e=>{const ce=$e,W=ce[me];W&&(W.cleanupOperation?.(),W.cleanupOperation=null,Wi(W),dl(W),Ki(W),Pr(W),W.cleanupWatchers.forEach(xe=>xe()),W.cleanupWatchers=[],W.requestGeneration++,ie.get(pe)?.forEach(xe=>{ce[xe]=void 0}))})};return le.send=pe=>j.run(pe),le.registerResultHandler=(pe,Be)=>{let he=ne.get(pe);he||(he=new Set,ne.set(pe,he)),he.add(Be),re.has(pe)||(U??=`__${t.toLowerCase()}_handler_${al++}`,le(pe,U))},le}}function Sd(t,e,s,i){return ro("POST",(r,n,o)=>r.postDetailed(n,o))(t,e,s,i)}function Pd(t,e,s,i){return ro("PUT",(r,n,o)=>r.putDetailed(n,o))(t,e,s,i)}function xd(t,e,s,i){return ro("PATCH",(r,n,o)=>r.patchDetailed(n,o))(t,e,s,i)}const Ad=ka,Cd=$a,kd=cl;window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:Ca,publish:ka,subscribe:$a,onAssing:Qh,handle:eu,ancestorAttribute:Hn,autoSubscribe:tu,autoFill:su,get:cl,post:Sd,put:Pd,patch:xd,refetch:yd,send:wd};var $d=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,Gi=(t,e,s,i)=>{for(var r=i>1?void 0:i?Dd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&$d(e,s,r),r};const pl=new Di("communes?limit=$limit&fields=nom,code"),fl=new ks(pl.path),Ed="sonic-example";let ti=class extends J{constructor(){super(...arguments),this.limit=5}render(){return R` <span part="api-get-demo">
1389
+ ${ns(r)}
1390
+ </div>`}return ns(r)})}`}};Yi([h()],ti.prototype,"state",2),Yi([h({type:Boolean,reflect:!0})],ti.prototype,"inverted",2),Yi([h({type:Object})],ti.prototype,"states",2),ti=Yi([X(md)],ti);var gd=Object.getOwnPropertyDescriptor,bd=(t,e,s,r)=>{for(var i=r>1?void 0:r?gd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const vd="sonic-scope";let al=class extends Q{createRenderRoot(){return this}render(){return R`<slot></slot>`}};al=bd([X(vd)],al);function ll(t){return t instanceof HTMLElement||t instanceof ShadowRoot?t:null}function cl(t){if(!t||typeof t.get!="function")return null;const e=t.get();return!e||typeof e!="object"||!("serviceURL"in e)?null:e}function ro(t){const e=ll(t);return e?ze.getApiConfiguration(e):null}function io(t){return typeof t?.serviceURL=="string"&&t.serviceURL.length>0}const yd=["serviceURL","serviceurl","token","credentials","tokenProvider","tokenprovider","userName","username","password","eventsApiToken","eventsapitoken"];function wd(t){return t instanceof HTMLElement&&typeof t.updateComplete<"u"}function hl(t){let e=null,s=[];return()=>{const r=new Promise((i,n)=>{s.push({resolve:i,reject:n})});return e!==null||(e=requestAnimationFrame(()=>{e=null;const i=s;s=[],t().then(n=>i.forEach(({resolve:o})=>o(n)),n=>i.forEach(({reject:o})=>o(n)))})),r}}function ul(t,e){if(wd(t)){let s=!1;return t.updateComplete.then(()=>{s||e()}),()=>{s=!0}}return e(),()=>{}}function dl(t,e){const s=ll(t);if(!s)return()=>{};let r=!1;const i=()=>{r||io(ro(t))&&(r=!0,e())};if(i(),r)return()=>{};const n=[],o=requestAnimationFrame(()=>i());n.push(()=>cancelAnimationFrame(o)),queueMicrotask(()=>i());const c=new MutationObserver(()=>i());let d=s;for(;d;)d instanceof Element&&c.observe(d,{attributes:!0,attributeFilter:[...yd]}),d=d.parentNode||d.host;return n.push(()=>c.disconnect()),()=>{r=!0,n.forEach(g=>g())}}class pl{constructor(){this.bindings=new WeakMap}bind(e,s){const r={run:s};let i=this.bindings.get(e);return i||(i=new Set,this.bindings.set(e,i)),i.add(r),()=>{const n=this.bindings.get(e);n&&(n.delete(r),n.size===0&&this.bindings.delete(e))}}run(e){const s=[...this.bindings.get(e)??[]].map(({run:r})=>r());return s.length===0?Promise.resolve(void 0):s.length===1?s[0]:Promise.all(s).then(()=>{})}}let fl=0;function _d(t){return t!==null&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function ml(t,e){const s=e?.when??"after";return(r,i,n)=>{const o=n.value;if(!o)return;const c=function(...d){if(s==="before")return t(this).then(()=>o.apply(this,d));const g=o.apply(this,d);return _d(g)?g.then(A=>t(this).then(()=>A)):t(this).then(()=>g)};n.value=c}}function Sd(t,e){return ml(s=>t.refetch(s),e)}function Pd(t,e){return ml(s=>t.send(s),e)}function Zi(t){t.configPublisher&&t.configMutationHandler&&t.configPublisher.offInternalMutation(t.configMutationHandler),t.configPublisher=null,t.configMutationHandler=null}function gl(t,e,s){const r=t.path,i=bl(e)?void 0:e,n=bl(e)?e:s,o={skipEmptyPlaceholder:n?.skipEmptyPlaceholder},c=i?.path,d=n?.triggerKey?.path,g=Ht(r),A=c?Ht(c):[],m=d?Ht(d):[],f=[...new Set([...g,...A,...m])],k=g.length>0,E=!!c,O=n?.refetchEveryMs??0,z=new pl,H=new WeakMap,S=new WeakSet,y=new WeakMap;let I;const C=function(D,Y,j){if(j){const re=j.value;if(!re)return;C.registerResultHandler(D,(ie,U)=>re.call(ie,U));return}if(!D)return;if(S.has(D)){y.get(D)?.add(Y);return}S.add(D),y.set(D,new Set([Y])),Qs(D);const ne=`__get_state_${Y}`;D.__onConnected__(re=>{const ie=re;let U=ie[ne];U||(U={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:O},ie[ne]=U),U.cleanupOperation?.(),U.cleanupOperation=null,U.cleanupWatchers.forEach(Ae=>Ae()),U.cleanupWatchers=[],U.requestGeneration++,U.refetchEveryMs=O,Pr(U);const le=()=>{Pr(U),!(!U.refetchEveryMs||U.refetchEveryMs<=0)&&(U.refetchTimeoutId=setTimeout(()=>{U.refetchTimeoutId=null,He().catch(()=>{})},U.refetchEveryMs))},pe=Ae=>{y.get(D)?.forEach(b=>{ie[b]=Ae})},He=async()=>{const Ae=k?Tt(re,r,o):{ready:!0,path:r};if(!Ae.ready||!Ae.path){pe(void 0),le();return}let b=null;if(E&&c){const Pe=Tt(re,c,o);if(!Pe.ready||!Pe.path){pe(void 0),le();return}const Ee=Qt(Pe.path);b=cl(Ee)}else b=ro(re);if(!io(b)){if(!E&&!U.scopeWatchCleanup){const Pe=dl(re,ge);U.scopeWatchCleanup=Pe,U.cleanupWatchers.push(()=>{Pe(),U.scopeWatchCleanup=null})}le();return}const _=++U.requestGeneration,we=await new Os(b).getDetailed(Ae.path);return _!==U.requestGeneration||(y.get(D)?.forEach(Pe=>{ie[Pe]=we}),le(),H.get(D)?.forEach(Pe=>Pe(re,we))),we},he=hl(He),ge=()=>{he().catch(()=>{})};U.cleanupOperation=z.bind(re,he);const $e=()=>{if(Ji(U),!d)return;const Ae=Tt(re,d,o);if(!Ae.ready||!Ae.path)return;const b=Qt(Ae.path);if(!b)return;const _=ge;b.onInvalidate(_),U.triggerPublisher=b,U.triggerInvalidateHandler=_},ce=()=>{if(!E||!c)return;Zi(U);const Ae=Tt(re,c,o);if(!Ae.ready||!Ae.path){pe(void 0);return}const b=Qt(Ae.path);if(!b){pe(void 0);return}const _=ge;b.onInternalMutation(_),U.configPublisher=b,U.configMutationHandler=_},W=()=>{$e(),ce(),E||ge()};if(E||m.length){for(const Ae of f){const b=Ts(Ls.watcherStore,Ls.hooked,re,Ae,()=>W());U.cleanupWatchers.push(b)}W()}else{const Ae=()=>{if(k)for(const b of g){const _=Ts(Ls.watcherStore,Ls.hooked,re,b,ge);U.cleanupWatchers.push(_)}$e(),He().catch(()=>{})};U.cleanupWatchers.push(ul(re,Ae))}}),D.__onDisconnected__(re=>{const ie=re,U=ie[ne];U&&(U.cleanupOperation?.(),U.cleanupOperation=null,Zi(U),Ji(U),Pr(U),U.cleanupWatchers.forEach(le=>le()),U.cleanupWatchers=[],U.requestGeneration++,y.get(D)?.forEach(le=>{ie[le]=void 0}))})};return C.refetch=D=>z.run(D),C.registerResultHandler=(D,Y)=>{let j=H.get(D);j||(j=new Set,H.set(D,j)),j.add(Y),S.has(D)||(I??=`__get_handler_${fl++}`,C(D,I))},C}function bl(t){return!t||typeof t!="object"?!1:"skipEmptyPlaceholder"in t||"refetchEveryMs"in t||"triggerKey"in t}function vl(t){return!t||typeof t!="object"?!1:"refetchEveryMs"in t||"skipIfBodyMissing"in t||"autoPostOnBodyMutation"in t||"skipEmptyPlaceholder"in t||"triggerKey"in t}function yl(t){t.bodyPublisher&&t.bodyMutationHandler&&t.bodyPublisher.offInternalMutation(t.bodyMutationHandler),t.bodyPublisher=null,t.bodyMutationHandler=null}function Ji(t){t.triggerPublisher&&t.triggerInvalidateHandler&&t.triggerPublisher.offInvalidate(t.triggerInvalidateHandler),t.triggerPublisher=null,t.triggerInvalidateHandler=null}function Pr(t){t.refetchTimeoutId&&(clearTimeout(t.refetchTimeoutId),t.refetchTimeoutId=null)}function xd(t){if(!(!t||typeof t.get!="function"))return t.get()}function no(t,e){return function(s,r,i,n){const o=s.path,c=r.path,d=vl(i)?void 0:i,g=vl(i)?i:n,A=d?.path,m=g?.triggerKey?.path,f=Ht(o),k=Ht(c),E=A?Ht(A):[],O=m?Ht(m):[],z=[...new Set([...f,...k,...E,...O])],H=f.length>0,S=!!A,y=g?.refetchEveryMs??0,I=g?.skipIfBodyMissing??!0,C=g?.autoPostOnBodyMutation??!0,D={skipEmptyPlaceholder:g?.skipEmptyPlaceholder},Y=`__${t.toLowerCase()}_state_`,j=new pl,ne=new WeakMap,re=new WeakSet,ie=new WeakMap;let U;const le=function(pe,He,he){if(he){const $e=he.value;if(!$e)return;le.registerResultHandler(pe,(ce,W)=>$e.call(ce,W));return}if(!pe)return;if(re.has(pe)){ie.get(pe)?.add(He);return}re.add(pe),ie.set(pe,new Set([He])),Qs(pe);const ge=`${Y}${He}`;pe.__onConnected__($e=>{const ce=$e;let W=ce[ge];W||(W={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,bodyPublisher:null,bodyMutationHandler:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:y,skipIfBodyMissing:I,autoPostOnBodyMutation:C},ce[ge]=W),W.cleanupOperation?.(),W.cleanupOperation=null,W.cleanupWatchers.forEach($=>$()),W.cleanupWatchers=[],W.requestGeneration++,W.refetchEveryMs=y,W.skipIfBodyMissing=I,W.autoPostOnBodyMutation=C,Pr(W);const Ae=()=>{Pr(W),!(!W.refetchEveryMs||W.refetchEveryMs<=0)&&(W.refetchTimeoutId=setTimeout(()=>{W.refetchTimeoutId=null,_().catch(()=>{})},W.refetchEveryMs))},b=$=>{ie.get(pe)?.forEach(F=>{ce[F]=$})},_=async()=>{const $=H?Tt($e,o,D):{ready:!0,path:o};if(!$.ready||!$.path){b(void 0),Ae();return}const F=Tt($e,c,D);if(!F.ready||!F.path){b(void 0),Ae();return}const q=Qt(F.path),V=xd(q);if(W.skipIfBodyMissing&&V==null){Ae();return}let N=null;if(S&&A){const me=Tt($e,A,D);if(!me.ready||!me.path){b(void 0),Ae();return}const fe=Qt(me.path);N=cl(fe)}else N=ro($e);if(!io(N)){if(!S&&!W.scopeWatchCleanup){const me=dl($e,we);W.scopeWatchCleanup=me,W.cleanupWatchers.push(()=>{me(),W.scopeWatchCleanup=null})}Ae();return}const G=++W.requestGeneration,ae=new Os(N);let Ce;try{Ce=await e(ae,$.path,V)}catch(me){throw G===W.requestGeneration&&ne.get(pe)?.forEach(fe=>fe($e,void 0)),me}return G!==W.requestGeneration||(b(Ce),Ae(),ne.get(pe)?.forEach(me=>me($e,Ce))),Ce},te=hl(_),we=()=>{te().catch(()=>{})};W.cleanupOperation=j.bind($e,te);const Pe=()=>{if(yl(W),!W.autoPostOnBodyMutation)return;const $=Tt($e,c,D);if(!$.ready||!$.path)return;const F=Qt($.path);if(!F)return;const q=we;F.onInternalMutation(q),W.bodyPublisher=F,W.bodyMutationHandler=q},Ee=()=>{if(Ji(W),!m)return;const $=Tt($e,m,D);if(!$.ready||!$.path)return;const F=Qt($.path);if(!F)return;const q=we;F.onInvalidate(q),W.triggerPublisher=F,W.triggerInvalidateHandler=q},T=()=>{if(!S||!A)return;Zi(W);const $=Tt($e,A,D);if(!$.ready||!$.path){b(void 0);return}const F=Qt($.path);if(!F){b(void 0);return}const q=we;F.onInternalMutation(q),W.configPublisher=F,W.configMutationHandler=q},M=()=>{Pe(),Ee(),T(),W.autoPostOnBodyMutation&&we()};if(S||k.length||O.length){for(const $ of z){const F=Ts(Ls.watcherStore,Ls.hooked,$e,$,()=>M());W.cleanupWatchers.push(F)}M()}else{const $=()=>{if(H)for(const F of f){const q=Ts(Ls.watcherStore,Ls.hooked,$e,F,we);W.cleanupWatchers.push(q)}Pe(),Ee(),W.autoPostOnBodyMutation&&we()};W.cleanupWatchers.push(ul($e,$))}}),pe.__onDisconnected__($e=>{const ce=$e,W=ce[ge];W&&(W.cleanupOperation?.(),W.cleanupOperation=null,Zi(W),yl(W),Ji(W),Pr(W),W.cleanupWatchers.forEach(Ae=>Ae()),W.cleanupWatchers=[],W.requestGeneration++,ie.get(pe)?.forEach(Ae=>{ce[Ae]=void 0}))})};return le.send=pe=>j.run(pe),le.registerResultHandler=(pe,He)=>{let he=ne.get(pe);he||(he=new Set,ne.set(pe,he)),he.add(He),re.has(pe)||(U??=`__${t.toLowerCase()}_handler_${fl++}`,le(pe,U))},le}}function Ad(t,e,s,r){return no("POST",(i,n,o)=>i.postDetailed(n,o))(t,e,s,r)}function Cd(t,e,s,r){return no("PUT",(i,n,o)=>i.putDetailed(n,o))(t,e,s,r)}function kd(t,e,s,r){return no("PATCH",(i,n,o)=>i.patchDetailed(n,o))(t,e,s,r)}const $d=Ea,Dd=Oa,Ed=gl;window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:Da,publish:Ea,subscribe:Oa,onAssing:su,handle:iu,ancestorAttribute:Gn,autoSubscribe:nu,autoFill:ou,get:gl,post:Ad,put:Cd,patch:kd,refetch:Sd,send:Pd};var Od=Object.defineProperty,Td=Object.getOwnPropertyDescriptor,Qi=(t,e,s,r)=>{for(var i=r>1?void 0:r?Td(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Od(e,s,i),i};const wl=new Ei("communes?limit=$limit&fields=nom,code"),_l=new Cs(wl.path),Ld="sonic-example";let si=class extends Q{constructor(){super(...arguments),this.limit=5}render(){return R` <span part="api-get-demo">
1362
1391
  · get: ${JSON.stringify(this.geoCommunesPayload?.result??null)} · HTTP
1363
1392
  ${this.geoCommunesPayload?.response?.status??"—"} · subscribe:
1364
1393
  ${JSON.stringify(this.geoCommunesResult??null)}</span
1365
- >`}};Gi([h({type:Number})],ti.prototype,"limit",2),Gi([kd(pl),Ad(fl)],ti.prototype,"geoCommunesPayload",2),Gi([Ae(),Cd(fl.result)],ti.prototype,"geoCommunesResult",2),ti=Gi([Q(Ed)],ti);const Od={checkbox:{tagName:"sonic-checkbox"},date:{tagName:"sonic-input",attributes:{type:"date"}},fieldset:{tagName:"sonic-fieldset",nodes:[{libraryKey:"formLayout"}],contentElementSelector:"sonic-form-layout"},managed_file:{tagName:"sonic-input",attributes:{variant:"ghost",type:"file"}},password:{tagName:"sonic-input",attributes:{type:"password"}},radio:{tagName:"sonic-radio"},select:{tagName:"sonic-select"},textarea:{tagName:"sonic-textarea"},textfield:{tagName:"sonic-input",attributes:{type:"text"}},hidden:{tagName:"sonic-input",attributes:{type:"hidden"}},button:{tagName:"sonic-button"},form:{tagName:"sonic-submit",attributes:{onEnterKey:!0}},submit:{tagName:"sonic-submit",attributes:{onClick:!0},contentElementSelector:"sonic-button",nodes:[{libraryKey:"button",attributes:{type:"success"},nodes:[{tagName:"sonic-icon",attributes:{name:"check",slot:"prefix"}}]}]},email:{tagName:"sonic-input",attributes:{type:"email"}},formItemContainer:{tagName:"div",attributes:{class:"form-item-container"}},formLayout:{tagName:"sonic-form-layout"},formActions:{tagName:"sonic-form-actions"},passwordHelper:{tagName:"sonic-password-helper"},sameValueHelper:{tagName:"sonic-same-value-helper"},divider:{tagName:"sonic-divider"}};class Td{async transform(e,s){if(this.sduiDescriptor=e,this.sduiDescriptor.library)for(const i in s.library)this.sduiDescriptor.library[i]=s.library[i];for(const i of s.transforms)this.transformAction(i)}transformAction(e){const s=this.getNodesMatchingPatterns(e.patterns,this.sduiDescriptor);this[e.action](e,s)}getNodesMatchingPatterns(e,s){if(!e)return[];if(!s)return[];const i=s.nodes;if(!i)return[];let r=[],n=0;for(const o of e)for(const c of i)this.nodeMatchesPattern(o,c)&&r.push({parent:s,child:c,index:n}),r=r.concat(this.getNodesMatchingPatterns([o],c)),n++;return r}stringMatchesExpression(e,s){return!s||e&&e.match(s)}nodeMatchesPattern(e,s){const i=e,r=s,n=["libraryKey","innerHTML","prefix","suffix","markup"];for(const d of n)if(!this.stringMatchesExpression(r[d],i[d]))return!1;const o=e.attributes,c=s.attributes;if(o&&!c)return!1;if(o){for(const d in o)if(!c||!this.stringMatchesExpression(c[d],o[d]))return!1}return!0}unwrap(e,s){for(const i of s)i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),1),i.child.nodes&&i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),0,...i.child.nodes)}wrap(e,s){const i={...e.ui};i.nodes||(i.nodes=[]);let r=0;for(const o of s)i.nodes?.push(o.child),r>0&&o.parent.nodes?.splice(o.parent.nodes.indexOf(o.child),1),r++;const n=s[0]?.parent.nodes?.indexOf(s[0].child);n&&(s[0].parent.nodes?.splice(n,1),s[0].parent.nodes?.splice(n,0,i))}move(e,s){for(const i of s){i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),1);let r=[];e.after&&(r=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor)),e.before&&(r=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor));const n=r[0];n&&n.parent.nodes?.splice(n.parent.nodes.indexOf(n.child)+(e.after?1:0),0,i.child)}}remap(e,s){for(const i of s){const r={...e.ui};r.attributes||(r.attributes={});const n=i.child.attributes;if(n)for(const g in n)Object.prototype.hasOwnProperty.call(r.attributes,"key")||(r.attributes[g]=n[g]);const o=["libraryKey","innerHTML","prefix","suffix","markup"],c=i.child,d=r;for(const g of o)!Object.prototype.hasOwnProperty.call(r,g)&&c[g]&&(d[g]=c[g]);r.nodes||(r.nodes=[]);const m=i.child.nodes;if(m)for(const g of m)r.nodes.push(g);const A=i.parent.nodes?.indexOf(i.child)||-1;A!=-1&&(i.parent.nodes?.splice(A,1),i.parent.nodes?.splice(A,0,r))}}delete(e,s){for(const i of s)i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),1)}insert(e,s){const i=e.after?"after":e.before?"before":"in";s=[],e.after?s=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor):e.before?s=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor):e.in&&(s=this.getNodesMatchingPatterns([e.in],this.sduiDescriptor));const r=s[0];r&&(i=="in"?(r.child.nodes||(r.child.nodes=[]),r.child.nodes.push({...e.ui})):r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child)+(i=="after"?1:0),0,{...e.ui}))}}var Ld=Object.defineProperty,Md=Object.getOwnPropertyDescriptor,io=(t,e,s,i)=>{for(var r=i>1?void 0:i?Md(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ld(e,s,r),r};const Id="sonic-sdui";let Yi=class extends Wa(tr(J)){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(t){this.props==null&&(this.sduiDescriptor={});{const e=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==e)return;this.sduiDescriptor=e,this.updateContents()}super.willUpdate(t)}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,Od,this.sduiDescriptor.library),this.sduiDescriptor.library=t,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter(t=>t.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const t of this.sduiDescriptor.js)bs.loadJS(t);if(this.sduiDescriptor.css)for(const t of this.sduiDescriptor.css)bs.loadCSS(t)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const e=await(await fetch(this.getAttribute("transformation"))).json();await new Td().transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;const e=await(await fetch(this.getAttribute("library"))).json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);const e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach(s=>this.appendChild(this.parseChild(s)))}parseChild(t){const e=t.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(t,e);return this.handleAttributes(t,s),s=this.handleMarkup(t,s),i||(i=s),this.handleChildNodes(t,i,s),this.handleInnerHTML(t,i),t.prefix||t.suffix?this.handlePrefixSuffix(t,s):s}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}handleChildNodes(t,e,s){if(t.nodes){const i=t.nodes;for(const r of i){const n=this.parseChild(r);let o=e;r.parentElementSelector&&(o=s.querySelector(r.parentElementSelector)||e),o.shadowRoot?o.shadowRoot.appendChild(n):o.tagName.toLocaleLowerCase()=="template"?o.content.appendChild(n):o.appendChild(n)}}}handleLibrary(t,e){let s,i;if(t.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"});const r=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;r&&(i=s.querySelector(r))}else s=document.createElement(e);return{element:s,contentElement:i}}handleAttributes(t,e){const s=t.attributes;for(const i in s){const r=s[i],n=Wr.isObject(r)?JSON.stringify(r):r;e.setAttribute(i,n)}}handleMarkup(t,e){return t.markup&&(e=document.createElement("div"),e.style.display="contents",e.innerHTML=t.markup),e}handleInnerHTML(t,e){if(t.innerHTML)if(t.innerHTML.indexOf("wording_")!=-1){const s=this.getAncestorAttributeValue("wordingProvider");this.api?.post(s,{labels:[t.innerHTML.substring(8)]}).then(i=>{e&&(e.innerHTML+=i)})}else e&&(e.innerHTML+=t.innerHTML)}};io([h()],Yi.prototype,"sduiKey",2),io([h()],Yi.prototype,"messagesKey",2),Yi=io([Q(Id)],Yi);var Nd=Object.defineProperty,Fd=Object.getOwnPropertyDescriptor,gl=(t,e,s,i)=>{for(var r=i>1?void 0:i?Fd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Nd(e,s,r),r};let Zi=class extends tr(J){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const t=this.listeners;this.listeners=[],t.forEach(e=>{this.publisher.offAssign(e.subscriber)})}parseComposition(t,e){if(t)for(const s in t){const i=t[s];if(typeof i=="string"){const r=i.split("."),n=r.shift();if(!n)continue;let o=ve.get(n);o=Wr.traverse(o,r);const c={publisher:o,subscriber:d=>{e[s]=d}};this.listeners.push(c),o.onAssign(c.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const r=new Ir({},e);e._proxies_.set(s,r);const n={publisher:r,subscriber:o=>{e[s]=o}};this.listeners.push(n),r.onAssign(n.subscriber),this.parseComposition(i,r)}}}render(){return R`<slot></slot>`}};Zi.styles=[X`
1394
+ >`}};Qi([h({type:Number})],si.prototype,"limit",2),Qi([Ed(wl),$d(_l)],si.prototype,"geoCommunesPayload",2),Qi([xe(),Dd(_l.result)],si.prototype,"geoCommunesResult",2),si=Qi([X(Ld)],si);const Md={checkbox:{tagName:"sonic-checkbox"},date:{tagName:"sonic-input",attributes:{type:"date"}},fieldset:{tagName:"sonic-fieldset",nodes:[{libraryKey:"formLayout"}],contentElementSelector:"sonic-form-layout"},managed_file:{tagName:"sonic-input",attributes:{variant:"ghost",type:"file"}},password:{tagName:"sonic-input",attributes:{type:"password"}},radio:{tagName:"sonic-radio"},select:{tagName:"sonic-select"},textarea:{tagName:"sonic-textarea"},textfield:{tagName:"sonic-input",attributes:{type:"text"}},hidden:{tagName:"sonic-input",attributes:{type:"hidden"}},button:{tagName:"sonic-button"},form:{tagName:"sonic-submit",attributes:{onEnterKey:!0}},submit:{tagName:"sonic-submit",attributes:{onClick:!0},contentElementSelector:"sonic-button",nodes:[{libraryKey:"button",attributes:{type:"success"},nodes:[{tagName:"sonic-icon",attributes:{name:"check",slot:"prefix"}}]}]},email:{tagName:"sonic-input",attributes:{type:"email"}},formItemContainer:{tagName:"div",attributes:{class:"form-item-container"}},formLayout:{tagName:"sonic-form-layout"},formActions:{tagName:"sonic-form-actions"},passwordHelper:{tagName:"sonic-password-helper"},sameValueHelper:{tagName:"sonic-same-value-helper"},divider:{tagName:"sonic-divider"}};class Id{async transform(e,s){if(this.sduiDescriptor=e,this.sduiDescriptor.library)for(const r in s.library)this.sduiDescriptor.library[r]=s.library[r];for(const r of s.transforms)this.transformAction(r)}transformAction(e){const s=this.getNodesMatchingPatterns(e.patterns,this.sduiDescriptor);this[e.action](e,s)}getNodesMatchingPatterns(e,s){if(!e)return[];if(!s)return[];const r=s.nodes;if(!r)return[];let i=[],n=0;for(const o of e)for(const c of r)this.nodeMatchesPattern(o,c)&&i.push({parent:s,child:c,index:n}),i=i.concat(this.getNodesMatchingPatterns([o],c)),n++;return i}stringMatchesExpression(e,s){return!s||e&&e.match(s)}nodeMatchesPattern(e,s){const r=e,i=s,n=["libraryKey","innerHTML","prefix","suffix","markup"];for(const d of n)if(!this.stringMatchesExpression(i[d],r[d]))return!1;const o=e.attributes,c=s.attributes;if(o&&!c)return!1;if(o){for(const d in o)if(!c||!this.stringMatchesExpression(c[d],o[d]))return!1}return!0}unwrap(e,s){for(const r of s)r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1),r.child.nodes&&r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),0,...r.child.nodes)}wrap(e,s){const r={...e.ui};r.nodes||(r.nodes=[]);let i=0;for(const o of s)r.nodes?.push(o.child),i>0&&o.parent.nodes?.splice(o.parent.nodes.indexOf(o.child),1),i++;const n=s[0]?.parent.nodes?.indexOf(s[0].child);n&&(s[0].parent.nodes?.splice(n,1),s[0].parent.nodes?.splice(n,0,r))}move(e,s){for(const r of s){r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1);let i=[];e.after&&(i=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor)),e.before&&(i=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor));const n=i[0];n&&n.parent.nodes?.splice(n.parent.nodes.indexOf(n.child)+(e.after?1:0),0,r.child)}}remap(e,s){for(const r of s){const i={...e.ui};i.attributes||(i.attributes={});const n=r.child.attributes;if(n)for(const m in n)Object.prototype.hasOwnProperty.call(i.attributes,"key")||(i.attributes[m]=n[m]);const o=["libraryKey","innerHTML","prefix","suffix","markup"],c=r.child,d=i;for(const m of o)!Object.prototype.hasOwnProperty.call(i,m)&&c[m]&&(d[m]=c[m]);i.nodes||(i.nodes=[]);const g=r.child.nodes;if(g)for(const m of g)i.nodes.push(m);const A=r.parent.nodes?.indexOf(r.child)||-1;A!=-1&&(r.parent.nodes?.splice(A,1),r.parent.nodes?.splice(A,0,i))}}delete(e,s){for(const r of s)r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1)}insert(e,s){const r=e.after?"after":e.before?"before":"in";s=[],e.after?s=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor):e.before?s=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor):e.in&&(s=this.getNodesMatchingPatterns([e.in],this.sduiDescriptor));const i=s[0];i&&(r=="in"?(i.child.nodes||(i.child.nodes=[]),i.child.nodes.push({...e.ui})):i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child)+(r=="after"?1:0),0,{...e.ui}))}}var Nd=Object.defineProperty,Fd=Object.getOwnPropertyDescriptor,oo=(t,e,s,r)=>{for(var i=r>1?void 0:r?Fd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Nd(e,s,i),i};const Rd="sonic-sdui";let Xi=class extends Qa(tr(Q)){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(t){this.props==null&&(this.sduiDescriptor={});{const e=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==e)return;this.sduiDescriptor=e,this.updateContents()}super.willUpdate(t)}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,Md,this.sduiDescriptor.library),this.sduiDescriptor.library=t,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter(t=>t.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const t of this.sduiDescriptor.js)gs.loadJS(t);if(this.sduiDescriptor.css)for(const t of this.sduiDescriptor.css)gs.loadCSS(t)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const e=await(await fetch(this.getAttribute("transformation"))).json();await new Id().transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;const e=await(await fetch(this.getAttribute("library"))).json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);const e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach(s=>this.appendChild(this.parseChild(s)))}parseChild(t){const e=t.tagName||"div";let{element:s,contentElement:r}=this.handleLibrary(t,e);return this.handleAttributes(t,s),s=this.handleMarkup(t,s),r||(r=s),this.handleChildNodes(t,r,s),this.handleInnerHTML(t,r),t.prefix||t.suffix?this.handlePrefixSuffix(t,s):s}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}handleChildNodes(t,e,s){if(t.nodes){const r=t.nodes;for(const i of r){const n=this.parseChild(i);let o=e;i.parentElementSelector&&(o=s.querySelector(i.parentElementSelector)||e),o.shadowRoot?o.shadowRoot.appendChild(n):o.tagName.toLocaleLowerCase()=="template"?o.content.appendChild(n):o.appendChild(n)}}}handleLibrary(t,e){let s,r;if(t.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"});const i=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;i&&(r=s.querySelector(i))}else s=document.createElement(e);return{element:s,contentElement:r}}handleAttributes(t,e){const s=t.attributes;for(const r in s){const i=s[r],n=Kr.isObject(i)?JSON.stringify(i):i;e.setAttribute(r,n)}}handleMarkup(t,e){return t.markup&&(e=document.createElement("div"),e.style.display="contents",e.innerHTML=t.markup),e}handleInnerHTML(t,e){if(t.innerHTML)if(t.innerHTML.indexOf("wording_")!=-1){const s=this.getAncestorAttributeValue("wordingProvider");this.api?.post(s,{labels:[t.innerHTML.substring(8)]}).then(r=>{e&&(e.innerHTML+=r)})}else e&&(e.innerHTML+=t.innerHTML)}};oo([h()],Xi.prototype,"sduiKey",2),oo([h()],Xi.prototype,"messagesKey",2),Xi=oo([X(Rd)],Xi);var jd=Object.defineProperty,zd=Object.getOwnPropertyDescriptor,Sl=(t,e,s,r)=>{for(var i=r>1?void 0:r?zd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&jd(e,s,i),i};let en=class extends tr(Q){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const t=this.listeners;this.listeners=[],t.forEach(e=>{this.publisher.offAssign(e.subscriber)})}parseComposition(t,e){if(t)for(const s in t){const r=t[s];if(typeof r=="string"){const i=r.split("."),n=i.shift();if(!n)continue;let o=ve.get(n);o=Kr.traverse(o,i);const c={publisher:o,subscriber:d=>{e[s]=d}};this.listeners.push(c),o.onAssign(c.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const i=new Nr({},e);e._proxies_.set(s,i);const n={publisher:i,subscriber:o=>{e[s]=o}};this.listeners.push(n),i.onAssign(n.subscriber),this.parseComposition(r,i)}}}render(){return R`<slot></slot>`}};en.styles=[Z`
1366
1395
  :host {
1367
1396
  display: contents;
1368
1397
  }
1369
- `],gl([h({type:Object})],Zi.prototype,"composition",1),Zi=gl([Q("sonic-mix")],Zi);var Rd=Object.defineProperty,jd=Object.getOwnPropertyDescriptor,xr=(t,e,s,i)=>{for(var r=i>1?void 0:i?jd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Rd(e,s,r),r};let Is=class extends J{constructor(){super(...arguments),this.inputProvider="",this.outputProvider="",this.formDataProvider="",this.expression="",this.outputSchema=null,this.handle=null}connectedCallback(){super.connectedCallback(),this.restart()}disconnectedCallback(){this.handle?.stop(),this.handle=null,super.disconnectedCallback()}updated(t){(t.has("expression")||t.has("inputProvider")||t.has("outputProvider")||t.has("formDataProvider")||t.has("outputSchema"))&&this.restart()}restart(){if(this.handle?.stop(),this.handle=null,!this.isConnected||!this.inputProvider||!this.outputProvider||!this.expression?.trim())return;const t=this.expression,e=this.outputSchema;this.handle=sh({inputs:{input:new ks(this.inputProvider)},output:new ks(this.outputProvider),variables:this.formDataProvider?new ks(this.formDataProvider):void 0,compute:async({input:s},i)=>{const r=ah(t),n={...i??{},input:s};let o;try{o=await r.evaluate({},n)}catch(c){const d=c instanceof Error?c.message:String(c);throw new Error(`[sonic-jsonata] Évaluation : ${d}`)}return lh(o,e),o}})}render(){return R`<slot></slot>`}};Is.styles=[X`
1398
+ `],Sl([h({type:Object})],en.prototype,"composition",1),en=Sl([X("sonic-mix")],en);var Ud=Object.defineProperty,qd=Object.getOwnPropertyDescriptor,xr=(t,e,s,r)=>{for(var i=r>1?void 0:r?qd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ud(e,s,i),i};let Is=class extends Q{constructor(){super(...arguments),this.inputProvider="",this.outputProvider="",this.formDataProvider="",this.expression="",this.outputSchema=null,this.handle=null}connectedCallback(){super.connectedCallback(),this.restart()}disconnectedCallback(){this.handle?.stop(),this.handle=null,super.disconnectedCallback()}updated(t){(t.has("expression")||t.has("inputProvider")||t.has("outputProvider")||t.has("formDataProvider")||t.has("outputSchema"))&&this.restart()}restart(){if(this.handle?.stop(),this.handle=null,!this.isConnected||!this.inputProvider||!this.outputProvider||!this.expression?.trim())return;const t=this.expression,e=this.outputSchema;this.handle=oh({inputs:{input:new Cs(this.inputProvider)},output:new Cs(this.outputProvider),variables:this.formDataProvider?new Cs(this.formDataProvider):void 0,compute:async({input:s},r)=>{const i=uh(t),n={...r??{},input:s};let o;try{o=await i.evaluate({},n)}catch(c){const d=c instanceof Error?c.message:String(c);throw new Error(`[sonic-jsonata] Évaluation : ${d}`)}return dh(o,e),o}})}render(){return R`<slot></slot>`}};Is.styles=[Z`
1370
1399
  :host {
1371
1400
  display: contents;
1372
1401
  }
1373
- `],xr([h({type:String})],Is.prototype,"inputProvider",2),xr([h({type:String})],Is.prototype,"outputProvider",2),xr([h({type:String})],Is.prototype,"formDataProvider",2),xr([h({type:String})],Is.prototype,"expression",2),xr([h({type:Object})],Is.prototype,"outputSchema",2),Is=xr([Q("sonic-jsonata")],Is);var zd=Object.getOwnPropertyDescriptor,Ud=(t,e,s,i)=>{for(var r=i>1?void 0:i?zd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const qd="sonic-value";let ml=class extends tr(J){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return typeof this.props=="object"||this.props===void 0?R`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:R`${He(this.props.toString())}<slot name="prefix"></slot><slot></slot
1374
- ><slot name="suffix"></slot>`}};ml=Ud([Q(qd)],ml);var Bd=Object.defineProperty,Hd=Object.getOwnPropertyDescriptor,no=(t,e,s,i)=>{for(var r=i>1?void 0:i?Hd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Bd(e,s,r),r};const Vd="sonic-t";let Ji=class extends J{render(){return this.key?R`${Tc(this.key,this.unsafeHTML)}`:se}};no([h({type:String})],Ji.prototype,"key",2),no([h({type:Boolean})],Ji.prototype,"unsafeHTML",2),Ji=no([Q(Vd)],Ji);var Wd=Object.defineProperty,Kd=Object.getOwnPropertyDescriptor,si=(t,e,s,i)=>{for(var r=i>1?void 0:i?Kd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Wd(e,s,r),r};const Gd="sonic-badge";let sr=class extends J{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return R`
1402
+ `],xr([h({type:String})],Is.prototype,"inputProvider",2),xr([h({type:String})],Is.prototype,"outputProvider",2),xr([h({type:String})],Is.prototype,"formDataProvider",2),xr([h({type:String})],Is.prototype,"expression",2),xr([h({type:Object})],Is.prototype,"outputSchema",2),Is=xr([X("sonic-jsonata")],Is);var Hd=Object.getOwnPropertyDescriptor,Bd=(t,e,s,r)=>{for(var i=r>1?void 0:r?Hd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Vd="sonic-value";let Pl=class extends tr(Q){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return typeof this.props=="object"||this.props===void 0?R`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:R`${Be(this.props.toString())}<slot name="prefix"></slot><slot></slot
1403
+ ><slot name="suffix"></slot>`}};Pl=Bd([X(Vd)],Pl);var Wd=Object.defineProperty,Kd=Object.getOwnPropertyDescriptor,ao=(t,e,s,r)=>{for(var i=r>1?void 0:r?Kd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Wd(e,s,i),i};const Gd="sonic-t";let tn=class extends Q{render(){return this.key?R`${Nc(this.key,this.unsafeHTML)}`:ee}};ao([h({type:String})],tn.prototype,"key",2),ao([h({type:Boolean})],tn.prototype,"unsafeHTML",2),tn=ao([X(Gd)],tn);var Yd=Object.defineProperty,Zd=Object.getOwnPropertyDescriptor,ri=(t,e,s,r)=>{for(var i=r>1?void 0:r?Zd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Yd(e,s,i),i};const Jd="sonic-badge";let sr=class extends Q{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return R`
1375
1404
  <slot name="prefix"></slot>
1376
1405
  <slot></slot>
1377
1406
  <slot name="suffix"></slot>
1378
- `}};sr.styles=[rs,za,X`
1407
+ `}};sr.styles=[Jt,Ba,Ha,Z`
1379
1408
  :host {
1380
1409
  --sc-_gap: 0.3em;
1381
1410
  --sc-_py: 0.35em;
@@ -1462,17 +1491,17 @@
1462
1491
  slot[name="prefix"] {
1463
1492
  flex-shrink: 0;
1464
1493
  }
1465
- `],si([h({type:String,reflect:!0})],sr.prototype,"type",2),si([h({type:String,reflect:!0})],sr.prototype,"variant",2),si([h({type:String,reflect:!0})],sr.prototype,"size",2),si([h({type:Boolean,reflect:!0})],sr.prototype,"ellipsis",2),sr=si([Q(Gd)],sr);class Yd{static fixBlankLink(e){const i=typeof require>"u"||typeof process!="object"?null:require("electron");e.target=="_blank"&&e.addEventListener("click",()=>{i?.shell.openExternal(e.href)})}}var Zd=Object.defineProperty,Jd=Object.getOwnPropertyDescriptor,Ar=(t,e,s,i)=>{for(var r=i>1?void 0:i?Jd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Zd(e,s,r),r};const Qd="sonic-link";let Ns=class extends J{constructor(){super(...arguments),this.href="",this._location="",this.ariaLabel=null,this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,ht.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(ht.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){ht.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,Yd.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),ht.changeFromComponent(this)}get blankRel(){return this.target==="_blank"?"noopener noreferrer":void 0}render(){return this.href?R`
1494
+ `],ri([h({type:String,reflect:!0})],sr.prototype,"type",2),ri([h({type:String,reflect:!0})],sr.prototype,"variant",2),ri([h({type:String,reflect:!0})],sr.prototype,"size",2),ri([h({type:Boolean,reflect:!0})],sr.prototype,"ellipsis",2),sr=ri([X(Jd)],sr);class Qd{static fixBlankLink(e){const r=typeof require>"u"||typeof process!="object"?null:require("electron");e.target=="_blank"&&e.addEventListener("click",()=>{r?.shell.openExternal(e.href)})}}var Xd=Object.defineProperty,ep=Object.getOwnPropertyDescriptor,Ar=(t,e,s,r)=>{for(var i=r>1?void 0:r?ep(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Xd(e,s,i),i};const tp="sonic-link";let Ns=class extends Q{constructor(){super(...arguments),this.href="",this._location="",this.ariaLabel=null,this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,dt.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(dt.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){dt.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,Qd.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),dt.changeFromComponent(this)}get blankRel(){return this.target==="_blank"?"noopener noreferrer":void 0}render(){return this.href?R`
1466
1495
  <a
1467
1496
  href="${this.href}"
1468
- aria-label=${this.ariaLabel||se}
1469
- target=${te(this.target)}
1470
- rel=${te(this.blankRel)}
1497
+ aria-label=${this.ariaLabel||ee}
1498
+ target=${se(this.target)}
1499
+ rel=${se(this.blankRel)}
1471
1500
  @click=${this.pushState?this.handlePushState:null}
1472
1501
  >
1473
1502
  <slot></slot>
1474
1503
  </a>
1475
- `:R`<slot></slot>`}};Ns.styles=[X`
1504
+ `:R`<slot></slot>`}};Ns.styles=[Z`
1476
1505
  a {
1477
1506
  color: inherit;
1478
1507
  text-decoration: inherit;
@@ -1492,27 +1521,21 @@
1492
1521
  outline-offset: 2px;
1493
1522
  border-radius: 2px;
1494
1523
  }
1495
- `],Ar([h({type:String})],Ns.prototype,"href",2),Ar([h({type:String,attribute:"data-aria-label"})],Ns.prototype,"ariaLabel",2),Ar([h({type:String})],Ns.prototype,"autoActive",2),Ar([h({type:String})],Ns.prototype,"target",1),Ar([h({type:Boolean,reflect:!0})],Ns.prototype,"pushState",2),Ns=Ar([Q(Qd)],Ns);var Xd=Object.defineProperty,ep=Object.getOwnPropertyDescriptor,Cr=(t,e,s,i)=>{for(var r=i>1?void 0:i?ep(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Xd(e,s,r),r};const tp="sonic-progress";let Fs=class extends J{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return R`
1496
- <progress value=${te(this.value)} max=${this.max}></progress>
1524
+ `],Ar([h({type:String})],Ns.prototype,"href",2),Ar([h({type:String,attribute:"data-aria-label"})],Ns.prototype,"ariaLabel",2),Ar([h({type:String})],Ns.prototype,"autoActive",2),Ar([h({type:String})],Ns.prototype,"target",1),Ar([h({type:Boolean,reflect:!0})],Ns.prototype,"pushState",2),Ns=Ar([X(tp)],Ns);var sp=Object.defineProperty,rp=Object.getOwnPropertyDescriptor,Cr=(t,e,s,r)=>{for(var i=r>1?void 0:r?rp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&sp(e,s,i),i};const ip="sonic-progress";let Fs=class extends Q{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return R`
1525
+ <progress value=${se(this.value)} max=${this.max}></progress>
1497
1526
  <div class="slot-container">
1498
1527
  <slot></slot>
1499
1528
  <slot name="remaining"></slot>
1500
1529
  </div>
1501
- `}};Fs.styles=[rs,X`
1530
+ `}};Fs.styles=[Jt,qi,Ha,Z`
1502
1531
  :host {
1503
- --sc-progress-bg: var(
1504
- --sc-input-bg,
1505
- var(--sc-base-100, rgba(0, 0, 0, 0.07))
1506
- );
1507
- --sc-progress-color: var(--sc-base-content, #000);
1532
+ --sc-_rounded: var(--sc-rounded-lg);
1533
+ --sc-_bg: var(--sc-base-50, rgba(0, 0, 0, 0.07));
1508
1534
  --sc-progress-height: 0.6em;
1509
- --sc-progress-fs: var(--sc-_fs, 1rem);
1510
1535
  --sc-progress-fw: 500;
1511
- --sc-progress-rounded: var(--sc-rounded-lg);
1512
1536
  display: block;
1513
1537
  line-height: 1.2;
1514
1538
  font-weight: var(--sc-progress-fw);
1515
- font-size: var(--sc-progress-fs);
1516
1539
  }
1517
1540
 
1518
1541
  progress {
@@ -1524,37 +1547,36 @@
1524
1547
  overflow: hidden;
1525
1548
  border: none;
1526
1549
  height: var(--sc-progress-height);
1527
- border-radius: var(--sc-progress-rounded);
1528
- background-color: var(--sc-progress-bg);
1529
- color: var(--sc-progress-color);
1550
+ border-radius: var(--sc-_rounded);
1551
+ background-color: var(--sc-_bg);
1530
1552
  }
1531
1553
  progress::-moz-progress-bar {
1532
- background-color: var(--sc-progress-color);
1533
- border-radius: var(--sc-progress-rounded);
1554
+ background-color: var(--sc-_color);
1555
+ border-radius: var(--sc-_rounded);
1534
1556
  }
1535
1557
 
1536
1558
  progress:not([value])::-moz-progress-bar {
1537
- background-color: var(--sc-progress-bg);
1559
+ background-color: var(--sc-_bg);
1538
1560
  }
1539
1561
 
1540
1562
  progress::-webkit-progress-bar {
1541
- background-color: var(--sc-progress-bg);
1563
+ background-color: var(--sc-_bg);
1542
1564
  }
1543
1565
  progress::-webkit-progress-value {
1544
- background-color: var(--sc-progress-color);
1545
- border-radius: var(--sc-progress-rounded);
1566
+ background-color: var(--sc-_color);
1567
+ border-radius: var(--sc-_rounded);
1546
1568
  }
1547
1569
 
1548
1570
  /* Indeterminate */
1549
1571
  progress:indeterminate:after {
1550
- background-color: var(--sc-progress-color);
1572
+ background-color: var(--sc-_color);
1551
1573
  content: "";
1552
1574
  position: absolute;
1553
1575
  top: 0;
1554
1576
  bottom: 0;
1555
1577
  left: -40%;
1556
1578
  width: 33.333333%;
1557
- border-radius: var(--sc-progress-rounded);
1579
+ border-radius: var(--sc-_rounded);
1558
1580
  animation: progress-loading 3s infinite ease-in-out;
1559
1581
  }
1560
1582
 
@@ -1564,33 +1586,6 @@
1564
1586
  }
1565
1587
  }
1566
1588
 
1567
- /* COLOR TYPES */
1568
- :host([type="warning"]) {
1569
- --sc-progress-color: var(--sc-warning, var(--sc-base-content, #000));
1570
- }
1571
- :host([type="danger"]) {
1572
- --sc-progress-color: var(--sc-danger, var(--sc-base-content, #000));
1573
- }
1574
- :host([type="info"]) {
1575
- --sc-progress-color: var(--sc-info, var(--sc-base-content, #000));
1576
- }
1577
- :host([type="success"]) {
1578
- --sc-progress-color: var(--sc-success, var(--sc-base-content, #000));
1579
- }
1580
-
1581
- :host([type="invert"]) {
1582
- --sc-progress-bg: rgba(190, 190, 190, 0.125);
1583
- --sc-progress-color: var(--sc-base, #fff);
1584
- }
1585
-
1586
- :host([invert]) {
1587
- --sc-progress-bg: rgba(190, 190, 190, 0.125);
1588
- }
1589
-
1590
- :host([type="default"][invert]) {
1591
- --sc-progress-color: var(--sc-base, #fff);
1592
- }
1593
-
1594
1589
  slot[name="remaining"] {
1595
1590
  font-weight: var(--sc-font-weight-base, 400);
1596
1591
  font-size: 0.85em;
@@ -1601,7 +1596,7 @@
1601
1596
  }
1602
1597
 
1603
1598
  slot:not([name]) {
1604
- color: var(--sc-progress-color);
1599
+ color: var(--sc-_color);
1605
1600
  }
1606
1601
 
1607
1602
  .slot-container {
@@ -1610,7 +1605,7 @@
1610
1605
  gap: 0.5em;
1611
1606
  margin-top: 0.15em;
1612
1607
  }
1613
- `],Cr([h({type:Number})],Fs.prototype,"value",2),Cr([h({type:Number})],Fs.prototype,"max",2),Cr([h({type:Boolean})],Fs.prototype,"invert",2),Cr([h({type:String,reflect:!0})],Fs.prototype,"type",2),Cr([h({type:String,reflect:!0})],Fs.prototype,"size",2),Fs=Cr([Q(tp)],Fs);const sp=X`
1608
+ `],Cr([h({type:Number})],Fs.prototype,"value",2),Cr([h({type:Number})],Fs.prototype,"max",2),Cr([h({type:Boolean,reflect:!0,attribute:"invert"})],Fs.prototype,"invert",2),Cr([h({type:String,reflect:!0})],Fs.prototype,"type",2),Cr([h({type:String,reflect:!0})],Fs.prototype,"size",2),Fs=Cr([X(ip)],Fs);const np=Z`
1614
1609
  .password-toggle {
1615
1610
  color: var(--sc-input-c);
1616
1611
  font-size: var(--sc-input-fs);
@@ -1621,7 +1616,7 @@
1621
1616
  :host([inlineContent]) .has-suffix .password-toggle {
1622
1617
  margin-right: 0;
1623
1618
  }
1624
- `,Qi=X`
1619
+ `,sn=Z`
1625
1620
  :host {
1626
1621
  --sc-label-fs: var(--sc-_fs, 1rem);
1627
1622
  --sc-label-fw: var(--sc-label-font-weight, 500);
@@ -1635,14 +1630,14 @@
1635
1630
  margin-bottom: 0.22em;
1636
1631
  display: block;
1637
1632
  }
1638
- `,Xi=X`
1633
+ `,rn=Z`
1639
1634
  .form-description {
1640
1635
  color: var(--sc-base-400, var(--sc-base-content, #000));
1641
1636
  font-size: 0.85em;
1642
1637
  margin-top: 0.2em;
1643
1638
  display: block;
1644
1639
  }
1645
- `,oo=X`
1640
+ `,lo=Z`
1646
1641
  * {
1647
1642
  box-sizing: border-box;
1648
1643
  }
@@ -1997,25 +1992,21 @@
1997
1992
  --sc-input-addon-bg: var(--sc-primary, var(--sc-base-content, #000));
1998
1993
  --sc-input-addon-color: var(--sc-primary-content, var(--sc-base, #fff));
1999
1994
  }
2000
- `;/**
2001
- * @license
2002
- * Copyright 2018 Google LLC
2003
- * SPDX-License-Identifier: BSD-3-Clause
2004
- */const ao=Es(class extends gr{constructor(t){if(super(t),t.type!==Ys.ATTRIBUTE||t.name!=="class"||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((i=>i!==""))));for(const i in e)e[i]&&!this.nt?.has(i)&&this.st.add(i);return this.render(e)}const s=t.element.classList;for(const i of this.st)i in e||(s.remove(i),this.st.delete(i));for(const i in e){const r=!!e[i];r===this.st.has(i)||this.nt?.has(i)||(r?(s.add(i),this.st.add(i)):(s.remove(i),this.st.delete(i)))}return Ft}});var rp=Object.defineProperty,ip=Object.getOwnPropertyDescriptor,qe=(t,e,s,i)=>{for(var r=i>1?void 0:i?ip(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&rp(e,s,r),r};const np="sonic-input";let Fe=class extends qi(br(J)){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.autoActive=!1,this.active=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs")||void 0,this.sameValueAsHandle=e=>this.pattern=this.escapeRegExp(e);const t=this.getFormPublisher();if(!t||!this.sameValueAsName)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}this.type=="password"&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}willUpdate(t){this.hasSlotOrProps(),this.autoActive&&t.has("value")&&(this.active=!!this.value),super.willUpdate(t)}setSelectionRange(t,e){this.input.setSelectionRange(t,e)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}inlineContentFocus(){!this.inlineContent||this.disableInlineContentFocus||this.input?.focus()}handleChange(t){if(!this.hasAttribute("inputDelayMs")){super.handleChange(t);return}this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout(()=>super.handleChange(t),parseInt(this.getAttribute("inputDelayMs")||"0"))}togglePasswordVisibility(t){t.preventDefault(),t.stopPropagation(),this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return R`
1995
+ `;var op=Object.defineProperty,ap=Object.getOwnPropertyDescriptor,qe=(t,e,s,r)=>{for(var i=r>1?void 0:r?ap(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&op(e,s,i),i};const lp="sonic-input";let Fe=class extends Bi(br(Q)){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.autoActive=!1,this.active=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs")||void 0,this.sameValueAsHandle=e=>this.pattern=this.escapeRegExp(e);const t=this.getFormPublisher();if(!t||!this.sameValueAsName)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}this.type=="password"&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}willUpdate(t){this.hasSlotOrProps(),this.autoActive&&t.has("value")&&(this.active=!!this.value),super.willUpdate(t)}setSelectionRange(t,e){this.input.setSelectionRange(t,e)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}inlineContentFocus(){!this.inlineContent||this.disableInlineContentFocus||this.input?.focus()}handleChange(t){if(!this.hasAttribute("inputDelayMs")){super.handleChange(t);return}this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout(()=>super.handleChange(t),parseInt(this.getAttribute("inputDelayMs")||"0"))}togglePasswordVisibility(t){t.preventDefault(),t.stopPropagation(),this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return R`
2005
1996
  <label for="${this.id||"form-element"}" class="${this.hasLabel?"form-label":"hidden"}"
2006
- >${this.label?He(this.label):""}<slot
1997
+ >${this.label?Be(this.label):""}<slot
2007
1998
  name="label"
2008
1999
  @slotchange=${this.hasSlotOrProps}
2009
2000
  ></slot
2010
2001
  ></label>
2011
2002
 
2012
- <div @click=${this.inlineContentFocus} class="form-control ${ao(t)}">
2003
+ <div @click=${this.inlineContentFocus} class="form-control ${Ki(t)}">
2013
2004
  <div part="content" class="${this.inlineContent?"form-element form-element-wrapper":"contents"}">
2014
2005
  <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
2015
2006
  <input
2016
2007
  data-form-element
2017
2008
  part="input"
2018
- id=${te(this.id||"form-element")}
2009
+ id=${se(this.id||"form-element")}
2019
2010
  part="input"
2020
2011
  class="form-element input"
2021
2012
  @input=${this.handleChange}
@@ -2024,21 +2015,21 @@
2024
2015
  ?disabled=${this.disabled}
2025
2016
  ?readonly=${this.readonly}
2026
2017
  ?autofocus=${this.autofocus}
2027
- list=${te(this.list)}
2028
- tabindex=${te(this.tabindex)}
2029
- pattern=${te(this.pattern)}
2030
- min=${te(this.min)}
2031
- max=${te(this.max)}
2032
- step=${te(this.step)}
2033
- inputmode=${te(this.inputmode)}
2034
- src=${te(this.src)}
2035
- minlength=${te(this.minlength)}
2036
- maxlength=${te(this.maxlength)}
2037
- placeholder=${te(this.placeholder)}
2018
+ list=${se(this.list)}
2019
+ tabindex=${se(this.tabindex)}
2020
+ pattern=${se(this.pattern)}
2021
+ min=${se(this.min)}
2022
+ max=${se(this.max)}
2023
+ step=${se(this.step)}
2024
+ inputmode=${se(this.inputmode)}
2025
+ src=${se(this.src)}
2026
+ minlength=${se(this.minlength)}
2027
+ maxlength=${se(this.maxlength)}
2028
+ placeholder=${se(this.placeholder)}
2038
2029
  ?required=${this.required}
2039
- autocomplete=${te(this.autocomplete)}
2040
- aria-label=${te(this.ariaLabel)}
2041
- aria-labelledby=${te(this.ariaLabelledby)}
2030
+ autocomplete=${se(this.autocomplete)}
2031
+ aria-label=${se(this.ariaLabel)}
2032
+ aria-labelledby=${se(this.ariaLabelledby)}
2042
2033
  .name=${this.name}
2043
2034
  .value=${this.value}
2044
2035
  />
@@ -2046,7 +2037,7 @@
2046
2037
  shape="circle"
2047
2038
  class="password-toggle"
2048
2039
  @click=${this.togglePasswordVisibility}
2049
- .ariaLabel=${zi(this.isPassword?ws.showPassword:ws.hidePassword)}
2040
+ .ariaLabel=${Qr(this.isPassword?is.showPassword:is.hidePassword)}
2050
2041
  variant="unstyled"
2051
2042
  >
2052
2043
  <sonic-icon
@@ -2063,10 +2054,10 @@
2063
2054
  name="description"
2064
2055
  @slotchange=${this.hasSlotOrProps}
2065
2056
  class="${this.hasDescription?"form-description":"hidden"}"
2066
- >${this.description?R`${He(this.description)}`:se}</slot>
2057
+ >${this.description?R`${Be(this.description)}`:ee}</slot>
2067
2058
  <slot name="list"></slot>
2068
2059
  </div>
2069
- `}};Fe.styles=[rs,oo,Qi,Xi,sp,X`
2060
+ `}};Fe.styles=[Jt,lo,sn,rn,np,Z`
2070
2061
  :host([type="hidden"]) {
2071
2062
  appearance: none !important;
2072
2063
  display: none !important;
@@ -2074,7 +2065,7 @@
2074
2065
  :host > .form-control {
2075
2066
  position: relative;
2076
2067
  }
2077
- `],qe([h({type:String,reflect:!0})],Fe.prototype,"size",2),qe([h({type:String})],Fe.prototype,"inputmode",2),qe([h({type:String})],Fe.prototype,"list",2),qe([h({type:String})],Fe.prototype,"placeholder",2),qe([h({type:String})],Fe.prototype,"pattern",2),qe([h({type:String})],Fe.prototype,"min",2),qe([h({type:String})],Fe.prototype,"max",2),qe([h({type:Boolean,reflect:!0})],Fe.prototype,"readonly",2),qe([h({type:Number})],Fe.prototype,"step",2),qe([h({type:Number})],Fe.prototype,"minlength",2),qe([h({type:Number})],Fe.prototype,"maxlength",2),qe([h({type:String})],Fe.prototype,"src",2),qe([h({type:Boolean,reflect:!0})],Fe.prototype,"inlineContent",2),qe([h({type:Boolean})],Fe.prototype,"disableInlineContentFocus",2),qe([h({type:Boolean})],Fe.prototype,"showPasswordToggle",2),qe([h({type:Boolean})],Fe.prototype,"autoActive",2),qe([h({type:Boolean,reflect:!0})],Fe.prototype,"active",2),qe([mt({slot:"label",flatten:!0})],Fe.prototype,"slotLabelNodes",2),qe([mt({slot:"description",flatten:!0})],Fe.prototype,"slotDescriptionNodes",2),qe([mt({slot:"suffix",flatten:!0})],Fe.prototype,"slotSuffixNodes",2),qe([mt({slot:"prefix",flatten:!0})],Fe.prototype,"slotPrefixNodes",2),qe([fs("input")],Fe.prototype,"input",2),qe([Ae()],Fe.prototype,"hasDescription",2),qe([Ae()],Fe.prototype,"hasLabel",2),qe([Ae()],Fe.prototype,"hasSuffix",2),qe([Ae()],Fe.prototype,"hasPrefix",2),qe([Ae()],Fe.prototype,"isPassword",2),Fe=qe([Q(np)],Fe);const op=["top","right","bottom","left"],ap=["start","center","end"];function bl(t,e,s){const[i,r]=(t??"").split("-");return{side:op.includes(i)?i:e,align:ap.includes(r)?r:s}}const vl="popover"in HTMLElement.prototype,lp={top:"bottom",bottom:"top",left:"right",right:"left"};function yl(t,e=0){const s=ze.getScrollableAncestor(t)?.getBoundingClientRect();return{minX:Math.max(0,s?.left||0)+e,minY:Math.max(0,s?.top||0)+e,maxX:Math.min(window.innerWidth,s?.right||window.innerWidth)-e,maxY:Math.min(window.innerHeight,s?.bottom||window.innerHeight)-e}}function en(t,e,s,i){return i==="start"?t:i==="end"?t+e-s:t+(e-s)/2}function wl(t,e,s,i,r){switch(s){case"top":return{x:en(t.left,t.width,e.width,i),y:t.top-e.height-r};case"bottom":return{x:en(t.left,t.width,e.width,i),y:t.bottom+r};case"left":return{x:t.left-e.width-r,y:en(t.top,t.height,e.height,i)};case"right":return{x:t.right+r,y:en(t.top,t.height,e.height,i)};default:return{x:t.left,y:t.top}}}function cp(t,e,s,i){switch(s){case"top":return t.y<i.minY;case"bottom":return t.y+e.height>i.maxY;case"left":return t.x<i.minX;case"right":return t.x+e.width>i.maxX;default:return!1}}function _l({anchor:t,floating:e,side:s,align:i="center",gap:r=0,bounds:n}){let o=s,c=wl(t,e,o,i,r);return cp(c,e,o,n)&&(o=lp[o],c=wl(t,e,o,i,r)),{side:o,x:Math.min(Math.max(c.x,n.minX),n.maxX-e.width),y:Math.min(Math.max(c.y,n.minY),n.maxY-e.height)}}function Sl(t){let e=0;const s=()=>{t(),e=requestAnimationFrame(s)};return s(),()=>cancelAnimationFrame(e)}const Pl=X`
2068
+ `],qe([h({type:String,reflect:!0})],Fe.prototype,"size",2),qe([h({type:String})],Fe.prototype,"inputmode",2),qe([h({type:String})],Fe.prototype,"list",2),qe([h({type:String})],Fe.prototype,"placeholder",2),qe([h({type:String})],Fe.prototype,"pattern",2),qe([h({type:String})],Fe.prototype,"min",2),qe([h({type:String})],Fe.prototype,"max",2),qe([h({type:Boolean,reflect:!0})],Fe.prototype,"readonly",2),qe([h({type:Number})],Fe.prototype,"step",2),qe([h({type:Number})],Fe.prototype,"minlength",2),qe([h({type:Number})],Fe.prototype,"maxlength",2),qe([h({type:String})],Fe.prototype,"src",2),qe([h({type:Boolean,reflect:!0})],Fe.prototype,"inlineContent",2),qe([h({type:Boolean})],Fe.prototype,"disableInlineContentFocus",2),qe([h({type:Boolean})],Fe.prototype,"showPasswordToggle",2),qe([h({type:Boolean})],Fe.prototype,"autoActive",2),qe([h({type:Boolean,reflect:!0})],Fe.prototype,"active",2),qe([bt({slot:"label",flatten:!0})],Fe.prototype,"slotLabelNodes",2),qe([bt({slot:"description",flatten:!0})],Fe.prototype,"slotDescriptionNodes",2),qe([bt({slot:"suffix",flatten:!0})],Fe.prototype,"slotSuffixNodes",2),qe([bt({slot:"prefix",flatten:!0})],Fe.prototype,"slotPrefixNodes",2),qe([$s("input")],Fe.prototype,"input",2),qe([xe()],Fe.prototype,"hasDescription",2),qe([xe()],Fe.prototype,"hasLabel",2),qe([xe()],Fe.prototype,"hasSuffix",2),qe([xe()],Fe.prototype,"hasPrefix",2),qe([xe()],Fe.prototype,"isPassword",2),Fe=qe([X(lp)],Fe);const cp=["top","right","bottom","left"],hp=["start","center","end"];function xl(t,e,s){const[r,i]=(t??"").split("-");return{side:cp.includes(r)?r:e,align:hp.includes(i)?i:s}}const Al="popover"in HTMLElement.prototype,up={top:"bottom",bottom:"top",left:"right",right:"left"};function Cl(t,e=0){const s=ze.getScrollableAncestor(t)?.getBoundingClientRect();return{minX:Math.max(0,s?.left||0)+e,minY:Math.max(0,s?.top||0)+e,maxX:Math.min(window.innerWidth,s?.right||window.innerWidth)-e,maxY:Math.min(window.innerHeight,s?.bottom||window.innerHeight)-e}}function nn(t,e,s,r){return r==="start"?t:r==="end"?t+e-s:t+(e-s)/2}function kl(t,e,s,r,i){switch(s){case"top":return{x:nn(t.left,t.width,e.width,r),y:t.top-e.height-i};case"bottom":return{x:nn(t.left,t.width,e.width,r),y:t.bottom+i};case"left":return{x:t.left-e.width-i,y:nn(t.top,t.height,e.height,r)};case"right":return{x:t.right+i,y:nn(t.top,t.height,e.height,r)};default:return{x:t.left,y:t.top}}}function dp(t,e,s,r){switch(s){case"top":return t.y<r.minY;case"bottom":return t.y+e.height>r.maxY;case"left":return t.x<r.minX;case"right":return t.x+e.width>r.maxX;default:return!1}}function $l({anchor:t,floating:e,side:s,align:r="center",gap:i=0,bounds:n}){let o=s,c=kl(t,e,o,r,i);return dp(c,e,o,n)&&(o=up[o],c=kl(t,e,o,r,i)),{side:o,x:Math.min(Math.max(c.x,n.minX),n.maxX-e.width),y:Math.min(Math.max(c.y,n.minY),n.maxY-e.height)}}function Dl(t){let e=0;const s=()=>{t(),e=requestAnimationFrame(s)};return s(),()=>cancelAnimationFrame(e)}const co=Z`
2078
2069
  /*OMBRE*/
2079
2070
  :host([shadow]) .shadowable,
2080
2071
  :host([shadow="md"]) .shadowable,
@@ -2093,7 +2084,7 @@
2093
2084
  :host([shadow="none"]) .shadowable {
2094
2085
  box-shadow: none;
2095
2086
  }
2096
- `;var hp=Object.defineProperty,up=Object.getOwnPropertyDescriptor,ns=(t,e,s,i)=>{for(var r=i>1?void 0:i?up(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&hp(e,s,r),r};let xl=!1;function dp(t){return t.includes(" ")?(xl||(xl=!0,console.warn(`[concorde] sonic-pop placement="${t}" est déprécié, utiliser placement="${t.replace(" ","-")}".`)),t.replace(" ","-")):t}const pp="sonic-pop";let Le=class extends J{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.pendingShow=!1,this.ancestorsHavingZIndex=new Set}toggle(t){if(this.open&&this.noToggle)return;const e=t;t.type=="keydown"&&(e.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=t.target),this.open?this.hide():this.show())}show(){if(!this.popContent){this.pendingShow=!0,this.updateComplete.then(()=>{this.pendingShow&&this.show()});return}this.pendingShow=!1,!this.open&&(Le.supportsPopover||this.setMaxZindex(),clearTimeout(this.hideDisplayTimeout),this.popContent?.style?.removeProperty("display"),Le.supportsPopover&&!this.popContent.matches(":popover-open")&&this.popContent.showPopover(),this.open=!0,Le.pops.delete(this)&&Le.pops.add(this),this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.stopPositioning&&(this.lastContentX=0,this.lastContentY=0,this.stopPositioning=Sl(()=>this.computePosition(this.placement))),this.dispatchEvent(new CustomEvent("show")))}hide(){if(this.pendingShow=!1,!this.popContent){this.dispatchEvent(new CustomEvent("hide"));return}Le.supportsPopover||this.resetZindexes(),Le.supportsPopover&&this.popContent?.matches(":popover-open")&&this.popContent.hidePopover(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.stopPositionLoop(),Le.supportsPopover||this.hideContentAfterTransition(),this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),this.dispatchEvent(new CustomEvent("hide"))}stopPositionLoop(){this.stopPositioning?.(),this.stopPositioning=void 0}hideContentAfterTransition(){clearTimeout(this.hideDisplayTimeout);const t=parseFloat(getComputedStyle(this.popContent).transitionDuration)*1e3;this.hideDisplayTimeout=setTimeout(()=>{this.open||(this.popContent.style.display="none")},t||0)}setMaxZindex(){ze.everyAncestors(this,t=>{const e=t;if(!e.className)return!0;if([...e.classList].includes("@container")){const s=e.style;s.zIndex="999999999";const i=getComputedStyle(e);return i.position!=="relative"&&i.position!=="absolute"&&(s.position="relative"),this.ancestorsHavingZIndex.add(t),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(t=>{t.style.removeProperty("position"),t.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(t){const e=t.composedPath(),s=e[0];Le.pops.forEach(i=>{if(!i.open)return;const r=e.includes(i),n=e.includes(i.querySelector('[slot="content"]')),o=ze.getAncestorAttributeValue(s,"data-on-select")==="keep";t.type=="pointerdown"&&r||t.type=="click"&&(r&&o||!n)||i.hide()})}connectedCallback(){super.connectedCallback(),Le.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",Le._handleKeyDown,!0)),Le.pops.add(this)}firstUpdated(t){super.firstUpdated(t),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),this.stopPositionLoop(),clearTimeout(this.hideDisplayTimeout),this.open&&(Le.supportsPopover||this.resetZindexes(),this.open=!1,this.triggerElement=null,this.popContent?.style.setProperty("display","none")),super.disconnectedCallback(),Le.pops.delete(this),Le.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",Le._handleKeyDown,!0))}computePosition(t){const{side:e,align:s}=bl(dp(t),"bottom","start"),i=this.popContent.getBoundingClientRect(),{x:r,y:n}=_l({anchor:this.getBoundingClientRect(),floating:i,side:e,align:s,bounds:yl(this.popContent,5)});this.lastContentX+=r-i.x,this.lastContentY+=n-i.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}static _handleKeyDown(t){if(t.key!=="Escape")return;const e=[...Le.pops].reverse().find(s=>s.open);e&&(t.stopPropagation(),e.hide())}render(){return R`
2087
+ `;var pp=Object.defineProperty,fp=Object.getOwnPropertyDescriptor,os=(t,e,s,r)=>{for(var i=r>1?void 0:r?fp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&pp(e,s,i),i};let El=!1;function mp(t){return t.includes(" ")?(El||(El=!0,console.warn(`[concorde] sonic-pop placement="${t}" est déprécié, utiliser placement="${t.replace(" ","-")}".`)),t.replace(" ","-")):t}const gp="sonic-pop";let Le=class extends Q{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.pendingShow=!1,this.ancestorsHavingZIndex=new Set}toggle(t){if(this.open&&this.noToggle)return;const e=t;t.type=="keydown"&&(e.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=t.target),this.open?this.hide():this.show())}show(){if(!this.popContent){this.pendingShow=!0,this.updateComplete.then(()=>{this.pendingShow&&this.show()});return}this.pendingShow=!1,!this.open&&(Le.supportsPopover||this.setMaxZindex(),clearTimeout(this.hideDisplayTimeout),this.popContent?.style?.removeProperty("display"),Le.supportsPopover&&!this.popContent.matches(":popover-open")&&this.popContent.showPopover(),this.open=!0,Le.pops.delete(this)&&Le.pops.add(this),this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.stopPositioning&&(this.lastContentX=0,this.lastContentY=0,this.stopPositioning=Dl(()=>this.computePosition(this.placement))),this.dispatchEvent(new CustomEvent("show")))}hide(){if(this.pendingShow=!1,!this.popContent){this.dispatchEvent(new CustomEvent("hide"));return}Le.supportsPopover||this.resetZindexes(),Le.supportsPopover&&this.popContent?.matches(":popover-open")&&this.popContent.hidePopover(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.stopPositionLoop(),Le.supportsPopover||this.hideContentAfterTransition(),this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),this.dispatchEvent(new CustomEvent("hide"))}stopPositionLoop(){this.stopPositioning?.(),this.stopPositioning=void 0}hideContentAfterTransition(){clearTimeout(this.hideDisplayTimeout);const t=parseFloat(getComputedStyle(this.popContent).transitionDuration)*1e3;this.hideDisplayTimeout=setTimeout(()=>{this.open||(this.popContent.style.display="none")},t||0)}setMaxZindex(){ze.everyAncestors(this,t=>{const e=t;if(!e.className)return!0;if([...e.classList].includes("@container")){const s=e.style;s.zIndex="999999999";const r=getComputedStyle(e);return r.position!=="relative"&&r.position!=="absolute"&&(s.position="relative"),this.ancestorsHavingZIndex.add(t),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(t=>{t.style.removeProperty("position"),t.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(t){const e=t.composedPath(),s=e[0];Le.pops.forEach(r=>{if(!r.open)return;const i=e.includes(r),n=e.includes(r.querySelector('[slot="content"]')),o=ze.getAncestorAttributeValue(s,"data-on-select")==="keep";t.type=="pointerdown"&&i||t.type=="click"&&(i&&o||!n)||r.hide()})}connectedCallback(){super.connectedCallback(),Le.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",Le._handleKeyDown,!0)),Le.pops.add(this)}firstUpdated(t){super.firstUpdated(t),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),this.stopPositionLoop(),clearTimeout(this.hideDisplayTimeout),this.open&&(Le.supportsPopover||this.resetZindexes(),this.open=!1,this.triggerElement=null,this.popContent?.style.setProperty("display","none")),super.disconnectedCallback(),Le.pops.delete(this),Le.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",Le._handleKeyDown,!0))}computePosition(t){const{side:e,align:s}=xl(mp(t),"bottom","start"),r=this.popContent.getBoundingClientRect(),{x:i,y:n}=$l({anchor:this.getBoundingClientRect(),floating:r,side:e,align:s,bounds:Cl(this.popContent,5)});this.lastContentX+=i-r.x,this.lastContentY+=n-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}static _handleKeyDown(t){if(t.key!=="Escape")return;const e=[...Le.pops].reverse().find(s=>s.open);e&&(t.stopPropagation(),e.hide())}render(){return R`
2097
2088
  <slot
2098
2089
  @click=${this.manual?()=>{}:this.toggle}
2099
2090
  @keydown=${this.manual?()=>{}:this.toggle}
@@ -2101,14 +2092,13 @@
2101
2092
  ></slot>
2102
2093
  <slot
2103
2094
  name="content"
2104
- popover=${te(Le.supportsPopover?"manual":void 0)}
2095
+ popover=${se(Le.supportsPopover?"manual":void 0)}
2105
2096
  tabindex="-1"
2106
- part="content"
2107
2097
  style="display: none;"
2108
2098
  class="shadowable
2109
2099
  ${this.open?"is-open":""}"
2110
2100
  ></slot>
2111
- `}};Le.pops=new Set,Le.supportsPopover=vl,Le.styles=[X`
2101
+ `}};Le.pops=new Set,Le.supportsPopover=Al,Le.styles=[Z`
2112
2102
  :host {
2113
2103
  display: inline-block;
2114
2104
  vertical-align: middle;
@@ -2170,11 +2160,11 @@
2170
2160
  :host([inline]) {
2171
2161
  vertical-align: baseline;
2172
2162
  }
2173
- `,Pl],ns([Ae()],Le.prototype,"open",2),ns([fs("slot:not([name=content])")],Le.prototype,"popBtn",2),ns([fs("slot[name=content]")],Le.prototype,"popContent",2),ns([h({type:Boolean})],Le.prototype,"noToggle",2),ns([h({type:Boolean,reflect:!0})],Le.prototype,"inline",2),ns([h({type:Boolean})],Le.prototype,"manual",2),ns([h({type:String,reflect:!0})],Le.prototype,"shadow",2),ns([h({type:String})],Le.prototype,"placement",2),ns([Ae()],Le.prototype,"triggerElement",2),Le=ns([Q(pp)],Le);var fp=Object.getOwnPropertyDescriptor,gp=(t,e,s,i)=>{for(var r=i>1?void 0:i?fp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const mp="sonic-menu-item";let Al=class extends Ne{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="default"),this.hasAttribute("shape")||(this.shape="block");const t=this.shape==="square"||this.shape==="circle";!this.hasAttribute("align")&&!t&&(this.align="left"),super.connectedCallback()}};Al=gp([Q(mp)],Al);/**
2163
+ `,co],os([xe()],Le.prototype,"open",2),os([$s("slot:not([name=content])")],Le.prototype,"popBtn",2),os([$s("slot[name=content]")],Le.prototype,"popContent",2),os([h({type:Boolean})],Le.prototype,"noToggle",2),os([h({type:Boolean,reflect:!0})],Le.prototype,"inline",2),os([h({type:Boolean})],Le.prototype,"manual",2),os([h({type:String,reflect:!0})],Le.prototype,"shadow",2),os([h({type:String})],Le.prototype,"placement",2),os([xe()],Le.prototype,"triggerElement",2),Le=os([X(gp)],Le);var bp=Object.getOwnPropertyDescriptor,vp=(t,e,s,r)=>{for(var i=r>1?void 0:r?bp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const yp="sonic-menu-item";let Ol=class extends Ne{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="default"),this.hasAttribute("shape")||(this.shape="block");const t=this.shape==="square"||this.shape==="circle";!this.hasAttribute("align")&&!t&&(this.align="left"),super.connectedCallback()}};Ol=vp([X(yp)],Ol);/**
2174
2164
  * @license
2175
2165
  * Copyright 2021 Google LLC
2176
2166
  * SPDX-License-Identifier: BSD-3-Clause
2177
- */class Cl{constructor(e,{target:s,config:i,callback:r,skipInitial:n}){this.t=new Set,this.o=!1,this.i=!1,this.h=e,s!==null&&this.t.add(s??e),this.l=i,this.o=n??this.o,this.callback=r,window.ResizeObserver?(this.u=new ResizeObserver((o=>{this.handleChanges(o),this.h.requestUpdate()})),e.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(e){this.value=this.callback?.(e,this.u)}hostConnected(){for(const e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(e){this.t.add(e),this.u.observe(e,this.l),this.i=!0,this.h.requestUpdate()}unobserve(e){this.t.delete(e),this.u.unobserve(e)}disconnect(){this.u.disconnect()}}var bp=Object.defineProperty,vp=Object.getOwnPropertyDescriptor,pt=(t,e,s,i)=>{for(var r=i>1?void 0:i?vp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&bp(e,s,r),r};const yp="data-autocomplete-value",wp="data-autocomplete-label";let et=class extends Xn(Ga(Ka(J))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.serviceURL="",this.minSearchLength=3,this.key="",this.searchParameter="",this.propertyName="",this.items=null,this.hasInputPrefix=!1,this._resizeController=new Cl(this,{}),this.searchText="",this.searchDataProvider="",this.queueFilterDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.providersReady=!1,this.suppressPopOpen=!1,this.filterArmed=!1,this.updateSearchParameter=t=>{if(t==""||t==null){this.isSearchParameter()&&(this.lastValidSearch="",this.setSearchText(""));return}this.queryQueueListItem(this.queueDataProvider,s=>(this.propertyName==="_self"?s:s[this.propertyName||this.name])==t,this.setSearchFromSelection)||!this.queryQueueListItem(this.initQueueDataProvider,i=>(this.propertyName==="_self"?i:i[this.propertyName||this.name])==t,this.setSearchFromSelection)&&this.isSearchParameter()&&(this.lastValidSearch=t,this.setSearchText(String(t)))},this.onSearchPublisherAssign=t=>{const e=t==null?"":String(t);this.searchText!==e&&(this.searchText=e),this.syncQueueFilter(e),this.openPopIfNeeded(e)},this.handleSearchActivity=()=>{const t=String(this.searchPublisher?.get()??this.searchText??"");this.openPopIfNeeded(t,!0)},this.handleSearchKeyUp=t=>{t.ctrlKey||t.metaKey||t.altKey||["Escape","Tab","Enter","ArrowUp","ArrowDown"].includes(t.key)||this.handleSearchActivity()},this.handleSearchKeyDown=t=>{const e=t.composedPath(),s=e.some(o=>o?.tagName==="SONIC-MENU-ITEM");if(s&&(t.key==="Enter"||t.key===" ")){const o=e.find(c=>c?.tagName==="SONIC-MENU-ITEM");if(!o)return;t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(o);return}if(s)return;const i=String(this.searchPublisher?.get()??this.searchText??"");if(!this.shouldShowSuggestions(i))return;if(t.key==="Enter"){const o=this.getSuggestionItems();if(!o.length)return;t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(o[0]);return}if(t.key!=="ArrowDown"&&t.key!=="ArrowUp")return;t.preventDefault(),t.stopPropagation(),this.suppressPopOpen=!1,this.popElement?.show(),requestAnimationFrame(()=>this.popElement?.show());const r=this.getSuggestionItems();if(!r.length)return;(t.key==="ArrowDown"?r[0]:r[r.length-1]).focus?.()},this.handleSuggestionPointerDown=t=>{const e=t.composedPath().find(s=>s?.tagName==="SONIC-MENU-ITEM");e&&(t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(e))},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.findSelection=t=>(this.propertyName==="_self"?t:t[this.propertyName||this.name])==this.value,this.setSearchFromSelection=t=>{this.lastValidSearch=this.propertyName==="_self"?t:t[this.searchParameter||this.propertyName||this.name],this.setSearchText(this.lastValidSearch)},this.handleFocusOut=t=>{const e=t.relatedTarget;this.deepContains(this.popElement,e)||this.deepContains(this,e)||setTimeout(()=>{if(this.suppressPopOpen)return;const s=document.activeElement;!s||this.deepContains(this.popElement,s)||this.deepContains(this,s)||this.popElement?.hide()},0)}}hasSlotOrProps(){this.hasInputPrefix=!!this.slotInputPrefixNodes?.length}searchFieldName(){return this.searchParameter||this.name}isSearchParameter(){return!this.searchParameter||this.searchParameter===this.name}shouldShowSuggestions(t){return(t?.length||0)>=this.minSearchLength||this.minSearchLength===0}isSearchFocused(){const t=document.activeElement;if(!t)return!1;const e=this.renderRoot?.querySelector("sonic-input.form-element");return!!(e&&(t===e||e.contains(t)||e.shadowRoot?.contains(t)))}openPopIfNeeded(t,e=!1){if(!this.suppressPopOpen){if(!this.shouldShowSuggestions(t)){this.popElement?.hide();return}(e||this.isSearchFocused()||this.popElement?.open)&&(this.popElement?.show(),requestAnimationFrame(()=>{if(this.suppressPopOpen)return;const s=String(this.searchPublisher?.get()??this.searchText??"");this.shouldShowSuggestions(s)&&this.popElement?.show()}))}}setSearchText(t){const e=t==null||t===""?"":typeof t=="string"?t:String(t);this.searchText=e,this.searchPublisher&&this.searchPublisher.get()!==e&&this.searchPublisher.set(e),this.syncQueueFilter(e)}syncQueueFilter(t){if(!this.queueFilterPublisher)return;if(this.minSearchLength===0||t.length>=this.minSearchLength){(!this.filterArmed||this.queueFilterPublisher.get()!==t)&&this.queueFilterPublisher.set(t),this.filterArmed=!0;return}this.filterArmed&&(this.filterArmed=!1,this.clearSearchQueueResults())}clearSearchQueueResults(){if(!this.queueDataProvider)return;const t=ve.get(this.queueDataProvider),e=t.get();if(Array.isArray(e))for(const s of e)s?.dataProvider&&ve.getInstance().delete(s.dataProvider);t.set([])}applySuggestion(t,e){this.suppressPopOpen=!0;const s=t,i=e||(typeof s=="string"?s:String(s??""));this.formValuePublisher?.set(s),this.lastValidSearch=this.isSearchParameter()?s:i,this.setSearchText(this.isSearchParameter()?String(s??""):i),this.popElement?.hide(),requestAnimationFrame(()=>{this.suppressPopOpen=!1})}getSuggestionItems(){return[...this.renderRoot?.querySelectorAll("sonic-menu-item")??[]]}selectSuggestionItem(t){const e=t.getAttribute(yp)??t.value??null,s=t.getAttribute(wp)??(t.textContent||"").trim();e==null&&!s||this.applySuggestion(e??s,s)}setupProviders(){const t=this.searchFieldName(),e=this.formDataProvider||this.getAncestorAttributeValue("formDataProvider")||"",s=et.instanceCounter++,i=(e||"form")+"__"+(this.name||"field")+"__autocomplete__"+s;this.initSearchDataProvider=`${i}_init_search__`,this.initQueueDataProvider=`${i}_init_queue__`,this.searchDataProvider=`${i}_search__`,this.queueFilterDataProvider=`${i}_queue_filter__`,this.queueDataProvider=`${i}_queue__`;const r=ve.get;this.searchPublisher=r(this.searchDataProvider)[t],this.queueFilterPublisher=r(this.queueFilterDataProvider)[t],this.formValuePublisher=qt(r(e),this.name),this.initCountPublisher=r(this.initQueueDataProvider).resultCount,this.value&&r(this.initSearchDataProvider)[this.name].set(this.value),this.initCountPublisher?.onAssign(this.initSearchParameter),this.formValuePublisher?.onAssign(this.updateSearchParameter),this.searchPublisher?.onAssign(this.onSearchPublisherAssign);const n=this.searchPublisher?.get();n!=null&&n!==""&&(this.searchText=String(n),this.syncQueueFilter(this.searchText)),this.providersReady=!0}teardownProviders(){this.initCountPublisher?.offAssign(this.initSearchParameter),this.formValuePublisher?.offAssign(this.updateSearchParameter),this.searchPublisher?.offAssign(this.onSearchPublisherAssign);const t=ve.get;this.initSearchDataProvider&&t(this.initSearchDataProvider).delete(),this.initQueueDataProvider&&t(this.initQueueDataProvider).delete(),this.searchDataProvider&&t(this.searchDataProvider).delete(),this.queueFilterDataProvider&&t(this.queueFilterDataProvider).delete(),this.queueDataProvider&&t(this.queueDataProvider).delete(),this.providersReady=!1}connectedCallback(){super.connectedCallback(),this.setupProviders(),this.addEventListener("keyup",this.handleSearchKeyUp),this.addEventListener("keydown",this.handleSearchKeyDown,!0)}firstUpdated(t){super.firstUpdated(t),this.popElement.addEventListener("focusout",this.handleFocusOut)}disconnectedCallback(){this.removeEventListener("keyup",this.handleSearchKeyUp),this.removeEventListener("keydown",this.handleSearchKeyDown,!0),this.teardownProviders(),this.popElement?.removeEventListener("focusout",this.handleFocusOut),super.disconnectedCallback()}queryQueueListItem(t,e,s){const i=ve.get(t);let r;const n=i.get();if(!n||!Array.isArray(n)||!n.length)return!1;for(const o of n){const c=ve.get(o.dataProvider).get();if(Array.isArray(c)&&(r=c.find(e),r))break}return r?(s(r),!0):!1}setSelectionRange(t,e){this.renderRoot?.querySelector("sonic-input.form-element")?.setSelectionRange(t,e)}handleHide(){if(this.select){if(!this.searchText){this.lastValidSearch="",this.formValuePublisher?.set("");return}this.setSearchText(this.lastValidSearch)}}deepContains(t,e){if(!t||!e)return!1;let s=e;for(;s;){if(s===t||t.contains(s))return!0;const i=s.getRootNode();if(i instanceof ShadowRoot)s=i.host;else break}return!1}handleFocus(){const t=String(this.searchText??"");this.shouldShowSuggestions(t)&&(this.suppressPopOpen=!1,this.popElement?.show())}render(){if(!this.providersReady||!this.searchDataProvider)return se;const t=this.templateList.concat(this.templatePartsList);return R`
2167
+ */class Tl{constructor(e,{target:s,config:r,callback:i,skipInitial:n}){this.t=new Set,this.o=!1,this.i=!1,this.h=e,s!==null&&this.t.add(s??e),this.l=r,this.o=n??this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((o=>{this.handleChanges(o),this.h.requestUpdate()})),e.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(e){this.value=this.callback?.(e,this.u)}hostConnected(){for(const e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(e){this.t.add(e),this.u.observe(e,this.l),this.i=!0,this.h.requestUpdate()}unobserve(e){this.t.delete(e),this.u.unobserve(e)}disconnect(){this.u.disconnect()}}var wp=Object.defineProperty,_p=Object.getOwnPropertyDescriptor,ft=(t,e,s,r)=>{for(var i=r>1?void 0:r?_p(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&wp(e,s,i),i};const Sp="data-autocomplete-value",Pp="data-autocomplete-label";let et=class extends so(el(Xa(Q))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.serviceURL="",this.minSearchLength=3,this.key="",this.searchParameter="",this.propertyName="",this.items=null,this.hasInputPrefix=!1,this._resizeController=new Tl(this,{}),this.searchText="",this.searchDataProvider="",this.queueFilterDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.providersReady=!1,this.suppressPopOpen=!1,this.filterArmed=!1,this.updateSearchParameter=t=>{if(t==""||t==null){this.isSearchParameter()&&(this.lastValidSearch="",this.setSearchText(""));return}this.queryQueueListItem(this.queueDataProvider,s=>(this.propertyName==="_self"?s:s[this.propertyName||this.name])==t,this.setSearchFromSelection)||!this.queryQueueListItem(this.initQueueDataProvider,r=>(this.propertyName==="_self"?r:r[this.propertyName||this.name])==t,this.setSearchFromSelection)&&this.isSearchParameter()&&(this.lastValidSearch=t,this.setSearchText(String(t)))},this.onSearchPublisherAssign=t=>{const e=t==null?"":String(t);this.searchText!==e&&(this.searchText=e),this.syncQueueFilter(e),this.openPopIfNeeded(e)},this.handleSearchActivity=()=>{const t=String(this.searchPublisher?.get()??this.searchText??"");this.openPopIfNeeded(t,!0)},this.handleSearchKeyUp=t=>{t.ctrlKey||t.metaKey||t.altKey||["Escape","Tab","Enter","ArrowUp","ArrowDown"].includes(t.key)||this.handleSearchActivity()},this.handleSearchKeyDown=t=>{const e=t.composedPath(),s=e.some(o=>o?.tagName==="SONIC-MENU-ITEM");if(s&&(t.key==="Enter"||t.key===" ")){const o=e.find(c=>c?.tagName==="SONIC-MENU-ITEM");if(!o)return;t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(o);return}if(s)return;const r=String(this.searchPublisher?.get()??this.searchText??"");if(!this.shouldShowSuggestions(r))return;if(t.key==="Enter"){const o=this.getSuggestionItems();if(!o.length)return;t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(o[0]);return}if(t.key!=="ArrowDown"&&t.key!=="ArrowUp")return;t.preventDefault(),t.stopPropagation(),this.suppressPopOpen=!1,this.popElement?.show(),requestAnimationFrame(()=>this.popElement?.show());const i=this.getSuggestionItems();if(!i.length)return;(t.key==="ArrowDown"?i[0]:i[i.length-1]).focus?.()},this.handleSuggestionPointerDown=t=>{const e=t.composedPath().find(s=>s?.tagName==="SONIC-MENU-ITEM");e&&(t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(e))},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.findSelection=t=>(this.propertyName==="_self"?t:t[this.propertyName||this.name])==this.value,this.setSearchFromSelection=t=>{this.lastValidSearch=this.propertyName==="_self"?t:t[this.searchParameter||this.propertyName||this.name],this.setSearchText(this.lastValidSearch)},this.handleFocusOut=t=>{const e=t.relatedTarget;this.deepContains(this.popElement,e)||this.deepContains(this,e)||setTimeout(()=>{if(this.suppressPopOpen)return;const s=document.activeElement;!s||this.deepContains(this.popElement,s)||this.deepContains(this,s)||this.popElement?.hide()},0)}}hasSlotOrProps(){this.hasInputPrefix=!!this.slotInputPrefixNodes?.length}searchFieldName(){return this.searchParameter||this.name}isSearchParameter(){return!this.searchParameter||this.searchParameter===this.name}shouldShowSuggestions(t){return(t?.length||0)>=this.minSearchLength||this.minSearchLength===0}isSearchFocused(){const t=document.activeElement;if(!t)return!1;const e=this.renderRoot?.querySelector("sonic-input.form-element");return!!(e&&(t===e||e.contains(t)||e.shadowRoot?.contains(t)))}openPopIfNeeded(t,e=!1){if(!this.suppressPopOpen){if(!this.shouldShowSuggestions(t)){this.popElement?.hide();return}(e||this.isSearchFocused()||this.popElement?.open)&&(this.popElement?.show(),requestAnimationFrame(()=>{if(this.suppressPopOpen)return;const s=String(this.searchPublisher?.get()??this.searchText??"");this.shouldShowSuggestions(s)&&this.popElement?.show()}))}}setSearchText(t){const e=t==null||t===""?"":typeof t=="string"?t:String(t);this.searchText=e,this.searchPublisher&&this.searchPublisher.get()!==e&&this.searchPublisher.set(e),this.syncQueueFilter(e)}syncQueueFilter(t){if(!this.queueFilterPublisher)return;if(this.minSearchLength===0||t.length>=this.minSearchLength){(!this.filterArmed||this.queueFilterPublisher.get()!==t)&&this.queueFilterPublisher.set(t),this.filterArmed=!0;return}this.filterArmed&&(this.filterArmed=!1,this.clearSearchQueueResults())}clearSearchQueueResults(){if(!this.queueDataProvider)return;const t=ve.get(this.queueDataProvider),e=t.get();if(Array.isArray(e))for(const s of e)s?.dataProvider&&ve.getInstance().delete(s.dataProvider);t.set([])}applySuggestion(t,e){this.suppressPopOpen=!0;const s=t,r=e||(typeof s=="string"?s:String(s??""));this.formValuePublisher?.set(s),this.lastValidSearch=this.isSearchParameter()?s:r,this.setSearchText(this.isSearchParameter()?String(s??""):r),this.popElement?.hide(),requestAnimationFrame(()=>{this.suppressPopOpen=!1})}getSuggestionItems(){return[...this.renderRoot?.querySelectorAll("sonic-menu-item")??[]]}selectSuggestionItem(t){const e=t.getAttribute(Sp)??t.value??null,s=t.getAttribute(Pp)??(t.textContent||"").trim();e==null&&!s||this.applySuggestion(e??s,s)}setupProviders(){const t=this.searchFieldName(),e=this.formDataProvider||this.getAncestorAttributeValue("formDataProvider")||"",s=et.instanceCounter++,r=(e||"form")+"__"+(this.name||"field")+"__autocomplete__"+s;this.initSearchDataProvider=`${r}_init_search__`,this.initQueueDataProvider=`${r}_init_queue__`,this.searchDataProvider=`${r}_search__`,this.queueFilterDataProvider=`${r}_queue_filter__`,this.queueDataProvider=`${r}_queue__`;const i=ve.get;this.searchPublisher=i(this.searchDataProvider)[t],this.queueFilterPublisher=i(this.queueFilterDataProvider)[t],this.formValuePublisher=qt(i(e),this.name),this.initCountPublisher=i(this.initQueueDataProvider).resultCount,this.value&&i(this.initSearchDataProvider)[this.name].set(this.value),this.initCountPublisher?.onAssign(this.initSearchParameter),this.formValuePublisher?.onAssign(this.updateSearchParameter),this.searchPublisher?.onAssign(this.onSearchPublisherAssign);const n=this.searchPublisher?.get();n!=null&&n!==""&&(this.searchText=String(n),this.syncQueueFilter(this.searchText)),this.providersReady=!0}teardownProviders(){this.initCountPublisher?.offAssign(this.initSearchParameter),this.formValuePublisher?.offAssign(this.updateSearchParameter),this.searchPublisher?.offAssign(this.onSearchPublisherAssign);const t=ve.get;this.initSearchDataProvider&&t(this.initSearchDataProvider).delete(),this.initQueueDataProvider&&t(this.initQueueDataProvider).delete(),this.searchDataProvider&&t(this.searchDataProvider).delete(),this.queueFilterDataProvider&&t(this.queueFilterDataProvider).delete(),this.queueDataProvider&&t(this.queueDataProvider).delete(),this.providersReady=!1}connectedCallback(){super.connectedCallback(),this.setupProviders(),this.addEventListener("keyup",this.handleSearchKeyUp),this.addEventListener("keydown",this.handleSearchKeyDown,!0)}firstUpdated(t){super.firstUpdated(t),this.popElement.addEventListener("focusout",this.handleFocusOut)}disconnectedCallback(){this.removeEventListener("keyup",this.handleSearchKeyUp),this.removeEventListener("keydown",this.handleSearchKeyDown,!0),this.teardownProviders(),this.popElement?.removeEventListener("focusout",this.handleFocusOut),super.disconnectedCallback()}queryQueueListItem(t,e,s){const r=ve.get(t);let i;const n=r.get();if(!n||!Array.isArray(n)||!n.length)return!1;for(const o of n){const c=ve.get(o.dataProvider).get();if(Array.isArray(c)&&(i=c.find(e),i))break}return i?(s(i),!0):!1}setSelectionRange(t,e){this.renderRoot?.querySelector("sonic-input.form-element")?.setSelectionRange(t,e)}handleHide(){if(this.select){if(!this.searchText){this.lastValidSearch="",this.formValuePublisher?.set("");return}this.setSearchText(this.lastValidSearch)}}deepContains(t,e){if(!t||!e)return!1;let s=e;for(;s;){if(s===t||t.contains(s))return!0;const r=s.getRootNode();if(r instanceof ShadowRoot)s=r.host;else break}return!1}handleFocus(){const t=String(this.searchText??"");this.shouldShowSuggestions(t)&&(this.suppressPopOpen=!1,this.popElement?.show())}render(){if(!this.providersReady||!this.searchDataProvider)return ee;const t=this.templateList.concat(this.templatePartsList);return R`
2178
2168
  <sonic-pop manual style="display:block;" @hide=${this.handleHide}>
2179
2169
  <sonic-input
2180
2170
  class="form-element"
@@ -2182,11 +2172,11 @@
2182
2172
  .value=${this.searchText}
2183
2173
  type="search"
2184
2174
  data-keyboard-nav=""
2185
- label="${te(this.label)}"
2186
- description="${te(this.description)}"
2187
- name="${te(this.searchFieldName())}"
2175
+ label="${se(this.label)}"
2176
+ description="${se(this.description)}"
2177
+ name="${se(this.searchFieldName())}"
2188
2178
  ?required=${this.required}
2189
- placeholder="${te(this.placeholder)}"
2179
+ placeholder="${se(this.placeholder)}"
2190
2180
  ?readonly="${this.readonly}"
2191
2181
  autocomplete="off"
2192
2182
  clearable
@@ -2208,7 +2198,7 @@
2208
2198
  name="nav-arrow-down"
2209
2199
  .size=${this.size}
2210
2200
  ></sonic-icon>
2211
- `:se}
2201
+ `:ee}
2212
2202
  </sonic-input>
2213
2203
  <sonic-menu
2214
2204
  slot="content"
@@ -2222,7 +2212,7 @@
2222
2212
  filteredFields=${this.filteredFields}
2223
2213
  dataProviderExpression="${this.dataProviderExpression}"
2224
2214
  dataFilterProvider="${this.queueFilterDataProvider}"
2225
- serviceURL=${te(this.serviceURL||void 0)}
2215
+ serviceURL=${se(this.serviceURL||void 0)}
2226
2216
  key="${this.key}"
2227
2217
  .templates=${t}
2228
2218
  .items=${this.items}
@@ -2241,13 +2231,13 @@
2241
2231
  filteredFields=${this.filteredFields}
2242
2232
  dataProviderExpression="${this.dataProviderExpression}"
2243
2233
  dataFilterProvider="${this.initSearchDataProvider}"
2244
- serviceURL=${te(this.serviceURL||void 0)}
2234
+ serviceURL=${se(this.serviceURL||void 0)}
2245
2235
  key="${this.key}"
2246
2236
  .templates=${t}
2247
2237
  .items=${this.items}
2248
2238
  >
2249
2239
  </sonic-queue>
2250
- `}};et.styles=[Zr,X`
2240
+ `}};et.styles=[Jr,Z`
2251
2241
  :host {
2252
2242
  display: block;
2253
2243
  }
@@ -2276,7 +2266,7 @@
2276
2266
  overflow: hidden;
2277
2267
  pointer-events: none;
2278
2268
  }
2279
- `],et.instanceCounter=0,pt([h({type:String})],et.prototype,"size",2),pt([h({type:String})],et.prototype,"placeholder",2),pt([h()],et.prototype,"filteredFields",2),pt([h({type:Boolean,reflect:!0})],et.prototype,"readonly",2),pt([h({type:String})],et.prototype,"dataProviderExpression",2),pt([h({type:String})],et.prototype,"serviceURL",2),pt([h({type:Number})],et.prototype,"minSearchLength",2),pt([h({type:Boolean})],et.prototype,"select",2),pt([h({type:String})],et.prototype,"key",2),pt([h({type:String})],et.prototype,"searchParameter",2),pt([h({type:String})],et.prototype,"propertyName",2),pt([h({type:Function,attribute:!1})],et.prototype,"items",2),pt([mt({slot:"prefix",flatten:!0})],et.prototype,"slotInputPrefixNodes",2),pt([Ae()],et.prototype,"hasInputPrefix",2),pt([fs("sonic-pop")],et.prototype,"popElement",2),pt([Ae()],et.prototype,"searchText",2),pt([Ae()],et.prototype,"searchDataProvider",2),et=pt([Q("sonic-input-autocomplete")],et);var _p=Object.defineProperty,Sp=Object.getOwnPropertyDescriptor,Dt=(t,e,s,i)=>{for(var r=i>1?void 0:i?Sp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&_p(e,s,r),r};const Pp="sonic-password-helper";let vt=class extends tr(J){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=e=>{e?(this.hasNoChar=e.length==0,this.hasEnoughChars=e.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(e),this.hasMajuscule=/[A-Z]/.test(e),this.hasNumber=/[0-9]/.test(e),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(e)},ve.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&ve.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(e){return e?R`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:R`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?se:R`
2269
+ `],et.instanceCounter=0,ft([h({type:String})],et.prototype,"size",2),ft([h({type:String})],et.prototype,"placeholder",2),ft([h()],et.prototype,"filteredFields",2),ft([h({type:Boolean,reflect:!0})],et.prototype,"readonly",2),ft([h({type:String})],et.prototype,"dataProviderExpression",2),ft([h({type:String})],et.prototype,"serviceURL",2),ft([h({type:Number})],et.prototype,"minSearchLength",2),ft([h({type:Boolean})],et.prototype,"select",2),ft([h({type:String})],et.prototype,"key",2),ft([h({type:String})],et.prototype,"searchParameter",2),ft([h({type:String})],et.prototype,"propertyName",2),ft([h({type:Function,attribute:!1})],et.prototype,"items",2),ft([bt({slot:"prefix",flatten:!0})],et.prototype,"slotInputPrefixNodes",2),ft([xe()],et.prototype,"hasInputPrefix",2),ft([$s("sonic-pop")],et.prototype,"popElement",2),ft([xe()],et.prototype,"searchText",2),ft([xe()],et.prototype,"searchDataProvider",2),et=ft([X("sonic-input-autocomplete")],et);var xp=Object.defineProperty,Ap=Object.getOwnPropertyDescriptor,Dt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ap(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&xp(e,s,i),i};const Cp="sonic-password-helper";let yt=class extends tr(Q){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=e=>{e?(this.hasNoChar=e.length==0,this.hasEnoughChars=e.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(e),this.hasMajuscule=/[A-Z]/.test(e),this.hasNumber=/[0-9]/.test(e),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(e)},ve.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&ve.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(e){return e?R`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:R`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?ee:R`
2280
2270
  <div>${this.wording_password_helper_decription}</div>
2281
2271
  <div>
2282
2272
  ${this.getIcon(this.hasEnoughChars)}
@@ -2297,11 +2287,11 @@
2297
2287
  ${this.getIcon(this.hasSpecialChar)}
2298
2288
  ${this.wording_password_helper_special_char}
2299
2289
  </div>
2300
- `}};Dt([h()],vt.prototype,"name",2),Dt([h()],vt.prototype,"minChars",2),Dt([Ae()],vt.prototype,"hasNoChar",2),Dt([Ae()],vt.prototype,"hasEnoughChars",2),Dt([Ae()],vt.prototype,"hasMinuscule",2),Dt([Ae()],vt.prototype,"hasMajuscule",2),Dt([Ae()],vt.prototype,"hasNumber",2),Dt([Ae()],vt.prototype,"hasSpecialChar",2),Dt([h()],vt.prototype,"wording_password_helper_decription",2),Dt([h()],vt.prototype,"wording_password_helper_min_length",2),Dt([h()],vt.prototype,"wording_password_helper_lower_case",2),Dt([h()],vt.prototype,"wording_password_helper_upper_case",2),Dt([h()],vt.prototype,"wording_password_helper_number",2),Dt([h()],vt.prototype,"wording_password_helper_special_char",2),vt=Dt([Q(Pp)],vt);var xp=Object.defineProperty,Ap=Object.getOwnPropertyDescriptor,rr=(t,e,s,i)=>{for(var r=i>1?void 0:i?Ap(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&xp(e,s,r),r};const Cp="sonic-same-value-helper";let Rs=class extends tr(J){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const t=ve.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{e?this.hasNoChar=e.length==0:this.hasNoChar=!0,this.name&&this.sameValueAs&&(this.areEqual=qt(t,this.name).get()==qt(t,this.sameValueAs).get())},qt(t,this.name).onAssign(this.checkValue),qt(t,this.sameValueAs).onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=ve.get(this.getAncestorAttributeValue("formDataProvider"));qt(t,this.name).offAssign(this.checkValue),qt(t,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?se:R`
2290
+ `}};Dt([h()],yt.prototype,"name",2),Dt([h()],yt.prototype,"minChars",2),Dt([xe()],yt.prototype,"hasNoChar",2),Dt([xe()],yt.prototype,"hasEnoughChars",2),Dt([xe()],yt.prototype,"hasMinuscule",2),Dt([xe()],yt.prototype,"hasMajuscule",2),Dt([xe()],yt.prototype,"hasNumber",2),Dt([xe()],yt.prototype,"hasSpecialChar",2),Dt([h()],yt.prototype,"wording_password_helper_decription",2),Dt([h()],yt.prototype,"wording_password_helper_min_length",2),Dt([h()],yt.prototype,"wording_password_helper_lower_case",2),Dt([h()],yt.prototype,"wording_password_helper_upper_case",2),Dt([h()],yt.prototype,"wording_password_helper_number",2),Dt([h()],yt.prototype,"wording_password_helper_special_char",2),yt=Dt([X(Cp)],yt);var kp=Object.defineProperty,$p=Object.getOwnPropertyDescriptor,rr=(t,e,s,r)=>{for(var i=r>1?void 0:r?$p(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&kp(e,s,i),i};const Dp="sonic-same-value-helper";let Rs=class extends tr(Q){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const t=ve.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{e?this.hasNoChar=e.length==0:this.hasNoChar=!0,this.name&&this.sameValueAs&&(this.areEqual=qt(t,this.name).get()==qt(t,this.sameValueAs).get())},qt(t,this.name).onAssign(this.checkValue),qt(t,this.sameValueAs).onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=ve.get(this.getAncestorAttributeValue("formDataProvider"));qt(t,this.name).offAssign(this.checkValue),qt(t,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?ee:R`
2301
2291
  <span>
2302
- ${this.areEqual?He(this.descriptionWhenEqual):He(this.descriptionWhenNotEqual)}
2292
+ ${this.areEqual?Be(this.descriptionWhenEqual):Be(this.descriptionWhenNotEqual)}
2303
2293
  </span>
2304
- `}};rr([h()],Rs.prototype,"name",2),rr([h()],Rs.prototype,"sameValueAs",2),rr([h()],Rs.prototype,"descriptionWhenEqual",2),rr([h()],Rs.prototype,"descriptionWhenNotEqual",2),rr([Ae()],Rs.prototype,"areEqual",2),rr([Ae()],Rs.prototype,"hasNoChar",2),Rs=rr([Q(Cp)],Rs);var kp=Object.defineProperty,$p=Object.getOwnPropertyDescriptor,_s=(t,e,s,i)=>{for(var r=i>1?void 0:i?$p(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&kp(e,s,r),r};const Dp="sonic-checkbox";let Et=class extends Rn(qi(br(J))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.showAsIndeterminate=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t),t.has("type")&&(this.type="checkbox")}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){return R`
2294
+ `}};rr([h()],Rs.prototype,"name",2),rr([h()],Rs.prototype,"sameValueAs",2),rr([h()],Rs.prototype,"descriptionWhenEqual",2),rr([h()],Rs.prototype,"descriptionWhenNotEqual",2),rr([xe()],Rs.prototype,"areEqual",2),rr([xe()],Rs.prototype,"hasNoChar",2),Rs=rr([X(Dp)],Rs);var Ep=Object.defineProperty,Op=Object.getOwnPropertyDescriptor,ys=(t,e,s,r)=>{for(var i=r>1?void 0:r?Op(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ep(e,s,i),i};const Tp="sonic-checkbox";let Et=class extends qn(Bi(br(Q))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.showAsIndeterminate=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t),t.has("type")&&(this.type="checkbox")}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){return R`
2305
2295
  <label class="checkbox-container ${this.disabled?"disabled":""}">
2306
2296
 
2307
2297
  <span class="icon-container">
@@ -2312,24 +2302,24 @@
2312
2302
  ?required=${this.required}
2313
2303
  ?data-indeterminate=${this.showAsIndeterminate}
2314
2304
  ?disabled=${this.disabled}
2315
- .checked=${te(this.checked)}
2305
+ .checked=${se(this.checked)}
2316
2306
  .name=${this.name}
2317
2307
  .value=${this.value}
2318
2308
  ?autofocus=${this.autofocus}
2319
- aria-label=${te(this.ariaLabel)}
2320
- aria-labelledby=${te(this.ariaLabelledby)}
2309
+ aria-label=${se(this.ariaLabel)}
2310
+ aria-labelledby=${se(this.ariaLabelledby)}
2321
2311
  />
2322
2312
  <sonic-icon name="${this.checked=="indeterminate"||this.showAsIndeterminate?this.indeterminateIconName:this.iconName}" class="sc-input-icon"></sonic-icon>
2323
2313
  </span>
2324
2314
 
2325
2315
  <div class="checkbox-text ${!this.hasDescription&&!this.hasLabel?"hidden":"checkbox-text"}">
2326
- ${this.label?He(this.label):""}
2316
+ ${this.label?Be(this.label):""}
2327
2317
  <slot @slotchange=${this.hasSlotOrProps}></slot>
2328
- <slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?R`${He(this.description)}`:""}</slot>
2318
+ <slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?R`${Be(this.description)}`:""}</slot>
2329
2319
  </div>
2330
2320
  </label>
2331
2321
  </label>
2332
- `}};Et.styles=[rs,X`
2322
+ `}};Et.styles=[Jt,Z`
2333
2323
  :host {
2334
2324
  --sc-checkbox-border-width: var(--sc-form-border-width);
2335
2325
  --sc-checkbox-border-color: var(
@@ -2451,7 +2441,7 @@
2451
2441
  .hidden {
2452
2442
  display: none;
2453
2443
  }
2454
- `],_s([h({type:Boolean,reflect:!0})],Et.prototype,"touched",2),_s([h({type:String})],Et.prototype,"iconName",2),_s([h({type:String})],Et.prototype,"indeterminateIconName",2),_s([h({type:Boolean})],Et.prototype,"showAsIndeterminate",2),_s([h({type:Boolean})],Et.prototype,"hasDescription",2),_s([h({type:Boolean})],Et.prototype,"hasLabel",2),_s([mt({flatten:!0})],Et.prototype,"slotLabelNodes",2),_s([mt({slot:"description",flatten:!0})],Et.prototype,"slotDescriptionNodes",2),Et=_s([Q(Dp)],Et);var Ep=Object.getOwnPropertyDescriptor,Op=(t,e,s,i)=>{for(var r=i>1?void 0:i?Ep(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Tp="sonic-radio";let lo=class extends Et{constructor(){super(),this.radio=!0}willUpdate(t){const e=t.has("type");super.willUpdate(t),e&&(this.type="radio")}connectedCallback(){super.connectedCallback(),this.type="radio"}};lo.styles=[Et.styles,X`
2444
+ `],ys([h({type:Boolean,reflect:!0})],Et.prototype,"touched",2),ys([h({type:String})],Et.prototype,"iconName",2),ys([h({type:String})],Et.prototype,"indeterminateIconName",2),ys([h({type:Boolean})],Et.prototype,"showAsIndeterminate",2),ys([h({type:Boolean})],Et.prototype,"hasDescription",2),ys([h({type:Boolean})],Et.prototype,"hasLabel",2),ys([bt({flatten:!0})],Et.prototype,"slotLabelNodes",2),ys([bt({slot:"description",flatten:!0})],Et.prototype,"slotDescriptionNodes",2),Et=ys([X(Tp)],Et);var Lp=Object.getOwnPropertyDescriptor,Mp=(t,e,s,r)=>{for(var i=r>1?void 0:r?Lp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Ip="sonic-radio";let ho=class extends Et{constructor(){super(),this.radio=!0}willUpdate(t){const e=t.has("type");super.willUpdate(t),e&&(this.type="radio")}connectedCallback(){super.connectedCallback(),this.type="radio"}};ho.styles=[Et.styles,Z`
2455
2445
  :host input {
2456
2446
  border-radius: 50%;
2457
2447
  }
@@ -2467,7 +2457,7 @@
2467
2457
  width: 0.6em;
2468
2458
  width: round(0.6em, 1px);
2469
2459
  }
2470
- `],lo=Op([Q(Tp)],lo);var Lp=Object.getOwnPropertyDescriptor,Mp=(t,e,s,i)=>{for(var r=i>1?void 0:i?Lp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Ip="sonic-switch";let co=class extends Et{constructor(){super(),this.unique=!0}};co.styles=[Et.styles,X`
2460
+ `],ho=Mp([X(Ip)],ho);var Np=Object.getOwnPropertyDescriptor,Fp=(t,e,s,r)=>{for(var i=r>1?void 0:r?Np(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Rp="sonic-switch";let uo=class extends Et{constructor(){super(),this.unique=!0}};uo.styles=[Et.styles,Z`
2471
2461
  sonic-icon {
2472
2462
  display: none;
2473
2463
  }
@@ -2532,17 +2522,17 @@
2532
2522
  input + sonic-icon {
2533
2523
  display: none;
2534
2524
  }
2535
- `],co=Mp([Q(Ip)],co);var Np=Object.defineProperty,Fp=Object.getOwnPropertyDescriptor,at=(t,e,s,i)=>{for(var r=i>1?void 0:i?Fp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Np(e,s,r),r};const Rp="sonic-select";let tt=class extends br(J){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this.status="default",this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.updateOptions=()=>{const t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map(e=>({value:e.value,wording:e.text,selected:e.hasAttribute("selected")})))},this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const s of t)s.selected&&(this.value=s[this.valueKey]||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(t){this.hasDoneFirstUpdate=!0,super.firstUpdated(t)}set value(t){t==null&&!this.hasDoneFirstUpdate||(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){this.setFormPublisherValue(this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps(),this.updateOptions()}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}validateFormElement(){const t=this.shadowRoot?.querySelector("select");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return R`
2525
+ `],uo=Fp([X(Rp)],uo);var jp=Object.defineProperty,zp=Object.getOwnPropertyDescriptor,ct=(t,e,s,r)=>{for(var i=r>1?void 0:r?zp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&jp(e,s,i),i};const Up="sonic-select";let tt=class extends br(Q){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this.status="default",this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.updateOptions=()=>{const t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map(e=>({value:e.value,wording:e.text,selected:e.hasAttribute("selected")})))},this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const s of t)s.selected&&(this.value=s[this.valueKey]||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(t){this.hasDoneFirstUpdate=!0,super.firstUpdated(t)}set value(t){t==null&&!this.hasDoneFirstUpdate||(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){this.setFormPublisherValue(this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps(),this.updateOptions()}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}validateFormElement(){const t=this.shadowRoot?.querySelector("select");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return R`
2536
2526
  <label
2537
2527
  for="form-element"
2538
2528
  class="${this.hasLabel?"form-label":"hidden"}"
2539
- >${this.label?He(this.label):""}<slot
2529
+ >${this.label?Be(this.label):""}<slot
2540
2530
  name="label"
2541
2531
  @slotchange=${this.hasSlotOrProps}
2542
2532
  ></slot
2543
2533
  ></label>
2544
2534
 
2545
- <div class="form-control ${ao(t)}">
2535
+ <div class="form-control ${Ki(t)}">
2546
2536
  <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
2547
2537
  <div class="form-select-wrapper">
2548
2538
  <select
@@ -2553,14 +2543,14 @@
2553
2543
  ?disabled=${this.disabled}
2554
2544
  ?required=${this.required}
2555
2545
  ?multiple=${this.multiple}
2556
- size=${te(this.selectSize)}
2546
+ size=${se(this.selectSize)}
2557
2547
  ?autofocus=${this.autofocus}
2558
2548
  .value="${this.value}"
2559
2549
  class="form-element"
2560
- aria-label=${te(this.ariaLabel)}
2561
- aria-labelledby=${te(this.ariaLabelledby)}
2550
+ aria-label=${se(this.ariaLabel)}
2551
+ aria-labelledby=${se(this.ariaLabelledby)}
2562
2552
  >
2563
- ${Fi(this.options,e=>e[this.valueKey],e=>{const s=this.value==e[this.valueKey];return R`<option
2553
+ ${Ri(this.options,e=>e[this.valueKey],e=>{const s=this.value==e[this.valueKey];return R`<option
2564
2554
  ?selected=${s}
2565
2555
  value="${e[this.valueKey]}"
2566
2556
  >
@@ -2581,9 +2571,9 @@
2581
2571
  name="description"
2582
2572
  @slotchange=${this.hasSlotOrProps}
2583
2573
  class="${this.hasDescription?"form-description":"hidden"}"
2584
- >${this.description?R`${He(this.description)}`:""}</slot
2574
+ >${this.description?R`${Be(this.description)}`:""}</slot
2585
2575
  >
2586
- `}};tt.styles=[rs,oo,Qi,Xi,X`
2576
+ `}};tt.styles=[Jt,lo,sn,rn,Z`
2587
2577
  .form-element {
2588
2578
  appearance: none;
2589
2579
  white-space: nowrap;
@@ -2636,11 +2626,11 @@
2636
2626
  :host([multiple]) sonic-icon {
2637
2627
  display: none !important;
2638
2628
  }
2639
- `],at([h({type:String})],tt.prototype,"valueKey",2),at([h({type:String})],tt.prototype,"wordingKey",2),at([h({type:Boolean})],tt.prototype,"multiple",2),at([h({type:String,reflect:!0})],tt.prototype,"size",2),at([h({type:Number})],tt.prototype,"selectSize",2),at([h({type:String,reflect:!0})],tt.prototype,"status",2),at([h({type:Array})],tt.prototype,"options",1),at([h({reflect:!0})],tt.prototype,"value",1),at([h({type:Boolean})],tt.prototype,"forceAutoFill",2),at([h()],tt.prototype,"description",1),at([h()],tt.prototype,"label",1),at([mt({slot:"label",flatten:!0})],tt.prototype,"slotLabelNodes",2),at([mt({slot:"description",flatten:!0})],tt.prototype,"slotDescriptionNodes",2),at([mt({slot:"suffix",flatten:!0})],tt.prototype,"slotSuffixNodes",2),at([mt({slot:"prefix",flatten:!0})],tt.prototype,"slotPrefixNodes",2),at([Ae()],tt.prototype,"hasDescription",2),at([Ae()],tt.prototype,"hasLabel",2),at([Ae()],tt.prototype,"hasSuffix",2),at([Ae()],tt.prototype,"hasPrefix",2),tt=at([Q(Rp)],tt);var jp=Object.defineProperty,zp=Object.getOwnPropertyDescriptor,Lt=(t,e,s,i)=>{for(var r=i>1?void 0:i?zp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&jp(e,s,r),r};const Up="sonic-textarea";let yt=class extends qi(br(J)){constructor(){super(...arguments),this.size="md",this.readonly=!1,this.resize="vertical",this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}validateFormElement(){const t=this.shadowRoot?.querySelector("textarea");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={resize:this.resize};return R`
2629
+ `],ct([h({type:String})],tt.prototype,"valueKey",2),ct([h({type:String})],tt.prototype,"wordingKey",2),ct([h({type:Boolean})],tt.prototype,"multiple",2),ct([h({type:String,reflect:!0})],tt.prototype,"size",2),ct([h({type:Number})],tt.prototype,"selectSize",2),ct([h({type:String,reflect:!0})],tt.prototype,"status",2),ct([h({type:Array})],tt.prototype,"options",1),ct([h({reflect:!0})],tt.prototype,"value",1),ct([h({type:Boolean})],tt.prototype,"forceAutoFill",2),ct([h()],tt.prototype,"description",1),ct([h()],tt.prototype,"label",1),ct([bt({slot:"label",flatten:!0})],tt.prototype,"slotLabelNodes",2),ct([bt({slot:"description",flatten:!0})],tt.prototype,"slotDescriptionNodes",2),ct([bt({slot:"suffix",flatten:!0})],tt.prototype,"slotSuffixNodes",2),ct([bt({slot:"prefix",flatten:!0})],tt.prototype,"slotPrefixNodes",2),ct([xe()],tt.prototype,"hasDescription",2),ct([xe()],tt.prototype,"hasLabel",2),ct([xe()],tt.prototype,"hasSuffix",2),ct([xe()],tt.prototype,"hasPrefix",2),tt=ct([X(Up)],tt);var qp=Object.defineProperty,Hp=Object.getOwnPropertyDescriptor,Mt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Hp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&qp(e,s,i),i};const Bp="sonic-textarea";let wt=class extends Bi(br(Q)){constructor(){super(...arguments),this.size="md",this.readonly=!1,this.resize="vertical",this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}validateFormElement(){const t=this.shadowRoot?.querySelector("textarea");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={resize:this.resize};return R`
2640
2630
  <label
2641
2631
  for="${this.id||"form-element"}"
2642
2632
  class="${this.hasLabel?"form-label":"hidden"}"
2643
- >${this.label?He(this.label):""}<slot
2633
+ >${this.label?Be(this.label):""}<slot
2644
2634
  name="label"
2645
2635
  @slotchange=${this.hasSlotOrProps}
2646
2636
  ></slot
@@ -2652,22 +2642,23 @@
2652
2642
  id="${this.id||"form-element"}"
2653
2643
  @input=${this.handleChange}
2654
2644
  @blur=${this.handleBlur}
2645
+ .name=${this.name}
2646
+ .value=${this.value}
2655
2647
  ?disabled=${this.disabled}
2656
2648
  ?required=${this.required}
2657
2649
  ?autofocus=${this.autofocus}
2658
- rows=${te(this.rows)}
2659
- cols=${te(this.cols)}
2660
- maxlength=${te(this.maxlength)}
2661
- minlength=${te(this.minlength)}
2650
+ rows=${se(this.rows)}
2651
+ cols=${se(this.cols)}
2652
+ maxlength=${se(this.maxlength)}
2653
+ minlength=${se(this.minlength)}
2662
2654
  ?readonly=${this.readonly}
2663
- spellcheck=${te(this.spellcheck)}
2664
- autocomplete=${te(this.autocomplete)}
2665
- tabindex=${te(this.tabindex)}
2666
- wrap=${te(this.wrap)}
2655
+ autocomplete=${se(this.autocomplete)}
2656
+ tabindex=${se(this.tabindex)}
2657
+ wrap=${se(this.wrap)}
2667
2658
  placeholder="${this.placeholder}"
2668
2659
  class="form-element textarea custom-scroll"
2669
- aria-label=${te(this.ariaLabel)}
2670
- aria-labelledby=${te(this.ariaLabelledby)}
2660
+ aria-label=${se(this.ariaLabel)}
2661
+ aria-labelledby=${se(this.ariaLabelledby)}
2671
2662
  style=${$t(t)}
2672
2663
  >
2673
2664
  ${this.value}</textarea
@@ -2678,14 +2669,14 @@ ${this.value}</textarea
2678
2669
  name="description"
2679
2670
  @slotchange=${this.hasSlotOrProps}
2680
2671
  class="${this.hasDescription?"form-description":"hidden"}"
2681
- >${this.description?R`${He(this.description)}`:""}</slot
2672
+ >${this.description?R`${Be(this.description)}`:""}</slot
2682
2673
  >
2683
- `}};yt.styles=[rs,oo,Qi,Xi,Zr,X`
2674
+ `}};wt.styles=[Jt,lo,sn,rn,Jr,Z`
2684
2675
  textarea {
2685
2676
  overflow-y: auto !important;
2686
2677
  font-size: inherit;
2687
2678
  }
2688
- `],Lt([h({type:String})],yt.prototype,"size",2),Lt([h({type:Number})],yt.prototype,"rows",2),Lt([h({type:Number})],yt.prototype,"cols",2),Lt([h({type:Number})],yt.prototype,"maxlength",2),Lt([h({type:Number})],yt.prototype,"minlength",2),Lt([h({type:String})],yt.prototype,"wrap",2),Lt([h({type:Boolean})],yt.prototype,"readonly",2),Lt([h({type:String})],yt.prototype,"placeholder",2),Lt([h({type:String})],yt.prototype,"resize",2),Lt([mt({slot:"label",flatten:!0})],yt.prototype,"slotLabelNodes",2),Lt([mt({slot:"description",flatten:!0})],yt.prototype,"slotDescriptionNodes",2),Lt([Ae()],yt.prototype,"hasDescription",2),Lt([Ae()],yt.prototype,"hasLabel",2),yt=Lt([Q(Up)],yt);var qp=Object.getOwnPropertyDescriptor,Bp=(t,e,s,i)=>{for(var r=i>1?void 0:i?qp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};let ho=class extends J{render(){return R`<slot></slot>`}};ho.styles=[X`
2679
+ `],Mt([h({type:String})],wt.prototype,"size",2),Mt([h({type:Number})],wt.prototype,"rows",2),Mt([h({type:Number})],wt.prototype,"cols",2),Mt([h({type:Number})],wt.prototype,"maxlength",2),Mt([h({type:Number})],wt.prototype,"minlength",2),Mt([h({type:String})],wt.prototype,"wrap",2),Mt([h({type:Boolean})],wt.prototype,"readonly",2),Mt([h({type:String})],wt.prototype,"placeholder",2),Mt([h({type:String})],wt.prototype,"resize",2),Mt([bt({slot:"label",flatten:!0})],wt.prototype,"slotLabelNodes",2),Mt([bt({slot:"description",flatten:!0})],wt.prototype,"slotDescriptionNodes",2),Mt([xe()],wt.prototype,"hasDescription",2),Mt([xe()],wt.prototype,"hasLabel",2),wt=Mt([X(Bp)],wt);var Vp=Object.getOwnPropertyDescriptor,Wp=(t,e,s,r)=>{for(var i=r>1?void 0:r?Vp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};let po=class extends Q{render(){return R`<slot></slot>`}};po.styles=[Z`
2689
2680
  :host {
2690
2681
  font-size: 1.125rem;
2691
2682
  line-height: 1.2;
@@ -2702,34 +2693,34 @@ ${this.value}</textarea
2702
2693
  font-size: 1rem;
2703
2694
  }
2704
2695
  }
2705
- `],ho=Bp([Q("sonic-legend-description")],ho);var Hp=Object.defineProperty,Vp=Object.getOwnPropertyDescriptor,ir=(t,e,s,i)=>{for(var r=i>1?void 0:i?Vp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Hp(e,s,r),r};const Wp="sonic-legend";let Ss=class extends J{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return R`<legend part="legend">
2696
+ `],po=Wp([X("sonic-legend-description")],po);var Kp=Object.defineProperty,Gp=Object.getOwnPropertyDescriptor,ir=(t,e,s,r)=>{for(var i=r>1?void 0:r?Gp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Kp(e,s,i),i};const Yp="sonic-legend";let ws=class extends Q{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return R`<legend part="legend">
2706
2697
  ${this.iconName?R`<div class="icon">
2707
2698
  <sonic-icon
2708
2699
  name=${this.iconName}
2709
- prefix=${te(this.iconPrefix)}
2710
- library=${te(this.iconLibrary)}
2700
+ prefix=${se(this.iconPrefix)}
2701
+ library=${se(this.iconLibrary)}
2711
2702
  ></sonic-icon>
2712
2703
  </div>`:""}
2713
2704
 
2714
2705
  <div class="legend-content">
2715
- ${He(this.label?this.label:"")}
2706
+ ${Be(this.label?this.label:"")}
2716
2707
  ${this.description?R`<sonic-legend-description
2717
- >${He(this.description)}</sonic-legend-description
2708
+ >${Be(this.description)}</sonic-legend-description
2718
2709
  >`:""}
2719
2710
  <slot></slot>
2720
2711
  </div>
2721
2712
  <slot name="suffix"></slot>
2722
- </legend>`}};Ss.styles=[X`
2713
+ </legend>`}};ws.styles=[Z`
2723
2714
  :host {
2724
- --sc-legend-font-size: 1.25rem;
2725
- --sc-legend-font-weight: var(--sc-font-weight-base, 400);
2726
- --sc-legend-font-style: var(--sc-headings-font-style, normal);
2727
- --sc-legend-family: var(
2715
+ --sc-_font-size: 1.25rem;
2716
+ --sc-_font-weight: var(--sc-font-weight-base, 400);
2717
+ --sc-_font-style: var(--sc-headings-font-style, normal);
2718
+ --sc-_font-family: var(
2728
2719
  --sc-headings-font-family,
2729
2720
  var(--sc-font-family-base, sans-serif)
2730
2721
  );
2731
- --sc-legend-line-height: var(--sc-headings-line-height, 1.1);
2732
- --sc-legend-color: var(--sc-base-content, #000);
2722
+ --sc-_line-height: var(--sc-headings-line-height, 1.1);
2723
+ --sc-_color: var(--sc-base-content, #000);
2733
2724
  display: flex;
2734
2725
  width: 100%;
2735
2726
  container-type: inline-size;
@@ -2737,16 +2728,16 @@ ${this.value}</textarea
2737
2728
 
2738
2729
  @container (max-inline-size: 28rem) {
2739
2730
  legend {
2740
- --sc-legend-font-size: 1.3rem;
2731
+ --sc-_font-size: 1.3rem;
2741
2732
  }
2742
2733
  }
2743
2734
  legend {
2744
- font-size: var(--sc-legend-font-size);
2745
- font-weight: var(--sc-legend-font-weight);
2746
- font-style: var(--sc-legend-font-style);
2747
- font-family: var(--sc-legend-font-family);
2748
- line-height: var(--sc-legend-line-height);
2749
- color: var(--sc-legend-color);
2735
+ font-size: var(--sc-_font-size);
2736
+ font-weight: var(--sc-_font-weight);
2737
+ font-style: var(--sc-_font-style);
2738
+ font-family: var(--sc-_font-family);
2739
+ line-height: var(--sc-_line-height);
2740
+ color: var(--sc-_color);
2750
2741
  padding: 0;
2751
2742
  display: flex;
2752
2743
  width: 100%;
@@ -2763,33 +2754,29 @@ ${this.value}</textarea
2763
2754
  .legend-content {
2764
2755
  flex-grow: 1;
2765
2756
  }
2766
- `],ir([h({type:Boolean})],Ss.prototype,"forceAutoFill",2),ir([h()],Ss.prototype,"description",1),ir([h()],Ss.prototype,"label",1),ir([h({type:String})],Ss.prototype,"iconName",2),ir([h({type:String})],Ss.prototype,"iconLibrary",2),ir([h({type:String})],Ss.prototype,"iconPrefix",2),Ss=ir([Q(Wp)],Ss);var Kp=Object.defineProperty,Gp=Object.getOwnPropertyDescriptor,os=(t,e,s,i)=>{for(var r=i>1?void 0:i?Gp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Kp(e,s,r),r};const Yp="sonic-fieldset";let Vt=class extends kt(J){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return R`<fieldset
2767
- form="${te(this.form)}"
2768
- ?disabled="${this.disabled}"
2769
- >
2770
- ${this.label?R` <sonic-legend
2771
- label=${te(this.label)}
2772
- description=${te(this.description)}
2773
- iconName=${te(this.iconName)}
2774
- iconPrefix=${te(this.iconPrefix)}
2775
- iconLibrary=${te(this.iconLibrary)}
2776
- ></sonic-legend>`:se}
2757
+ `],ir([h({type:Boolean})],ws.prototype,"forceAutoFill",2),ir([h()],ws.prototype,"description",1),ir([h()],ws.prototype,"label",1),ir([h({type:String})],ws.prototype,"iconName",2),ir([h({type:String})],ws.prototype,"iconLibrary",2),ir([h({type:String})],ws.prototype,"iconPrefix",2),ws=ir([X(Yp)],ws);var Zp=Object.defineProperty,Jp=Object.getOwnPropertyDescriptor,as=(t,e,s,r)=>{for(var i=r>1?void 0:r?Jp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Zp(e,s,i),i};const Qp="sonic-fieldset";let Vt=class extends Ot(Q){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return R`<fieldset form="${se(this.form)}" ?disabled="${this.disabled}">
2758
+ ${this.label?R`<sonic-legend
2759
+ label=${se(this.label)}
2760
+ description=${se(this.description)}
2761
+ iconName=${se(this.iconName)}
2762
+ iconPrefix=${se(this.iconPrefix)}
2763
+ iconLibrary=${se(this.iconLibrary)}
2764
+ ></sonic-legend>`:ee}
2777
2765
  <slot></slot>
2778
- </fieldset>`}};Vt.styles=[X`
2766
+ </fieldset>`}};Vt.styles=[Z`
2779
2767
  :host {
2780
- --sc-fieldset-mt: 0;
2781
- --sc-fieldset-mb: 1rem;
2782
- --sc-fieldset-border-color: var(--sc-border-color);
2783
- --sc-fieldset-border-width: var(--sc-form-border-width);
2784
- --sc-fieldset-px: 1.25rem;
2785
- --sc-fieldset-py: 1.8rem;
2786
-
2787
- margin-top: var(--sc-fieldset-mt);
2788
- margin-bottom: var(--sc-fieldset-mb);
2768
+ --sc-_mt: 0;
2769
+ --sc-_mb: 1rem;
2770
+ --sc-_border-color: var(--sc-border-color);
2771
+ --sc-_border-width: var(--sc-form-border-width);
2772
+ --sc-_px: 1.25rem;
2773
+ --sc-_py: 1.8rem;
2774
+
2775
+ margin-top: var(--sc-_mt);
2776
+ margin-bottom: var(--sc-_mb);
2789
2777
  display: block;
2790
- border: var(--sc-fieldset-border-width) solid
2791
- var(--sc-fieldset-border-color) !important;
2792
- padding: var(--sc-fieldset-py) var(--sc-fieldset-px);
2778
+ border: var(--sc-_border-width) solid var(--sc-_border-color) !important;
2779
+ padding: var(--sc-_py) var(--sc-_px);
2793
2780
  border-radius: var(--sc-rounded-lg);
2794
2781
  }
2795
2782
 
@@ -2800,15 +2787,14 @@ ${this.value}</textarea
2800
2787
 
2801
2788
  :host([variant="shadow"]),
2802
2789
  :host([variant="ghost"]) {
2803
- --sc-fieldset-border-color: transparent;
2790
+ --sc-_border-color: transparent;
2804
2791
  }
2805
2792
  :host([variant="shadow"]) {
2806
- --sc-fieldset-border-color: transparent;
2807
2793
  box-shadow: var(--sc-shadow-lg);
2808
2794
  }
2809
2795
 
2810
2796
  :host([tight]) {
2811
- --sc-fieldset-px: 0;
2797
+ --sc-_px: 0;
2812
2798
  border-left: none !important;
2813
2799
  border-right: none !important;
2814
2800
  border-radius: 0;
@@ -2824,44 +2810,42 @@ ${this.value}</textarea
2824
2810
  ::slotted(sonic-legend:last-child) {
2825
2811
  margin-bottom: 0;
2826
2812
  }
2827
- `],os([h({type:Boolean,reflect:!0})],Vt.prototype,"disabled",2),os([h({type:String})],Vt.prototype,"form",2),os([h({type:String})],Vt.prototype,"label",2),os([h({type:String})],Vt.prototype,"description",2),os([h({type:String})],Vt.prototype,"iconName",2),os([h({type:String})],Vt.prototype,"iconLibrary",2),os([h({type:String})],Vt.prototype,"iconPrefix",2),os([h({type:Boolean,reflect:!0})],Vt.prototype,"tight",2),os([h({type:String,reflect:!0})],Vt.prototype,"variant",2),Vt=os([Q(Yp)],Vt);var Zp=Object.defineProperty,Jp=Object.getOwnPropertyDescriptor,uo=(t,e,s,i)=>{for(var r=i>1?void 0:i?Jp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Zp(e,s,r),r};const Qp="sonic-form-layout";let ri=class extends kt(J){constructor(){super(...arguments),this._resizeController=new Cl(this,{}),this.oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter(s=>e.includes(s.nodeName.toLowerCase())),this.oneFormElement=t.length==1}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return R`<div class=${ao(t)}>
2813
+ `],as([h({type:Boolean,reflect:!0})],Vt.prototype,"disabled",2),as([h({type:String})],Vt.prototype,"form",2),as([h({type:String})],Vt.prototype,"label",2),as([h({type:String})],Vt.prototype,"description",2),as([h({type:String})],Vt.prototype,"iconName",2),as([h({type:String})],Vt.prototype,"iconLibrary",2),as([h({type:String})],Vt.prototype,"iconPrefix",2),as([h({type:Boolean,reflect:!0})],Vt.prototype,"tight",2),as([h({type:String,reflect:!0})],Vt.prototype,"variant",2),Vt=as([X(Qp)],Vt);var Xp=Object.defineProperty,ef=Object.getOwnPropertyDescriptor,fo=(t,e,s,r)=>{for(var i=r>1?void 0:r?ef(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Xp(e,s,i),i};const tf="sonic-form-layout";let ii=class extends Q{constructor(){super(...arguments),this._resizeController=new Tl(this,{}),this._oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter(s=>e.includes(s.nodeName.toLowerCase())),this._oneFormElement=t.length==1}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this._oneFormElement};return R`<div class=${Ki(t)}>
2828
2814
  <slot @slotchange=${this.onSlotChange}></slot>
2829
- </div>`}};ri.styles=[X`
2815
+ </div>`}};ii.styles=[Z`
2830
2816
  :host {
2831
2817
  display: block;
2832
2818
  }
2833
2819
 
2834
2820
  div {
2835
2821
  display: grid;
2836
- grid-gap: 1.5rem;
2822
+ grid-gap: 1.25rem;
2837
2823
  align-items: flex-start;
2838
2824
  }
2839
2825
 
2840
2826
  .cq--md {
2841
- grid-gap: 1.75rem;
2827
+ grid-gap: 1.35rem;
2842
2828
  grid-template-columns: repeat(2, minmax(0, 1fr));
2843
2829
  }
2844
2830
  .one-form-element {
2845
2831
  grid-template-columns: 1fr;
2846
2832
  }
2847
- /*::slotted(sonic-radio),
2848
- ::slotted(sonic-checkbox),
2849
- ::slotted(sonic-form-actions),
2850
- ::slotted(sonic-divider),
2851
- ::slotted(sonic-textarea) {
2852
- grid-column: 1 / -1;
2853
- }*/
2854
2833
  ::slotted(sonic-submit) {
2855
2834
  display: contents;
2856
2835
  }
2857
- ::slotted(:not(sonic-input):not(sonic-select):not(sonic-input-autocomplete):not(.form-item-container)) {
2836
+ ::slotted(
2837
+ :not(sonic-input):not(sonic-select):not(sonic-input-autocomplete):not(
2838
+ .form-item-container
2839
+ )
2840
+ ) {
2858
2841
  grid-column: 1 / -1;
2859
2842
  }
2860
2843
 
2861
2844
  ::slotted(sonic-divider) {
2862
- --sc-divider-my: 0;
2845
+ margin-top: 0;
2846
+ margin-bottom: 0;
2863
2847
  }
2864
- `],uo([Fr({flatten:!0})],ri.prototype,"slottedElements",2),uo([h({type:Boolean})],ri.prototype,"oneFormElement",2),ri=uo([Q(Qp)],ri);var Xp=Object.defineProperty,ef=Object.getOwnPropertyDescriptor,po=(t,e,s,i)=>{for(var r=i>1?void 0:i?ef(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Xp(e,s,r),r};const tf="sonic-form-actions";let ii=class extends J{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const t={flexDirection:this.direction,justifyContent:this.justify};return R`<slot style=${$t(t)}></slot>`}};ii.styles=[X`
2848
+ `],fo([Rr({flatten:!0})],ii.prototype,"slottedElements",2),fo([xe()],ii.prototype,"_oneFormElement",2),ii=fo([X(tf)],ii);var sf=Object.defineProperty,rf=Object.getOwnPropertyDescriptor,on=(t,e,s,r)=>{for(var i=r>1?void 0:r?rf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&sf(e,s,i),i};const nf="sonic-form-actions";let kr=class extends Q{constructor(){super(...arguments),this.direction="row",this.justify="flex-start",this.alignItems="center"}render(){const t={flexDirection:this.direction,justifyContent:this.justify,alignItems:this.alignItems};return R`<slot style=${$t(t)}></slot>`}};kr.styles=[Z`
2865
2849
  :host {
2866
2850
  display: block;
2867
2851
  }
@@ -2870,8 +2854,8 @@ ${this.value}</textarea
2870
2854
  flex-wrap: wrap;
2871
2855
  gap: 0.3rem;
2872
2856
  }
2873
- `],po([h({type:String})],ii.prototype,"direction",2),po([h({type:String})],ii.prototype,"justify",2),ii=po([Q(tf)],ii);var sf=Object.defineProperty,rf=Object.getOwnPropertyDescriptor,js=(t,e,s,i)=>{for(var r=i>1?void 0:i?rf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&sf(e,s,r),r};const nf="sonic-group";let as=class extends J{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),e=t.length;e>1&&t.forEach((s,i)=>{const r=s;i===0?(r.style.setProperty("--sc-item-rounded-tr","0"),r.style.setProperty("--sc-item-rounded-br","0")):i===e-1?(r.style.setProperty("--sc-item-rounded-tl","0"),r.style.setProperty("--sc-item-rounded-bl","0")):(r.style.setProperty("--sc-item-rounded-tr","0"),r.style.setProperty("--sc-item-rounded-br","0"),r.style.setProperty("--sc-item-rounded-tl","0"),r.style.setProperty("--sc-item-rounded-bl","0"))})}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){const t={alignItems:this.alignItems};return R`<span class="${this.hasLabel?"form-label":"hidden"}"
2874
- >${this.label?He(this.label):""}<slot
2857
+ `],on([h({type:String})],kr.prototype,"direction",2),on([h({type:String})],kr.prototype,"justify",2),on([h({type:String})],kr.prototype,"alignItems",2),kr=on([X(nf)],kr);var of=Object.defineProperty,af=Object.getOwnPropertyDescriptor,js=(t,e,s,r)=>{for(var i=r>1?void 0:r?af(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&of(e,s,i),i};const lf="sonic-group";let ls=class extends Q{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),e=t.length;e>1&&t.forEach((s,r)=>{const i=s;r===0?(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0")):r===e-1?(i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0")):(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0"),i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0"))})}willUpdate(t){super.willUpdate(t),this.hasSlotOrProps()}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){const t={alignItems:this.alignItems};return R`<span class="${this.hasLabel?"form-label":"hidden"}"
2858
+ >${this.label?Be(this.label):ee}<slot
2875
2859
  name="label"
2876
2860
  @slotchange=${this.hasSlotOrProps}
2877
2861
  ></slot
@@ -2882,8 +2866,8 @@ ${this.value}</textarea
2882
2866
  @slotchange=${this.hasSlotOrProps}
2883
2867
  class="${this.hasDescription?"form-description":"hidden"}"
2884
2868
  >
2885
- ${this.description?R`${He(this.description)}`:""}
2886
- </slot>`}};as.styles=[rs,Qi,Xi,X`
2869
+ ${this.description?R`${Be(this.description)}`:ee}
2870
+ </slot>`}};ls.styles=[Jt,sn,rn,Z`
2887
2871
  :host {
2888
2872
  display: inline-block;
2889
2873
  vertical-align: middle;
@@ -2903,7 +2887,7 @@ ${this.value}</textarea
2903
2887
  ::slotted(sonic-select) {
2904
2888
  flex-grow: 1;
2905
2889
  }
2906
- `],js([h({type:String})],as.prototype,"alignItems",2),js([h({type:String})],as.prototype,"label",2),js([h({type:String})],as.prototype,"description",2),js([mt({slot:"label",flatten:!0})],as.prototype,"slotLabelNodes",2),js([mt({slot:"description",flatten:!0})],as.prototype,"slotDescriptionNodes",2),js([Ae()],as.prototype,"hasDescription",2),js([Ae()],as.prototype,"hasLabel",2),as=js([Q(nf)],as);const of=X`
2890
+ `],js([h({type:String})],ls.prototype,"alignItems",2),js([h({type:String})],ls.prototype,"label",2),js([h({type:String})],ls.prototype,"description",2),js([bt({slot:"label",flatten:!0})],ls.prototype,"slotLabelNodes",2),js([bt({slot:"description",flatten:!0})],ls.prototype,"slotDescriptionNodes",2),js([xe()],ls.prototype,"hasDescription",2),js([xe()],ls.prototype,"hasLabel",2),ls=js([X(lf)],ls);const cf=Z`
2907
2891
  :host {
2908
2892
  --sc-_rounded: 0;
2909
2893
  border-radius: var(--sc-_rounded);
@@ -2934,7 +2918,7 @@ ${this.value}</textarea
2934
2918
  :host([rounded="none"]) {
2935
2919
  --sc-_rounded: 0 !important;
2936
2920
  }
2937
- `;var af=Object.defineProperty,lf=Object.getOwnPropertyDescriptor,ls=(t,e,s,i)=>{for(var r=i>1?void 0:i?lf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&af(e,s,r),r};const cf="sonic-image";let Wt=class extends J{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.cover=!1}firstUpdated(t){if(this.transition){const e=this.shadowRoot?.querySelector("img");if(!e)return;e.onload=function(){e.classList.add("loaded")}}super.firstUpdated(t)}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return R`<div>
2921
+ `;var hf=Object.defineProperty,uf=Object.getOwnPropertyDescriptor,cs=(t,e,s,r)=>{for(var i=r>1?void 0:r?uf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&hf(e,s,i),i};const df="sonic-image";let Wt=class extends Q{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.cover=!1}firstUpdated(t){if(this.transition){const e=this.shadowRoot?.querySelector("img");if(!e)return;e.onload=function(){e.classList.add("loaded")}}super.firstUpdated(t)}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return R`<div>
2938
2922
  <picture
2939
2923
  ><img
2940
2924
  src="${this.src}"
@@ -2942,7 +2926,7 @@ ${this.value}</textarea
2942
2926
  alt="${this.alt}"
2943
2927
  style=${$t(t)}
2944
2928
  /></picture>
2945
- </div>`}};Wt.styles=[of,X`
2929
+ </div>`}};Wt.styles=[cf,Z`
2946
2930
  :host {
2947
2931
  --sc-_bg: var(--sc-placeholder-bg, rgba(12, 12, 12, 0.05));
2948
2932
  background: var(--sc-_bg);
@@ -2987,22 +2971,18 @@ ${this.value}</textarea
2987
2971
  opacity: 1;
2988
2972
  scale: 1;
2989
2973
  }
2990
- `],ls([h({type:String,reflect:!0})],Wt.prototype,"rounded",2),ls([h({type:String})],Wt.prototype,"src",2),ls([h({type:String})],Wt.prototype,"alt",2),ls([h({type:String})],Wt.prototype,"loading",2),ls([h({type:String,reflect:!0})],Wt.prototype,"transition",2),ls([h({type:String})],Wt.prototype,"ratio",2),ls([h({type:String})],Wt.prototype,"objectPosition",2),ls([h({type:String})],Wt.prototype,"imageRendering",2),ls([h({type:Boolean,reflect:!0})],Wt.prototype,"cover",2),Wt=ls([Q(cf)],Wt);var hf=Object.defineProperty,uf=Object.getOwnPropertyDescriptor,Mt=(t,e,s,i)=>{for(var r=i>1?void 0:i?uf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&hf(e,s,r),r};const kl=t=>Fr(t),df="sonic-menu";let wt=class extends J{constructor(){super(...arguments),this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.attributeObserver=null,this.minWidth="0",this.hasMoreElements=!1,this.handleScrollEnd=()=>{this.setScrollShadow(this.menuContent,this.direction)},this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this.menuContent,this.direction))}}checkIfMore(){this.hasMoreElements=!!this.moreElements?.length}moreSlotChange(){this.checkIfMore(),this.updateIsScollable()}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size),super.updated(t)}setDividersSize(t){t.forEach(e=>{e.setAttribute("size","sm"),this.direction=="row"?e.style.setProperty("margin","0 .1rem "):e.style.setProperty("margin"," 0.1rem 0")})}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.setDividersSize(this.menuChildren),this.updateIsScollable(),this.updateScrollPosition(),this.observeMenuItemsAttributes()}observeMenuItemsAttributes(){this.attributeObserver?.disconnect(),this.attributeObserver=new MutationObserver(()=>{this.updateScrollPosition()}),this.menuChildren.forEach(t=>{this.attributeObserver.observe(t,{attributes:!0,attributeFilter:["active"]})})}updateScrollPosition(){if(this.scrollable){const t=this.menuChildren.filter(e=>e.hasAttribute("active")&&e.getAttribute("active")!=="false");t.length===1&&requestAnimationFrame(()=>{t[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}firstUpdated(t){this.menuContent.addEventListener("scrollend",this.handleScrollEnd)}disconnectedCallback(){this.observer?.disconnect(),this.attributeObserver?.disconnect(),this.menuContent.removeEventListener("scrollend",this.handleScrollEnd),super.disconnectedCallback()}initScrollable(){let t=!1,e,s;this.scrollable&&(this.addEventListener("mousedown",i=>{t=!0,this.classList.add("active"),e=i.pageX-this.menuContent.offsetLeft,s=this.menuContent.scrollLeft}),this.addEventListener("mouseleave",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mouseup",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mousemove",i=>{if(!t)return;i.preventDefault();const n=(i.pageX-this.menuContent.offsetLeft-e)*1.5;this.menuContent.scrollLeft=s-n,this.setScrollShadow(this.menuContent,this.direction)}),this.addEventListener("scroll",i=>{i.preventDefault(),this.setScrollShadow(this.menuContent,this.direction)}))}setScrollShadow(t,e){e=="row"?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):e=="column"&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach(e=>{this.size&&e.setAttribute("size",this.size),this.align&&e.getAttribute("shape")!="square"&&e.getAttribute("shape")!="circle"&&e.setAttribute("align",this.align),this.direction=="row"&&e.getAttribute("shape")=="block"&&e.setAttribute("shape","default")})}render(){const t={minWidth:this.minWidth,flexDirection:this.direction},e=this.direction=="row",s={gap:this.gap,flexDirection:this.direction},i={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},r={marginLeft:e?"":".55em"};return R`<menu
2991
- part="menu"
2992
- class="shadowable"
2993
- style=${$t(t)}
2994
- >
2974
+ `],cs([h({type:String,reflect:!0})],Wt.prototype,"rounded",2),cs([h({type:String})],Wt.prototype,"src",2),cs([h({type:String})],Wt.prototype,"alt",2),cs([h({type:String})],Wt.prototype,"loading",2),cs([h({type:String,reflect:!0})],Wt.prototype,"transition",2),cs([h({type:String})],Wt.prototype,"ratio",2),cs([h({type:String})],Wt.prototype,"objectPosition",2),cs([h({type:String})],Wt.prototype,"imageRendering",2),cs([h({type:Boolean,reflect:!0})],Wt.prototype,"cover",2),Wt=cs([X(df)],Wt);var pf=Object.defineProperty,ff=Object.getOwnPropertyDescriptor,It=(t,e,s,r)=>{for(var i=r>1?void 0:r?ff(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&pf(e,s,i),i};const mo=t=>Rr(t),mf="sonic-menu";let _t=class extends Q{constructor(){super(...arguments),this.direction="column",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.attributeObserver=null,this.scrollDragBound=!1,this.minWidth="0",this.hasMoreElements=!1,this.handleScrollEnd=()=>{this.setScrollShadow(this.menuContent,this.direction)},this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this.menuContent,this.direction))}}checkIfMore(){this.hasMoreElements=!!this.moreElements?.length}moreSlotChange(){this.checkIfMore(),this.updateIsScollable()}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size),super.updated(t)}setDividersSize(t){t.forEach(e=>{e.setAttribute("size","sm"),this.direction=="row"?e.style.setProperty("margin","0 .1rem "):e.style.setProperty("margin"," 0.1rem 0")})}mainSlotChange(){this.setChildrenSize(this.menuItemChildren),this.setDividersSize(this.dividerChildren),this.updateIsScollable(),this.updateScrollPosition(),this.observeMenuItemsAttributes()}observeMenuItemsAttributes(){this.attributeObserver?.disconnect(),this.attributeObserver=new MutationObserver(()=>{this.updateScrollPosition()}),this.menuItemChildren.forEach(t=>{this.attributeObserver.observe(t,{attributes:!0,attributeFilter:["active"]})})}updateScrollPosition(){if(this.scrollable){const t=this.menuItemChildren.filter(e=>e.hasAttribute("active")&&e.getAttribute("active")!=="false");t.length===1&&requestAnimationFrame(()=>{t[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}firstUpdated(t){this.menuContent.addEventListener("scrollend",this.handleScrollEnd)}disconnectedCallback(){this.observer?.disconnect(),this.attributeObserver?.disconnect(),this.menuContent.removeEventListener("scrollend",this.handleScrollEnd),super.disconnectedCallback()}initScrollable(){if(!this.scrollable||this.scrollDragBound)return;this.scrollDragBound=!0;let t=!1,e,s;this.addEventListener("mousedown",r=>{t=!0,this.classList.add("active"),e=r.pageX-this.menuContent.offsetLeft,s=this.menuContent.scrollLeft}),this.addEventListener("mouseleave",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mouseup",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mousemove",r=>{if(!t)return;r.preventDefault();const n=(r.pageX-this.menuContent.offsetLeft-e)*1.5;this.menuContent.scrollLeft=s-n,this.setScrollShadow(this.menuContent,this.direction)}),this.addEventListener("scroll",r=>{r.preventDefault(),this.setScrollShadow(this.menuContent,this.direction)})}setScrollShadow(t,e){e=="row"?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):e=="column"&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach(e=>{this.size&&e.setAttribute("size",this.size),this.align&&e.getAttribute("shape")!="square"&&e.getAttribute("shape")!="circle"&&e.setAttribute("align",this.align),this.direction=="row"&&e.getAttribute("shape")=="block"&&e.setAttribute("shape","default")})}render(){const t={minWidth:this.minWidth,flexDirection:this.direction},e=this.direction=="row",s={flexDirection:this.direction},r={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:e?"":".55em"};return R`<menu class="shadowable" style=${$t(t)}>
2995
2975
  <slot
2996
2976
  @slotchange=${this.mainSlotChange}
2997
2977
  id="menu-content"
2998
2978
  style=${$t(s)}
2999
2979
  ></slot>
3000
2980
  <sonic-pop
3001
- style=${$t(i)}
2981
+ style=${$t(r)}
3002
2982
  class=${this.hasMoreElements?"":"hidden"}
3003
2983
  >
3004
2984
  <sonic-menu-item
3005
- style=${$t(r)}
2985
+ style=${$t(i)}
3006
2986
  class="more-btn"
3007
2987
  shape=${this.moreShape}
3008
2988
  align="center"
@@ -3018,10 +2998,10 @@ ${this.value}</textarea
3018
2998
  slot="content"
3019
2999
  ></slot>
3020
3000
  </sonic-pop>
3021
- </menu>`}};wt.styles=[X`
3001
+ </menu>`}};_t.styles=[Z`
3022
3002
  :host {
3023
3003
  display: block;
3024
- --sc-menu-gap: 0.15rem;
3004
+ --sc-_gap: 0.15rem;
3025
3005
  }
3026
3006
 
3027
3007
  :host > menu {
@@ -3034,9 +3014,14 @@ ${this.value}</textarea
3034
3014
  display: none !important;
3035
3015
  }
3036
3016
 
3017
+ :host([shadow]) .shadowable {
3018
+ border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
3019
+ }
3020
+
3037
3021
  /* SCROLLABLE*/
3038
3022
  #menu-content {
3039
3023
  display: flex;
3024
+ gap: var(--sc-_gap);
3040
3025
  padding: 0.35em;
3041
3026
  margin: 0;
3042
3027
  }
@@ -3110,7 +3095,7 @@ ${this.value}</textarea
3110
3095
  to bottom,
3111
3096
  rgba(0, 0, 0, 0),
3112
3097
  rgba(0, 0, 0, 1) 10%
3113
- );queryAssignedElements
3098
+ );
3114
3099
  mask-image: linear-gradient(
3115
3100
  to bottom,
3116
3101
  rgba(0, 0, 0, 0),
@@ -3146,27 +3131,27 @@ ${this.value}</textarea
3146
3131
  rgba(0, 0, 0, 0) 100%
3147
3132
  );
3148
3133
  }
3149
- `,Pl],Mt([h({type:String,reflect:!0})],wt.prototype,"size",2),Mt([h({type:String,reflect:!0})],wt.prototype,"direction",2),Mt([h({type:String})],wt.prototype,"gap",2),Mt([h({type:String,reflect:!0})],wt.prototype,"align",2),Mt([h({type:String,reflect:!0})],wt.prototype,"shadow",2),Mt([h({type:String})],wt.prototype,"moreShape",2),Mt([h({type:Boolean})],wt.prototype,"scrollable",2),Mt([h({type:String})],wt.prototype,"minWidth",2),Mt([fs("menu")],wt.prototype,"menu",2),Mt([fs("#menu-content")],wt.prototype,"menuContent",2),Mt([kl({selector:"*"})],wt.prototype,"menuChildren",2),Mt([kl({slot:"more",selector:"*"})],wt.prototype,"moreElements",2),Mt([Ae()],wt.prototype,"hasMoreElements",2),wt=Mt([Q(df)],wt);var pf=Object.defineProperty,ff=Object.getOwnPropertyDescriptor,$l=(t,e,s,i)=>{for(var r=i>1?void 0:i?ff(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&pf(e,s,r),r};const gf="sonic-modal-actions";let tn=class extends J{firstUpdated(t){this.buttons?.forEach(e=>{e.hasAttribute("hideModal")&&e.addEventListener("click",()=>{bs.getClosestElement(this,"sonic-modal")?.hide()})}),super.firstUpdated(t)}render(){return R`<slot></slot>`}};tn.styles=[X`
3134
+ `,co],It([h({type:String,reflect:!0})],_t.prototype,"size",2),It([h({type:String,reflect:!0})],_t.prototype,"direction",2),It([h({type:String,reflect:!0})],_t.prototype,"align",2),It([h({type:String,reflect:!0})],_t.prototype,"shadow",2),It([h({type:String})],_t.prototype,"moreShape",2),It([h({type:Boolean})],_t.prototype,"scrollable",2),It([h({type:String})],_t.prototype,"minWidth",2),It([$s("menu")],_t.prototype,"menu",2),It([$s("#menu-content")],_t.prototype,"menuContent",2),It([mo({selector:"sonic-divider"})],_t.prototype,"dividerChildren",2),It([mo({selector:"sonic-menu-item"})],_t.prototype,"menuItemChildren",2),It([mo({slot:"more",selector:"*"})],_t.prototype,"moreElements",2),It([xe()],_t.prototype,"hasMoreElements",2),_t=It([X(mf)],_t);var gf=Object.defineProperty,bf=Object.getOwnPropertyDescriptor,Ll=(t,e,s,r)=>{for(var i=r>1?void 0:r?bf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&gf(e,s,i),i};const vf="sonic-modal-actions";let an=class extends Q{firstUpdated(t){this.buttons?.forEach(e=>{e.hasAttribute("hideModal")&&e.addEventListener("click",()=>{gs.getClosestElement(this,"sonic-modal")?.hide()})}),super.firstUpdated(t)}render(){return R`<slot></slot>`}};an.styles=[Z`
3150
3135
  :host {
3151
3136
  display: flex;
3152
3137
  gap: 0.5rem;
3153
3138
  margin-top: auto;
3154
3139
  padding-top: 1.5rem;
3155
3140
  }
3156
- `],$l([Fr({selector:"sonic-button"})],tn.prototype,"buttons",2),tn=$l([Q(gf)],tn);var mf=Object.defineProperty,bf=Object.getOwnPropertyDescriptor,sn=(t,e,s,i)=>{for(var r=i>1?void 0:i?bf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&mf(e,s,r),r};const vf="sonic-modal-close";let ni=class extends J{constructor(){super(...arguments),this.translation={...ws.closeWindow}}render(){return R`<sonic-button
3141
+ `],Ll([Rr({selector:"sonic-button"})],an.prototype,"buttons",2),an=Ll([X(vf)],an);var yf=Object.defineProperty,wf=Object.getOwnPropertyDescriptor,ln=(t,e,s,r)=>{for(var i=r>1?void 0:r?wf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&yf(e,s,i),i};const _f="sonic-modal-close";let ni=class extends Q{constructor(){super(...arguments),this.translation={...is.closeWindow}}render(){return R`<sonic-button
3157
3142
  noAutoFill
3158
- reset=${te(this.reset)}
3143
+ reset=${se(this.reset)}
3159
3144
  shape="circle"
3160
- .ariaLabel=${zi(this.translation)}
3145
+ .ariaLabel=${Qr(this.translation)}
3161
3146
  @click=${this.handleClick}
3162
- type=${te(this.type)}
3147
+ type=${se(this.type)}
3163
3148
  ><sonic-icon name="cancel" size="lg"></sonic-icon
3164
- ></sonic-button>`}handleClick(){ze.getClosestElement(this,"sonic-modal").hide()}};sn([h()],ni.prototype,"translation",2),sn([h()],ni.prototype,"reset",2),sn([h()],ni.prototype,"type",2),ni=sn([Q(vf)],ni);var yf=Object.getOwnPropertyDescriptor,wf=(t,e,s,i)=>{for(var r=i>1?void 0:i?yf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const _f="sonic-modal-content";let fo=class extends J{render(){return R`<slot></slot>`}};fo.styles=[X`
3149
+ ></sonic-button>`}handleClick(){ze.getClosestElement(this,"sonic-modal").hide()}};ln([h()],ni.prototype,"translation",2),ln([h()],ni.prototype,"reset",2),ln([h()],ni.prototype,"type",2),ni=ln([X(_f)],ni);var Sf=Object.getOwnPropertyDescriptor,Pf=(t,e,s,r)=>{for(var i=r>1?void 0:r?Sf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const xf="sonic-modal-content";let go=class extends Q{render(){return R`<slot></slot>`}};go.styles=[Z`
3165
3150
  :host {
3166
3151
  display: block;
3167
3152
  width: 100%;
3168
3153
  }
3169
- `],fo=wf([Q(_f)],fo);var Sf=Object.getOwnPropertyDescriptor,Pf=(t,e,s,i)=>{for(var r=i>1?void 0:i?Sf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const xf="sonic-modal-subtitle";let go=class extends J{render(){return R`<slot></slot>`}};go.styles=[X`
3154
+ `],go=Pf([X(xf)],go);var Af=Object.getOwnPropertyDescriptor,Cf=(t,e,s,r)=>{for(var i=r>1?void 0:r?Af(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const kf="sonic-modal-subtitle";let bo=class extends Q{render(){return R`<slot></slot>`}};bo.styles=[Z`
3170
3155
  :host {
3171
3156
  font-size: 1.25rem;
3172
3157
  display: block;
@@ -3178,7 +3163,7 @@ ${this.value}</textarea
3178
3163
  font-weight: var(--sc-headings-font-weight, 700);
3179
3164
  font-style: var(--sc-headings-font-style, normal);
3180
3165
  }
3181
- `],go=Pf([Q(xf)],go);var Af=Object.getOwnPropertyDescriptor,Cf=(t,e,s,i)=>{for(var r=i>1?void 0:i?Af(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const kf="sonic-modal-title";let mo=class extends J{render(){return R`<slot></slot>`}};mo.styles=[X`
3166
+ `],bo=Cf([X(kf)],bo);var $f=Object.getOwnPropertyDescriptor,Df=(t,e,s,r)=>{for(var i=r>1?void 0:r?$f(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Ef="sonic-modal-title";let vo=class extends Q{render(){return R`<slot></slot>`}};vo.styles=[Z`
3182
3167
  :host {
3183
3168
  font-weight: bold;
3184
3169
  font-size: 1.5rem;
@@ -3191,7 +3176,7 @@ ${this.value}</textarea
3191
3176
  font-weight: var(--sc-headings-font-weight, 700);
3192
3177
  font-style: var(--sc-headings-font-style, normal);
3193
3178
  }
3194
- `],mo=Cf([Q(kf)],mo);var $f=Object.defineProperty,Df=Object.getOwnPropertyDescriptor,Je=(t,e,s,i)=>{for(var r=i>1?void 0:i?Df(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&$f(e,s,r),r};const Dl="sonic-modal";let Oe=class extends kt(J){constructor(){super(...arguments),this.forceAction=!1,this.noCloseButton=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.maxWidth="min(100vw, 40rem)",this.maxHeight="90vh",this.width="100%",this.height="fit-content",this.effect="slide",this.fullScreen=!1,this.visible=!1,this.closeOnLocationChange=!1,this.location="",this._animationState="hidden",this._adoptedStyleSheets=[],this._animationConfig={quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",linear:"linear",translateY:"translateY(2.5rem)",durationIn:300,durationOut:300}}static create(t){const e=document.createElement(Dl);return e.options=t,t.removeHashOnHide===!0&&e.setAttribute("removeHashOnHide","true"),t.removeOnHide===!0&&e.setAttribute("removeOnHide","true"),t.closeOnLocationChange===!0&&e.setAttribute("closeOnLocationChange","true"),t.maxWidth&&(e.maxWidth=t?.maxWidth),t.width&&(e.width=t?.width),t.maxHeight&&(e.maxHeight=t?.maxHeight),t.height&&(e.height=t?.height),t.forceAction&&(e.forceAction=!0),t.fullScreen&&(e.fullScreen=t?.fullScreen),t.effect&&(e.effect=t?.effect),t.noCloseButton&&(e.noCloseButton=!0),t.closeButtonType&&(e.closeButtonType=t?.closeButtonType),t.styleSheet&&(e.styleSheet=t?.styleSheet),t.paddingX&&(e.paddingX=t?.paddingX),t.paddingY&&(e.paddingY=t?.paddingY),t.zIndex&&(e.zIndex=t?.zIndex),Rt.getPopContainer().appendChild(e),e.updateComplete.then(()=>{e.show()}),e}connectedCallback(){Oe.modals.push(this),ht.onChange(this),super.connectedCallback()}disconnectedCallback(){ht.offChange(this),Oe.modals.splice(Oe.modals.indexOf(this),1),this.removeEventListener("keydown",this.handleEscape),super.disconnectedCallback()}firstUpdated(){this.addEventListener("keydown",this.handleEscape)}willUpdate(t){if(this.closeOnLocationChange&&t.has("location")){const e=t.get("location");e&&this.location&&this.location!==e&&setTimeout(()=>{this.hide()},50)}t.has("zIndex")&&this.style.setProperty("--sc-_z-index",this.zIndex||"990"),t.has("paddingX")&&this.style.setProperty("--sc-modal-px",this.paddingX||""),t.has("paddingY")&&this.style.setProperty("--sc-modal-py",this.paddingY||""),super.willUpdate(t)}updated(t){const e=!t.get("visible")&&this.visible,s=t.get("visible")&&!this.visible;e&&this._animationState==="hidden"?this.show():s&&this._animationState==="visible"&&this.hide(),t.has("styleSheet")&&this.syncAdoptedStyleSheets()}handleOverlayClick(t){!this.forceAction&&this._animationState==="visible"&&this.hide()}render(){const t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,pointerEvents:this._animationState!=="hidden"?"auto":"none"},e={display:this.fullScreen?"none":"block",pointerEvents:this._animationState==="visible"?"auto":"none"};return R`
3179
+ `],vo=Df([X(Ef)],vo);var Of=Object.defineProperty,Tf=Object.getOwnPropertyDescriptor,Je=(t,e,s,r)=>{for(var i=r>1?void 0:r?Tf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Of(e,s,i),i};const Ml="sonic-modal";let Oe=class extends Ot(Q){constructor(){super(...arguments),this.forceAction=!1,this.noCloseButton=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.maxWidth="min(100vw, 40rem)",this.maxHeight="90vh",this.width="100%",this.height="fit-content",this.effect="slide",this.fullScreen=!1,this.visible=!1,this.closeOnLocationChange=!1,this.location="",this._animationState="hidden",this._adoptedStyleSheets=[],this._animationConfig={quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",linear:"linear",translateY:"translateY(2.5rem)",durationIn:300,durationOut:300}}static create(t){const e=document.createElement(Ml);return e.options=t,t.removeHashOnHide===!0&&e.setAttribute("removeHashOnHide","true"),t.removeOnHide===!0&&e.setAttribute("removeOnHide","true"),t.closeOnLocationChange===!0&&e.setAttribute("closeOnLocationChange","true"),t.maxWidth&&(e.maxWidth=t?.maxWidth),t.width&&(e.width=t?.width),t.maxHeight&&(e.maxHeight=t?.maxHeight),t.height&&(e.height=t?.height),t.forceAction&&(e.forceAction=!0),t.fullScreen&&(e.fullScreen=t?.fullScreen),t.effect&&(e.effect=t?.effect),t.noCloseButton&&(e.noCloseButton=!0),t.closeButtonType&&(e.closeButtonType=t?.closeButtonType),t.styleSheet&&(e.styleSheet=t?.styleSheet),t.paddingX&&(e.paddingX=t?.paddingX),t.paddingY&&(e.paddingY=t?.paddingY),t.zIndex&&(e.zIndex=t?.zIndex),at.getPopContainer().appendChild(e),e.updateComplete.then(()=>{e.show()}),e}connectedCallback(){Oe.modals.push(this),dt.onChange(this),super.connectedCallback()}disconnectedCallback(){dt.offChange(this),Oe.modals.splice(Oe.modals.indexOf(this),1),this.removeEventListener("keydown",this.handleEscape),super.disconnectedCallback()}firstUpdated(){this.addEventListener("keydown",this.handleEscape)}willUpdate(t){if(this.closeOnLocationChange&&t.has("location")){const e=t.get("location");e&&this.location&&this.location!==e&&setTimeout(()=>{this.hide()},50)}t.has("zIndex")&&this.style.setProperty("--sc-_z-index",this.zIndex||"990"),t.has("paddingX")&&this.style.setProperty("--sc-modal-px",this.paddingX||""),t.has("paddingY")&&this.style.setProperty("--sc-modal-py",this.paddingY||""),super.willUpdate(t)}updated(t){const e=!t.get("visible")&&this.visible,s=t.get("visible")&&!this.visible;e&&this._animationState==="hidden"?this.show():s&&this._animationState==="visible"&&this.hide(),t.has("styleSheet")&&this.syncAdoptedStyleSheets()}handleOverlayClick(t){!this.forceAction&&this._animationState==="visible"&&this.hide()}render(){const t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,pointerEvents:this._animationState!=="hidden"?"auto":"none"},e={display:this.fullScreen?"none":"block",pointerEvents:this._animationState==="visible"?"auto":"none"};return R`
3195
3180
  <div
3196
3181
  id="backdrop"
3197
3182
  @click=${this.handleOverlayClick}
@@ -3207,14 +3192,14 @@ ${this.value}</textarea
3207
3192
  ${this._animationState!=="hidden"?R`<div id="modal-content">
3208
3193
  ${!this.forceAction&&!this.noCloseButton?R`<sonic-modal-close
3209
3194
  class="${this._animationState=="visible"?"animate-in":"animate-out"}"
3210
- type=${te(this.closeButtonType)}
3211
- ></sonic-modal-close>`:se}
3195
+ type=${se(this.closeButtonType)}
3196
+ ></sonic-modal-close>`:ee}
3212
3197
  ${this.modalFragment("title")} ${this.modalFragment("subtitle")}
3213
3198
  ${this.modalFragment("content")} ${this.modalFragment("actions")}
3214
3199
  <slot></slot>
3215
- </div>`:se}
3200
+ </div>`:ee}
3216
3201
  </dialog>
3217
- `}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=Kn(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...e,...t],this._adoptedStyleSheets=t}modalFragment(t){const e=this.options?.[t];if(!e)return se;let s;switch(e instanceof Object?s=e:s=He(e),t){case"title":return R`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return R`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return R`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return R`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return se}}async show(){this._modalElement.show(),this._animationState="in",await this.animation("in"),this._animationState="visible",this.visible=!0,this.dispatchEvent(new CustomEvent("show")),this._modalElement.focus()}async hide(){this._animationState="out",this.dispatchEvent(new CustomEvent("hide")),await this.animation("out"),this._modalElement.close(),this._animationState="hidden",this.visible=!1,this.hasAttribute("resetDataProviderOnHide")&&ve.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))}async dispose(){await this.hide(),this.remove()}static disposeAll(){Oe.modals.forEach(t=>{t.dispose()})}handleEscape(t){if(t.key==="Escape"){t.preventDefault();const e=Oe.modals.filter(s=>s._animationState!=="hidden"&&!s.forceAction);e.length>0&&e[e.length-1].hide()}}animation(t){return new Promise(e=>{const{quartOut:s,linear:i,translateY:r,durationIn:n,durationOut:o,quadOut:c}=this._animationConfig,d=this._modalElement;if(!d)return e();const m=t==="in",A=m?n:o,g=!this.fullScreen&&m?100:0;this.fullScreen||(m?this.style.setProperty("--sc-_backdrop-opacity","0.8"):setTimeout(()=>{this.style.setProperty("--sc-_backdrop-opacity","0")},150));const f=[];this.effect==="slide"&&(f.push(d.animate([{transform:m?r:"translateY(0)"},{transform:m?"translateY(0)":r}],{duration:A,easing:m?s:c,fill:"both",delay:g})),f.push(d.animate([{opacity:m?0:1},{opacity:m?1:0}],{duration:A,easing:i,fill:"both",delay:g}))),Promise.all(f.map(k=>k.finished)).then(()=>e())})}};Oe.styles=[Zr,X`
3202
+ `}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=Jn(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...e,...t],this._adoptedStyleSheets=t}modalFragment(t){const e=this.options?.[t];if(!e)return ee;let s;switch(e instanceof Object?s=e:s=Be(e),t){case"title":return R`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return R`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return R`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return R`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return ee}}async show(){this._modalElement.show(),this._animationState="in",await this.animation("in"),this._animationState="visible",this.visible=!0,this.dispatchEvent(new CustomEvent("show")),this._modalElement.focus()}async hide(){this._animationState="out",this.dispatchEvent(new CustomEvent("hide")),await this.animation("out"),this._modalElement.close(),this._animationState="hidden",this.visible=!1,this.hasAttribute("resetDataProviderOnHide")&&ve.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))}async dispose(){await this.hide(),this.remove()}static disposeAll(){Oe.modals.forEach(t=>{t.dispose()})}handleEscape(t){if(t.key==="Escape"){t.preventDefault();const e=Oe.modals.filter(s=>s._animationState!=="hidden"&&!s.forceAction);e.length>0&&e[e.length-1].hide()}}animation(t){return new Promise(e=>{const{quartOut:s,linear:r,translateY:i,durationIn:n,durationOut:o,quadOut:c}=this._animationConfig,d=this._modalElement;if(!d)return e();const g=t==="in",A=g?n:o,m=!this.fullScreen&&g?100:0;this.fullScreen||(g?this.style.setProperty("--sc-_backdrop-opacity","0.8"):setTimeout(()=>{this.style.setProperty("--sc-_backdrop-opacity","0")},150));const f=[];this.effect==="slide"&&(f.push(d.animate([{transform:g?i:"translateY(0)"},{transform:g?"translateY(0)":i}],{duration:A,easing:g?s:c,fill:"both",delay:m})),f.push(d.animate([{opacity:g?0:1},{opacity:g?1:0}],{duration:A,easing:r,fill:"both",delay:m}))),Promise.all(f.map(k=>k.finished)).then(()=>e())})}};Oe.styles=[Jr,Z`
3218
3203
  :host {
3219
3204
  --sc-modal-py: 2.5rem;
3220
3205
  --sc-modal-px: 1.5rem;
@@ -3365,15 +3350,15 @@ ${this.value}</textarea
3365
3350
  transform: scale(0) !important;
3366
3351
  transition: 0.2s linear !important;
3367
3352
  }
3368
- `],Oe.modals=[],Je([h({type:Boolean})],Oe.prototype,"forceAction",2),Je([h({type:Boolean})],Oe.prototype,"noCloseButton",2),Je([h({type:Boolean})],Oe.prototype,"removeOnHide",2),Je([h({type:Boolean})],Oe.prototype,"removeHashOnHide",2),Je([h({type:String,reflect:!0})],Oe.prototype,"align",2),Je([h({type:String})],Oe.prototype,"paddingX",2),Je([h({type:String})],Oe.prototype,"paddingY",2),Je([h({type:String})],Oe.prototype,"maxWidth",2),Je([h({type:String})],Oe.prototype,"maxHeight",2),Je([h({type:String})],Oe.prototype,"zIndex",2),Je([h({type:String})],Oe.prototype,"width",2),Je([h({type:String})],Oe.prototype,"height",2),Je([h({type:String})],Oe.prototype,"effect",2),Je([h({attribute:!1})],Oe.prototype,"styleSheet",2),Je([h({type:Object})],Oe.prototype,"options",2),Je([h({type:Boolean,reflect:!0})],Oe.prototype,"fullScreen",2),Je([h({type:Boolean,reflect:!0})],Oe.prototype,"visible",2),Je([h({type:String})],Oe.prototype,"closeButtonType",2),Je([fs("#modal")],Oe.prototype,"_modalElement",2),Je([h({type:Boolean})],Oe.prototype,"closeOnLocationChange",2),Je([Ae()],Oe.prototype,"location",2),Je([Ae()],Oe.prototype,"_animationState",2),Oe=Je([Q(Dl)],Oe),typeof window<"u"&&(window.SonicModal=Oe);var Ef=Object.defineProperty,Of=Object.getOwnPropertyDescriptor,cs=(t,e,s,i)=>{for(var r=i>1?void 0:i?Of(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ef(e,s,r),r};const Tf="sonic-alert",El="sonic-alert-dismissed";let Kt=class extends J{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.dismissible=!1,this.background=!1,this.status="default",this.dismissForever=!1,this.announce=!1}connectedCallback(){super.connectedCallback(),this.dismissForever&&this.id&&La(El,this.id)&&this.remove()}willUpdate(t){(t.has("announce")||t.has("status"))&&this._syncAnnounceA11y()}_syncAnnounceA11y(){if(!this.announce){this.removeAttribute("role"),this.removeAttribute("aria-live");return}this.setAttribute("role",Fa(this.status));const t=Ra(this.status);t?this.setAttribute("aria-live",t):this.removeAttribute("aria-live")}render(){return R`
3369
- ${this.noIcon?se:R`<slot name="icon">
3353
+ `],Oe.modals=[],Je([h({type:Boolean})],Oe.prototype,"forceAction",2),Je([h({type:Boolean})],Oe.prototype,"noCloseButton",2),Je([h({type:Boolean})],Oe.prototype,"removeOnHide",2),Je([h({type:Boolean})],Oe.prototype,"removeHashOnHide",2),Je([h({type:String,reflect:!0})],Oe.prototype,"align",2),Je([h({type:String})],Oe.prototype,"paddingX",2),Je([h({type:String})],Oe.prototype,"paddingY",2),Je([h({type:String})],Oe.prototype,"maxWidth",2),Je([h({type:String})],Oe.prototype,"maxHeight",2),Je([h({type:String})],Oe.prototype,"zIndex",2),Je([h({type:String})],Oe.prototype,"width",2),Je([h({type:String})],Oe.prototype,"height",2),Je([h({type:String})],Oe.prototype,"effect",2),Je([h({attribute:!1})],Oe.prototype,"styleSheet",2),Je([h({type:Object})],Oe.prototype,"options",2),Je([h({type:Boolean,reflect:!0})],Oe.prototype,"fullScreen",2),Je([h({type:Boolean,reflect:!0})],Oe.prototype,"visible",2),Je([h({type:String})],Oe.prototype,"closeButtonType",2),Je([$s("#modal")],Oe.prototype,"_modalElement",2),Je([h({type:Boolean})],Oe.prototype,"closeOnLocationChange",2),Je([xe()],Oe.prototype,"location",2),Je([xe()],Oe.prototype,"_animationState",2),Oe=Je([X(Ml)],Oe),typeof window<"u"&&(window.SonicModal=Oe);var Lf=Object.defineProperty,Mf=Object.getOwnPropertyDescriptor,hs=(t,e,s,r)=>{for(var i=r>1?void 0:r?Mf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Lf(e,s,i),i};const If="sonic-alert",Il="sonic-alert-dismissed";let Kt=class extends Q{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.dismissible=!1,this.background=!1,this.status="default",this.dismissForever=!1,this.announce=!1}connectedCallback(){super.connectedCallback(),this.dismissForever&&this.id&&Na(Il,this.id)&&this.remove()}willUpdate(t){(t.has("announce")||t.has("status"))&&this._syncAnnounceA11y()}_syncAnnounceA11y(){if(!this.announce){this.removeAttribute("role"),this.removeAttribute("aria-live");return}this.setAttribute("role",za(this.status));const t=Ua(this.status);t?this.setAttribute("aria-live",t):this.removeAttribute("aria-live")}render(){return R`
3354
+ ${this.noIcon?ee:R`<slot name="icon">
3370
3355
  <sonic-icon
3371
3356
  aria-hidden="true"
3372
3357
  name=${Ui[this.status]??Ui.default}
3373
3358
  ></sonic-icon>
3374
3359
  </slot>`}
3375
3360
  <div class="content">
3376
- ${this.label?R`<span class="label">${this.label}</span>`:se}
3361
+ ${this.label?R`<span class="label">${this.label}</span>`:ee}
3377
3362
  <div>${this.text}<slot></slot></div>
3378
3363
  </div>
3379
3364
  ${this.dismissible?R`<sonic-button
@@ -3382,11 +3367,11 @@ ${this.value}</textarea
3382
3367
  variant="unstyled"
3383
3368
  shape="circle"
3384
3369
  icon
3385
- .ariaLabel=${zi(ws.closeAlert)}
3370
+ .ariaLabel=${Qr(is.closeAlert)}
3386
3371
  >
3387
3372
  <sonic-icon name="cancel"></sonic-icon>
3388
- </sonic-button>`:se}
3389
- `}close(){if(this.remove(),!!this.dismissForever){if(!this.id){console.warn("sonic-alert : dismissForever nécessite un id.");return}Ma(El,this.id)}}};Kt.styles=[rs,ja,X`
3373
+ </sonic-button>`:ee}
3374
+ `}close(){if(this.remove(),!!this.dismissForever){if(!this.id){console.warn("sonic-alert : dismissForever nécessite un id.");return}Fa(Il,this.id)}}};Kt.styles=[Jt,qa,Z`
3390
3375
  :host {
3391
3376
  --sc-_rounded: var(--sc-rounded);
3392
3377
  position: relative;
@@ -3439,25 +3424,25 @@ ${this.value}</textarea
3439
3424
  right: 0.3rem;
3440
3425
  border-left: none;
3441
3426
  }
3442
- `],cs([h({type:String})],Kt.prototype,"label",2),cs([h({type:Boolean,reflect:!0})],Kt.prototype,"noIcon",2),cs([h({type:String})],Kt.prototype,"text",2),cs([h({type:String,reflect:!0})],Kt.prototype,"size",2),cs([h({type:Boolean,reflect:!0})],Kt.prototype,"dismissible",2),cs([h({type:Boolean,reflect:!0})],Kt.prototype,"background",2),cs([h({type:String,reflect:!0})],Kt.prototype,"status",2),cs([h({type:Boolean,reflect:!0})],Kt.prototype,"dismissForever",2),cs([h({type:Boolean,reflect:!0})],Kt.prototype,"announce",2),Kt=cs([Q(Tf)],Kt);var Lf=Object.defineProperty,Mf=Object.getOwnPropertyDescriptor,oi=(t,e,s,i)=>{for(var r=i>1?void 0:i?Mf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Lf(e,s,r),r};const If="sonic-alert-messages";let nr=class extends kt(J){constructor(){super(...arguments),this.size="md",this.background=!1,this.noIcon=!1,this.messages=[]}render(){return this.messages?.length?R`<div class="container">
3443
- ${Qa(this.messages,t=>t.type=="public"?R`<sonic-alert
3427
+ `],hs([h({type:String})],Kt.prototype,"label",2),hs([h({type:Boolean,reflect:!0})],Kt.prototype,"noIcon",2),hs([h({type:String})],Kt.prototype,"text",2),hs([h({type:String,reflect:!0})],Kt.prototype,"size",2),hs([h({type:Boolean,reflect:!0})],Kt.prototype,"dismissible",2),hs([h({type:Boolean,reflect:!0})],Kt.prototype,"background",2),hs([h({type:String,reflect:!0})],Kt.prototype,"status",2),hs([h({type:Boolean,reflect:!0})],Kt.prototype,"dismissForever",2),hs([h({type:Boolean,reflect:!0})],Kt.prototype,"announce",2),Kt=hs([X(If)],Kt);var Nf=Object.defineProperty,Ff=Object.getOwnPropertyDescriptor,oi=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ff(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Nf(e,s,i),i};const Rf="sonic-alert-messages";let nr=class extends Ot(Q){constructor(){super(...arguments),this.size="md",this.background=!1,this.noIcon=!1,this.messages=[]}render(){return this.messages?.length?R`<div class="container">
3428
+ ${nl(this.messages,t=>t.type=="public"?R`<sonic-alert
3444
3429
  announce
3445
3430
  status=${t.status||"default"}
3446
- text=${te(t.content)}
3431
+ text=${se(t.content)}
3447
3432
  size=${this.size}
3448
3433
  ?noIcon=${this.noIcon}
3449
3434
  ?background=${this.background}
3450
- ></sonic-alert>`:se)}
3451
- </div>`:se}};nr.styles=[X`
3435
+ ></sonic-alert>`:ee)}
3436
+ </div>`:ee}};nr.styles=[Z`
3452
3437
  .container {
3453
3438
  display: grid;
3454
3439
  gap: 0.5em;
3455
3440
  grid-template-columns: minmax(0, 1fr);
3456
3441
  width: 100%;
3457
3442
  }
3458
- `],oi([h({type:String})],nr.prototype,"size",2),oi([h({type:Boolean})],nr.prototype,"background",2),oi([h({type:Boolean})],nr.prototype,"noIcon",2),oi([h({type:Array})],nr.prototype,"messages",2),nr=oi([Q(If)],nr);var Nf=Object.defineProperty,Ff=Object.getOwnPropertyDescriptor,Ol=(t,e,s,i)=>{for(var r=i>1?void 0:i?Ff(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Nf(e,s,r),r};const Rf="sonic-toast-message-subscriber";let bo=class extends kt(J){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach(e=>{e.type=="public"&&Se.add({text:e.content||"",status:e.status})})}render(){return se}};Ol([h({type:Array})],bo.prototype,"messages",1),bo=Ol([Q(Rf)],bo);var jf=Object.defineProperty,zf=Object.getOwnPropertyDescriptor,kr=(t,e,s,i)=>{for(var r=i>1?void 0:i?zf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&jf(e,s,r),r};const Uf="sonic-tooltip",Tl=4;let jt=class extends J{constructor(){super(...arguments),this.disabled=!1,this.focusable=!1,this.showTooltip=()=>{this.isEffectivelyDisabled||!this.bubbleEl||this.bubbleEl.matches(":popover-open")||this.bubbleEl.showPopover()},this.hideTooltip=()=>{this.bubbleEl?.matches(":popover-open")&&this.bubbleEl.hidePopover()},this.handleBeforeToggle=t=>{if(t.newState==="open"){this.stopPositioning??=Sl(()=>this.computePosition());return}this.endPositioning()}}get isEffectivelyDisabled(){return this.disabled||!this.formatLabel()}formatLabel(){return(this.label??"").replaceAll("&nbsp;"," ").trim().split(`
3443
+ `],oi([h({type:String})],nr.prototype,"size",2),oi([h({type:Boolean})],nr.prototype,"background",2),oi([h({type:Boolean})],nr.prototype,"noIcon",2),oi([h({type:Array})],nr.prototype,"messages",2),nr=oi([X(Rf)],nr);var jf=Object.defineProperty,zf=Object.getOwnPropertyDescriptor,Nl=(t,e,s,r)=>{for(var i=r>1?void 0:r?zf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&jf(e,s,i),i};const Uf="sonic-toast-message-subscriber";let yo=class extends Ot(Q){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach(e=>{e.type=="public"&&Se.add({text:e.content||"",status:e.status})})}render(){return ee}};Nl([h({type:Array})],yo.prototype,"messages",1),yo=Nl([X(Uf)],yo);var qf=Object.defineProperty,Hf=Object.getOwnPropertyDescriptor,$r=(t,e,s,r)=>{for(var i=r>1?void 0:r?Hf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&qf(e,s,i),i};const Bf="sonic-tooltip",Fl=4;let jt=class extends Q{constructor(){super(...arguments),this.disabled=!1,this.focusable=!1,this.showTooltip=()=>{this.isEffectivelyDisabled||!this.bubbleEl||this.bubbleEl.matches(":popover-open")||this.bubbleEl.showPopover()},this.hideTooltip=()=>{this.bubbleEl?.matches(":popover-open")&&this.bubbleEl.hidePopover()},this.handleBeforeToggle=t=>{if(t.newState==="open"){this.stopPositioning??=Dl(()=>this.computePosition());return}this.endPositioning()}}get isEffectivelyDisabled(){return this.disabled||!this.formatLabel()}formatLabel(){return(this.label??"").replaceAll("&nbsp;"," ").trim().split(`
3459
3444
  `).map(t=>t.trim()).join(`
3460
- `)}computePosition(){const t=this.bubbleEl;if(!t)return;const{side:e,align:s}=bl(this.placement,"top","center"),{x:i,y:r}=_l({anchor:this.getBoundingClientRect(),floating:t.getBoundingClientRect(),side:e,align:s,gap:Tl,bounds:yl(this,Tl)});Object.assign(t.style,{left:`${Math.round(i)}px`,top:`${Math.round(r)}px`})}endPositioning(){this.stopPositioning?.(),this.stopPositioning=void 0}syncTabIndex(){this.disabled?this.setAttribute("tabindex","-1"):this.focusable?this.setAttribute("tabindex","0"):this.removeAttribute("tabindex")}syncNativeTitle(){if(jt.supportsPopover||this.isEffectivelyDisabled){this.removeAttribute("title");return}this.setAttribute("title",this.formatLabel().replaceAll(`
3445
+ `)}computePosition(){const t=this.bubbleEl;if(!t)return;const{side:e,align:s}=xl(this.placement,"top","center"),{x:r,y:i}=$l({anchor:this.getBoundingClientRect(),floating:t.getBoundingClientRect(),side:e,align:s,gap:Fl,bounds:Cl(this,Fl)});Object.assign(t.style,{left:`${Math.round(r)}px`,top:`${Math.round(i)}px`})}endPositioning(){this.stopPositioning?.(),this.stopPositioning=void 0}syncTabIndex(){this.disabled?this.setAttribute("tabindex","-1"):this.focusable?this.setAttribute("tabindex","0"):this.removeAttribute("tabindex")}syncNativeTitle(){if(jt.supportsPopover||this.isEffectivelyDisabled){this.removeAttribute("title");return}this.setAttribute("title",this.formatLabel().replaceAll(`
3461
3446
  `," "))}connectedCallback(){super.connectedCallback(),jt.supportsPopover&&(this.addEventListener("focusin",this.showTooltip),this.addEventListener("focusout",this.hideTooltip))}disconnectedCallback(){this.endPositioning(),jt.supportsPopover&&(this.removeEventListener("focusin",this.showTooltip),this.removeEventListener("focusout",this.hideTooltip)),super.disconnectedCallback()}willUpdate(t){(!this.hasUpdated||t.has("disabled")||t.has("focusable"))&&this.syncTabIndex(),(!this.hasUpdated||t.has("label")||t.has("disabled"))&&this.syncNativeTitle(),t.has("disabled")&&this.disabled&&this.hideTooltip(),t.has("label")&&this.isEffectivelyDisabled&&this.hideTooltip(),super.willUpdate(t)}render(){if(!jt.supportsPopover)return R`<slot></slot>`;const t=this.isEffectivelyDisabled?"disabled":"",e=this.formatLabel();return R`
3462
3447
  <slot
3463
3448
  @mouseenter=${this.showTooltip}
@@ -3469,7 +3454,7 @@ ${this.value}</textarea
3469
3454
  @beforetoggle=${this.handleBeforeToggle}
3470
3455
  >${e}</span
3471
3456
  >
3472
- `}};jt.supportsPopover=vl,jt.styles=[X`
3457
+ `}};jt.supportsPopover=Al,jt.styles=[Z`
3473
3458
  :host {
3474
3459
  display: inline-flex;
3475
3460
  align-items: center;
@@ -3519,11 +3504,13 @@ ${this.value}</textarea
3519
3504
  transition: none;
3520
3505
  }
3521
3506
  }
3522
- `],kr([h({type:String})],jt.prototype,"label",2),kr([h({type:String,reflect:!0})],jt.prototype,"placement",2),kr([h({type:Boolean})],jt.prototype,"disabled",2),kr([h({type:Boolean})],jt.prototype,"focusable",2),kr([fs(".tooltip-bubble")],jt.prototype,"bubbleEl",2),jt=kr([Q(Uf)],jt);var qf=Object.defineProperty,Bf=Object.getOwnPropertyDescriptor,hs=(t,e,s,i)=>{for(var r=i>1?void 0:i?Bf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&qf(e,s,r),r};const Hf="sonic-divider";let Gt=class extends J{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.dashed=!1,this.dotted=!1}firstUpdated(t){super.firstUpdated(t),(this.label||this.slotNodes?.length)&&this.divider?.classList.add("has-text")}render(){return R`<div part="divider">
3507
+ `],$r([h({type:String})],jt.prototype,"label",2),$r([h({type:String,reflect:!0})],jt.prototype,"placement",2),$r([h({type:Boolean})],jt.prototype,"disabled",2),$r([h({type:Boolean})],jt.prototype,"focusable",2),$r([$s(".tooltip-bubble")],jt.prototype,"bubbleEl",2),jt=$r([X(Bf)],jt);var Vf=Object.defineProperty,Wf=Object.getOwnPropertyDescriptor,_s=(t,e,s,r)=>{for(var i=r>1?void 0:r?Wf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Vf(e,s,i),i};const Kf="sonic-divider";let es=class extends Q{constructor(){super(...arguments),this.hasText=!1,this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.lineStyle="solid"}willUpdate(t){super.willUpdate(t),this.syncHasText()}syncHasText(){this.hasText=!!(this.label||this.slotNodes?.length)}render(){return R`<div class="${this.hasText?"has-text":"no-text"}">
3523
3508
  <span class="text"
3524
- >${He(this.label?this.label:"")}<slot></slot
3509
+ >${Be(this.label?this.label:ee)}<slot
3510
+ @slotchange=${this.syncHasText}
3511
+ ></slot
3525
3512
  ></span>
3526
- </div>`}};Gt.styles=[X`
3513
+ </div>`}};es.styles=[Jt,Z`
3527
3514
  :host {
3528
3515
  --sc-divider-my: 0.5rem;
3529
3516
  --sc-divider-mx: 0;
@@ -3532,15 +3519,13 @@ ${this.value}</textarea
3532
3519
  var(--sc-border-width, max(1px, 0.12rem))
3533
3520
  );
3534
3521
  --sc-divider-border-color: var(--sc-border-color);
3535
- --sc-divider-border-style: solid;
3522
+ --sc-_border-style: solid;
3536
3523
  --sc-divider-color: currentColor;
3537
3524
  --sc-divider-ff: var(--sc-font-family-base, sans-serif);
3538
- --sc-divider-fs: 1rem;
3539
3525
  --sc-divider-fw: var(--sc-font-weight-base, 400);
3540
3526
  --sc-divider-fst: var(--sc-font-style-base, normal);
3541
3527
 
3542
3528
  margin: var(--sc-divider-my) var(--sc-divider-mx);
3543
- font-size: var(--sc-divider-fs);
3544
3529
  font-style: var(--sc-divider-fst);
3545
3530
  font-family: var(--sc-divider-ff);
3546
3531
  font-weight: var(--sc-divider-fw);
@@ -3551,17 +3536,14 @@ ${this.value}</textarea
3551
3536
  /*SIZE*/
3552
3537
  :host([size="2xs"]) {
3553
3538
  --sc-divider-my: 0.35rem;
3554
- --sc-divider-fs: 0.68rem;
3555
3539
  }
3556
3540
 
3557
3541
  :host([size="xs"]) {
3558
3542
  --sc-divider-my: 0.5rem;
3559
- --sc-divider-fs: 0.75rem;
3560
3543
  }
3561
3544
 
3562
3545
  :host([size="sm"]) {
3563
3546
  --sc-divider-my: 0.75rem;
3564
- --sc-divider-fs: 0.875rem;
3565
3547
  }
3566
3548
 
3567
3549
  :host([size="md"]) {
@@ -3590,8 +3572,8 @@ ${this.value}</textarea
3590
3572
  div::after {
3591
3573
  content: "";
3592
3574
  flex-grow: 1;
3593
- border-top: var(--sc-divider-border-width)
3594
- var(--sc-divider-border-style) var(--sc-divider-border-color);
3575
+ border-top: var(--sc-divider-border-width) var(--sc-_border-style)
3576
+ var(--sc-divider-border-color);
3595
3577
  width: 100%;
3596
3578
  opacity: var(--sc-divider-opacity, 1);
3597
3579
  }
@@ -3622,8 +3604,8 @@ ${this.value}</textarea
3622
3604
  :host([vertical]) div::before,
3623
3605
  :host([vertical]) div::after {
3624
3606
  border-top: none;
3625
- border-left: var(--sc-divider-border-width)
3626
- var(--sc-divider-border-style) var(--sc-divider-border-color);
3607
+ border-left: var(--sc-divider-border-width) var(--sc-_border-style)
3608
+ var(--sc-divider-border-color);
3627
3609
  width: auto;
3628
3610
  height: 100%;
3629
3611
  opacity: var(--sc-divider-opacity, 1);
@@ -3643,18 +3625,22 @@ ${this.value}</textarea
3643
3625
  .no-text .text {
3644
3626
  display: none;
3645
3627
  }
3628
+ .no-text::after {
3629
+ display: none;
3630
+ }
3646
3631
 
3647
3632
  .has-text {
3648
3633
  gap: 0.5rem;
3649
3634
  }
3650
3635
 
3651
- :host([dotted]) {
3652
- --sc-divider-border-style: dotted;
3636
+ :host([linestyle="dashed"]) {
3637
+ --sc-_border-style: dashed;
3653
3638
  }
3654
- :host([dashed]) {
3655
- --sc-divider-border-style: dashed;
3639
+
3640
+ :host([linestyle="dotted"]) {
3641
+ --sc-_border-style: dotted;
3656
3642
  }
3657
- `],hs([mt({flatten:!0})],Gt.prototype,"slotNodes",2),hs([fs("div")],Gt.prototype,"divider",2),hs([h({type:String})],Gt.prototype,"label",2),hs([h({type:String,reflect:!0})],Gt.prototype,"size",2),hs([h({type:String,reflect:!0})],Gt.prototype,"align",2),hs([h({type:Boolean,reflect:!0})],Gt.prototype,"vertical",2),hs([h({type:Boolean,reflect:!0})],Gt.prototype,"noMargin",2),hs([h({type:Boolean,reflect:!0})],Gt.prototype,"dashed",2),hs([h({type:Boolean,reflect:!0})],Gt.prototype,"dotted",2),Gt=hs([Q(Hf)],Gt);var Vf=Object.getOwnPropertyDescriptor,Wf=(t,e,s,i)=>{for(var r=i>1?void 0:i?Vf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Kf="sonic-card-header-description";let vo=class extends J{render(){return R`<slot></slot>`}};vo.styles=[X`
3643
+ `],_s([bt({flatten:!0})],es.prototype,"slotNodes",2),_s([xe()],es.prototype,"hasText",2),_s([h({type:String})],es.prototype,"label",2),_s([h({type:String,reflect:!0})],es.prototype,"size",2),_s([h({type:String,reflect:!0})],es.prototype,"align",2),_s([h({type:Boolean,reflect:!0})],es.prototype,"vertical",2),_s([h({type:Boolean,reflect:!0})],es.prototype,"noMargin",2),_s([h({type:String,reflect:!0})],es.prototype,"lineStyle",2),es=_s([X(Kf)],es);var Gf=Object.getOwnPropertyDescriptor,Yf=(t,e,s,r)=>{for(var i=r>1?void 0:r?Gf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Zf="sonic-card-header-description";let wo=class extends Q{render(){return R`<slot></slot>`}};wo.styles=[Z`
3658
3644
  :host() {
3659
3645
  display: block;
3660
3646
  font-size: 0.7em;
@@ -3662,16 +3648,16 @@ ${this.value}</textarea
3662
3648
  font-family: var(--sc-font-family-base, sans-serif);
3663
3649
  font-weight: var(--sc-font-style-base, normal);
3664
3650
  }
3665
- `],vo=Wf([Q(Kf)],vo);var Gf=Object.defineProperty,Yf=Object.getOwnPropertyDescriptor,yo=(t,e,s,i)=>{for(var r=i>1?void 0:i?Yf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Gf(e,s,r),r};const Zf="sonic-card-header";let ai=class extends J{render(){return R`
3651
+ `],wo=Yf([X(Zf)],wo);var Jf=Object.defineProperty,Qf=Object.getOwnPropertyDescriptor,_o=(t,e,s,r)=>{for(var i=r>1?void 0:r?Qf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Jf(e,s,i),i};const Xf="sonic-card-header";let ai=class extends Q{render(){return R`
3666
3652
  <div class="header-content">
3667
- ${He(this.label)}
3653
+ ${Be(this.label)}
3668
3654
  ${this.description?R`<sonic-card-header-description
3669
- >${He(this.description)}</sonic-card-header-description
3670
- >`:se}
3655
+ >${Be(this.description)}</sonic-card-header-description
3656
+ >`:ee}
3671
3657
  <slot></slot>
3672
3658
  </div>
3673
3659
  <slot name="suffix"></slot>
3674
- `}};ai.styles=[X`
3660
+ `}};ai.styles=[Z`
3675
3661
  :host {
3676
3662
  --sc-card-header-mb: 1.35rem;
3677
3663
  --sc-card-header-font-size: 1.5rem;
@@ -3714,15 +3700,15 @@ ${this.value}</textarea
3714
3700
  ::slotted(sonic-card-header-description) {
3715
3701
  margin-top: 0.12em;
3716
3702
  }
3717
- `],yo([h()],ai.prototype,"label",2),yo([h()],ai.prototype,"description",2),ai=yo([Q(Zf)],ai);var Jf=Object.getOwnPropertyDescriptor,Qf=(t,e,s,i)=>{for(var r=i>1?void 0:i?Jf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Xf="sonic-card-main";let wo=class extends J{render(){return R`<slot></slot>`}};wo.styles=[X`
3703
+ `],_o([h()],ai.prototype,"label",2),_o([h()],ai.prototype,"description",2),ai=_o([X(Xf)],ai);var em=Object.getOwnPropertyDescriptor,tm=(t,e,s,r)=>{for(var i=r>1?void 0:r?em(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const sm="sonic-card-main";let So=class extends Q{render(){return R`<slot></slot>`}};So.styles=[Z`
3718
3704
  :host {
3719
3705
  display: block;
3720
3706
  }
3721
- `],wo=Qf([Q(Xf)],wo);var eg=Object.getOwnPropertyDescriptor,tg=(t,e,s,i)=>{for(var r=i>1?void 0:i?eg(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const sg="sonic-card-footer";let _o=class extends J{render(){return R` <slot></slot> `}};_o.styles=[X`
3707
+ `],So=tm([X(sm)],So);var rm=Object.getOwnPropertyDescriptor,im=(t,e,s,r)=>{for(var i=r>1?void 0:r?rm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const nm="sonic-card-footer";let Po=class extends Q{render(){return R` <slot></slot> `}};Po.styles=[Z`
3722
3708
  :host {
3723
3709
  display: block;
3724
3710
  }
3725
- `],_o=tg([Q(sg)],_o);var rg=Object.defineProperty,ig=Object.getOwnPropertyDescriptor,Ll=(t,e,s,i)=>{for(var r=i>1?void 0:i?ig(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&rg(e,s,r),r};const ng="sonic-card";let rn=class extends J{constructor(){super(...arguments),this.type="base"}render(){return R`<slot></slot> `}};rn.styles=[za,X`
3711
+ `],Po=im([X(nm)],Po);var om=Object.defineProperty,am=Object.getOwnPropertyDescriptor,xo=(t,e,s,r)=>{for(var i=r>1?void 0:r?am(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&om(e,s,i),i};const lm="sonic-card";let li=class extends Q{constructor(){super(...arguments),this.shadow="lg",this.type="base"}render(){return R`<div class="shadowable"><slot></slot></div>`}};li.styles=[Ba,co,Z`
3726
3712
  * {
3727
3713
  box-sizing: border-box;
3728
3714
  }
@@ -3731,56 +3717,59 @@ ${this.value}</textarea
3731
3717
  --sc-_color: var(--sc-base-content, #000);
3732
3718
  --sc-_bg: var(--sc-base, #fff);
3733
3719
  --sc-_rounded: var(--sc-rounded-lg);
3734
- --sc-_shadow: var(--sc-shadow-lg);
3720
+ --sc-_border-color: transparent;
3721
+ --sc-_border-width: var(--sc-form-border-width);
3722
+ display: block;
3723
+ background: transparent;
3735
3724
  -webkit-print-color-adjust: exact;
3736
3725
  }
3737
3726
 
3727
+ .shadowable {
3728
+ padding: var(--sc-_padding);
3729
+ background-color: var(--sc-_bg);
3730
+ border-radius: var(--sc-_rounded);
3731
+ color: var(--sc-_color);
3732
+ border: var(--sc-_border-width) solid var(--sc-_border-color);
3733
+ }
3734
+
3738
3735
  @media print {
3739
3736
  :host {
3740
3737
  page-break-inside: avoid;
3741
3738
  break-inside: avoid;
3739
+ }
3740
+ .shadowable {
3742
3741
  box-shadow: none !important;
3743
3742
  border: 1px solid var(--sc-base-200, rgba(0, 0, 0, 0.12));
3744
3743
  }
3745
3744
  }
3746
-
3747
- :host {
3748
- display: block;
3749
- padding: var(--sc-_padding);
3750
- background-color: var(--sc-_bg);
3751
- border-radius: var(--sc-_rounded);
3752
- box-shadow: var(--sc-_shadow);
3753
- color: var(--sc-_color);
3754
- }
3755
- `],Ll([h({type:String,reflect:!0})],rn.prototype,"type",2),rn=Ll([Q(ng)],rn);var og=Object.defineProperty,ag=Object.getOwnPropertyDescriptor,li=(t,e,s,i)=>{for(var r=i>1?void 0:i?ag(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&og(e,s,r),r};const lg="sonic-tr";let or=class extends kt(J){constructor(){super(...arguments),this._metadata_={}}willUpdate(t){t.has("_metadata_")&&(this.even=!!this._metadata_.even,this.odd=!!this._metadata_.odd,this.last=!!this._metadata_.lastChild),super.willUpdate(t)}render(){return R`<slot></slot>`}};or.styles=[Yn,X`
3745
+ `],xo([h({type:String,reflect:!0})],li.prototype,"shadow",2),xo([h({type:String,reflect:!0})],li.prototype,"type",2),li=xo([X(lm)],li);var cm=Object.defineProperty,hm=Object.getOwnPropertyDescriptor,ci=(t,e,s,r)=>{for(var i=r>1?void 0:r?hm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&cm(e,s,i),i};const um="sonic-tr";let or=class extends Ot(Q){constructor(){super(...arguments),this._metadata_={}}willUpdate(t){t.has("_metadata_")&&(this.even=!!this._metadata_.even,this.odd=!!this._metadata_.odd,this.last=!!this._metadata_.lastChild),super.willUpdate(t)}render(){return R`<slot></slot>`}};or.styles=[qi,Z`
3756
3746
  :host {
3757
3747
  display: table-row;
3758
3748
  }
3759
3749
 
3760
3750
  :host([odd]) {
3761
- background: var(--sc-table-accent-bg) !important;
3751
+ background: var(--sc-_accent-bg) !important;
3762
3752
  }
3763
3753
  :host([even]) {
3764
- background: var(--sc-table-bg) !important;
3754
+ background: var(--sc-_bg) !important;
3765
3755
  }
3766
3756
 
3767
3757
  :host([last]) {
3768
- --sc-table-td-border-b: none;
3758
+ --sc-_td-border-b: none;
3769
3759
  }
3770
3760
  :host(:hover) {
3771
- background: var(--sc-table-hover-bg) !important;
3761
+ background: var(--sc-_hover-bg) !important;
3772
3762
  }
3773
- `],li([h({type:Object})],or.prototype,"_metadata_",2),li([h({type:Boolean,reflect:!0})],or.prototype,"even",2),li([h({type:Boolean,reflect:!0})],or.prototype,"odd",2),li([h({type:Boolean,reflect:!0})],or.prototype,"last",2),or=li([Q(lg)],or);var cg=Object.defineProperty,hg=Object.getOwnPropertyDescriptor,ar=(t,e,s,i)=>{for(var r=i>1?void 0:i?hg(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&cg(e,s,r),r};const ug="sonic-th";let Ps=class extends J{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<th
3774
- part="th"
3763
+ `],ci([h({type:Object})],or.prototype,"_metadata_",2),ci([h({type:Boolean,reflect:!0})],or.prototype,"even",2),ci([h({type:Boolean,reflect:!0})],or.prototype,"odd",2),ci([h({type:Boolean,reflect:!0})],or.prototype,"last",2),or=ci([X(um)],or);var dm=Object.defineProperty,pm=Object.getOwnPropertyDescriptor,ar=(t,e,s,r)=>{for(var i=r>1?void 0:r?pm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&dm(e,s,i),i};const fm="sonic-th";let Ss=class extends Q{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<th
3775
3764
  style=${$t(t)}
3776
- colspan=${te(this.colSpan)}
3777
- rowspan=${te(this.rowSpan)}
3765
+ colspan=${se(this.colSpan)}
3766
+ rowspan=${se(this.rowSpan)}
3778
3767
  >
3779
3768
  <slot></slot>
3780
- </th> `}};Ps.styles=[Yn,X`
3769
+ </th> `}};Ss.styles=[qi,Z`
3781
3770
  :host {
3782
3771
  display: contents;
3783
- background: var(--sc-table-bg);
3772
+ background: var(--sc-_bg);
3784
3773
  position: sticky;
3785
3774
  top: 0;
3786
3775
  z-index: 20;
@@ -3790,68 +3779,72 @@ ${this.value}</textarea
3790
3779
  all: inherit;
3791
3780
  display: table-cell;
3792
3781
  border-bottom: calc(var(--sc-border-width, max(1px, 0.12rem)) * 1.5)
3793
- solid var(--sc-table-border-color);
3794
- text-transform: var(--sc-table-th-tt);
3795
- font-weight: var(--sc-table-th-fw);
3796
- font-size: var(--sc-table-th-fs);
3797
- padding: var(--sc-table-th-py) var(--sc-table-th-px);
3782
+ solid var(--sc-_border-color);
3783
+ text-transform: var(--sc-_th-tt);
3784
+ font-weight: var(--sc-_th-fw);
3785
+ font-size: var(--sc-_th-fs);
3786
+ padding: var(--sc-_th-py) var(--sc-_th-px);
3798
3787
  }
3799
3788
 
3800
3789
  :host([noBorder]) th {
3801
3790
  border-bottom: none;
3802
3791
  }
3803
- `],ar([h({type:Number})],Ps.prototype,"colSpan",2),ar([h({type:Number})],Ps.prototype,"rowSpan",2),ar([h({type:String})],Ps.prototype,"align",2),ar([h({type:String})],Ps.prototype,"minWidth",2),ar([h({type:String})],Ps.prototype,"maxWidth",2),ar([h({type:String})],Ps.prototype,"width",2),Ps=ar([Q(ug)],Ps);var dg=Object.defineProperty,pg=Object.getOwnPropertyDescriptor,zs=(t,e,s,i)=>{for(var r=i>1?void 0:i?pg(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&dg(e,s,r),r};const fg="sonic-td";let us=class extends J{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<td part="td" style=${$t(t)} colspan=${te(this.colSpan)} rowspan=${te(this.rowSpan)}>
3792
+ `],ar([h({type:Number})],Ss.prototype,"colSpan",2),ar([h({type:Number})],Ss.prototype,"rowSpan",2),ar([h({type:String})],Ss.prototype,"align",2),ar([h({type:String})],Ss.prototype,"minWidth",2),ar([h({type:String})],Ss.prototype,"maxWidth",2),ar([h({type:String})],Ss.prototype,"width",2),Ss=ar([X(fm)],Ss);var mm=Object.defineProperty,gm=Object.getOwnPropertyDescriptor,zs=(t,e,s,r)=>{for(var i=r>1?void 0:r?gm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&mm(e,s,i),i};const bm="sonic-td";let us=class extends Q{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<td
3793
+ style=${$t(t)}
3794
+ colspan=${se(this.colSpan)}
3795
+ rowspan=${se(this.rowSpan)}
3796
+ >
3804
3797
  <slot></slot>
3805
- </td>`}};us.styles=[Yn,X`
3798
+ </td>`}};us.styles=[qi,Z`
3806
3799
  :host {
3807
3800
  display: contents;
3808
3801
  }
3809
3802
  td {
3810
3803
  all: inherit;
3811
3804
  display: table-cell;
3812
- padding: var(--sc-table-td-py) var(--sc-table-td-px);
3813
- border-top: var(--sc-table-td-border-t, none);
3814
- border-bottom: var(--sc-table-td-border-b, none);
3815
- border-right: var(--sc-table-td-border-r, none);
3816
- border-left: var(--sc-table-td-border-l, none);
3805
+ padding: var(--sc-_td-py) var(--sc-_td-px);
3806
+ border-top: var(--sc-_td-border-t, none);
3807
+ border-bottom: var(--sc-_td-border-b, none);
3808
+ border-right: var(--sc-_td-border-r, none);
3809
+ border-left: var(--sc-_td-border-l, none);
3817
3810
  }
3818
- `],zs([h({type:Number})],us.prototype,"colSpan",2),zs([h({type:Number})],us.prototype,"rowSpan",2),zs([h({type:String})],us.prototype,"align",2),zs([h({type:String})],us.prototype,"vAlign",2),zs([h({type:String})],us.prototype,"minWidth",2),zs([h({type:String})],us.prototype,"maxWidth",2),zs([h({type:String})],us.prototype,"width",2),us=zs([Q(fg)],us);var gg=Object.getOwnPropertyDescriptor,mg=(t,e,s,i)=>{for(var r=i>1?void 0:i?gg(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const bg="sonic-thead";let So=class extends J{render(){return R`<slot></slot>`}};So.styles=[X`
3811
+ `],zs([h({type:Number})],us.prototype,"colSpan",2),zs([h({type:Number})],us.prototype,"rowSpan",2),zs([h({type:String})],us.prototype,"align",2),zs([h({type:String})],us.prototype,"vAlign",2),zs([h({type:String})],us.prototype,"minWidth",2),zs([h({type:String})],us.prototype,"maxWidth",2),zs([h({type:String})],us.prototype,"width",2),us=zs([X(bm)],us);var vm=Object.getOwnPropertyDescriptor,ym=(t,e,s,r)=>{for(var i=r>1?void 0:r?vm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const wm="sonic-thead";let Ao=class extends Q{render(){return R`<slot></slot>`}};Ao.styles=[Z`
3819
3812
  :host {
3820
3813
  display: table-header-group;
3821
3814
  }
3822
- `],So=mg([Q(bg)],So);var vg=Object.getOwnPropertyDescriptor,yg=(t,e,s,i)=>{for(var r=i>1?void 0:i?vg(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const wg="sonic-tbody";let Po=class extends J{render(){return R`<tbody part="tbody">
3815
+ `],Ao=ym([X(wm)],Ao);var _m=Object.getOwnPropertyDescriptor,Sm=(t,e,s,r)=>{for(var i=r>1?void 0:r?_m(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Pm="sonic-tbody";let Co=class extends Q{render(){return R`<tbody>
3823
3816
  <slot></slot>
3824
- </tbody>`}};Po.styles=[X`
3817
+ </tbody>`}};Co.styles=[Z`
3825
3818
  :host {
3826
3819
  display: table-row-group;
3827
3820
  }
3828
3821
 
3829
3822
  ::slotted(sonic-tr:nth-child(odd)) {
3830
- background: var(--sc-table-accent-bg);
3823
+ background: var(--sc-_accent-bg);
3831
3824
  }
3832
3825
 
3833
3826
  ::slotted(sonic-tr:hover) {
3834
- background: var(--sc-table-hover-bg);
3827
+ background: var(--sc-_hover-bg);
3835
3828
  }
3836
3829
 
3837
3830
  ::slotted(sonic-tr:not(:last-child)) {
3838
3831
  border-bottom: var(--sc-form-border-width) solid
3839
3832
  var(--sc-base-200, rgba(0, 0, 0, 0.12)) !important;
3840
3833
  }
3841
- `],Po=yg([Q(wg)],Po);var _g=Object.getOwnPropertyDescriptor,Sg=(t,e,s,i)=>{for(var r=i>1?void 0:i?_g(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Pg="sonic-tfoot";let xo=class extends J{render(){return R`<tfoot>
3834
+ `],Co=Sm([X(Pm)],Co);var xm=Object.getOwnPropertyDescriptor,Am=(t,e,s,r)=>{for(var i=r>1?void 0:r?xm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Cm="sonic-tfoot";let ko=class extends Q{render(){return R`<tfoot>
3842
3835
  <slot></slot>
3843
- </tfoot>`}};xo.styles=[X`
3836
+ </tfoot>`}};ko.styles=[Z`
3844
3837
  :host {
3845
3838
  display: contents;
3846
3839
  }
3847
- `],xo=Sg([Q(Pg)],xo);var xg=Object.getOwnPropertyDescriptor,Ag=(t,e,s,i)=>{for(var r=i>1?void 0:i?xg(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Cg="sonic-caption";let Ao=class extends J{render(){return R`<slot></slot>`}};Ao.styles=[X`
3840
+ `],ko=Am([X(Cm)],ko);var km=Object.getOwnPropertyDescriptor,$m=(t,e,s,r)=>{for(var i=r>1?void 0:r?km(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Dm="sonic-caption";let $o=class extends Q{render(){return R`<slot></slot>`}};$o.styles=[Z`
3848
3841
  :host {
3849
3842
  display: table-caption;
3850
3843
  font-size: 0.75rem;
3851
- color: var(--sc-table-caption-color);
3852
- padding: var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py));
3844
+ color: var(--sc-_caption-color);
3845
+ padding: var(--sc-_td-py) var(--sc-_td-px) calc(2 * var(--sc-_td-py));
3853
3846
  }
3854
- `],Ao=Ag([Q(Cg)],Ao);var kg=Object.defineProperty,$g=Object.getOwnPropertyDescriptor,$r=(t,e,s,i)=>{for(var r=i>1?void 0:i?$g(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&kg(e,s,r),r};const Dg="sonic-table";let Us=class extends J{render(){const t={maxHeight:this.maxHeight};return R`
3847
+ `],$o=$m([X(Dm)],$o);var Em=Object.defineProperty,Om=Object.getOwnPropertyDescriptor,Dr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Om(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Em(e,s,i),i};const Tm="sonic-table";let Us=class extends Q{render(){const t={maxHeight:this.maxHeight};return R`
3855
3848
  <div
3856
3849
  class="table-container ${this.noCustomScroll?"":"custom-scroll"}"
3857
3850
  style=${$t(t)}
@@ -3860,27 +3853,26 @@ ${this.value}</textarea
3860
3853
  <slot></slot>
3861
3854
  </div>
3862
3855
  </div>
3863
- `}};Us.styles=[Zr,rs,X`
3856
+ `}};Us.styles=[Jr,Jt,Z`
3864
3857
  :host {
3865
- --sc-table-fw: var(--sc-font-weight-base, 400);
3866
- --sc-table-fst: var(--sc-font-style-base, normal);
3867
- --sc-table-fs: 1rem;
3868
- --sc-table-border-color: var(--sc-border-color);
3869
- --sc-table-caption-color: var(
3858
+ --sc-_fw: var(--sc-font-weight-base, 400);
3859
+ --sc-_fst: var(--sc-font-style-base, normal);
3860
+ --sc-_border-color: var(--sc-border-color);
3861
+ --sc-_caption-color: var(
3870
3862
  --sc-base-500,
3871
3863
  var(--sc-base-content, #000)
3872
3864
  );
3873
- --sc-table-bg: var(--sc-base, #fff);
3874
- --sc-table-accent-bg: var(--sc-base-50, rgba(0, 0, 0, 0.04));
3875
- --sc-table-hover-bg: var(--sc-base-100, rgba(0, 0, 0, 0.07));
3876
- --sc-table-th-fs: 0.85em;
3877
- --sc-table-th-fw: bold;
3878
- --sc-table-th-tt: uppercase;
3879
- --sc-table-th-px: var(--sc-table-td-px);
3880
- --sc-table-th-py: calc(1.8 * var(--sc-table-td-py));
3881
- --sc-table-td-px: 0.5em;
3882
- --sc-table-td-py: 0.5em;
3883
- --sc-table-bw: var(--sc-border-width, max(1px, 0.12rem));
3865
+ --sc-_bg: var(--sc-base, #fff);
3866
+ --sc-_accent-bg: var(--sc-base-50, rgba(0, 0, 0, 0.04));
3867
+ --sc-_hover-bg: var(--sc-base-100, rgba(0, 0, 0, 0.07));
3868
+ --sc-_th-fs: 0.85em;
3869
+ --sc-_th-fw: bold;
3870
+ --sc-_th-tt: uppercase;
3871
+ --sc-_td-px: 0.5em;
3872
+ --sc-_td-py: 0.5em;
3873
+ --sc-_th-px: var(--sc-_td-px);
3874
+ --sc-_th-py: calc(1.8 * var(--sc-_td-py));
3875
+ --sc-_bw: var(--sc-border-width, max(1px, 0.12rem));
3884
3876
  display: block;
3885
3877
  }
3886
3878
 
@@ -3899,13 +3891,15 @@ ${this.value}</textarea
3899
3891
  box-sizing: border-box;
3900
3892
  }
3901
3893
 
3894
+ :host([bordered]) {
3895
+ --sc-_td-border-b: var(--sc-_bw) solid var(--sc-_border-color);
3896
+ }
3897
+
3902
3898
  :host([bordered]) .table-container {
3903
- border: var(--sc-table-bw) solid var(--sc-table-border-color);
3899
+ border: var(--sc-_bw) solid var(--sc-_border-color);
3904
3900
  border-radius: var(--sc-rounded);
3905
- --sc-table-td-border-b: var(--sc-table-bw) solid
3906
- var(--sc-table-border-color);
3907
3901
  }
3908
- `],$r([h({type:String,reflect:!0})],Us.prototype,"size",2),$r([h({type:Boolean,reflect:!0})],Us.prototype,"bordered",2),$r([h({type:Boolean,reflect:!0})],Us.prototype,"rounded",2),$r([h({type:Boolean,reflect:!0})],Us.prototype,"noCustomScroll",2),$r([h({type:String})],Us.prototype,"maxHeight",2),Us=$r([Q(Dg)],Us);const Ml="AES-CBC",Eg=256;async function Og(){return crypto.subtle.generateKey({name:Ml,length:Eg},!0,["encrypt","decrypt"])}function Tg(t){return btoa(String.fromCharCode(...new Uint8Array(t)))}async function Lg(t,e,s){const i=new TextEncoder().encode(t),r=await crypto.subtle.encrypt({name:Ml,iv:s.buffer},e,i);return Tg(r)}const Mg=X`
3902
+ `],Dr([h({type:String,reflect:!0})],Us.prototype,"size",2),Dr([h({type:Boolean,reflect:!0})],Us.prototype,"bordered",2),Dr([h({type:Boolean,reflect:!0})],Us.prototype,"rounded",2),Dr([h({type:Boolean,reflect:!0})],Us.prototype,"noCustomScroll",2),Dr([h({type:String})],Us.prototype,"maxHeight",2),Us=Dr([X(Tm)],Us);const Rl="AES-CBC",Lm=256;async function Mm(){return crypto.subtle.generateKey({name:Rl,length:Lm},!0,["encrypt","decrypt"])}function Im(t){return btoa(String.fromCharCode(...new Uint8Array(t)))}async function Nm(t,e,s){const r=new TextEncoder().encode(t),i=await crypto.subtle.encrypt({name:Rl,iv:s.buffer},e,r);return Im(i)}const Fm=Z`
3909
3903
  @keyframes altcha-spinner {
3910
3904
  to {
3911
3905
  transform: rotate(360deg);
@@ -4128,7 +4122,7 @@ ${this.value}</textarea
4128
4122
  animation: altcha-spinner 0.75s infinite linear;
4129
4123
  transform-origin: center;
4130
4124
  }
4131
- `;var Ig=Object.defineProperty,Ng=Object.getOwnPropertyDescriptor,nn=(t,e,s,i)=>{for(var r=i>1?void 0:i?Ng(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ig(e,s,r),r};const Fg="supersoniks_altcha",Rg="Si2\\]X8M4!n9DCLd";let Il=!1;const jg="sonic-captcha";let Dr=class extends tr(J){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=t=>{t=="request_token"&&(this.formPublisher&&this.formPublisher.captchaToken.set(""),this.requestToken())},this.maxNumber=5e4,this.chalengeUrl="https://altcha.supersoniks.org/get-challenge"}connectedCallback(){if(document.location.protocol.includes("https")){if(!Il){const t=document.createElement("script");t.type="module",this.setAttribute("async",""),this.setAttribute("defer",""),t.src="https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist/altcha.min.js",Il=!0,document.head.appendChild(t)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=yi(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&!this.formPublisher.captchaToken.get()&&(this.formPublisher.needsCaptchaValidation.set(!0),this.formPublisher.captchaToken.onAssign(this.onCaptchaTokenChanged))}}disconnectedCallback(){this.formPublisher&&(this.formPublisher.captchaToken.offAssign(this.onCaptchaTokenChanged),this.formPublisher.captchaToken.set(""),this.formPublisher.needsCaptchaValidation.set(!1)),super.disconnectedCallback()}requestToken(){if(!this.formPublisher)return;const t=this.shadowRoot.querySelector("form");if(!t)return;const e=new FormData(t);this.formPublisher.captchaKey.set(this.key),this.formPublisher.captchaToken.set(e.get("altcha")?.toString()||"")}async generateEncryptedKey(){if(this.key)return;const t=await Og(),e=new TextEncoder().encode(Rg),s=await Lg(Fg,t,e);this.key=s}render(){if(!this.key)return se;const e=bs.getLanguage().match("^fr\\b")?{aria:"Visitez altcha.org",error:"La vérification a échoué, réessayez plus tard.",expired:"La vérification a expiré, réessayez.",footer:"Protégé par Altcha",label:"Je ne suis pas un robot.",verified:"Vérifié",verifying:"Vérification en cours...",wait:"Vérification en cours… Veuillez patienter."}:{aria:"Visit altcha.org",error:"Verification failed, try again later.",expired:"Verification expired, try again.",footer:"Protected by Altcha",label:"I'm not a robot.",verified:"Verified",verifying:"Verifying...",wait:"Verifying... Please wait."};return R`
4125
+ `;var Rm=Object.defineProperty,jm=Object.getOwnPropertyDescriptor,cn=(t,e,s,r)=>{for(var i=r>1?void 0:r?jm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Rm(e,s,i),i};const zm="supersoniks_altcha",Um="Si2\\]X8M4!n9DCLd";let jl=!1;const qm="sonic-captcha";let Er=class extends tr(Q){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=t=>{t=="request_token"&&(this.formPublisher&&this.formPublisher.captchaToken.set(""),this.requestToken())},this.maxNumber=5e4,this.chalengeUrl="https://altcha.supersoniks.org/get-challenge"}connectedCallback(){if(document.location.protocol.includes("https")){if(!jl){const t=document.createElement("script");t.type="module",this.setAttribute("async",""),this.setAttribute("defer",""),t.src="https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist/altcha.min.js",jl=!0,document.head.appendChild(t)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=wi(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&!this.formPublisher.captchaToken.get()&&(this.formPublisher.needsCaptchaValidation.set(!0),this.formPublisher.captchaToken.onAssign(this.onCaptchaTokenChanged))}}disconnectedCallback(){this.formPublisher&&(this.formPublisher.captchaToken.offAssign(this.onCaptchaTokenChanged),this.formPublisher.captchaToken.set(""),this.formPublisher.needsCaptchaValidation.set(!1)),super.disconnectedCallback()}requestToken(){if(!this.formPublisher)return;const t=this.shadowRoot.querySelector("form");if(!t)return;const e=new FormData(t);this.formPublisher.captchaKey.set(this.key),this.formPublisher.captchaToken.set(e.get("altcha")?.toString()||"")}async generateEncryptedKey(){if(this.key)return;const t=await Mm(),e=new TextEncoder().encode(Um),s=await Nm(zm,t,e);this.key=s}render(){if(!this.key)return ee;const e=gs.getLanguage().match("^fr\\b")?{aria:"Visitez altcha.org",error:"La vérification a échoué, réessayez plus tard.",expired:"La vérification a expiré, réessayez.",footer:"Protégé par Altcha",label:"Je ne suis pas un robot.",verified:"Vérifié",verifying:"Vérification en cours...",wait:"Vérification en cours… Veuillez patienter."}:{aria:"Visit altcha.org",error:"Verification failed, try again later.",expired:"Verification expired, try again.",footer:"Protected by Altcha",label:"I'm not a robot.",verified:"Verified",verifying:"Verifying...",wait:"Verifying... Please wait."};return R`
4132
4126
  <form>
4133
4127
  <altcha-widget
4134
4128
  challengeurl="${this.chalengeUrl}?key=${this.key}&maxNumber=${this.maxNumber}"
@@ -4140,7 +4134,7 @@ ${this.value}</textarea
4140
4134
  ></altcha-widget>
4141
4135
  </form>
4142
4136
  <slot></slot>
4143
- `}};Dr.styles=[Mg,X`
4137
+ `}};Er.styles=[Fm,Z`
4144
4138
  :host {
4145
4139
  --altcha-border-width: var(--sc-border-width, 1px);
4146
4140
  --altcha-border-radius: var(--sc-rounded);
@@ -4159,4 +4153,4 @@ ${this.value}</textarea
4159
4153
  --altcha-color-footer-bg: var(--sc-base-100, #000);
4160
4154
  --altcha-max-width: 260px;
4161
4155
  }
4162
- `],nn([h()],Dr.prototype,"key",2),nn([h()],Dr.prototype,"action",2),nn([h({type:Number})],Dr.prototype,"zIndex",2),Dr=nn([Q(jg)],Dr),window.queueMicrotask=window.queueMicrotask||function(t){Promise.resolve().then(t).catch(e=>setTimeout(()=>{throw e}))};class zg extends An{constructor(e){super(e),this.observables=new Set,this.cleanupWatchers=[],this.onAssign=s=>{this.setValue(s)},this.node=e.options?.host}teardownWatchers(){this.cleanupWatchers.forEach(e=>e()),this.cleanupWatchers=[]}normalizeInput(e){return Sa(e)?e.path:e}render(e){const s=this.normalizeInput(e),i=this.pathTemplate!==s;return i&&(this.pathTemplate=s,this.teardownWatchers()),(i||!this.resolvedPath)&&queueMicrotask(()=>{!this.isConnected||!this.pathTemplate||this.setupSubscription()}),Ft}setupSubscription(){const e=this.node,s=this.pathTemplate;if(!e||!s)return;this.teardownWatchers();const i=Bt(s);if(i.length>0)for(const r of i)this.cleanupWatchers.push(Ts(ji.watcherStore,ji.hooked,e,r,()=>this.refreshSubscription()));this.refreshSubscription()}refreshSubscription(){const e=this.node,s=this.pathTemplate;if(!s)return;const i=Bt(s).length>0;let r=s;if(i)if(!e)r=null;else{const n=Ot(e,s);r=n.ready?n.path:null}if(r!==this.resolvedPath){if(!r){this.unsubscribe(),this.resolvedPath=void 0,this.setValue(void 0);return}this.resolvedPath=r,this.subscribe(r)}}subscribe(e){this.unsubscribe(),this.onAssign=s=>{this.setValue(s)},this.observables=bi(e),this.observables.forEach(s=>{s.onAssign(this.onAssign)})}unsubscribe(){this.observables.forEach(e=>e.offAssign(this.onAssign)),this.observables.clear()}disconnected(){this.teardownWatchers(),this.unsubscribe(),this.resolvedPath=void 0}reconnected(){this.pathTemplate&&this.setupSubscription()}}const Nl=Es(zg),Ug=Nl,qg=Nl;window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:yi,dataProvider:Zl,sub:qg,subscribe:Ug,get:Yl,set:Jl};const Bg=Se,Hg=Oe;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:Bg,SonicModal:Hg};const Vg=window;Vg.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))}));
4156
+ `],cn([h()],Er.prototype,"key",2),cn([h()],Er.prototype,"action",2),cn([h({type:Number})],Er.prototype,"zIndex",2),Er=cn([X(qm)],Er),window.queueMicrotask=window.queueMicrotask||function(t){Promise.resolve().then(t).catch(e=>setTimeout(()=>{throw e}))};class Hm extends Dn{constructor(e){super(e),this.observables=new Set,this.cleanupWatchers=[],this.onAssign=s=>{this.setValue(s)},this.node=e.options?.host}teardownWatchers(){this.cleanupWatchers.forEach(e=>e()),this.cleanupWatchers=[]}normalizeInput(e){return Aa(e)?e.path:e}render(e){const s=this.normalizeInput(e),r=this.pathTemplate!==s;return r&&(this.pathTemplate=s,this.teardownWatchers()),(r||!this.resolvedPath)&&queueMicrotask(()=>{!this.isConnected||!this.pathTemplate||this.setupSubscription()}),Rt}setupSubscription(){const e=this.node,s=this.pathTemplate;if(!e||!s)return;this.teardownWatchers();const r=Ht(s);if(r.length>0)for(const i of r)this.cleanupWatchers.push(Ts(zi.watcherStore,zi.hooked,e,i,()=>this.refreshSubscription()));this.refreshSubscription()}refreshSubscription(){const e=this.node,s=this.pathTemplate;if(!s)return;const r=Ht(s).length>0;let i=s;if(r)if(!e)i=null;else{const n=Tt(e,s);i=n.ready?n.path:null}if(i!==this.resolvedPath){if(!i){this.unsubscribe(),this.resolvedPath=void 0,this.setValue(void 0);return}this.resolvedPath=i,this.subscribe(i)}}subscribe(e){this.unsubscribe(),this.onAssign=s=>{this.setValue(s)},this.observables=vi(e),this.observables.forEach(s=>{s.onAssign(this.onAssign)})}unsubscribe(){this.observables.forEach(e=>e.offAssign(this.onAssign)),this.observables.clear()}disconnected(){this.teardownWatchers(),this.unsubscribe(),this.resolvedPath=void 0}reconnected(){this.pathTemplate&&this.setupSubscription()}}const zl=Es(Hm),Bm=zl,Vm=zl;window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:wi,dataProvider:ec,sub:Vm,subscribe:Bm,get:Xl,set:tc};const Wm=Se,Km=Oe;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:Wm,SonicModal:Km};const Gm=window;Gm.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))}));