@supersoniks/concorde 3.1.97 → 3.1.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +122 -121
- package/concorde-core.es.js +175 -153
- package/dist/concorde-core.bundle.js +122 -121
- package/dist/concorde-core.es.js +175 -153
- package/package.json +1 -1
- package/src/core/components/ui/progress/progress.ts +1 -0
- package/src/core/components/ui/toast/toast.ts +43 -1
package/concorde-core.bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(K){typeof define=="function"&&define.amd?define(K):K()})(function(){"use strict";var Dt,L,E,So,t,X;let K=class Ht{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,e)=>{const i=e.indexOf("=");return t[e.substring(0,i).trim()]=e.substring(i+1),t},{})}static everyAncestors(t,e){for(;t;){if(!e(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const e=t;if(e.nodeType===1){const i=window.getComputedStyle(e);if((i==null?void 0:i.overflowY)==="auto"||(i==null?void 0:i.overflowY)==="scroll"||(i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="auto"||(i==null?void 0:i.overflowX)==="scroll"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,e){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(e))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(e):null}static getApiConfiguration(t){const e=Ht.getAncestorAttributeValue(t,"token"),i=Ht.getAncestorAttributeValue(t,"addHTTPResponse")!=null,s=Ht.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Ht.getAncestorAttributeValue(t,"tokenProvider"),c=Ht.getAncestorAttributeValue(t,"eventsApiToken");e||(o=Ht.getAncestorAttributeValue(t,"userName"),n=Ht.getAncestorAttributeValue(t,"password"));const h=Ht.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),p=t.hasAttribute("blockUntilDone");return{serviceURL:s,token:e,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:p}}static getClosestElement(t,e){for(;!(t.nodeName&&t.nodeName.toLowerCase()===e)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Ht.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const s=document.createElement("script");s.src=t,s.onload=()=>i(!0),s.onerror=()=>i(!0),document.head.appendChild(s)})}static async loadCSS(t){return new Promise(async i=>{const s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=t,s.onload=()=>i(!0),s.onerror=()=>i(!0),document.head.appendChild(s)})}};const ei=r=>{const t=document.documentElement,e=new MutationObserver(s=>{for(let o of s)o.type==="attributes"&&o.attributeName==="lang"&&r()}),i={attributes:!0,attributeFilter:["lang"]};e.observe(t,i)};let ws=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,e="",i="long"){e||(e=K.getLanguage());const s=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,p){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:p}).format}const[n,a]=s(t,60),c=[];return n&&c.push(o(e,"hour",i)(n)),a&&c.push(o(e,"minute",i)(a)),new Intl.ListFormat(e,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}},Eo=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(e=>{setTimeout(e,t)})}},rr="sonic";typeof __SONIC_PREFIX__<"u"&&(rr=__SONIC_PREFIX__);let or=rr.replace(/-([a-z])/g,r=>r[1].toUpperCase());const xs=or.charAt(0).toUpperCase()+or.slice(1);function $s(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function He(r){return typeof r=="object"&&r!=null}let Se="sonic";typeof __SONIC_PREFIX__>"u"&&(Se="sonic"+Math.floor(Math.random()*1e6));const si=Se=="sonic"?"publisher-proxies-data":Se+"-publisher-proxies-data";let ii=(Dt=class{constructor(t,e,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_=t,this.parent=e||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const e in this._proxies_.keys())e!="_parent_"&&((t=this._proxies_.get(e))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),Dt.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_(t=!1){if(this._mutationListeners_.forEach(e=>e()),this._is_savable_&&!N.changed){N.changed=!0,N.saveId++;const e=N.saveId;setTimeout(()=>N.getInstance().saveToLocalStorage(e),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(s=>{s(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,e){this._fillListeners_.forEach(i=>{i[t]!==e&&(i[t]=e)}),this._publishTemplateFilling_(t,e)}_publishTemplateFilling_(t,e){this._templateFillListeners_.forEach(i=>{const s=Object.getOwnPropertyDescriptor(i,t);s&&!s.set&&!s.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==e&&(i[t]=e))})}onAssign(t,e=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),e&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const e in this._value_){let i=e;const s=this._value_[e];t.propertyMap&&t.propertyMap[e]&&(i=t.propertyMap[e]),typeof t[e]<"u"&&t[e]!==s&&(t[i]=s)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const e in this._value_){const i=this._value_[e];t[e]!==i&&(t[e]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,e=!1){var s,o,n;if(this._value_===t||this._value_&&t&&$s(this._value_)&&$s(t)&&this._value_.__value===t.__value)return!0;this._value_=He(t)?t:{__value:t},this._cachedGet_=void 0;const i=$s(this._value_);if(this._parentKey_&&this.parent){const a=$s(this._value_)?this._value_.__value:this._value_;if(((s=this.parent)==null?void 0:s.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:a});else{const c=[];c[Number(this._parentKey_)]=a,this.parent.set(c)}else this.parent._value_[this._parentKey_]=a}if(i)return this._proxies_.forEach((a,c)=>{c!="_parent_"&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(e),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const a in this._value_)this._value_[a]===void 0&&delete this._value_[a];if(this._proxies_.forEach((a,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),He(this._value_))for(const a in this._value_){const c=t[a],d=He(c)?c:{__value:c};if(!this._proxies_.has(a)){this._publishDynamicFilling_(a,c);continue}(n=this._proxies_.get(a))==null||n.set(d,!0),this._publishDynamicFilling_(a,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(N.modifiedCollectore.length>0&&N.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(Dt.instancesCounter++,this._instanceCounter_=Dt.instancesCounter),Dt.instances.set(this._instanceCounter_,this),"<"+Se+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Se+"-publisher-proxy>"}},Dt.instances=new Map,Dt.instancesCounter=0,Dt),N=(L=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],L.instance!=null)throw"Singleton / use getInstance";L.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}invalidateAll(){this.publishers.forEach(t=>{t._invalidate_on_page_show_&&t.invalidate()})}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(si),s=null;if(i&&(s=await this.decompress(i,"gzip")),s)try{this.localStorageData=JSON.parse(s)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(si,i),this.localStorageData={};const o=1e3*60*60*12;for(const n in this.localStorageData){const a=this.localStorageData[n],c=new Date().getTime()-(a.expirationDelayMs||o);a.lastModifiationMS<c&&delete this.localStorageData[n]}t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const e=L.instances.get(t);return e||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new L)}return L.instance==null?new L:L.instance}static registerInstance(t,e){L.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),L.instances.set(t,e)}static get(t,e){return L.getInstance().get(t,e)}static collectModifiedPublisher(){L.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return L.modifiedCollectore.shift()}static delete(t){return t?L.getInstance().delete(t):!1}async setLocalData(t,e){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[e+"¤lang_"+K.getLanguage()])==null?void 0:i.data)||t.get())}get(t,e){const i=(e==null?void 0:e.localStorageMode)==="enabled",s=(e==null?void 0:e.invalidateOnPageShow)===!0;if(!this.publishers.has(t)){const n={},a=new Be(n);this.set(t,a)}const o=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e!=null&&e.expirationDelayMs&&(o._expiration_delay_=e.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),s&&(o._invalidate_on_page_show_=s),this.publishers.get(t)}set(t,e){this.publishers.set(t,e)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==L.saveId&&t%10!=0))try{if(!L.changed||L.saving)return;L.saving=!0,L.changed=!1;const e=Array.from(this.publishers.keys());let i=!1;for(const s of e){const o=this.publishers.get(s);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[s+"¤lang_"+K.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},i=!0)}if(i){const s=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(si,s)}if(L.saving=!1,L.changed){L.saveId++;const s=L.saveId;setTimeout(()=>this.saveToLocalStorage(s),1e3)}}catch{L.saving=!1}}async compress(t,e){const i=new TextEncoder().encode(t),s=window,o=new s.CompressionStream(e),n=o.writable.getWriter();n.write(i),n.close();const a=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(a);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,e){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,a=new n.DecompressionStream(e),c=a.writable.getWriter();c.write(o),c.close();const h=await new Response(a.readable).arrayBuffer();return new TextDecoder().decode(h)}},L.buildDate="Tue Aug 26 2025 08:38:20 GMT+0200 (Central European Summer Time)",L.changed=!1,L.saving=!1,L.saveId=0,L.instance=null,L.instances=new Map,L.modifiedCollectore=[],L);if(typeof window<"u"){const r=window;r[xs+"PublisherManager"]=r[xs+"PublisherManager"]||N}const No=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_"]);class Be extends ii{constructor(t,e=null,i){super(t,e,i);const s=new Proxy(this,{get:function(o,n){if(No.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>s.get();if(!o._proxies_.has(n)){const a=o._value_[n],c=new Be(He(a)?a:{__value:a},o,n);c._proxies_.set("_parent_",s),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,a){var h;if(n=="_value_")return o._value_=a,!0;if(n=="_cachedGet_")return o._cachedGet_=a,!0;if(n=="_assignmentId_")return o._assignmentId_=a,!0;if(n=="_is_savable_")return o._is_savable_=a,!0;if(n=="_expiration_delay_")return o._expiration_delay_=a,!0;if(n=="_invalidate_on_page_show_")return o._invalidate_on_page_show_=a,!0;if(n=="_instanceCounter_")return o._instanceCounter_=a,!0;if(!o._proxies_.has(n)){const d=new Be({},o,n);d._proxies_.set("_parent_",s),o._proxies_.set(n,d)}return o._value_[n]!==a&&(o._value_[n]=a,o._publishDynamicFilling_(n,a),(h=o._proxies_.get(n))==null||h.set(He(a)?a:{__value:a})),!0},deleteProperty:function(o,n){var a;return o._publishDynamicFilling_(n,null),(a=o._proxies_.get(n))==null||a.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,a){return a&&"value"in a&&(o._value_[n]=a.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return s}getProperty(t,e){return t[e]}}class To extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=ii.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(Se+"-publisher-proxy",To)}catch{}window.addEventListener("pageshow",r=>{r.persisted&&N.getInstance().invalidateAll()});let Ps=(E=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(E.observedElements.keys()).forEach(t=>E.unObserve(t)))}static observe(t){if(!t||!E.enabled||E.observedElements.has(t))return;const e=new MutationObserver(E.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],e.observe(t,i),t.querySelectorAll("[data-bind]").forEach(s=>E.addPublisherListeners(s)),E.observedElements.set(t,e)}static unObserve(t){if(!t)return;const e=this.observedElements.get(t);e&&(e.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>E.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&E.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(e=>E.addPublisherListeners(e)):t.childNodes.forEach(e=>E.onAdded(e))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&E.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(e=>E.removePublisherListeners(e)):t.childNodes.forEach(e=>E.onRemoved(e))}static onMutation(t){for(const e of t)switch(e.type){case"attributes":E.addPublisherListeners(e.target);break;case"childList":e.addedNodes.forEach(i=>{E.onAdded(i)}),e.removedNodes.forEach(i=>{E.onRemoved(i)});break}}static removePublisherListeners(t){const e=E.publisherListeners.get(t);e&&(E.publisherListeners.delete(t),e.forEach(i=>{var s;(s=i.publisher)==null||s.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let e=t.match(/(\$(?:\w+\\?\.?)+)/g);return e?e=e.map(i=>i.replace("$","")):e=[t],e=e.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:e.map(i=>i.split(/\b\.\b/).map(s=>s.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(e=>e.name.indexOf("::")==0).map(e=>({propertyToUpdate:e.name.substring(2).replace(/-((html)|\w)/g,s=>s.substring(1).toUpperCase()),bindedVariablesDescriptor:E.getVariablesDescriptor(e.value)})):[]}static getSubPublisher(t,e){if(!e)return t;for(const i of e)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){E.removePublisherListeners(t);const e=K.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!e)return;const i=N.getInstance().get(e),s=E.getDataBindItems(t),o=[];s.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let p=i;p=E.getSubPublisher(i,d);const m=t,v={publisher:p,onAssign:()=>{const b=a.variables.map(D=>{var f;return(f=E.getSubPublisher(i,D))==null?void 0:f.get()});let y=a.expression,_=!1;if(b.length==1&&a.variables[0].join(".")==y.substring(1)){let D=b[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<b.length;D++){let f=b[D];const u=a.variables[D];f===null&&(_=!0,f=void 0),y=y.replace("$"+u.join("."),f)}if(y.indexOf("|")!=-1){const D=y.indexOf("|");if(D==0)y=ws.js(y.substring(1));else{const f=y.substring(0,D),u=y.substring(D+1),w=ws[f];y=_?"":w?w(u):y}}else y=_?"":y;m[c]=y}};p==null||p.onAssign(v.onAssign),o.push(v)}}),E.publisherListeners.set(t,o)}},E.observedElements=new Map,E.enabled=!0,E.publisherListeners=new Map,E);Ps.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ps);let et=class Zt{static shallowEqual(t,e,i=!0){const s=Object.keys(t),o=Object.keys(e);if(s.length!==o.length&&i)return!1;for(const n of s){const a=t[n],c=e[n];if(i?a!==c:a!=c)return!1}return!0}static deepEqual(t,e,i=!0){const s=Object.keys(t),o=Object.keys(e);if(s.length!==o.length&&i)return!1;for(const n of s){const a=t[n],c=e[n],h=Zt.isObject(a)&&Zt.isObject(c),d=i?a!==c:a!=c;if(h&&!Zt.deepEqual(a,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Zt.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,e,i=!1){for(const s of e){const o=t[s];if(o===void 0)return;i&&Zt.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[s]}return t}static traverseDotNotation(t,e,i=!1){return Zt.traverse(t,e.split("."),i)}static getURLSearchArray(t,e=""){let i=[];for(let s in t){const o=t[s];e&&(s=e+"["+s+"]"),Zt.isObject(o)?i=[...i,...this.getURLSearchArray(o,s)]:i.push(`${s}=${o}`)}return i}static getURLSearchString(t){return Zt.getURLSearchArray(t,"").join("&")}};const pt=et.traverseDotNotation;/**
|
|
1
|
+
(function(K){typeof define=="function"&&define.amd?define(K):K()})(function(){"use strict";var Dt,E,N,So,t,X;let K=class Bt{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,e)=>{const i=e.indexOf("=");return t[e.substring(0,i).trim()]=e.substring(i+1),t},{})}static everyAncestors(t,e){for(;t;){if(!e(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const e=t;if(e.nodeType===1){const i=window.getComputedStyle(e);if((i==null?void 0:i.overflowY)==="auto"||(i==null?void 0:i.overflowY)==="scroll"||(i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="auto"||(i==null?void 0:i.overflowX)==="scroll"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,e){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(e))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(e):null}static getApiConfiguration(t){const e=Bt.getAncestorAttributeValue(t,"token"),i=Bt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,s=Bt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Bt.getAncestorAttributeValue(t,"tokenProvider"),c=Bt.getAncestorAttributeValue(t,"eventsApiToken");e||(o=Bt.getAncestorAttributeValue(t,"userName"),n=Bt.getAncestorAttributeValue(t,"password"));const h=Bt.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),p=t.hasAttribute("blockUntilDone");return{serviceURL:s,token:e,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:p}}static getClosestElement(t,e){for(;!(t.nodeName&&t.nodeName.toLowerCase()===e)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Bt.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const s=document.createElement("script");s.src=t,s.onload=()=>i(!0),s.onerror=()=>i(!0),document.head.appendChild(s)})}static async loadCSS(t){return new Promise(async i=>{const s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=t,s.onload=()=>i(!0),s.onerror=()=>i(!0),document.head.appendChild(s)})}};const ei=r=>{const t=document.documentElement,e=new MutationObserver(s=>{for(let o of s)o.type==="attributes"&&o.attributeName==="lang"&&r()}),i={attributes:!0,attributeFilter:["lang"]};e.observe(t,i)};let ws=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,e="",i="long"){e||(e=K.getLanguage());const s=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,p){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:p}).format}const[n,a]=s(t,60),c=[];return n&&c.push(o(e,"hour",i)(n)),a&&c.push(o(e,"minute",i)(a)),new Intl.ListFormat(e,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}},Eo=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(e=>{setTimeout(e,t)})}},rr="sonic";typeof __SONIC_PREFIX__<"u"&&(rr=__SONIC_PREFIX__);let or=rr.replace(/-([a-z])/g,r=>r[1].toUpperCase());const xs=or.charAt(0).toUpperCase()+or.slice(1);function $s(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function Be(r){return typeof r=="object"&&r!=null}let Se="sonic";typeof __SONIC_PREFIX__>"u"&&(Se="sonic"+Math.floor(Math.random()*1e6));const si=Se=="sonic"?"publisher-proxies-data":Se+"-publisher-proxies-data";let ii=(Dt=class{constructor(t,e,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_=t,this.parent=e||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const e in this._proxies_.keys())e!="_parent_"&&((t=this._proxies_.get(e))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),Dt.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_(t=!1){if(this._mutationListeners_.forEach(e=>e()),this._is_savable_&&!T.changed){T.changed=!0,T.saveId++;const e=T.saveId;setTimeout(()=>T.getInstance().saveToLocalStorage(e),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(s=>{s(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,e){this._fillListeners_.forEach(i=>{i[t]!==e&&(i[t]=e)}),this._publishTemplateFilling_(t,e)}_publishTemplateFilling_(t,e){this._templateFillListeners_.forEach(i=>{const s=Object.getOwnPropertyDescriptor(i,t);s&&!s.set&&!s.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==e&&(i[t]=e))})}onAssign(t,e=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),e&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const e in this._value_){let i=e;const s=this._value_[e];t.propertyMap&&t.propertyMap[e]&&(i=t.propertyMap[e]),typeof t[e]<"u"&&t[e]!==s&&(t[i]=s)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const e in this._value_){const i=this._value_[e];t[e]!==i&&(t[e]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,e=!1){var s,o,n;if(this._value_===t||this._value_&&t&&$s(this._value_)&&$s(t)&&this._value_.__value===t.__value)return!0;this._value_=Be(t)?t:{__value:t},this._cachedGet_=void 0;const i=$s(this._value_);if(this._parentKey_&&this.parent){const a=$s(this._value_)?this._value_.__value:this._value_;if(((s=this.parent)==null?void 0:s.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:a});else{const c=[];c[Number(this._parentKey_)]=a,this.parent.set(c)}else this.parent._value_[this._parentKey_]=a}if(i)return this._proxies_.forEach((a,c)=>{c!="_parent_"&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(e),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const a in this._value_)this._value_[a]===void 0&&delete this._value_[a];if(this._proxies_.forEach((a,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),Be(this._value_))for(const a in this._value_){const c=t[a],d=Be(c)?c:{__value:c};if(!this._proxies_.has(a)){this._publishDynamicFilling_(a,c);continue}(n=this._proxies_.get(a))==null||n.set(d,!0),this._publishDynamicFilling_(a,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(T.modifiedCollectore.length>0&&T.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(Dt.instancesCounter++,this._instanceCounter_=Dt.instancesCounter),Dt.instances.set(this._instanceCounter_,this),"<"+Se+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Se+"-publisher-proxy>"}},Dt.instances=new Map,Dt.instancesCounter=0,Dt),T=(E=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],E.instance!=null)throw"Singleton / use getInstance";E.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}invalidateAll(){this.publishers.forEach(t=>{t._invalidate_on_page_show_&&t.invalidate()})}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(si),s=null;if(i&&(s=await this.decompress(i,"gzip")),s)try{this.localStorageData=JSON.parse(s)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(si,i),this.localStorageData={};const o=1e3*60*60*12;for(const n in this.localStorageData){const a=this.localStorageData[n],c=new Date().getTime()-(a.expirationDelayMs||o);a.lastModifiationMS<c&&delete this.localStorageData[n]}t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const e=E.instances.get(t);return e||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new E)}return E.instance==null?new E:E.instance}static registerInstance(t,e){E.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),E.instances.set(t,e)}static get(t,e){return E.getInstance().get(t,e)}static collectModifiedPublisher(){E.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return E.modifiedCollectore.shift()}static delete(t){return t?E.getInstance().delete(t):!1}async setLocalData(t,e){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[e+"¤lang_"+K.getLanguage()])==null?void 0:i.data)||t.get())}get(t,e){const i=(e==null?void 0:e.localStorageMode)==="enabled",s=(e==null?void 0:e.invalidateOnPageShow)===!0;if(!this.publishers.has(t)){const n={},a=new He(n);this.set(t,a)}const o=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e!=null&&e.expirationDelayMs&&(o._expiration_delay_=e.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),s&&(o._invalidate_on_page_show_=s),this.publishers.get(t)}set(t,e){this.publishers.set(t,e)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==E.saveId&&t%10!=0))try{if(!E.changed||E.saving)return;E.saving=!0,E.changed=!1;const e=Array.from(this.publishers.keys());let i=!1;for(const s of e){const o=this.publishers.get(s);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[s+"¤lang_"+K.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},i=!0)}if(i){const s=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(si,s)}if(E.saving=!1,E.changed){E.saveId++;const s=E.saveId;setTimeout(()=>this.saveToLocalStorage(s),1e3)}}catch{E.saving=!1}}async compress(t,e){const i=new TextEncoder().encode(t),s=window,o=new s.CompressionStream(e),n=o.writable.getWriter();n.write(i),n.close();const a=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(a);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,e){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,a=new n.DecompressionStream(e),c=a.writable.getWriter();c.write(o),c.close();const h=await new Response(a.readable).arrayBuffer();return new TextDecoder().decode(h)}},E.buildDate="Thu Sep 04 2025 14:43:53 GMT+0200 (Central European Summer Time)",E.changed=!1,E.saving=!1,E.saveId=0,E.instance=null,E.instances=new Map,E.modifiedCollectore=[],E);if(typeof window<"u"){const r=window;r[xs+"PublisherManager"]=r[xs+"PublisherManager"]||T}const No=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_"]);class He extends ii{constructor(t,e=null,i){super(t,e,i);const s=new Proxy(this,{get:function(o,n){if(No.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>s.get();if(!o._proxies_.has(n)){const a=o._value_[n],c=new He(Be(a)?a:{__value:a},o,n);c._proxies_.set("_parent_",s),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,a){var h;if(n=="_value_")return o._value_=a,!0;if(n=="_cachedGet_")return o._cachedGet_=a,!0;if(n=="_assignmentId_")return o._assignmentId_=a,!0;if(n=="_is_savable_")return o._is_savable_=a,!0;if(n=="_expiration_delay_")return o._expiration_delay_=a,!0;if(n=="_invalidate_on_page_show_")return o._invalidate_on_page_show_=a,!0;if(n=="_instanceCounter_")return o._instanceCounter_=a,!0;if(!o._proxies_.has(n)){const d=new He({},o,n);d._proxies_.set("_parent_",s),o._proxies_.set(n,d)}return o._value_[n]!==a&&(o._value_[n]=a,o._publishDynamicFilling_(n,a),(h=o._proxies_.get(n))==null||h.set(Be(a)?a:{__value:a})),!0},deleteProperty:function(o,n){var a;return o._publishDynamicFilling_(n,null),(a=o._proxies_.get(n))==null||a.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,a){return a&&"value"in a&&(o._value_[n]=a.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return s}getProperty(t,e){return t[e]}}class To extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=ii.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(Se+"-publisher-proxy",To)}catch{}window.addEventListener("pageshow",r=>{r.persisted&&T.getInstance().invalidateAll()});let Ps=(N=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(N.observedElements.keys()).forEach(t=>N.unObserve(t)))}static observe(t){if(!t||!N.enabled||N.observedElements.has(t))return;const e=new MutationObserver(N.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],e.observe(t,i),t.querySelectorAll("[data-bind]").forEach(s=>N.addPublisherListeners(s)),N.observedElements.set(t,e)}static unObserve(t){if(!t)return;const e=this.observedElements.get(t);e&&(e.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>N.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&N.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(e=>N.addPublisherListeners(e)):t.childNodes.forEach(e=>N.onAdded(e))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&N.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(e=>N.removePublisherListeners(e)):t.childNodes.forEach(e=>N.onRemoved(e))}static onMutation(t){for(const e of t)switch(e.type){case"attributes":N.addPublisherListeners(e.target);break;case"childList":e.addedNodes.forEach(i=>{N.onAdded(i)}),e.removedNodes.forEach(i=>{N.onRemoved(i)});break}}static removePublisherListeners(t){const e=N.publisherListeners.get(t);e&&(N.publisherListeners.delete(t),e.forEach(i=>{var s;(s=i.publisher)==null||s.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let e=t.match(/(\$(?:\w+\\?\.?)+)/g);return e?e=e.map(i=>i.replace("$","")):e=[t],e=e.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:e.map(i=>i.split(/\b\.\b/).map(s=>s.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(e=>e.name.indexOf("::")==0).map(e=>({propertyToUpdate:e.name.substring(2).replace(/-((html)|\w)/g,s=>s.substring(1).toUpperCase()),bindedVariablesDescriptor:N.getVariablesDescriptor(e.value)})):[]}static getSubPublisher(t,e){if(!e)return t;for(const i of e)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){N.removePublisherListeners(t);const e=K.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!e)return;const i=T.getInstance().get(e),s=N.getDataBindItems(t),o=[];s.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let p=i;p=N.getSubPublisher(i,d);const g=t,v={publisher:p,onAssign:()=>{const b=a.variables.map(D=>{var f;return(f=N.getSubPublisher(i,D))==null?void 0:f.get()});let y=a.expression,_=!1;if(b.length==1&&a.variables[0].join(".")==y.substring(1)){let D=b[0];D===null&&(D=""),g[c]=D;return}for(let D=0;D<b.length;D++){let f=b[D];const u=a.variables[D];f===null&&(_=!0,f=void 0),y=y.replace("$"+u.join("."),f)}if(y.indexOf("|")!=-1){const D=y.indexOf("|");if(D==0)y=ws.js(y.substring(1));else{const f=y.substring(0,D),u=y.substring(D+1),w=ws[f];y=_?"":w?w(u):y}}else y=_?"":y;g[c]=y}};p==null||p.onAssign(v.onAssign),o.push(v)}}),N.publisherListeners.set(t,o)}},N.observedElements=new Map,N.enabled=!0,N.publisherListeners=new Map,N);Ps.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ps);let et=class Zt{static shallowEqual(t,e,i=!0){const s=Object.keys(t),o=Object.keys(e);if(s.length!==o.length&&i)return!1;for(const n of s){const a=t[n],c=e[n];if(i?a!==c:a!=c)return!1}return!0}static deepEqual(t,e,i=!0){const s=Object.keys(t),o=Object.keys(e);if(s.length!==o.length&&i)return!1;for(const n of s){const a=t[n],c=e[n],h=Zt.isObject(a)&&Zt.isObject(c),d=i?a!==c:a!=c;if(h&&!Zt.deepEqual(a,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Zt.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,e,i=!1){for(const s of e){const o=t[s];if(o===void 0)return;i&&Zt.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[s]}return t}static traverseDotNotation(t,e,i=!1){return Zt.traverse(t,e.split("."),i)}static getURLSearchArray(t,e=""){let i=[];for(let s in t){const o=t[s];e&&(s=e+"["+s+"]"),Zt.isObject(o)?i=[...i,...this.getURLSearchArray(o,s)]:i.push(`${s}=${o}`)}return i}static getURLSearchString(t){return Zt.getURLSearchArray(t,"").join("&")}};const pt=et.traverseDotNotation;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const{is:jo,defineProperty:Fo,getOwnPropertyDescriptor:zo,getOwnPropertyNames:Ro,getOwnPropertySymbols:Uo,getPrototypeOf:Vo}=Object,Xt=globalThis,cr=Xt.trustedTypes,
|
|
13
|
+
*/const{is:jo,defineProperty:Fo,getOwnPropertyDescriptor:zo,getOwnPropertyNames:Ro,getOwnPropertySymbols:Uo,getPrototypeOf:Vo}=Object,Xt=globalThis,cr=Xt.trustedTypes,Bo=cr?cr.emptyScript:"",ni=Xt.reactiveElementPolyfillSupport,qe=(r,t)=>r,As={toAttribute(r,t){switch(t){case Boolean:r=r?Bo:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},ai=(r,t)=>!jo(r,t),hr={attribute:!0,type:String,converter:As,reflect:!1,hasChanged:ai};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Xt.litPropertyMetadata??(Xt.litPropertyMetadata=new WeakMap);let Oe=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=hr){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Fo(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=zo(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get(){return s==null?void 0:s.call(this)},set(n){const a=s==null?void 0:s.call(this);o.call(this,n),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??hr}static _$Ei(){if(this.hasOwnProperty(qe("elementProperties")))return;const t=Vo(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(qe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(qe("properties"))){const e=this.properties,i=[...Ro(e),...Uo(e)];for(const s of i)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,s]of e)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const s=this._$Eu(e,i);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(lr(s))}else t!==void 0&&e.push(lr(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Io(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var o;const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const n=(((o=i.converter)==null?void 0:o.toAttribute)!==void 0?i.converter:As).toAttribute(e,i.type);this._$Em=t,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){var o;const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const n=i.getPropertyOptions(s),a=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)==null?void 0:o.fromAttribute)!==void 0?n.converter:As;this._$Em=s,this[s]=a.fromAttribute(e,n.type),this._$Em=null}}requestUpdate(t,e,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??ai)(this[t],e))return;this.P(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[o,n]of s)n.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],n)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(s=>{var o;return(o=s.hostUpdate)==null?void 0:o.call(s)}),this.update(e)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}};Oe.elementStyles=[],Oe.shadowRootOptions={mode:"open"},Oe[qe("elementProperties")]=new Map,Oe[qe("finalized")]=new Map,ni==null||ni({ReactiveElement:Oe}),(Xt.reactiveElementVersions??(Xt.reactiveElementVersions=[])).push("2.0.4");/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/const
|
|
17
|
+
*/const Ho={attribute:!0,type:String,converter:As,reflect:!1,hasChanged:ai},qo=(r=Ho,t,e)=>{const{kind:i,metadata:s}=e;let o=globalThis.litPropertyMetadata.get(s);if(o===void 0&&globalThis.litPropertyMetadata.set(s,o=new Map),o.set(e.name,r),i==="accessor"){const{name:n}=e;return{set(a){const c=t.get.call(this);t.set.call(this,a),this.requestUpdate(n,c,r)},init(a){return a!==void 0&&this.P(n,void 0,r),a}}}if(i==="setter"){const{name:n}=e;return function(a){const c=this[n];t.call(this,a),this.requestUpdate(n,c,r)}}throw Error("Unsupported decorator location: "+i)};function l(r){return(t,e)=>typeof e=="object"?qo(r,t,e):((i,s,o)=>{const n=s.hasOwnProperty(o);return s.constructor.createProperty(o,n?{...i,wrapped:!0}:i),n?Object.getOwnPropertyDescriptor(s,o):void 0})(r,t,e)}/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2017 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/function
|
|
21
|
+
*/function L(r){return l({...r,state:!0,attribute:!1})}/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/const We=globalThis,Ss=We.trustedTypes,dr=Ss?Ss.createPolicy("lit-html",{createHTML:r=>r}):void 0,ci="$lit$",
|
|
41
|
+
*/const We=globalThis,Ss=We.trustedTypes,dr=Ss?Ss.createPolicy("lit-html",{createHTML:r=>r}):void 0,ci="$lit$",Ht=`lit$${Math.random().toFixed(9).slice(2)}$`,hi="?"+Ht,Wo=`<${hi}>`,le=document,Ke=()=>le.createComment(""),Ye=r=>r===null||typeof r!="object"&&typeof r!="function",di=Array.isArray,pr=r=>di(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",pi=`[
|
|
42
42
|
\f\r]`,Ze=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ur=/-->/g,fr=/>/g,ce=RegExp(`>|${pi}(?:([^\\s"'>=/]+)(${pi}*=${pi}*(?:[^
|
|
43
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
43
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),mr=/'/g,gr=/"/g,br=/^(?:script|style|textarea|title)$/i,Ko=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),m=Ko(1),yt=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),vr=new WeakMap,he=le.createTreeWalker(le,129);function yr(r,t){if(!di(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return dr!==void 0?dr.createHTML(t):t}const _r=(r,t)=>{const e=r.length-1,i=[];let s,o=t===2?"<svg>":t===3?"<math>":"",n=Ze;for(let a=0;a<e;a++){const c=r[a];let h,d,p=-1,g=0;for(;g<c.length&&(n.lastIndex=g,d=n.exec(c),d!==null);)g=n.lastIndex,n===Ze?d[1]==="!--"?n=ur:d[1]!==void 0?n=fr:d[2]!==void 0?(br.test(d[2])&&(s=RegExp("</"+d[2],"g")),n=ce):d[3]!==void 0&&(n=ce):n===ce?d[0]===">"?(n=s??Ze,p=-1):d[1]===void 0?p=-2:(p=n.lastIndex-d[2].length,h=d[1],n=d[3]===void 0?ce:d[3]==='"'?gr:mr):n===gr||n===mr?n=ce:n===ur||n===fr?n=Ze:(n=ce,s=void 0);const v=n===ce&&r[a+1].startsWith("/>")?" ":"";o+=n===Ze?c+Wo:p>=0?(i.push(h),c.slice(0,p)+ci+c.slice(p)+Ht+v):c+Ht+(p===-2?a:v)}return[yr(r,o+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};let ui=class ko{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,n=0;const a=t.length-1,c=this.parts,[h,d]=_r(t,e);if(this.el=ko.createElement(h,i),he.currentNode=this.el.content,e===2||e===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(s=he.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const p of s.getAttributeNames())if(p.endsWith(ci)){const g=d[n++],v=s.getAttribute(p).split(Ht),b=/([.?@])?(.*)/.exec(g);c.push({type:1,index:o,name:b[2],strings:v,ctor:b[1]==="."?xr:b[1]==="?"?$r:b[1]==="@"?Pr:Xe}),s.removeAttribute(p)}else p.startsWith(Ht)&&(c.push({type:6,index:o}),s.removeAttribute(p));if(br.test(s.tagName)){const p=s.textContent.split(Ht),g=p.length-1;if(g>0){s.textContent=Ss?Ss.emptyScript:"";for(let v=0;v<g;v++)s.append(p[v],Ke()),he.nextNode(),c.push({type:2,index:++o});s.append(p[g],Ke())}}}else if(s.nodeType===8)if(s.data===hi)c.push({type:2,index:o});else{let p=-1;for(;(p=s.data.indexOf(Ht,p+1))!==-1;)c.push({type:7,index:o}),p+=Ht.length-1}o++}}static createElement(t,e){const i=le.createElement("template");return i.innerHTML=t,i}};function de(r,t,e=r,i){var n,a;if(t===yt)return t;let s=i!==void 0?(n=e._$Co)==null?void 0:n[i]:e._$Cl;const o=Ye(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==o&&((a=s==null?void 0:s._$AO)==null||a.call(s,!1),o===void 0?s=void 0:(s=new o(r),s._$AT(r,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=s:e._$Cl=s),s!==void 0&&(t=de(r,s._$AS(r,t.values),s,i)),t}let wr=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=((t==null?void 0:t.creationScope)??le).importNode(e,!0);he.currentNode=s;let o=he.nextNode(),n=0,a=0,c=i[0];for(;c!==void 0;){if(n===c.index){let h;c.type===2?h=new Os(o,o.nextSibling,this,t):c.type===1?h=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(h=new Cr(o,this,t)),this._$AV.push(h),c=i[++a]}n!==(c==null?void 0:c.index)&&(o=he.nextNode(),n++)}return he.currentNode=le,s}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},Os=class Lo{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=de(this,t,e),Ye(t)?t===A||t==null||t===""?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==yt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):pr(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&Ye(this._$AH)?this._$AA.nextSibling.data=t:this.T(le.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=ui.createElement(yr(i.h,i.h[0]),this.options)),i);if(((o=this._$AH)==null?void 0:o._$AD)===s)this._$AH.p(e);else{const n=new wr(s,this),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n}}_$AC(t){let e=vr.get(t.strings);return e===void 0&&vr.set(t.strings,e=new ui(t)),e}k(t){di(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Lo(this.O(Ke()),this.O(Ke()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}},Xe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=A}_$AI(t,e=this,i,s){const o=this.strings;let n=!1;if(o===void 0)t=de(this,t,e,0),n=!Ye(t)||t!==this._$AH&&t!==yt,n&&(this._$AH=t);else{const a=t;let c,h;for(t=o[0],c=0;c<o.length-1;c++)h=de(this,a[i+c],e,c),h===yt&&(h=this._$AH[c]),n||(n=!Ye(h)||h!==this._$AH[c]),h===A?t=A:t!==A&&(t+=(h??"")+o[c+1]),this._$AH[c]=h}n&&!s&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class xr extends Xe{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}let $r=class extends Xe{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}};class Pr extends Xe{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=de(this,t,e,0)??A)===yt)return;const i=this._$AH,s=t===A&&i!==A||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==A&&(i===A||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}let Cr=class{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){de(this,t)}};const Yo={M:ci,P:Ht,A:hi,C:1,L:_r,R:wr,D:pr,V:de,I:Os,H:Xe,N:$r,U:Pr,B:xr,F:Cr},fi=We.litHtmlPolyfillSupport;fi==null||fi(ui,Os),(We.litHtmlVersions??(We.litHtmlVersions=[])).push("3.2.1");const Zo=(r,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const o=(e==null?void 0:e.renderBefore)??null;i._$litPart$=s=new Os(t.insertBefore(Ke(),o),o,void 0,e??{})}return s._$AI(r),s};/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2020 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/const{I:Xo}=Yo,Go=r=>r.strings===void 0,Ar=()=>document.createComment(""),Ge=(r,t,e)=>{var o;const i=r._$AA.parentNode,s=t===void 0?r._$AB:t._$AA;if(e===void 0){const n=i.insertBefore(Ar(),s),a=i.insertBefore(Ar(),s);e=new Xo(n,a,r,r.options)}else{const n=e._$AB.nextSibling,a=e._$AM,c=a!==r;if(c){let h;(o=e._$AQ)==null||o.call(e,r),e._$AM=r,e._$AP!==void 0&&(h=r._$AU)!==a._$AU&&e._$AP(h)}if(n!==s||c){let h=e._$AA;for(;h!==n;){const d=h.nextSibling;i.insertBefore(h,s),h=d}}}return e},pe=(r,t,e=r)=>(r._$AI(t,e),r),Qo={},Jo=(r,t=Qo)=>r._$AH=t,tn=r=>r._$AH,
|
|
47
|
+
*/const{I:Xo}=Yo,Go=r=>r.strings===void 0,Ar=()=>document.createComment(""),Ge=(r,t,e)=>{var o;const i=r._$AA.parentNode,s=t===void 0?r._$AB:t._$AA;if(e===void 0){const n=i.insertBefore(Ar(),s),a=i.insertBefore(Ar(),s);e=new Xo(n,a,r,r.options)}else{const n=e._$AB.nextSibling,a=e._$AM,c=a!==r;if(c){let h;(o=e._$AQ)==null||o.call(e,r),e._$AM=r,e._$AP!==void 0&&(h=r._$AU)!==a._$AU&&e._$AP(h)}if(n!==s||c){let h=e._$AA;for(;h!==n;){const d=h.nextSibling;i.insertBefore(h,s),h=d}}}return e},pe=(r,t,e=r)=>(r._$AI(t,e),r),Qo={},Jo=(r,t=Qo)=>r._$AH=t,tn=r=>r._$AH,mi=r=>{var i;(i=r._$AP)==null||i.call(r,!1,!0);let t=r._$AA;const e=r._$AB.nextSibling;for(;t!==e;){const s=t.nextSibling;t.remove(),t=s}};/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -56,20 +56,20 @@
|
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2017 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
|
-
*/let x=class extends Oe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Zo(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return yt}};x._$litElement$=!0,x.finalized=!0,(So=globalThis.litElementHydrateSupport)==null||So.call(globalThis,{LitElement:x});const
|
|
59
|
+
*/let x=class extends Oe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Zo(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return yt}};x._$litElement$=!0,x.finalized=!0,(So=globalThis.litElementHydrateSupport)==null||So.call(globalThis,{LitElement:x});const gi=globalThis.litElementPolyfillSupport;gi==null||gi({LitElement:x}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");function ks(r){if(typeof r=="function"){const t=r;return T.collectModifiedPublisher(),t(),T.getModifiedPublishers()||new Set}if(typeof r=="string"){const t=r.split("."),e=t.shift()||"";let i=T.get(e);i=et.traverse(i,t);const s=new Set;return s.add(i),s}return new Set([r])}class on extends Or{constructor(t){var e;super(t),this.observables=new Set,this.onAssign=i=>{this.setValue(i)},this.node=(e=t.options)==null?void 0:e.host}unsubscribe(){this.observables.forEach(t=>t.offAssign(this.onAssign))}render(t){return this.observable!==t&&(this.observable=t,this.isConnected&&this.subscribe(t)),yt}subscribe(t){this.unsubscribe(),typeof t=="function"?this.onAssign=()=>{this.setValue(t())}:this.onAssign=e=>{this.setValue(e)},this.observables=ks(t),this.observables.forEach(e=>{e.onAssign(this.onAssign)})}disconnected(){this.unsubscribe()}reconnected(){this.observable&&this.subscribe(this.observable)}}const Dr=ue(on),nn=Dr,an=Dr,ln=r=>{var t;return(t=ks(r).values().next().value)==null?void 0:t.get()},kr=(r,t)=>{const e=ks(r).values().next().value;if(t!==void 0&&e){const i=e.get();et.isEmpty(i)&&e.set(t)}return e},cn=kr,Lr=kr,hn=(r,t)=>{var e;(e=ks(r).values().next().value)==null||e.set(t)},V=class V{constructor(t){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.serviceURL=t.serviceURL,this.blockUntilDone=t.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=t.userName,this.password=t.password,t.token&&(this.token=t.token),this.tokenProvider=t.tokenProvider,this.authToken=t.authToken,this.addHTTPResponse=t.addHTTPResponse||!1,this.credentials=t.credentials,this.cache=t.cache||"default"}set token(t){if(this._token=t,!t){V.tokens.delete(this.serviceURL);return}V.invalidTokens.includes(t)||V.tokens.set(this.serviceURL,t)}get token(){return V.invalidTokens.includes(this._token)?V.tokens.get(this.serviceURL):this._token}handleInvalidToken(t){t&&(V.invalidTokens.includes(t)||(V.invalidTokens.push(t),this.token=null))}async handleResult(t,e){var a;V.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=t;const i=(a=t.headers.get("content-type"))==null?void 0:a.toLowerCase(),s=t.status;let o={};if(!i||i.indexOf("text/")==0)o={text:await t.text()};else try{o=await t.json()}catch{o={}}this.addHTTPResponse&&et.isObject(o)&&(o._sonic_http_response_=t),s===498&&!V.failledTokenUpdates.has(this.serviceURL)&&(this.handleInvalidToken(this.token),e.apiMethod==="get"?o=await this[e.apiMethod](e.path,e.additionalHeaders):o=await this[e.apiMethod](e.path,e.data,e.method,e.additionalHeaders));const n=T.get("sonic-api");return n.lastResponse={http:t,processed:o},o}async auth(){if(this.token)return;if(V.tokens.has(this.serviceURL)){this.token=V.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let t={};this.userName&&this.password?t={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(t={Authorization:"Bearer "+this.authToken});const e=new URL(this.serviceURL),i=e.protocol+"//"+e.host,s=await fetch(this.computeURL(this.tokenProvider,{serviceHost:i}),{headers:t,credentials:this.credentials});try{const o=await s.json();o.token?this.token=o.token:V.failledTokenUpdates.set(this.serviceURL,!0)}catch{V.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(t,e){var p;const i=T.get(t),s=new URLSearchParams(e.split("?")[1]||""),o=i.get();let n=[];Array.isArray(o)?n=o:n=[o];const a=[];let c=Number.POSITIVE_INFINITY,h=0,d=0;if(s.has("limit")&&(c=parseInt(s.get("limit")||"0"),d++),s.has("offset")&&(h=parseInt(s.get("offset")||"0"),d++),d>0&&(s.delete("limit"),s.delete("offset")),s.size===0)return n.slice(h,h+c);for(const[g,v]of s.entries()){const b=v.split(",").map(y=>y.trim());for(const y of b)for(const _ of n)if(typeof _!="object")isNaN(+_)?_.toString().toLowerCase().includes(v.toLowerCase())&&a.push(_):_===v&&a.push(_);else{const D=_;if(!D[g])continue;isNaN(+D[g])?(p=D[g])!=null&&p.toString().toLowerCase().includes(y.toLowerCase())&&a.push(_):D[g]===y&&a.push(_)}}return a.slice(h,h+c)}firstCallDone(){return new Promise(t=>{if(!V.firstCallDoneFlags.has(this.serviceURL))V.firstCallDoneFlags.set(this.serviceURL,"loading"),t(!0);else{const e=()=>{[void 0,"loading"].includes(V.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(e):t(!0)};e()}})}async get(t,e){await this.firstCallDone(),this.blockUntilDone&&V.firstCallDoneFlags.set(this.serviceURL,"loading");const i=/dataProvider\((.*?)\)(.*?)$/;if(i.test(t)){const h=t.match(i);if(!h)throw new Error("dataProvider path is not valid");return await this.localGet(h[1],h[2])}const s={apiMethod:"get",path:t,additionalHeaders:e},o=await this.createHeaders(e),n=this.computeURL(t),a=JSON.stringify({url:n,headers:o});if(!V.loadingGetPromises.has(a)){const h=new Promise(async d=>{try{const p=await fetch(n,{headers:o,credentials:this.credentials,cache:this.cache}),g=await this.handleResult(p,s);d(g)}catch{d(null)}});V.loadingGetPromises.set(a,h)}const c=await V.loadingGetPromises.get(a);return V.loadingGetPromises.delete(a),c}async createHeaders(t){await this.auth();const e={};return this.token&&(e.Authorization="Bearer "+this.token),e["Accept-Language"]=K.getLanguage(),t&&Object.assign(e,t),e}computeURL(t,e={}){let i="";t.startsWith("http")?i=t:i=this.serviceURL+"/"+t,i.startsWith("http")||(i=window.location.origin+i);const s=new URL(i);for(const o in e)s.searchParams.set(o,e[o]);return s.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(t,e,i="POST",s){const o={apiMethod:"send",path:t,additionalHeaders:s,method:i,data:e},n=await this.createHeaders(s);n.Accept="application/json",n["Content-Type"]="application/json";const a=await fetch(this.computeURL(t),{headers:n,credentials:this.credentials,method:i,body:JSON.stringify(e)});return await this.handleResult(a,o)}async submitFormData(t,e,i="POST",s){const o={apiMethod:"submitFormData",path:t,additionalHeaders:s,method:i,data:e},n=await this.createHeaders(s);n.Accept="application/json";const a=new FormData,c=e;for(const d in c)a.set(d,c[d]);const h=await fetch(this.computeURL(t),{headers:n,credentials:this.credentials,method:i,body:a});return await this.handleResult(h,o)}async put(t,e,i){return this.send(t,e,"PUT",i)}async post(t,e,i){return this.send(t,e,"POST",i)}async patch(t,e,i){return this.send(t,e,"PATCH",i)}async delete(t,e,i){return this.send(t,e,"delete",i)}};V.loadingGetPromises=new Map,V.tokens=new Map,V.invalidTokens=[],V.failledTokenUpdates=new Map,V.firstCallDoneFlags=new Map;let Ne=V;K.getApiConfiguration(document.body||document.documentElement);const dn=async(r,t)=>{};/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
|
-
*/let bi=class extends Ee{constructor(t){if(super(t),this.it=A,t.type!==Le.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===A||t==null)return this._t=void 0,this.it=t;if(t===yt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};bi.directiveName="unsafeHTML",bi.resultType=1;const z=ue(bi),vi=new Map,Er=r=>{if(!r)return null;const t=K.getApiConfiguration(r),e=K.getAncestorAttributeValue(r,"wordingProvider"),i=K.getAncestorAttributeValue(r,"wordingVersionProvider"),s={apiConfiguration:t,wordingProvider:e,wordingVersionProvider:i};let o=null;for(const[n,a]of vi)if(et.deepEqual(n,s)){o=a;break}return o||(o={api:new Ne(t),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:e,callIndex:0,wordingVersionProvider:i,apiCallKey:s},vi.set(s,o)),o},Nr="",
|
|
63
|
+
*/let bi=class extends Ee{constructor(t){if(super(t),this.it=A,t.type!==Le.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===A||t==null)return this._t=void 0,this.it=t;if(t===yt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};bi.directiveName="unsafeHTML",bi.resultType=1;const z=ue(bi),vi=new Map,Er=r=>{if(!r)return null;const t=K.getApiConfiguration(r),e=K.getAncestorAttributeValue(r,"wordingProvider"),i=K.getAncestorAttributeValue(r,"wordingVersionProvider"),s={apiConfiguration:t,wordingProvider:e,wordingVersionProvider:i};let o=null;for(const[n,a]of vi)if(et.deepEqual(n,s)){o=a;break}return o||(o={api:new Ne(t),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:e,callIndex:0,wordingVersionProvider:i,apiCallKey:s},vi.set(s,o)),o},Nr="",H=class H extends Or{constructor(t){super(t),this.useUnsafeHTML=!1,this.onAssign=e=>{const i=this.useUnsafeHTML?z(e):e;this.setValue(i)},this.node=t.options.host}unsubscribe(){H.publisher["wording_"+this.key].offAssign(this.onAssign)}render(t,e=!1){return this.useUnsafeHTML=e,this.key!==t&&(this.key=t,this.isConnected&&this.subscribe(t)),yt}static async callApi(t,e,i=!0,s){if(await T.getInstance().isLocalStrorageReady,H.firstCall){H.firstCall=!1,ei(H.reloadWordings);const d=Object.keys(H.publisher.get());for(const p of d)H.publisher.get()[p]===Nr&&delete H.publisher[p]}if(t){const d=K.getAncestorAttributeValue(t,"wordingVersionProvider");d&&Lr(d).onAssign(H.handleVersionProvider(t))}let o=H.publisher.get()["wording_"+e]!=null;const n=s||Er(t);if(!n)return;if(o&&e!==""){n.translatedKeys.add(e);return}n.callIndex++;const a=n.callIndex,c=n.wordingProvider??"";if(!c&&i){window.setTimeout(async()=>{H.callApi(null,e,!1,n)},1e3);return}const h=n.api;window.queueMicrotask(async()=>{if(o=H.publisher["wording_"+e].get()!=null,!o&&e!==""&&(n.keysToTranslate.add(e),H.publisher["wording_"+e]=Nr),a!==n.callIndex)return;const d=Array.from(n.keysToTranslate);if(!d.length)return;const p=c.split("?"),g=p.shift(),v=(p.length>0?p.join("?")+"&":"")+"labels[]="+d.join("&labels[]="),b=g+"?"+v;n.translatedKeys=new Set([...n.translatedKeys,...n.keysToTranslate]),n.keysToTranslate.clear();const y=await h.get(b);for(const _ in y)H.publisher["wording_"+_]=y[_]})}static reloadWordings(){for(const t of vi.values())t.keysToTranslate=new Set(t.translatedKeys),t.keysToTranslate.size>0&&H.callApi(null,"",!1,t)}static handleVersionProvider(t){const e=Er(t),i=o=>{};if(!e)return i;if(H.versionProviderHandlers.has(e))return H.versionProviderHandlers.get(e)||i;const s=function(o){if(!e.wordingVersionProvider)return;const a=H.publisher.get().__wording_versions__??[];if(o==null)return;const c=a.find(h=>h.serviceURL===e.api.serviceURL)||{serviceURL:e.api.serviceURL,version:0};a.includes(c)||a.push(c),o!==c.version&&(c.version=o,H.publisher.set({__wording_versions__:a}),H.reloadWordings())};return H.versionProviderHandlers.set(e,s),s}subscribe(t){this.unsubscribe(),H.publisher["wording_"+t].onAssign(this.onAssign),H.callApi(this.node,t)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};H.publisher=T.get("sonic-wording",{localStorageMode:"enabled"}),H.firstCall=!0,H.versionProviderHandlers=new Map;let Te=H;const pn=ue(Te);var un=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,Lt=(r,t,e,i)=>{for(var s=i>1?void 0:i?fn(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&un(t,e,s),s};let Ls=!1,yi=new Set;const G=(r,t)=>{var s;const e=(s=class extends r{constructor(...n){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=a=>{this.props=a}}hasAncestorAttribute(n){return this.getAncestorAttributeValue(n)!=null}getAncestorAttributeValue(n){return K.getAncestorAttributeValue(this,n)}get props(){return this._props!==null||!this.publisher?this._props:this.publisher.get()}set props(n){typeof n=="string"&&["{","["].includes(n.trim().charAt(0))&&(n=JSON.parse(n)),n!=this._props&&(this._props=n,this.publisher&&this.publisher.get()!=n&&this.publisher.set(n),this.requestUpdate())}updated(n){super.updated(n);const c=[...(this.shadowRoot||this).children].filter(d=>d.tagName!="STYLE"),h=this.displayContents?"contents":c.length==0?"none":null;h?this.style.display=h:this.style.removeProperty("display")}connectedCallback(){if(s.instanceCounter++,this.hasAttribute("lazyRendering")){const n={root:null,threshold:.9};let a=!0;const c=new IntersectionObserver(h=>{for(const d of h)if(a&&d.isIntersecting){a=!1,c.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},n);c.observe(this)}else this.initWording(),this.shouldRenderLazy=!1;this.initPublisher(),this.addDebugger(),super.connectedCallback()}disconnectedCallback(){var n;this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),Te.publisher.stopTemplateFilling(this),this.onAssign&&((n=this.publisher)==null||n.offAssign(this.onAssign))}addDebugger(){var n;if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const a=this.debug.style;a.position="fixed",a.top="0",a.right="0",a.margin="auto",a.borderRadius=".7rem",a.backgroundColor="#0f1729",a.color="#c5d4f9",a.padding="16px 16px",a.margin="16px 16px",a.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",a.overflowY="auto",a.zIndex="99999999",a.maxHeight="calc(100vh - 32px)",a.fontFamily="Consolas, monospace",a.maxWidth="min(50vw,25rem)",a.fontSize="12px",a.minWidth="300px",a.overflowWrap="break-word",a.resize="vertical"}this.addEventListener("click",a=>{a.ctrlKey&&(a.preventDefault(),Ls=!Ls)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{Ls||this.removeDebugger(),document.body.appendChild(this.debug),yi.add(this.debug)}),this.addEventListener("mouseout",()=>{Ls||this.removeDebugger()}),(n=this.publisher)==null||n.onInternalMutation(()=>{var a;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((a=this.publisher)==null?void 0:a.get(),null," ")}</pre>`})}}removeDebugger(){yi.forEach(n=>{document.body.contains(n)&&document.body.removeChild(n)}),yi=new Set}getApiConfiguration(){return K.getApiConfiguration(this)}async initWording(){const n=Object.getOwnPropertyNames(this.constructor.prototype);for(const a of n)a.indexOf("wording_")==0&&Te.callApi(this,a.substring(8));Te.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const n=super.createRenderRoot();return Ps.observe(n),n}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const n=N.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let a=this.dataProvider;if(!a&&this._props&&(this.dataProvider=a="__subscriber__"+s.instanceCounter),a){this.bindPublisher&&n.set(a,this.bindPublisher());let c=n.get(a,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=a,this.hasAttribute("subDataProvider")){const h=this.getAttribute("subDataProvider");this.dataProvider=a+"/"+h,c=et.traverse(c,h.split(".")),n.set(this.dataProvider,c),this.publisher=c}this.publisher=c}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))}},s.instanceCounter=0,s);return Lt([l({type:Number})],e.prototype,"collectDependenciesVersion",2),Lt([l({type:Boolean})],e.prototype,"displayContents",2),Lt([l({type:Boolean})],e.prototype,"noAutoFill",2),Lt([l({type:Boolean})],e.prototype,"forceAutoFill",2),Lt([l({type:Object})],e.prototype,"propertyMap",2),Lt([l({type:String,attribute:"data-title"})],e.prototype,"title",2),Lt([l({reflect:!0})],e.prototype,"dataProvider",2),Lt([l()],e.prototype,"bindPublisher",2),Lt([l()],e.prototype,"props",1),Lt([k()],e.prototype,"shouldRenderLazy",2),e};var gn=Object.defineProperty,mn=(r,t,e,i)=>{for(var s=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=n(t,e,s)||s);return s&&gn(t,e,s),s};const Je=r=>{class t extends r{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 s of i)s.hasAttribute(this.templateValueAttribute)&&(this.templateParts[s.getAttribute(this.templateValueAttribute)]=s,this.templatePartsList.push(s)),s.hasAttribute("skeleton")&&(this.templateParts.skeleton=s),s.hasAttribute("no-result")&&(this.templateParts["no-result"]=s),s.hasAttribute("no-item")&&(this.templateParts["no-item"]=s);this.templateList=i.filter(s=>!s.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=i),super.connectedCallback()}}return mn([l({type:Array})],t.prototype,"templates"),t};var bn=Object.defineProperty,vn=Object.getOwnPropertyDescriptor,Y=(r,t,e,i)=>{for(var s=i>1?void 0:i?vn(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&bn(t,e,s),s};const yn="sonic-date";ei(()=>R.updateComponentsLanguage());let R=class extends G(Je(x)){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(){R.dateCompnents.forEach(r=>r.pageLanguage=K.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(r){var t;r||(r="Du %s au %s"),this._wording_billet_periode_validite=r,this.duAu=(t=this.wording_billet_periode_validite)==null?void 0:t.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=K.getLanguage(),R.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),R.dateCompnents.delete(this)}getDatesParts(r,t,e){const i=this.startDateObject;i.setTime(r*1e3);let s=[];if(t>0){const o=this.endDateObject;o.setTime(t*1e3);const n=i.toDateString()==o.toDateString();if((!n||this.hide_hours)&&(delete e.hour,delete e.minute),s=new Intl.DateTimeFormat(this.language||this.pageLanguage,e).formatRangeToParts(i,o),!n){const c=s.find(h=>h.type=="literal"&&h.source=="shared"&&h.value.trim().length>0);c&&(c.value=" "+this.duAu[1]+" ",c.type="to"),this.designMode||s.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else s=new Intl.DateTimeFormat(this.language||this.pageLanguage,e).formatToParts(i);return this.designMode&&s.forEach(o=>o.value=o.value.replace(/,/g," ")),s[0].value=ws.ucFirst(s[0].value),s.filter(o=>o.hidden!==!0)}dateStringToSeconds(r){return new Date(r).getTime()/1e3}willUpdate(r){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 t=this.computedStartDate;this.computedStartDate=this.computedEndDate,this.computedEndDate=t}}render(){if(!this.renderIf||!this.computedStartDate&&!this.now&&!this.computedEndDate)return A;const r={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(r.weekday=this.weekday||"short"),this.hour!=="hidden"&&(r.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(r.minute=this.minute||"2-digit"),this.era&&(r.era=this.era),this.time_zone&&(r.timeZone=this.time_zone);const t=this.getDatesParts(this.computedStartDate,this.computedEndDate,r);return z(`${t.map(e=>{const i=this.templateParts[e.type];if(i){const n=document.importNode(i.content,!0).children[0];return n.innerText.trim()==""&&(n.innerText=e.value),n.outerHTML}const s=document.createElement("span");return s.innerText=e.value,s.className=e.type,`<span class="${e.type}">${e.value}</span>`}).join("")}`)}};R.dateCompnents=new Set,Y([l()],R.prototype,"wording_billet_periode_validite",1),Y([l({type:Boolean})],R.prototype,"designMode",2),Y([l({type:String})],R.prototype,"time_zone",2),Y([l({type:Number})],R.prototype,"date",2),Y([l({type:String})],R.prototype,"date_string",2),Y([l({type:String})],R.prototype,"start_date_string",2),Y([l({type:String})],R.prototype,"end_date_string",2),Y([l({type:Number})],R.prototype,"start_date",2),Y([l({type:Number})],R.prototype,"end_date",2),Y([l({type:Boolean})],R.prototype,"hide_hours",2),Y([l({type:String})],R.prototype,"era",2),Y([l({type:String})],R.prototype,"year",2),Y([l({type:String})],R.prototype,"month",2),Y([l({type:String})],R.prototype,"day",2),Y([l({type:String})],R.prototype,"weekday",2),Y([l({type:String})],R.prototype,"hour",2),Y([l({type:Boolean})],R.prototype,"hour12",2),Y([l({type:String})],R.prototype,"minute",2),Y([l({type:String})],R.prototype,"language",2),Y([l({type:Boolean})],R.prototype,"renderIf",2),Y([l({type:Boolean})],R.prototype,"now",2),R=Y([$(yn)],R);let it=(X=class{static listen(){var e;if(!X.listening)return;const t=(e=document.location)==null?void 0:e.href.replace(document.location.origin,"");X.prevURL&&X.prevURL!=t&&(X.prevURL=t,X.listeners.forEach(i=>{i.location=t})),window.requestAnimationFrame(X.listen)}static offChange(t){const e=X.listeners.indexOf(t);e!=-1&&(X.listeners.splice(e,1),X.listeners.length==0&&(X.listening=!1))}static onChange(t){X.listening||(X.listening=!0,X.listen()),X.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){var h;const e=t.goBack,i=document.referrer;if(e!=null){const d=document.location.origin,p=(e||d).toString(),v=i.indexOf("http")==0?new URL(i).origin!=d:!1,b=i=="",y=history.length<3,_=b&&y,D=p!=document.location.href;if(v&&D||_){const u=history.state||{};u.concorde=u.concorde||{},u.concorde.hasDoneHistoryBack=!0,history.pushState(u,document.title),history.back(),document.location.replace(p)}else history.back();return}let s=t.getAttribute("to")||"";if(s||(s=((h=t.href)==null?void 0:h.toString())||""),!s)return;if(s.indexOf("#")==0){document.location.hash=s.substring(1);return}const o=new URL(s,document.location.href),n=o.pathname.split("/"),a=[];let c="";for(const d of n)d!=c&&a.push(d),c=d;s="/"+a.join("/")+o.search+(o.hash?+o.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",s):t.hasAttribute("replaceState")?history.replaceState(null,"",s):document.location.href=s}static updateComponentActiveState(t){var i;if(t.autoActive=="disabled")return;const e=((i=t.href)==null?void 0:i.toString())||"";if(t.href&&e.indexOf("http")!=0){const s=new URL(e,document.location.href),o=new URL(t.location||"",document.location.origin);let n=!1;t.autoActive=="strict"?n=s.pathname==o.pathname&&s.hash==o.hash&&s.search==o.search:t.autoActive=="strict-path-only"?n=s.pathname==o.pathname&&s.hash==o.hash:n=o.href.indexOf(s.href)==0,n?t.setAttribute("active","true"):t.removeAttribute("active")}}},X.listeners=[],X.listening=!1,X.prevURL=(t=document.location)==null?void 0:t.href.replace(document.location.origin,""),X);/**
|
|
68
|
+
<pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify((a=this.publisher)==null?void 0:a.get(),null," ")}</pre>`})}}removeDebugger(){yi.forEach(n=>{document.body.contains(n)&&document.body.removeChild(n)}),yi=new Set}getApiConfiguration(){return K.getApiConfiguration(this)}async initWording(){const n=Object.getOwnPropertyNames(this.constructor.prototype);for(const a of n)a.indexOf("wording_")==0&&Te.callApi(this,a.substring(8));Te.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const n=super.createRenderRoot();return Ps.observe(n),n}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const n=T.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let a=this.dataProvider;if(!a&&this._props&&(this.dataProvider=a="__subscriber__"+s.instanceCounter),a){this.bindPublisher&&n.set(a,this.bindPublisher());let c=n.get(a,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=a,this.hasAttribute("subDataProvider")){const h=this.getAttribute("subDataProvider");this.dataProvider=a+"/"+h,c=et.traverse(c,h.split(".")),n.set(this.dataProvider,c),this.publisher=c}this.publisher=c}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))}},s.instanceCounter=0,s);return Lt([l({type:Number})],e.prototype,"collectDependenciesVersion",2),Lt([l({type:Boolean})],e.prototype,"displayContents",2),Lt([l({type:Boolean})],e.prototype,"noAutoFill",2),Lt([l({type:Boolean})],e.prototype,"forceAutoFill",2),Lt([l({type:Object})],e.prototype,"propertyMap",2),Lt([l({type:String,attribute:"data-title"})],e.prototype,"title",2),Lt([l({reflect:!0})],e.prototype,"dataProvider",2),Lt([l()],e.prototype,"bindPublisher",2),Lt([l()],e.prototype,"props",1),Lt([L()],e.prototype,"shouldRenderLazy",2),e};var mn=Object.defineProperty,gn=(r,t,e,i)=>{for(var s=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=n(t,e,s)||s);return s&&mn(t,e,s),s};const Je=r=>{class t extends r{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 s of i)s.hasAttribute(this.templateValueAttribute)&&(this.templateParts[s.getAttribute(this.templateValueAttribute)]=s,this.templatePartsList.push(s)),s.hasAttribute("skeleton")&&(this.templateParts.skeleton=s),s.hasAttribute("no-result")&&(this.templateParts["no-result"]=s),s.hasAttribute("no-item")&&(this.templateParts["no-item"]=s);this.templateList=i.filter(s=>!s.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=i),super.connectedCallback()}}return gn([l({type:Array})],t.prototype,"templates"),t};var bn=Object.defineProperty,vn=Object.getOwnPropertyDescriptor,Y=(r,t,e,i)=>{for(var s=i>1?void 0:i?vn(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&bn(t,e,s),s};const yn="sonic-date";ei(()=>R.updateComponentsLanguage());let R=class extends G(Je(x)){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(){R.dateCompnents.forEach(r=>r.pageLanguage=K.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(r){var t;r||(r="Du %s au %s"),this._wording_billet_periode_validite=r,this.duAu=(t=this.wording_billet_periode_validite)==null?void 0:t.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=K.getLanguage(),R.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),R.dateCompnents.delete(this)}getDatesParts(r,t,e){const i=this.startDateObject;i.setTime(r*1e3);let s=[];if(t>0){const o=this.endDateObject;o.setTime(t*1e3);const n=i.toDateString()==o.toDateString();if((!n||this.hide_hours)&&(delete e.hour,delete e.minute),s=new Intl.DateTimeFormat(this.language||this.pageLanguage,e).formatRangeToParts(i,o),!n){const c=s.find(h=>h.type=="literal"&&h.source=="shared"&&h.value.trim().length>0);c&&(c.value=" "+this.duAu[1]+" ",c.type="to"),this.designMode||s.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else s=new Intl.DateTimeFormat(this.language||this.pageLanguage,e).formatToParts(i);return this.designMode&&s.forEach(o=>o.value=o.value.replace(/,/g," ")),s[0].value=ws.ucFirst(s[0].value),s.filter(o=>o.hidden!==!0)}dateStringToSeconds(r){return new Date(r).getTime()/1e3}willUpdate(r){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 t=this.computedStartDate;this.computedStartDate=this.computedEndDate,this.computedEndDate=t}}render(){if(!this.renderIf||!this.computedStartDate&&!this.now&&!this.computedEndDate)return A;const r={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(r.weekday=this.weekday||"short"),this.hour!=="hidden"&&(r.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(r.minute=this.minute||"2-digit"),this.era&&(r.era=this.era),this.time_zone&&(r.timeZone=this.time_zone);const t=this.getDatesParts(this.computedStartDate,this.computedEndDate,r);return z(`${t.map(e=>{const i=this.templateParts[e.type];if(i){const n=document.importNode(i.content,!0).children[0];return n.innerText.trim()==""&&(n.innerText=e.value),n.outerHTML}const s=document.createElement("span");return s.innerText=e.value,s.className=e.type,`<span class="${e.type}">${e.value}</span>`}).join("")}`)}};R.dateCompnents=new Set,Y([l()],R.prototype,"wording_billet_periode_validite",1),Y([l({type:Boolean})],R.prototype,"designMode",2),Y([l({type:String})],R.prototype,"time_zone",2),Y([l({type:Number})],R.prototype,"date",2),Y([l({type:String})],R.prototype,"date_string",2),Y([l({type:String})],R.prototype,"start_date_string",2),Y([l({type:String})],R.prototype,"end_date_string",2),Y([l({type:Number})],R.prototype,"start_date",2),Y([l({type:Number})],R.prototype,"end_date",2),Y([l({type:Boolean})],R.prototype,"hide_hours",2),Y([l({type:String})],R.prototype,"era",2),Y([l({type:String})],R.prototype,"year",2),Y([l({type:String})],R.prototype,"month",2),Y([l({type:String})],R.prototype,"day",2),Y([l({type:String})],R.prototype,"weekday",2),Y([l({type:String})],R.prototype,"hour",2),Y([l({type:Boolean})],R.prototype,"hour12",2),Y([l({type:String})],R.prototype,"minute",2),Y([l({type:String})],R.prototype,"language",2),Y([l({type:Boolean})],R.prototype,"renderIf",2),Y([l({type:Boolean})],R.prototype,"now",2),R=Y([$(yn)],R);let it=(X=class{static listen(){var e;if(!X.listening)return;const t=(e=document.location)==null?void 0:e.href.replace(document.location.origin,"");X.prevURL&&X.prevURL!=t&&(X.prevURL=t,X.listeners.forEach(i=>{i.location=t})),window.requestAnimationFrame(X.listen)}static offChange(t){const e=X.listeners.indexOf(t);e!=-1&&(X.listeners.splice(e,1),X.listeners.length==0&&(X.listening=!1))}static onChange(t){X.listening||(X.listening=!0,X.listen()),X.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){var h;const e=t.goBack,i=document.referrer;if(e!=null){const d=document.location.origin,p=(e||d).toString(),v=i.indexOf("http")==0?new URL(i).origin!=d:!1,b=i=="",y=history.length<3,_=b&&y,D=p!=document.location.href;if(v&&D||_){const u=history.state||{};u.concorde=u.concorde||{},u.concorde.hasDoneHistoryBack=!0,history.pushState(u,document.title),history.back(),document.location.replace(p)}else history.back();return}let s=t.getAttribute("to")||"";if(s||(s=((h=t.href)==null?void 0:h.toString())||""),!s)return;if(s.indexOf("#")==0){document.location.hash=s.substring(1);return}const o=new URL(s,document.location.href),n=o.pathname.split("/"),a=[];let c="";for(const d of n)d!=c&&a.push(d),c=d;s="/"+a.join("/")+o.search+(o.hash?+o.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",s):t.hasAttribute("replaceState")?history.replaceState(null,"",s):document.location.href=s}static updateComponentActiveState(t){var i;if(t.autoActive=="disabled")return;const e=((i=t.href)==null?void 0:i.toString())||"";if(t.href&&e.indexOf("http")!=0){const s=new URL(e,document.location.href),o=new URL(t.location||"",document.location.origin);let n=!1;t.autoActive=="strict"?n=s.pathname==o.pathname&&s.hash==o.hash&&s.search==o.search:t.autoActive=="strict-path-only"?n=s.pathname==o.pathname&&s.hash==o.hash:n=o.href.indexOf(s.href)==0,n?t.setAttribute("active","true"):t.removeAttribute("active")}}},X.listeners=[],X.listening=!1,X.prevURL=(t=document.location)==null?void 0:t.href.replace(document.location.origin,""),X);/**
|
|
69
69
|
* @license
|
|
70
70
|
* Copyright 2018 Google LLC
|
|
71
71
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
72
|
-
*/const Tr="important",_n=" !"+Tr,bt=ue(class extends Ee{constructor(r){var t;if(super(r),r.type!==Le.ATTRIBUTE||r.name!=="style"||((t=r.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(r){return Object.keys(r).reduce((t,e)=>{const i=r[e];return i==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(r,[t]){const{style:e}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const i of this.ft)t[i]==null&&(this.ft.delete(i),i.includes("-")?e.removeProperty(i):e[i]=null);for(const i in t){const s=t[i];if(s!=null){this.ft.add(i);const o=typeof s=="string"&&s.endsWith(_n);i.includes("-")||o?e.setProperty(i,o?s.slice(0,-11):s,o?Tr:""):e[i]=s}}return yt}});var wn=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,Et=(r,t,e,i)=>{for(var s=i>1?void 0:i?xn(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&wn(t,e,s),s};const Es=new Map,Me=r=>{class t extends r{constructor(...i){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=s=>{this.setValueFromPublisher(s)},this.onFormValueAssign=async s=>{this.setFormValueFromPublisher(s)},this.onFormDataInValidate=()=>{const s=this.getFormPublisher();s&&s.isFormValid.get()&&this.validateFormElement()}}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?N.get(this.formDataProvider):null}setFormPublisherValue(i){const s=this.getFormPublisher();s&&pt(s,this.name).set(i)}getFormPublisherValue(){const i=this.getFormPublisher();return i?pt(i,this.name).get():null}getValueForFormPublisher(){return this.value}setValueFromPublisher(i){this.value=i}setFormValueFromPublisher(i){this.value=i}get value(){return this._value}set value(i){i==null&&(i=""),et.isObject(i)&&Object.prototype.hasOwnProperty.call(i,"__value")&&i._value==null&&(i=""),this._value!=i&&(this._value=i,this.updateDataValue(),this.requestUpdate())}initPublisher(){let i=this.getFormPublisher();const s=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&this.publisher&&pt(this.publisher,this._name).offAssign(this.onValueAssign),this._name&&i&&pt(i,this._name).offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.publisher&&this._name&&pt(this.publisher,this._name).onAssign(this.onValueAssign),i=this.getFormPublisher(),this._name&&i&&(pt(i,this._name).onAssign(this.onFormValueAssign),i.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),s&&(this.value=s)}handleBlur(){this.touched=!0}handleChange(i){this.value=i.target.value;const s=new Event("change");this.dispatchEvent(s)}addKeyboardNavigation(){const i=this.getAncestorAttributeValue("data-keyboard-nav");if(!i)return;const s=i.split(" "),o=s[0];if(!o)return;for(const a of s){Es.has(a)||Es.set(a,[]);const c=Es.get(a);(c==null?void 0:c.indexOf(this))==-1&&c.push(this)}const n=Es.get(o);this.addEventListener("keydown",a=>{var v;const c=a;if(!["ArrowDown","ArrowUp"].includes(c.key))return;const h="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",d=n==null?void 0:n.filter(b=>{var D;const y=(D=b.shadowRoot)==null?void 0:D.querySelector(h);if(!y)return!1;const _=window.getComputedStyle(y);return _.display!=="none"&&_.display!==""&&_.pointerEvents!="none"&&_.visibility!=="hidden"&&y.getBoundingClientRect().width>0});let p=null;if(c.key=="ArrowDown"&&d){const b=d.indexOf(this);b==d.length-1?p=d[0]:p=d[b+1]}else if(c.key=="ArrowUp"&&d){const b=d.indexOf(this);b==0?p=d[d.length-1]:p=d[b-1]}const m=(v=p==null?void 0:p.shadowRoot)==null?void 0:v.querySelector(h);m&&m.focus&&(m.focus(),a.preventDefault(),a.stopPropagation())})}focus(){var s;const i=(s=this.shadowRoot)==null?void 0:s.querySelector("[data-form-element], button");i==null||i.focus()}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback(),this._name&&this.publisher&&pt(this.publisher,this._name).offAssign(this.onValueAssign);const i=this.getFormPublisher();this._name&&i&&(pt(i,this._name).offAssign(this.onFormValueAssign),i.offFormInvalidate(this.onFormDataInValidate))}}return Et([l({type:Boolean,reflect:!0})],t.prototype,"touched",2),Et([l({type:Boolean})],t.prototype,"error",2),Et([l({type:Boolean})],t.prototype,"autofocus",2),Et([l({type:Boolean})],t.prototype,"required",2),Et([l({type:Boolean})],t.prototype,"forceAutoFill",2),Et([l({type:Boolean,reflect:!0})],t.prototype,"disabled",2),Et([l({type:String,attribute:"data-aria-label"})],t.prototype,"ariaLabel",2),Et([l({type:String,attribute:"data-aria-labelledby"})],t.prototype,"ariaLabelledby",2),Et([l()],t.prototype,"name",1),Et([l()],t.prototype,"value",1),t};let $n=class Ae{static areEqual(t,e){return t.length===e.length?t.every((i,s)=>i===e[s]):!1}static from2d(t){return{to1D:()=>{let e=[];return t.forEach(i=>e=e.concat(i)),this.from(e)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:e=>{if(t.length<1)return!0;const i=(t[0]||{})[e];return t.every(s=>(s||{})[e]==i)}})})}),value:()=>({forKey:e=>Ae.from(t.map(i=>i[e]))}),copy:()=>({fromKey:e=>({toKey:i=>{t.forEach(s=>{s[i]=Array.isArray(s[e])?[...s[e]]:typeof s[e]=="object"&&s[e]!=null?{...s[e]}:s[e]})}})})}),map:e=>Ae.from(t.map(e)),filter:e=>Ae.from(t.filter(e)),find:e=>t.find(e),some:e=>t.some(e),every:e=>t.every(e),group:()=>({byKey:e=>{const i=[],s=new Map;for(const o of t){const n=o[e];if(!s.has(n)){const a=i.length;s.set(n,a);const c={items:[]};c[e]=n,i.push(c)}i[s.get(n)].items.push(o)}return Ae.from(i)}}),without:()=>({duplicates:()=>({forKey:e=>{const i=[...new Set(t.map(s=>s[e]))];return Ae.from(i.map(s=>t.find(o=>o[e]==s)))}}),itemsIn:e=>({havingSameValue:()=>({forKey:i=>{const s=(o,n)=>a=>o[n]!=a[n];return Ae.from(t.filter(o=>e.every(s(o,i))))}})})})}}};var Pn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var _i={exports:{}};(function(r,t){var e=[].slice;(function(i,s){return t!==null?r.exports=s():i.UrlPattern=s()})(Pn,function(){var i,s,o,n,a,c,h,d,p,m,v,b,y,_,D;return p=function(f){return f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},h=function(f,u){var w,S,O;for(O=[],w=-1,S=f.length;++w<S;)O=O.concat(u(f[w]));return O},_=function(f,u){var w,S,O;for(O="",w=-1,S=f.length;++w<S;)O+=u(f[w]);return O},y=function(f){return new RegExp(f.toString()+"|").exec("").length-1},v=function(f,u){var w,S,O,T,q;for(T={},w=-1,O=f.length;++w<O;)S=f[w],q=u[w],q!=null&&(T[S]!=null?(Array.isArray(T[S])||(T[S]=[T[S]]),T[S].push(q)):T[S]=q);return T},i={},i.Result=function(f,u){this.value=f,this.rest=u},i.Tagged=function(f,u){this.tag=f,this.value=u},i.tag=function(f,u){return function(w){var S,O;if(S=u(w),S!=null)return O=new i.Tagged(f,S.value),new i.Result(O,S.rest)}},i.regex=function(f){return function(u){var w,S;if(w=f.exec(u),w!=null)return S=w[0],new i.Result(S,u.slice(S.length))}},i.sequence=function(){var f;return f=1<=arguments.length?e.call(arguments,0):[],function(u){var w,S,O,T,q,W;for(w=-1,S=f.length,W=[],T=u;++w<S;){if(O=f[w],q=O(T),q==null)return;W.push(q.value),T=q.rest}return new i.Result(W,T)}},i.pick=function(){var f,u;return f=arguments[0],u=2<=arguments.length?e.call(arguments,1):[],function(w){var S,O;if(O=i.sequence.apply(i,u)(w),O!=null)return S=O.value,O.value=S[f],O}},i.string=function(f){var u;return u=f.length,function(w){if(w.slice(0,u)===f)return new i.Result(f,w.slice(u))}},i.lazy=function(f){var u;return u=null,function(w){return u==null&&(u=f()),u(w)}},i.baseMany=function(f,u,w,S,O){var T,q,W,kt;for(W=O,kt=w?"":[];!(u!=null&&(T=u(W),T!=null)||(q=f(W),q==null));)w?kt+=q.value:kt.push(q.value),W=q.rest;if(!(S&&kt.length===0))return new i.Result(kt,W)},i.many1=function(f){return function(u){return i.baseMany(f,null,!1,!0,u)}},i.concatMany1Till=function(f,u){return function(w){return i.baseMany(f,u,!0,!0,w)}},i.firstChoice=function(){var f;return f=1<=arguments.length?e.call(arguments,0):[],function(u){var w,S,O,T;for(w=-1,S=f.length;++w<S;)if(O=f[w],T=O(u),T!=null)return T}},b=function(f){var u;return u={},u.wildcard=i.tag("wildcard",i.string(f.wildcardChar)),u.optional=i.tag("optional",i.pick(1,i.string(f.optionalSegmentStartChar),i.lazy(function(){return u.pattern}),i.string(f.optionalSegmentEndChar))),u.name=i.regex(new RegExp("^["+f.segmentNameCharset+"]+")),u.named=i.tag("named",i.pick(1,i.string(f.segmentNameStartChar),i.lazy(function(){return u.name}))),u.escapedChar=i.pick(1,i.string(f.escapeChar),i.regex(/^./)),u.static=i.tag("static",i.concatMany1Till(i.firstChoice(i.lazy(function(){return u.escapedChar}),i.regex(/^./)),i.firstChoice(i.string(f.segmentNameStartChar),i.string(f.optionalSegmentStartChar),i.string(f.optionalSegmentEndChar),u.wildcard))),u.token=i.lazy(function(){return i.firstChoice(u.wildcard,u.optional,u.named,u.static)}),u.pattern=i.many1(i.lazy(function(){return u.token})),u},d={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},c=function(f,u){if(Array.isArray(f))return _(f,function(w){return c(w,u)});switch(f.tag){case"wildcard":return"(.*?)";case"named":return"(["+u+"]+)";case"static":return p(f.value);case"optional":return"(?:"+c(f.value,u)+")?"}},a=function(f,u){return u==null&&(u=d.segmentValueCharset),"^"+c(f,u)+"$"},n=function(f){if(Array.isArray(f))return h(f,n);switch(f.tag){case"wildcard":return["_"];case"named":return[f.value];case"static":return[];case"optional":return n(f.value)}},m=function(f,u,w,S){var O,T,q,W;if(S==null&&(S=!1),W=f[u],W==null){if(S)throw new Error("no values provided for key `"+u+"`");return}if(O=w[u]||0,T=Array.isArray(W)?W.length-1:0,O>T){if(S)throw new Error("too few values provided for key `"+u+"`");return}return q=Array.isArray(W)?W[O]:W,S&&(w[u]=O+1),q},o=function(f,u,w){var S,O;if(Array.isArray(f)){for(S=-1,O=f.length;++S<O;)if(o(f[S],u,w))return!0;return!1}switch(f.tag){case"wildcard":return m(u,"_",w,!1)!=null;case"named":return m(u,f.value,w,!1)!=null;case"static":return!1;case"optional":return o(f.value,u,w)}},D=function(f,u,w){if(Array.isArray(f))return _(f,function(S){return D(S,u,w)});switch(f.tag){case"wildcard":return m(u,"_",w,!0);case"named":return m(u,f.value,w,!0);case"static":return f.value;case"optional":return o(f.value,u,w)?D(f.value,u,w):""}},s=function(f,u){var w,S,O,T,q;if(f instanceof s){this.isRegex=f.isRegex,this.regex=f.regex,this.ast=f.ast,this.names=f.names;return}if(this.isRegex=f instanceof RegExp,!(typeof f=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=f,u!=null){if(!Array.isArray(u))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(w=y(this.regex),u.length!==w)throw new Error("regex contains "+w+" groups but array of group names contains "+u.length);this.names=u}return}if(f==="")throw new Error("argument must not be the empty string");if(q=f.replace(/\s+/g,""),q!==f)throw new Error("argument must not contain whitespace");if(S={escapeChar:(u!=null?u.escapeChar:void 0)||d.escapeChar,segmentNameStartChar:(u!=null?u.segmentNameStartChar:void 0)||d.segmentNameStartChar,segmentNameCharset:(u!=null?u.segmentNameCharset:void 0)||d.segmentNameCharset,segmentValueCharset:(u!=null?u.segmentValueCharset:void 0)||d.segmentValueCharset,optionalSegmentStartChar:(u!=null?u.optionalSegmentStartChar:void 0)||d.optionalSegmentStartChar,optionalSegmentEndChar:(u!=null?u.optionalSegmentEndChar:void 0)||d.optionalSegmentEndChar,wildcardChar:(u!=null?u.wildcardChar:void 0)||d.wildcardChar},T=b(S),O=T.pattern(f),O==null)throw new Error("couldn't parse pattern");if(O.rest!=="")throw new Error("could only partially parse pattern");this.ast=O.value,this.regex=new RegExp(a(this.ast,S.segmentValueCharset)),this.names=n(this.ast)},s.prototype.match=function(f){var u,w;return w=this.regex.exec(f),w==null?null:(u=w.slice(1),this.names?v(this.names,u):u)},s.prototype.stringify=function(f){if(f==null&&(f={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(f!==Object(f))throw new Error("argument must be an object or undefined");return D(this.ast,f,{})},s.escapeForRegex=p,s.concatMap=h,s.stringConcatMap=_,s.regexGroupCount=y,s.keysAndValuesToObject=v,s.P=i,s.newParser=b,s.defaultOptions=d,s.astNodeToRegexString=a,s.astNodeToNames=n,s.getParam=m,s.astNodeContainsSegmentsForProvidedParams=o,s.stringify=D,s})})(_i,_i.exports);var An=_i.exports;const qt=Cn(An),Sn=Eo,On=$n,Dn=Ps,kn=ws,Gt=K,Ln=it,ts=et,En=Be,rt=N,Nn=Ne,Tn=qt;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Sn,Arrays:On,DataBindObserver:Dn,Format:kn,HTML:Gt,LocationHandler:Ln,Objects:ts,PublisherProxy:En,PublisherManager:rt,api:Nn,URLPattern:Tn};var Mn=Object.defineProperty,In=Object.getOwnPropertyDescriptor,es=(r,t,e,i)=>{for(var s=i>1?void 0:i?In(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Mn(t,e,s),s};const wi=r=>{class t extends r{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{var n;const i=this.getAttribute("name"),s=this.getCheckAllPublisher(),o=this.getFormPublisher();if(s!=null&&s.hasCheckAll.get()&&!this.checksAll()&&s&&o&&i){if((n=this.getFormPublisherValue())!=null&&n.length)(this.checked===null||s.checkMode.get()=="noneChecked"||s.checkMode.get()==null)&&(s.checkMode="someUnchecked");else{s.checkMode="noneChecked";return}const a=this.getFormPublisherValue(),c=s.values.get();if(c&&c.length){let h=c.length;for(const d of c)a.indexOf(d)==-1&&(h-=1);h==c.length&&(s.checkMode="allChecked"),h==0&&(s.checkMode="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 o=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=o==i?!0:null),Array.isArray(o)||(o=[]),o.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 s=this.getCheckAllPublisher();s&&(this.checked===!0?s.checkMode="allChecked":this.checked===null&&(s.checkMode="noneChecked",this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){var o;const i=(o=this.shadowRoot)==null?void 0:o.querySelector("input");if(!i||i.checkValidity())return;const s=this.getFormPublisher();if(s){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;s.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 s=new Event("change");this.dispatchEvent(s)}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 s=i.slice(0),o=s.indexOf(this.value);return this.checked===!0&&o===-1&&!this.checksAll()&&s.push(this.value),this.checked===null&&o!==-1&&s.splice(o,1),s}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,s=this.getAttribute("name");return!i||!s?null:rt.get(i+"/"+s+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const i=this.getCheckAllPublisher();if(i&&(i.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const s=i.values.get().slice(0),o=s.indexOf(this.value);o!=-1&&(s.splice(o,1),i.values=s)}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const o=this.getFormPublisherValue();o&&Array.isArray(o)&&o.indexOf(this.value)!==-1&&(this.checked=!0)}const s=this.getCheckAllPublisher();s&&(s.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&(s.hasCheckAll=!0),s.values.get()||(s.values=[]),this.checksAll()||(s.values=[...s.values.get(),this.value])),this.hasAttribute("checked")&&(!this.publisher||this.publisher.get().checked!==!1)&&setTimeout(()=>this.checked=!0,1)}}return es([l()],t.prototype,"value",1),es([l()],t.prototype,"forceAutoFill",2),es([l({type:Boolean})],t.prototype,"unique",2),es([l({type:Boolean})],t.prototype,"radio",2),es([l()],t.prototype,"checked",1),t};/**
|
|
72
|
+
*/const Tr="important",_n=" !"+Tr,bt=ue(class extends Ee{constructor(r){var t;if(super(r),r.type!==Le.ATTRIBUTE||r.name!=="style"||((t=r.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(r){return Object.keys(r).reduce((t,e)=>{const i=r[e];return i==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(r,[t]){const{style:e}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const i of this.ft)t[i]==null&&(this.ft.delete(i),i.includes("-")?e.removeProperty(i):e[i]=null);for(const i in t){const s=t[i];if(s!=null){this.ft.add(i);const o=typeof s=="string"&&s.endsWith(_n);i.includes("-")||o?e.setProperty(i,o?s.slice(0,-11):s,o?Tr:""):e[i]=s}}return yt}});var wn=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,Et=(r,t,e,i)=>{for(var s=i>1?void 0:i?xn(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&wn(t,e,s),s};const Es=new Map,Me=r=>{class t extends r{constructor(...i){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=s=>{this.setValueFromPublisher(s)},this.onFormValueAssign=async s=>{this.setFormValueFromPublisher(s)},this.onFormDataInValidate=()=>{const s=this.getFormPublisher();s&&s.isFormValid.get()&&this.validateFormElement()}}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?T.get(this.formDataProvider):null}setFormPublisherValue(i){const s=this.getFormPublisher();s&&pt(s,this.name).set(i)}getFormPublisherValue(){const i=this.getFormPublisher();return i?pt(i,this.name).get():null}getValueForFormPublisher(){return this.value}setValueFromPublisher(i){this.value=i}setFormValueFromPublisher(i){this.value=i}get value(){return this._value}set value(i){i==null&&(i=""),et.isObject(i)&&Object.prototype.hasOwnProperty.call(i,"__value")&&i._value==null&&(i=""),this._value!=i&&(this._value=i,this.updateDataValue(),this.requestUpdate())}initPublisher(){let i=this.getFormPublisher();const s=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&this.publisher&&pt(this.publisher,this._name).offAssign(this.onValueAssign),this._name&&i&&pt(i,this._name).offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.publisher&&this._name&&pt(this.publisher,this._name).onAssign(this.onValueAssign),i=this.getFormPublisher(),this._name&&i&&(pt(i,this._name).onAssign(this.onFormValueAssign),i.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),s&&(this.value=s)}handleBlur(){this.touched=!0}handleChange(i){this.value=i.target.value;const s=new Event("change");this.dispatchEvent(s)}addKeyboardNavigation(){const i=this.getAncestorAttributeValue("data-keyboard-nav");if(!i)return;const s=i.split(" "),o=s[0];if(!o)return;for(const a of s){Es.has(a)||Es.set(a,[]);const c=Es.get(a);(c==null?void 0:c.indexOf(this))==-1&&c.push(this)}const n=Es.get(o);this.addEventListener("keydown",a=>{var v;const c=a;if(!["ArrowDown","ArrowUp"].includes(c.key))return;const h="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",d=n==null?void 0:n.filter(b=>{var D;const y=(D=b.shadowRoot)==null?void 0:D.querySelector(h);if(!y)return!1;const _=window.getComputedStyle(y);return _.display!=="none"&&_.display!==""&&_.pointerEvents!="none"&&_.visibility!=="hidden"&&y.getBoundingClientRect().width>0});let p=null;if(c.key=="ArrowDown"&&d){const b=d.indexOf(this);b==d.length-1?p=d[0]:p=d[b+1]}else if(c.key=="ArrowUp"&&d){const b=d.indexOf(this);b==0?p=d[d.length-1]:p=d[b-1]}const g=(v=p==null?void 0:p.shadowRoot)==null?void 0:v.querySelector(h);g&&g.focus&&(g.focus(),a.preventDefault(),a.stopPropagation())})}focus(){var s;const i=(s=this.shadowRoot)==null?void 0:s.querySelector("[data-form-element], button");i==null||i.focus()}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback(),this._name&&this.publisher&&pt(this.publisher,this._name).offAssign(this.onValueAssign);const i=this.getFormPublisher();this._name&&i&&(pt(i,this._name).offAssign(this.onFormValueAssign),i.offFormInvalidate(this.onFormDataInValidate))}}return Et([l({type:Boolean,reflect:!0})],t.prototype,"touched",2),Et([l({type:Boolean})],t.prototype,"error",2),Et([l({type:Boolean})],t.prototype,"autofocus",2),Et([l({type:Boolean})],t.prototype,"required",2),Et([l({type:Boolean})],t.prototype,"forceAutoFill",2),Et([l({type:Boolean,reflect:!0})],t.prototype,"disabled",2),Et([l({type:String,attribute:"data-aria-label"})],t.prototype,"ariaLabel",2),Et([l({type:String,attribute:"data-aria-labelledby"})],t.prototype,"ariaLabelledby",2),Et([l()],t.prototype,"name",1),Et([l()],t.prototype,"value",1),t};let $n=class Ae{static areEqual(t,e){return t.length===e.length?t.every((i,s)=>i===e[s]):!1}static from2d(t){return{to1D:()=>{let e=[];return t.forEach(i=>e=e.concat(i)),this.from(e)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:e=>{if(t.length<1)return!0;const i=(t[0]||{})[e];return t.every(s=>(s||{})[e]==i)}})})}),value:()=>({forKey:e=>Ae.from(t.map(i=>i[e]))}),copy:()=>({fromKey:e=>({toKey:i=>{t.forEach(s=>{s[i]=Array.isArray(s[e])?[...s[e]]:typeof s[e]=="object"&&s[e]!=null?{...s[e]}:s[e]})}})})}),map:e=>Ae.from(t.map(e)),filter:e=>Ae.from(t.filter(e)),find:e=>t.find(e),some:e=>t.some(e),every:e=>t.every(e),group:()=>({byKey:e=>{const i=[],s=new Map;for(const o of t){const n=o[e];if(!s.has(n)){const a=i.length;s.set(n,a);const c={items:[]};c[e]=n,i.push(c)}i[s.get(n)].items.push(o)}return Ae.from(i)}}),without:()=>({duplicates:()=>({forKey:e=>{const i=[...new Set(t.map(s=>s[e]))];return Ae.from(i.map(s=>t.find(o=>o[e]==s)))}}),itemsIn:e=>({havingSameValue:()=>({forKey:i=>{const s=(o,n)=>a=>o[n]!=a[n];return Ae.from(t.filter(o=>e.every(s(o,i))))}})})})}}};var Pn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var _i={exports:{}};(function(r,t){var e=[].slice;(function(i,s){return t!==null?r.exports=s():i.UrlPattern=s()})(Pn,function(){var i,s,o,n,a,c,h,d,p,g,v,b,y,_,D;return p=function(f){return f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},h=function(f,u){var w,S,O;for(O=[],w=-1,S=f.length;++w<S;)O=O.concat(u(f[w]));return O},_=function(f,u){var w,S,O;for(O="",w=-1,S=f.length;++w<S;)O+=u(f[w]);return O},y=function(f){return new RegExp(f.toString()+"|").exec("").length-1},v=function(f,u){var w,S,O,M,q;for(M={},w=-1,O=f.length;++w<O;)S=f[w],q=u[w],q!=null&&(M[S]!=null?(Array.isArray(M[S])||(M[S]=[M[S]]),M[S].push(q)):M[S]=q);return M},i={},i.Result=function(f,u){this.value=f,this.rest=u},i.Tagged=function(f,u){this.tag=f,this.value=u},i.tag=function(f,u){return function(w){var S,O;if(S=u(w),S!=null)return O=new i.Tagged(f,S.value),new i.Result(O,S.rest)}},i.regex=function(f){return function(u){var w,S;if(w=f.exec(u),w!=null)return S=w[0],new i.Result(S,u.slice(S.length))}},i.sequence=function(){var f;return f=1<=arguments.length?e.call(arguments,0):[],function(u){var w,S,O,M,q,W;for(w=-1,S=f.length,W=[],M=u;++w<S;){if(O=f[w],q=O(M),q==null)return;W.push(q.value),M=q.rest}return new i.Result(W,M)}},i.pick=function(){var f,u;return f=arguments[0],u=2<=arguments.length?e.call(arguments,1):[],function(w){var S,O;if(O=i.sequence.apply(i,u)(w),O!=null)return S=O.value,O.value=S[f],O}},i.string=function(f){var u;return u=f.length,function(w){if(w.slice(0,u)===f)return new i.Result(f,w.slice(u))}},i.lazy=function(f){var u;return u=null,function(w){return u==null&&(u=f()),u(w)}},i.baseMany=function(f,u,w,S,O){var M,q,W,kt;for(W=O,kt=w?"":[];!(u!=null&&(M=u(W),M!=null)||(q=f(W),q==null));)w?kt+=q.value:kt.push(q.value),W=q.rest;if(!(S&&kt.length===0))return new i.Result(kt,W)},i.many1=function(f){return function(u){return i.baseMany(f,null,!1,!0,u)}},i.concatMany1Till=function(f,u){return function(w){return i.baseMany(f,u,!0,!0,w)}},i.firstChoice=function(){var f;return f=1<=arguments.length?e.call(arguments,0):[],function(u){var w,S,O,M;for(w=-1,S=f.length;++w<S;)if(O=f[w],M=O(u),M!=null)return M}},b=function(f){var u;return u={},u.wildcard=i.tag("wildcard",i.string(f.wildcardChar)),u.optional=i.tag("optional",i.pick(1,i.string(f.optionalSegmentStartChar),i.lazy(function(){return u.pattern}),i.string(f.optionalSegmentEndChar))),u.name=i.regex(new RegExp("^["+f.segmentNameCharset+"]+")),u.named=i.tag("named",i.pick(1,i.string(f.segmentNameStartChar),i.lazy(function(){return u.name}))),u.escapedChar=i.pick(1,i.string(f.escapeChar),i.regex(/^./)),u.static=i.tag("static",i.concatMany1Till(i.firstChoice(i.lazy(function(){return u.escapedChar}),i.regex(/^./)),i.firstChoice(i.string(f.segmentNameStartChar),i.string(f.optionalSegmentStartChar),i.string(f.optionalSegmentEndChar),u.wildcard))),u.token=i.lazy(function(){return i.firstChoice(u.wildcard,u.optional,u.named,u.static)}),u.pattern=i.many1(i.lazy(function(){return u.token})),u},d={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},c=function(f,u){if(Array.isArray(f))return _(f,function(w){return c(w,u)});switch(f.tag){case"wildcard":return"(.*?)";case"named":return"(["+u+"]+)";case"static":return p(f.value);case"optional":return"(?:"+c(f.value,u)+")?"}},a=function(f,u){return u==null&&(u=d.segmentValueCharset),"^"+c(f,u)+"$"},n=function(f){if(Array.isArray(f))return h(f,n);switch(f.tag){case"wildcard":return["_"];case"named":return[f.value];case"static":return[];case"optional":return n(f.value)}},g=function(f,u,w,S){var O,M,q,W;if(S==null&&(S=!1),W=f[u],W==null){if(S)throw new Error("no values provided for key `"+u+"`");return}if(O=w[u]||0,M=Array.isArray(W)?W.length-1:0,O>M){if(S)throw new Error("too few values provided for key `"+u+"`");return}return q=Array.isArray(W)?W[O]:W,S&&(w[u]=O+1),q},o=function(f,u,w){var S,O;if(Array.isArray(f)){for(S=-1,O=f.length;++S<O;)if(o(f[S],u,w))return!0;return!1}switch(f.tag){case"wildcard":return g(u,"_",w,!1)!=null;case"named":return g(u,f.value,w,!1)!=null;case"static":return!1;case"optional":return o(f.value,u,w)}},D=function(f,u,w){if(Array.isArray(f))return _(f,function(S){return D(S,u,w)});switch(f.tag){case"wildcard":return g(u,"_",w,!0);case"named":return g(u,f.value,w,!0);case"static":return f.value;case"optional":return o(f.value,u,w)?D(f.value,u,w):""}},s=function(f,u){var w,S,O,M,q;if(f instanceof s){this.isRegex=f.isRegex,this.regex=f.regex,this.ast=f.ast,this.names=f.names;return}if(this.isRegex=f instanceof RegExp,!(typeof f=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=f,u!=null){if(!Array.isArray(u))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(w=y(this.regex),u.length!==w)throw new Error("regex contains "+w+" groups but array of group names contains "+u.length);this.names=u}return}if(f==="")throw new Error("argument must not be the empty string");if(q=f.replace(/\s+/g,""),q!==f)throw new Error("argument must not contain whitespace");if(S={escapeChar:(u!=null?u.escapeChar:void 0)||d.escapeChar,segmentNameStartChar:(u!=null?u.segmentNameStartChar:void 0)||d.segmentNameStartChar,segmentNameCharset:(u!=null?u.segmentNameCharset:void 0)||d.segmentNameCharset,segmentValueCharset:(u!=null?u.segmentValueCharset:void 0)||d.segmentValueCharset,optionalSegmentStartChar:(u!=null?u.optionalSegmentStartChar:void 0)||d.optionalSegmentStartChar,optionalSegmentEndChar:(u!=null?u.optionalSegmentEndChar:void 0)||d.optionalSegmentEndChar,wildcardChar:(u!=null?u.wildcardChar:void 0)||d.wildcardChar},M=b(S),O=M.pattern(f),O==null)throw new Error("couldn't parse pattern");if(O.rest!=="")throw new Error("could only partially parse pattern");this.ast=O.value,this.regex=new RegExp(a(this.ast,S.segmentValueCharset)),this.names=n(this.ast)},s.prototype.match=function(f){var u,w;return w=this.regex.exec(f),w==null?null:(u=w.slice(1),this.names?v(this.names,u):u)},s.prototype.stringify=function(f){if(f==null&&(f={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(f!==Object(f))throw new Error("argument must be an object or undefined");return D(this.ast,f,{})},s.escapeForRegex=p,s.concatMap=h,s.stringConcatMap=_,s.regexGroupCount=y,s.keysAndValuesToObject=v,s.P=i,s.newParser=b,s.defaultOptions=d,s.astNodeToRegexString=a,s.astNodeToNames=n,s.getParam=g,s.astNodeContainsSegmentsForProvidedParams=o,s.stringify=D,s})})(_i,_i.exports);var An=_i.exports;const qt=Cn(An),Sn=Eo,On=$n,Dn=Ps,kn=ws,Gt=K,Ln=it,ts=et,En=He,rt=T,Nn=Ne,Tn=qt;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Sn,Arrays:On,DataBindObserver:Dn,Format:kn,HTML:Gt,LocationHandler:Ln,Objects:ts,PublisherProxy:En,PublisherManager:rt,api:Nn,URLPattern:Tn};var Mn=Object.defineProperty,In=Object.getOwnPropertyDescriptor,es=(r,t,e,i)=>{for(var s=i>1?void 0:i?In(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Mn(t,e,s),s};const wi=r=>{class t extends r{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{var n;const i=this.getAttribute("name"),s=this.getCheckAllPublisher(),o=this.getFormPublisher();if(s!=null&&s.hasCheckAll.get()&&!this.checksAll()&&s&&o&&i){if((n=this.getFormPublisherValue())!=null&&n.length)(this.checked===null||s.checkMode.get()=="noneChecked"||s.checkMode.get()==null)&&(s.checkMode="someUnchecked");else{s.checkMode="noneChecked";return}const a=this.getFormPublisherValue(),c=s.values.get();if(c&&c.length){let h=c.length;for(const d of c)a.indexOf(d)==-1&&(h-=1);h==c.length&&(s.checkMode="allChecked"),h==0&&(s.checkMode="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 o=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=o==i?!0:null),Array.isArray(o)||(o=[]),o.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 s=this.getCheckAllPublisher();s&&(this.checked===!0?s.checkMode="allChecked":this.checked===null&&(s.checkMode="noneChecked",this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){var o;const i=(o=this.shadowRoot)==null?void 0:o.querySelector("input");if(!i||i.checkValidity())return;const s=this.getFormPublisher();if(s){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;s.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 s=new Event("change");this.dispatchEvent(s)}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 s=i.slice(0),o=s.indexOf(this.value);return this.checked===!0&&o===-1&&!this.checksAll()&&s.push(this.value),this.checked===null&&o!==-1&&s.splice(o,1),s}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,s=this.getAttribute("name");return!i||!s?null:rt.get(i+"/"+s+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const i=this.getCheckAllPublisher();if(i&&(i.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const s=i.values.get().slice(0),o=s.indexOf(this.value);o!=-1&&(s.splice(o,1),i.values=s)}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const o=this.getFormPublisherValue();o&&Array.isArray(o)&&o.indexOf(this.value)!==-1&&(this.checked=!0)}const s=this.getCheckAllPublisher();s&&(s.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&(s.hasCheckAll=!0),s.values.get()||(s.values=[]),this.checksAll()||(s.values=[...s.values.get(),this.value])),this.hasAttribute("checked")&&(!this.publisher||this.publisher.get().checked!==!1)&&setTimeout(()=>this.checked=!0,1)}}return es([l()],t.prototype,"value",1),es([l()],t.prototype,"forceAutoFill",2),es([l({type:Boolean})],t.prototype,"unique",2),es([l({type:Boolean})],t.prototype,"radio",2),es([l()],t.prototype,"checked",1),t};/**
|
|
73
73
|
* @license
|
|
74
74
|
* Copyright 2018 Google LLC
|
|
75
75
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
:host([size="inherit"]) {
|
|
107
107
|
--sc-_fs: 1em;
|
|
108
108
|
}
|
|
109
|
-
`;var jn=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor,
|
|
109
|
+
`;var jn=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor,B=(r,t,e,i)=>{for(var s=i>1?void 0:i?Fn(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&jn(t,e,s),s};const zn="sonic-button";let I=class extends wi(Me(G(x))){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(r){this._href=r;const t=this._href.toString();t&&t.indexOf("http")!=0?it.onChange(this):it.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(r){r.preventDefault(),it.changeFromComponent(this)}handleChange(r){if(!((r==null?void 0:r.type)=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(r==null||r.preventDefault(),r==null||r.stopPropagation(),it.changeFromComponent(this)),this.hasAttribute("reset"))){const t=this.getAttribute("reset"),e=t?rt.get(t):this.getFormPublisher();e&&e.set({})}}handleRepeatStart(r){this.autoRepeat&&(this.handleChange(r),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(r){if(this.name){if(r?this.setAttribute("active","true"):this.removeAttribute("active"),r==this._checked)return;super.setCheckedValue(r)}}disconnectedCallback(){it.offChange(this),super.disconnectedCallback()}willUpdate(r){(r.has("href")||r.has("autoActive"))&&it.updateComponentActiveState(this),r.has("location")&&it.updateComponentActiveState(this)}render(){const r={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},t=m`
|
|
110
110
|
<button
|
|
111
111
|
part="button"
|
|
112
112
|
class=${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}
|
|
@@ -130,9 +130,9 @@
|
|
|
130
130
|
part="suffix"
|
|
131
131
|
name="suffix"
|
|
132
132
|
></slot>
|
|
133
|
-
${this.loading==!0?
|
|
133
|
+
${this.loading==!0?m`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}
|
|
134
134
|
</button>
|
|
135
|
-
`;return this.href?
|
|
135
|
+
`;return this.href?m`<a
|
|
136
136
|
href="${this.href}"
|
|
137
137
|
download=${C(this.download)}
|
|
138
138
|
target=${C(this.target)}
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
aria-labelledby=${C(this.ariaLabelledby)}
|
|
141
141
|
@click=${this.pushState||this.goBack!==null?this.handleNavigation:null}
|
|
142
142
|
>${t}</a
|
|
143
|
-
>`:
|
|
143
|
+
>`:m`${t}`}onSlotChange(){var r,t;this.hasPrefix=!!((r=this.prefixes)!=null&&r.length),this.hasSuffix=!!((t=this.suffixes)!=null&&t.length)}};I.styles=[Nt,P`
|
|
144
144
|
* {
|
|
145
145
|
box-sizing: border-box;
|
|
146
146
|
}
|
|
@@ -506,17 +506,17 @@
|
|
|
506
506
|
transform: translate(-50%, -50%) rotate(359deg);
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
|
-
`],
|
|
509
|
+
`],B([l({type:String,reflect:!0})],I.prototype,"type",2),B([l({type:String,reflect:!0})],I.prototype,"variant",2),B([l({type:String,reflect:!0})],I.prototype,"size",2),B([l({type:String,reflect:!0})],I.prototype,"shape",2),B([l({type:String})],I.prototype,"direction",2),B([l({type:String,reflect:!0})],I.prototype,"alignItems",2),B([l({type:String})],I.prototype,"justify",2),B([l({type:String,reflect:!0})],I.prototype,"align",2),B([l({type:String})],I.prototype,"minWidth",2),B([l({type:Boolean,reflect:!0})],I.prototype,"icon",2),B([l({type:String})],I.prototype,"download",2),B([l({type:String})],I.prototype,"autoActive",2),B([l({type:Boolean,reflect:!0})],I.prototype,"loading",2),B([L()],I.prototype,"hasPrefix",2),B([L()],I.prototype,"hasSuffix",2),B([ke({flatten:!0,slot:"prefix"})],I.prototype,"prefixes",2),B([ke({flatten:!0,slot:"suffix"})],I.prototype,"suffixes",2),B([l({type:String})],I.prototype,"target",2),B([l({type:String})],I.prototype,"href",1),B([l({type:String})],I.prototype,"goBack",2),B([l({type:Boolean})],I.prototype,"pushState",2),B([l({type:Boolean,reflect:!0})],I.prototype,"active",2),B([l({type:Boolean,reflect:!0})],I.prototype,"autoRepeat",2),B([l({type:String,attribute:"data-aria-controls"})],I.prototype,"ariaControls",2),B([l({type:Boolean,attribute:"data-aria-expanded"})],I.prototype,"sonicAriaExpanded",2),B([L()],I.prototype,"location",2),I=B([$(zn)],I);/**
|
|
510
510
|
* @license
|
|
511
511
|
* Copyright 2017 Google LLC
|
|
512
512
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
513
|
-
*/const Mr=(r,t,e)=>{const i=new Map;for(let s=t;s<=e;s++)i.set(r[s],s);return i},Ns=ue(class extends Ee{constructor(r){if(super(r),r.type!==Le.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,t,e){let i;e===void 0?e=t:t!==void 0&&(i=t);const s=[],o=[];let n=0;for(const a of r)s[n]=i?i(a,n):n,o[n]=e(a,n),n++;return{values:o,keys:s}}render(r,t,e){return this.dt(r,t,e).values}update(r,[t,e,i]){const s=tn(r),{values:o,keys:n}=this.dt(t,e,i);if(!Array.isArray(s))return this.ut=n,o;const a=this.ut??(this.ut=[]),c=[];let h,d,p=0,
|
|
513
|
+
*/const Mr=(r,t,e)=>{const i=new Map;for(let s=t;s<=e;s++)i.set(r[s],s);return i},Ns=ue(class extends Ee{constructor(r){if(super(r),r.type!==Le.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,t,e){let i;e===void 0?e=t:t!==void 0&&(i=t);const s=[],o=[];let n=0;for(const a of r)s[n]=i?i(a,n):n,o[n]=e(a,n),n++;return{values:o,keys:s}}render(r,t,e){return this.dt(r,t,e).values}update(r,[t,e,i]){const s=tn(r),{values:o,keys:n}=this.dt(t,e,i);if(!Array.isArray(s))return this.ut=n,o;const a=this.ut??(this.ut=[]),c=[];let h,d,p=0,g=s.length-1,v=0,b=o.length-1;for(;p<=g&&v<=b;)if(s[p]===null)p++;else if(s[g]===null)g--;else if(a[p]===n[v])c[v]=pe(s[p],o[v]),p++,v++;else if(a[g]===n[b])c[b]=pe(s[g],o[b]),g--,b--;else if(a[p]===n[b])c[b]=pe(s[p],o[b]),Ge(r,c[b+1],s[p]),p++,b--;else if(a[g]===n[v])c[v]=pe(s[g],o[v]),Ge(r,s[p],s[g]),g--,v++;else if(h===void 0&&(h=Mr(n,v,b),d=Mr(a,p,g)),h.has(a[p]))if(h.has(a[g])){const y=d.get(n[v]),_=y!==void 0?s[y]:null;if(_===null){const D=Ge(r,s[p]);pe(D,o[v]),c[v]=D}else c[v]=pe(_,o[v]),Ge(r,s[p],_),s[y]=null;v++}else mi(s[g]),g--;else mi(s[p]),p++;for(;v<=b;){const y=Ge(r,c[b+1]);pe(y,o[v]),c[v++]=y}for(;p<=g;){const y=s[p++];y!==null&&mi(y)}return this.ut=n,Jo(r,c),yt}});/**
|
|
514
514
|
* @license
|
|
515
515
|
* Copyright 2017 Google LLC
|
|
516
516
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
517
517
|
*/const ss=globalThis,Ts=ss.trustedTypes,Ir=Ts?Ts.createPolicy("lit-html",{createHTML:r=>r}):void 0,jr="$lit$",Qt=`lit$${Math.random().toFixed(9).slice(2)}$`,Fr="?"+Qt,Rn=`<${Fr}>`,fe=document,Ms=()=>fe.createComment(""),is=r=>r===null||typeof r!="object"&&typeof r!="function",xi=Array.isArray,Un=r=>xi(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",$i=`[
|
|
518
|
-
\f\r]`,rs=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zr=/-->/g,Rr=/>/g,
|
|
519
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ur=/'/g,Vr=/"/g,
|
|
518
|
+
\f\r]`,rs=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zr=/-->/g,Rr=/>/g,me=RegExp(`>|${$i}(?:([^\\s"'>=/]+)(${$i}*=${$i}*(?:[^
|
|
519
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ur=/'/g,Vr=/"/g,Br=/^(?:script|style|textarea|title)$/i,os=Symbol.for("lit-noChange"),st=Symbol.for("lit-nothing"),Hr=new WeakMap,ge=fe.createTreeWalker(fe,129);function qr(r,t){if(!xi(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ir!==void 0?Ir.createHTML(t):t}const Vn=(r,t)=>{const e=r.length-1,i=[];let s,o=t===2?"<svg>":t===3?"<math>":"",n=rs;for(let a=0;a<e;a++){const c=r[a];let h,d,p=-1,g=0;for(;g<c.length&&(n.lastIndex=g,d=n.exec(c),d!==null);)g=n.lastIndex,n===rs?d[1]==="!--"?n=zr:d[1]!==void 0?n=Rr:d[2]!==void 0?(Br.test(d[2])&&(s=RegExp("</"+d[2],"g")),n=me):d[3]!==void 0&&(n=me):n===me?d[0]===">"?(n=s??rs,p=-1):d[1]===void 0?p=-2:(p=n.lastIndex-d[2].length,h=d[1],n=d[3]===void 0?me:d[3]==='"'?Vr:Ur):n===Vr||n===Ur?n=me:n===zr||n===Rr?n=rs:(n=me,s=void 0);const v=n===me&&r[a+1].startsWith("/>")?" ":"";o+=n===rs?c+Rn:p>=0?(i.push(h),c.slice(0,p)+jr+c.slice(p)+Qt+v):c+Qt+(p===-2?a:v)}return[qr(r,o+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class ns{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,n=0;const a=t.length-1,c=this.parts,[h,d]=Vn(t,e);if(this.el=ns.createElement(h,i),ge.currentNode=this.el.content,e===2||e===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(s=ge.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const p of s.getAttributeNames())if(p.endsWith(jr)){const g=d[n++],v=s.getAttribute(p).split(Qt),b=/([.?@])?(.*)/.exec(g);c.push({type:1,index:o,name:b[2],strings:v,ctor:b[1]==="."?Hn:b[1]==="?"?qn:b[1]==="@"?Wn:js}),s.removeAttribute(p)}else p.startsWith(Qt)&&(c.push({type:6,index:o}),s.removeAttribute(p));if(Br.test(s.tagName)){const p=s.textContent.split(Qt),g=p.length-1;if(g>0){s.textContent=Ts?Ts.emptyScript:"";for(let v=0;v<g;v++)s.append(p[v],Ms()),ge.nextNode(),c.push({type:2,index:++o});s.append(p[g],Ms())}}}else if(s.nodeType===8)if(s.data===Fr)c.push({type:2,index:o});else{let p=-1;for(;(p=s.data.indexOf(Qt,p+1))!==-1;)c.push({type:7,index:o}),p+=Qt.length-1}o++}}static createElement(t,e){const i=fe.createElement("template");return i.innerHTML=t,i}}function Ie(r,t,e=r,i){var n,a;if(t===os)return t;let s=i!==void 0?(n=e.o)==null?void 0:n[i]:e.l;const o=is(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==o&&((a=s==null?void 0:s._$AO)==null||a.call(s,!1),o===void 0?s=void 0:(s=new o(r),s._$AT(r,e,i)),i!==void 0?(e.o??(e.o=[]))[i]=s:e.l=s),s!==void 0&&(t=Ie(r,s._$AS(r,t.values),s,i)),t}let Bn=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=((t==null?void 0:t.creationScope)??fe).importNode(e,!0);ge.currentNode=s;let o=ge.nextNode(),n=0,a=0,c=i[0];for(;c!==void 0;){if(n===c.index){let h;c.type===2?h=new Is(o,o.nextSibling,this,t):c.type===1?h=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(h=new Kn(o,this,t)),this._$AV.push(h),c=i[++a]}n!==(c==null?void 0:c.index)&&(o=ge.nextNode(),n++)}return ge.currentNode=fe,s}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}};class Is{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this.v}constructor(t,e,i,s){this.type=2,this._$AH=st,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this.v=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Ie(this,t,e),is(t)?t===st||t==null||t===""?(this._$AH!==st&&this._$AR(),this._$AH=st):t!==this._$AH&&t!==os&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Un(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==st&&is(this._$AH)?this._$AA.nextSibling.data=t:this.T(fe.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=ns.createElement(qr(i.h,i.h[0]),this.options)),i);if(((o=this._$AH)==null?void 0:o._$AD)===s)this._$AH.p(e);else{const n=new Bn(s,this),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n}}_$AC(t){let e=Hr.get(t.strings);return e===void 0&&Hr.set(t.strings,e=new ns(t)),e}k(t){xi(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Is(this.O(Ms()),this.O(Ms()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this.v=t,(e=this._$AP)==null||e.call(this,t))}}class js{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=st,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=st}_$AI(t,e=this,i,s){const o=this.strings;let n=!1;if(o===void 0)t=Ie(this,t,e,0),n=!is(t)||t!==this._$AH&&t!==os,n&&(this._$AH=t);else{const a=t;let c,h;for(t=o[0],c=0;c<o.length-1;c++)h=Ie(this,a[i+c],e,c),h===os&&(h=this._$AH[c]),n||(n=!is(h)||h!==this._$AH[c]),h===st?t=st:t!==st&&(t+=(h??"")+o[c+1]),this._$AH[c]=h}n&&!s&&this.j(t)}j(t){t===st?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Hn extends js{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===st?void 0:t}}class qn extends js{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==st)}}class Wn extends js{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=Ie(this,t,e,0)??st)===os)return;const i=this._$AH,s=t===st&&i!==st||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==st&&(i===st||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Kn{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Ie(this,t)}}const Pi=ss.litHtmlPolyfillSupport;Pi==null||Pi(ns,Is),(ss.litHtmlVersions??(ss.litHtmlVersions=[])).push("3.2.0");/**
|
|
520
520
|
* @license
|
|
521
521
|
* Copyright 2017 Google LLC
|
|
522
522
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -528,7 +528,7 @@
|
|
|
528
528
|
* @license
|
|
529
529
|
* Copyright 2017 Google LLC
|
|
530
530
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
531
|
-
*/const as=(r,t)=>{var i;const e=r._$AN;if(e===void 0)return!1;for(const s of e)(i=s._$AO)==null||i.call(s,t,!1),as(s,t);return!0},Fs=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while((e==null?void 0:e.size)===0)},Kr=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),Jn(t)}};function Gn(r){this._$AN!==void 0?(Fs(this),this._$AM=r,Kr(this)):this._$AM=r}function Qn(r,t=!1,e=0){const i=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(i))for(let o=e;o<i.length;o++)as(i[o],!1),Fs(i[o]);else i!=null&&(as(i,!1),Fs(i));else as(this,r)}const Jn=r=>{r.type==Wr.CHILD&&(r._$AP??(r._$AP=Qn),r._$AQ??(r._$AQ=Gn))};class ta extends Zn{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),Kr(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,s;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(s=this.disconnected)==null||s.call(this)),e&&(as(this,t),Fs(this))}setValue(t){if(Xn(this.t))this.t._$AI(t,this);else{const e=[...this.t._$AH];e[this.i]=t,this.t._$AI(e,this,0)}}disconnected(){}reconnected(){}}const ea=new WeakMap;let Yr=0;const Ci=new Map,Zr=new WeakSet,Xr=()=>new Promise(r=>requestAnimationFrame(r)),Gr=(r,t)=>{const e=r-t;return e===0?void 0:e},Qr=(r,t)=>{const e=r/t;return e===1?void 0:e},Ai={left:(r,t)=>{const e=Gr(r,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateX(${e}px)`}},top:(r,t)=>{const e=Gr(r,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateY(${e}px)`}},width:(r,t)=>{let e;t===0&&(t=1,e={width:"1px"});const i=Qr(r,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(r,t)=>{let e;t===0&&(t=1,e={height:"1px"});const i=Qr(r,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},sa={duration:333,easing:"ease-in-out"},ia=["left","top","width","height","opacity","color","background"],Jr=new WeakMap;class ra extends ta{constructor(t){if(super(t),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,t.type===Wr.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;(t=this.resolveFinished)==null||t.call(this),this.finished=new Promise(e=>{this.l=e})}async resolveFinished(){var t;(t=this.l)==null||t.call(this),this.l=void 0}render(t){return st}getController(){return ea.get(this.u)}isDisabled(){var t;return this.options.disabled||((t=this.getController())==null?void 0:t.disabled)}update(t,[e]){var s;const i=this.u===void 0;return i&&(this.u=(s=t.options)==null?void 0:s.host,this.u.addController(this),this.u.updateComplete.then(o=>this.t=!0),this.element=t.element,Jr.set(this.element,this)),this.optionsOrCallback=e,(i||typeof e!="function")&&this.p(e),this.render(e)}p(t){t=t??{};const e=this.getController();e!==void 0&&((t={...e.defaultOptions,...t}).keyframeOptions={...e.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=ia),this.options=t}m(){const t={},e=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(s=>{const o=e[s]??(Ai[s]?void 0:i[s]),n=Number(o);t[s]=isNaN(n)?o+"":n}),t}v(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((i,s)=>{if(Array.isArray(i)){if(Array.isArray(s)&&s.length===i.length&&i.every((o,n)=>o===s[n]))return!1}else if(s===i)return!1;return!0})(t,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.h&&(this._=Array.isArray(t)?Array.from(t):t),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 t;this.prepare(),await Xr;const e=this.O(),i=this.j(this.options.keyframeOptions,e),s=this.m();if(this.A!==void 0){const{from:o,to:n}=this.N(this.A,s,e);this.log("measured",[this.A,s,o,n]),t=this.calculateKeyframes(o,n)}else{const o=Ci.get(this.options.inId);if(o){Ci.delete(this.options.inId);const{from:n,to:a}=this.N(o,s,e);t=this.calculateKeyframes(n,a),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,Yr++,t.forEach(c=>c.zIndex=Yr)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var t,e;this.P=this.element.getAttribute("style"),(t=this.webAnimation)==null||t.commitStyles(),(e=this.webAnimation)==null||e.cancel()}reconnected(){}async disconnected(){var e;if(!this.h||(this.options.id!==void 0&&Ci.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await Xr(),(e=this.i)==null?void 0:e.isConnected){const i=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,i),this.options.stabilizeOut){const s=this.m();this.log("stabilizing out");const o=this.A.left-s.left,n=this.A.top-s.top;getComputedStyle(this.element).position!=="static"||o===0&&n===0||(this.element.style.position="relative"),o!==0&&(this.element.style.left=o+"px"),n!==0&&(this.element.style.top=n+"px")}}const t=this.j(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;(e=(t=this.options).onStart)==null||e.call(t,this)}didFinish(t){var e,i;t&&((i=(e=this.options).onComplete)==null||i.call(e,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const t=[];for(let e=this.element.parentNode;e;e=e==null?void 0:e.parentNode){const i=Jr.get(e);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=Zr.has(this.u);return t||this.u.updateComplete.then(()=>{Zr.add(this.u)}),t}j(t,e=this.O()){const i={...sa};return e.forEach(s=>Object.assign(i,s.options.keyframeOptions)),Object.assign(i,t),i}N(t,e,i){t={...t},e={...e};const s=i.map(a=>a.animatingProperties).filter(a=>a!==void 0);let o=1,n=1;return s.length>0&&(s.forEach(a=>{a.width&&(o/=a.width),a.height&&(n/=a.height)}),t.left!==void 0&&e.left!==void 0&&(t.left=o*t.left,e.left=o*e.left),t.top!==void 0&&e.top!==void 0&&(t.top=n*t.top,e.top=n*e.top)),{from:t,to:e}}calculateKeyframes(t,e,i=!1){const s={},o={};let n=!1;const a={};for(const c in e){const h=t[c],d=e[c];if(c in Ai){const p=Ai[c];if(h===void 0||d===void 0)continue;const
|
|
531
|
+
*/const as=(r,t)=>{var i;const e=r._$AN;if(e===void 0)return!1;for(const s of e)(i=s._$AO)==null||i.call(s,t,!1),as(s,t);return!0},Fs=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while((e==null?void 0:e.size)===0)},Kr=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),Jn(t)}};function Gn(r){this._$AN!==void 0?(Fs(this),this._$AM=r,Kr(this)):this._$AM=r}function Qn(r,t=!1,e=0){const i=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(i))for(let o=e;o<i.length;o++)as(i[o],!1),Fs(i[o]);else i!=null&&(as(i,!1),Fs(i));else as(this,r)}const Jn=r=>{r.type==Wr.CHILD&&(r._$AP??(r._$AP=Qn),r._$AQ??(r._$AQ=Gn))};class ta extends Zn{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),Kr(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,s;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(s=this.disconnected)==null||s.call(this)),e&&(as(this,t),Fs(this))}setValue(t){if(Xn(this.t))this.t._$AI(t,this);else{const e=[...this.t._$AH];e[this.i]=t,this.t._$AI(e,this,0)}}disconnected(){}reconnected(){}}const ea=new WeakMap;let Yr=0;const Ci=new Map,Zr=new WeakSet,Xr=()=>new Promise(r=>requestAnimationFrame(r)),Gr=(r,t)=>{const e=r-t;return e===0?void 0:e},Qr=(r,t)=>{const e=r/t;return e===1?void 0:e},Ai={left:(r,t)=>{const e=Gr(r,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateX(${e}px)`}},top:(r,t)=>{const e=Gr(r,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateY(${e}px)`}},width:(r,t)=>{let e;t===0&&(t=1,e={width:"1px"});const i=Qr(r,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(r,t)=>{let e;t===0&&(t=1,e={height:"1px"});const i=Qr(r,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},sa={duration:333,easing:"ease-in-out"},ia=["left","top","width","height","opacity","color","background"],Jr=new WeakMap;class ra extends ta{constructor(t){if(super(t),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,t.type===Wr.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;(t=this.resolveFinished)==null||t.call(this),this.finished=new Promise(e=>{this.l=e})}async resolveFinished(){var t;(t=this.l)==null||t.call(this),this.l=void 0}render(t){return st}getController(){return ea.get(this.u)}isDisabled(){var t;return this.options.disabled||((t=this.getController())==null?void 0:t.disabled)}update(t,[e]){var s;const i=this.u===void 0;return i&&(this.u=(s=t.options)==null?void 0:s.host,this.u.addController(this),this.u.updateComplete.then(o=>this.t=!0),this.element=t.element,Jr.set(this.element,this)),this.optionsOrCallback=e,(i||typeof e!="function")&&this.p(e),this.render(e)}p(t){t=t??{};const e=this.getController();e!==void 0&&((t={...e.defaultOptions,...t}).keyframeOptions={...e.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=ia),this.options=t}m(){const t={},e=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(s=>{const o=e[s]??(Ai[s]?void 0:i[s]),n=Number(o);t[s]=isNaN(n)?o+"":n}),t}v(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((i,s)=>{if(Array.isArray(i)){if(Array.isArray(s)&&s.length===i.length&&i.every((o,n)=>o===s[n]))return!1}else if(s===i)return!1;return!0})(t,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.h&&(this._=Array.isArray(t)?Array.from(t):t),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 t;this.prepare(),await Xr;const e=this.O(),i=this.j(this.options.keyframeOptions,e),s=this.m();if(this.A!==void 0){const{from:o,to:n}=this.N(this.A,s,e);this.log("measured",[this.A,s,o,n]),t=this.calculateKeyframes(o,n)}else{const o=Ci.get(this.options.inId);if(o){Ci.delete(this.options.inId);const{from:n,to:a}=this.N(o,s,e);t=this.calculateKeyframes(n,a),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,Yr++,t.forEach(c=>c.zIndex=Yr)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var t,e;this.P=this.element.getAttribute("style"),(t=this.webAnimation)==null||t.commitStyles(),(e=this.webAnimation)==null||e.cancel()}reconnected(){}async disconnected(){var e;if(!this.h||(this.options.id!==void 0&&Ci.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await Xr(),(e=this.i)==null?void 0:e.isConnected){const i=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,i),this.options.stabilizeOut){const s=this.m();this.log("stabilizing out");const o=this.A.left-s.left,n=this.A.top-s.top;getComputedStyle(this.element).position!=="static"||o===0&&n===0||(this.element.style.position="relative"),o!==0&&(this.element.style.left=o+"px"),n!==0&&(this.element.style.top=n+"px")}}const t=this.j(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;(e=(t=this.options).onStart)==null||e.call(t,this)}didFinish(t){var e,i;t&&((i=(e=this.options).onComplete)==null||i.call(e,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const t=[];for(let e=this.element.parentNode;e;e=e==null?void 0:e.parentNode){const i=Jr.get(e);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=Zr.has(this.u);return t||this.u.updateComplete.then(()=>{Zr.add(this.u)}),t}j(t,e=this.O()){const i={...sa};return e.forEach(s=>Object.assign(i,s.options.keyframeOptions)),Object.assign(i,t),i}N(t,e,i){t={...t},e={...e};const s=i.map(a=>a.animatingProperties).filter(a=>a!==void 0);let o=1,n=1;return s.length>0&&(s.forEach(a=>{a.width&&(o/=a.width),a.height&&(n/=a.height)}),t.left!==void 0&&e.left!==void 0&&(t.left=o*t.left,e.left=o*e.left),t.top!==void 0&&e.top!==void 0&&(t.top=n*t.top,e.top=n*e.top)),{from:t,to:e}}calculateKeyframes(t,e,i=!1){const s={},o={};let n=!1;const a={};for(const c in e){const h=t[c],d=e[c];if(c in Ai){const p=Ai[c];if(h===void 0||d===void 0)continue;const g=p(h,d);g.transform!==void 0&&(a[c]=g.value,n=!0,s.transform=`${s.transform??""} ${g.transform}`,g.overrideFrom!==void 0&&Object.assign(s,g.overrideFrom))}else h!==d&&h!==void 0&&d!==void 0&&(n=!0,s[c]=h,o[c]=d)}return s.transformOrigin=o.transformOrigin=i?"center center":"top left",this.animatingProperties=a,n?[s,o]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),t!==void 0)){this.log("animate",[t,e]),i=!0,this.webAnimation=this.element.animate(t,e);const s=this.getController();s==null||s.add(this);try{await this.webAnimation.finished}catch{}s==null||s.remove(this)}return this.didFinish(i),i}isAnimating(){var t,e;return((t=this.webAnimation)==null?void 0:t.playState)==="running"||((e=this.webAnimation)==null?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}}const oa=Yn(ra),na={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">
|
|
532
532
|
<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"/>
|
|
533
533
|
</svg>
|
|
534
534
|
`,"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">
|
|
@@ -564,7 +564,7 @@
|
|
|
564
564
|
<path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
565
565
|
<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"/>
|
|
566
566
|
</svg>
|
|
567
|
-
`}},zs=new Map,Rs={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:""}};let to=!1;function aa(){var r,t;to||(to=!0,Rs.custom.url=((r=document.querySelector("[customIconLibraryPath]"))==null?void 0:r.getAttribute("customIconLibraryPath"))||"",Rs.custom.defaultPrefix=((t=document.querySelector("[customIconDefaultPrefix]"))==null?void 0:t.getAttribute("customIconDefaultPrefix"))||"")}const eo=sessionStorage.getItem("sonicIconsCache"),Jt=eo?JSON.parse(eo):{icons:{},names:[]},la=100,ir=class ir{};ir.default={get:async t=>{const e=t.library;if(!t.name)return"";const i=t.name,s=na;if(e=="custom"&&aa(),e&&e in Rs){const o=Rs[e],n=t.prefix||o.defaultPrefix||"",a=s[e]||{};s[e]=a;const c=n+"-"+i;if(a[c])return z(a[c]);const h=(o.url||"").replace("$prefix",n).replace("$name",i);if(Jt.icons[h])return a[c]=Jt.icons[h],z(Jt.icons[h]);if(!zs.has(h)){const p=new Promise(async
|
|
567
|
+
`}},zs=new Map,Rs={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:""}};let to=!1;function aa(){var r,t;to||(to=!0,Rs.custom.url=((r=document.querySelector("[customIconLibraryPath]"))==null?void 0:r.getAttribute("customIconLibraryPath"))||"",Rs.custom.defaultPrefix=((t=document.querySelector("[customIconDefaultPrefix]"))==null?void 0:t.getAttribute("customIconDefaultPrefix"))||"")}const eo=sessionStorage.getItem("sonicIconsCache"),Jt=eo?JSON.parse(eo):{icons:{},names:[]},la=100,ir=class ir{};ir.default={get:async t=>{const e=t.library;if(!t.name)return"";const i=t.name,s=na;if(e=="custom"&&aa(),e&&e in Rs){const o=Rs[e],n=t.prefix||o.defaultPrefix||"",a=s[e]||{};s[e]=a;const c=n+"-"+i;if(a[c])return z(a[c]);const h=(o.url||"").replace("$prefix",n).replace("$name",i);if(Jt.icons[h])return a[c]=Jt.icons[h],z(Jt.icons[h]);if(!zs.has(h)){const p=new Promise(async g=>{try{const v=await fetch(h);if(!v.ok){g(`<b title="Erreur ${v.status}">😶</b>`);return}try{const b=await v.text();g(b)}catch{g(null)}}catch{dn(),g(null)}});zs.set(h,p)}const d=await zs.get(h);if(zs.delete(h),a[c]=d||"",Jt.icons[h]=d||"",Jt.names.length>la){const p=Jt.names.shift();delete Jt.icons[p]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(Jt)),z(d)}return z(s.core[t.name]||"")}};let Si=ir;var ca=Object.defineProperty,ha=Object.getOwnPropertyDescriptor,ls=(r,t,e,i)=>{for(var s=i>1?void 0:i?ha(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&ca(t,e,s),s};const da="sonic-icon";let be=class extends x{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library=""}async updateIcon(){this.iconText=await Si.default.get({name:this.name,prefix:this.prefix,library:this.library})}connectedCallback(){this.setAttribute("aria-hidden","true"),super.connectedCallback()}willUpdate(r){(r.has("name")||r.has("prefix")||r.has("library"))&&this.updateIcon(),super.willUpdate(r)}render(){return this.iconText?this.iconText:A}};be.styles=P`
|
|
568
568
|
:host {
|
|
569
569
|
line-height: 0.1em;
|
|
570
570
|
width: fit-content;
|
|
@@ -614,7 +614,7 @@
|
|
|
614
614
|
:host([size="3xl"]) svg {
|
|
615
615
|
--_sc-icon-size: 2.8em;
|
|
616
616
|
}
|
|
617
|
-
`,ls([
|
|
617
|
+
`,ls([L()],be.prototype,"iconText",2),ls([l({type:String})],be.prototype,"name",2),ls([l({type:String})],be.prototype,"prefix",2),ls([l({type:String})],be.prototype,"library",2),be=ls([$(da)],be);const cs=P`
|
|
618
618
|
.custom-scroll {
|
|
619
619
|
overflow: auto !important;
|
|
620
620
|
overflow-y: overlay !important;
|
|
@@ -636,7 +636,7 @@
|
|
|
636
636
|
border: solid 0.15rem transparent;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
`;var pa=Object.defineProperty,ua=Object.getOwnPropertyDescriptor,Tt=(r,t,e,i)=>{for(var s=i>1?void 0:i?ua(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&pa(t,e,s),s};const fa={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},
|
|
639
|
+
`;var pa=Object.defineProperty,ua=Object.getOwnPropertyDescriptor,Tt=(r,t,e,i)=>{for(var s=i>1?void 0:i?ua(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&pa(t,e,s),s};const fa={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},ma="sonic-toast-item";let xt=class extends x{constructor(){super(...arguments),this.title="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.visible=!0}render(){if(this.dismissForever){const r=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(r)[this.id])return A}return this.visible?m`<div
|
|
640
640
|
class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"
|
|
641
641
|
>
|
|
642
642
|
<button
|
|
@@ -650,14 +650,14 @@
|
|
|
650
650
|
class="sonic-toast-content custom-scroll"
|
|
651
651
|
style="max-height: ${this.maxHeight} ;"
|
|
652
652
|
>
|
|
653
|
-
${this.status&&
|
|
653
|
+
${this.status&&m`<sonic-icon
|
|
654
654
|
name=${fa[this.status]}
|
|
655
655
|
class="sonic-toast-icon"
|
|
656
656
|
size="2xl"
|
|
657
657
|
></sonic-icon>`}
|
|
658
658
|
|
|
659
659
|
<div class="sonic-toast-text">
|
|
660
|
-
${this.title?
|
|
660
|
+
${this.title?m`<div class="sonic-toast-title">${this.title}</div>`:""}
|
|
661
661
|
${this.text?z(this.text):""}
|
|
662
662
|
<slot></slot>
|
|
663
663
|
</div>
|
|
@@ -844,7 +844,7 @@
|
|
|
844
844
|
opacity: 0.85;
|
|
845
845
|
pointer-events: none;
|
|
846
846
|
}
|
|
847
|
-
`],Tt([l({type:String})],xt.prototype,"title",2),Tt([l({type:String})],xt.prototype,"id",2),Tt([l({type:String})],xt.prototype,"text",2),Tt([l({type:String})],xt.prototype,"status",2),Tt([l({type:Boolean})],xt.prototype,"ghost",2),Tt([l({type:Boolean})],xt.prototype,"preserve",2),Tt([l({type:Boolean})],xt.prototype,"dismissForever",2),Tt([l({type:String})],xt.prototype,"maxHeight",2),Tt([
|
|
847
|
+
`],Tt([l({type:String})],xt.prototype,"title",2),Tt([l({type:String})],xt.prototype,"id",2),Tt([l({type:String})],xt.prototype,"text",2),Tt([l({type:String})],xt.prototype,"status",2),Tt([l({type:Boolean})],xt.prototype,"ghost",2),Tt([l({type:Boolean})],xt.prototype,"preserve",2),Tt([l({type:Boolean})],xt.prototype,"dismissForever",2),Tt([l({type:String})],xt.prototype,"maxHeight",2),Tt([L()],xt.prototype,"visible",2),xt=Tt([$(ma)],xt);const ga=P`
|
|
848
848
|
:host {
|
|
849
849
|
/* POLICES */
|
|
850
850
|
/*
|
|
@@ -979,7 +979,7 @@
|
|
|
979
979
|
${so}
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
|
-
`;var ya=Object.defineProperty,_a=Object.getOwnPropertyDescriptor,hs=(r,t,e,i)=>{for(var s=i>1?void 0:i?_a(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&ya(t,e,s),s};const wa="sonic-theme";let _t=class extends x{constructor(){super(),this.background=!1,this.color=!1,this.font=!1,_t.instance=this}static getPopContainer(){return _t.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",r=>this.receiveMessage(r),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){var s;const r=document.styleSheets,t=r.length,e=[];for(let o=0;o<t;o++){const n=r[o];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&e.push(n.href)}const i={variables:this.getCssVariables(),fonts:e};(s=rt.get("sonic-theme"))==null||s.set(i),document.querySelectorAll("iframe").forEach(o=>{var n;return(n=o.contentWindow)==null?void 0:n.postMessage({type:"SonicTheme",...i},"*")})}receiveMessage(r){const t=r.data;!t.type||t.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const r=[],t=[..._t.styles.map(s=>s.styleSheet),...Array.from(document.styleSheets)];for(const s of t)try{if(!s)continue;const o=s.cssRules;for(const n of o){if(!("style"in n))continue;const a=n.style;for(const c of a)r.includes(c)||c.indexOf("--sc")!==0||r.push(c)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const e=window.getComputedStyle(this),i={};return r.forEach(s=>i[s]=e.getPropertyValue(s)),i}render(){return
|
|
982
|
+
`;var ya=Object.defineProperty,_a=Object.getOwnPropertyDescriptor,hs=(r,t,e,i)=>{for(var s=i>1?void 0:i?_a(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&ya(t,e,s),s};const wa="sonic-theme";let _t=class extends x{constructor(){super(),this.background=!1,this.color=!1,this.font=!1,_t.instance=this}static getPopContainer(){return _t.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",r=>this.receiveMessage(r),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){var s;const r=document.styleSheets,t=r.length,e=[];for(let o=0;o<t;o++){const n=r[o];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&e.push(n.href)}const i={variables:this.getCssVariables(),fonts:e};(s=rt.get("sonic-theme"))==null||s.set(i),document.querySelectorAll("iframe").forEach(o=>{var n;return(n=o.contentWindow)==null?void 0:n.postMessage({type:"SonicTheme",...i},"*")})}receiveMessage(r){const t=r.data;!t.type||t.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const r=[],t=[..._t.styles.map(s=>s.styleSheet),...Array.from(document.styleSheets)];for(const s of t)try{if(!s)continue;const o=s.cssRules;for(const n of o){if(!("style"in n))continue;const a=n.style;for(const c of a)r.includes(c)||c.indexOf("--sc")!==0||r.push(c)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const e=window.getComputedStyle(this),i={};return r.forEach(s=>i[s]=e.getPropertyValue(s)),i}render(){return m`<slot></slot>`}};_t.styles=[ba,va,ga,P`
|
|
983
983
|
:host([color]) {
|
|
984
984
|
color: var(--sc-base-content, #000);
|
|
985
985
|
}
|
|
@@ -1011,8 +1011,8 @@
|
|
|
1011
1011
|
transition-property: scale, opacity;
|
|
1012
1012
|
transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
|
|
1013
1013
|
}
|
|
1014
|
-
`],hs([l({type:String,reflect:!0})],_t.prototype,"theme",2),hs([l({type:Boolean,reflect:!0})],_t.prototype,"background",2),hs([l({type:Boolean,reflect:!0})],_t.prototype,"color",2),hs([l({type:Boolean,reflect:!0})],_t.prototype,"font",2),_t=hs([$(wa)],_t);var xa=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,io=(r,t,e,i)=>{for(var s=i>1?void 0:i?$a(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&xa(t,e,s),s};const Pa="sonic-toast";let
|
|
1015
|
-
${Ns(this.toasts,i=>i.id,i=>
|
|
1014
|
+
`],hs([l({type:String,reflect:!0})],_t.prototype,"theme",2),hs([l({type:Boolean,reflect:!0})],_t.prototype,"background",2),hs([l({type:Boolean,reflect:!0})],_t.prototype,"color",2),hs([l({type:Boolean,reflect:!0})],_t.prototype,"font",2),_t=hs([$(wa)],_t);var xa=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,io=(r,t,e,i)=>{for(var s=i>1?void 0:i?$a(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&xa(t,e,s),s};const Pa="sonic-toast";let k=class extends x{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const t=window.parent!=window;let e={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return t||(e={...e,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),k.handleExistingToastDelegation(),this.toasts?m`<div aria-live="polite" style=${bt(e)}>
|
|
1015
|
+
${Ns(this.toasts,i=>i.id,i=>m`
|
|
1016
1016
|
<sonic-toast-item
|
|
1017
1017
|
maxHeight=${t?"none":"10rem"}
|
|
1018
1018
|
status=${C(i.status)}
|
|
@@ -1028,22 +1028,22 @@
|
|
|
1028
1028
|
${i.text?z(i.text):""}
|
|
1029
1029
|
</sonic-toast-item>
|
|
1030
1030
|
`)}
|
|
1031
|
-
</div>`:A}static removeAll(){if(
|
|
1031
|
+
</div>`:A}static removeAll(){if(k.delegateToasts){k.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const t=k.getInstance();t&&(t.toasts=t.toasts.filter(e=>e.ghost))}static removeItemsByStatus(t){if(k.delegateToasts){k.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:t},"*");return}const e=k.getInstance();e&&(e.toasts=e.toasts.filter(i=>i.status!==t))}static removeTemporaryItems(){if(k.delegateToasts){k.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const t=k.getInstance();t&&(t.toasts=t.toasts.filter(e=>e.preserve))}static getInstance(){return k.instance||(k.instance=document.createElement("sonic-toast"),_t.getPopContainer().prepend(k.instance)),k.instance}static add(t){if(k.delegateToasts){k.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:t},"*");return}const e=k.getInstance(),i=t.id??new Date().valueOf(),o=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>").test(t.text),n={id:i,text:t.text,title:t.title,status:t.status,preserve:o?!0:t.preserve,ghost:t.ghost,dismissForever:t.dismissForever};if(t.dismissForever&&t.id){const a=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(a)[t.id])return null}if(e!=null&&e.toasts.length){const a={...n};for(const c of e.toasts){const h={...c};if(a.id=h.id=0,et.shallowEqual(a,h))return null}}return e&&(e.toasts=[...e.toasts,n]),n}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const t=k.getInstance();window.parent.postMessage({type:"addToasts",toasts:t.toasts},"*"),t.toasts=[]}static removeItem(t){if(k.delegateToasts){k.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:t},"*");return}const e=k.getInstance();e&&e.removeItem(t)}removeItem(t){t&&(this.toasts=this.toasts.filter(e=>(e={...e},delete e.id,!et.shallowEqual(e,t,!1))))}};k.delegateToasts=!1,io([l({type:Array})],k.prototype,"toasts",2),k=io([$(Pa)],k),typeof window<"u"&&(window[xs+"Toast"]=window[xs+"Toast"]||k);function Ca(){var e;const r=i=>{i.data.type=="querySonicToastAvailability"&&i.source.postMessage({type:"sonicToastAvailable"},"*"),i.data.type=="removeItemsByStatus"&&k.removeItemsByStatus(i.data.status),i.data.type=="removeTemporaryItems"&&k.removeTemporaryItems(),i.data.type=="sonicToastAvailable"&&(k.delegateToasts=!0,k.handleExistingToastDelegation()),i.data.type=="addToasts"&&(k.getInstance().toasts=[...k.getInstance().toasts,...i.data.toasts]),i.data.type=="removeAllToasts"&&k.removeAll(),i.data.type=="removeToast"&&k.removeItem(i.data.toast),i.data.type=="addToast"&&k.add(i.data.toast)},t=window.parent!=window;if(window.addEventListener("message",r,!1),t&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!t)for(const i of document.querySelectorAll("iframe"))(e=i.contentWindow)==null||e.postMessage({type:"sonicToastAvailable"},"*")}Ca();var Aa=Object.defineProperty,Sa=Object.getOwnPropertyDescriptor,ds=(r,t,e,i)=>{for(var s=i>1?void 0:i?Sa(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Aa(t,e,s),s};const Oa=new Set,Da=new Set,ka=r=>{for(const t of Da)t(r)},Oi=new Set;let Di=0;ei(async()=>{Di++;const r=Di,t=Array.from(Oi);for(;t.length>0;){if(r!=Di)return;const e=t.splice(0,4);await Promise.all(e.map(i=>i._fetchData()))}});const ki=(r,t)=>{class e extends r{constructor(...s){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.dataProvider=""}get props(){return super.props}set props(s){super.props=s}set endPoint(s){this._endPoint=s,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}async _fetchData(){if(this.requestUpdate(),!this.isFetchEnabled||(this.api=new Ne(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await rt.getInstance().isLocalStrorageReady,!this.isConnected))return;const s=rt.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();this.isLoading=!0,et.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});let o=await this.api.get(this.endPoint||this.dataProvider||"",s);if(this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||Oa.add(this),ka(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&k.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 n=o._sonic_http_response_,a=this.key.split(".");o=et.traverse(o,a,this.hasAttribute("preserveOtherKeys")),o&&et.isObject(o)&&n&&(o._sonic_http_response_=n)}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(){var s;super.disconnectedCallback(),Oi.delete(this),(s=this.publisher)==null||s.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){var s;this.lazyLoad=this.lazyLoad!==void 0?this.lazyLoad:this.hasAttribute("lazyload"),Oi.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(),(s=this.publisher)==null||s.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const s=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),o={root:null,rootMargin:Math.max(window.innerWidth*s,window.innerHeight*s)+"px",threshold:.9};this.iObserver=new IntersectionObserver(c=>this.onIntersection(c),o);let a=[...(this.shadowRoot?this.shadowRoot:this).children].filter(c=>c.nodeName.toLowerCase()!="style")[0];if((a==null?void 0:a.nodeName.toLocaleLowerCase())=="slot"&&(a=[...a.children].filter(c=>c.nodeName.toLowerCase()!="style")[0]),!a||a.nodeName.toLocaleLowerCase()=="template"){a=document.createElement("div");const c=a.style;c.pointerEvents="none",c.width="1px",c.height="1px",this.lazyLoadPlaceHolder=a,this.appendChild(a)}a?this.iObserver.observe(a):this.isFirstLoad&&this._fetchData()}onIntersection(s){var o,n;for(const a of s)if(a.isIntersecting&&this.isFirstLoad){this._fetchData(),(o=this.lazyLoadPlaceHolder)==null||o.remove(),this.lazyLoadPlaceHolder=void 0,(n=this.iObserver)==null||n.disconnect();break}}}return ds([l()],e.prototype,"noErrorsRecordings",2),ds([l()],e.prototype,"props",1),ds([l({type:String})],e.prototype,"endPoint",1),ds([l()],e.prototype,"requestId",2),ds([l({type:Number})],e.prototype,"refetchEveryMs",2),e};var La=Object.defineProperty,Ea=Object.getOwnPropertyDescriptor,ve=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ea(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&La(t,e,s),s};const Us=r=>{class t extends r{constructor(...i){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){var o;const i=(o=this.shadowRoot)==null?void 0:o.querySelector("input");if(!i||i.checkValidity())return;const s=this.getFormPublisher();s&&(s.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 ve([l()],t.prototype,"forceAutoFill",2),ve([l({type:String})],t.prototype,"type",1),ve([l()],t.prototype,"description",1),ve([l()],t.prototype,"label",1),ve([l({type:String,reflect:!0})],t.prototype,"status",2),ve([l({type:Number})],t.prototype,"tabindex",2),ve([l({type:String})],t.prototype,"autocomplete",2),t},ro=ki,Na=wi,oo=Me,no=Us,te=G,Li=Je;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:ro,FormCheckable:Na,FormElement:oo,FormInput:no,Subscriber:te,TemplatesContainer:Li};/**
|
|
1032
1032
|
* @license
|
|
1033
1033
|
* Copyright 2020 Google LLC
|
|
1034
1034
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1035
|
-
*/const Mt=ue(class extends Ee{constructor(r){if(super(r),r.type!==Le.CHILD)throw Error("templateContent can only be used in child bindings")}render(r){return this.vt===r?yt:(this.vt=r,document.importNode(r.content,!0))}});var Ta=Object.defineProperty,Ma=Object.getOwnPropertyDescriptor,ao=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ma(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Ta(t,e,s),s};const Ia="sonic-fetch";let Vs=class extends ki(G(Li(x))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return A;const r=this.loader===!0||this.loader===""?"fixed":this.loader;return
|
|
1035
|
+
*/const Mt=ue(class extends Ee{constructor(r){if(super(r),r.type!==Le.CHILD)throw Error("templateContent can only be used in child bindings")}render(r){return this.vt===r?yt:(this.vt=r,document.importNode(r.content,!0))}});var Ta=Object.defineProperty,Ma=Object.getOwnPropertyDescriptor,ao=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ma(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Ta(t,e,s),s};const Ia="sonic-fetch";let Vs=class extends ki(G(Li(x))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return A;const r=this.loader===!0||this.loader===""?"fixed":this.loader;return m`<sonic-loader mode=${r}></sonic-loader>`}renderSkeleton(){const r=this.templateParts.skeleton;return this.isLoading&&r?Mt(r):A}render(){return m`
|
|
1036
1036
|
${this.renderSkeleton()} ${this.renderLoader()}
|
|
1037
|
-
${this.isLoading?A:
|
|
1037
|
+
${this.isLoading?A:m`<slot></slot>`}
|
|
1038
1038
|
`}};Vs.styles=[P`
|
|
1039
1039
|
:host {
|
|
1040
1040
|
display: contents;
|
|
1041
1041
|
}
|
|
1042
|
-
`],ao([l()],Vs.prototype,"loader",2),Vs=ao([$(Ia)],Vs);var ja=Object.defineProperty,Fa=Object.getOwnPropertyDescriptor,lo=(r,t,e,i)=>{for(var s=i>1?void 0:i?Fa(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&ja(t,e,s),s};const za="sonic-if";let
|
|
1042
|
+
`],ao([l()],Vs.prototype,"loader",2),Vs=ao([$(Ia)],Vs);var ja=Object.defineProperty,Fa=Object.getOwnPropertyDescriptor,lo=(r,t,e,i)=>{for(var s=i>1?void 0:i?Fa(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&ja(t,e,s),s};const za="sonic-if";let Bs=class extends x{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?m` <slot></slot> `:A}};Bs.styles=P`
|
|
1043
1043
|
:host {
|
|
1044
1044
|
display: contents;
|
|
1045
1045
|
}
|
|
1046
|
-
`,lo([l({type:Boolean})],
|
|
1046
|
+
`,lo([l({type:Boolean})],Bs.prototype,"condition",2),Bs=lo([$(za)],Bs);const Ra=P`
|
|
1047
1047
|
:host([align="left"]) .sonic-loader--inline {
|
|
1048
1048
|
margin-left: 0;
|
|
1049
1049
|
}
|
|
@@ -1163,7 +1163,7 @@
|
|
|
1163
1163
|
height: 5rem;
|
|
1164
1164
|
animation: sonic-loader--fixed 1s 0s linear infinite;
|
|
1165
1165
|
}
|
|
1166
|
-
`;var Va=Object.defineProperty,
|
|
1166
|
+
`;var Va=Object.defineProperty,Ba=Object.getOwnPropertyDescriptor,Ei=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ba(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Va(t,e,s),s};const Ha="sonic-loader";let at=class extends x{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1}static show(r){at.loader||(at.loader=document.createElement("sonic-loader"));const t=at.loader;r||(r={}),r.mode&&t.setAttribute("mode",r.mode),r.noDelay&&t.setAttribute("noDelay",""),r.container||(r.container=_t.getPopContainer(),r.mode="fixed"),r.container.appendChild(t),at.callCounter++}static hide(){at.callCounter--,!(at.callCounter>0)&&at.loader&&at.loader.remove()}render(){return m`<div
|
|
1167
1167
|
class="sonic-loader sonic-loader--${this.mode} ${this.noDelay?"sonic-loader--nodelay":""} "
|
|
1168
1168
|
>
|
|
1169
1169
|
<div></div>
|
|
@@ -1198,7 +1198,7 @@
|
|
|
1198
1198
|
opacity: 1;
|
|
1199
1199
|
}
|
|
1200
1200
|
}
|
|
1201
|
-
`],at.callCounter=0,Ei([l({type:String})],at.prototype,"mode",2),Ei([l({type:Boolean})],at.prototype,"noDelay",2),at=Ei([$(
|
|
1201
|
+
`],at.callCounter=0,Ei([l({type:String})],at.prototype,"mode",2),Ei([l({type:Boolean})],at.prototype,"noDelay",2),at=Ei([$(Ha)],at);var qa=Object.defineProperty,Wa=Object.getOwnPropertyDescriptor,Ka=(r,t,e,i)=>{for(var s=i>1?void 0:i?Wa(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&qa(t,e,s),s};const Ya="sonic-subscriber";let co=class extends G(x){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(r){super.updated(r),this.children.length==0?this.style.display="none":this.style.display="contents"}render(){return m`<slot></slot> `}};co=Ka([$(Ya)],co);var Za=Object.defineProperty,Xa=Object.getOwnPropertyDescriptor,Ot=(r,t,e,i)=>{for(var s=i>1?void 0:i?Xa(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Za(t,e,s),s};const Ga="sonic-list";let $t=class extends ki(G(Je(x))){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(r){typeof r!="function"&&r!==void 0||(this._items=r,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 A;const t=this.loader===!0||this.loader===""?"fixed":this.loader;return m`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){if(this.skeleton)return this.skeleton();const r=this.templateParts.skeleton;return this.isLoading&&r?Mt(r):A}renderSeparator(){if(this.separator)return this.separator();const r=this.templateParts.separator;return r?Mt(r):A}renderLoadingState(){return m`${this.renderSkeleton()} ${this.renderLoader()} `}renderNoResultState(){return m` <div
|
|
1202
1202
|
style="color: var(--sc-base-400);
|
|
1203
1203
|
font-size: 1.5em;
|
|
1204
1204
|
margin: 4rem 0;
|
|
@@ -1209,25 +1209,25 @@
|
|
|
1209
1209
|
><span class="sonic-no-result-text"
|
|
1210
1210
|
>${typeof this.props=="string"&&this.props==""?"Aucun résultat":this.props}</span
|
|
1211
1211
|
>
|
|
1212
|
-
</div>`}formatProps(){let r=this.props;if(r==null)return null;const t=r._sonic_http_response_,e=this.hasAttribute("extractValues");return Array.isArray(r)||(e?r=Object.entries(r).map(([i,s])=>({key:i,value:s})):et.isObject(r)&&Object.keys(r).length>0&&(!t||t.ok)?r=[r]:r=[]),r=r.filter(i=>i!=null),t&&(r._sonic_http_response_=t),r}updated(r){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(r)}getAllRenderableElements(r){let t=[];function e(i){if(i.nodeType===Node.ELEMENT_NODE){const s=i.getBoundingClientRect();(s.width>0||s.height>0)&&t.push(i),i.childNodes.forEach(e),i.shadowRoot&&i.shadowRoot.childNodes.forEach(e)}}return e(r),t}getDisplayContentsSize(r){const t=this.getAllRenderableElements(r);if(t.length===0)return{width:0,height:0};const e=t.map(a=>a.getBoundingClientRect()),i=Math.min(...e.map(a=>a.left)),s=Math.max(...e.map(a=>a.right)),o=Math.min(...e.map(a=>a.top)),n=Math.max(...e.map(a=>a.bottom));return{width:s-i,height:n-o}}render(){return
|
|
1212
|
+
</div>`}formatProps(){let r=this.props;if(r==null)return null;const t=r._sonic_http_response_,e=this.hasAttribute("extractValues");return Array.isArray(r)||(e?r=Object.entries(r).map(([i,s])=>({key:i,value:s})):et.isObject(r)&&Object.keys(r).length>0&&(!t||t.ok)?r=[r]:r=[]),r=r.filter(i=>i!=null),t&&(r._sonic_http_response_=t),r}updated(r){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(r)}getAllRenderableElements(r){let t=[];function e(i){if(i.nodeType===Node.ELEMENT_NODE){const s=i.getBoundingClientRect();(s.width>0||s.height>0)&&t.push(i),i.childNodes.forEach(e),i.shadowRoot&&i.shadowRoot.childNodes.forEach(e)}}return e(r),t}getDisplayContentsSize(r){const t=this.getAllRenderableElements(r);if(t.length===0)return{width:0,height:0};const e=t.map(a=>a.getBoundingClientRect()),i=Math.min(...e.map(a=>a.left)),s=Math.max(...e.map(a=>a.right)),o=Math.min(...e.map(a=>a.top)),n=Math.max(...e.map(a=>a.bottom));return{width:s-i,height:n-o}}render(){return m`
|
|
1213
1213
|
${this.renderContent()}
|
|
1214
1214
|
<div
|
|
1215
1215
|
style="grid-column: 1 / -1;min-height:${this.isLoading?0:this.loadingSize.height}px; width:0;float:left;display: var(--list-loader-height-display);"
|
|
1216
1216
|
></div>
|
|
1217
|
-
`}handleProgrammaticTemplates(r,t,e){return this.items?
|
|
1217
|
+
`}handleProgrammaticTemplates(r,t,e){return this.items?m`<sonic-subscriber
|
|
1218
1218
|
?debug=${this.defferedDebug===!0}
|
|
1219
1219
|
.bindPublisher=${()=>this.publisher[e]}
|
|
1220
1220
|
.propertyMap?=${this.itemPropertyMap}
|
|
1221
1221
|
dataProvider="${this.dataProvider}/list-item/${e}"
|
|
1222
1222
|
>
|
|
1223
1223
|
${this.items(r,t)}
|
|
1224
|
-
</sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!et.isObject(this.props))return
|
|
1225
|
-
${h==null?void 0:h.map((d,p)=>{if(d==null)return A;let
|
|
1224
|
+
</sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!et.isObject(this.props))return m`<div></div>`;const i=this.formatProps();if(((i==null?void 0: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 Mt(this.templateParts["no-items"])}const s=this.templateList.length;let o=-1;const n=this.hasAttribute("extractValues"),a=this.renderSeparator(),c=(i==null?void 0:i.length)||0,h=i==null?void 0:i.slice(this.offset,this.offset+this.limit);return m`
|
|
1225
|
+
${h==null?void 0:h.map((d,p)=>{if(d==null)return A;let g=p,v=null;if(typeof d=="object"&&!Array.isArray(d)){n&&(g=d==null?void 0:d.key);const u=d[this.templateKey];u&&typeof u=="string"&&(v=this.templateParts[u])}if(g=="_sonic_http_response_"||typeof g!="string"&&typeof g!="number")return A;const b=p>=c-1,y=p%2,_=this.publisher[g],D={key:g,even:y==0,odd:y==1,onlyChild:c==1,firstChild:p==0,lastChild:b};_._key_=g+"",_._metadata_={..._._metadata_.get(),...D};const f=this.handleProgrammaticTemplates(d,D,g);return f?m`${f}${b?A:a}`:(o++,v&&(o=-1),m`
|
|
1226
1226
|
<sonic-subscriber
|
|
1227
1227
|
?debug=${this.defferedDebug===!0}
|
|
1228
1228
|
.bindPublisher=${function(){return _}}
|
|
1229
1229
|
.propertyMap?=${this.itemPropertyMap}
|
|
1230
|
-
dataProvider="${this.dataProvider}/list-item/${
|
|
1230
|
+
dataProvider="${this.dataProvider}/list-item/${g}"
|
|
1231
1231
|
>
|
|
1232
1232
|
${Mt(v||this.templateList[o%s])}
|
|
1233
1233
|
</sonic-subscriber>
|
|
@@ -1237,8 +1237,8 @@
|
|
|
1237
1237
|
* @license
|
|
1238
1238
|
* Copyright 2021 Google LLC
|
|
1239
1239
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1240
|
-
*/function*ho(r,t){if(r!==void 0){let e=0;for(const i of r)yield t(i,e++)}}var Qa=Object.defineProperty,Ja=Object.getOwnPropertyDescriptor,ot=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ja(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Qa(t,e,s),s};const tl="sonic-queue";let Q=class extends G(x){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=()=>{var n;const t=this.dataProviderExpression.split("?");t.shift();const e=new URLSearchParams(t.join("?")),i=(n=this.filterPublisher)==null?void 0:n.get(),s=this.filteredFields.split(" ");for(const a in i){let c=i[a];Array.isArray(c)&&(c=c.filter(h=>h!==null)),!(this.filteredFields&&!s.includes(a)||c==null||c.toString()==="")&&e.set(a,i[a].toString())}const o=e.toString();if(!(o==this.searchHash&&!this.isFirstRequest)){this.searchHash=o;for(const a of this.listDataProviders)
|
|
1241
|
-
${ho(this.props,(t,e)=>{var s;const i=e==0?this.templates:(s=this.templates)==null?void 0:s.filter(o=>o.getAttribute("data-value")!="no-item");return
|
|
1240
|
+
*/function*ho(r,t){if(r!==void 0){let e=0;for(const i of r)yield t(i,e++)}}var Qa=Object.defineProperty,Ja=Object.getOwnPropertyDescriptor,ot=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ja(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Qa(t,e,s),s};const tl="sonic-queue";let Q=class extends G(x){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=()=>{var n;const t=this.dataProviderExpression.split("?");t.shift();const e=new URLSearchParams(t.join("?")),i=(n=this.filterPublisher)==null?void 0:n.get(),s=this.filteredFields.split(" ");for(const a in i){let c=i[a];Array.isArray(c)&&(c=c.filter(h=>h!==null)),!(this.filteredFields&&!s.includes(a)||c==null||c.toString()==="")&&e.set(a,i[a].toString())}const o=e.toString();if(!(o==this.searchHash&&!this.isFirstRequest)){this.searchHash=o;for(const a of this.listDataProviders)T.delete(a);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(async()=>{const a=this.resultCount;this.props=null,this.requestId++,this.resultCount=a,await T.getInstance().isLocalStrorageReady,window.requestAnimationFrame(()=>this.next())},this.isFirstRequest?0:this.filterTimeoutMs),this.isFirstRequest=!1}},this.dataProviderExpression="",this.invalidateOnPageShow=!1,this.idKey="id",this.listDataProviders=[],this.nextHadEvent=!1,this.storedScrollY=0,this.storedScrollX=0}disconnectedCallback(){var r;for(const t of this.listDataProviders)T.delete(t),this.listDataProviders=[];(r=this.filterPublisher)==null||r.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.publisher.set({}),super.disconnectedCallback()}async connectedCallback(){this.instanceId=Q.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=Gt.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),this.storeScrollPosition(),super.connectedCallback(),this.publisher.set({}),this.key=this.getAttribute("key"),await T.getInstance().isLocalStrorageReady,this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.configFilter()}configFilter(){var t;const r=this.getAncestorAttributeValue("dataFilterProvider");if(!r){this.next();return}this.filterPublisher=T.getInstance().get(r),(t=this.filterPublisher)==null||t.onInternalMutation(this.updateFilteredContent)}storeScrollPosition(){this.isSafari()&&(this.storedScrollX=window.scrollX,this.storedScrollY=window.scrollY)}isSafari(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}updated(r){this.isSafari()&&((Math.abs(this.storedScrollX-window.scrollX)>10||Math.abs(this.storedScrollY-window.scrollY)>10)&&window.scrollTo(this.storedScrollX,this.storedScrollY),window.requestAnimationFrame(()=>{(Math.abs(this.storedScrollX-window.scrollX)>10||Math.abs(this.storedScrollY-window.scrollY)>10)&&window.scrollTo(this.storedScrollX,this.storedScrollY)})),super.updated(r)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(r){var p,g,v;let t=this.offset;const i=new Date().getTime()-this.lastRequestTime;if(!this.nextHadEvent&&r&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!r,r){if(this.publisher.lastFetchedData=r.detail.fetchedData,r.detail.requestId<this.requestId)return;if(this.resultCount+=((p=r.detail.props)==null?void 0:p.length)||0,!r.detail.isFirstLoad||!((g=r.detail.props)!=null&&g.length)||this.dataProviderExpression.indexOf("$offset")==-1){this.publisher.resultCount=this.resultCount;return}}if(Array.isArray(this.props)){const b=this.props,y=b[b.length-1];t=parseInt(y.offset.toString())+parseInt(y.limit.toString())}else{const b=[];b.resultCount=this.resultCount,b.lastFetchedData=(r==null?void 0:r.detail.fetchedData)||{},this.props=b}i>0&&r&&!this.localStorage&&(this.limit=Math.round(this.limit/i*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let s=this.dataProviderExpression.replace("$offset",t+"").replace("$limit",this.limit+"");const o=s.split("?");let n=o.shift();const a=new URLSearchParams(o.join("?")),c=(v=this.filterPublisher)==null?void 0:v.get(),h=this.filteredFields.split(" ");for(const b in c)this.filteredFields&&h.includes(b)||c[b]==null||c[b]==""||a.set(b,c[b]);this.searchHash||(this.searchHash=a.toString()),n=n+"?"+a.toString(),s=s+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(s);const d=[...this.props,{id:a.toString()+"/"+this.props.length,dataProvider:s,endPoint:n,offset:t,limit:this.limit}];d.resultCount=this.resultCount,d.lastFetchedData=(r==null?void 0:r.detail.fetchedData)||{},this.props=d,this.lastRequestTime=new Date().getTime()}render(){if(this.storeScrollPosition(),!Array.isArray(this.props))return A;let r=!this.noLazyload;return this.props.length==1&&(r=!1),this.style.display="block",m`
|
|
1241
|
+
${ho(this.props,(t,e)=>{var s;const i=e==0?this.templates:(s=this.templates)==null?void 0:s.filter(o=>o.getAttribute("data-value")!="no-item");return m`
|
|
1242
1242
|
<sonic-list
|
|
1243
1243
|
fetch
|
|
1244
1244
|
loader="${this.loader}"
|
|
@@ -1264,28 +1264,28 @@
|
|
|
1264
1264
|
>
|
|
1265
1265
|
</sonic-list>
|
|
1266
1266
|
`})}
|
|
1267
|
-
`}};Q.instanceCounter=0,ot([l({type:Array})],Q.prototype,"templates",2),ot([l({type:Function})],Q.prototype,"items",2),ot([l({type:Function})],Q.prototype,"noItems",2),ot([l({type:Function})],Q.prototype,"skeleton",2),ot([l({type:Object})],Q.prototype,"itemPropertyMap",2),ot([l()],Q.prototype,"cache",2),ot([l()],Q.prototype,"targetRequestDuration",2),ot([l()],Q.prototype,"limit",2),ot([l()],Q.prototype,"lazyBoundsRatio",2),ot([l()],Q.prototype,"offset",2),ot([l()],Q.prototype,"resultCount",2),ot([l({type:Boolean})],Q.prototype,"noLazyload",2),ot([l({type:String})],Q.prototype,"loader",2),ot([l()],Q.prototype,"filteredFields",2),ot([l({type:String})],Q.prototype,"dataProviderExpression",2),ot([l({type:Boolean})],Q.prototype,"invalidateOnPageShow",2),ot([l({type:String})],Q.prototype,"idKey",2),Q=ot([$(tl)],Q);var el=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,je=(r,t,e,i)=>{for(var s=i>1?void 0:i?sl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&el(t,e,s),s};const il="sonic-submit";let ee=class extends G(x){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 r=>{var b;if(this.disabled||r instanceof KeyboardEvent&&r.key!=="Enter")return;r instanceof MouseEvent&&r.stopPropagation();const t=
|
|
1267
|
+
`}};Q.instanceCounter=0,ot([l({type:Array})],Q.prototype,"templates",2),ot([l({type:Function})],Q.prototype,"items",2),ot([l({type:Function})],Q.prototype,"noItems",2),ot([l({type:Function})],Q.prototype,"skeleton",2),ot([l({type:Object})],Q.prototype,"itemPropertyMap",2),ot([l()],Q.prototype,"cache",2),ot([l()],Q.prototype,"targetRequestDuration",2),ot([l()],Q.prototype,"limit",2),ot([l()],Q.prototype,"lazyBoundsRatio",2),ot([l()],Q.prototype,"offset",2),ot([l()],Q.prototype,"resultCount",2),ot([l({type:Boolean})],Q.prototype,"noLazyload",2),ot([l({type:String})],Q.prototype,"loader",2),ot([l()],Q.prototype,"filteredFields",2),ot([l({type:String})],Q.prototype,"dataProviderExpression",2),ot([l({type:Boolean})],Q.prototype,"invalidateOnPageShow",2),ot([l({type:String})],Q.prototype,"idKey",2),Q=ot([$(tl)],Q);var el=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,je=(r,t,e,i)=>{for(var s=i>1?void 0:i?sl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&el(t,e,s),s};const il="sonic-submit";let ee=class extends G(x){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 r=>{var b;if(this.disabled||r instanceof KeyboardEvent&&r.key!=="Enter")return;r instanceof MouseEvent&&r.stopPropagation();const t=T.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(t.isFormValid=!0,t.invalidateForm(),!t.isFormValid.get())return;if(this.disabled=!0,at.show(),t.isFormValid,this.hasAttribute("native")){this.submitNativeForm();return}const i=((b=this.getAttribute("method"))==null?void 0:b.toLocaleLowerCase())||"post",s=this.hasAttribute("sendAsFormData"),o=t.get();delete o.isFormValid;const n=this.getAncestorAttributeValue("headersDataProvider"),a=n?T.getInstance().get(n):null;let c={};a&&(c=a.get());let h=null;const d=this.getAncestorAttributeValue("dataProvider"),p=this.endPoint||d,g=async()=>{var w,S,O,M,q,W,kt,Oo;const y={...o};if(delete y.needsCaptchaValidation,delete c.needsCaptchaValidation,s)h=await((w=this.api)==null?void 0:w.submitFormData(p,y,i,c));else switch(i){case"put":h=await((S=this.api)==null?void 0:S.put(p,y,c));break;case"patch":h=await((O=this.api)==null?void 0:O.patch(p,y,c));break;case"delete":h=await((M=this.api)==null?void 0:M.delete(p,y,c));break;case"get":const ti=new URLSearchParams;if(y)for(const Do in y)ti.append(Do,y[Do]);const Bd="?"+ti.toString();h=await((q=this.api)==null?void 0:q.get(p+Bd,c));break;default:h=await((W=this.api)==null?void 0:W.post(p,y,c));break}at.hide(),h?h._sonic_http_response_&&!h._sonic_http_response_.ok&&Object.keys(h).length===1&&(h.messages=[{content:"Network Error",status:"error"}]):h={messages:[{content:"Network Error",status:"error"}]};const _=this.getAncestorAttributeValue("clearedDataOnSuccess");_&&_.split(" ").forEach(ti=>T.get(ti).set({}));const D=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",f=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";(Oo=(kt=this.api)==null?void 0:kt.lastResult)!=null&&Oo.ok&&y[D]&&y[f]&&this.saveCredentials(y[D],y[f]),this.submitResultKey&&(h=et.traverse(h,this.submitResultKey.split("."),!0));const u=this.getAncestorAttributeValue("submitResultDataProvider");u&&T.get(u).set(h),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:h,bubbles:!0,composed:!0}))},v=a!=null&&a.needsCaptchaValidation.get()?a:t.needsCaptchaValidation.get()?t:null;if(v){v.captchaToken="request_token";const y=_=>{_!="request_token"?(g(),v.captchaToken.offAssign(y)):(at.hide(),this.disabled=!1)};v.captchaToken.onAssign(y)}else g()}}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",this.submit),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",this.submit),super.connectedCallback(),this.api=new Ne(this.getApiConfiguration())}submitNativeForm(){const r=Gt.getClosestForm(this);if(!r)return;const t=this.getAncestorAttributeValue("formDataProvider"),e={...T.get(t).get()};delete e.needsCaptchaValidation;for(const s in e){if(s=="isFormValid")continue;let o=r.querySelector('input[name="'+s+'"], select[name="'+s+'"], textarea[name="'+s+'"]');o||(o=document.createElement("input"),o.type="hidden",o.name=s,r.appendChild(o));let n=e[s];Array.isArray(n)&&(n=n.join(",")),o.type==="checkbox"||o.type==="radio"?n&&(o.checked=!0):o.value=n}const i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",r.appendChild(i),i&&i.click()}async saveCredentials(r,t){if("PasswordCredential"in window){const e=new window.PasswordCredential({id:r,password:t});await navigator.credentials.store(e)}}render(){return m`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};ee.styles=P`
|
|
1268
1268
|
[data-disabled] {
|
|
1269
1269
|
opacity: 0.3;
|
|
1270
1270
|
pointer-events: none;
|
|
1271
1271
|
user-select: none;
|
|
1272
1272
|
}
|
|
1273
|
-
`,je([l({type:String})],ee.prototype,"submitResultKey",2),je([l({type:Boolean})],ee.prototype,"disabled",2),je([l({type:String})],ee.prototype,"endPoint",2),je([l()],ee.prototype,"name",2),je([l()],ee.prototype,"value",2),ee=je([$(il)],ee);var rl=Object.defineProperty,ol=Object.getOwnPropertyDescriptor,ps=(r,t,e,i)=>{for(var s=i>1?void 0:i?ol(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&rl(t,e,s),s};const nl="sonic-router";let Fe=class extends Je(x){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}createRenderRoot(){return this}connectedCallback(){it.onChange(this),super.connectedCallback()}disconnectedCallback(){it.offChange(this),super.disconnectedCallback()}set location(r){this._location=r,this.requestUpdate()}get location(){return this._location}get cleanLocation(){const r=new URL(this.location,document.location.origin);return r.pathname+r.hash}get patternBasePath(){return this.basePath!==void 0?this.basePath:"(/)*"}get regExpBasePath(){return this.basePath!==void 0?"^"+this.basePath:""}handleroutes(){var t;if(!this.routes)return[];const r=[];for(let[e,i]of Object.entries(this.routes)){if(e==="fallback"||!i)continue;const s=new RegExp(this.regExpBasePath+e);if(s.test(this.cleanLocation)){const o=s.exec(this.cleanLocation)||[e];o.shift(),r.push(i([...o]))}else try{const n=new qt(this.patternBasePath+e).match(this.cleanLocation);if(n){const a=n||{};r.push(i(a))}}catch{this.cleanLocation.indexOf((this.basePath||"")+e.replace(document.location.origin,""))!=-1&&r.push(i({}))}}return r.length==0&&(t=this.routes)!=null&&t.fallback&&this.isConnected&&r.push(this.routes.fallback()),r}render(){const r=this.handleroutes();if(r.length>0)return
|
|
1273
|
+
`,je([l({type:String})],ee.prototype,"submitResultKey",2),je([l({type:Boolean})],ee.prototype,"disabled",2),je([l({type:String})],ee.prototype,"endPoint",2),je([l()],ee.prototype,"name",2),je([l()],ee.prototype,"value",2),ee=je([$(il)],ee);var rl=Object.defineProperty,ol=Object.getOwnPropertyDescriptor,ps=(r,t,e,i)=>{for(var s=i>1?void 0:i?ol(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&rl(t,e,s),s};const nl="sonic-router";let Fe=class extends Je(x){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}createRenderRoot(){return this}connectedCallback(){it.onChange(this),super.connectedCallback()}disconnectedCallback(){it.offChange(this),super.disconnectedCallback()}set location(r){this._location=r,this.requestUpdate()}get location(){return this._location}get cleanLocation(){const r=new URL(this.location,document.location.origin);return r.pathname+r.hash}get patternBasePath(){return this.basePath!==void 0?this.basePath:"(/)*"}get regExpBasePath(){return this.basePath!==void 0?"^"+this.basePath:""}handleroutes(){var t;if(!this.routes)return[];const r=[];for(let[e,i]of Object.entries(this.routes)){if(e==="fallback"||!i)continue;const s=new RegExp(this.regExpBasePath+e);if(s.test(this.cleanLocation)){const o=s.exec(this.cleanLocation)||[e];o.shift(),r.push(i([...o]))}else try{const n=new qt(this.patternBasePath+e).match(this.cleanLocation);if(n){const a=n||{};r.push(i(a))}}catch{this.cleanLocation.indexOf((this.basePath||"")+e.replace(document.location.origin,""))!=-1&&r.push(i({}))}}return r.length==0&&(t=this.routes)!=null&&t.fallback&&this.isConnected&&r.push(this.routes.fallback()),r}render(){const r=this.handleroutes();if(r.length>0)return m`${r}`;const t=[];for(const e of this.templatePartsList){const i=e.getAttribute(this.templateValueAttribute)||"";if(new RegExp(this.regExpBasePath+i).test(this.cleanLocation))t.push(e);else try{new qt(this.patternBasePath+i+"(/*)").match(this.cleanLocation)&&(e.setAttribute("mode","patternMatching"),t.push(e))}catch{this.cleanLocation.indexOf((this.basePath||"")+i.replace(document.location.origin,""))!=-1&&t.push(e)}}if(t.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const e=this.templateList.find(i=>i.hasAttribute("data-fallback"));e&&t.push(e)}return m`${Ns(t,(e,i)=>i+new Date().getTime(),e=>{var i;if(e.title&&(document.title=e.title),e.hasAttribute("dataProviderExpression")){let s="";const o=e.getAttribute("dataProviderExpression")||"";if(e.getAttribute("mode")=="patternMatching"){const n=new qt("(/)*"+(e.getAttribute(this.templateValueAttribute)||"")+"*");s=new qt(o).stringify(n.match(this.cleanLocation))}else{const n=new RegExp(e.getAttribute(this.templateValueAttribute)||""),a=(this.cleanLocation+"").match(n);a&&(s=((i=a.shift())==null?void 0:i.replace(n,o))||"")}return m`<div
|
|
1274
1274
|
style="display:contents"
|
|
1275
1275
|
dataProvider="${s}"
|
|
1276
1276
|
>
|
|
1277
1277
|
${Mt(e)}
|
|
1278
|
-
</div>`}return Mt(e)})}`}};ps([l({type:String})],Fe.prototype,"fallBackRoute",2),ps([l({type:Object})],Fe.prototype,"routes",2),ps([l({type:String})],Fe.prototype,"basePath",2),ps([l()],Fe.prototype,"location",1),Fe=ps([$(nl)],Fe);var al=Object.defineProperty,ll=Object.getOwnPropertyDescriptor,cl=(r,t,e,i)=>{for(var s=i>1?void 0:i?ll(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&al(t,e,s),s};const hl="sonic-redirect";let po=class extends G(x){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")){it.changeFromComponent(this);return}if(!this.props)return;const r=this.getAttribute("onData").split("."),t=et.traverse(this.props,r);t&&!(et.isObject(t)&&t)&&it.changeFromComponent(this)}};po=cl([$(hl)],po);var dl=Object.defineProperty,pl=Object.getOwnPropertyDescriptor,
|
|
1278
|
+
</div>`}return Mt(e)})}`}};ps([l({type:String})],Fe.prototype,"fallBackRoute",2),ps([l({type:Object})],Fe.prototype,"routes",2),ps([l({type:String})],Fe.prototype,"basePath",2),ps([l()],Fe.prototype,"location",1),Fe=ps([$(nl)],Fe);var al=Object.defineProperty,ll=Object.getOwnPropertyDescriptor,cl=(r,t,e,i)=>{for(var s=i>1?void 0:i?ll(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&al(t,e,s),s};const hl="sonic-redirect";let po=class extends G(x){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")){it.changeFromComponent(this);return}if(!this.props)return;const r=this.getAttribute("onData").split("."),t=et.traverse(this.props,r);t&&!(et.isObject(t)&&t)&&it.changeFromComponent(this)}};po=cl([$(hl)],po);var dl=Object.defineProperty,pl=Object.getOwnPropertyDescriptor,Hs=(r,t,e,i)=>{for(var s=i>1?void 0:i?pl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&dl(t,e,s),s};const ul="sonic-states";let us=class extends G(Je(x)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onStateAssign=r=>{this.state=r,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 r=this.statePath.split(".");for(const t of r)this.statePublisher=this.statePublisher[t];this.statePublisher.onAssign(this.onStateAssign)}}disconnectedCallback(){var r;this.statePath&&((r=this.statePublisher)==null||r.offAssign(this.onStateAssign)),super.disconnectedCallback()}handleStates(r){var e;if(!this.states)return[];const t=[];for(const[i,s]of Object.entries(this.states)){if(i==="fallback"||!s)continue;const o=new RegExp(i);if(o.test(r)){const n=o.exec(r)||[i];n.shift(),t.push(s([...n]))}else try{const n=new qt("(/)*"+i+"*");if(n.match(r)){const a=n.match(r)||{};t.push(s(a))}}catch{r.indexOf(i.replace(document.location.origin,""))!=-1&&t.push(s({}))}}return t.length==0&&(e=this.states)!=null&&e.fallback&&this.isConnected&&t.push(this.states.fallback()),t}render(){let r=this.state;(!Array.isArray(r)&&et.isObject(r)||r===void 0)&&(r="");const t=this.handleStates(r);if(t.length>0)return m`${t}`;const e=[];for(const i of this.templatePartsList){let s=i.getAttribute(this.templateValueAttribute),o=r;if(this.inverted&&(o=s,s=r),s==""&&(s=this.inverted?".*?":"^$"),new RegExp(s).test(o+""))e.push(i),i.removeAttribute("mode");else{const a=new qt(s);a.names.length>0&&a.match(o)&&(i.setAttribute("mode","patternMatching"),e.push(i))}}return m`${Ns(e,(i,s)=>s+new Date().getTime(),i=>{var s;if(i!=null&&i.hasAttribute("dataProviderExpression")){const o=i.getAttribute("dataProviderExpression");let n="",a=r,c=i.getAttribute(this.templateValueAttribute);if(this.inverted&&(a=c,c=r),c==""&&(c=this.inverted?"*":"^$"),i.getAttribute("mode")=="patternMatching"){const h=new qt(c);n=new qt(o).stringify(h.match(a))}else{const h=new RegExp(c),d=(a+"").match(h);d&&(n=(s=d.shift())==null?void 0:s.replace(h,o))}return m`<div
|
|
1279
1279
|
style="display:contents"
|
|
1280
1280
|
dataProvider="${n}"
|
|
1281
1281
|
>
|
|
1282
1282
|
${Mt(i)}
|
|
1283
|
-
</div>`}return Mt(i)})}`}};Bs([l()],us.prototype,"state",2),Bs([l({type:Boolean,reflect:!0})],us.prototype,"inverted",2),Bs([l({type:Object})],us.prototype,"states",2),us=Bs([$(ul)],us);var fl=Object.defineProperty,gl=Object.getOwnPropertyDescriptor,ml=(r,t,e,i)=>{for(var s=i>1?void 0:i?gl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&fl(t,e,s),s};const bl="sonic-scope";let uo=class extends x{createRenderRoot(){return this}render(){return g`<slot></slot>`}};uo=ml([$(bl)],uo);var vl=Object.defineProperty,yl=Object.getOwnPropertyDescriptor,fo=(r,t,e,i)=>{for(var s=i>1?void 0:i?yl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&vl(t,e,s),s};const _l="sonic-example";let Ni=class extends G(x){constructor(){super(...arguments),this.text="Example"}render(){return g`<div>${this.text}</div>`}};fo([l()],Ni.prototype,"text",2),Ni=fo([$(_l)],Ni);const wl={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 xl{async transform(t,e){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const i in e.library)this.sduiDescriptor.library[i]=e.library[i];for(const i of e.transforms)this.transformAction(i)}transformAction(t){const e=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,e)}getNodesMatchingPatterns(t,e){if(!t)return[];if(!e)return[];const i=e.nodes;if(!i)return[];let s=[],o=0;for(const n of t)for(const a of i)this.nodeMatchesPattern(n,a)&&s.push({parent:e,child:a,index:o}),s=s.concat(this.getNodesMatchingPatterns([n],a)),o++;return s}stringMatchesExpression(t,e){return!e||t&&t.match(e)}nodeMatchesPattern(t,e){const i=t,s=e,o=["libraryKey","innerHTML","prefix","suffix","markup"];for(const c of o)if(!this.stringMatchesExpression(s[c],i[c]))return!1;const n=t.attributes,a=e.attributes;if(n&&!a)return!1;if(n){for(const c in n)if(!a||!this.stringMatchesExpression(a[c],n[c]))return!1}return!0}unwrap(t,e){var i,s;for(const o of e)(i=o.parent.nodes)==null||i.splice(o.parent.nodes.indexOf(o.child),1),o.child.nodes&&((s=o.parent.nodes)==null||s.splice(o.parent.nodes.indexOf(o.child),0,...o.child.nodes))}wrap(t,e){var n,a,c,h,d,p;const i={...t.ui};i.nodes||(i.nodes=[]);let s=0;for(const m of e)(n=i.nodes)==null||n.push(m.child),s>0&&((a=m.parent.nodes)==null||a.splice(m.parent.nodes.indexOf(m.child),1)),s++;const o=(h=(c=e[0])==null?void 0:c.parent.nodes)==null?void 0:h.indexOf(e[0].child);o&&((d=e[0].parent.nodes)==null||d.splice(o,1),(p=e[0].parent.nodes)==null||p.splice(o,0,i))}move(t,e){var i,s;for(const o of e){(i=o.parent.nodes)==null||i.splice(o.parent.nodes.indexOf(o.child),1);let n=[];t.after&&(n=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(n=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const a=n[0];a&&((s=a.parent.nodes)==null||s.splice(a.parent.nodes.indexOf(a.child)+(t.after?1:0),0,o.child))}}remap(t,e){var i,s,o;for(const n of e){const a={...t.ui};a.attributes||(a.attributes={});const c=n.child.attributes;if(c)for(const b in c)Object.prototype.hasOwnProperty.call(a.attributes,"key")||(a.attributes[b]=c[b]);const h=["libraryKey","innerHTML","prefix","suffix","markup"],d=n.child,p=a;for(const b of h)!Object.prototype.hasOwnProperty.call(a,b)&&d[b]&&(p[b]=d[b]);a.nodes||(a.nodes=[]);const m=n.child.nodes;if(m)for(const b of m)a.nodes.push(b);const v=((i=n.parent.nodes)==null?void 0:i.indexOf(n.child))||-1;v!=-1&&((s=n.parent.nodes)==null||s.splice(v,1),(o=n.parent.nodes)==null||o.splice(v,0,a))}}delete(t,e){var i;for(const s of e)(i=s.parent.nodes)==null||i.splice(s.parent.nodes.indexOf(s.child),1)}insert(t,e){var o;const i=t.after?"after":t.before?"before":"in";e=[],t.after?e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(e=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const s=e[0];s&&(i=="in"?(s.child.nodes||(s.child.nodes=[]),s.child.nodes.push({...t.ui})):(o=s.parent.nodes)==null||o.splice(s.parent.nodes.indexOf(s.child)+(i=="after"?1:0),0,{...t.ui}))}}var $l=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor,Ti=(r,t,e,i)=>{for(var s=i>1?void 0:i?Pl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&$l(t,e,s),s};const Cl="sonic-sdui";let qs=class extends ro(te(x)){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(r){this.props==null&&(this.sduiDescriptor={});{const t=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==t)return;this.sduiDescriptor=t,this.updateContents()}super.willUpdate(r)}async updateContents(){if(!this.sduiDescriptor)return;const r={};Object.assign(r,wl,this.sduiDescriptor.library),this.sduiDescriptor.library=r,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter(r=>r.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const r of this.sduiDescriptor.js)Gt.loadJS(r);if(this.sduiDescriptor.css)for(const r of this.sduiDescriptor.css)Gt.loadCSS(r)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await(await fetch(this.getAttribute("transformation"))).json();await new xl().transform(this.sduiDescriptor,t)}async loadLibrary(){if(!this.hasAttribute("library"))return;const t=await(await fetch(this.getAttribute("library"))).json();this.sduiDescriptor.library=t}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let r=this.sduiDescriptor.nodes;r||(r=[]);const t={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(t.attributes={subDataProvider:this.messagesKey}),r.push(t),r.forEach(e=>this.appendChild(this.parseChild(e)))}parseChild(r){const t=r.tagName||"div";let{element:e,contentElement:i}=this.handleLibrary(r,t);return this.handleAttributes(r,e),e=this.handleMarkup(r,e),i||(i=e),this.handleChildNodes(r,i,e),this.handleInnerHTML(r,i),r.prefix||r.suffix?this.handlePrefixSuffix(r,e):e}handlePrefixSuffix(r,t){const e=document.createElement("div");return e.innerHTML=(r.prefix||"")+t.outerHTML+(r.suffix||""),e.style.display="contents",e}handleChildNodes(r,t,e){if(r.nodes){const i=r.nodes;for(const s of i){const o=this.parseChild(s);let n=t;s.parentElementSelector&&(n=e.querySelector(s.parentElementSelector)||t),n.shadowRoot?n.shadowRoot.appendChild(o):n.tagName.toLocaleLowerCase()=="template"?n.content.appendChild(o):n.appendChild(o)}}}handleLibrary(r,t){let e,i;if(r.libraryKey&&this.sduiDescriptor.library){e=this.parseChild(this.sduiDescriptor.library[r.libraryKey]||{tagName:"div"});const s=(this.sduiDescriptor.library[r.libraryKey]||{}).contentElementSelector;s&&(i=e.querySelector(s))}else e=document.createElement(t);return{element:e,contentElement:i}}handleAttributes(r,t){const e=r.attributes;for(const i in e){const s=e[i],o=ts.isObject(s)?JSON.stringify(s):s;t.setAttribute(i,o)}}handleMarkup(r,t){return r.markup&&(t=document.createElement("div"),t.style.display="contents",t.innerHTML=r.markup),t}handleInnerHTML(r,t){var e;if(r.innerHTML)if(r.innerHTML.indexOf("wording_")!=-1){const i=this.getAncestorAttributeValue("wordingProvider");(e=this.api)==null||e.post(i,{labels:[r.innerHTML.substring(8)]}).then(s=>{t&&(t.innerHTML+=s)})}else t&&(t.innerHTML+=r.innerHTML)}};Ti([l()],qs.prototype,"sduiKey",2),Ti([l()],qs.prototype,"messagesKey",2),qs=Ti([$(Cl)],qs);var Al=Object.defineProperty,Sl=Object.getOwnPropertyDescriptor,go=(r,t,e,i)=>{for(var s=i>1?void 0:i?Sl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Al(t,e,s),s};let Ws=class extends te(x){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(r){this._composition=r,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 r=this.listeners;this.listeners=[],r.forEach(t=>{this.publisher.offAssign(t.subscriber)})}parseComposition(r,t){if(r)for(const e in r){const i=r[e];if(typeof i=="string"){const s=i.split("."),o=s.shift();if(!o)continue;let n=rt.get(o);n=ts.traverse(n,s);const a={publisher:n,subscriber:c=>{t[e]=c}};this.listeners.push(a),n.onAssign(a.subscriber),t._proxies_.set(e,n)}else{this.publisher[e]={};const s=new ii({},t);t._proxies_.set(e,s);const o={publisher:s,subscriber:n=>{t[e]=n}};this.listeners.push(o),s.onAssign(o.subscriber),this.parseComposition(i,s)}}}render(){return g`<slot></slot>`}};Ws.styles=[P`
|
|
1283
|
+
</div>`}return Mt(i)})}`}};Hs([l()],us.prototype,"state",2),Hs([l({type:Boolean,reflect:!0})],us.prototype,"inverted",2),Hs([l({type:Object})],us.prototype,"states",2),us=Hs([$(ul)],us);var fl=Object.defineProperty,ml=Object.getOwnPropertyDescriptor,gl=(r,t,e,i)=>{for(var s=i>1?void 0:i?ml(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&fl(t,e,s),s};const bl="sonic-scope";let uo=class extends x{createRenderRoot(){return this}render(){return m`<slot></slot>`}};uo=gl([$(bl)],uo);var vl=Object.defineProperty,yl=Object.getOwnPropertyDescriptor,fo=(r,t,e,i)=>{for(var s=i>1?void 0:i?yl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&vl(t,e,s),s};const _l="sonic-example";let Ni=class extends G(x){constructor(){super(...arguments),this.text="Example"}render(){return m`<div>${this.text}</div>`}};fo([l()],Ni.prototype,"text",2),Ni=fo([$(_l)],Ni);const wl={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 xl{async transform(t,e){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const i in e.library)this.sduiDescriptor.library[i]=e.library[i];for(const i of e.transforms)this.transformAction(i)}transformAction(t){const e=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,e)}getNodesMatchingPatterns(t,e){if(!t)return[];if(!e)return[];const i=e.nodes;if(!i)return[];let s=[],o=0;for(const n of t)for(const a of i)this.nodeMatchesPattern(n,a)&&s.push({parent:e,child:a,index:o}),s=s.concat(this.getNodesMatchingPatterns([n],a)),o++;return s}stringMatchesExpression(t,e){return!e||t&&t.match(e)}nodeMatchesPattern(t,e){const i=t,s=e,o=["libraryKey","innerHTML","prefix","suffix","markup"];for(const c of o)if(!this.stringMatchesExpression(s[c],i[c]))return!1;const n=t.attributes,a=e.attributes;if(n&&!a)return!1;if(n){for(const c in n)if(!a||!this.stringMatchesExpression(a[c],n[c]))return!1}return!0}unwrap(t,e){var i,s;for(const o of e)(i=o.parent.nodes)==null||i.splice(o.parent.nodes.indexOf(o.child),1),o.child.nodes&&((s=o.parent.nodes)==null||s.splice(o.parent.nodes.indexOf(o.child),0,...o.child.nodes))}wrap(t,e){var n,a,c,h,d,p;const i={...t.ui};i.nodes||(i.nodes=[]);let s=0;for(const g of e)(n=i.nodes)==null||n.push(g.child),s>0&&((a=g.parent.nodes)==null||a.splice(g.parent.nodes.indexOf(g.child),1)),s++;const o=(h=(c=e[0])==null?void 0:c.parent.nodes)==null?void 0:h.indexOf(e[0].child);o&&((d=e[0].parent.nodes)==null||d.splice(o,1),(p=e[0].parent.nodes)==null||p.splice(o,0,i))}move(t,e){var i,s;for(const o of e){(i=o.parent.nodes)==null||i.splice(o.parent.nodes.indexOf(o.child),1);let n=[];t.after&&(n=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(n=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const a=n[0];a&&((s=a.parent.nodes)==null||s.splice(a.parent.nodes.indexOf(a.child)+(t.after?1:0),0,o.child))}}remap(t,e){var i,s,o;for(const n of e){const a={...t.ui};a.attributes||(a.attributes={});const c=n.child.attributes;if(c)for(const b in c)Object.prototype.hasOwnProperty.call(a.attributes,"key")||(a.attributes[b]=c[b]);const h=["libraryKey","innerHTML","prefix","suffix","markup"],d=n.child,p=a;for(const b of h)!Object.prototype.hasOwnProperty.call(a,b)&&d[b]&&(p[b]=d[b]);a.nodes||(a.nodes=[]);const g=n.child.nodes;if(g)for(const b of g)a.nodes.push(b);const v=((i=n.parent.nodes)==null?void 0:i.indexOf(n.child))||-1;v!=-1&&((s=n.parent.nodes)==null||s.splice(v,1),(o=n.parent.nodes)==null||o.splice(v,0,a))}}delete(t,e){var i;for(const s of e)(i=s.parent.nodes)==null||i.splice(s.parent.nodes.indexOf(s.child),1)}insert(t,e){var o;const i=t.after?"after":t.before?"before":"in";e=[],t.after?e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(e=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const s=e[0];s&&(i=="in"?(s.child.nodes||(s.child.nodes=[]),s.child.nodes.push({...t.ui})):(o=s.parent.nodes)==null||o.splice(s.parent.nodes.indexOf(s.child)+(i=="after"?1:0),0,{...t.ui}))}}var $l=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor,Ti=(r,t,e,i)=>{for(var s=i>1?void 0:i?Pl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&$l(t,e,s),s};const Cl="sonic-sdui";let qs=class extends ro(te(x)){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(r){this.props==null&&(this.sduiDescriptor={});{const t=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==t)return;this.sduiDescriptor=t,this.updateContents()}super.willUpdate(r)}async updateContents(){if(!this.sduiDescriptor)return;const r={};Object.assign(r,wl,this.sduiDescriptor.library),this.sduiDescriptor.library=r,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter(r=>r.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const r of this.sduiDescriptor.js)Gt.loadJS(r);if(this.sduiDescriptor.css)for(const r of this.sduiDescriptor.css)Gt.loadCSS(r)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await(await fetch(this.getAttribute("transformation"))).json();await new xl().transform(this.sduiDescriptor,t)}async loadLibrary(){if(!this.hasAttribute("library"))return;const t=await(await fetch(this.getAttribute("library"))).json();this.sduiDescriptor.library=t}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let r=this.sduiDescriptor.nodes;r||(r=[]);const t={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(t.attributes={subDataProvider:this.messagesKey}),r.push(t),r.forEach(e=>this.appendChild(this.parseChild(e)))}parseChild(r){const t=r.tagName||"div";let{element:e,contentElement:i}=this.handleLibrary(r,t);return this.handleAttributes(r,e),e=this.handleMarkup(r,e),i||(i=e),this.handleChildNodes(r,i,e),this.handleInnerHTML(r,i),r.prefix||r.suffix?this.handlePrefixSuffix(r,e):e}handlePrefixSuffix(r,t){const e=document.createElement("div");return e.innerHTML=(r.prefix||"")+t.outerHTML+(r.suffix||""),e.style.display="contents",e}handleChildNodes(r,t,e){if(r.nodes){const i=r.nodes;for(const s of i){const o=this.parseChild(s);let n=t;s.parentElementSelector&&(n=e.querySelector(s.parentElementSelector)||t),n.shadowRoot?n.shadowRoot.appendChild(o):n.tagName.toLocaleLowerCase()=="template"?n.content.appendChild(o):n.appendChild(o)}}}handleLibrary(r,t){let e,i;if(r.libraryKey&&this.sduiDescriptor.library){e=this.parseChild(this.sduiDescriptor.library[r.libraryKey]||{tagName:"div"});const s=(this.sduiDescriptor.library[r.libraryKey]||{}).contentElementSelector;s&&(i=e.querySelector(s))}else e=document.createElement(t);return{element:e,contentElement:i}}handleAttributes(r,t){const e=r.attributes;for(const i in e){const s=e[i],o=ts.isObject(s)?JSON.stringify(s):s;t.setAttribute(i,o)}}handleMarkup(r,t){return r.markup&&(t=document.createElement("div"),t.style.display="contents",t.innerHTML=r.markup),t}handleInnerHTML(r,t){var e;if(r.innerHTML)if(r.innerHTML.indexOf("wording_")!=-1){const i=this.getAncestorAttributeValue("wordingProvider");(e=this.api)==null||e.post(i,{labels:[r.innerHTML.substring(8)]}).then(s=>{t&&(t.innerHTML+=s)})}else t&&(t.innerHTML+=r.innerHTML)}};Ti([l()],qs.prototype,"sduiKey",2),Ti([l()],qs.prototype,"messagesKey",2),qs=Ti([$(Cl)],qs);var Al=Object.defineProperty,Sl=Object.getOwnPropertyDescriptor,mo=(r,t,e,i)=>{for(var s=i>1?void 0:i?Sl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Al(t,e,s),s};let Ws=class extends te(x){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(r){this._composition=r,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 r=this.listeners;this.listeners=[],r.forEach(t=>{this.publisher.offAssign(t.subscriber)})}parseComposition(r,t){if(r)for(const e in r){const i=r[e];if(typeof i=="string"){const s=i.split("."),o=s.shift();if(!o)continue;let n=rt.get(o);n=ts.traverse(n,s);const a={publisher:n,subscriber:c=>{t[e]=c}};this.listeners.push(a),n.onAssign(a.subscriber),t._proxies_.set(e,n)}else{this.publisher[e]={};const s=new ii({},t);t._proxies_.set(e,s);const o={publisher:s,subscriber:n=>{t[e]=n}};this.listeners.push(o),s.onAssign(o.subscriber),this.parseComposition(i,s)}}}render(){return m`<slot></slot>`}};Ws.styles=[P`
|
|
1284
1284
|
:host {
|
|
1285
1285
|
display: contents;
|
|
1286
1286
|
}
|
|
1287
|
-
`],
|
|
1288
|
-
><slot name="suffix"></slot>`}};
|
|
1287
|
+
`],mo([l({type:Object})],Ws.prototype,"composition",1),Ws=mo([$("sonic-mix")],Ws);var Ol=Object.defineProperty,Dl=Object.getOwnPropertyDescriptor,kl=(r,t,e,i)=>{for(var s=i>1?void 0:i?Dl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Ol(t,e,s),s};const Ll="sonic-value";let go=class extends te(x){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return typeof this.props=="object"||this.props===void 0?m`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:m`${z(this.props.toString())}<slot name="prefix"></slot><slot></slot
|
|
1288
|
+
><slot name="suffix"></slot>`}};go=kl([$(Ll)],go);var El=Object.defineProperty,Nl=Object.getOwnPropertyDescriptor,Mi=(r,t,e,i)=>{for(var s=i>1?void 0:i?Nl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&El(t,e,s),s};const Tl="sonic-t";let Ks=class extends x{render(){return this.key?m`${pn(this.key,this.unsafeHTML)}`:A}};Mi([l({type:String})],Ks.prototype,"key",2),Mi([l({type:Boolean})],Ks.prototype,"unsafeHTML",2),Ks=Mi([$(Tl)],Ks);var Ml=Object.defineProperty,Il=Object.getOwnPropertyDescriptor,fs=(r,t,e,i)=>{for(var s=i>1?void 0:i?Il(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Ml(t,e,s),s};const jl="sonic-badge";let ye=class extends x{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return m`
|
|
1289
1289
|
<slot name="prefix"></slot>
|
|
1290
1290
|
<slot></slot>
|
|
1291
1291
|
<slot name="suffix"></slot>
|
|
@@ -1429,7 +1429,7 @@
|
|
|
1429
1429
|
slot[name="prefix"] {
|
|
1430
1430
|
flex-shrink: 0;
|
|
1431
1431
|
}
|
|
1432
|
-
`],fs([l({type:String,reflect:!0})],ye.prototype,"type",2),fs([l({type:String,reflect:!0})],ye.prototype,"variant",2),fs([l({type:String,reflect:!0})],ye.prototype,"size",2),fs([l({type:Boolean,reflect:!0})],ye.prototype,"ellipsis",2),ye=fs([$(jl)],ye);class Fl{static fixBlankLink(t){const i=typeof require>"u"||typeof process!="object"?null:require("electron");t.target=="_blank"&&t.addEventListener("click",()=>{i==null||i.shell.openExternal(t.href)})}}var zl=Object.defineProperty,Rl=Object.getOwnPropertyDescriptor,ze=(r,t,e,i)=>{for(var s=i>1?void 0:i?Rl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&zl(t,e,s),s};const Ul="sonic-link";let se=class extends x{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(r){this._location=r,it.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(it.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),this.addEventListener("keypress",r=>{var t,e;r.key==="Enter"&&((e=(t=this.shadowRoot)==null?void 0:t.querySelector("a"))==null||e.click())}),this.setFocusable(),super.connectedCallback()}setFocusable(){this.href?this.setAttribute("tabIndex","0"):this.removeAttribute("tabIndex")}disconnectedCallback(){it.offChange(this),super.disconnectedCallback()}set target(r){this._target=r,Fl.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(r){r.preventDefault(),it.changeFromComponent(this)}updated(r){r.has("href")&&this.setFocusable()}render(){return this.href?
|
|
1432
|
+
`],fs([l({type:String,reflect:!0})],ye.prototype,"type",2),fs([l({type:String,reflect:!0})],ye.prototype,"variant",2),fs([l({type:String,reflect:!0})],ye.prototype,"size",2),fs([l({type:Boolean,reflect:!0})],ye.prototype,"ellipsis",2),ye=fs([$(jl)],ye);class Fl{static fixBlankLink(t){const i=typeof require>"u"||typeof process!="object"?null:require("electron");t.target=="_blank"&&t.addEventListener("click",()=>{i==null||i.shell.openExternal(t.href)})}}var zl=Object.defineProperty,Rl=Object.getOwnPropertyDescriptor,ze=(r,t,e,i)=>{for(var s=i>1?void 0:i?Rl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&zl(t,e,s),s};const Ul="sonic-link";let se=class extends x{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(r){this._location=r,it.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(it.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),this.addEventListener("keypress",r=>{var t,e;r.key==="Enter"&&((e=(t=this.shadowRoot)==null?void 0:t.querySelector("a"))==null||e.click())}),this.setFocusable(),super.connectedCallback()}setFocusable(){this.href?this.setAttribute("tabIndex","0"):this.removeAttribute("tabIndex")}disconnectedCallback(){it.offChange(this),super.disconnectedCallback()}set target(r){this._target=r,Fl.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(r){r.preventDefault(),it.changeFromComponent(this)}updated(r){r.has("href")&&this.setFocusable()}render(){return this.href?m`
|
|
1433
1433
|
<a
|
|
1434
1434
|
href="${this.href}"
|
|
1435
1435
|
aria-label=${this.ariaLabel||A}
|
|
@@ -1438,13 +1438,13 @@
|
|
|
1438
1438
|
>
|
|
1439
1439
|
<slot></slot>
|
|
1440
1440
|
</a>
|
|
1441
|
-
`:
|
|
1441
|
+
`:m`<slot></slot>`}};se.styles=[P`
|
|
1442
1442
|
a {
|
|
1443
1443
|
color: inherit;
|
|
1444
1444
|
text-decoration: none;
|
|
1445
1445
|
display: contents;
|
|
1446
1446
|
}
|
|
1447
|
-
`],ze([l({type:String})],se.prototype,"href",2),ze([l({type:String,attribute:"data-aria-label"})],se.prototype,"ariaLabel",2),ze([l({type:String})],se.prototype,"autoActive",2),ze([l({type:String})],se.prototype,"target",1),ze([l({type:Boolean})],se.prototype,"pushState",2),se=ze([$(Ul)],se);var Vl=Object.defineProperty,
|
|
1447
|
+
`],ze([l({type:String})],se.prototype,"href",2),ze([l({type:String,attribute:"data-aria-label"})],se.prototype,"ariaLabel",2),ze([l({type:String})],se.prototype,"autoActive",2),ze([l({type:String})],se.prototype,"target",1),ze([l({type:Boolean})],se.prototype,"pushState",2),se=ze([$(Ul)],se);var Vl=Object.defineProperty,Bl=Object.getOwnPropertyDescriptor,Re=(r,t,e,i)=>{for(var s=i>1?void 0:i?Bl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Vl(t,e,s),s};const Hl="sonic-progress";let ie=class extends x{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return m`
|
|
1448
1448
|
<progress value=${C(this.value)} max=${this.max}></progress>
|
|
1449
1449
|
<div class="slot-container">
|
|
1450
1450
|
<slot></slot>
|
|
@@ -1468,6 +1468,7 @@
|
|
|
1468
1468
|
}
|
|
1469
1469
|
|
|
1470
1470
|
progress {
|
|
1471
|
+
display: block;
|
|
1471
1472
|
position: relative;
|
|
1472
1473
|
width: 100%;
|
|
1473
1474
|
-webkit-appearance: none;
|
|
@@ -1561,7 +1562,7 @@
|
|
|
1561
1562
|
gap: 0.5em;
|
|
1562
1563
|
margin-top: 0.15em;
|
|
1563
1564
|
}
|
|
1564
|
-
`],Re([l({type:Number})],ie.prototype,"value",2),Re([l({type:Number})],ie.prototype,"max",2),Re([l({type:Boolean})],ie.prototype,"invert",2),Re([l({type:String,reflect:!0})],ie.prototype,"type",2),Re([l({type:String,reflect:!0})],ie.prototype,"size",2),ie=Re([$(
|
|
1565
|
+
`],Re([l({type:Number})],ie.prototype,"value",2),Re([l({type:Number})],ie.prototype,"max",2),Re([l({type:Boolean})],ie.prototype,"invert",2),Re([l({type:String,reflect:!0})],ie.prototype,"type",2),Re([l({type:String,reflect:!0})],ie.prototype,"size",2),ie=Re([$(Hl)],ie);const ql=P`
|
|
1565
1566
|
.password-toggle {
|
|
1566
1567
|
color: var(--sc-input-c);
|
|
1567
1568
|
font-size: var(--sc-input-fs);
|
|
@@ -1952,7 +1953,7 @@
|
|
|
1952
1953
|
* @license
|
|
1953
1954
|
* Copyright 2018 Google LLC
|
|
1954
1955
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1955
|
-
*/const ji=ue(class extends Ee{constructor(r){var t;if(super(r),r.type!==Le.ATTRIBUTE||r.name!=="class"||((t=r.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){var i,s;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!((i=this.nt)!=null&&i.has(o))&&this.st.add(o);return this.render(t)}const e=r.element.classList;for(const o of this.st)o in t||(e.remove(o),this.st.delete(o));for(const o in t){const n=!!t[o];n===this.st.has(o)||(s=this.nt)!=null&&s.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return yt}});var Wl=Object.defineProperty,Kl=Object.getOwnPropertyDescriptor,U=(r,t,e,i)=>{for(var s=i>1?void 0:i?Kl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Wl(t,e,s),s};const Yl="sonic-input";let j=class extends Us(Me(G(x))){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"),this.sameValueAsHandle=t=>this.pattern=this.escapeRegExp(t);const r=this.getFormPublisher();if(!r)return;r[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 r=this.getFormPublisher();if(!r)return;r[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}escapeRegExp(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}willUpdate(r){this.hasSlotOrProps(),this.autoActive&&r.has("value")&&(this.active=!!this.value),super.willUpdate(r)}setSelectionRange(r,t){this.input.setSelectionRange(r,t)}hasSlotOrProps(){var r,t,e,i;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length),this.hasSuffix=!!((e=this.slotSuffixNodes)!=null&&e.length),this.hasPrefix=!!((i=this.slotPrefixNodes)!=null&&i.length)}inlineContentFocus(){var r;!this.inlineContent||this.disableInlineContentFocus||(r=this.input)==null||r.focus()}handleChange(r){if(!this.hasAttribute("inputDelayMs")){super.handleChange(r);return}this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout(()=>super.handleChange(r),parseInt(this.getAttribute("inputDelayMs")))}togglePasswordVisibility(r){r.preventDefault(),r.stopPropagation(),this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const r={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return
|
|
1956
|
+
*/const ji=ue(class extends Ee{constructor(r){var t;if(super(r),r.type!==Le.ATTRIBUTE||r.name!=="class"||((t=r.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){var i,s;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!((i=this.nt)!=null&&i.has(o))&&this.st.add(o);return this.render(t)}const e=r.element.classList;for(const o of this.st)o in t||(e.remove(o),this.st.delete(o));for(const o in t){const n=!!t[o];n===this.st.has(o)||(s=this.nt)!=null&&s.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return yt}});var Wl=Object.defineProperty,Kl=Object.getOwnPropertyDescriptor,U=(r,t,e,i)=>{for(var s=i>1?void 0:i?Kl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Wl(t,e,s),s};const Yl="sonic-input";let j=class extends Us(Me(G(x))){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"),this.sameValueAsHandle=t=>this.pattern=this.escapeRegExp(t);const r=this.getFormPublisher();if(!r)return;r[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 r=this.getFormPublisher();if(!r)return;r[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}escapeRegExp(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}willUpdate(r){this.hasSlotOrProps(),this.autoActive&&r.has("value")&&(this.active=!!this.value),super.willUpdate(r)}setSelectionRange(r,t){this.input.setSelectionRange(r,t)}hasSlotOrProps(){var r,t,e,i;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length),this.hasSuffix=!!((e=this.slotSuffixNodes)!=null&&e.length),this.hasPrefix=!!((i=this.slotPrefixNodes)!=null&&i.length)}inlineContentFocus(){var r;!this.inlineContent||this.disableInlineContentFocus||(r=this.input)==null||r.focus()}handleChange(r){if(!this.hasAttribute("inputDelayMs")){super.handleChange(r);return}this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout(()=>super.handleChange(r),parseInt(this.getAttribute("inputDelayMs")))}togglePasswordVisibility(r){r.preventDefault(),r.stopPropagation(),this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const r={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return m`
|
|
1956
1957
|
<label for="${this.id||"form-element"}" class="${this.hasLabel?"form-label":"hidden"}"
|
|
1957
1958
|
>${this.label?z(this.label):""}<slot
|
|
1958
1959
|
name="label"
|
|
@@ -1993,7 +1994,7 @@
|
|
|
1993
1994
|
.name=${this.name}
|
|
1994
1995
|
.value=${this.value}
|
|
1995
1996
|
/>
|
|
1996
|
-
${this.showPasswordToggle?
|
|
1997
|
+
${this.showPasswordToggle?m`<sonic-button
|
|
1997
1998
|
shape="circle"
|
|
1998
1999
|
class="password-toggle"
|
|
1999
2000
|
@click=${this.togglePasswordVisibility}
|
|
@@ -2014,7 +2015,7 @@
|
|
|
2014
2015
|
name="description"
|
|
2015
2016
|
@slotchange=${this.hasSlotOrProps}
|
|
2016
2017
|
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2017
|
-
>${this.description?
|
|
2018
|
+
>${this.description?m`${z(this.description)}`:A}</slot>
|
|
2018
2019
|
<slot name="list"></slot>
|
|
2019
2020
|
</div>
|
|
2020
2021
|
`}};j.styles=[Nt,Ii,Ys,Zs,ql,P`
|
|
@@ -2025,7 +2026,7 @@
|
|
|
2025
2026
|
:host > .form-control {
|
|
2026
2027
|
position: relative;
|
|
2027
2028
|
}
|
|
2028
|
-
`],U([l({type:String,reflect:!0})],j.prototype,"size",2),U([l({type:String})],j.prototype,"inputmode",2),U([l({type:String})],j.prototype,"list",2),U([l({type:String})],j.prototype,"placeholder",2),U([l({type:String})],j.prototype,"pattern",2),U([l({type:String})],j.prototype,"min",2),U([l({type:String})],j.prototype,"max",2),U([l({type:Boolean,reflect:!0})],j.prototype,"readonly",2),U([l({type:Number})],j.prototype,"step",2),U([l({type:Number})],j.prototype,"minlength",2),U([l({type:Number})],j.prototype,"maxlength",2),U([l({type:String})],j.prototype,"src",2),U([l({type:Boolean,reflect:!0})],j.prototype,"inlineContent",2),U([l({type:Boolean})],j.prototype,"disableInlineContentFocus",2),U([l({type:Boolean})],j.prototype,"showPasswordToggle",2),U([l({type:Boolean})],j.prototype,"autoActive",2),U([l({type:Boolean,reflect:!0})],j.prototype,"active",2),U([ct({slot:"label",flatten:!0})],j.prototype,"slotLabelNodes",2),U([ct({slot:"description",flatten:!0})],j.prototype,"slotDescriptionNodes",2),U([ct({slot:"suffix",flatten:!0})],j.prototype,"slotSuffixNodes",2),U([ct({slot:"prefix",flatten:!0})],j.prototype,"slotPrefixNodes",2),U([De("input")],j.prototype,"input",2),U([
|
|
2029
|
+
`],U([l({type:String,reflect:!0})],j.prototype,"size",2),U([l({type:String})],j.prototype,"inputmode",2),U([l({type:String})],j.prototype,"list",2),U([l({type:String})],j.prototype,"placeholder",2),U([l({type:String})],j.prototype,"pattern",2),U([l({type:String})],j.prototype,"min",2),U([l({type:String})],j.prototype,"max",2),U([l({type:Boolean,reflect:!0})],j.prototype,"readonly",2),U([l({type:Number})],j.prototype,"step",2),U([l({type:Number})],j.prototype,"minlength",2),U([l({type:Number})],j.prototype,"maxlength",2),U([l({type:String})],j.prototype,"src",2),U([l({type:Boolean,reflect:!0})],j.prototype,"inlineContent",2),U([l({type:Boolean})],j.prototype,"disableInlineContentFocus",2),U([l({type:Boolean})],j.prototype,"showPasswordToggle",2),U([l({type:Boolean})],j.prototype,"autoActive",2),U([l({type:Boolean,reflect:!0})],j.prototype,"active",2),U([ct({slot:"label",flatten:!0})],j.prototype,"slotLabelNodes",2),U([ct({slot:"description",flatten:!0})],j.prototype,"slotDescriptionNodes",2),U([ct({slot:"suffix",flatten:!0})],j.prototype,"slotSuffixNodes",2),U([ct({slot:"prefix",flatten:!0})],j.prototype,"slotPrefixNodes",2),U([De("input")],j.prototype,"input",2),U([L()],j.prototype,"hasDescription",2),U([L()],j.prototype,"hasLabel",2),U([L()],j.prototype,"hasSuffix",2),U([L()],j.prototype,"hasPrefix",2),U([L()],j.prototype,"isPassword",2),j=U([$(Yl)],j);const bo=P`
|
|
2029
2030
|
/*OMBRE*/
|
|
2030
2031
|
:host([shadow]) .shadowable,
|
|
2031
2032
|
:host([shadow="md"]) .shadowable,
|
|
@@ -2044,7 +2045,7 @@
|
|
|
2044
2045
|
:host([shadow="none"]) .shadowable {
|
|
2045
2046
|
box-shadow: none;
|
|
2046
2047
|
}
|
|
2047
|
-
`;var Zl=Object.defineProperty,Xl=Object.getOwnPropertyDescriptor,It=(r,t,e,i)=>{for(var s=i>1?void 0:i?Xl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Zl(t,e,s),s};const Gl="sonic-pop";let nt=class extends x{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.ancestorsHavingZIndex=new Set,this._handleKeyDown=r=>{r.key==="Escape"&&this.open&&(r.stopPropagation(),this.hide())}}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame(()=>this.runPositioningLoop()))}toggle(r){if(this.open&&this.noToggle)return;const t=r;r.type=="keydown"&&(t.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=r.target),this.open=!this.open,this.open?this.show():this.hide())}show(){var r,t;this.setMaxZindex(),(t=(r=this.popContent)==null?void 0:r.style)==null||t.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}hide(){this.resetZindexes(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),this.dispatchEvent(new CustomEvent("hide"))}setMaxZindex(){K.everyAncestors(this,r=>{const t=r;if(!t.className)return!0;if([...t.classList].includes("@container")){const e=t.style;e.zIndex="999999999";const i=getComputedStyle(t);return i.position!=="relative"&&i.position!=="absolute"&&(e.position="relative"),this.ancestorsHavingZIndex.add(r),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(r=>{r.style.removeProperty("position"),r.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(r){const t=r.composedPath(),e=t[0];nt.pops.forEach(i=>{const s=t.includes(i),o=t.includes(i.querySelector('[slot="content"]')),n=K.getAncestorAttributeValue(e,"data-on-select")==="keep";r.type=="pointerdown"&&s||r.type=="click"&&(s&&n||!o)||i.hide()})}connectedCallback(){super.connectedCallback(),nt.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",this._handleKeyDown)),nt.pops.add(this)}firstUpdated(r){super.firstUpdated(r),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),super.disconnectedCallback(),nt.pops.delete(this),nt.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",this._handleKeyDown))}computePosition(r){var
|
|
2048
|
+
`;var Zl=Object.defineProperty,Xl=Object.getOwnPropertyDescriptor,It=(r,t,e,i)=>{for(var s=i>1?void 0:i?Xl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Zl(t,e,s),s};const Gl="sonic-pop";let nt=class extends x{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.ancestorsHavingZIndex=new Set,this._handleKeyDown=r=>{r.key==="Escape"&&this.open&&(r.stopPropagation(),this.hide())}}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame(()=>this.runPositioningLoop()))}toggle(r){if(this.open&&this.noToggle)return;const t=r;r.type=="keydown"&&(t.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=r.target),this.open=!this.open,this.open?this.show():this.hide())}show(){var r,t;this.setMaxZindex(),(t=(r=this.popContent)==null?void 0:r.style)==null||t.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}hide(){this.resetZindexes(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),this.dispatchEvent(new CustomEvent("hide"))}setMaxZindex(){K.everyAncestors(this,r=>{const t=r;if(!t.className)return!0;if([...t.classList].includes("@container")){const e=t.style;e.zIndex="999999999";const i=getComputedStyle(t);return i.position!=="relative"&&i.position!=="absolute"&&(e.position="relative"),this.ancestorsHavingZIndex.add(r),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(r=>{r.style.removeProperty("position"),r.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(r){const t=r.composedPath(),e=t[0];nt.pops.forEach(i=>{const s=t.includes(i),o=t.includes(i.querySelector('[slot="content"]')),n=K.getAncestorAttributeValue(e,"data-on-select")==="keep";r.type=="pointerdown"&&s||r.type=="click"&&(s&&n||!o)||i.hide()})}connectedCallback(){super.connectedCallback(),nt.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",this._handleKeyDown)),nt.pops.add(this)}firstUpdated(r){super.firstUpdated(r),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),super.disconnectedCallback(),nt.pops.delete(this),nt.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",this._handleKeyDown))}computePosition(r){var M,q,W,kt;const t=r.split(" "),e=t[0];let i=t[1];const s=5,o=this.getBoundingClientRect(),n=K.getScrollableAncestor(this.popContent),a=n==null?void 0:n.getBoundingClientRect(),c=Math.max(0,(a==null?void 0:a.left)||0)+s,h=Math.max(0,(a==null?void 0:a.top)||0)+s,d=Math.min(window.innerWidth,(a==null?void 0:a.right)||window.innerWidth)-s,p=Math.min(window.innerHeight,(a==null?void 0:a.bottom)||window.innerHeight)-s,g=o.left,v=o.top;let b=g,y=v,_=(M=this.popContent)==null?void 0:M.getBoundingClientRect();const D=v-_.height,f=g-_.width,u=g+o.width,w=v+o.height,S=g+(o.width-_.width)*.5,O=v+(o.height-_.height)*.5;switch(e){case"bottom":y=w,i=="center"&&(b=S);break;case"top":y=D,i=="center"&&(b=S);break;case"left":b=f,i=="center"&&(y=O);break;case"right":b=u,i=="center"&&(y=O);break}this.lastContentX+=b-_.x,this.lastContentY+=y-_.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),_=(q=this.popContent)==null?void 0:q.getBoundingClientRect(),_.x<c&&e=="left"&&(b=u),_.y<h&&e=="top"&&(y=w),_.x+_.width>d&&e=="right"&&(b=f),_.y+_.height>p&&e=="bottom"&&(y=D),this.lastContentX+=b-_.x,this.lastContentY+=y-_.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),_=(W=this.popContent)==null?void 0:W.getBoundingClientRect(),_.x<c&&(this.lastContentX+=c-_.x),_.y<h&&(this.lastContentY+=h-_.y),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),_=(kt=this.popContent)==null?void 0:kt.getBoundingClientRect(),_.x+_.width>d&&(this.lastContentX+=d-(_.x+_.width)),_.y+_.height>p&&(this.lastContentY+=p-(_.y+_.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return m`
|
|
2048
2049
|
<slot
|
|
2049
2050
|
@click=${this.manual?()=>{}:this.toggle}
|
|
2050
2051
|
@keydown=${this.manual?()=>{}:this.toggle}
|
|
@@ -2090,11 +2091,11 @@
|
|
|
2090
2091
|
:host([inline]) {
|
|
2091
2092
|
vertical-align: baseline;
|
|
2092
2093
|
}
|
|
2093
|
-
`,bo],It([
|
|
2094
|
+
`,bo],It([L()],nt.prototype,"open",2),It([De("slot:not([name=content])")],nt.prototype,"popBtn",2),It([De("slot[name=content]")],nt.prototype,"popContent",2),It([l({type:Boolean})],nt.prototype,"noToggle",2),It([l({type:Boolean,reflect:!0})],nt.prototype,"inline",2),It([l({type:Boolean})],nt.prototype,"manual",2),It([l({type:String,reflect:!0})],nt.prototype,"shadow",2),It([l({type:String})],nt.prototype,"placement",2),It([L()],nt.prototype,"triggerElement",2),nt=It([$(Gl)],nt);var Ql=Object.defineProperty,Jl=Object.getOwnPropertyDescriptor,tc=(r,t,e,i)=>{for(var s=i>1?void 0:i?Jl(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Ql(t,e,s),s};const ec="sonic-menu-item";let vo=class extends I{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="default"),this.hasAttribute("shape")||(this.shape="block");const r=this.shape==="square"||this.shape==="circle";!this.hasAttribute("align")&&!r&&(this.align="left"),super.connectedCallback()}};vo=tc([$(ec)],vo);/**
|
|
2094
2095
|
* @license
|
|
2095
2096
|
* Copyright 2021 Google LLC
|
|
2096
2097
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2097
|
-
*/class yo{constructor(t,{target:e,config:i,callback:s,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,e!==null&&this.t.add(e??t),this.l=i,this.o=o??this.o,this.callback=s,window.ResizeObserver?(this.u=new ResizeObserver(n=>{this.handleChanges(n),this.h.requestUpdate()}),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var e;this.value=(e=this.callback)==null?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var sc=Object.defineProperty,ic=Object.getOwnPropertyDescriptor,ut=(r,t,e,i)=>{for(var s=i>1?void 0:i?ic(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&sc(t,e,s),s};let lt=class extends Li(no(oo(te(x)))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.minSearchLength=0,this.key="",this.searchParameter="",this.propertyName="",this.hasInputPrefix=!1,this._resizeController=new yo(this,{}),this.isPopVisible=!1,this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=r=>{var e;if(r==""&&this.isSearchParameter()){this.lastValidSearch="";return}this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)===!1&&this.isSearchParameter()&&(this.lastValidSearch=r,(e=this.searchPublisher)==null||e.set(this.lastValidSearch))},this.updatePopContentVisibility=r=>{this.isPopVisible=((r==null?void 0:r.length)||0)>=this.minSearchLength},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=r=>{var e;const t=this.propertyName==="_self"?r:r[this.propertyName||this.name];(e=this.formValuePublisher)==null||e.set(t)},this.findSearchedItem=r=>{var e;return(this.propertyName==="_self"?r:r[this.propertyName||this.searchParameter||this.name])==((e=this.searchPublisher)==null?void 0:e.get())},this.findSelection=r=>(this.propertyName==="_self"?r:r[this.propertyName||this.name])==this.value,this.setSearchFromSelection=r=>{var t;this.lastValidSearch=this.propertyName==="_self"?r:r[this.searchParameter||this.propertyName||this.name],this.isSearchParameter()&&((t=this.searchPublisher)==null||t.set(this.lastValidSearch))},this.updateActiveSelection=()=>{var r,t,e;this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=((r=this.searchPublisher)==null?void 0:r.get())&&((t=this.formValuePublisher)!=null&&t.get())&&((e=this.formValuePublisher)==null||e.set(""))}}hasSlotOrProps(){var r;this.hasInputPrefix=!!((r=this.slotInputPrefixNodes)!=null&&r.length)}isSearchParameter(){return!this.searchParameter||this.searchParameter===this.name}connectedCallback(){var s,o,n,a;super.connectedCallback();const r=this.searchParameter||this.name,t=this.getAncestorAttributeValue("formDataProvider"),e=t+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${e}_init_search__`,this.initQueueDataProvider=`${e}_init_queue__`,this.searchDataProvider=`${e}_search__`,this.queueDataProvider=`${e}_queue__`;const i=rt.get;this.searchPublisher=i(this.searchDataProvider)[r],this.formValuePublisher=pt(i(t),this.name),this.countPublisher=i(this.queueDataProvider).resultCount,this.initCountPublisher=i(this.initQueueDataProvider).resultCount,this.value&&(rt.get(this.initSearchDataProvider)[this.name]=this.value),(s=this.initCountPublisher)==null||s.onAssign(this.initSearchParameter),(o=this.formValuePublisher)==null||o.onAssign(this.updateSearchParameter),(n=this.countPublisher)==null||n.onAssign(this.updateActiveSelection),(a=this.searchPublisher)==null||a.onAssign(this.updatePopContentVisibility)}disconnectedCallback(){var t,e,i,s;super.disconnectedCallback(),(t=this.initCountPublisher)==null||t.offAssign(this.initSearchParameter),(e=this.formValuePublisher)==null||e.offAssign(this.updateSearchParameter),(i=this.countPublisher)==null||i.offAssign(this.updateActiveSelection);const r=rt.get;r(this.initSearchDataProvider).delete(),r(this.initQueueDataProvider).delete(),r(this.searchDataProvider).delete(),r(this.queueDataProvider).delete(),(s=this.searchPublisher)==null||s.offAssign(this.updatePopContentVisibility)}queryQueueListItem(r,t,e){const i=rt.get(r);let s,o=i.get();if(!o||!Array.isArray(o)||!o.length)return!1;for(const n of o){let a=rt.get(n.dataProvider).get();if(Array.isArray(a)&&(s=a.find(t),s))break}return s?(e(s),!0):!1}setSelectionRange(r,t){var e;(e=this.querySelector("sonic-input"))==null||e.setSelectionRange(r,t)}handleHide(){var r,t,e;if(this.select){if(((r=this.searchPublisher)==null?void 0:r.get())==""){this.lastValidSearch="",(t=this.formValuePublisher)==null||t.set("");return}(e=this.searchPublisher)==null||e.set(this.lastValidSearch)}}getInputValue(){var r;return this.isSearchParameter()?(r=this.searchPublisher)==null?void 0:r.get():this.lastValidSearch}render(){return
|
|
2098
|
+
*/class yo{constructor(t,{target:e,config:i,callback:s,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,e!==null&&this.t.add(e??t),this.l=i,this.o=o??this.o,this.callback=s,window.ResizeObserver?(this.u=new ResizeObserver(n=>{this.handleChanges(n),this.h.requestUpdate()}),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var e;this.value=(e=this.callback)==null?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var sc=Object.defineProperty,ic=Object.getOwnPropertyDescriptor,ut=(r,t,e,i)=>{for(var s=i>1?void 0:i?ic(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&sc(t,e,s),s};let lt=class extends Li(no(oo(te(x)))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.minSearchLength=0,this.key="",this.searchParameter="",this.propertyName="",this.hasInputPrefix=!1,this._resizeController=new yo(this,{}),this.isPopVisible=!1,this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=r=>{var e;if(r==""&&this.isSearchParameter()){this.lastValidSearch="";return}this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)===!1&&this.isSearchParameter()&&(this.lastValidSearch=r,(e=this.searchPublisher)==null||e.set(this.lastValidSearch))},this.updatePopContentVisibility=r=>{this.isPopVisible=((r==null?void 0:r.length)||0)>=this.minSearchLength},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=r=>{var e;const t=this.propertyName==="_self"?r:r[this.propertyName||this.name];(e=this.formValuePublisher)==null||e.set(t)},this.findSearchedItem=r=>{var e;return(this.propertyName==="_self"?r:r[this.propertyName||this.searchParameter||this.name])==((e=this.searchPublisher)==null?void 0:e.get())},this.findSelection=r=>(this.propertyName==="_self"?r:r[this.propertyName||this.name])==this.value,this.setSearchFromSelection=r=>{var t;this.lastValidSearch=this.propertyName==="_self"?r:r[this.searchParameter||this.propertyName||this.name],this.isSearchParameter()&&((t=this.searchPublisher)==null||t.set(this.lastValidSearch))},this.updateActiveSelection=()=>{var r,t,e;this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=((r=this.searchPublisher)==null?void 0:r.get())&&((t=this.formValuePublisher)!=null&&t.get())&&((e=this.formValuePublisher)==null||e.set(""))}}hasSlotOrProps(){var r;this.hasInputPrefix=!!((r=this.slotInputPrefixNodes)!=null&&r.length)}isSearchParameter(){return!this.searchParameter||this.searchParameter===this.name}connectedCallback(){var s,o,n,a;super.connectedCallback();const r=this.searchParameter||this.name,t=this.getAncestorAttributeValue("formDataProvider"),e=t+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${e}_init_search__`,this.initQueueDataProvider=`${e}_init_queue__`,this.searchDataProvider=`${e}_search__`,this.queueDataProvider=`${e}_queue__`;const i=rt.get;this.searchPublisher=i(this.searchDataProvider)[r],this.formValuePublisher=pt(i(t),this.name),this.countPublisher=i(this.queueDataProvider).resultCount,this.initCountPublisher=i(this.initQueueDataProvider).resultCount,this.value&&(rt.get(this.initSearchDataProvider)[this.name]=this.value),(s=this.initCountPublisher)==null||s.onAssign(this.initSearchParameter),(o=this.formValuePublisher)==null||o.onAssign(this.updateSearchParameter),(n=this.countPublisher)==null||n.onAssign(this.updateActiveSelection),(a=this.searchPublisher)==null||a.onAssign(this.updatePopContentVisibility)}disconnectedCallback(){var t,e,i,s;super.disconnectedCallback(),(t=this.initCountPublisher)==null||t.offAssign(this.initSearchParameter),(e=this.formValuePublisher)==null||e.offAssign(this.updateSearchParameter),(i=this.countPublisher)==null||i.offAssign(this.updateActiveSelection);const r=rt.get;r(this.initSearchDataProvider).delete(),r(this.initQueueDataProvider).delete(),r(this.searchDataProvider).delete(),r(this.queueDataProvider).delete(),(s=this.searchPublisher)==null||s.offAssign(this.updatePopContentVisibility)}queryQueueListItem(r,t,e){const i=rt.get(r);let s,o=i.get();if(!o||!Array.isArray(o)||!o.length)return!1;for(const n of o){let a=rt.get(n.dataProvider).get();if(Array.isArray(a)&&(s=a.find(t),s))break}return s?(e(s),!0):!1}setSelectionRange(r,t){var e;(e=this.querySelector("sonic-input"))==null||e.setSelectionRange(r,t)}handleHide(){var r,t,e;if(this.select){if(((r=this.searchPublisher)==null?void 0:r.get())==""){this.lastValidSearch="",(t=this.formValuePublisher)==null||t.set("");return}(e=this.searchPublisher)==null||e.set(this.lastValidSearch)}}getInputValue(){var r;return this.isSearchParameter()?(r=this.searchPublisher)==null?void 0:r.get():this.lastValidSearch}render(){return m`
|
|
2098
2099
|
<sonic-pop noToggle style="display:block;" @hide=${this.handleHide}>
|
|
2099
2100
|
<sonic-input
|
|
2100
2101
|
class="form-element"
|
|
@@ -2121,7 +2122,7 @@
|
|
|
2121
2122
|
@slotchange=${this.hasSlotOrProps}
|
|
2122
2123
|
></slot>
|
|
2123
2124
|
|
|
2124
|
-
${this.select?
|
|
2125
|
+
${this.select?m`
|
|
2125
2126
|
<sonic-icon
|
|
2126
2127
|
slot="suffix"
|
|
2127
2128
|
class="select-chevron"
|
|
@@ -2179,7 +2180,7 @@
|
|
|
2179
2180
|
min-width: 14rem;
|
|
2180
2181
|
width: 100%;
|
|
2181
2182
|
}
|
|
2182
|
-
`],ut([l({type:String})],lt.prototype,"size",2),ut([l({type:String})],lt.prototype,"placeholder",2),ut([l()],lt.prototype,"filteredFields",2),ut([l({type:Boolean,reflect:!0})],lt.prototype,"readonly",2),ut([l({type:String})],lt.prototype,"dataProviderExpression",2),ut([l({type:Number})],lt.prototype,"minSearchLength",2),ut([l({type:Boolean})],lt.prototype,"select",2),ut([l({type:String})],lt.prototype,"key",2),ut([l({type:String})],lt.prototype,"searchParameter",2),ut([l({type:String})],lt.prototype,"propertyName",2),ut([ct({slot:"prefix",flatten:!0})],lt.prototype,"slotInputPrefixNodes",2),ut([
|
|
2183
|
+
`],ut([l({type:String})],lt.prototype,"size",2),ut([l({type:String})],lt.prototype,"placeholder",2),ut([l()],lt.prototype,"filteredFields",2),ut([l({type:Boolean,reflect:!0})],lt.prototype,"readonly",2),ut([l({type:String})],lt.prototype,"dataProviderExpression",2),ut([l({type:Number})],lt.prototype,"minSearchLength",2),ut([l({type:Boolean})],lt.prototype,"select",2),ut([l({type:String})],lt.prototype,"key",2),ut([l({type:String})],lt.prototype,"searchParameter",2),ut([l({type:String})],lt.prototype,"propertyName",2),ut([ct({slot:"prefix",flatten:!0})],lt.prototype,"slotInputPrefixNodes",2),ut([L()],lt.prototype,"hasInputPrefix",2),ut([L()],lt.prototype,"isPopVisible",2),ut([L()],lt.prototype,"lastValidSearch",2),lt=ut([$("sonic-input-autocomplete")],lt);var rc=Object.defineProperty,oc=Object.getOwnPropertyDescriptor,ft=(r,t,e,i)=>{for(var s=i>1?void 0:i?oc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&rc(t,e,s),s};const nc="sonic-password-helper";let ht=class extends te(x){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=t=>{t?(this.hasNoChar=t.length==0,this.hasEnoughChars=t.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(t),this.hasMajuscule=/[A-Z]/.test(t),this.hasNumber=/[0-9]/.test(t),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(t)},rt.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&rt.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(t){return t?m`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:m`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?A:m`
|
|
2183
2184
|
<div>${this.wording_password_helper_decription}</div>
|
|
2184
2185
|
<div>
|
|
2185
2186
|
${this.getIcon(this.hasEnoughChars)}
|
|
@@ -2200,11 +2201,11 @@
|
|
|
2200
2201
|
${this.getIcon(this.hasSpecialChar)}
|
|
2201
2202
|
${this.wording_password_helper_special_char}
|
|
2202
2203
|
</div>
|
|
2203
|
-
`}};ft([l()],ht.prototype,"name",2),ft([l()],ht.prototype,"minChars",2),ft([
|
|
2204
|
+
`}};ft([l()],ht.prototype,"name",2),ft([l()],ht.prototype,"minChars",2),ft([L()],ht.prototype,"hasNoChar",2),ft([L()],ht.prototype,"hasEnoughChars",2),ft([L()],ht.prototype,"hasMinuscule",2),ft([L()],ht.prototype,"hasMajuscule",2),ft([L()],ht.prototype,"hasNumber",2),ft([L()],ht.prototype,"hasSpecialChar",2),ft([l()],ht.prototype,"wording_password_helper_decription",2),ft([l()],ht.prototype,"wording_password_helper_min_length",2),ft([l()],ht.prototype,"wording_password_helper_lower_case",2),ft([l()],ht.prototype,"wording_password_helper_upper_case",2),ft([l()],ht.prototype,"wording_password_helper_number",2),ft([l()],ht.prototype,"wording_password_helper_special_char",2),ht=ft([$(nc)],ht);var ac=Object.defineProperty,lc=Object.getOwnPropertyDescriptor,_e=(r,t,e,i)=>{for(var s=i>1?void 0:i?lc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&ac(t,e,s),s};const cc="sonic-same-value-helper";let re=class extends te(x){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const r=rt.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=t=>{t?this.hasNoChar=t.length==0:this.hasNoChar=!0,this.name&&this.sameValueAs&&(this.areEqual=pt(r,this.name).get()==pt(r,this.sameValueAs).get())},pt(r,this.name).onAssign(this.checkValue),pt(r,this.sameValueAs).onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const r=rt.get(this.getAncestorAttributeValue("formDataProvider"));pt(r,this.name).offAssign(this.checkValue),pt(r,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?A:m`
|
|
2204
2205
|
<span>
|
|
2205
2206
|
${this.areEqual?z(this.descriptionWhenEqual):z(this.descriptionWhenNotEqual)}
|
|
2206
2207
|
</span>
|
|
2207
|
-
`}};_e([l()],re.prototype,"name",2),_e([l()],re.prototype,"sameValueAs",2),_e([l()],re.prototype,"descriptionWhenEqual",2),_e([l()],re.prototype,"descriptionWhenNotEqual",2),_e([
|
|
2208
|
+
`}};_e([l()],re.prototype,"name",2),_e([l()],re.prototype,"sameValueAs",2),_e([l()],re.prototype,"descriptionWhenEqual",2),_e([l()],re.prototype,"descriptionWhenNotEqual",2),_e([L()],re.prototype,"areEqual",2),_e([L()],re.prototype,"hasNoChar",2),re=_e([$(cc)],re);var hc=Object.defineProperty,dc=Object.getOwnPropertyDescriptor,Wt=(r,t,e,i)=>{for(var s=i>1?void 0:i?dc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&hc(t,e,s),s};const pc="sonic-checkbox";let mt=class extends wi(Us(Me(G(x)))){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(r){this.hasSlotOrProps(),super.willUpdate(r)}hasSlotOrProps(){var r,t;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length)}render(){return m`
|
|
2208
2209
|
<label class="checkbox-container ${this.disabled?"disabled":""}">
|
|
2209
2210
|
|
|
2210
2211
|
<span class="icon-container">
|
|
@@ -2228,11 +2229,11 @@
|
|
|
2228
2229
|
<div class="checkbox-text ${!this.hasDescription&&!this.hasLabel?"hidden":"checkbox-text"}">
|
|
2229
2230
|
${this.label?z(this.label):""}
|
|
2230
2231
|
<slot @slotchange=${this.hasSlotOrProps}></slot>
|
|
2231
|
-
<slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?
|
|
2232
|
+
<slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?m`${z(this.description)}`:""}</slot>
|
|
2232
2233
|
</div>
|
|
2233
2234
|
</label>
|
|
2234
2235
|
</label>
|
|
2235
|
-
`}};
|
|
2236
|
+
`}};mt.styles=[Nt,P`
|
|
2236
2237
|
:host {
|
|
2237
2238
|
--sc-checkbox-border-width: var(--sc-form-border-width);
|
|
2238
2239
|
--sc-checkbox-border-color: var(
|
|
@@ -2354,7 +2355,7 @@
|
|
|
2354
2355
|
.hidden {
|
|
2355
2356
|
display: none;
|
|
2356
2357
|
}
|
|
2357
|
-
`],Wt([l({type:Boolean,reflect:!0})],
|
|
2358
|
+
`],Wt([l({type:Boolean,reflect:!0})],mt.prototype,"touched",2),Wt([l({type:String})],mt.prototype,"iconName",2),Wt([l({type:String})],mt.prototype,"indeterminateIconName",2),Wt([l({type:Boolean})],mt.prototype,"showAsIndeterminate",2),Wt([l({type:Boolean})],mt.prototype,"hasDescription",2),Wt([l({type:Boolean})],mt.prototype,"hasLabel",2),Wt([ct({flatten:!0})],mt.prototype,"slotLabelNodes",2),Wt([ct({slot:"description",flatten:!0})],mt.prototype,"slotDescriptionNodes",2),mt=Wt([$(pc)],mt);var uc=Object.defineProperty,fc=Object.getOwnPropertyDescriptor,mc=(r,t,e,i)=>{for(var s=i>1?void 0:i?fc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&uc(t,e,s),s};const gc="sonic-radio";let Fi=class extends mt{constructor(){super(),this.radio=!0}connectedCallback(){super.connectedCallback(),this.type="radio"}};Fi.styles=[mt.styles,P`
|
|
2358
2359
|
:host input {
|
|
2359
2360
|
border-radius: 50%;
|
|
2360
2361
|
}
|
|
@@ -2370,7 +2371,7 @@
|
|
|
2370
2371
|
width: 0.6em;
|
|
2371
2372
|
width: round(0.6em, 1px);
|
|
2372
2373
|
}
|
|
2373
|
-
`],Fi=
|
|
2374
|
+
`],Fi=mc([$(gc)],Fi);var bc=Object.defineProperty,vc=Object.getOwnPropertyDescriptor,yc=(r,t,e,i)=>{for(var s=i>1?void 0:i?vc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&bc(t,e,s),s};const _c="sonic-switch";let zi=class extends mt{constructor(){super(),this.unique=!0}};zi.styles=[mt.styles,P`
|
|
2374
2375
|
sonic-icon {
|
|
2375
2376
|
display: none;
|
|
2376
2377
|
}
|
|
@@ -2435,7 +2436,7 @@
|
|
|
2435
2436
|
input + sonic-icon {
|
|
2436
2437
|
display: none;
|
|
2437
2438
|
}
|
|
2438
|
-
`],zi=yc([$(_c)],zi);var wc=Object.defineProperty,xc=Object.getOwnPropertyDescriptor,J=(r,t,e,i)=>{for(var s=i>1?void 0:i?xc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&wc(t,e,s),s};const $c="sonic-select";let Z=class extends Me(G(x)){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 r=this.querySelectorAll("option");r.length>0&&(this.options=Array.from(r).map(t=>({value:t.value,wording:t.text,selected:t.hasAttribute("selected")})))},this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(r){this._options=r;for(const e of r)e.selected&&(this.value=e[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(r){this.hasDoneFirstUpdate=!0,super.firstUpdated(r)}set value(r){r==null&&!this.hasDoneFirstUpdate||(r||(r=""),this._value!=r&&(this._value=r,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(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()}willUpdate(r){this.hasSlotOrProps(),super.willUpdate(r)}hasSlotOrProps(){var r,t,e,i;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length),this.hasSuffix=!!((e=this.slotSuffixNodes)!=null&&e.length),this.hasPrefix=!!((i=this.slotPrefixNodes)!=null&&i.length)}validateFormElement(){var e;const r=(e=this.shadowRoot)==null?void 0:e.querySelector("select");if(!r||r.checkValidity())return;const t=this.getFormPublisher();t&&(t.isFormValid=!1),r.reportValidity()}render(){const r={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return
|
|
2439
|
+
`],zi=yc([$(_c)],zi);var wc=Object.defineProperty,xc=Object.getOwnPropertyDescriptor,J=(r,t,e,i)=>{for(var s=i>1?void 0:i?xc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&wc(t,e,s),s};const $c="sonic-select";let Z=class extends Me(G(x)){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 r=this.querySelectorAll("option");r.length>0&&(this.options=Array.from(r).map(t=>({value:t.value,wording:t.text,selected:t.hasAttribute("selected")})))},this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(r){this._options=r;for(const e of r)e.selected&&(this.value=e[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(r){this.hasDoneFirstUpdate=!0,super.firstUpdated(r)}set value(r){r==null&&!this.hasDoneFirstUpdate||(r||(r=""),this._value!=r&&(this._value=r,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(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()}willUpdate(r){this.hasSlotOrProps(),super.willUpdate(r)}hasSlotOrProps(){var r,t,e,i;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length),this.hasSuffix=!!((e=this.slotSuffixNodes)!=null&&e.length),this.hasPrefix=!!((i=this.slotPrefixNodes)!=null&&i.length)}validateFormElement(){var e;const r=(e=this.shadowRoot)==null?void 0:e.querySelector("select");if(!r||r.checkValidity())return;const t=this.getFormPublisher();t&&(t.isFormValid=!1),r.reportValidity()}render(){const r={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return m`
|
|
2439
2440
|
<label
|
|
2440
2441
|
for="form-element"
|
|
2441
2442
|
class="${this.hasLabel?"form-label":"hidden"}"
|
|
@@ -2463,7 +2464,7 @@
|
|
|
2463
2464
|
aria-label=${C(this.ariaLabel)}
|
|
2464
2465
|
aria-labelledby=${C(this.ariaLabelledby)}
|
|
2465
2466
|
>
|
|
2466
|
-
${Ns(this.options,t=>t[this.valueKey],t=>{const e=this.value==t[this.valueKey];return
|
|
2467
|
+
${Ns(this.options,t=>t[this.valueKey],t=>{const e=this.value==t[this.valueKey];return m`<option
|
|
2467
2468
|
?selected=${e}
|
|
2468
2469
|
value="${t[this.valueKey]}"
|
|
2469
2470
|
>
|
|
@@ -2484,7 +2485,7 @@
|
|
|
2484
2485
|
name="description"
|
|
2485
2486
|
@slotchange=${this.hasSlotOrProps}
|
|
2486
2487
|
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2487
|
-
>${this.description?
|
|
2488
|
+
>${this.description?m`${z(this.description)}`:""}</slot
|
|
2488
2489
|
>
|
|
2489
2490
|
`}};Z.styles=[Nt,Ii,Ys,Zs,P`
|
|
2490
2491
|
.form-element {
|
|
@@ -2539,7 +2540,7 @@
|
|
|
2539
2540
|
:host([multiple]) sonic-icon {
|
|
2540
2541
|
display: none !important;
|
|
2541
2542
|
}
|
|
2542
|
-
`],J([l({type:String})],Z.prototype,"valueKey",2),J([l({type:String})],Z.prototype,"wordingKey",2),J([l({type:Boolean})],Z.prototype,"multiple",2),J([l({type:String,reflect:!0})],Z.prototype,"size",2),J([l({type:Number})],Z.prototype,"selectSize",2),J([l({type:String,reflect:!0})],Z.prototype,"status",2),J([l({type:Array})],Z.prototype,"options",1),J([l({reflect:!0})],Z.prototype,"value",1),J([l({type:Boolean})],Z.prototype,"forceAutoFill",2),J([l()],Z.prototype,"description",1),J([l()],Z.prototype,"label",1),J([ct({slot:"label",flatten:!0})],Z.prototype,"slotLabelNodes",2),J([ct({slot:"description",flatten:!0})],Z.prototype,"slotDescriptionNodes",2),J([ct({slot:"suffix",flatten:!0})],Z.prototype,"slotSuffixNodes",2),J([ct({slot:"prefix",flatten:!0})],Z.prototype,"slotPrefixNodes",2),J([
|
|
2543
|
+
`],J([l({type:String})],Z.prototype,"valueKey",2),J([l({type:String})],Z.prototype,"wordingKey",2),J([l({type:Boolean})],Z.prototype,"multiple",2),J([l({type:String,reflect:!0})],Z.prototype,"size",2),J([l({type:Number})],Z.prototype,"selectSize",2),J([l({type:String,reflect:!0})],Z.prototype,"status",2),J([l({type:Array})],Z.prototype,"options",1),J([l({reflect:!0})],Z.prototype,"value",1),J([l({type:Boolean})],Z.prototype,"forceAutoFill",2),J([l()],Z.prototype,"description",1),J([l()],Z.prototype,"label",1),J([ct({slot:"label",flatten:!0})],Z.prototype,"slotLabelNodes",2),J([ct({slot:"description",flatten:!0})],Z.prototype,"slotDescriptionNodes",2),J([ct({slot:"suffix",flatten:!0})],Z.prototype,"slotSuffixNodes",2),J([ct({slot:"prefix",flatten:!0})],Z.prototype,"slotPrefixNodes",2),J([L()],Z.prototype,"hasDescription",2),J([L()],Z.prototype,"hasLabel",2),J([L()],Z.prototype,"hasSuffix",2),J([L()],Z.prototype,"hasPrefix",2),Z=J([$($c)],Z);var Pc=Object.defineProperty,Cc=Object.getOwnPropertyDescriptor,vt=(r,t,e,i)=>{for(var s=i>1?void 0:i?Cc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Pc(t,e,s),s};const Ac="sonic-textarea";let dt=class extends Us(Me(G(x))){constructor(){super(...arguments),this.size="md",this.readonly=!1,this.resize="vertical",this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(r){this.hasSlotOrProps(),super.willUpdate(r)}hasSlotOrProps(){var r,t;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length)}validateFormElement(){var e;const r=(e=this.shadowRoot)==null?void 0:e.querySelector("textarea");if(!r||r.checkValidity())return;const t=this.getFormPublisher();t&&(t.isFormValid=!1),r.reportValidity()}render(){const r={resize:this.resize};return m`
|
|
2543
2544
|
<label
|
|
2544
2545
|
for="${this.id||"form-element"}"
|
|
2545
2546
|
class="${this.hasLabel?"form-label":"hidden"}"
|
|
@@ -2581,14 +2582,14 @@ ${this.value}</textarea
|
|
|
2581
2582
|
name="description"
|
|
2582
2583
|
@slotchange=${this.hasSlotOrProps}
|
|
2583
2584
|
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2584
|
-
>${this.description?
|
|
2585
|
+
>${this.description?m`${z(this.description)}`:""}</slot
|
|
2585
2586
|
>
|
|
2586
2587
|
`}};dt.styles=[Nt,Ii,Ys,Zs,cs,P`
|
|
2587
2588
|
textarea {
|
|
2588
2589
|
overflow-y: auto !important;
|
|
2589
2590
|
font-size: inherit;
|
|
2590
2591
|
}
|
|
2591
|
-
`],vt([l({type:String})],dt.prototype,"size",2),vt([l({type:Number})],dt.prototype,"rows",2),vt([l({type:Number})],dt.prototype,"cols",2),vt([l({type:Number})],dt.prototype,"maxlength",2),vt([l({type:Number})],dt.prototype,"minlength",2),vt([l({type:String})],dt.prototype,"wrap",2),vt([l({type:Boolean})],dt.prototype,"readonly",2),vt([l({type:String})],dt.prototype,"placeholder",2),vt([l({type:String})],dt.prototype,"resize",2),vt([ct({slot:"label",flatten:!0})],dt.prototype,"slotLabelNodes",2),vt([ct({slot:"description",flatten:!0})],dt.prototype,"slotDescriptionNodes",2),vt([
|
|
2592
|
+
`],vt([l({type:String})],dt.prototype,"size",2),vt([l({type:Number})],dt.prototype,"rows",2),vt([l({type:Number})],dt.prototype,"cols",2),vt([l({type:Number})],dt.prototype,"maxlength",2),vt([l({type:Number})],dt.prototype,"minlength",2),vt([l({type:String})],dt.prototype,"wrap",2),vt([l({type:Boolean})],dt.prototype,"readonly",2),vt([l({type:String})],dt.prototype,"placeholder",2),vt([l({type:String})],dt.prototype,"resize",2),vt([ct({slot:"label",flatten:!0})],dt.prototype,"slotLabelNodes",2),vt([ct({slot:"description",flatten:!0})],dt.prototype,"slotDescriptionNodes",2),vt([L()],dt.prototype,"hasDescription",2),vt([L()],dt.prototype,"hasLabel",2),dt=vt([$(Ac)],dt);var Sc=Object.defineProperty,Oc=Object.getOwnPropertyDescriptor,Dc=(r,t,e,i)=>{for(var s=i>1?void 0:i?Oc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Sc(t,e,s),s};let Ri=class extends x{render(){return m`<slot></slot>`}};Ri.styles=[P`
|
|
2592
2593
|
:host {
|
|
2593
2594
|
font-size: 1.15rem;
|
|
2594
2595
|
line-height: 1.2;
|
|
@@ -2605,8 +2606,8 @@ ${this.value}</textarea
|
|
|
2605
2606
|
font-size: 1rem;
|
|
2606
2607
|
}
|
|
2607
2608
|
}
|
|
2608
|
-
`],Ri=Dc([$("sonic-legend-description")],Ri);var kc=Object.defineProperty,Lc=Object.getOwnPropertyDescriptor,we=(r,t,e,i)=>{for(var s=i>1?void 0:i?Lc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&kc(t,e,s),s};const Ec="sonic-legend";let Kt=class extends x{constructor(){super(...arguments),this.forceAutoFill=!1}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()}render(){return
|
|
2609
|
-
${this.iconName?
|
|
2609
|
+
`],Ri=Dc([$("sonic-legend-description")],Ri);var kc=Object.defineProperty,Lc=Object.getOwnPropertyDescriptor,we=(r,t,e,i)=>{for(var s=i>1?void 0:i?Lc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&kc(t,e,s),s};const Ec="sonic-legend";let Kt=class extends x{constructor(){super(...arguments),this.forceAutoFill=!1}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()}render(){return m`<legend part="legend">
|
|
2610
|
+
${this.iconName?m`<div class="icon">
|
|
2610
2611
|
<sonic-icon
|
|
2611
2612
|
name=${this.iconName}
|
|
2612
2613
|
prefix=${C(this.iconPrefix)}
|
|
@@ -2616,7 +2617,7 @@ ${this.value}</textarea
|
|
|
2616
2617
|
|
|
2617
2618
|
<div class="legend-content">
|
|
2618
2619
|
${z(this.label?this.label:"")}
|
|
2619
|
-
${this.description?
|
|
2620
|
+
${this.description?m`<sonic-legend-description
|
|
2620
2621
|
>${z(this.description)}</sonic-legend-description
|
|
2621
2622
|
>`:""}
|
|
2622
2623
|
<slot></slot>
|
|
@@ -2666,11 +2667,11 @@ ${this.value}</textarea
|
|
|
2666
2667
|
.legend-content {
|
|
2667
2668
|
flex-grow: 1;
|
|
2668
2669
|
}
|
|
2669
|
-
`],we([l({type:Boolean})],Kt.prototype,"forceAutoFill",2),we([l()],Kt.prototype,"description",1),we([l()],Kt.prototype,"label",1),we([l({type:String})],Kt.prototype,"iconName",2),we([l({type:String})],Kt.prototype,"iconLibrary",2),we([l({type:String})],Kt.prototype,"iconPrefix",2),Kt=we([$(Ec)],Kt);var Nc=Object.defineProperty,Tc=Object.getOwnPropertyDescriptor,jt=(r,t,e,i)=>{for(var s=i>1?void 0:i?Tc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Nc(t,e,s),s};const Mc="sonic-fieldset";let Pt=class extends G(x){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return
|
|
2670
|
+
`],we([l({type:Boolean})],Kt.prototype,"forceAutoFill",2),we([l()],Kt.prototype,"description",1),we([l()],Kt.prototype,"label",1),we([l({type:String})],Kt.prototype,"iconName",2),we([l({type:String})],Kt.prototype,"iconLibrary",2),we([l({type:String})],Kt.prototype,"iconPrefix",2),Kt=we([$(Ec)],Kt);var Nc=Object.defineProperty,Tc=Object.getOwnPropertyDescriptor,jt=(r,t,e,i)=>{for(var s=i>1?void 0:i?Tc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Nc(t,e,s),s};const Mc="sonic-fieldset";let Pt=class extends G(x){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return m`<fieldset
|
|
2670
2671
|
form="${C(this.form)}"
|
|
2671
2672
|
?disabled="${this.disabled}"
|
|
2672
2673
|
>
|
|
2673
|
-
${this.label?
|
|
2674
|
+
${this.label?m` <sonic-legend
|
|
2674
2675
|
label=${C(this.label)}
|
|
2675
2676
|
description=${C(this.description)}
|
|
2676
2677
|
iconName=${C(this.iconName)}
|
|
@@ -2727,9 +2728,9 @@ ${this.value}</textarea
|
|
|
2727
2728
|
::slotted(sonic-legend:last-child) {
|
|
2728
2729
|
margin-bottom: 0;
|
|
2729
2730
|
}
|
|
2730
|
-
`],jt([l({type:Boolean,reflect:!0})],Pt.prototype,"disabled",2),jt([l({type:String})],Pt.prototype,"form",2),jt([l({type:String})],Pt.prototype,"label",2),jt([l({type:String})],Pt.prototype,"description",2),jt([l({type:String})],Pt.prototype,"iconName",2),jt([l({type:String})],Pt.prototype,"iconLibrary",2),jt([l({type:String})],Pt.prototype,"iconPrefix",2),jt([l({type:Boolean,reflect:!0})],Pt.prototype,"tight",2),jt([l({type:String,reflect:!0})],Pt.prototype,"variant",2),Pt=jt([$(Mc)],Pt);var Ic=Object.defineProperty,jc=Object.getOwnPropertyDescriptor,Ui=(r,t,e,i)=>{for(var s=i>1?void 0:i?jc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Ic(t,e,s),s};const Fc="sonic-form-layout";let
|
|
2731
|
+
`],jt([l({type:Boolean,reflect:!0})],Pt.prototype,"disabled",2),jt([l({type:String})],Pt.prototype,"form",2),jt([l({type:String})],Pt.prototype,"label",2),jt([l({type:String})],Pt.prototype,"description",2),jt([l({type:String})],Pt.prototype,"iconName",2),jt([l({type:String})],Pt.prototype,"iconLibrary",2),jt([l({type:String})],Pt.prototype,"iconPrefix",2),jt([l({type:Boolean,reflect:!0})],Pt.prototype,"tight",2),jt([l({type:String,reflect:!0})],Pt.prototype,"variant",2),Pt=jt([$(Mc)],Pt);var Ic=Object.defineProperty,jc=Object.getOwnPropertyDescriptor,Ui=(r,t,e,i)=>{for(var s=i>1?void 0:i?jc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Ic(t,e,s),s};const Fc="sonic-form-layout";let ms=class extends G(x){constructor(){super(...arguments),this._resizeController=new yo(this,{}),this.oneFormElement=!1}onSlotChange(){let r=this.slottedElements;const t=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];r=r.filter(e=>t.includes(e.nodeName.toLowerCase())),this.oneFormElement=r.length==1}render(){const r={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return m`<div class=${ji(r)}>
|
|
2731
2732
|
<slot @slotchange=${this.onSlotChange}></slot>
|
|
2732
|
-
</div>`}};
|
|
2733
|
+
</div>`}};ms.styles=[P`
|
|
2733
2734
|
:host {
|
|
2734
2735
|
display: block;
|
|
2735
2736
|
}
|
|
@@ -2764,7 +2765,7 @@ ${this.value}</textarea
|
|
|
2764
2765
|
::slotted(sonic-divider) {
|
|
2765
2766
|
--sc-divider-my: 0;
|
|
2766
2767
|
}
|
|
2767
|
-
`],Ui([ke({flatten:!0})],
|
|
2768
|
+
`],Ui([ke({flatten:!0})],ms.prototype,"slottedElements",2),Ui([l({type:Boolean})],ms.prototype,"oneFormElement",2),ms=Ui([$(Fc)],ms);var zc=Object.defineProperty,Rc=Object.getOwnPropertyDescriptor,Vi=(r,t,e,i)=>{for(var s=i>1?void 0:i?Rc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&zc(t,e,s),s};const Uc="sonic-form-actions";let gs=class extends x{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const r={flexDirection:this.direction,justifyContent:this.justify};return m`<slot style=${bt(r)}></slot>`}};gs.styles=[P`
|
|
2768
2769
|
:host {
|
|
2769
2770
|
display: block;
|
|
2770
2771
|
}
|
|
@@ -2773,7 +2774,7 @@ ${this.value}</textarea
|
|
|
2773
2774
|
flex-wrap: wrap;
|
|
2774
2775
|
gap: 0.3rem;
|
|
2775
2776
|
}
|
|
2776
|
-
`],Vi([l({type:String})],
|
|
2777
|
+
`],Vi([l({type:String})],gs.prototype,"direction",2),Vi([l({type:String})],gs.prototype,"justify",2),gs=Vi([$(Uc)],gs);var Vc=Object.defineProperty,Bc=Object.getOwnPropertyDescriptor,oe=(r,t,e,i)=>{for(var s=i>1?void 0:i?Bc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Vc(t,e,s),s};const Hc="sonic-group";let Ft=class extends x{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const r=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),t=r.length;t>1&&r.forEach((e,i)=>{const s=e;i===0?(s.style.setProperty("--sc-item-rounded-tr","0"),s.style.setProperty("--sc-item-rounded-br","0")):i===t-1?(s.style.setProperty("--sc-item-rounded-tl","0"),s.style.setProperty("--sc-item-rounded-bl","0")):(s.style.setProperty("--sc-item-rounded-tr","0"),s.style.setProperty("--sc-item-rounded-br","0"),s.style.setProperty("--sc-item-rounded-tl","0"),s.style.setProperty("--sc-item-rounded-bl","0"))})}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(r){this.hasSlotOrProps(),super.willUpdate(r)}hasSlotOrProps(){var r,t;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length)}render(){const r={alignItems:this.alignItems};return m`<span class="${this.hasLabel?"form-label":"hidden"}"
|
|
2777
2778
|
>${this.label?z(this.label):""}<slot
|
|
2778
2779
|
name="label"
|
|
2779
2780
|
@slotchange=${this.hasSlotOrProps}
|
|
@@ -2785,7 +2786,7 @@ ${this.value}</textarea
|
|
|
2785
2786
|
@slotchange=${this.hasSlotOrProps}
|
|
2786
2787
|
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2787
2788
|
>
|
|
2788
|
-
${this.description?
|
|
2789
|
+
${this.description?m`${z(this.description)}`:""}
|
|
2789
2790
|
</slot>`}};Ft.styles=[Nt,Ys,Zs,P`
|
|
2790
2791
|
:host {
|
|
2791
2792
|
display: inline-block;
|
|
@@ -2806,7 +2807,7 @@ ${this.value}</textarea
|
|
|
2806
2807
|
::slotted(sonic-select) {
|
|
2807
2808
|
flex-grow: 1;
|
|
2808
2809
|
}
|
|
2809
|
-
`],oe([l({type:String})],Ft.prototype,"alignItems",2),oe([l({type:String})],Ft.prototype,"label",2),oe([l({type:String})],Ft.prototype,"description",2),oe([ct({slot:"label",flatten:!0})],Ft.prototype,"slotLabelNodes",2),oe([ct({slot:"description",flatten:!0})],Ft.prototype,"slotDescriptionNodes",2),oe([
|
|
2810
|
+
`],oe([l({type:String})],Ft.prototype,"alignItems",2),oe([l({type:String})],Ft.prototype,"label",2),oe([l({type:String})],Ft.prototype,"description",2),oe([ct({slot:"label",flatten:!0})],Ft.prototype,"slotLabelNodes",2),oe([ct({slot:"description",flatten:!0})],Ft.prototype,"slotDescriptionNodes",2),oe([L()],Ft.prototype,"hasDescription",2),oe([L()],Ft.prototype,"hasLabel",2),Ft=oe([$(Hc)],Ft);var qc=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,zt=(r,t,e,i)=>{for(var s=i>1?void 0:i?Wc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&qc(t,e,s),s};const Kc="sonic-image";let Ct=class extends x{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(r){var t;if(this.transition){const e=(t=this.shadowRoot)==null?void 0:t.querySelector("img");if(!e)return;e.onload=function(){e.classList.add("loaded")}}super.firstUpdated(r)}render(){const r={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return m`<div part="image">
|
|
2810
2811
|
<picture part="picture"
|
|
2811
2812
|
><img
|
|
2812
2813
|
part="img"
|
|
@@ -2889,7 +2890,7 @@ ${this.value}</textarea
|
|
|
2889
2890
|
opacity: 1;
|
|
2890
2891
|
scale: 1;
|
|
2891
2892
|
}
|
|
2892
|
-
`],zt([l({type:String})],Ct.prototype,"rounded",2),zt([l({type:String})],Ct.prototype,"src",2),zt([l({type:String})],Ct.prototype,"alt",2),zt([l({type:String})],Ct.prototype,"loading",2),zt([l({type:String,reflect:!0})],Ct.prototype,"transition",2),zt([l({type:String})],Ct.prototype,"ratio",2),zt([l({type:String})],Ct.prototype,"objectPosition",2),zt([l({type:String})],Ct.prototype,"imageRendering",2),zt([l({type:Boolean,reflect:!0})],Ct.prototype,"cover",2),Ct=zt([$(Kc)],Ct);var Yc=Object.defineProperty,Zc=Object.getOwnPropertyDescriptor,wt=(r,t,e,i)=>{for(var s=i>1?void 0:i?Zc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Yc(t,e,s),s};const Xc="sonic-menu";let
|
|
2893
|
+
`],zt([l({type:String})],Ct.prototype,"rounded",2),zt([l({type:String})],Ct.prototype,"src",2),zt([l({type:String})],Ct.prototype,"alt",2),zt([l({type:String})],Ct.prototype,"loading",2),zt([l({type:String,reflect:!0})],Ct.prototype,"transition",2),zt([l({type:String})],Ct.prototype,"ratio",2),zt([l({type:String})],Ct.prototype,"objectPosition",2),zt([l({type:String})],Ct.prototype,"imageRendering",2),zt([l({type:Boolean,reflect:!0})],Ct.prototype,"cover",2),Ct=zt([$(Kc)],Ct);var Yc=Object.defineProperty,Zc=Object.getOwnPropertyDescriptor,wt=(r,t,e,i)=>{for(var s=i>1?void 0:i?Zc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Yc(t,e,s),s};const Xc="sonic-menu";let gt=class extends x{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.minWidth="0",this.hasMoreElements=!1,this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this,this.direction))}}checkIfMore(){var r;this.hasMoreElements=!!((r=this.moreElements)!=null&&r.length)}updated(r){const t=this.querySelector(".more-btn");this.size&&t&&t.setAttribute("size",this.size),this.querySelectorAll("sonic-divider").forEach(i=>{i.hasAttribute("size")||i.setAttribute("size","xs")}),super.updated(r)}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.updateIsScollable()}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}disconnectedCallback(){var r;(r=this.observer)==null||r.disconnect(),super.disconnectedCallback()}initScrollable(){let r=!1,t,e;this.scrollable&&(this.addEventListener("mousedown",i=>{r=!0,this.classList.add("active"),t=i.pageX-this.offsetLeft,e=this.scrollLeft}),this.addEventListener("mouseleave",()=>{r=!1,this.classList.remove("active")}),this.addEventListener("mouseup",()=>{r=!1,this.classList.remove("active")}),this.addEventListener("mousemove",i=>{if(!r)return;i.preventDefault();const o=(i.pageX-this.offsetLeft-t)*1.5;this.scrollLeft=e-o,this.setScrollShadow(this,this.direction)}),this.addEventListener("scroll",i=>{i.preventDefault(),this.setScrollShadow(this,this.direction)}))}setScrollShadow(r,t){t=="row"?(r.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),r.scrollLeft<r.scrollWidth-r.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):t=="column"&&(r.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),r.scrollTop<r.scrollHeight-(r.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(r){r.forEach(t=>{this.size&&t.setAttribute("size",this.size),this.align&&t.getAttribute("shape")!="square"&&t.getAttribute("shape")!="circle"&&t.setAttribute("align",this.align),this.direction=="row"&&t.getAttribute("shape")=="block"&&t.setAttribute("shape","default")})}render(){const r={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},t=this.direction=="row",e={display:"block",alignSelf:t?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:t?"":".55em"};return m`<menu
|
|
2893
2894
|
part="menu"
|
|
2894
2895
|
class="shadowable"
|
|
2895
2896
|
style=${bt(r)}
|
|
@@ -2912,7 +2913,7 @@ ${this.value}</textarea
|
|
|
2912
2913
|
</sonic-menu-item>
|
|
2913
2914
|
<slot name="more" @slotchange=${this.checkIfMore} slot="content"></slot>
|
|
2914
2915
|
</sonic-pop>
|
|
2915
|
-
</menu>`}};
|
|
2916
|
+
</menu>`}};gt.styles=[P`
|
|
2916
2917
|
:host {
|
|
2917
2918
|
display: block;
|
|
2918
2919
|
--sc-menu-gap: 0.15rem;
|
|
@@ -3029,25 +3030,25 @@ ${this.value}</textarea
|
|
|
3029
3030
|
rgba(0, 0, 0, 0) 100%
|
|
3030
3031
|
);
|
|
3031
3032
|
}
|
|
3032
|
-
`,bo],wt([l({type:String,reflect:!0})],
|
|
3033
|
+
`,bo],wt([l({type:String,reflect:!0})],gt.prototype,"size",2),wt([l({type:String,reflect:!0})],gt.prototype,"direction",2),wt([l({type:String})],gt.prototype,"gap",2),wt([l({type:String,reflect:!0})],gt.prototype,"align",2),wt([l({type:String,reflect:!0})],gt.prototype,"shadow",2),wt([l({type:String})],gt.prototype,"moreShape",2),wt([l({type:Boolean})],gt.prototype,"scrollable",2),wt([l({type:String})],gt.prototype,"minWidth",2),wt([De("menu")],gt.prototype,"menu",2),wt([ke({selector:"sonic-menu-item"})],gt.prototype,"menuChildren",2),wt([ke({slot:"more",selector:"*"})],gt.prototype,"moreElements",2),wt([L()],gt.prototype,"hasMoreElements",2),gt=wt([$(Xc)],gt);var Gc=Object.defineProperty,Qc=Object.getOwnPropertyDescriptor,_o=(r,t,e,i)=>{for(var s=i>1?void 0:i?Qc(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Gc(t,e,s),s};const Jc="sonic-modal-actions";let Xs=class extends x{firstUpdated(r){var t;(t=this.buttons)==null||t.forEach(e=>{e.hasAttribute("hideModal")&&e.addEventListener("click",()=>{const i=Gt.getClosestElement(this,"sonic-modal");i==null||i.hide()})}),super.firstUpdated(r)}render(){return m`<slot></slot>`}};Xs.styles=[P`
|
|
3033
3034
|
:host {
|
|
3034
3035
|
display: flex;
|
|
3035
3036
|
gap: 0.5rem;
|
|
3036
3037
|
margin-top: auto;
|
|
3037
3038
|
padding-top: 1.5rem;
|
|
3038
3039
|
}
|
|
3039
|
-
`],_o([ke({selector:"sonic-button"})],Xs.prototype,"buttons",2),Xs=_o([$(Jc)],Xs);var th=Object.defineProperty,eh=Object.getOwnPropertyDescriptor,
|
|
3040
|
+
`],_o([ke({selector:"sonic-button"})],Xs.prototype,"buttons",2),Xs=_o([$(Jc)],Xs);var th=Object.defineProperty,eh=Object.getOwnPropertyDescriptor,Bi=(r,t,e,i)=>{for(var s=i>1?void 0:i?eh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&th(t,e,s),s};const sh="sonic-modal-close";let Gs=class extends x{constructor(){super(...arguments),this.translation={fr:"Fermer la fenêtre",en:"Close window",de:"Fenster schließen",nl:"Venster sluiten",es:"Cerrar"}}connectedCallback(){var r;super.connectedCallback(),this.lang=((r=document.documentElement.lang)==null?void 0:r.split("-")[0])??"fr"}render(){return m`<sonic-button
|
|
3040
3041
|
aria-label=${this.translation[this.lang]}
|
|
3041
3042
|
reset=${C(this.reset)}
|
|
3042
3043
|
shape="circle"
|
|
3043
3044
|
@click=${this.handleClick}
|
|
3044
3045
|
><sonic-icon name="cancel" size="lg"></sonic-icon
|
|
3045
|
-
></sonic-button>`}handleClick(){K.getClosestElement(this,"sonic-modal").hide()}};
|
|
3046
|
+
></sonic-button>`}handleClick(){K.getClosestElement(this,"sonic-modal").hide()}};Bi([l()],Gs.prototype,"translation",2),Bi([l()],Gs.prototype,"reset",2),Gs=Bi([$(sh)],Gs);var ih=Object.defineProperty,rh=Object.getOwnPropertyDescriptor,oh=(r,t,e,i)=>{for(var s=i>1?void 0:i?rh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&ih(t,e,s),s};const nh="sonic-modal-content";let Hi=class extends x{render(){return m`<slot></slot>`}};Hi.styles=[P`
|
|
3046
3047
|
:host {
|
|
3047
3048
|
display: block;
|
|
3048
3049
|
width: 100%;
|
|
3049
3050
|
}
|
|
3050
|
-
`],
|
|
3051
|
+
`],Hi=oh([$(nh)],Hi);var ah=Object.defineProperty,lh=Object.getOwnPropertyDescriptor,ch=(r,t,e,i)=>{for(var s=i>1?void 0:i?lh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&ah(t,e,s),s};const hh="sonic-modal-subtitle";let qi=class extends x{render(){return m`<slot></slot>`}};qi.styles=[P`
|
|
3051
3052
|
:host {
|
|
3052
3053
|
font-size: 1.25rem;
|
|
3053
3054
|
display: block;
|
|
@@ -3059,7 +3060,7 @@ ${this.value}</textarea
|
|
|
3059
3060
|
font-weight: var(--sc-headings-font-weight, 700);
|
|
3060
3061
|
font-style: var(--sc-headings-font-style, normal);
|
|
3061
3062
|
}
|
|
3062
|
-
`],qi=ch([$(hh)],qi);var dh=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,uh=(r,t,e,i)=>{for(var s=i>1?void 0:i?ph(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&dh(t,e,s),s};const fh="sonic-modal-title";let Wi=class extends x{render(){return
|
|
3063
|
+
`],qi=ch([$(hh)],qi);var dh=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,uh=(r,t,e,i)=>{for(var s=i>1?void 0:i?ph(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&dh(t,e,s),s};const fh="sonic-modal-title";let Wi=class extends x{render(){return m`<slot></slot>`}};Wi.styles=[P`
|
|
3063
3064
|
:host {
|
|
3064
3065
|
font-weight: bold;
|
|
3065
3066
|
font-size: 1.5rem;
|
|
@@ -3072,7 +3073,7 @@ ${this.value}</textarea
|
|
|
3072
3073
|
font-weight: var(--sc-headings-font-weight, 700);
|
|
3073
3074
|
font-style: var(--sc-headings-font-style, normal);
|
|
3074
3075
|
}
|
|
3075
|
-
`],Wi=uh([$(fh)],Wi);var
|
|
3076
|
+
`],Wi=uh([$(fh)],Wi);var mh=Object.defineProperty,gh=Object.getOwnPropertyDescriptor,tt=(r,t,e,i)=>{for(var s=i>1?void 0:i?gh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&mh(t,e,s),s};const wo="sonic-modal";let F=class extends G(x){constructor(){super(...arguments),this.forceAction=!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._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(r){const t=document.createElement(wo);return t.options=r,r.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),r.removeOnHide===!0&&t.setAttribute("removeOnHide","true"),r.closeOnLocationChange===!0&&t.setAttribute("closeOnLocationChange","true"),r.maxWidth&&(t.maxWidth=r==null?void 0:r.maxWidth),r.width&&(t.width=r==null?void 0:r.width),r.maxHeight&&(t.maxHeight=r==null?void 0:r.maxHeight),r.height&&(t.height=r==null?void 0:r.height),r.forceAction&&(t.forceAction=!0),r.fullScreen&&(t.fullScreen=r==null?void 0:r.fullScreen),r.effect&&(t.effect=r==null?void 0:r.effect),r.paddingX&&(t.paddingX=r==null?void 0:r.paddingX),r.paddingY&&(t.paddingY=r==null?void 0:r.paddingY),r.zIndex&&(t.zIndex=r==null?void 0:r.zIndex),_t.getPopContainer().appendChild(t),t.updateComplete.then(()=>{t.show()}),t}connectedCallback(){F.modals.push(this),it.onChange(this),super.connectedCallback()}disconnectedCallback(){it.offChange(this),F.modals.splice(F.modals.indexOf(this),1),this.removeEventListener("keydown",this.handleEscape),super.disconnectedCallback()}firstUpdated(){this.addEventListener("keydown",this.handleEscape)}willUpdate(r){if(this.closeOnLocationChange&&r.has("location")){const t=r.get("location");t&&this.location&&this.location!==t&&setTimeout(()=>{this.hide()},50)}r.has("zIndex")&&this.style.setProperty("--sc_z-index",this.zIndex||"990"),r.has("paddingX")&&this.style.setProperty("--sc-modal-px",this.paddingX||""),r.has("paddingY")&&this.style.setProperty("--sc-modal-py",this.paddingY||""),super.willUpdate(r)}updated(r){const t=!r.get("visible")&&this.visible,e=r.get("visible")&&!this.visible;t&&this._animationState==="hidden"?this.show():e&&this._animationState==="visible"&&this.hide()}handleOverlayClick(r){!this.forceAction&&this._animationState==="visible"&&this.hide()}render(){const r={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,pointerEvents:this._animationState==="visible"?"auto":"none"},t={display:this.fullScreen?"none":"block",pointerEvents:this._animationState==="visible"?"auto":"none"};return m`
|
|
3076
3077
|
<div
|
|
3077
3078
|
id="backdrop"
|
|
3078
3079
|
@click=${this.handleOverlayClick}
|
|
@@ -3085,14 +3086,14 @@ ${this.value}</textarea
|
|
|
3085
3086
|
aria-modal="true"
|
|
3086
3087
|
style=${bt(r)}
|
|
3087
3088
|
>
|
|
3088
|
-
${this._animationState!=="hidden"?
|
|
3089
|
-
${this.forceAction?A:
|
|
3089
|
+
${this._animationState!=="hidden"?m`<div id="modal-content">
|
|
3090
|
+
${this.forceAction?A:m`<sonic-modal-close></sonic-modal-close>`}
|
|
3090
3091
|
${this.modalFragment("title")} ${this.modalFragment("subtitle")}
|
|
3091
3092
|
${this.modalFragment("content")} ${this.modalFragment("actions")}
|
|
3092
3093
|
<slot></slot>
|
|
3093
3094
|
</div>`:A}
|
|
3094
3095
|
</dialog>
|
|
3095
|
-
`}modalFragment(r){var i;const t=(i=this.options)==null?void 0:i[r];if(!t)return A;let e;switch(t instanceof Object?e=t:e=z(t),r){case"title":return
|
|
3096
|
+
`}modalFragment(r){var i;const t=(i=this.options)==null?void 0:i[r];if(!t)return A;let e;switch(t instanceof Object?e=t:e=z(t),r){case"title":return m`<sonic-modal-title>${e}</sonic-modal-title>`;case"subtitle":return m`<sonic-modal-subtitle>${e}</sonic-modal-subtitle>`;case"content":return m`<sonic-modal-content>${e}</sonic-modal-content>`;case"actions":return m`<sonic-modal-actions>${e}</sonic-modal-actions>`;default:return A}}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")&&rt.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(){F.modals.forEach(r=>{r.dispose()})}handleEscape(r){if(r.key==="Escape"){r.preventDefault();const t=F.modals.filter(e=>e._animationState!=="hidden"&&!e.forceAction);t.length>0&&t[t.length-1].hide()}}animation(r){return new Promise(t=>{const{quartOut:e,linear:i,translateY:s,durationIn:o,durationOut:n,quadOut:a}=this._animationConfig,c=this._modalElement;if(!c)return t();const h=r==="in",d=h?o:n,p=!this.fullScreen&&h?100:0;this.fullScreen||(h?this.style.setProperty("--sc_backdrop-opacity","0.8"):setTimeout(()=>{this.style.setProperty("--sc_backdrop-opacity","0")},150));const g=[];this.effect==="slide"&&(g.push(c.animate([{transform:h?s:"translateY(0)"},{transform:h?"translateY(0)":s}],{duration:d,easing:h?e:a,fill:"both",delay:p})),g.push(c.animate([{opacity:h?0:1},{opacity:h?1:0}],{duration:d,easing:i,fill:"both",delay:p}))),Promise.all(g.map(v=>v.finished)).then(()=>t())})}};F.styles=[cs,P`
|
|
3096
3097
|
:host {
|
|
3097
3098
|
--sc-modal-py: 2.5rem;
|
|
3098
3099
|
--sc-modal-px: 1.5rem;
|
|
@@ -3226,17 +3227,17 @@ ${this.value}</textarea
|
|
|
3226
3227
|
:host([rounded="none"]) #modal {
|
|
3227
3228
|
--sc-img-radius: 0 !important;
|
|
3228
3229
|
}
|
|
3229
|
-
`],F.modals=[],tt([l({type:Boolean})],F.prototype,"forceAction",2),tt([l({type:Boolean})],F.prototype,"removeOnHide",2),tt([l({type:Boolean})],F.prototype,"removeHashOnHide",2),tt([l({type:String,reflect:!0})],F.prototype,"align",2),tt([l({type:String})],F.prototype,"paddingX",2),tt([l({type:String})],F.prototype,"paddingY",2),tt([l({type:String})],F.prototype,"maxWidth",2),tt([l({type:String})],F.prototype,"maxHeight",2),tt([l({type:String})],F.prototype,"zIndex",2),tt([l({type:String})],F.prototype,"width",2),tt([l({type:String})],F.prototype,"height",2),tt([l({type:String})],F.prototype,"effect",2),tt([l({type:Object})],F.prototype,"options",2),tt([l({type:Boolean,reflect:!0})],F.prototype,"fullScreen",2),tt([l({type:Boolean,reflect:!0})],F.prototype,"visible",2),tt([De("#modal")],F.prototype,"_modalElement",2),tt([l({type:Boolean})],F.prototype,"closeOnLocationChange",2),tt([
|
|
3230
|
+
`],F.modals=[],tt([l({type:Boolean})],F.prototype,"forceAction",2),tt([l({type:Boolean})],F.prototype,"removeOnHide",2),tt([l({type:Boolean})],F.prototype,"removeHashOnHide",2),tt([l({type:String,reflect:!0})],F.prototype,"align",2),tt([l({type:String})],F.prototype,"paddingX",2),tt([l({type:String})],F.prototype,"paddingY",2),tt([l({type:String})],F.prototype,"maxWidth",2),tt([l({type:String})],F.prototype,"maxHeight",2),tt([l({type:String})],F.prototype,"zIndex",2),tt([l({type:String})],F.prototype,"width",2),tt([l({type:String})],F.prototype,"height",2),tt([l({type:String})],F.prototype,"effect",2),tt([l({type:Object})],F.prototype,"options",2),tt([l({type:Boolean,reflect:!0})],F.prototype,"fullScreen",2),tt([l({type:Boolean,reflect:!0})],F.prototype,"visible",2),tt([De("#modal")],F.prototype,"_modalElement",2),tt([l({type:Boolean})],F.prototype,"closeOnLocationChange",2),tt([L()],F.prototype,"location",2),tt([L()],F.prototype,"_animationState",2),F=tt([$(wo)],F),typeof window<"u"&&(window.SonicModal=F);var bh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,Rt=(r,t,e,i)=>{for(var s=i>1?void 0:i?vh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&bh(t,e,s),s};const yh={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"},_h="sonic-alert";let At=class extends x{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.id=new Date().getTime().toString(),this.dismissible=!1,this.background=!1,this.status="default",this.dismissForever=!1}connectedCallback(){if(this.dismissForever){const r=localStorage.getItem("sonic-alert-dismissed")||"{}";JSON.parse(r)[this.id]&&this.remove()}super.connectedCallback()}render(){return m`
|
|
3230
3231
|
<slot name="icon" class="${this.noIcon?"hidden":""}"
|
|
3231
|
-
>${this.noIcon?A:
|
|
3232
|
-
${this.status&&
|
|
3232
|
+
>${this.noIcon?A:m`<div>
|
|
3233
|
+
${this.status&&m`<sonic-icon name=${yh[this.status]}></sonic-icon>`}
|
|
3233
3234
|
</div>`}</slot
|
|
3234
3235
|
>
|
|
3235
3236
|
<div class="content">
|
|
3236
|
-
${this.label?
|
|
3237
|
+
${this.label?m`<span class="label">${z(this.label)}</span>`:A}
|
|
3237
3238
|
<div>${this.text}<slot></slot></div>
|
|
3238
3239
|
</div>
|
|
3239
|
-
${this.dismissible?
|
|
3240
|
+
${this.dismissible?m`<sonic-button
|
|
3240
3241
|
@click=${this.close}
|
|
3241
3242
|
class="close-btn"
|
|
3242
3243
|
variant="unstyled"
|
|
@@ -3332,8 +3333,8 @@ ${this.value}</textarea
|
|
|
3332
3333
|
top: 0.4rem;
|
|
3333
3334
|
right: 0.3rem;
|
|
3334
3335
|
}
|
|
3335
|
-
`],Rt([l({type:String})],At.prototype,"label",2),Rt([l({type:Boolean,reflect:!0})],At.prototype,"noIcon",2),Rt([l({type:String})],At.prototype,"text",2),Rt([l({type:String})],At.prototype,"id",2),Rt([l({type:String,reflect:!0})],At.prototype,"size",2),Rt([l({type:Boolean,reflect:!0})],At.prototype,"dismissible",2),Rt([l({type:Boolean,reflect:!0})],At.prototype,"background",2),Rt([l({type:String,reflect:!0})],At.prototype,"status",2),Rt([l({type:Boolean,reflect:!0})],At.prototype,"dismissForever",2),At=Rt([$(_h)],At);var wh=Object.defineProperty,xh=Object.getOwnPropertyDescriptor,bs=(r,t,e,i)=>{for(var s=i>1?void 0:i?xh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&wh(t,e,s),s};const $h="sonic-alert-messages";let xe=class extends G(x){constructor(){super(...arguments),this.size="md",this.background=!1,this.noIcon=!1,this.messages=[]}render(){var r;return(r=this.messages)!=null&&r.length?
|
|
3336
|
-
${ho(this.messages,t=>t.type=="public"?
|
|
3336
|
+
`],Rt([l({type:String})],At.prototype,"label",2),Rt([l({type:Boolean,reflect:!0})],At.prototype,"noIcon",2),Rt([l({type:String})],At.prototype,"text",2),Rt([l({type:String})],At.prototype,"id",2),Rt([l({type:String,reflect:!0})],At.prototype,"size",2),Rt([l({type:Boolean,reflect:!0})],At.prototype,"dismissible",2),Rt([l({type:Boolean,reflect:!0})],At.prototype,"background",2),Rt([l({type:String,reflect:!0})],At.prototype,"status",2),Rt([l({type:Boolean,reflect:!0})],At.prototype,"dismissForever",2),At=Rt([$(_h)],At);var wh=Object.defineProperty,xh=Object.getOwnPropertyDescriptor,bs=(r,t,e,i)=>{for(var s=i>1?void 0:i?xh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&wh(t,e,s),s};const $h="sonic-alert-messages";let xe=class extends G(x){constructor(){super(...arguments),this.size="md",this.background=!1,this.noIcon=!1,this.messages=[]}render(){var r;return(r=this.messages)!=null&&r.length?m`<div class="container">
|
|
3337
|
+
${ho(this.messages,t=>t.type=="public"?m`<sonic-alert
|
|
3337
3338
|
status=${t.status||"default"}
|
|
3338
3339
|
text=${C(t.content)}
|
|
3339
3340
|
size=${this.size}
|
|
@@ -3347,7 +3348,7 @@ ${this.value}</textarea
|
|
|
3347
3348
|
grid-template-columns: minmax(0, 1fr);
|
|
3348
3349
|
width: 100%;
|
|
3349
3350
|
}
|
|
3350
|
-
`],bs([l({type:String})],xe.prototype,"size",2),bs([l({type:Boolean})],xe.prototype,"background",2),bs([l({type:Boolean})],xe.prototype,"noIcon",2),bs([l({type:Array})],xe.prototype,"messages",2),xe=bs([$($h)],xe);var Ph=Object.defineProperty,Ch=Object.getOwnPropertyDescriptor,xo=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ch(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Ph(t,e,s),s};const Ah="sonic-toast-message-subscriber";let Ki=class extends G(x){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(r){this._messages=r,this.messages&&r.forEach(t=>{t.type=="public"&&
|
|
3351
|
+
`],bs([l({type:String})],xe.prototype,"size",2),bs([l({type:Boolean})],xe.prototype,"background",2),bs([l({type:Boolean})],xe.prototype,"noIcon",2),bs([l({type:Array})],xe.prototype,"messages",2),xe=bs([$($h)],xe);var Ph=Object.defineProperty,Ch=Object.getOwnPropertyDescriptor,xo=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ch(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Ph(t,e,s),s};const Ah="sonic-toast-message-subscriber";let Ki=class extends G(x){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(r){this._messages=r,this.messages&&r.forEach(t=>{t.type=="public"&&k.add({text:t.content||"",status:t.status})})}render(){return A}};xo([l({type:Array})],Ki.prototype,"messages",1),Ki=xo([$(Ah)],Ki);var Sh=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,vs=(r,t,e,i)=>{for(var s=i>1?void 0:i?Oh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Sh(t,e,s),s};const Dh="sonic-tooltip";let $e=class extends x{constructor(){super(...arguments),this.label="",this.disabled=!1,this.focusable=!1}willUpdate(r){if(r.has("disabled")){const t=r.get("disabled")===!0;this.disabled?this.setAttribute("tabindex","-1"):!this.disabled&&t&&this.removeAttribute("tabindex")}super.willUpdate(r)}render(){const r=this.disabled||this.label==""?"disabled":"";return m`<div
|
|
3351
3352
|
data-tooltip-text="${this.label.trim().replace(" "," ")}"
|
|
3352
3353
|
class="tooltip ${r}"
|
|
3353
3354
|
>
|
|
@@ -3459,7 +3460,7 @@ ${this.value}</textarea
|
|
|
3459
3460
|
bottom: 0;
|
|
3460
3461
|
left: var(--sc-tooltip-position);
|
|
3461
3462
|
}
|
|
3462
|
-
`],vs([l({type:String})],$e.prototype,"label",2),vs([l({type:String,reflect:!0})],$e.prototype,"placement",2),vs([l({type:Boolean})],$e.prototype,"disabled",2),vs([l({type:Boolean})],$e.prototype,"focusable",2),$e=vs([$(Dh)],$e);var kh=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,Ut=(r,t,e,i)=>{for(var s=i>1?void 0:i?Lh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&kh(t,e,s),s};const Eh="sonic-divider";let St=class extends x{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.dashed=!1,this.dotted=!1}firstUpdated(r){var t,e;super.firstUpdated(r),(this.label||(t=this.slotNodes)!=null&&t.length)&&((e=this.divider)==null||e.classList.add("has-text"))}render(){return
|
|
3463
|
+
`],vs([l({type:String})],$e.prototype,"label",2),vs([l({type:String,reflect:!0})],$e.prototype,"placement",2),vs([l({type:Boolean})],$e.prototype,"disabled",2),vs([l({type:Boolean})],$e.prototype,"focusable",2),$e=vs([$(Dh)],$e);var kh=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,Ut=(r,t,e,i)=>{for(var s=i>1?void 0:i?Lh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&kh(t,e,s),s};const Eh="sonic-divider";let St=class extends x{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.dashed=!1,this.dotted=!1}firstUpdated(r){var t,e;super.firstUpdated(r),(this.label||(t=this.slotNodes)!=null&&t.length)&&((e=this.divider)==null||e.classList.add("has-text"))}render(){return m`<div part="divider">
|
|
3463
3464
|
<span class="text"
|
|
3464
3465
|
>${z(this.label?this.label:"")}<slot></slot
|
|
3465
3466
|
></span>
|
|
@@ -3594,7 +3595,7 @@ ${this.value}</textarea
|
|
|
3594
3595
|
:host([dashed]) {
|
|
3595
3596
|
--sc-divider-border-style: dashed;
|
|
3596
3597
|
}
|
|
3597
|
-
`],Ut([ct({flatten:!0})],St.prototype,"slotNodes",2),Ut([De("div")],St.prototype,"divider",2),Ut([l({type:String})],St.prototype,"label",2),Ut([l({type:String,reflect:!0})],St.prototype,"size",2),Ut([l({type:String,reflect:!0})],St.prototype,"align",2),Ut([l({type:Boolean,reflect:!0})],St.prototype,"vertical",2),Ut([l({type:Boolean,reflect:!0})],St.prototype,"noMargin",2),Ut([l({type:Boolean,reflect:!0})],St.prototype,"dashed",2),Ut([l({type:Boolean,reflect:!0})],St.prototype,"dotted",2),St=Ut([$(Eh)],St);var Nh=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,Mh=(r,t,e,i)=>{for(var s=i>1?void 0:i?Th(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Nh(t,e,s),s};const Ih="sonic-card-header-description";let Yi=class extends x{render(){return
|
|
3598
|
+
`],Ut([ct({flatten:!0})],St.prototype,"slotNodes",2),Ut([De("div")],St.prototype,"divider",2),Ut([l({type:String})],St.prototype,"label",2),Ut([l({type:String,reflect:!0})],St.prototype,"size",2),Ut([l({type:String,reflect:!0})],St.prototype,"align",2),Ut([l({type:Boolean,reflect:!0})],St.prototype,"vertical",2),Ut([l({type:Boolean,reflect:!0})],St.prototype,"noMargin",2),Ut([l({type:Boolean,reflect:!0})],St.prototype,"dashed",2),Ut([l({type:Boolean,reflect:!0})],St.prototype,"dotted",2),St=Ut([$(Eh)],St);var Nh=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,Mh=(r,t,e,i)=>{for(var s=i>1?void 0:i?Th(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Nh(t,e,s),s};const Ih="sonic-card-header-description";let Yi=class extends x{render(){return m`<slot></slot>`}};Yi.styles=[P`
|
|
3598
3599
|
:host() {
|
|
3599
3600
|
display: block;
|
|
3600
3601
|
font-size: 0.7em;
|
|
@@ -3602,10 +3603,10 @@ ${this.value}</textarea
|
|
|
3602
3603
|
font-family: var(--sc-font-family-base, sans-serif);
|
|
3603
3604
|
font-weight: var(--sc-font-style-base, normal);
|
|
3604
3605
|
}
|
|
3605
|
-
`],Yi=Mh([$(Ih)],Yi);var jh=Object.defineProperty,Fh=Object.getOwnPropertyDescriptor,Zi=(r,t,e,i)=>{for(var s=i>1?void 0:i?Fh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&jh(t,e,s),s};const zh="sonic-card-header";let ys=class extends x{render(){return
|
|
3606
|
+
`],Yi=Mh([$(Ih)],Yi);var jh=Object.defineProperty,Fh=Object.getOwnPropertyDescriptor,Zi=(r,t,e,i)=>{for(var s=i>1?void 0:i?Fh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&jh(t,e,s),s};const zh="sonic-card-header";let ys=class extends x{render(){return m`
|
|
3606
3607
|
<div class="header-content">
|
|
3607
3608
|
${z(this.label)}
|
|
3608
|
-
${this.description?
|
|
3609
|
+
${this.description?m`<sonic-card-header-description
|
|
3609
3610
|
>${z(this.description)}</sonic-card-header-description
|
|
3610
3611
|
>`:A}
|
|
3611
3612
|
<slot></slot>
|
|
@@ -3649,11 +3650,11 @@ ${this.value}</textarea
|
|
|
3649
3650
|
::slotted(sonic-card-header-description) {
|
|
3650
3651
|
margin-top: 0.1em;
|
|
3651
3652
|
}
|
|
3652
|
-
`],Zi([l()],ys.prototype,"label",2),Zi([l()],ys.prototype,"description",2),ys=Zi([$(zh)],ys);var Rh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,Vh=(r,t,e,i)=>{for(var s=i>1?void 0:i?Uh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Rh(t,e,s),s};const
|
|
3653
|
+
`],Zi([l()],ys.prototype,"label",2),Zi([l()],ys.prototype,"description",2),ys=Zi([$(zh)],ys);var Rh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,Vh=(r,t,e,i)=>{for(var s=i>1?void 0:i?Uh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Rh(t,e,s),s};const Bh="sonic-card-main";let Xi=class extends x{render(){return m`<slot></slot>`}};Xi.styles=[P`
|
|
3653
3654
|
:host {
|
|
3654
3655
|
display: block;
|
|
3655
3656
|
}
|
|
3656
|
-
`],Xi=Vh([$(
|
|
3657
|
+
`],Xi=Vh([$(Bh)],Xi);var Hh=Object.defineProperty,qh=Object.getOwnPropertyDescriptor,Wh=(r,t,e,i)=>{for(var s=i>1?void 0:i?qh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Hh(t,e,s),s};const Kh="sonic-card-footer";let Gi=class extends x{render(){return m` <slot></slot> `}};Gi.styles=[P`
|
|
3657
3658
|
:host {
|
|
3658
3659
|
display: block;
|
|
3659
3660
|
}
|
|
@@ -3745,7 +3746,7 @@ ${this.value}</textarea
|
|
|
3745
3746
|
.inherit-bg {
|
|
3746
3747
|
color: inherit;
|
|
3747
3748
|
}
|
|
3748
|
-
`;var Zh=Object.defineProperty,Xh=Object.getOwnPropertyDescriptor,$o=(r,t,e,i)=>{for(var s=i>1?void 0:i?Xh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Zh(t,e,s),s};const Gh="sonic-card";let Qs=class extends x{constructor(){super(...arguments),this.type="base"}render(){return
|
|
3749
|
+
`;var Zh=Object.defineProperty,Xh=Object.getOwnPropertyDescriptor,$o=(r,t,e,i)=>{for(var s=i>1?void 0:i?Xh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Zh(t,e,s),s};const Gh="sonic-card";let Qs=class extends x{constructor(){super(...arguments),this.type="base"}render(){return m`<slot></slot> `}};Qs.styles=[Yh,P`
|
|
3749
3750
|
* {
|
|
3750
3751
|
box-sizing: border-box;
|
|
3751
3752
|
}
|
|
@@ -3775,7 +3776,7 @@ ${this.value}</textarea
|
|
|
3775
3776
|
box-shadow: var(--sc-_shadow);
|
|
3776
3777
|
color: var(--sc-_color);
|
|
3777
3778
|
}
|
|
3778
|
-
`],$o([l({type:String,reflect:!0})],Qs.prototype,"type",2),Qs=$o([$(Gh)],Qs);var Qh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,_s=(r,t,e,i)=>{for(var s=i>1?void 0:i?Jh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Qh(t,e,s),s};const td="sonic-tr";let Pe=class extends G(x){constructor(){super(...arguments),this._metadata_={}}willUpdate(r){r.has("_metadata_")&&(this.even=!!this._metadata_.even,this.odd=!!this._metadata_.odd,this.last=!!this._metadata_.lastChild),super.willUpdate(r)}render(){return
|
|
3779
|
+
`],$o([l({type:String,reflect:!0})],Qs.prototype,"type",2),Qs=$o([$(Gh)],Qs);var Qh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,_s=(r,t,e,i)=>{for(var s=i>1?void 0:i?Jh(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Qh(t,e,s),s};const td="sonic-tr";let Pe=class extends G(x){constructor(){super(...arguments),this._metadata_={}}willUpdate(r){r.has("_metadata_")&&(this.even=!!this._metadata_.even,this.odd=!!this._metadata_.odd,this.last=!!this._metadata_.lastChild),super.willUpdate(r)}render(){return m`<slot></slot>`}};Pe.styles=[Qi,P`
|
|
3779
3780
|
:host {
|
|
3780
3781
|
display: table-row;
|
|
3781
3782
|
}
|
|
@@ -3793,7 +3794,7 @@ ${this.value}</textarea
|
|
|
3793
3794
|
:host(:hover) {
|
|
3794
3795
|
background: var(--sc-table-hover-bg) !important;
|
|
3795
3796
|
}
|
|
3796
|
-
`],_s([l({type:Object})],Pe.prototype,"_metadata_",2),_s([l({type:Boolean,reflect:!0})],Pe.prototype,"even",2),_s([l({type:Boolean,reflect:!0})],Pe.prototype,"odd",2),_s([l({type:Boolean,reflect:!0})],Pe.prototype,"last",2),Pe=_s([$(td)],Pe);var ed=Object.defineProperty,sd=Object.getOwnPropertyDescriptor,Ce=(r,t,e,i)=>{for(var s=i>1?void 0:i?sd(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&ed(t,e,s),s};const id="sonic-th";let Yt=class extends x{render(){const r={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return
|
|
3797
|
+
`],_s([l({type:Object})],Pe.prototype,"_metadata_",2),_s([l({type:Boolean,reflect:!0})],Pe.prototype,"even",2),_s([l({type:Boolean,reflect:!0})],Pe.prototype,"odd",2),_s([l({type:Boolean,reflect:!0})],Pe.prototype,"last",2),Pe=_s([$(td)],Pe);var ed=Object.defineProperty,sd=Object.getOwnPropertyDescriptor,Ce=(r,t,e,i)=>{for(var s=i>1?void 0:i?sd(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&ed(t,e,s),s};const id="sonic-th";let Yt=class extends x{render(){const r={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return m`<th
|
|
3797
3798
|
part="th"
|
|
3798
3799
|
style=${bt(r)}
|
|
3799
3800
|
colspan=${C(this.colSpan)}
|
|
@@ -3823,7 +3824,7 @@ ${this.value}</textarea
|
|
|
3823
3824
|
:host([noBorder]) th {
|
|
3824
3825
|
border-bottom: none;
|
|
3825
3826
|
}
|
|
3826
|
-
`],Ce([l({type:Number})],Yt.prototype,"colSpan",2),Ce([l({type:Number})],Yt.prototype,"rowSpan",2),Ce([l({type:String})],Yt.prototype,"align",2),Ce([l({type:String})],Yt.prototype,"minWidth",2),Ce([l({type:String})],Yt.prototype,"maxWidth",2),Ce([l({type:String})],Yt.prototype,"width",2),Yt=Ce([$(id)],Yt);var rd=Object.defineProperty,od=Object.getOwnPropertyDescriptor,ne=(r,t,e,i)=>{for(var s=i>1?void 0:i?od(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&rd(t,e,s),s};const nd="sonic-td";let Vt=class extends x{render(){const r={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return
|
|
3827
|
+
`],Ce([l({type:Number})],Yt.prototype,"colSpan",2),Ce([l({type:Number})],Yt.prototype,"rowSpan",2),Ce([l({type:String})],Yt.prototype,"align",2),Ce([l({type:String})],Yt.prototype,"minWidth",2),Ce([l({type:String})],Yt.prototype,"maxWidth",2),Ce([l({type:String})],Yt.prototype,"width",2),Yt=Ce([$(id)],Yt);var rd=Object.defineProperty,od=Object.getOwnPropertyDescriptor,ne=(r,t,e,i)=>{for(var s=i>1?void 0:i?od(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&rd(t,e,s),s};const nd="sonic-td";let Vt=class extends x{render(){const r={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return m`<td part="td" style=${bt(r)} colspan=${C(this.colSpan)} rowspan=${C(this.rowSpan)}>
|
|
3827
3828
|
<slot></slot>
|
|
3828
3829
|
</td>`}};Vt.styles=[Qi,P`
|
|
3829
3830
|
:host {
|
|
@@ -3838,11 +3839,11 @@ ${this.value}</textarea
|
|
|
3838
3839
|
border-right: var(--sc-table-td-border-r, none);
|
|
3839
3840
|
border-left: var(--sc-table-td-border-l, none);
|
|
3840
3841
|
}
|
|
3841
|
-
`],ne([l({type:Number})],Vt.prototype,"colSpan",2),ne([l({type:Number})],Vt.prototype,"rowSpan",2),ne([l({type:String})],Vt.prototype,"align",2),ne([l({type:String})],Vt.prototype,"vAlign",2),ne([l({type:String})],Vt.prototype,"minWidth",2),ne([l({type:String})],Vt.prototype,"maxWidth",2),ne([l({type:String})],Vt.prototype,"width",2),Vt=ne([$(nd)],Vt);var ad=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,cd=(r,t,e,i)=>{for(var s=i>1?void 0:i?ld(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&ad(t,e,s),s};const hd="sonic-thead";let Ji=class extends x{render(){return
|
|
3842
|
+
`],ne([l({type:Number})],Vt.prototype,"colSpan",2),ne([l({type:Number})],Vt.prototype,"rowSpan",2),ne([l({type:String})],Vt.prototype,"align",2),ne([l({type:String})],Vt.prototype,"vAlign",2),ne([l({type:String})],Vt.prototype,"minWidth",2),ne([l({type:String})],Vt.prototype,"maxWidth",2),ne([l({type:String})],Vt.prototype,"width",2),Vt=ne([$(nd)],Vt);var ad=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,cd=(r,t,e,i)=>{for(var s=i>1?void 0:i?ld(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&ad(t,e,s),s};const hd="sonic-thead";let Ji=class extends x{render(){return m`<slot></slot>`}};Ji.styles=[P`
|
|
3842
3843
|
:host {
|
|
3843
3844
|
display: table-header-group;
|
|
3844
3845
|
}
|
|
3845
|
-
`],Ji=cd([$(hd)],Ji);var dd=Object.defineProperty,pd=Object.getOwnPropertyDescriptor,ud=(r,t,e,i)=>{for(var s=i>1?void 0:i?pd(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&dd(t,e,s),s};const fd="sonic-tbody";let tr=class extends x{render(){return
|
|
3846
|
+
`],Ji=cd([$(hd)],Ji);var dd=Object.defineProperty,pd=Object.getOwnPropertyDescriptor,ud=(r,t,e,i)=>{for(var s=i>1?void 0:i?pd(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&dd(t,e,s),s};const fd="sonic-tbody";let tr=class extends x{render(){return m`<tbody part="tbody">
|
|
3846
3847
|
<slot></slot>
|
|
3847
3848
|
</tbody>`}};tr.styles=[P`
|
|
3848
3849
|
:host {
|
|
@@ -3861,20 +3862,20 @@ ${this.value}</textarea
|
|
|
3861
3862
|
border-bottom: var(--sc-form-border-width) solid
|
|
3862
3863
|
var(--sc-base-200, rgba(0, 0, 0, 0.12)) !important;
|
|
3863
3864
|
}
|
|
3864
|
-
`],tr=ud([$(fd)],tr);var
|
|
3865
|
+
`],tr=ud([$(fd)],tr);var md=Object.defineProperty,gd=Object.getOwnPropertyDescriptor,bd=(r,t,e,i)=>{for(var s=i>1?void 0:i?gd(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&md(t,e,s),s};const vd="sonic-tfoot";let er=class extends x{render(){return m`<tfoot>
|
|
3865
3866
|
<slot></slot>
|
|
3866
3867
|
</tfoot>`}};er.styles=[P`
|
|
3867
3868
|
:host {
|
|
3868
3869
|
display: contents;
|
|
3869
3870
|
}
|
|
3870
|
-
`],er=bd([$(vd)],er);var yd=Object.defineProperty,_d=Object.getOwnPropertyDescriptor,wd=(r,t,e,i)=>{for(var s=i>1?void 0:i?_d(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&yd(t,e,s),s};const xd="sonic-caption";let sr=class extends x{render(){return
|
|
3871
|
+
`],er=bd([$(vd)],er);var yd=Object.defineProperty,_d=Object.getOwnPropertyDescriptor,wd=(r,t,e,i)=>{for(var s=i>1?void 0:i?_d(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&yd(t,e,s),s};const xd="sonic-caption";let sr=class extends x{render(){return m`<slot></slot>`}};sr.styles=[P`
|
|
3871
3872
|
:host {
|
|
3872
3873
|
display: table-caption;
|
|
3873
3874
|
font-size: 0.75rem;
|
|
3874
3875
|
color: var(--sc-table-caption-color);
|
|
3875
3876
|
padding: var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py));
|
|
3876
3877
|
}
|
|
3877
|
-
`],sr=wd([$(xd)],sr);var $d=Object.defineProperty,Pd=Object.getOwnPropertyDescriptor,Ue=(r,t,e,i)=>{for(var s=i>1?void 0:i?Pd(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&$d(t,e,s),s};const Cd="sonic-table";let ae=class extends x{render(){const r={maxHeight:this.maxHeight};return
|
|
3878
|
+
`],sr=wd([$(xd)],sr);var $d=Object.defineProperty,Pd=Object.getOwnPropertyDescriptor,Ue=(r,t,e,i)=>{for(var s=i>1?void 0:i?Pd(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&$d(t,e,s),s};const Cd="sonic-table";let ae=class extends x{render(){const r={maxHeight:this.maxHeight};return m`
|
|
3878
3879
|
<div
|
|
3879
3880
|
class="table-container ${this.noCustomScroll?"":"custom-scroll"}"
|
|
3880
3881
|
style=${bt(r)}
|
|
@@ -4151,7 +4152,7 @@ ${this.value}</textarea
|
|
|
4151
4152
|
animation: altcha-spinner 0.75s infinite linear;
|
|
4152
4153
|
transform-origin: center;
|
|
4153
4154
|
}
|
|
4154
|
-
`;var Ld=Object.defineProperty,Ed=Object.getOwnPropertyDescriptor,Js=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ed(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Ld(t,e,s),s};const Nd="supersoniks_altcha",Td="Si2\\]X8M4!n9DCLd";let Co=!1;const Md="sonic-captcha";let Ve=class extends te(x){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=r=>{r=="request_token"&&(this.formPublisher&&(this.formPublisher.captchaToken=""),this.requestToken())},this.maxNumber=5e4,this.chalengeUrl="https://altcha.supersoniks.org/get-challenge"}connectedCallback(){if(document.location.protocol.includes("https")){if(!Co){const r=document.createElement("script");r.type="module",this.setAttribute("async",""),this.setAttribute("defer",""),r.src="https://eu.altcha.org/js/latest/altcha.min.js",Co=!0,document.head.appendChild(r)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=rt.get(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&!this.formPublisher.captchaToken.get()&&(this.formPublisher.needsCaptchaValidation=!0,this.formPublisher.captchaToken.onAssign(this.onCaptchaTokenChanged))}}disconnectedCallback(){this.formPublisher&&(this.formPublisher.captchaToken.offAssign(this.onCaptchaTokenChanged),this.formPublisher.captchaToken="",this.formPublisher.needsCaptchaValidation=!1),super.disconnectedCallback()}requestToken(){var e;if(!this.formPublisher)return;const r=this.shadowRoot.querySelector("form");if(!r)return;const t=new FormData(r);this.formPublisher.captchaKey=this.key,this.formPublisher.captchaToken=((e=t.get("altcha"))==null?void 0:e.toString())||""}async generateEncryptedKey(){if(this.key)return;const r=await Sd(),t=new TextEncoder().encode(Td),e=await Dd(Nd,r,t);this.key=e}render(){if(!this.key)return A;const t=Gt.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
|
|
4155
|
+
`;var Ld=Object.defineProperty,Ed=Object.getOwnPropertyDescriptor,Js=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ed(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&Ld(t,e,s),s};const Nd="supersoniks_altcha",Td="Si2\\]X8M4!n9DCLd";let Co=!1;const Md="sonic-captcha";let Ve=class extends te(x){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=r=>{r=="request_token"&&(this.formPublisher&&(this.formPublisher.captchaToken=""),this.requestToken())},this.maxNumber=5e4,this.chalengeUrl="https://altcha.supersoniks.org/get-challenge"}connectedCallback(){if(document.location.protocol.includes("https")){if(!Co){const r=document.createElement("script");r.type="module",this.setAttribute("async",""),this.setAttribute("defer",""),r.src="https://eu.altcha.org/js/latest/altcha.min.js",Co=!0,document.head.appendChild(r)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=rt.get(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&!this.formPublisher.captchaToken.get()&&(this.formPublisher.needsCaptchaValidation=!0,this.formPublisher.captchaToken.onAssign(this.onCaptchaTokenChanged))}}disconnectedCallback(){this.formPublisher&&(this.formPublisher.captchaToken.offAssign(this.onCaptchaTokenChanged),this.formPublisher.captchaToken="",this.formPublisher.needsCaptchaValidation=!1),super.disconnectedCallback()}requestToken(){var e;if(!this.formPublisher)return;const r=this.shadowRoot.querySelector("form");if(!r)return;const t=new FormData(r);this.formPublisher.captchaKey=this.key,this.formPublisher.captchaToken=((e=t.get("altcha"))==null?void 0:e.toString())||""}async generateEncryptedKey(){if(this.key)return;const r=await Sd(),t=new TextEncoder().encode(Td),e=await Dd(Nd,r,t);this.key=e}render(){if(!this.key)return A;const t=Gt.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 m`
|
|
4155
4156
|
<form>
|
|
4156
4157
|
<altcha-widget
|
|
4157
4158
|
challengeurl="${this.chalengeUrl}?key=${this.key}&maxNumber=${this.maxNumber}"
|
|
@@ -4182,4 +4183,4 @@ ${this.value}</textarea
|
|
|
4182
4183
|
--altcha-color-footer-bg: var(--sc-base-100, #000);
|
|
4183
4184
|
--altcha-max-width: 260px;
|
|
4184
4185
|
}
|
|
4185
|
-
`],Js([l()],Ve.prototype,"key",2),Js([l()],Ve.prototype,"action",2),Js([l({type:Number})],Ve.prototype,"zIndex",2),Ve=Js([$(Md)],Ve),window.queueMicrotask=window.queueMicrotask||function(r){Promise.resolve().then(r).catch(t=>setTimeout(()=>{throw t}))};function Id(r){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(r)}function jd(r){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(r)}function Ao(r){if(r.__is__setSubscribable__)return;r.__is__setSubscribable__=!0,r.__onConnected__=Id,r.__onDisconnected__=jd;const t=r.connectedCallback;r.connectedCallback=function(){t.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(i=>i(this))};const e=r.disconnectedCallback;r.disconnectedCallback=function(){e.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(i=>i(this))}}function Fd(r){const t=r.split(".");if(t.length==0)return function(){};const e=t.shift()||"";let i=
|
|
4186
|
+
`],Js([l()],Ve.prototype,"key",2),Js([l()],Ve.prototype,"action",2),Js([l({type:Number})],Ve.prototype,"zIndex",2),Ve=Js([$(Md)],Ve),window.queueMicrotask=window.queueMicrotask||function(r){Promise.resolve().then(r).catch(t=>setTimeout(()=>{throw t}))};function Id(r){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(r)}function jd(r){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(r)}function Ao(r){if(r.__is__setSubscribable__)return;r.__is__setSubscribable__=!0,r.__onConnected__=Id,r.__onDisconnected__=jd;const t=r.connectedCallback;r.connectedCallback=function(){t.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(i=>i(this))};const e=r.disconnectedCallback;r.disconnectedCallback=function(){e.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(i=>i(this))}}function Fd(r){const t=r.split(".");if(t.length==0)return function(){};const e=t.shift()||"";let i=T.get(e);return i=ts.traverse(i,t),function(s,o){if(!s)return;let n;Ao(s),s.__onConnected__(a=>{n=c=>{a[o]=c},i.onAssign(n)}),s.__onDisconnected__(()=>{i.offAssign(n)})}}function zd(...r){const t=[],e=[];for(let i=0;i<r.length;i++){const o=r[i].split(".");if(o.length==0)continue;const n=o.shift()||"";let a=T.get(n);a=ts.traverse(a,o);const c=new Set,h=d=>{t[i]=d,t.filter(p=>p!==null).length==r.length&&c.forEach(p=>p(...t))};e.push({publisher:a,onAssign:h,callbacks:c})}return function(i,s,o){Ao(i);let n;i.__onConnected__(a=>{for(const c of e)n=o.value.bind(a),c.callbacks.add(n),c.publisher.onAssign(c.onAssign)}),i.__onDisconnected__(()=>{for(const a of e)a.callbacks.delete(n),a.publisher.offAssign(a.onAssign)})}}window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:Fd,onAssing:zd},window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:Lr,dataProvider:cn,sub:an,subscribe:nn,get:ln,set:hn};const Rd=k,Ud=F;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:Rd,SonicModal:Ud};const Vd=window;Vd.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))});
|