@supersoniks/concorde 3.1.72 → 3.1.74
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 +216 -201
- package/concorde-core.es.js +533 -519
- package/dist/concorde-core.bundle.js +216 -201
- package/dist/concorde-core.es.js +533 -519
- package/package.json +1 -1
- package/src/core/components/ui/modal/modal.ts +15 -0
- package/src/core/components/ui/pop/pop.ts +6 -1
- package/src/core/utils/HTML.ts +12 -11
package/concorde-core.bundle.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
(function(K){typeof define=="function"&&define.amd?define(K):K()})(function(){"use strict";var Dt,k,L,ko,t,G;let K=class Vt{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Vt.getAncestorAttributeValue(t,"token"),i=Vt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Vt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Vt.getAncestorAttributeValue(t,"tokenProvider"),c=Vt.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Vt.getAncestorAttributeValue(t,"userName"),n=Vt.getAncestorAttributeValue(t,"password"));const h=Vt.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),p=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:p}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Vt.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}};const si=r=>{const t=document.documentElement,s=new MutationObserver(e=>{for(let o of e)o.type==="attributes"&&o.attributeName==="lang"&&r()}),i={attributes:!0,attributeFilter:["lang"]};s.observe(t,i)};let ws=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=K.getLanguage());const e=(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]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),a&&c.push(o(s,"minute",i)(a)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}},Mo=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,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 De="sonic";typeof __SONIC_PREFIX__>"u"&&(De="sonic"+Math.floor(Math.random()*1e6));const ii=De=="sonic"?"publisher-proxies-data":De+"-publisher-proxies-data";let ri=(Dt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==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(s=>s()),this._is_savable_&&!E.changed){E.changed=!0,E.saveId++;const s=E.saveId;setTimeout(()=>E.getInstance().saveToLocalStorage(s),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(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&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 s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,s=!1){var e,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(((e=this.parent)==null?void 0:e.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_(s),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(E.modifiedCollectore.length>0&&E.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),"<"+De+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+De+"-publisher-proxy>"}},Dt.instances=new Map,Dt.instancesCounter=0,Dt),E=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.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(ii),e=null;if(i&&(e=await this.decompress(i,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(ii,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 s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+K.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled",e=(s==null?void 0:s.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&&(s!=null&&s.expirationDelayMs&&(o._expiration_delay_=s.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),e&&(o._invalidate_on_page_show_=e),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+K.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(ii,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),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,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,a=new n.DecompressionStream(s),c=a.writable.getWriter();c.write(o),c.close();const h=await new Response(a.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Wed Jun 04 2025 15:33:49 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);if(typeof window<"u"){const r=window;r[xs+"PublisherManager"]=r[xs+"PublisherManager"]||E}const Io=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 ri{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Io.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.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_",e),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_",e),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 e}getProperty(t,s){return t[s]}}class jo extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=ri.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(De+"-publisher-proxy",jo)}catch{}window.addEventListener("pageshow",r=>{r.persisted&&E.getInstance().invalidateAll()});let Ps=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=K.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=E.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let p=i;p=L.getSubPublisher(i,d);const g=t,v={publisher:p,onAssign:()=>{const b=a.variables.map(D=>{var f;return(f=L.getSubPublisher(i,D))==null?void 0:f.get()});let y=a.expression,S=!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&&(S=!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),_=ws[f];y=S?"":_?_(u):y}}else y=S?"":y;g[c]=y}};p==null||p.onAssign(v.onAssign),o.push(v)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);Ps.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ps);let tt=class Zt{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n];if(i?a!==c:a!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[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,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Zt.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Zt.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Zt.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Zt.getURLSearchArray(t,"").join("&")}};const pt=tt.traverseDotNotation;/**
|
|
1
|
+
(function(K){typeof define=="function"&&define.amd?define(K):K()})(function(){"use strict";var Dt,k,L,ko,t,X;let K=class Vt{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);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,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Vt.getAncestorAttributeValue(t,"token"),i=Vt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Vt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Vt.getAncestorAttributeValue(t,"tokenProvider"),c=Vt.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Vt.getAncestorAttributeValue(t,"userName"),n=Vt.getAncestorAttributeValue(t,"password"));const h=Vt.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),p=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:p}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Vt.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}};const si=r=>{const t=document.documentElement,s=new MutationObserver(e=>{for(let o of e)o.type==="attributes"&&o.attributeName==="lang"&&r()}),i={attributes:!0,attributeFilter:["lang"]};s.observe(t,i)};let ws=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=K.getLanguage());const e=(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]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),a&&c.push(o(s,"minute",i)(a)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}},Mo=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,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 De="sonic";typeof __SONIC_PREFIX__>"u"&&(De="sonic"+Math.floor(Math.random()*1e6));const ii=De=="sonic"?"publisher-proxies-data":De+"-publisher-proxies-data";let ri=(Dt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==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(s=>s()),this._is_savable_&&!E.changed){E.changed=!0,E.saveId++;const s=E.saveId;setTimeout(()=>E.getInstance().saveToLocalStorage(s),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(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&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 s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,s=!1){var e,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(((e=this.parent)==null?void 0:e.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_(s),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(E.modifiedCollectore.length>0&&E.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),"<"+De+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+De+"-publisher-proxy>"}},Dt.instances=new Map,Dt.instancesCounter=0,Dt),E=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.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(ii),e=null;if(i&&(e=await this.decompress(i,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(ii,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 s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+K.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled",e=(s==null?void 0:s.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&&(s!=null&&s.expirationDelayMs&&(o._expiration_delay_=s.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),e&&(o._invalidate_on_page_show_=e),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+K.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(ii,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),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,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,a=new n.DecompressionStream(s),c=a.writable.getWriter();c.write(o),c.close();const h=await new Response(a.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Thu Jun 05 2025 16:10:26 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);if(typeof window<"u"){const r=window;r[xs+"PublisherManager"]=r[xs+"PublisherManager"]||E}const Io=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 ri{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Io.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.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_",e),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_",e),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 e}getProperty(t,s){return t[s]}}class jo extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=ri.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(De+"-publisher-proxy",jo)}catch{}window.addEventListener("pageshow",r=>{r.persisted&&E.getInstance().invalidateAll()});let Ps=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=K.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=E.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let p=i;p=L.getSubPublisher(i,d);const g=t,v={publisher:p,onAssign:()=>{const b=a.variables.map(D=>{var f;return(f=L.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)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);Ps.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ps);let tt=class Zt{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n];if(i?a!==c:a!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[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,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Zt.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Zt.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Zt.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Zt.getURLSearchArray(t,"").join("&")}};const pt=tt.traverseDotNotation;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const $=r=>(t,s)=>{s!==void 0?s.addInitializer(()=>{customElements.define(r,t)}):customElements.define(r,t)};/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2019 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const As=globalThis,oi=As.ShadowRoot&&(As.ShadyCSS===void 0||As.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ni=Symbol(),nr=new WeakMap;let ar=class{constructor(t,s,i){if(this._$cssResult$=!0,i!==ni)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const s=this.t;if(oi&&t===void 0){const i=s!==void 0&&s.length===1;i&&(t=nr.get(s)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&nr.set(s,t))}return t}toString(){return this.cssText}};const Fo=r=>new ar(typeof r=="string"?r:r+"",void 0,ni)
|
|
9
|
+
*/const As=globalThis,oi=As.ShadowRoot&&(As.ShadyCSS===void 0||As.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ni=Symbol(),nr=new WeakMap;let ar=class{constructor(t,s,i){if(this._$cssResult$=!0,i!==ni)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const s=this.t;if(oi&&t===void 0){const i=s!==void 0&&s.length===1;i&&(t=nr.get(s)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&nr.set(s,t))}return t}toString(){return this.cssText}};const Fo=r=>new ar(typeof r=="string"?r:r+"",void 0,ni),P=(r,...t)=>{const s=r.length===1?r[0]:t.reduce((i,e,o)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+r[o+1],r[0]);return new ar(s,r,ni)},zo=(r,t)=>{if(oi)r.adoptedStyleSheets=t.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(const s of t){const i=document.createElement("style"),e=As.litNonce;e!==void 0&&i.setAttribute("nonce",e),i.textContent=s.cssText,r.appendChild(i)}},lr=oi?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let s="";for(const i of t.cssRules)s+=i.cssText;return Fo(s)})(r):r;/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const{is:Ro,defineProperty:Uo,getOwnPropertyDescriptor:Vo,getOwnPropertyNames:Ho,getOwnPropertySymbols:Bo,getPrototypeOf:qo}=Object,
|
|
13
|
+
*/const{is:Ro,defineProperty:Uo,getOwnPropertyDescriptor:Vo,getOwnPropertyNames:Ho,getOwnPropertySymbols:Bo,getPrototypeOf:qo}=Object,Xt=globalThis,cr=Xt.trustedTypes,Wo=cr?cr.emptyScript:"",ai=Xt.reactiveElementPolyfillSupport,qe=(r,t)=>r,Cs={toAttribute(r,t){switch(t){case Boolean:r=r?Wo:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let s=r;switch(t){case Boolean:s=r!==null;break;case Number:s=r===null?null:Number(r);break;case Object:case Array:try{s=JSON.parse(r)}catch{s=null}}return s}},li=(r,t)=>!Ro(r,t),hr={attribute:!0,type:String,converter:Cs,reflect:!1,hasChanged:li};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Xt.litPropertyMetadata??(Xt.litPropertyMetadata=new WeakMap);let ke=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,s=hr){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),e=this.getPropertyDescriptor(t,i,s);e!==void 0&&Uo(this.prototype,t,e)}}static getPropertyDescriptor(t,s,i){const{get:e,set:o}=Vo(this.prototype,t)??{get(){return this[s]},set(n){this[s]=n}};return{get(){return e==null?void 0:e.call(this)},set(n){const a=e==null?void 0:e.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=qo(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 s=this.properties,i=[...Ho(s),...Bo(s)];for(const e of i)this.createProperty(e,s[e])}const t=this[Symbol.metadata];if(t!==null){const s=litPropertyMetadata.get(t);if(s!==void 0)for(const[i,e]of s)this.elementProperties.set(i,e)}this._$Eh=new Map;for(const[s,i]of this.elementProperties){const e=this._$Eu(s,i);e!==void 0&&this._$Eh.set(e,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const e of i)s.unshift(lr(e))}else t!==void 0&&s.push(lr(t));return s}static _$Eu(t,s){const i=s.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(s=>this.enableUpdating=s),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(s=>s(this))}addController(t){var s;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var s;(s=this._$EO)==null||s.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.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 zo(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostDisconnected)==null?void 0:i.call(s)})}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EC(t,s){var o;const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(e!==void 0&&i.reflect===!0){const n=(((o=i.converter)==null?void 0:o.toAttribute)!==void 0?i.converter:Cs).toAttribute(s,i.type);this._$Em=t,n==null?this.removeAttribute(e):this.setAttribute(e,n),this._$Em=null}}_$AK(t,s){var o;const i=this.constructor,e=i._$Eh.get(t);if(e!==void 0&&this._$Em!==e){const n=i.getPropertyOptions(e),a=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)==null?void 0:o.fromAttribute)!==void 0?n.converter:Cs;this._$Em=e,this[e]=a.fromAttribute(s,n.type),this._$Em=null}}requestUpdate(t,s,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??li)(this[t],s))return;this.P(t,s,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}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 e=this.constructor.elementProperties;if(e.size>0)for(const[o,n]of e)n.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],n)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),(i=this._$EO)==null||i.forEach(e=>{var o;return(o=e.hostUpdate)==null?void 0:o.call(e)}),this.update(s)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(s)}willUpdate(t){}_$AE(t){var s;(s=this._$EO)==null||s.forEach(i=>{var e;return(e=i.hostUpdated)==null?void 0:e.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(s=>this._$EC(s,this[s]))),this._$EU()}updated(t){}firstUpdated(t){}};ke.elementStyles=[],ke.shadowRootOptions={mode:"open"},ke[qe("elementProperties")]=new Map,ke[qe("finalized")]=new Map,ai==null||ai({ReactiveElement:ke}),(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
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
41
|
*/const We=globalThis,Ss=We.trustedTypes,dr=Ss?Ss.createPolicy("lit-html",{createHTML:r=>r}):void 0,hi="$lit$",Ht=`lit$${Math.random().toFixed(9).slice(2)}$`,di="?"+Ht,Zo=`<${di}>`,he=document,Ke=()=>he.createComment(""),Ye=r=>r===null||typeof r!="object"&&typeof r!="function",pi=Array.isArray,pr=r=>pi(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",ui=`[
|
|
42
42
|
\f\r]`,Ze=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ur=/-->/g,fr=/>/g,de=RegExp(`>|${ui}(?:([^\\s"'>=/]+)(${ui}*=${ui}*(?:[^
|
|
43
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),mr=/'/g,gr=/"/g,br=/^(?:script|style|textarea|title)$/i,
|
|
43
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),mr=/'/g,gr=/"/g,br=/^(?:script|style|textarea|title)$/i,Xo=r=>(t,...s)=>({_$litType$:r,strings:t,values:s}),m=Xo(1),yt=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),vr=new WeakMap,pe=he.createTreeWalker(he,129);function yr(r,t){if(!pi(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return dr!==void 0?dr.createHTML(t):t}const _r=(r,t)=>{const s=r.length-1,i=[];let e,o=t===2?"<svg>":t===3?"<math>":"",n=Ze;for(let a=0;a<s;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])&&(e=RegExp("</"+d[2],"g")),n=de):d[3]!==void 0&&(n=de):n===de?d[0]===">"?(n=e??Ze,p=-1):d[1]===void 0?p=-2:(p=n.lastIndex-d[2].length,h=d[1],n=d[3]===void 0?de:d[3]==='"'?gr:mr):n===gr||n===mr?n=de:n===ur||n===fr?n=Ze:(n=de,e=void 0);const v=n===de&&r[a+1].startsWith("/>")?" ":"";o+=n===Ze?c+Zo:p>=0?(i.push(h),c.slice(0,p)+hi+c.slice(p)+Ht+v):c+Ht+(p===-2?a:v)}return[yr(r,o+(r[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};let fi=class No{constructor({strings:t,_$litType$:s},i){let e;this.parts=[];let o=0,n=0;const a=t.length-1,c=this.parts,[h,d]=_r(t,s);if(this.el=No.createElement(h,i),pe.currentNode=this.el.content,s===2||s===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(e=pe.nextNode())!==null&&c.length<a;){if(e.nodeType===1){if(e.hasAttributes())for(const p of e.getAttributeNames())if(p.endsWith(hi)){const g=d[n++],v=e.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}),e.removeAttribute(p)}else p.startsWith(Ht)&&(c.push({type:6,index:o}),e.removeAttribute(p));if(br.test(e.tagName)){const p=e.textContent.split(Ht),g=p.length-1;if(g>0){e.textContent=Ss?Ss.emptyScript:"";for(let v=0;v<g;v++)e.append(p[v],Ke()),pe.nextNode(),c.push({type:2,index:++o});e.append(p[g],Ke())}}}else if(e.nodeType===8)if(e.data===di)c.push({type:2,index:o});else{let p=-1;for(;(p=e.data.indexOf(Ht,p+1))!==-1;)c.push({type:7,index:o}),p+=Ht.length-1}o++}}static createElement(t,s){const i=he.createElement("template");return i.innerHTML=t,i}};function ue(r,t,s=r,i){var n,a;if(t===yt)return t;let e=i!==void 0?(n=s._$Co)==null?void 0:n[i]:s._$Cl;const o=Ye(t)?void 0:t._$litDirective$;return(e==null?void 0:e.constructor)!==o&&((a=e==null?void 0:e._$AO)==null||a.call(e,!1),o===void 0?e=void 0:(e=new o(r),e._$AT(r,s,i)),i!==void 0?(s._$Co??(s._$Co=[]))[i]=e:s._$Cl=e),e!==void 0&&(t=ue(r,e._$AS(r,t.values),e,i)),t}let wr=class{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:i}=this._$AD,e=((t==null?void 0:t.creationScope)??he).importNode(s,!0);pe.currentNode=e;let o=pe.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 Ar(o,this,t)),this._$AV.push(h),c=i[++a]}n!==(c==null?void 0:c.index)&&(o=pe.nextNode(),n++)}return pe.currentNode=he,e}p(t){let s=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,s),s+=i.strings.length-2):i._$AI(t[s])),s++}},Os=class To{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,s,i,e){this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=e,this._$Cv=(e==null?void 0:e.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=ue(this,t,s),Ye(t)?t===C||t==null||t===""?(this._$AH!==C&&this._$AR(),this._$AH=C):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!==C&&Ye(this._$AH)?this._$AA.nextSibling.data=t:this.T(he.createTextNode(t)),this._$AH=t}$(t){var o;const{values:s,_$litType$:i}=t,e=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=fi.createElement(yr(i.h,i.h[0]),this.options)),i);if(((o=this._$AH)==null?void 0:o._$AD)===e)this._$AH.p(s);else{const n=new wr(e,this),a=n.u(this.options);n.p(s),this.T(a),this._$AH=n}}_$AC(t){let s=vr.get(t.strings);return s===void 0&&vr.set(t.strings,s=new fi(t)),s}k(t){pi(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,e=0;for(const o of t)e===s.length?s.push(i=new To(this.O(Ke()),this.O(Ke()),this,this.options)):i=s[e],i._$AI(o),e++;e<s.length&&(this._$AR(i&&i._$AB.nextSibling,e),s.length=e)}_$AR(t=this._$AA.nextSibling,s){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,s);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var s;this._$AM===void 0&&(this._$Cv=t,(s=this._$AP)==null||s.call(this,t))}},Xe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,i,e,o){this.type=1,this._$AH=C,this._$AN=void 0,this.element=t,this.name=s,this._$AM=e,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=C}_$AI(t,s=this,i,e){const o=this.strings;let n=!1;if(o===void 0)t=ue(this,t,s,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=ue(this,a[i+c],s,c),h===yt&&(h=this._$AH[c]),n||(n=!Ye(h)||h!==this._$AH[c]),h===C?t=C:t!==C&&(t+=(h??"")+o[c+1]),this._$AH[c]=h}n&&!e&&this.j(t)}j(t){t===C?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===C?void 0:t}}let $r=class extends Xe{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==C)}};class Pr extends Xe{constructor(t,s,i,e,o){super(t,s,i,e,o),this.type=5}_$AI(t,s=this){if((t=ue(this,t,s,0)??C)===yt)return;const i=this._$AH,e=t===C&&i!==C||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==C&&(i===C||e);e&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var s;typeof this._$AH=="function"?this._$AH.call(((s=this.options)==null?void 0:s.host)??this.element,t):this._$AH.handleEvent(t)}}let Ar=class{constructor(t,s,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){ue(this,t)}};const Go={M:hi,P:Ht,A:di,C:1,L:_r,R:wr,D:pr,V:ue,I:Os,H:Xe,N:$r,U:Pr,B:xr,F:Ar},mi=We.litHtmlPolyfillSupport;mi==null||mi(fi,Os),(We.litHtmlVersions??(We.litHtmlVersions=[])).push("3.2.1");const Qo=(r,t,s)=>{const i=(s==null?void 0:s.renderBefore)??t;let e=i._$litPart$;if(e===void 0){const o=(s==null?void 0:s.renderBefore)??null;i._$litPart$=e=new Os(t.insertBefore(Ke(),o),o,void 0,s??{})}return e._$AI(r),e};/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2020 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/const{I:Jo}=
|
|
47
|
+
*/const{I:Jo}=Go,tn=r=>r.strings===void 0,Cr=()=>document.createComment(""),Ge=(r,t,s)=>{var o;const i=r._$AA.parentNode,e=t===void 0?r._$AB:t._$AA;if(s===void 0){const n=i.insertBefore(Cr(),e),a=i.insertBefore(Cr(),e);s=new Jo(n,a,r,r.options)}else{const n=s._$AB.nextSibling,a=s._$AM,c=a!==r;if(c){let h;(o=s._$AQ)==null||o.call(s,r),s._$AM=r,s._$AP!==void 0&&(h=r._$AU)!==a._$AU&&s._$AP(h)}if(n!==e||c){let h=s._$AA;for(;h!==n;){const d=h.nextSibling;i.insertBefore(h,e),h=d}}}return s},fe=(r,t,s=r)=>(r._$AI(t,s),r),en={},sn=(r,t=en)=>r._$AH=t,rn=r=>r._$AH,gi=r=>{var i;(i=r._$AP)==null||i.call(r,!1,!0);let t=r._$AA;const s=r._$AB.nextSibling;for(;t!==s;){const e=t.nextSibling;t.remove(),t=e}};/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -56,24 +56,24 @@
|
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2017 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
|
-
*/let
|
|
59
|
+
*/let x=class extends ke{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var s;const t=super.createRenderRoot();return(s=this.renderOptions).renderBefore??(s.renderBefore=t.firstChild),t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Qo(s,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,(ko=globalThis.litElementHydrateSupport)==null||ko.call(globalThis,{LitElement:x});const bi=globalThis.litElementPolyfillSupport;bi==null||bi({LitElement:x}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");function ks(r){if(typeof r=="function"){const t=r;return E.collectModifiedPublisher(),t(),E.getModifiedPublishers()||new Set}if(typeof r=="string"){const t=r.split("."),s=t.shift()||"";let i=E.get(s);i=tt.traverse(i,t);const e=new Set;return e.add(i),e}return new Set([r])}class ln extends Or{constructor(t){var s;super(t),this.observables=new Set,this.onAssign=i=>{this.setValue(i)},this.node=(s=t.options)==null?void 0:s.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=s=>{this.setValue(s)},this.observables=ks(t),this.observables.forEach(s=>{s.onAssign(this.onAssign)})}disconnected(){this.unsubscribe()}reconnected(){this.observable&&this.subscribe(this.observable)}}const Dr=me(ln),cn=Dr,hn=Dr,dn=r=>{var t;return(t=ks(r).values().next().value)==null?void 0:t.get()},kr=(r,t)=>{const s=ks(r).values().next().value;if(t!==void 0&&s){const i=s.get();tt.isEmpty(i)&&s.set(t)}return s},pn=kr,Lr=kr,un=(r,t)=>{var s;(s=ks(r).values().next().value)==null||s.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,s){var a;V.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=t;const i=(a=t.headers.get("content-type"))==null?void 0:a.toLowerCase(),e=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&&tt.isObject(o)&&(o._sonic_http_response_=t),e===498&&!V.failledTokenUpdates.has(this.serviceURL)&&(this.handleInvalidToken(this.token),s.apiMethod==="get"?o=await this[s.apiMethod](s.path,s.additionalHeaders):o=await this[s.apiMethod](s.path,s.data,s.method,s.additionalHeaders));const n=E.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 s=new URL(this.serviceURL),i=s.protocol+"//"+s.host,e=await fetch(this.computeURL(this.tokenProvider,{serviceHost:i}),{headers:t,credentials:this.credentials});try{const o=await e.json();o.token?this.token=o.token:V.failledTokenUpdates.set(this.serviceURL,!0)}catch{V.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(t,s){var p;const i=E.get(t),e=new URLSearchParams(s.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(e.has("limit")&&(c=parseInt(e.get("limit")||"0"),d++),e.has("offset")&&(h=parseInt(e.get("offset")||"0"),d++),d>0&&(e.delete("limit"),e.delete("offset")),e.size===0)return n.slice(h,h+c);for(const[g,v]of e.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 s=()=>{[void 0,"loading"].includes(V.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(s):t(!0)};s()}})}async get(t,s){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 e={apiMethod:"get",path:t,additionalHeaders:s},o=await this.createHeaders(s),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,e);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 s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=K.getLanguage(),t&&Object.assign(s,t),s}computeURL(t,s={}){let i="";t.startsWith("http")?i=t:i=this.serviceURL+"/"+t,i.startsWith("http")||(i=window.location.origin+i);const e=new URL(i);for(const o in s)e.searchParams.set(o,s[o]);return e.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(t,s,i="POST",e){const o={apiMethod:"send",path:t,additionalHeaders:e,method:i,data:s},n=await this.createHeaders(e);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(s)});return await this.handleResult(a,o)}async submitFormData(t,s,i="POST",e){const o={apiMethod:"submitFormData",path:t,additionalHeaders:e,method:i,data:s},n=await this.createHeaders(e);n.Accept="application/json";const a=new FormData,c=s;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,s,i){return this.send(t,s,"PUT",i)}async post(t,s,i){return this.send(t,s,"POST",i)}async patch(t,s,i){return this.send(t,s,"PATCH",i)}async delete(t,s,i){return this.send(t,s,"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 fn=async(r,t)=>{};/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
|
-
*/let vi=class extends Ee{constructor(t){if(super(t),this.it=
|
|
63
|
+
*/let vi=class extends Ee{constructor(t){if(super(t),this.it=C,t.type!==Le.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===C||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 s=[t];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};vi.directiveName="unsafeHTML",vi.resultType=1;const z=me(vi),yi=new Map,Er=r=>{if(!r)return null;const t=K.getApiConfiguration(r),s=K.getAncestorAttributeValue(r,"wordingProvider"),i=K.getAncestorAttributeValue(r,"wordingVersionProvider"),e={apiConfiguration:t,wordingProvider:s,wordingVersionProvider:i};let o=null;for(const[n,a]of yi)if(tt.deepEqual(n,e)){o=a;break}return o||(o={api:new Ne(t),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:s,callIndex:0,wordingVersionProvider:i,apiCallKey:e},yi.set(e,o)),o},Nr="",B=class B extends Or{constructor(t){super(t),this.useUnsafeHTML=!1,this.onAssign=s=>{const i=this.useUnsafeHTML?z(s):s;this.setValue(i)},this.node=t.options.host}unsubscribe(){B.publisher["wording_"+this.key].offAssign(this.onAssign)}render(t,s=!1){return this.useUnsafeHTML=s,this.key!==t&&(this.key=t,this.isConnected&&this.subscribe(t)),yt}static async callApi(t,s,i=!0,e){if(await E.getInstance().isLocalStrorageReady,B.firstCall){B.firstCall=!1,si(B.reloadWordings);const d=Object.keys(B.publisher.get());for(const p of d)B.publisher.get()[p]===Nr&&delete B.publisher[p]}if(t){const d=K.getAncestorAttributeValue(t,"wordingVersionProvider");d&&Lr(d).onAssign(B.handleVersionProvider(t))}let o=B.publisher.get()["wording_"+s]!=null;const n=e||Er(t);if(!n)return;if(o&&s!==""){n.translatedKeys.add(s);return}n.callIndex++;const a=n.callIndex,c=n.wordingProvider??"";if(!c&&i){window.setTimeout(async()=>{B.callApi(null,s,!1,n)},1e3);return}const h=n.api;window.queueMicrotask(async()=>{if(o=B.publisher["wording_"+s].get()!=null,!o&&s!==""&&(n.keysToTranslate.add(s),B.publisher["wording_"+s]=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)B.publisher["wording_"+_]=y[_]})}static reloadWordings(){for(const t of yi.values())t.keysToTranslate=new Set(t.translatedKeys),t.keysToTranslate.size>0&&B.callApi(null,"",!1,t)}static handleVersionProvider(t){const s=Er(t),i=o=>{};if(!s)return i;if(B.versionProviderHandlers.has(s))return B.versionProviderHandlers.get(s)||i;const e=function(o){if(!s.wordingVersionProvider)return;const a=B.publisher.get().__wording_versions__??[];if(o==null)return;const c=a.find(h=>h.serviceURL===s.api.serviceURL)||{serviceURL:s.api.serviceURL,version:0};a.includes(c)||a.push(c),o!==c.version&&(c.version=o,B.publisher.set({__wording_versions__:a}),B.reloadWordings())};return B.versionProviderHandlers.set(s,e),e}subscribe(t){this.unsubscribe(),B.publisher["wording_"+t].onAssign(this.onAssign),B.callApi(this.node,t)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};B.publisher=E.get("sonic-wording",{localStorageMode:"enabled"}),B.firstCall=!0,B.versionProviderHandlers=new Map;let Te=B;const mn=me(Te);var gn=Object.defineProperty,bn=Object.getOwnPropertyDescriptor,Lt=(r,t,s,i)=>{for(var e=i>1?void 0:i?bn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&gn(t,s,e),e};let Ls=!1,_i=new Set;const G=(r,t)=>{var e;const s=(e=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(e.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),_i.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(){_i.forEach(n=>{document.body.contains(n)&&document.body.removeChild(n)}),_i=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=E.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let a=this.dataProvider;if(!a&&this._props&&(this.dataProvider=a="__subscriber__"+e.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=tt.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))}},e.instanceCounter=0,e);return Lt([l({type:Number})],s.prototype,"collectDependenciesVersion",2),Lt([l({type:Boolean})],s.prototype,"displayContents",2),Lt([l({type:Boolean})],s.prototype,"noAutoFill",2),Lt([l({type:Boolean})],s.prototype,"forceAutoFill",2),Lt([l({type:Object})],s.prototype,"propertyMap",2),Lt([l({type:String,attribute:"data-title"})],s.prototype,"title",2),Lt([l({reflect:!0})],s.prototype,"dataProvider",2),Lt([l()],s.prototype,"bindPublisher",2),Lt([l()],s.prototype,"props",1),Lt([N()],s.prototype,"shouldRenderLazy",2),s};var vn=Object.defineProperty,yn=(r,t,s,i)=>{for(var e=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(t,s,e)||e);return e&&vn(t,s,e),e};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 e of i)e.hasAttribute(this.templateValueAttribute)&&(this.templateParts[e.getAttribute(this.templateValueAttribute)]=e,this.templatePartsList.push(e)),e.hasAttribute("skeleton")&&(this.templateParts.skeleton=e),e.hasAttribute("no-result")&&(this.templateParts["no-result"]=e),e.hasAttribute("no-item")&&(this.templateParts["no-item"]=e);this.templateList=i.filter(e=>!e.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=i),super.connectedCallback()}}return yn([l({type:Array})],t.prototype,"templates"),t};var _n=Object.defineProperty,wn=Object.getOwnPropertyDescriptor,Y=(r,t,s,i)=>{for(var e=i>1?void 0:i?wn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&_n(t,s,e),e};const xn="sonic-date";si(()=>R.updateComponentsLanguage());let R=class extends X(Je(w)){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(s=>s.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,s){const i=this.startDateObject;i.setTime(r*1e3);let e=[];if(t>0){const o=this.endDateObject;o.setTime(t*1e3);const n=i.toDateString()==o.toDateString();if((!n||this.hide_hours)&&(delete s.hour,delete s.minute),e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,o),!n){const c=e.find(h=>h.type=="literal"&&h.source=="shared"&&h.value.trim().length>0);c&&(c.value=" "+this.duAu[1]+" ",c.type="to"),this.designMode||e.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i);return this.designMode&&e.forEach(o=>o.value=o.value.replace(/,/g," ")),e[0].value=ws.ucFirst(e[0].value),e.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(s=>{const i=this.templateParts[s.type];if(i){const n=document.importNode(i.content,!0).children[0];return n.innerText.trim()==""&&(n.innerText=s.value),n.outerHTML}const e=document.createElement("span");return e.innerText=s.value,e.className=s.type,`<span class="${s.type}">${s.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([x(xn)],R);let lt=(G=class{static listen(){var s;if(!G.listening)return;const t=(s=document.location)==null?void 0:s.href.replace(document.location.origin,"");G.prevURL&&G.prevURL!=t&&(G.prevURL=t,G.listeners.forEach(i=>{i.location=t})),window.requestAnimationFrame(G.listen)}static offChange(t){const s=G.listeners.indexOf(t);s!=-1&&(G.listeners.splice(s,1),G.listeners.length==0&&(G.listening=!1))}static onChange(t){G.listening||(G.listening=!0,G.listen()),G.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){var h;const s=t.goBack,i=document.referrer;if(s!=null){const d=document.location.origin,p=(s||d).toString(),v=i.indexOf("http")==0?new URL(i).origin!=d:!1,b=i=="",y=history.length<3,S=b&&y,D=p!=document.location.href;if(v&&D||S){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 e=t.getAttribute("to")||"";if(e||(e=((h=t.href)==null?void 0:h.toString())||""),!e)return;if(e.indexOf("#")==0){document.location.hash=e.substring(1);return}const o=new URL(e,document.location.href),n=o.pathname.split("/"),a=[];let c="";for(const d of n)d!=c&&a.push(d),c=d;e="/"+a.join("/")+o.search+(o.hash?+o.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",e):t.hasAttribute("replaceState")?history.replaceState(null,"",e):document.location.href=e}static updateComponentActiveState(t){var i;if(t.autoActive=="disabled")return;const s=((i=t.href)==null?void 0:i.toString())||"";if(t.href&&s.indexOf("http")!=0){const e=new URL(s,document.location.href),o=new URL(t.location||"",document.location.origin);let n=!1;t.autoActive=="strict"?n=e.pathname==o.pathname&&e.hash==o.hash&&e.search==o.search:t.autoActive=="strict-path-only"?n=e.pathname==o.pathname&&e.hash==o.hash:n=o.href.indexOf(e.href)==0,n?t.setAttribute("active","true"):t.removeAttribute("active")}}},G.listeners=[],G.listening=!1,G.prevURL=(t=document.location)==null?void 0:t.href.replace(document.location.origin,""),G);/**
|
|
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(){_i.forEach(n=>{document.body.contains(n)&&document.body.removeChild(n)}),_i=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=E.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let a=this.dataProvider;if(!a&&this._props&&(this.dataProvider=a="__subscriber__"+e.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=tt.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))}},e.instanceCounter=0,e);return Lt([l({type:Number})],s.prototype,"collectDependenciesVersion",2),Lt([l({type:Boolean})],s.prototype,"displayContents",2),Lt([l({type:Boolean})],s.prototype,"noAutoFill",2),Lt([l({type:Boolean})],s.prototype,"forceAutoFill",2),Lt([l({type:Object})],s.prototype,"propertyMap",2),Lt([l({type:String,attribute:"data-title"})],s.prototype,"title",2),Lt([l({reflect:!0})],s.prototype,"dataProvider",2),Lt([l()],s.prototype,"bindPublisher",2),Lt([l()],s.prototype,"props",1),Lt([N()],s.prototype,"shouldRenderLazy",2),s};var vn=Object.defineProperty,yn=(r,t,s,i)=>{for(var e=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(t,s,e)||e);return e&&vn(t,s,e),e};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 e of i)e.hasAttribute(this.templateValueAttribute)&&(this.templateParts[e.getAttribute(this.templateValueAttribute)]=e,this.templatePartsList.push(e)),e.hasAttribute("skeleton")&&(this.templateParts.skeleton=e),e.hasAttribute("no-result")&&(this.templateParts["no-result"]=e),e.hasAttribute("no-item")&&(this.templateParts["no-item"]=e);this.templateList=i.filter(e=>!e.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=i),super.connectedCallback()}}return yn([l({type:Array})],t.prototype,"templates"),t};var _n=Object.defineProperty,wn=Object.getOwnPropertyDescriptor,Y=(r,t,s,i)=>{for(var e=i>1?void 0:i?wn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&_n(t,s,e),e};const xn="sonic-date";si(()=>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(s=>s.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,s){const i=this.startDateObject;i.setTime(r*1e3);let e=[];if(t>0){const o=this.endDateObject;o.setTime(t*1e3);const n=i.toDateString()==o.toDateString();if((!n||this.hide_hours)&&(delete s.hour,delete s.minute),e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,o),!n){const c=e.find(h=>h.type=="literal"&&h.source=="shared"&&h.value.trim().length>0);c&&(c.value=" "+this.duAu[1]+" ",c.type="to"),this.designMode||e.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i);return this.designMode&&e.forEach(o=>o.value=o.value.replace(/,/g," ")),e[0].value=ws.ucFirst(e[0].value),e.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 C;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(s=>{const i=this.templateParts[s.type];if(i){const n=document.importNode(i.content,!0).children[0];return n.innerText.trim()==""&&(n.innerText=s.value),n.outerHTML}const e=document.createElement("span");return e.innerText=s.value,e.className=s.type,`<span class="${s.type}">${s.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([$(xn)],R);let lt=(X=class{static listen(){var s;if(!X.listening)return;const t=(s=document.location)==null?void 0:s.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 s=X.listeners.indexOf(t);s!=-1&&(X.listeners.splice(s,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 s=t.goBack,i=document.referrer;if(s!=null){const d=document.location.origin,p=(s||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 e=t.getAttribute("to")||"";if(e||(e=((h=t.href)==null?void 0:h.toString())||""),!e)return;if(e.indexOf("#")==0){document.location.hash=e.substring(1);return}const o=new URL(e,document.location.href),n=o.pathname.split("/"),a=[];let c="";for(const d of n)d!=c&&a.push(d),c=d;e="/"+a.join("/")+o.search+(o.hash?+o.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",e):t.hasAttribute("replaceState")?history.replaceState(null,"",e):document.location.href=e}static updateComponentActiveState(t){var i;if(t.autoActive=="disabled")return;const s=((i=t.href)==null?void 0:i.toString())||"";if(t.href&&s.indexOf("http")!=0){const e=new URL(s,document.location.href),o=new URL(t.location||"",document.location.origin);let n=!1;t.autoActive=="strict"?n=e.pathname==o.pathname&&e.hash==o.hash&&e.search==o.search:t.autoActive=="strict-path-only"?n=e.pathname==o.pathname&&e.hash==o.hash:n=o.href.indexOf(e.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,gt=me(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,s)=>{const i=r[s];return i==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(r,[t]){const{style:s}=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("-")?s.removeProperty(i):s[i]=null);for(const i in t){const e=t[i];if(e!=null){this.ft.add(i);const o=typeof e=="string"&&e.endsWith($n);i.includes("-")||o?s.setProperty(i,o?e.slice(0,-11):e,o?Tr:""):s[i]=e}}return yt}});var Pn=Object.defineProperty,An=Object.getOwnPropertyDescriptor,Et=(r,t,s,i)=>{for(var e=i>1?void 0:i?An(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Pn(t,s,e),e};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=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=e=>{this.setValueFromPublisher(e)},this.onFormValueAssign=async e=>{this.setFormValueFromPublisher(e)},this.onFormDataInValidate=()=>{const e=this.getFormPublisher();e&&e.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?E.get(this.formDataProvider):null}setFormPublisherValue(i){const e=this.getFormPublisher();e&&pt(e,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=""),tt.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 e=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(),e&&(this.value=e)}handleBlur(){this.touched=!0}handleChange(i){this.value=i.target.value;const e=new Event("change");this.dispatchEvent(e)}addKeyboardNavigation(){const i=this.getAncestorAttributeValue("data-keyboard-nav");if(!i)return;const e=i.split(" "),o=e[0];if(!o)return;for(const a of e){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 S=window.getComputedStyle(y);return S.display!=="none"&&S.display!==""&&S.pointerEvents!="none"&&S.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 e;const i=(e=this.shadowRoot)==null?void 0:e.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})],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 Cn=class Oe{static areEqual(t,s){return t.length===s.length?t.every((i,e)=>i===s[e]):!1}static from2d(t){return{to1D:()=>{let s=[];return t.forEach(i=>s=s.concat(i)),this.from(s)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(t.length<1)return!0;const i=(t[0]||{})[s];return t.every(e=>(e||{})[s]==i)}})})}),value:()=>({forKey:s=>Oe.from(t.map(i=>i[s]))}),copy:()=>({fromKey:s=>({toKey:i=>{t.forEach(e=>{e[i]=Array.isArray(e[s])?[...e[s]]:typeof e[s]=="object"&&e[s]!=null?{...e[s]}:e[s]})}})})}),map:s=>Oe.from(t.map(s)),filter:s=>Oe.from(t.filter(s)),find:s=>t.find(s),some:s=>t.some(s),every:s=>t.every(s),group:()=>({byKey:s=>{const i=[],e=new Map;for(const o of t){const n=o[s];if(!e.has(n)){const a=i.length;e.set(n,a);const c={items:[]};c[s]=n,i.push(c)}i[e.get(n)].items.push(o)}return Oe.from(i)}}),without:()=>({duplicates:()=>({forKey:s=>{const i=[...new Set(t.map(e=>e[s]))];return Oe.from(i.map(e=>t.find(o=>o[s]==e)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:i=>{const e=(o,n)=>a=>o[n]!=a[n];return Oe.from(t.filter(o=>s.every(e(o,i))))}})})})}}};var Sn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function On(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var wi={exports:{}};(function(r,t){var s=[].slice;(function(i,e){return t!==null?r.exports=e():i.UrlPattern=e()})(Sn,function(){var i,e,o,n,a,c,h,d,p,g,v,b,y,S,D;return p=function(f){return f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},h=function(f,u){var _,C,O;for(O=[],_=-1,C=f.length;++_<C;)O=O.concat(u(f[_]));return O},S=function(f,u){var _,C,O;for(O="",_=-1,C=f.length;++_<C;)O+=u(f[_]);return O},y=function(f){return new RegExp(f.toString()+"|").exec("").length-1},v=function(f,u){var _,C,O,T,q;for(T={},_=-1,O=f.length;++_<O;)C=f[_],q=u[_],q!=null&&(T[C]!=null?(Array.isArray(T[C])||(T[C]=[T[C]]),T[C].push(q)):T[C]=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(_){var C,O;if(C=u(_),C!=null)return O=new i.Tagged(f,C.value),new i.Result(O,C.rest)}},i.regex=function(f){return function(u){var _,C;if(_=f.exec(u),_!=null)return C=_[0],new i.Result(C,u.slice(C.length))}},i.sequence=function(){var f;return f=1<=arguments.length?s.call(arguments,0):[],function(u){var _,C,O,T,q,W;for(_=-1,C=f.length,W=[],T=u;++_<C;){if(O=f[_],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?s.call(arguments,1):[],function(_){var C,O;if(O=i.sequence.apply(i,u)(_),O!=null)return C=O.value,O.value=C[f],O}},i.string=function(f){var u;return u=f.length,function(_){if(_.slice(0,u)===f)return new i.Result(f,_.slice(u))}},i.lazy=function(f){var u;return u=null,function(_){return u==null&&(u=f()),u(_)}},i.baseMany=function(f,u,_,C,O){var T,q,W,kt;for(W=O,kt=_?"":[];!(u!=null&&(T=u(W),T!=null)||(q=f(W),q==null));)_?kt+=q.value:kt.push(q.value),W=q.rest;if(!(C&&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(_){return i.baseMany(f,u,!0,!0,_)}},i.firstChoice=function(){var f;return f=1<=arguments.length?s.call(arguments,0):[],function(u){var _,C,O,T;for(_=-1,C=f.length;++_<C;)if(O=f[_],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 S(f,function(_){return c(_,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,_,C){var O,T,q,W;if(C==null&&(C=!1),W=f[u],W==null){if(C)throw new Error("no values provided for key `"+u+"`");return}if(O=_[u]||0,T=Array.isArray(W)?W.length-1:0,O>T){if(C)throw new Error("too few values provided for key `"+u+"`");return}return q=Array.isArray(W)?W[O]:W,C&&(_[u]=O+1),q},o=function(f,u,_){var C,O;if(Array.isArray(f)){for(C=-1,O=f.length;++C<O;)if(o(f[C],u,_))return!0;return!1}switch(f.tag){case"wildcard":return g(u,"_",_,!1)!=null;case"named":return g(u,f.value,_,!1)!=null;case"static":return!1;case"optional":return o(f.value,u,_)}},D=function(f,u,_){if(Array.isArray(f))return S(f,function(C){return D(C,u,_)});switch(f.tag){case"wildcard":return g(u,"_",_,!0);case"named":return g(u,f.value,_,!0);case"static":return f.value;case"optional":return o(f.value,u,_)?D(f.value,u,_):""}},e=function(f,u){var _,C,O,T,q;if(f instanceof e){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(_=y(this.regex),u.length!==_)throw new Error("regex contains "+_+" 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(C={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(C),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,C.segmentValueCharset)),this.names=n(this.ast)},e.prototype.match=function(f){var u,_;return _=this.regex.exec(f),_==null?null:(u=_.slice(1),this.names?v(this.names,u):u)},e.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,{})},e.escapeForRegex=p,e.concatMap=h,e.stringConcatMap=S,e.regexGroupCount=y,e.keysAndValuesToObject=v,e.P=i,e.newParser=b,e.defaultOptions=d,e.astNodeToRegexString=a,e.astNodeToNames=n,e.getParam=g,e.astNodeContainsSegmentsForProvidedParams=o,e.stringify=D,e})})(wi,wi.exports);var Dn=wi.exports;const Bt=On(Dn),kn=Mo,Ln=Cn,En=Ps,Nn=ws,Xt=K,Tn=lt,ts=tt,Mn=Be,it=E,In=Ne,jn=Bt;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:kn,Arrays:Ln,DataBindObserver:En,Format:Nn,HTML:Xt,LocationHandler:Tn,Objects:ts,PublisherProxy:Mn,PublisherManager:it,api:In,URLPattern:jn};var Fn=Object.defineProperty,zn=Object.getOwnPropertyDescriptor,es=(r,t,s,i)=>{for(var e=i>1?void 0:i?zn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Fn(t,s,e),e};const xi=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"),e=this.getCheckAllPublisher(),o=this.getFormPublisher();if(e!=null&&e.hasCheckAll.get()&&!this.checksAll()&&e&&o&&i){if((n=this.getFormPublisherValue())!=null&&n.length)(this.checked===null||e.checkMode.get()=="noneChecked"||e.checkMode.get()==null)&&(e.checkMode="someUnchecked");else{e.checkMode="noneChecked";return}const a=this.getFormPublisherValue(),c=e.values.get();if(c&&c.length){let h=c.length;for(const d of c)a.indexOf(d)==-1&&(h-=1);h==c.length&&(e.checkMode="allChecked"),h==0&&(e.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 e=this.getCheckAllPublisher();e&&(this.checked===!0?e.checkMode="allChecked":this.checked===null&&(e.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 e=this.getFormPublisher();if(e){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;e.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 e=new Event("change");this.dispatchEvent(e)}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 e=i.slice(0),o=e.indexOf(this.value);return this.checked===!0&&o===-1&&!this.checksAll()&&e.push(this.value),this.checked===null&&o!==-1&&e.splice(o,1),e}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,e=this.getAttribute("name");return!i||!e?null:it.get(i+"/"+e+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const i=this.getCheckAllPublisher();if(i&&(i.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const e=i.values.get().slice(0),o=e.indexOf(this.value);o!=-1&&(e.splice(o,1),i.values=e)}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 e=this.getCheckAllPublisher();e&&(e.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&(e.hasCheckAll=!0),e.values.get()||(e.values=[]),this.checksAll()||(e.values=[...e.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,gt=me(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,s)=>{const i=r[s];return i==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(r,[t]){const{style:s}=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("-")?s.removeProperty(i):s[i]=null);for(const i in t){const e=t[i];if(e!=null){this.ft.add(i);const o=typeof e=="string"&&e.endsWith($n);i.includes("-")||o?s.setProperty(i,o?e.slice(0,-11):e,o?Tr:""):s[i]=e}}return yt}});var Pn=Object.defineProperty,An=Object.getOwnPropertyDescriptor,Et=(r,t,s,i)=>{for(var e=i>1?void 0:i?An(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Pn(t,s,e),e};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=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=e=>{this.setValueFromPublisher(e)},this.onFormValueAssign=async e=>{this.setFormValueFromPublisher(e)},this.onFormDataInValidate=()=>{const e=this.getFormPublisher();e&&e.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?E.get(this.formDataProvider):null}setFormPublisherValue(i){const e=this.getFormPublisher();e&&pt(e,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=""),tt.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 e=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(),e&&(this.value=e)}handleBlur(){this.touched=!0}handleChange(i){this.value=i.target.value;const e=new Event("change");this.dispatchEvent(e)}addKeyboardNavigation(){const i=this.getAncestorAttributeValue("data-keyboard-nav");if(!i)return;const e=i.split(" "),o=e[0];if(!o)return;for(const a of e){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 e;const i=(e=this.shadowRoot)==null?void 0:e.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})],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 Cn=class Oe{static areEqual(t,s){return t.length===s.length?t.every((i,e)=>i===s[e]):!1}static from2d(t){return{to1D:()=>{let s=[];return t.forEach(i=>s=s.concat(i)),this.from(s)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(t.length<1)return!0;const i=(t[0]||{})[s];return t.every(e=>(e||{})[s]==i)}})})}),value:()=>({forKey:s=>Oe.from(t.map(i=>i[s]))}),copy:()=>({fromKey:s=>({toKey:i=>{t.forEach(e=>{e[i]=Array.isArray(e[s])?[...e[s]]:typeof e[s]=="object"&&e[s]!=null?{...e[s]}:e[s]})}})})}),map:s=>Oe.from(t.map(s)),filter:s=>Oe.from(t.filter(s)),find:s=>t.find(s),some:s=>t.some(s),every:s=>t.every(s),group:()=>({byKey:s=>{const i=[],e=new Map;for(const o of t){const n=o[s];if(!e.has(n)){const a=i.length;e.set(n,a);const c={items:[]};c[s]=n,i.push(c)}i[e.get(n)].items.push(o)}return Oe.from(i)}}),without:()=>({duplicates:()=>({forKey:s=>{const i=[...new Set(t.map(e=>e[s]))];return Oe.from(i.map(e=>t.find(o=>o[s]==e)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:i=>{const e=(o,n)=>a=>o[n]!=a[n];return Oe.from(t.filter(o=>s.every(e(o,i))))}})})})}}};var Sn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function On(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var wi={exports:{}};(function(r,t){var s=[].slice;(function(i,e){return t!==null?r.exports=e():i.UrlPattern=e()})(Sn,function(){var i,e,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,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?s.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?s.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?s.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)}},g=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 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):""}},e=function(f,u){var w,S,O,T,q;if(f instanceof e){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)},e.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)},e.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,{})},e.escapeForRegex=p,e.concatMap=h,e.stringConcatMap=_,e.regexGroupCount=y,e.keysAndValuesToObject=v,e.P=i,e.newParser=b,e.defaultOptions=d,e.astNodeToRegexString=a,e.astNodeToNames=n,e.getParam=g,e.astNodeContainsSegmentsForProvidedParams=o,e.stringify=D,e})})(wi,wi.exports);var Dn=wi.exports;const Bt=On(Dn),kn=Mo,Ln=Cn,En=Ps,Nn=ws,Gt=K,Tn=lt,ts=tt,Mn=Be,it=E,In=Ne,jn=Bt;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:kn,Arrays:Ln,DataBindObserver:En,Format:Nn,HTML:Gt,LocationHandler:Tn,Objects:ts,PublisherProxy:Mn,PublisherManager:it,api:In,URLPattern:jn};var Fn=Object.defineProperty,zn=Object.getOwnPropertyDescriptor,es=(r,t,s,i)=>{for(var e=i>1?void 0:i?zn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Fn(t,s,e),e};const xi=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"),e=this.getCheckAllPublisher(),o=this.getFormPublisher();if(e!=null&&e.hasCheckAll.get()&&!this.checksAll()&&e&&o&&i){if((n=this.getFormPublisherValue())!=null&&n.length)(this.checked===null||e.checkMode.get()=="noneChecked"||e.checkMode.get()==null)&&(e.checkMode="someUnchecked");else{e.checkMode="noneChecked";return}const a=this.getFormPublisherValue(),c=e.values.get();if(c&&c.length){let h=c.length;for(const d of c)a.indexOf(d)==-1&&(h-=1);h==c.length&&(e.checkMode="allChecked"),h==0&&(e.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 e=this.getCheckAllPublisher();e&&(this.checked===!0?e.checkMode="allChecked":this.checked===null&&(e.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 e=this.getFormPublisher();if(e){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;e.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 e=new Event("change");this.dispatchEvent(e)}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 e=i.slice(0),o=e.indexOf(this.value);return this.checked===!0&&o===-1&&!this.checksAll()&&e.push(this.value),this.checked===null&&o!==-1&&e.splice(o,1),e}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,e=this.getAttribute("name");return!i||!e?null:it.get(i+"/"+e+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const i=this.getCheckAllPublisher();if(i&&(i.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const e=i.values.get().slice(0),o=e.indexOf(this.value);o!=-1&&(e.splice(o,1),i.values=e)}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 e=this.getCheckAllPublisher();e&&(e.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&(e.hasCheckAll=!0),e.values.get()||(e.values=[]),this.checksAll()||(e.values=[...e.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
|
|
76
|
-
*/const
|
|
76
|
+
*/const A=r=>r??C,Nt=P`
|
|
77
77
|
/*SIZES*/
|
|
78
78
|
:host {
|
|
79
79
|
--sc-_fs: 1rem;
|
|
@@ -106,15 +106,15 @@
|
|
|
106
106
|
:host([size="inherit"]) {
|
|
107
107
|
--sc-_fs: 1em;
|
|
108
108
|
}
|
|
109
|
-
`;var Rn=Object.defineProperty,Un=Object.getOwnPropertyDescriptor,H=(r,t,s,i)=>{for(var e=i>1?void 0:i?Un(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Rn(t,s,e),e};const Vn="sonic-button";let I=class extends xi(Me(
|
|
109
|
+
`;var Rn=Object.defineProperty,Un=Object.getOwnPropertyDescriptor,H=(r,t,s,i)=>{for(var e=i>1?void 0:i?Un(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Rn(t,s,e),e};const Vn="sonic-button";let I=class extends xi(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?lt.onChange(this):lt.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(r){r.preventDefault(),lt.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(),lt.changeFromComponent(this)),this.hasAttribute("reset"))){const t=this.getAttribute("reset"),s=t?it.get(t):this.getFormPublisher();s&&s.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(){lt.offChange(this),super.disconnectedCallback()}willUpdate(r){(r.has("href")||r.has("autoActive"))&<.updateComponentActiveState(this),r.has("location")&<.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":""}
|
|
113
113
|
style=${gt(r)}
|
|
114
|
-
aria-controls=${
|
|
115
|
-
aria-expanded=${
|
|
116
|
-
aria-label=${
|
|
117
|
-
aria-labelledby=${
|
|
114
|
+
aria-controls=${A(this.ariaControls)}
|
|
115
|
+
aria-expanded=${A(this.sonicAriaExpanded)}
|
|
116
|
+
aria-label=${A(this.ariaLabel)}
|
|
117
|
+
aria-labelledby=${A(this.ariaLabelledby)}
|
|
118
118
|
@click=${this.handleChange}
|
|
119
119
|
@pointerdown=${this.handleRepeatStart}
|
|
120
120
|
>
|
|
@@ -133,13 +133,13 @@
|
|
|
133
133
|
</button>
|
|
134
134
|
`;return this.href?m`<a
|
|
135
135
|
href="${this.href}"
|
|
136
|
-
download=${
|
|
137
|
-
target=${
|
|
138
|
-
aria-label=${
|
|
139
|
-
aria-labelledby=${
|
|
136
|
+
download=${A(this.download)}
|
|
137
|
+
target=${A(this.target)}
|
|
138
|
+
aria-label=${A(this.ariaLabel)}
|
|
139
|
+
aria-labelledby=${A(this.ariaLabelledby)}
|
|
140
140
|
@click=${this.pushState||this.goBack!==null?this.handleNavigation:null}
|
|
141
141
|
>${t}</a
|
|
142
|
-
>`: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
|
|
142
|
+
>`: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`
|
|
143
143
|
* {
|
|
144
144
|
box-sizing: border-box;
|
|
145
145
|
}
|
|
@@ -505,21 +505,21 @@
|
|
|
505
505
|
transform: translate(-50%, -50%) rotate(359deg);
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
|
-
`],H([l({type:String,reflect:!0})],I.prototype,"type",2),H([l({type:String,reflect:!0})],I.prototype,"variant",2),H([l({type:String,reflect:!0})],I.prototype,"size",2),H([l({type:String,reflect:!0})],I.prototype,"shape",2),H([l({type:String})],I.prototype,"direction",2),H([l({type:String,reflect:!0})],I.prototype,"alignItems",2),H([l({type:String})],I.prototype,"justify",2),H([l({type:String,reflect:!0})],I.prototype,"align",2),H([l({type:String})],I.prototype,"minWidth",2),H([l({type:Boolean,reflect:!0})],I.prototype,"icon",2),H([l({type:String})],I.prototype,"download",2),H([l({type:String})],I.prototype,"autoActive",2),H([l({type:Boolean,reflect:!0})],I.prototype,"loading",2),H([N()],I.prototype,"hasPrefix",2),H([N()],I.prototype,"hasSuffix",2),H([ce({flatten:!0,slot:"prefix"})],I.prototype,"prefixes",2),H([ce({flatten:!0,slot:"suffix"})],I.prototype,"suffixes",2),H([l({type:String})],I.prototype,"target",2),H([l({type:String})],I.prototype,"href",1),H([l({type:String})],I.prototype,"goBack",2),H([l({type:Boolean})],I.prototype,"pushState",2),H([l({type:Boolean,reflect:!0})],I.prototype,"active",2),H([l({type:Boolean,reflect:!0})],I.prototype,"autoRepeat",2),H([l({type:String,attribute:"data-aria-controls"})],I.prototype,"ariaControls",2),H([l({type:Boolean,attribute:"data-aria-expanded"})],I.prototype,"sonicAriaExpanded",2),H([N()],I.prototype,"location",2),I=H([
|
|
508
|
+
`],H([l({type:String,reflect:!0})],I.prototype,"type",2),H([l({type:String,reflect:!0})],I.prototype,"variant",2),H([l({type:String,reflect:!0})],I.prototype,"size",2),H([l({type:String,reflect:!0})],I.prototype,"shape",2),H([l({type:String})],I.prototype,"direction",2),H([l({type:String,reflect:!0})],I.prototype,"alignItems",2),H([l({type:String})],I.prototype,"justify",2),H([l({type:String,reflect:!0})],I.prototype,"align",2),H([l({type:String})],I.prototype,"minWidth",2),H([l({type:Boolean,reflect:!0})],I.prototype,"icon",2),H([l({type:String})],I.prototype,"download",2),H([l({type:String})],I.prototype,"autoActive",2),H([l({type:Boolean,reflect:!0})],I.prototype,"loading",2),H([N()],I.prototype,"hasPrefix",2),H([N()],I.prototype,"hasSuffix",2),H([ce({flatten:!0,slot:"prefix"})],I.prototype,"prefixes",2),H([ce({flatten:!0,slot:"suffix"})],I.prototype,"suffixes",2),H([l({type:String})],I.prototype,"target",2),H([l({type:String})],I.prototype,"href",1),H([l({type:String})],I.prototype,"goBack",2),H([l({type:Boolean})],I.prototype,"pushState",2),H([l({type:Boolean,reflect:!0})],I.prototype,"active",2),H([l({type:Boolean,reflect:!0})],I.prototype,"autoRepeat",2),H([l({type:String,attribute:"data-aria-controls"})],I.prototype,"ariaControls",2),H([l({type:Boolean,attribute:"data-aria-expanded"})],I.prototype,"sonicAriaExpanded",2),H([N()],I.prototype,"location",2),I=H([$(Vn)],I);/**
|
|
509
509
|
* @license
|
|
510
510
|
* Copyright 2017 Google LLC
|
|
511
511
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
512
|
-
*/const Mr=(r,t,s)=>{const i=new Map;for(let e=t;e<=s;e++)i.set(r[e],e);return i},Ns=me(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,s){let i;s===void 0?s=t:t!==void 0&&(i=t);const e=[],o=[];let n=0;for(const a of r)e[n]=i?i(a,n):n,o[n]=s(a,n),n++;return{values:o,keys:e}}render(r,t,s){return this.dt(r,t,s).values}update(r,[t,s,i]){const e=rn(r),{values:o,keys:n}=this.dt(t,s,i);if(!Array.isArray(e))return this.ut=n,o;const a=this.ut??(this.ut=[]),c=[];let h,d,p=0,g=e.length-1,v=0,b=o.length-1;for(;p<=g&&v<=b;)if(e[p]===null)p++;else if(e[g]===null)g--;else if(a[p]===n[v])c[v]=fe(e[p],o[v]),p++,v++;else if(a[g]===n[b])c[b]=fe(e[g],o[b]),g--,b--;else if(a[p]===n[b])c[b]=fe(e[p],o[b]),
|
|
512
|
+
*/const Mr=(r,t,s)=>{const i=new Map;for(let e=t;e<=s;e++)i.set(r[e],e);return i},Ns=me(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,s){let i;s===void 0?s=t:t!==void 0&&(i=t);const e=[],o=[];let n=0;for(const a of r)e[n]=i?i(a,n):n,o[n]=s(a,n),n++;return{values:o,keys:e}}render(r,t,s){return this.dt(r,t,s).values}update(r,[t,s,i]){const e=rn(r),{values:o,keys:n}=this.dt(t,s,i);if(!Array.isArray(e))return this.ut=n,o;const a=this.ut??(this.ut=[]),c=[];let h,d,p=0,g=e.length-1,v=0,b=o.length-1;for(;p<=g&&v<=b;)if(e[p]===null)p++;else if(e[g]===null)g--;else if(a[p]===n[v])c[v]=fe(e[p],o[v]),p++,v++;else if(a[g]===n[b])c[b]=fe(e[g],o[b]),g--,b--;else if(a[p]===n[b])c[b]=fe(e[p],o[b]),Ge(r,c[b+1],e[p]),p++,b--;else if(a[g]===n[v])c[v]=fe(e[g],o[v]),Ge(r,e[p],e[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?e[y]:null;if(_===null){const D=Ge(r,e[p]);fe(D,o[v]),c[v]=D}else c[v]=fe(_,o[v]),Ge(r,e[p],_),e[y]=null;v++}else gi(e[g]),g--;else gi(e[p]),p++;for(;v<=b;){const y=Ge(r,c[b+1]);fe(y,o[v]),c[v++]=y}for(;p<=g;){const y=e[p++];y!==null&&gi(y)}return this.ut=n,sn(r,c),yt}});/**
|
|
513
513
|
* @license
|
|
514
514
|
* Copyright 2017 Google LLC
|
|
515
515
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
516
516
|
*/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,Hn=`<${Fr}>`,ge=document,Ms=()=>ge.createComment(""),is=r=>r===null||typeof r!="object"&&typeof r!="function",$i=Array.isArray,Bn=r=>$i(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",Pi=`[
|
|
517
517
|
\f\r]`,rs=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zr=/-->/g,Rr=/>/g,be=RegExp(`>|${Pi}(?:([^\\s"'>=/]+)(${Pi}*=${Pi}*(?:[^
|
|
518
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ur=/'/g,Vr=/"/g,Hr=/^(?:script|style|textarea|title)$/i,os=Symbol.for("lit-noChange"),et=Symbol.for("lit-nothing"),Br=new WeakMap,ve=ge.createTreeWalker(ge,129);function qr(r,t){if(!$i(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ir!==void 0?Ir.createHTML(t):t}const qn=(r,t)=>{const s=r.length-1,i=[];let e,o=t===2?"<svg>":t===3?"<math>":"",n=rs;for(let a=0;a<s;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?(Hr.test(d[2])&&(e=RegExp("</"+d[2],"g")),n=be):d[3]!==void 0&&(n=be):n===be?d[0]===">"?(n=e??rs,p=-1):d[1]===void 0?p=-2:(p=n.lastIndex-d[2].length,h=d[1],n=d[3]===void 0?be:d[3]==='"'?Vr:Ur):n===Vr||n===Ur?n=be:n===zr||n===Rr?n=rs:(n=be,e=void 0);const v=n===be&&r[a+1].startsWith("/>")?" ":"";o+=n===rs?c+Hn: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[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class ns{constructor({strings:t,_$litType$:s},i){let e;this.parts=[];let o=0,n=0;const a=t.length-1,c=this.parts,[h,d]=qn(t,s);if(this.el=ns.createElement(h,i),ve.currentNode=this.el.content,s===2||s===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(e=ve.nextNode())!==null&&c.length<a;){if(e.nodeType===1){if(e.hasAttributes())for(const p of e.getAttributeNames())if(p.endsWith(jr)){const g=d[n++],v=e.getAttribute(p).split(Qt),b=/([.?@])?(.*)/.exec(g);c.push({type:1,index:o,name:b[2],strings:v,ctor:b[1]==="."?Kn:b[1]==="?"?Yn:b[1]==="@"?Zn:js}),e.removeAttribute(p)}else p.startsWith(Qt)&&(c.push({type:6,index:o}),e.removeAttribute(p));if(Hr.test(e.tagName)){const p=e.textContent.split(Qt),g=p.length-1;if(g>0){e.textContent=Ts?Ts.emptyScript:"";for(let v=0;v<g;v++)e.append(p[v],Ms()),ve.nextNode(),c.push({type:2,index:++o});e.append(p[g],Ms())}}}else if(e.nodeType===8)if(e.data===Fr)c.push({type:2,index:o});else{let p=-1;for(;(p=e.data.indexOf(Qt,p+1))!==-1;)c.push({type:7,index:o}),p+=Qt.length-1}o++}}static createElement(t,s){const i=ge.createElement("template");return i.innerHTML=t,i}}function Ie(r,t,s=r,i){var n,a;if(t===os)return t;let e=i!==void 0?(n=s.o)==null?void 0:n[i]:s.l;const o=is(t)?void 0:t._$litDirective$;return(e==null?void 0:e.constructor)!==o&&((a=e==null?void 0:e._$AO)==null||a.call(e,!1),o===void 0?e=void 0:(e=new o(r),e._$AT(r,s,i)),i!==void 0?(s.o??(s.o=[]))[i]=e:s.l=e),e!==void 0&&(t=Ie(r,e._$AS(r,t.values),e,i)),t}let Wn=class{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:i}=this._$AD,e=((t==null?void 0:t.creationScope)??ge).importNode(s,!0);ve.currentNode=e;let o=ve.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
|
|
518
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ur=/'/g,Vr=/"/g,Hr=/^(?:script|style|textarea|title)$/i,os=Symbol.for("lit-noChange"),et=Symbol.for("lit-nothing"),Br=new WeakMap,ve=ge.createTreeWalker(ge,129);function qr(r,t){if(!$i(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ir!==void 0?Ir.createHTML(t):t}const qn=(r,t)=>{const s=r.length-1,i=[];let e,o=t===2?"<svg>":t===3?"<math>":"",n=rs;for(let a=0;a<s;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?(Hr.test(d[2])&&(e=RegExp("</"+d[2],"g")),n=be):d[3]!==void 0&&(n=be):n===be?d[0]===">"?(n=e??rs,p=-1):d[1]===void 0?p=-2:(p=n.lastIndex-d[2].length,h=d[1],n=d[3]===void 0?be:d[3]==='"'?Vr:Ur):n===Vr||n===Ur?n=be:n===zr||n===Rr?n=rs:(n=be,e=void 0);const v=n===be&&r[a+1].startsWith("/>")?" ":"";o+=n===rs?c+Hn: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[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class ns{constructor({strings:t,_$litType$:s},i){let e;this.parts=[];let o=0,n=0;const a=t.length-1,c=this.parts,[h,d]=qn(t,s);if(this.el=ns.createElement(h,i),ve.currentNode=this.el.content,s===2||s===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(e=ve.nextNode())!==null&&c.length<a;){if(e.nodeType===1){if(e.hasAttributes())for(const p of e.getAttributeNames())if(p.endsWith(jr)){const g=d[n++],v=e.getAttribute(p).split(Qt),b=/([.?@])?(.*)/.exec(g);c.push({type:1,index:o,name:b[2],strings:v,ctor:b[1]==="."?Kn:b[1]==="?"?Yn:b[1]==="@"?Zn:js}),e.removeAttribute(p)}else p.startsWith(Qt)&&(c.push({type:6,index:o}),e.removeAttribute(p));if(Hr.test(e.tagName)){const p=e.textContent.split(Qt),g=p.length-1;if(g>0){e.textContent=Ts?Ts.emptyScript:"";for(let v=0;v<g;v++)e.append(p[v],Ms()),ve.nextNode(),c.push({type:2,index:++o});e.append(p[g],Ms())}}}else if(e.nodeType===8)if(e.data===Fr)c.push({type:2,index:o});else{let p=-1;for(;(p=e.data.indexOf(Qt,p+1))!==-1;)c.push({type:7,index:o}),p+=Qt.length-1}o++}}static createElement(t,s){const i=ge.createElement("template");return i.innerHTML=t,i}}function Ie(r,t,s=r,i){var n,a;if(t===os)return t;let e=i!==void 0?(n=s.o)==null?void 0:n[i]:s.l;const o=is(t)?void 0:t._$litDirective$;return(e==null?void 0:e.constructor)!==o&&((a=e==null?void 0:e._$AO)==null||a.call(e,!1),o===void 0?e=void 0:(e=new o(r),e._$AT(r,s,i)),i!==void 0?(s.o??(s.o=[]))[i]=e:s.l=e),e!==void 0&&(t=Ie(r,e._$AS(r,t.values),e,i)),t}let Wn=class{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:i}=this._$AD,e=((t==null?void 0:t.creationScope)??ge).importNode(s,!0);ve.currentNode=e;let o=ve.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 Xn(o,this,t)),this._$AV.push(h),c=i[++a]}n!==(c==null?void 0:c.index)&&(o=ve.nextNode(),n++)}return ve.currentNode=ge,e}p(t){let s=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,s),s+=i.strings.length-2):i._$AI(t[s])),s++}};class Is{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this.v}constructor(t,s,i,e){this.type=2,this._$AH=et,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=e,this.v=(e==null?void 0:e.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=Ie(this,t,s),is(t)?t===et||t==null||t===""?(this._$AH!==et&&this._$AR(),this._$AH=et):t!==this._$AH&&t!==os&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Bn(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!==et&&is(this._$AH)?this._$AA.nextSibling.data=t:this.T(ge.createTextNode(t)),this._$AH=t}$(t){var o;const{values:s,_$litType$:i}=t,e=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)===e)this._$AH.p(s);else{const n=new Wn(e,this),a=n.u(this.options);n.p(s),this.T(a),this._$AH=n}}_$AC(t){let s=Br.get(t.strings);return s===void 0&&Br.set(t.strings,s=new ns(t)),s}k(t){$i(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,e=0;for(const o of t)e===s.length?s.push(i=new Is(this.O(Ms()),this.O(Ms()),this,this.options)):i=s[e],i._$AI(o),e++;e<s.length&&(this._$AR(i&&i._$AB.nextSibling,e),s.length=e)}_$AR(t=this._$AA.nextSibling,s){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,s);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var s;this._$AM===void 0&&(this.v=t,(s=this._$AP)==null||s.call(this,t))}}class js{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,i,e,o){this.type=1,this._$AH=et,this._$AN=void 0,this.element=t,this.name=s,this._$AM=e,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=et}_$AI(t,s=this,i,e){const o=this.strings;let n=!1;if(o===void 0)t=Ie(this,t,s,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],s,c),h===os&&(h=this._$AH[c]),n||(n=!is(h)||h!==this._$AH[c]),h===et?t=et:t!==et&&(t+=(h??"")+o[c+1]),this._$AH[c]=h}n&&!e&&this.j(t)}j(t){t===et?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Kn extends js{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===et?void 0:t}}class Yn extends js{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==et)}}class Zn extends js{constructor(t,s,i,e,o){super(t,s,i,e,o),this.type=5}_$AI(t,s=this){if((t=Ie(this,t,s,0)??et)===os)return;const i=this._$AH,e=t===et&&i!==et||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==et&&(i===et||e);e&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var s;typeof this._$AH=="function"?this._$AH.call(((s=this.options)==null?void 0:s.host)??this.element,t):this._$AH.handleEvent(t)}}class Xn{constructor(t,s,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Ie(this,t)}}const Ai=ss.litHtmlPolyfillSupport;Ai==null||Ai(ns,Is),(ss.litHtmlVersions??(ss.litHtmlVersions=[])).push("3.2.0");/**
|
|
519
519
|
* @license
|
|
520
520
|
* Copyright 2017 Google LLC
|
|
521
521
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
522
|
-
*/const Wr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},
|
|
522
|
+
*/const Wr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Gn=r=>(...t)=>({_$litDirective$:r,values:t});let Qn=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,i){this.t=t,this._$AM=s,this.i=i}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}};/**
|
|
523
523
|
* @license
|
|
524
524
|
* Copyright 2020 Google LLC
|
|
525
525
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -527,7 +527,7 @@
|
|
|
527
527
|
* @license
|
|
528
528
|
* Copyright 2017 Google LLC
|
|
529
529
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
530
|
-
*/const as=(r,t)=>{var i;const s=r._$AN;if(s===void 0)return!1;for(const e of s)(i=e._$AO)==null||i.call(e,t,!1),as(e,t);return!0},Fs=r=>{let t,s;do{if((t=r._$AM)===void 0)break;s=t._$AN,s.delete(r),r=t}while((s==null?void 0:s.size)===0)},Kr=r=>{for(let t;t=r._$AM;r=t){let s=t._$AN;if(s===void 0)t._$AN=s=new Set;else if(s.has(r))break;s.add(r),sa(t)}};function ta(r){this._$AN!==void 0?(Fs(this),this._$AM=r,Kr(this)):this._$AM=r}function ea(r,t=!1,s=0){const i=this._$AH,e=this._$AN;if(e!==void 0&&e.size!==0)if(t)if(Array.isArray(i))for(let o=s;o<i.length;o++)as(i[o],!1),Fs(i[o]);else i!=null&&(as(i,!1),Fs(i));else as(this,r)}const sa=r=>{r.type==Wr.CHILD&&(r._$AP??(r._$AP=ea),r._$AQ??(r._$AQ=ta))};class ia extends Qn{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,s,i){super._$AT(t,s,i),Kr(this),this.isConnected=t._$AU}_$AO(t,s=!0){var i,e;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(e=this.disconnected)==null||e.call(this)),s&&(as(this,t),Fs(this))}setValue(t){if(Jn(this.t))this.t._$AI(t,this);else{const s=[...this.t._$AH];s[this.i]=t,this.t._$AI(s,this,0)}}disconnected(){}reconnected(){}}const ra=new WeakMap;let Yr=0;const Ci=new Map,Zr=new WeakSet,
|
|
530
|
+
*/const as=(r,t)=>{var i;const s=r._$AN;if(s===void 0)return!1;for(const e of s)(i=e._$AO)==null||i.call(e,t,!1),as(e,t);return!0},Fs=r=>{let t,s;do{if((t=r._$AM)===void 0)break;s=t._$AN,s.delete(r),r=t}while((s==null?void 0:s.size)===0)},Kr=r=>{for(let t;t=r._$AM;r=t){let s=t._$AN;if(s===void 0)t._$AN=s=new Set;else if(s.has(r))break;s.add(r),sa(t)}};function ta(r){this._$AN!==void 0?(Fs(this),this._$AM=r,Kr(this)):this._$AM=r}function ea(r,t=!1,s=0){const i=this._$AH,e=this._$AN;if(e!==void 0&&e.size!==0)if(t)if(Array.isArray(i))for(let o=s;o<i.length;o++)as(i[o],!1),Fs(i[o]);else i!=null&&(as(i,!1),Fs(i));else as(this,r)}const sa=r=>{r.type==Wr.CHILD&&(r._$AP??(r._$AP=ea),r._$AQ??(r._$AQ=ta))};class ia extends Qn{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,s,i){super._$AT(t,s,i),Kr(this),this.isConnected=t._$AU}_$AO(t,s=!0){var i,e;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(e=this.disconnected)==null||e.call(this)),s&&(as(this,t),Fs(this))}setValue(t){if(Jn(this.t))this.t._$AI(t,this);else{const s=[...this.t._$AH];s[this.i]=t,this.t._$AI(s,this,0)}}disconnected(){}reconnected(){}}const ra=new WeakMap;let Yr=0;const Ci=new Map,Zr=new WeakSet,Xr=()=>new Promise(r=>requestAnimationFrame(r)),Gr=[{opacity:0}],Qr=[{opacity:0},{opacity:1}],Jr=(r,t)=>{const s=r-t;return s===0?void 0:s},to=(r,t)=>{const s=r/t;return s===1?void 0:s},Si={left:(r,t)=>{const s=Jr(r,t);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(r,t)=>{const s=Jr(r,t);return{value:s,transform:s==null||isNaN(s)?void 0:`translateY(${s}px)`}},width:(r,t)=>{let s;t===0&&(t=1,s={width:"1px"});const i=to(r,t);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(r,t)=>{let s;t===0&&(t=1,s={height:"1px"});const i=to(r,t);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},oa={duration:333,easing:"ease-in-out"},na=["left","top","width","height","opacity","color","background"],eo=new WeakMap;class aa extends ia{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(s=>{this.l=s})}async resolveFinished(){var t;(t=this.l)==null||t.call(this),this.l=void 0}render(t){return et}getController(){return ra.get(this.u)}isDisabled(){var t;return this.options.disabled||((t=this.getController())==null?void 0:t.disabled)}update(t,[s]){var e;const i=this.u===void 0;return i&&(this.u=(e=t.options)==null?void 0:e.host,this.u.addController(this),this.u.updateComplete.then(o=>this.t=!0),this.element=t.element,eo.set(this.element,this)),this.optionsOrCallback=s,(i||typeof s!="function")&&this.p(s),this.render(s)}p(t){t=t??{};const s=this.getController();s!==void 0&&((t={...s.defaultOptions,...t}).keyframeOptions={...s.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=na),this.options=t}m(){const t={},s=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(e=>{const o=s[e]??(Si[e]?void 0:i[e]),n=Number(o);t[e]=isNaN(n)?o+"":n}),t}v(){let t,s=!0;return this.options.guard&&(t=this.options.guard(),s=((i,e)=>{if(Array.isArray(i)){if(Array.isArray(e)&&e.length===i.length&&i.every((o,n)=>o===e[n]))return!1}else if(e===i)return!1;return!0})(t,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&s&&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 s=this.O(),i=this.j(this.options.keyframeOptions,s),e=this.m();if(this.A!==void 0){const{from:o,to:n}=this.N(this.A,e,s);this.log("measured",[this.A,e,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,e,s);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,s;this.P=this.element.getAttribute("style"),(t=this.webAnimation)==null||t.commitStyles(),(s=this.webAnimation)==null||s.cancel()}reconnected(){}async disconnected(){var s;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(),(s=this.i)==null?void 0:s.isConnected){const i=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,i),this.options.stabilizeOut){const e=this.m();this.log("stabilizing out");const o=this.A.left-e.left,n=this.A.top-e.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,s;(s=(t=this.options).onStart)==null||s.call(t,this)}didFinish(t){var s,i;t&&((i=(s=this.options).onComplete)==null||i.call(s,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const t=[];for(let s=this.element.parentNode;s;s=s==null?void 0:s.parentNode){const i=eo.get(s);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,s=this.O()){const i={...oa};return s.forEach(e=>Object.assign(i,e.options.keyframeOptions)),Object.assign(i,t),i}N(t,s,i){t={...t},s={...s};const e=i.map(a=>a.animatingProperties).filter(a=>a!==void 0);let o=1,n=1;return e.length>0&&(e.forEach(a=>{a.width&&(o/=a.width),a.height&&(n/=a.height)}),t.left!==void 0&&s.left!==void 0&&(t.left=o*t.left,s.left=o*s.left),t.top!==void 0&&s.top!==void 0&&(t.top=n*t.top,s.top=n*s.top)),{from:t,to:s}}calculateKeyframes(t,s,i=!1){const e={},o={};let n=!1;const a={};for(const c in s){const h=t[c],d=s[c];if(c in Si){const p=Si[c];if(h===void 0||d===void 0)continue;const g=p(h,d);g.transform!==void 0&&(a[c]=g.value,n=!0,e.transform=`${e.transform??""} ${g.transform}`,g.overrideFrom!==void 0&&Object.assign(e,g.overrideFrom))}else h!==d&&h!==void 0&&d!==void 0&&(n=!0,e[c]=h,o[c]=d)}return e.transformOrigin=o.transformOrigin=i?"center center":"top left",this.animatingProperties=a,n?[e,o]:void 0}async animate(t,s=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,s]),i=!0,this.webAnimation=this.element.animate(t,s);const e=this.getController();e==null||e.add(this);try{await this.webAnimation.finished}catch{}e==null||e.remove(this)}return this.didFinish(i),i}isAnimating(){var t,s;return((t=this.webAnimation)==null?void 0:t.playState)==="running"||((s=this.webAnimation)==null?void 0:s.pending)}log(t,s){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,s)}}const zs=Gn(aa),la={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">
|
|
531
531
|
<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"/>
|
|
532
532
|
</svg>
|
|
533
533
|
`,"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">
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
<path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
564
564
|
<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"/>
|
|
565
565
|
</svg>
|
|
566
|
-
`}},Rs=new Map,Us={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 so=!1;function ca(){var r,t;so||(so=!0,Us.custom.url=((r=document.querySelector("[customIconLibraryPath]"))==null?void 0:r.getAttribute("customIconLibraryPath"))||"",Us.custom.defaultPrefix=((t=document.querySelector("[customIconDefaultPrefix]"))==null?void 0:t.getAttribute("customIconDefaultPrefix"))||"")}const io=sessionStorage.getItem("sonicIconsCache"),Jt=io?JSON.parse(io):{icons:{},names:[]},ha=100,ir=class ir{};ir.default={get:async t=>{const s=t.library;if(!t.name)return"";const i=t.name,e=la;if(s=="custom"&&ca(),s&&s in Us){const o=Us[s],n=t.prefix||o.defaultPrefix||"",a=e[s]||{};e[s]=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(!Rs.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{fn(),g(null)}});Rs.set(h,p)}const d=await Rs.get(h);if(Rs.delete(h),a[c]=d||"",Jt.icons[h]=d||"",Jt.names.length>ha){const p=Jt.names.shift();delete Jt.icons[p]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(Jt)),z(d)}return z(e.core[t.name]||"")}};let Oi=ir;var da=Object.defineProperty,pa=Object.getOwnPropertyDescriptor,ls=(r,t,s,i)=>{for(var e=i>1?void 0:i?pa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&da(t,s,e),e};const ua="sonic-icon";let ye=class extends
|
|
566
|
+
`}},Rs=new Map,Us={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 so=!1;function ca(){var r,t;so||(so=!0,Us.custom.url=((r=document.querySelector("[customIconLibraryPath]"))==null?void 0:r.getAttribute("customIconLibraryPath"))||"",Us.custom.defaultPrefix=((t=document.querySelector("[customIconDefaultPrefix]"))==null?void 0:t.getAttribute("customIconDefaultPrefix"))||"")}const io=sessionStorage.getItem("sonicIconsCache"),Jt=io?JSON.parse(io):{icons:{},names:[]},ha=100,ir=class ir{};ir.default={get:async t=>{const s=t.library;if(!t.name)return"";const i=t.name,e=la;if(s=="custom"&&ca(),s&&s in Us){const o=Us[s],n=t.prefix||o.defaultPrefix||"",a=e[s]||{};e[s]=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(!Rs.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{fn(),g(null)}});Rs.set(h,p)}const d=await Rs.get(h);if(Rs.delete(h),a[c]=d||"",Jt.icons[h]=d||"",Jt.names.length>ha){const p=Jt.names.shift();delete Jt.icons[p]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(Jt)),z(d)}return z(e.core[t.name]||"")}};let Oi=ir;var da=Object.defineProperty,pa=Object.getOwnPropertyDescriptor,ls=(r,t,s,i)=>{for(var e=i>1?void 0:i?pa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&da(t,s,e),e};const ua="sonic-icon";let ye=class extends x{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library=""}async updateIcon(){this.iconText=await Oi.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:C}};ye.styles=P`
|
|
567
567
|
:host {
|
|
568
568
|
line-height: 0.1em;
|
|
569
569
|
width: fit-content;
|
|
@@ -612,7 +612,7 @@
|
|
|
612
612
|
:host([size="3xl"]) svg {
|
|
613
613
|
--sc-icon-size: 2.8em;
|
|
614
614
|
}
|
|
615
|
-
`,ls([N()],ye.prototype,"iconText",2),ls([l({type:String})],ye.prototype,"name",2),ls([l({type:String})],ye.prototype,"prefix",2),ls([l({type:String})],ye.prototype,"library",2),ye=ls([
|
|
615
|
+
`,ls([N()],ye.prototype,"iconText",2),ls([l({type:String})],ye.prototype,"name",2),ls([l({type:String})],ye.prototype,"prefix",2),ls([l({type:String})],ye.prototype,"library",2),ye=ls([$(ua)],ye);const cs=P`
|
|
616
616
|
.custom-scroll {
|
|
617
617
|
overflow: auto !important;
|
|
618
618
|
overflow-y: overlay !important;
|
|
@@ -634,7 +634,7 @@
|
|
|
634
634
|
border: solid 0.15rem transparent;
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
`;var fa=Object.defineProperty,ma=Object.getOwnPropertyDescriptor,Tt=(r,t,s,i)=>{for(var e=i>1?void 0:i?ma(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&fa(t,s,e),e};const ga={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},ba="sonic-toast-item";let xt=class extends
|
|
637
|
+
`;var fa=Object.defineProperty,ma=Object.getOwnPropertyDescriptor,Tt=(r,t,s,i)=>{for(var e=i>1?void 0:i?ma(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&fa(t,s,e),e};const ga={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},ba="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 C}return this.visible?m`<div
|
|
638
638
|
class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"
|
|
639
639
|
>
|
|
640
640
|
<button
|
|
@@ -662,7 +662,7 @@
|
|
|
662
662
|
|
|
663
663
|
${this.preserve?"":this.autoHide()}
|
|
664
664
|
</div>
|
|
665
|
-
</div>`:
|
|
665
|
+
</div>`:C}hide(){if(Gt.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever){const r=localStorage.getItem("sonic-toast-dismissed")||"{}",t=JSON.parse(r);t[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(t))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout(()=>{this.hide()},6e3)}};xt.styles=[cs,P`
|
|
666
666
|
* {
|
|
667
667
|
box-sizing: border-box;
|
|
668
668
|
}
|
|
@@ -842,7 +842,7 @@
|
|
|
842
842
|
opacity: 0.85;
|
|
843
843
|
pointer-events: none;
|
|
844
844
|
}
|
|
845
|
-
`],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([N()],xt.prototype,"visible",2),xt=Tt([
|
|
845
|
+
`],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([N()],xt.prototype,"visible",2),xt=Tt([$(ba)],xt);const va=P`
|
|
846
846
|
:host {
|
|
847
847
|
/* POLICES */
|
|
848
848
|
/*
|
|
@@ -913,7 +913,7 @@
|
|
|
913
913
|
--sc-contrast-content: #fff;
|
|
914
914
|
--sc-contrast: #000000;
|
|
915
915
|
}
|
|
916
|
-
`,ya
|
|
916
|
+
`,ya=P`
|
|
917
917
|
:host([theme="light"]) {
|
|
918
918
|
/*Boutons*/
|
|
919
919
|
--sc-primary: var(--sc-base-800);
|
|
@@ -942,7 +942,7 @@
|
|
|
942
942
|
--sc-base-900: #0f172a;
|
|
943
943
|
--sc-base-content: var(--sc-base-700);
|
|
944
944
|
}
|
|
945
|
-
`,ro
|
|
945
|
+
`,ro=P`
|
|
946
946
|
--sc-primary: var(--sc-dark-primary, var(--sc-base-700));
|
|
947
947
|
--sc-info: var(--sc-dark-info, #3abff8);
|
|
948
948
|
--sc-danger: var(--sc-dark-danger, #f87272);
|
|
@@ -967,7 +967,7 @@
|
|
|
967
967
|
--sc-base-800: var(--sc-dark-base-800, #d9dce0);
|
|
968
968
|
--sc-base-900: var(--sc-dark-base-900, #e5e7eb);
|
|
969
969
|
--sc-base-content: var(--sc-dark-base-content, #e5e7eb);
|
|
970
|
-
`,_a
|
|
970
|
+
`,_a=P`
|
|
971
971
|
:host([theme="dark"]) {
|
|
972
972
|
${ro}
|
|
973
973
|
}
|
|
@@ -977,7 +977,7 @@
|
|
|
977
977
|
${ro}
|
|
978
978
|
}
|
|
979
979
|
}
|
|
980
|
-
`;var wa=Object.defineProperty,xa=Object.getOwnPropertyDescriptor,hs=(r,t,s,i)=>{for(var e=i>1?void 0:i?xa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&wa(t,s,e),e};const $a="sonic-theme";let _t=class extends
|
|
980
|
+
`;var wa=Object.defineProperty,xa=Object.getOwnPropertyDescriptor,hs=(r,t,s,i)=>{for(var e=i>1?void 0:i?xa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&wa(t,s,e),e};const $a="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 e;const r=document.styleSheets,t=r.length,s=[];for(let o=0;o<t;o++){const n=r[o];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const i={variables:this.getCssVariables(),fonts:s};(e=it.get("sonic-theme"))==null||e.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(e=>e.styleSheet),...Array.from(document.styleSheets)];for(const e of t)try{if(!e)continue;const o=e.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 s=window.getComputedStyle(this),i={};return r.forEach(e=>i[e]=s.getPropertyValue(e)),i}render(){return m`<slot></slot>`}};_t.styles=[ya,_a,va,P`
|
|
981
981
|
:host([color]) {
|
|
982
982
|
color: var(--sc-base-content, #000);
|
|
983
983
|
}
|
|
@@ -1009,16 +1009,16 @@
|
|
|
1009
1009
|
transition-property: scale, opacity;
|
|
1010
1010
|
transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
|
|
1011
1011
|
}
|
|
1012
|
-
`],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([
|
|
1012
|
+
`],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([$($a)],_t);var Pa=Object.defineProperty,Aa=Object.getOwnPropertyDescriptor,oo=(r,t,s,i)=>{for(var e=i>1?void 0:i?Aa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Pa(t,s,e),e};const Ca="sonic-toast";let M=class extends x{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const t=window.parent!=window;let s={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return t||(s={...s,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),M.handleExistingToastDelegation(),this.toasts?m`<div aria-live="polite" style=${gt(s)}>
|
|
1013
1013
|
${Ns(this.toasts,i=>i.id,i=>m`
|
|
1014
1014
|
<sonic-toast-item
|
|
1015
1015
|
maxHeight=${t?"none":"10rem"}
|
|
1016
|
-
status=${
|
|
1017
|
-
title=${
|
|
1016
|
+
status=${A(i.status)}
|
|
1017
|
+
title=${A(i.title)}
|
|
1018
1018
|
?ghost=${i.ghost}
|
|
1019
1019
|
?dismissForever=${i.dismissForever}
|
|
1020
1020
|
?preserve=${i.preserve}
|
|
1021
|
-
id=${
|
|
1021
|
+
id=${A(i.id)}
|
|
1022
1022
|
@hide=${()=>this.removeItem(i)}
|
|
1023
1023
|
${zs({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}
|
|
1024
1024
|
>
|
|
@@ -1026,22 +1026,22 @@
|
|
|
1026
1026
|
${i.text?z(i.text):""}
|
|
1027
1027
|
</sonic-toast-item>
|
|
1028
1028
|
`)}
|
|
1029
|
-
</div>`:
|
|
1029
|
+
</div>`:C}static removeAll(){if(M.delegateToasts){M.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const t=M.getInstance();t&&(t.toasts=t.toasts.filter(s=>s.ghost))}static getInstance(){return M.instance||(M.instance=document.createElement("sonic-toast"),_t.getPopContainer().prepend(M.instance)),M.instance}static add(t){if(M.delegateToasts){M.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:t},"*");return}const s=M.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(s!=null&&s.toasts.length){const a={...n};for(const c of s.toasts){const h={...c};if(a.id=h.id=0,tt.shallowEqual(a,h))return null}}return s&&(s.toasts=[...s.toasts,n]),n}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const t=M.getInstance();window.parent.postMessage({type:"addToasts",toasts:t.toasts},"*"),t.toasts=[]}static removeItem(t){if(M.delegateToasts){M.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:t},"*");return}const s=M.getInstance();s&&s.removeItem(t)}removeItem(t){t&&(this.toasts=this.toasts.filter(s=>(s={...s},delete s.id,!tt.shallowEqual(s,t,!1))))}};M.delegateToasts=!1,oo([l({type:Array})],M.prototype,"toasts",2),M=oo([$(Ca)],M),typeof window<"u"&&(window[xs+"Toast"]=window[xs+"Toast"]||M);function Sa(){var s;const r=i=>{i.data.type=="querySonicToastAvailability"&&i.source.postMessage({type:"sonicToastAvailable"},"*"),i.data.type=="sonicToastAvailable"&&(M.delegateToasts=!0,M.handleExistingToastDelegation()),i.data.type=="addToasts"&&(M.getInstance().toasts=[...M.getInstance().toasts,...i.data.toasts]),i.data.type=="removeAllToasts"&&M.removeAll(),i.data.type=="removeToast"&&M.removeItem(i.data.toast),i.data.type=="addToast"&&M.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"))(s=i.contentWindow)==null||s.postMessage({type:"sonicToastAvailable"},"*")}Sa();var Oa=Object.defineProperty,Da=Object.getOwnPropertyDescriptor,ds=(r,t,s,i)=>{for(var e=i>1?void 0:i?Da(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Oa(t,s,e),e};const ka=new Set,La=new Set,Ea=r=>{for(const t of La)t(r)},Di=new Set;let ki=0;si(async()=>{ki++;const r=ki,t=Array.from(Di);for(;t.length>0;){if(r!=ki)return;const s=t.splice(0,4);await Promise.all(s.map(i=>i._fetchData()))}});const Li=(r,t)=>{class s extends r{constructor(...e){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(e){super.props=e}set endPoint(e){this._endPoint=e,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 it.getInstance().isLocalStrorageReady,!this.isConnected))return;const e=it.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();this.isLoading=!0,tt.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||"",e);if(this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||ka.add(this),Ea(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&M.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=tt.traverse(o,a,this.hasAttribute("preserveOtherKeys")),o&&tt.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 e;super.disconnectedCallback(),Di.delete(this),(e=this.publisher)==null||e.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){var e;this.lazyLoad=this.lazyLoad!==void 0?this.lazyLoad:this.hasAttribute("lazyload"),Di.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(),(e=this.publisher)==null||e.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const e=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),o={root:null,rootMargin:Math.max(window.innerWidth*e,window.innerHeight*e)+"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(e){var o,n;for(const a of e)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()],s.prototype,"noErrorsRecordings",2),ds([l()],s.prototype,"props",1),ds([l({type:String})],s.prototype,"endPoint",1),ds([l()],s.prototype,"requestId",2),ds([l({type:Number})],s.prototype,"refetchEveryMs",2),s};var Na=Object.defineProperty,Ta=Object.getOwnPropertyDescriptor,_e=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ta(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Na(t,s,e),e};const Vs=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 e=this.getFormPublisher();e&&(e.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 _e([l()],t.prototype,"forceAutoFill",2),_e([l({type:String})],t.prototype,"type",1),_e([l()],t.prototype,"description",1),_e([l()],t.prototype,"label",1),_e([l({type:String,reflect:!0})],t.prototype,"status",2),_e([l({type:Number})],t.prototype,"tabindex",2),_e([l({type:String})],t.prototype,"autocomplete",2),t},no=Li,Ma=xi,ao=Me,lo=Vs,te=G,Ei=Je;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:no,FormCheckable:Ma,FormElement:ao,FormInput:lo,Subscriber:te,TemplatesContainer:Ei};/**
|
|
1030
1030
|
* @license
|
|
1031
1031
|
* Copyright 2020 Google LLC
|
|
1032
1032
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1033
|
-
*/const Mt=me(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 Ia=Object.defineProperty,ja=Object.getOwnPropertyDescriptor,co=(r,t,s,i)=>{for(var e=i>1?void 0:i?ja(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ia(t,s,e),e};const Fa="sonic-fetch";let Hs=class extends Li(
|
|
1033
|
+
*/const Mt=me(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 Ia=Object.defineProperty,ja=Object.getOwnPropertyDescriptor,co=(r,t,s,i)=>{for(var e=i>1?void 0:i?ja(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ia(t,s,e),e};const Fa="sonic-fetch";let Hs=class extends Li(G(Ei(x))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return C;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):C}render(){return m`
|
|
1034
1034
|
${this.renderSkeleton()} ${this.renderLoader()}
|
|
1035
|
-
${this.isLoading?
|
|
1036
|
-
`}};Hs.styles=[
|
|
1035
|
+
${this.isLoading?C:m`<slot></slot>`}
|
|
1036
|
+
`}};Hs.styles=[P`
|
|
1037
1037
|
:host {
|
|
1038
1038
|
display: contents;
|
|
1039
1039
|
}
|
|
1040
|
-
`],co([l()],Hs.prototype,"loader",2),Hs=co([
|
|
1040
|
+
`],co([l()],Hs.prototype,"loader",2),Hs=co([$(Fa)],Hs);var za=Object.defineProperty,Ra=Object.getOwnPropertyDescriptor,ho=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ra(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&za(t,s,e),e};const Ua="sonic-if";let Bs=class extends x{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?m` <slot></slot> `:C}};Bs.styles=P`
|
|
1041
1041
|
:host {
|
|
1042
1042
|
display: contents;
|
|
1043
1043
|
}
|
|
1044
|
-
`,ho([l({type:Boolean})],Bs.prototype,"condition",2),Bs=ho([
|
|
1044
|
+
`,ho([l({type:Boolean})],Bs.prototype,"condition",2),Bs=ho([$(Ua)],Bs);const Va=P`
|
|
1045
1045
|
:host([align="left"]) .sonic-loader--inline {
|
|
1046
1046
|
margin-left: 0;
|
|
1047
1047
|
}
|
|
@@ -1108,7 +1108,7 @@
|
|
|
1108
1108
|
transform: translate(24px, 0);
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
|
-
`,Ha
|
|
1111
|
+
`,Ha=P`
|
|
1112
1112
|
@keyframes sonic-loader--fixed {
|
|
1113
1113
|
0% {
|
|
1114
1114
|
transform: scale(0);
|
|
@@ -1161,14 +1161,14 @@
|
|
|
1161
1161
|
height: 5rem;
|
|
1162
1162
|
animation: sonic-loader--fixed 1s 0s linear infinite;
|
|
1163
1163
|
}
|
|
1164
|
-
`;var Ba=Object.defineProperty,qa=Object.getOwnPropertyDescriptor,Ni=(r,t,s,i)=>{for(var e=i>1?void 0:i?qa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ba(t,s,e),e};const Wa="sonic-loader";let ot=class extends
|
|
1164
|
+
`;var Ba=Object.defineProperty,qa=Object.getOwnPropertyDescriptor,Ni=(r,t,s,i)=>{for(var e=i>1?void 0:i?qa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ba(t,s,e),e};const Wa="sonic-loader";let ot=class extends x{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1}static show(r){ot.loader||(ot.loader=document.createElement("sonic-loader"));const t=ot.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),ot.callCounter++}static hide(){ot.callCounter--,!(ot.callCounter>0)&&ot.loader&&ot.loader.remove()}render(){return m`<div
|
|
1165
1165
|
class="sonic-loader sonic-loader--${this.mode} ${this.noDelay?"sonic-loader--nodelay":""} "
|
|
1166
1166
|
>
|
|
1167
1167
|
<div></div>
|
|
1168
1168
|
<div></div>
|
|
1169
1169
|
<div></div>
|
|
1170
1170
|
<div></div>
|
|
1171
|
-
</div>`}};ot.styles=[Va,Ha
|
|
1171
|
+
</div>`}};ot.styles=[Va,Ha,P`
|
|
1172
1172
|
:host {
|
|
1173
1173
|
--sc-_loader-bg: var(--sc-primary, currentColor);
|
|
1174
1174
|
pointer-events: none;
|
|
@@ -1196,7 +1196,7 @@
|
|
|
1196
1196
|
opacity: 1;
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
|
-
`],ot.callCounter=0,Ni([l({type:String})],ot.prototype,"mode",2),Ni([l({type:Boolean})],ot.prototype,"noDelay",2),ot=Ni([
|
|
1199
|
+
`],ot.callCounter=0,Ni([l({type:String})],ot.prototype,"mode",2),Ni([l({type:Boolean})],ot.prototype,"noDelay",2),ot=Ni([$(Wa)],ot);var Ka=Object.defineProperty,Ya=Object.getOwnPropertyDescriptor,Za=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ya(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ka(t,s,e),e};const Xa="sonic-subscriber";let po=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> `}};po=Za([$(Xa)],po);var Ga=Object.defineProperty,Qa=Object.getOwnPropertyDescriptor,Ot=(r,t,s,i)=>{for(var e=i>1?void 0:i?Qa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ga(t,s,e),e};const Ja="sonic-list";let $t=class extends Li(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}}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 C;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):C}renderSeparator(){if(this.separator)return this.separator();const r=this.templateParts.separator;return r?Mt(r):C}renderLoadingState(){return m`${this.renderSkeleton()} ${this.renderLoader()} `}renderNoResultState(){return m` <div
|
|
1200
1200
|
style="color: var(--sc-base-400);
|
|
1201
1201
|
font-size: 1.5em;
|
|
1202
1202
|
margin: 4rem 0;
|
|
@@ -1220,22 +1220,22 @@
|
|
|
1220
1220
|
>
|
|
1221
1221
|
${this.items(r,t)}
|
|
1222
1222
|
</sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!tt.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 e=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`
|
|
1223
|
-
${h==null?void 0:h.map((d,p)=>{if(d==null)return
|
|
1223
|
+
${h==null?void 0:h.map((d,p)=>{if(d==null)return C;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 C;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?C:a}`:(o++,v&&(o=-1),m`
|
|
1224
1224
|
<sonic-subscriber
|
|
1225
1225
|
?debug=${this.defferedDebug===!0}
|
|
1226
|
-
.bindPublisher=${function(){return
|
|
1226
|
+
.bindPublisher=${function(){return _}}
|
|
1227
1227
|
.propertyMap?=${this.itemPropertyMap}
|
|
1228
1228
|
dataProvider="${this.dataProvider}/list-item/${g}"
|
|
1229
1229
|
>
|
|
1230
1230
|
${Mt(v||this.templateList[o%e])}
|
|
1231
1231
|
</sonic-subscriber>
|
|
1232
|
-
${b?
|
|
1232
|
+
${b?C:a}
|
|
1233
1233
|
`)})}
|
|
1234
|
-
`}};Ot([l({type:Object})],$t.prototype,"itemPropertyMap",2),Ot([l({type:String})],$t.prototype,"templateKey",2),Ot([l({type:String})],$t.prototype,"idKey",2),Ot([l()],$t.prototype,"loader",2),Ot([l()],$t.prototype,"limit",2),Ot([l()],$t.prototype,"offset",2),Ot([l({type:Object})],$t.prototype,"items",2),Ot([l({type:Object})],$t.prototype,"noItems",2),Ot([l({type:Object})],$t.prototype,"skeleton",2),Ot([l({type:Object})],$t.prototype,"separator",2),$t=Ot([
|
|
1234
|
+
`}};Ot([l({type:Object})],$t.prototype,"itemPropertyMap",2),Ot([l({type:String})],$t.prototype,"templateKey",2),Ot([l({type:String})],$t.prototype,"idKey",2),Ot([l()],$t.prototype,"loader",2),Ot([l()],$t.prototype,"limit",2),Ot([l()],$t.prototype,"offset",2),Ot([l({type:Object})],$t.prototype,"items",2),Ot([l({type:Object})],$t.prototype,"noItems",2),Ot([l({type:Object})],$t.prototype,"skeleton",2),Ot([l({type:Object})],$t.prototype,"separator",2),$t=Ot([$(Ja)],$t);/**
|
|
1235
1235
|
* @license
|
|
1236
1236
|
* Copyright 2021 Google LLC
|
|
1237
1237
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1238
|
-
*/function*uo(r,t){if(r!==void 0){let s=0;for(const i of r)yield t(i,s++)}}var tl=Object.defineProperty,el=Object.getOwnPropertyDescriptor,rt=(r,t,s,i)=>{for(var e=i>1?void 0:i?el(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&tl(t,s,e),e};const sl="sonic-queue";let Q=class extends
|
|
1238
|
+
*/function*uo(r,t){if(r!==void 0){let s=0;for(const i of r)yield t(i,s++)}}var tl=Object.defineProperty,el=Object.getOwnPropertyDescriptor,rt=(r,t,s,i)=>{for(var e=i>1?void 0:i?el(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&tl(t,s,e),e};const sl="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 s=new URLSearchParams(t.join("?")),i=(n=this.filterPublisher)==null?void 0:n.get(),e=this.filteredFields.split(" ");for(const a in i){let c=i[a];Array.isArray(c)&&(c=c.filter(h=>h!==null)),!(this.filteredFields&&!e.includes(a)||c==null||c.toString()==="")&&s.set(a,i[a].toString())}const o=s.toString();if(!(o==this.searchHash&&!this.isFirstRequest)){this.searchHash=o;for(const a of this.listDataProviders)E.delete(a);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(async()=>{const a=this.resultCount;this.props=null,this.requestId++,this.resultCount=a,await E.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)E.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 E.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=E.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 e=this.dataProviderExpression.replace("$offset",t+"").replace("$limit",this.limit+"");const o=e.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(),e=e+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(e);const d=[...this.props,{id:a.toString()+"/"+this.props.length,dataProvider:e,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 C;let r=!this.noLazyload;return this.props.length==1&&(r=!1),this.style.display="block",m`
|
|
1239
1239
|
${uo(this.props,(t,s)=>{var e;const i=s==0?this.templates:(e=this.templates)==null?void 0:e.filter(o=>o.getAttribute("data-value")!="no-item");return m`
|
|
1240
1240
|
<sonic-list
|
|
1241
1241
|
fetch
|
|
@@ -1262,32 +1262,32 @@
|
|
|
1262
1262
|
>
|
|
1263
1263
|
</sonic-list>
|
|
1264
1264
|
`})}
|
|
1265
|
-
`}};Q.instanceCounter=0,rt([l({type:Array})],Q.prototype,"templates",2),rt([l({type:Object})],Q.prototype,"items",2),rt([l({type:Object})],Q.prototype,"noItems",2),rt([l({type:Object})],Q.prototype,"skeleton",2),rt([l({type:Object})],Q.prototype,"itemPropertyMap",2),rt([l()],Q.prototype,"cache",2),rt([l()],Q.prototype,"targetRequestDuration",2),rt([l()],Q.prototype,"limit",2),rt([l()],Q.prototype,"lazyBoundsRatio",2),rt([l()],Q.prototype,"offset",2),rt([l()],Q.prototype,"resultCount",2),rt([l({type:Boolean})],Q.prototype,"noLazyload",2),rt([l({type:String})],Q.prototype,"loader",2),rt([l()],Q.prototype,"filteredFields",2),rt([l({type:String})],Q.prototype,"dataProviderExpression",2),rt([l({type:Boolean})],Q.prototype,"invalidateOnPageShow",2),rt([l({type:String})],Q.prototype,"idKey",2),Q=rt([
|
|
1265
|
+
`}};Q.instanceCounter=0,rt([l({type:Array})],Q.prototype,"templates",2),rt([l({type:Object})],Q.prototype,"items",2),rt([l({type:Object})],Q.prototype,"noItems",2),rt([l({type:Object})],Q.prototype,"skeleton",2),rt([l({type:Object})],Q.prototype,"itemPropertyMap",2),rt([l()],Q.prototype,"cache",2),rt([l()],Q.prototype,"targetRequestDuration",2),rt([l()],Q.prototype,"limit",2),rt([l()],Q.prototype,"lazyBoundsRatio",2),rt([l()],Q.prototype,"offset",2),rt([l()],Q.prototype,"resultCount",2),rt([l({type:Boolean})],Q.prototype,"noLazyload",2),rt([l({type:String})],Q.prototype,"loader",2),rt([l()],Q.prototype,"filteredFields",2),rt([l({type:String})],Q.prototype,"dataProviderExpression",2),rt([l({type:Boolean})],Q.prototype,"invalidateOnPageShow",2),rt([l({type:String})],Q.prototype,"idKey",2),Q=rt([$(sl)],Q);var il=Object.defineProperty,rl=Object.getOwnPropertyDescriptor,je=(r,t,s,i)=>{for(var e=i>1?void 0:i?rl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&il(t,s,e),e};const ol="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=E.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(t.isFormValid=!0,t.invalidateForm(),!t.isFormValid.get())return;if(this.disabled=!0,ot.show(),t.isFormValid,this.hasAttribute("native")){this.submitNativeForm();return}const i=((b=this.getAttribute("method"))==null?void 0:b.toLocaleLowerCase())||"post",e=this.hasAttribute("sendAsFormData"),o=t.get();delete o.isFormValid;const n=this.getAncestorAttributeValue("headersDataProvider"),a=n?E.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,T,q,W,kt,Lo;const y={...o};if(delete y.needsCaptchaValidation,delete c.needsCaptchaValidation,e)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((T=this.api)==null?void 0:T.delete(p,y,c));break;case"get":const ei=new URLSearchParams;if(y)for(const Eo in y)ei.append(Eo,y[Eo]);const Bd="?"+ei.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}ot.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(ei=>E.get(ei).set({}));const D=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",f=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";(Lo=(kt=this.api)==null?void 0:kt.lastResult)!=null&&Lo.ok&&y[D]&&y[f]&&this.saveCredentials(y[D],y[f]),this.submitResultKey&&(h=tt.traverse(h,this.submitResultKey.split("."),!0));const u=this.getAncestorAttributeValue("submitResultDataProvider");u&&E.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)):(ot.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"),s={...E.get(t).get()};delete s.needsCaptchaValidation;for(const e in s){if(e=="isFormValid")continue;let o=r.querySelector('input[name="'+e+'"], select[name="'+e+'"], textarea[name="'+e+'"]');o||(o=document.createElement("input"),o.type="hidden",o.name=e,r.appendChild(o));let n=s[e];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 s=new window.PasswordCredential({id:r,password:t});await navigator.credentials.store(s)}}render(){return m`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};ee.styles=P`
|
|
1266
1266
|
[data-disabled] {
|
|
1267
1267
|
opacity: 0.3;
|
|
1268
1268
|
pointer-events: none;
|
|
1269
1269
|
user-select: none;
|
|
1270
1270
|
}
|
|
1271
|
-
`,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([
|
|
1271
|
+
`,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([$(ol)],ee);var nl=Object.defineProperty,al=Object.getOwnPropertyDescriptor,ps=(r,t,s,i)=>{for(var e=i>1?void 0:i?al(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&nl(t,s,e),e};const ll="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(){lt.onChange(this),super.connectedCallback()}disconnectedCallback(){lt.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[s,i]of Object.entries(this.routes)){if(s==="fallback"||!i)continue;const e=new RegExp(this.regExpBasePath+s);if(e.test(this.cleanLocation)){const o=e.exec(this.cleanLocation)||[s];o.shift(),r.push(i([...o]))}else try{const n=new Bt(this.patternBasePath+s).match(this.cleanLocation);if(n){const a=n||{};r.push(i(a))}}catch{this.cleanLocation.indexOf((this.basePath||"")+s.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 s of this.templatePartsList){const i=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(this.regExpBasePath+i).test(this.cleanLocation))t.push(s);else try{new Bt(this.patternBasePath+i+"(/*)").match(this.cleanLocation)&&(s.setAttribute("mode","patternMatching"),t.push(s))}catch{this.cleanLocation.indexOf((this.basePath||"")+i.replace(document.location.origin,""))!=-1&&t.push(s)}}if(t.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const s=this.templateList.find(i=>i.hasAttribute("data-fallback"));s&&t.push(s)}return m`${Ns(t,(s,i)=>i+new Date().getTime(),s=>{var i;if(s.title&&(document.title=s.title),s.hasAttribute("dataProviderExpression")){let e="";const o=s.getAttribute("dataProviderExpression")||"";if(s.getAttribute("mode")=="patternMatching"){const n=new Bt("(/)*"+(s.getAttribute(this.templateValueAttribute)||"")+"*");e=new Bt(o).stringify(n.match(this.cleanLocation))}else{const n=new RegExp(s.getAttribute(this.templateValueAttribute)||""),a=(this.cleanLocation+"").match(n);a&&(e=((i=a.shift())==null?void 0:i.replace(n,o))||"")}return m`<div
|
|
1272
1272
|
style="display:contents"
|
|
1273
1273
|
dataProvider="${e}"
|
|
1274
1274
|
>
|
|
1275
1275
|
${Mt(s)}
|
|
1276
|
-
</div>`}return Mt(s)})}`}};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([
|
|
1276
|
+
</div>`}return Mt(s)})}`}};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([$(ll)],Fe);var cl=Object.defineProperty,hl=Object.getOwnPropertyDescriptor,dl=(r,t,s,i)=>{for(var e=i>1?void 0:i?hl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&cl(t,s,e),e};const pl="sonic-redirect";let fo=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")){lt.changeFromComponent(this);return}if(!this.props)return;const r=this.getAttribute("onData").split("."),t=tt.traverse(this.props,r);t&&!(tt.isObject(t)&&t)&<.changeFromComponent(this)}};fo=dl([$(pl)],fo);var ul=Object.defineProperty,fl=Object.getOwnPropertyDescriptor,qs=(r,t,s,i)=>{for(var e=i>1?void 0:i?fl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ul(t,s,e),e};const ml="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 s;if(!this.states)return[];const t=[];for(const[i,e]of Object.entries(this.states)){if(i==="fallback"||!e)continue;const o=new RegExp(i);if(o.test(r)){const n=o.exec(r)||[i];n.shift(),t.push(e([...n]))}else try{const n=new Bt("(/)*"+i+"*");if(n.match(r)){const a=n.match(r)||{};t.push(e(a))}}catch{r.indexOf(i.replace(document.location.origin,""))!=-1&&t.push(e({}))}}return t.length==0&&(s=this.states)!=null&&s.fallback&&this.isConnected&&t.push(this.states.fallback()),t}render(){let r=this.state;(!Array.isArray(r)&&tt.isObject(r)||r===void 0)&&(r="");const t=this.handleStates(r);if(t.length>0)return m`${t}`;const s=[];for(const i of this.templatePartsList){let e=i.getAttribute(this.templateValueAttribute),o=r;if(this.inverted&&(o=e,e=r),e==""&&(e=this.inverted?".*?":"^$"),new RegExp(e).test(o+""))s.push(i),i.removeAttribute("mode");else{const a=new Bt(e);a.names.length>0&&a.match(o)&&(i.setAttribute("mode","patternMatching"),s.push(i))}}return m`${Ns(s,(i,e)=>e+new Date().getTime(),i=>{var e;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 Bt(c);n=new Bt(o).stringify(h.match(a))}else{const h=new RegExp(c),d=(a+"").match(h);d&&(n=(e=d.shift())==null?void 0:e.replace(h,o))}return m`<div
|
|
1277
1277
|
style="display:contents"
|
|
1278
1278
|
dataProvider="${n}"
|
|
1279
1279
|
>
|
|
1280
1280
|
${Mt(i)}
|
|
1281
|
-
</div>`}return Mt(i)})}`}};qs([l()],us.prototype,"state",2),qs([l({type:Boolean,reflect:!0})],us.prototype,"inverted",2),qs([l({type:Object})],us.prototype,"states",2),us=qs([x(ml)],us);var gl=Object.defineProperty,bl=Object.getOwnPropertyDescriptor,vl=(r,t,s,i)=>{for(var e=i>1?void 0:i?bl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&gl(t,s,e),e};const yl="sonic-scope";let mo=class extends w{createRenderRoot(){return this}render(){return m`<slot></slot>`}};mo=vl([x(yl)],mo);var _l=Object.defineProperty,wl=Object.getOwnPropertyDescriptor,go=(r,t,s,i)=>{for(var e=i>1?void 0:i?wl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&_l(t,s,e),e};const xl="sonic-example";let Ti=class extends X(w){constructor(){super(...arguments),this.text="Example"}render(){return m`<div>${this.text}</div>`}};go([l()],Ti.prototype,"text",2),Ti=go([x(xl)],Ti);const $l={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 Pl{async transform(t,s){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const i in s.library)this.sduiDescriptor.library[i]=s.library[i];for(const i of s.transforms)this.transformAction(i)}transformAction(t){const s=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,s)}getNodesMatchingPatterns(t,s){if(!t)return[];if(!s)return[];const i=s.nodes;if(!i)return[];let e=[],o=0;for(const n of t)for(const a of i)this.nodeMatchesPattern(n,a)&&e.push({parent:s,child:a,index:o}),e=e.concat(this.getNodesMatchingPatterns([n],a)),o++;return e}stringMatchesExpression(t,s){return!s||t&&t.match(s)}nodeMatchesPattern(t,s){const i=t,e=s,o=["libraryKey","innerHTML","prefix","suffix","markup"];for(const c of o)if(!this.stringMatchesExpression(e[c],i[c]))return!1;const n=t.attributes,a=s.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,s){var i,e;for(const o of s)(i=o.parent.nodes)==null||i.splice(o.parent.nodes.indexOf(o.child),1),o.child.nodes&&((e=o.parent.nodes)==null||e.splice(o.parent.nodes.indexOf(o.child),0,...o.child.nodes))}wrap(t,s){var n,a,c,h,d,p;const i={...t.ui};i.nodes||(i.nodes=[]);let e=0;for(const g of s)(n=i.nodes)==null||n.push(g.child),e>0&&((a=g.parent.nodes)==null||a.splice(g.parent.nodes.indexOf(g.child),1)),e++;const o=(h=(c=s[0])==null?void 0:c.parent.nodes)==null?void 0:h.indexOf(s[0].child);o&&((d=s[0].parent.nodes)==null||d.splice(o,1),(p=s[0].parent.nodes)==null||p.splice(o,0,i))}move(t,s){var i,e;for(const o of s){(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&&((e=a.parent.nodes)==null||e.splice(a.parent.nodes.indexOf(a.child)+(t.after?1:0),0,o.child))}}remap(t,s){var i,e,o;for(const n of s){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&&((e=n.parent.nodes)==null||e.splice(v,1),(o=n.parent.nodes)==null||o.splice(v,0,a))}}delete(t,s){var i;for(const e of s)(i=e.parent.nodes)==null||i.splice(e.parent.nodes.indexOf(e.child),1)}insert(t,s){var o;const i=t.after?"after":t.before?"before":"in";s=[],t.after?s=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?s=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(s=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const e=s[0];e&&(i=="in"?(e.child.nodes||(e.child.nodes=[]),e.child.nodes.push({...t.ui})):(o=e.parent.nodes)==null||o.splice(e.parent.nodes.indexOf(e.child)+(i=="after"?1:0),0,{...t.ui}))}}var Al=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor,Mi=(r,t,s,i)=>{for(var e=i>1?void 0:i?Cl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Al(t,s,e),e};const Sl="sonic-sdui";let Ws=class extends no(te(w)){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,$l,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)Xt.loadJS(r);if(this.sduiDescriptor.css)for(const r of this.sduiDescriptor.css)Xt.loadCSS(r)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await(await fetch(this.getAttribute("transformation"))).json();await new Pl().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(s=>this.appendChild(this.parseChild(s)))}parseChild(r){const t=r.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(r,t);return this.handleAttributes(r,s),s=this.handleMarkup(r,s),i||(i=s),this.handleChildNodes(r,i,s),this.handleInnerHTML(r,i),r.prefix||r.suffix?this.handlePrefixSuffix(r,s):s}handlePrefixSuffix(r,t){const s=document.createElement("div");return s.innerHTML=(r.prefix||"")+t.outerHTML+(r.suffix||""),s.style.display="contents",s}handleChildNodes(r,t,s){if(r.nodes){const i=r.nodes;for(const e of i){const o=this.parseChild(e);let n=t;e.parentElementSelector&&(n=s.querySelector(e.parentElementSelector)||t),n.shadowRoot?n.shadowRoot.appendChild(o):n.tagName.toLocaleLowerCase()=="template"?n.content.appendChild(o):n.appendChild(o)}}}handleLibrary(r,t){let s,i;if(r.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[r.libraryKey]||{tagName:"div"});const e=(this.sduiDescriptor.library[r.libraryKey]||{}).contentElementSelector;e&&(i=s.querySelector(e))}else s=document.createElement(t);return{element:s,contentElement:i}}handleAttributes(r,t){const s=r.attributes;for(const i in s){const e=s[i],o=ts.isObject(e)?JSON.stringify(e):e;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 s;if(r.innerHTML)if(r.innerHTML.indexOf("wording_")!=-1){const i=this.getAncestorAttributeValue("wordingProvider");(s=this.api)==null||s.post(i,{labels:[r.innerHTML.substring(8)]}).then(e=>{t&&(t.innerHTML+=e)})}else t&&(t.innerHTML+=r.innerHTML)}};Mi([l()],Ws.prototype,"sduiKey",2),Mi([l()],Ws.prototype,"messagesKey",2),Ws=Mi([x(Sl)],Ws);var Ol=Object.defineProperty,Dl=Object.getOwnPropertyDescriptor,bo=(r,t,s,i)=>{for(var e=i>1?void 0:i?Dl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ol(t,s,e),e};let Ks=class extends te(w){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 s in r){const i=r[s];if(typeof i=="string"){const e=i.split("."),o=e.shift();if(!o)continue;let n=it.get(o);n=ts.traverse(n,e);const a={publisher:n,subscriber:c=>{t[s]=c}};this.listeners.push(a),n.onAssign(a.subscriber),t._proxies_.set(s,n)}else{this.publisher[s]={};const e=new ri({},t);t._proxies_.set(s,e);const o={publisher:e,subscriber:n=>{t[s]=n}};this.listeners.push(o),e.onAssign(o.subscriber),this.parseComposition(i,e)}}}render(){return m`<slot></slot>`}};Ks.styles=[$`
|
|
1281
|
+
</div>`}return Mt(i)})}`}};qs([l()],us.prototype,"state",2),qs([l({type:Boolean,reflect:!0})],us.prototype,"inverted",2),qs([l({type:Object})],us.prototype,"states",2),us=qs([$(ml)],us);var gl=Object.defineProperty,bl=Object.getOwnPropertyDescriptor,vl=(r,t,s,i)=>{for(var e=i>1?void 0:i?bl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&gl(t,s,e),e};const yl="sonic-scope";let mo=class extends x{createRenderRoot(){return this}render(){return m`<slot></slot>`}};mo=vl([$(yl)],mo);var _l=Object.defineProperty,wl=Object.getOwnPropertyDescriptor,go=(r,t,s,i)=>{for(var e=i>1?void 0:i?wl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&_l(t,s,e),e};const xl="sonic-example";let Ti=class extends G(x){constructor(){super(...arguments),this.text="Example"}render(){return m`<div>${this.text}</div>`}};go([l()],Ti.prototype,"text",2),Ti=go([$(xl)],Ti);const $l={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 Pl{async transform(t,s){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const i in s.library)this.sduiDescriptor.library[i]=s.library[i];for(const i of s.transforms)this.transformAction(i)}transformAction(t){const s=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,s)}getNodesMatchingPatterns(t,s){if(!t)return[];if(!s)return[];const i=s.nodes;if(!i)return[];let e=[],o=0;for(const n of t)for(const a of i)this.nodeMatchesPattern(n,a)&&e.push({parent:s,child:a,index:o}),e=e.concat(this.getNodesMatchingPatterns([n],a)),o++;return e}stringMatchesExpression(t,s){return!s||t&&t.match(s)}nodeMatchesPattern(t,s){const i=t,e=s,o=["libraryKey","innerHTML","prefix","suffix","markup"];for(const c of o)if(!this.stringMatchesExpression(e[c],i[c]))return!1;const n=t.attributes,a=s.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,s){var i,e;for(const o of s)(i=o.parent.nodes)==null||i.splice(o.parent.nodes.indexOf(o.child),1),o.child.nodes&&((e=o.parent.nodes)==null||e.splice(o.parent.nodes.indexOf(o.child),0,...o.child.nodes))}wrap(t,s){var n,a,c,h,d,p;const i={...t.ui};i.nodes||(i.nodes=[]);let e=0;for(const g of s)(n=i.nodes)==null||n.push(g.child),e>0&&((a=g.parent.nodes)==null||a.splice(g.parent.nodes.indexOf(g.child),1)),e++;const o=(h=(c=s[0])==null?void 0:c.parent.nodes)==null?void 0:h.indexOf(s[0].child);o&&((d=s[0].parent.nodes)==null||d.splice(o,1),(p=s[0].parent.nodes)==null||p.splice(o,0,i))}move(t,s){var i,e;for(const o of s){(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&&((e=a.parent.nodes)==null||e.splice(a.parent.nodes.indexOf(a.child)+(t.after?1:0),0,o.child))}}remap(t,s){var i,e,o;for(const n of s){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&&((e=n.parent.nodes)==null||e.splice(v,1),(o=n.parent.nodes)==null||o.splice(v,0,a))}}delete(t,s){var i;for(const e of s)(i=e.parent.nodes)==null||i.splice(e.parent.nodes.indexOf(e.child),1)}insert(t,s){var o;const i=t.after?"after":t.before?"before":"in";s=[],t.after?s=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?s=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(s=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const e=s[0];e&&(i=="in"?(e.child.nodes||(e.child.nodes=[]),e.child.nodes.push({...t.ui})):(o=e.parent.nodes)==null||o.splice(e.parent.nodes.indexOf(e.child)+(i=="after"?1:0),0,{...t.ui}))}}var Al=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor,Mi=(r,t,s,i)=>{for(var e=i>1?void 0:i?Cl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Al(t,s,e),e};const Sl="sonic-sdui";let Ws=class extends no(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,$l,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 Pl().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(s=>this.appendChild(this.parseChild(s)))}parseChild(r){const t=r.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(r,t);return this.handleAttributes(r,s),s=this.handleMarkup(r,s),i||(i=s),this.handleChildNodes(r,i,s),this.handleInnerHTML(r,i),r.prefix||r.suffix?this.handlePrefixSuffix(r,s):s}handlePrefixSuffix(r,t){const s=document.createElement("div");return s.innerHTML=(r.prefix||"")+t.outerHTML+(r.suffix||""),s.style.display="contents",s}handleChildNodes(r,t,s){if(r.nodes){const i=r.nodes;for(const e of i){const o=this.parseChild(e);let n=t;e.parentElementSelector&&(n=s.querySelector(e.parentElementSelector)||t),n.shadowRoot?n.shadowRoot.appendChild(o):n.tagName.toLocaleLowerCase()=="template"?n.content.appendChild(o):n.appendChild(o)}}}handleLibrary(r,t){let s,i;if(r.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[r.libraryKey]||{tagName:"div"});const e=(this.sduiDescriptor.library[r.libraryKey]||{}).contentElementSelector;e&&(i=s.querySelector(e))}else s=document.createElement(t);return{element:s,contentElement:i}}handleAttributes(r,t){const s=r.attributes;for(const i in s){const e=s[i],o=ts.isObject(e)?JSON.stringify(e):e;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 s;if(r.innerHTML)if(r.innerHTML.indexOf("wording_")!=-1){const i=this.getAncestorAttributeValue("wordingProvider");(s=this.api)==null||s.post(i,{labels:[r.innerHTML.substring(8)]}).then(e=>{t&&(t.innerHTML+=e)})}else t&&(t.innerHTML+=r.innerHTML)}};Mi([l()],Ws.prototype,"sduiKey",2),Mi([l()],Ws.prototype,"messagesKey",2),Ws=Mi([$(Sl)],Ws);var Ol=Object.defineProperty,Dl=Object.getOwnPropertyDescriptor,bo=(r,t,s,i)=>{for(var e=i>1?void 0:i?Dl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ol(t,s,e),e};let Ks=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 s in r){const i=r[s];if(typeof i=="string"){const e=i.split("."),o=e.shift();if(!o)continue;let n=it.get(o);n=ts.traverse(n,e);const a={publisher:n,subscriber:c=>{t[s]=c}};this.listeners.push(a),n.onAssign(a.subscriber),t._proxies_.set(s,n)}else{this.publisher[s]={};const e=new ri({},t);t._proxies_.set(s,e);const o={publisher:e,subscriber:n=>{t[s]=n}};this.listeners.push(o),e.onAssign(o.subscriber),this.parseComposition(i,e)}}}render(){return m`<slot></slot>`}};Ks.styles=[P`
|
|
1282
1282
|
:host {
|
|
1283
1283
|
display: contents;
|
|
1284
1284
|
}
|
|
1285
|
-
`],bo([l({type:Object})],Ks.prototype,"composition",1),Ks=bo([
|
|
1286
|
-
><slot name="suffix"></slot>`}};vo=El([
|
|
1285
|
+
`],bo([l({type:Object})],Ks.prototype,"composition",1),Ks=bo([$("sonic-mix")],Ks);var kl=Object.defineProperty,Ll=Object.getOwnPropertyDescriptor,El=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ll(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&kl(t,s,e),e};const Nl="sonic-value";let vo=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
|
|
1286
|
+
><slot name="suffix"></slot>`}};vo=El([$(Nl)],vo);var Tl=Object.defineProperty,Ml=Object.getOwnPropertyDescriptor,Ii=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ml(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Tl(t,s,e),e};const Il="sonic-t";let Ys=class extends x{render(){return this.key?m`${mn(this.key,this.unsafeHTML)}`:C}};Ii([l({type:String})],Ys.prototype,"key",2),Ii([l({type:Boolean})],Ys.prototype,"unsafeHTML",2),Ys=Ii([$(Il)],Ys);var jl=Object.defineProperty,Fl=Object.getOwnPropertyDescriptor,fs=(r,t,s,i)=>{for(var e=i>1?void 0:i?Fl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&jl(t,s,e),e};const zl="sonic-badge";let we=class extends x{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return m`
|
|
1287
1287
|
<slot name="prefix"></slot>
|
|
1288
1288
|
<slot></slot>
|
|
1289
1289
|
<slot name="suffix"></slot>
|
|
1290
|
-
`}};we.styles=[Nt
|
|
1290
|
+
`}};we.styles=[Nt,P`
|
|
1291
1291
|
:host {
|
|
1292
1292
|
--sc-badge-gap: 0.3em;
|
|
1293
1293
|
--sc-badge-py: 0.35em;
|
|
@@ -1427,28 +1427,28 @@
|
|
|
1427
1427
|
slot[name="prefix"] {
|
|
1428
1428
|
flex-shrink: 0;
|
|
1429
1429
|
}
|
|
1430
|
-
`],fs([l({type:String,reflect:!0})],we.prototype,"type",2),fs([l({type:String,reflect:!0})],we.prototype,"variant",2),fs([l({type:String,reflect:!0})],we.prototype,"size",2),fs([l({type:Boolean,reflect:!0})],we.prototype,"ellipsis",2),we=fs([
|
|
1430
|
+
`],fs([l({type:String,reflect:!0})],we.prototype,"type",2),fs([l({type:String,reflect:!0})],we.prototype,"variant",2),fs([l({type:String,reflect:!0})],we.prototype,"size",2),fs([l({type:Boolean,reflect:!0})],we.prototype,"ellipsis",2),we=fs([$(zl)],we);class Rl{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 Ul=Object.defineProperty,Vl=Object.getOwnPropertyDescriptor,ze=(r,t,s,i)=>{for(var e=i>1?void 0:i?Vl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ul(t,s,e),e};const Hl="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,lt.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(lt.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),this.addEventListener("keypress",r=>{var t,s;r.key==="Enter"&&((s=(t=this.shadowRoot)==null?void 0:t.querySelector("a"))==null||s.click())}),this.setFocusable(),super.connectedCallback()}setFocusable(){this.href?this.setAttribute("tabIndex","0"):this.removeAttribute("tabIndex")}disconnectedCallback(){lt.offChange(this),super.disconnectedCallback()}set target(r){this._target=r,Rl.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(r){r.preventDefault(),lt.changeFromComponent(this)}updated(r){r.has("href")&&this.setFocusable()}render(){return this.href?m`
|
|
1431
1431
|
<a
|
|
1432
1432
|
href="${this.href}"
|
|
1433
|
-
aria-label=${this.ariaLabel||
|
|
1434
|
-
target=${
|
|
1433
|
+
aria-label=${this.ariaLabel||C}
|
|
1434
|
+
target=${A(this.target)}
|
|
1435
1435
|
@click=${this.pushState?this.handlePushState:null}
|
|
1436
1436
|
>
|
|
1437
1437
|
<slot></slot>
|
|
1438
1438
|
</a>
|
|
1439
|
-
`:m`<slot></slot>`}};se.styles=[
|
|
1439
|
+
`:m`<slot></slot>`}};se.styles=[P`
|
|
1440
1440
|
a {
|
|
1441
1441
|
color: inherit;
|
|
1442
1442
|
text-decoration: none;
|
|
1443
1443
|
display: contents;
|
|
1444
1444
|
}
|
|
1445
|
-
`],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([
|
|
1446
|
-
<progress value=${
|
|
1445
|
+
`],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([$(Hl)],se);var Bl=Object.defineProperty,ql=Object.getOwnPropertyDescriptor,Re=(r,t,s,i)=>{for(var e=i>1?void 0:i?ql(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Bl(t,s,e),e};const Wl="sonic-progress";let ie=class extends x{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return m`
|
|
1446
|
+
<progress value=${A(this.value)} max=${this.max}></progress>
|
|
1447
1447
|
<div class="slot-container">
|
|
1448
1448
|
<slot></slot>
|
|
1449
1449
|
<slot name="remaining"></slot>
|
|
1450
1450
|
</div>
|
|
1451
|
-
`}};ie.styles=[Nt
|
|
1451
|
+
`}};ie.styles=[Nt,P`
|
|
1452
1452
|
:host {
|
|
1453
1453
|
--sc-progress-bg: var(
|
|
1454
1454
|
--sc-input-bg,
|
|
@@ -1559,7 +1559,7 @@
|
|
|
1559
1559
|
gap: 0.5em;
|
|
1560
1560
|
margin-top: 0.15em;
|
|
1561
1561
|
}
|
|
1562
|
-
`],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([
|
|
1562
|
+
`],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([$(Wl)],ie);const Kl=P`
|
|
1563
1563
|
.password-toggle {
|
|
1564
1564
|
color: var(--sc-input-c);
|
|
1565
1565
|
font-size: var(--sc-input-fs);
|
|
@@ -1570,7 +1570,7 @@
|
|
|
1570
1570
|
:host([inlineContent]) .has-suffix .password-toggle {
|
|
1571
1571
|
margin-right: 0;
|
|
1572
1572
|
}
|
|
1573
|
-
`,Zs
|
|
1573
|
+
`,Zs=P`
|
|
1574
1574
|
:host {
|
|
1575
1575
|
--sc-label-fs: var(--sc-_fs, 1rem);
|
|
1576
1576
|
--sc-label-fw: var(--sc-label-font-weight, 500);
|
|
@@ -1584,14 +1584,14 @@
|
|
|
1584
1584
|
margin-bottom: 0.22em;
|
|
1585
1585
|
display: block;
|
|
1586
1586
|
}
|
|
1587
|
-
`,
|
|
1587
|
+
`,Xs=P`
|
|
1588
1588
|
.form-description {
|
|
1589
1589
|
color: var(--sc-base-400, var(--sc-base-content, #000));
|
|
1590
1590
|
font-size: 0.85em;
|
|
1591
1591
|
margin-top: 0.2em;
|
|
1592
1592
|
display: block;
|
|
1593
1593
|
}
|
|
1594
|
-
`,ji
|
|
1594
|
+
`,ji=P`
|
|
1595
1595
|
* {
|
|
1596
1596
|
box-sizing: border-box;
|
|
1597
1597
|
}
|
|
@@ -1950,7 +1950,7 @@
|
|
|
1950
1950
|
* @license
|
|
1951
1951
|
* Copyright 2018 Google LLC
|
|
1952
1952
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1953
|
-
*/const Fi=me(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,e;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 s=r.element.classList;for(const o of this.st)o in t||(s.remove(o),this.st.delete(o));for(const o in t){const n=!!t[o];n===this.st.has(o)||(e=this.nt)!=null&&e.has(o)||(n?(s.add(o),this.st.add(o)):(s.remove(o),this.st.delete(o)))}return yt}});var Yl=Object.defineProperty,Zl=Object.getOwnPropertyDescriptor,U=(r,t,s,i)=>{for(var e=i>1?void 0:i?Zl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Yl(t,s,e),e};const
|
|
1953
|
+
*/const Fi=me(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,e;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 s=r.element.classList;for(const o of this.st)o in t||(s.remove(o),this.st.delete(o));for(const o in t){const n=!!t[o];n===this.st.has(o)||(e=this.nt)!=null&&e.has(o)||(n?(s.add(o),this.st.add(o)):(s.remove(o),this.st.delete(o)))}return yt}});var Yl=Object.defineProperty,Zl=Object.getOwnPropertyDescriptor,U=(r,t,s,i)=>{for(var e=i>1?void 0:i?Zl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Yl(t,s,e),e};const Xl="sonic-input";let j=class extends Vs(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,s,i;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length),this.hasSuffix=!!((s=this.slotSuffixNodes)!=null&&s.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`
|
|
1954
1954
|
<label for="${this.id||"form-element"}" class="${this.hasLabel?"form-label":"hidden"}"
|
|
1955
1955
|
>${this.label?z(this.label):""}<slot
|
|
1956
1956
|
name="label"
|
|
@@ -1964,7 +1964,7 @@
|
|
|
1964
1964
|
<input
|
|
1965
1965
|
data-form-element
|
|
1966
1966
|
part="input"
|
|
1967
|
-
id=${
|
|
1967
|
+
id=${A(this.id||"form-element")}
|
|
1968
1968
|
part="input"
|
|
1969
1969
|
class="form-element input"
|
|
1970
1970
|
@input=${this.handleChange}
|
|
@@ -1973,21 +1973,21 @@
|
|
|
1973
1973
|
?disabled=${this.disabled}
|
|
1974
1974
|
?readonly=${this.readonly}
|
|
1975
1975
|
?autofocus=${this.autofocus}
|
|
1976
|
-
list=${
|
|
1977
|
-
tabindex=${
|
|
1978
|
-
pattern=${
|
|
1979
|
-
min=${
|
|
1980
|
-
max=${
|
|
1981
|
-
step=${
|
|
1982
|
-
inputmode=${
|
|
1983
|
-
src=${
|
|
1984
|
-
minlength=${
|
|
1985
|
-
maxlength=${
|
|
1986
|
-
placeholder=${
|
|
1976
|
+
list=${A(this.list)}
|
|
1977
|
+
tabindex=${A(this.tabindex)}
|
|
1978
|
+
pattern=${A(this.pattern)}
|
|
1979
|
+
min=${A(this.min)}
|
|
1980
|
+
max=${A(this.max)}
|
|
1981
|
+
step=${A(this.step)}
|
|
1982
|
+
inputmode=${A(this.inputmode)}
|
|
1983
|
+
src=${A(this.src)}
|
|
1984
|
+
minlength=${A(this.minlength)}
|
|
1985
|
+
maxlength=${A(this.maxlength)}
|
|
1986
|
+
placeholder=${A(this.placeholder)}
|
|
1987
1987
|
?required=${this.required}
|
|
1988
|
-
autocomplete=${
|
|
1989
|
-
aria-label=${
|
|
1990
|
-
aria-labelledby=${
|
|
1988
|
+
autocomplete=${A(this.autocomplete)}
|
|
1989
|
+
aria-label=${A(this.ariaLabel)}
|
|
1990
|
+
aria-labelledby=${A(this.ariaLabelledby)}
|
|
1991
1991
|
.name=${this.name}
|
|
1992
1992
|
.value=${this.value}
|
|
1993
1993
|
/>
|
|
@@ -2012,10 +2012,10 @@
|
|
|
2012
2012
|
name="description"
|
|
2013
2013
|
@slotchange=${this.hasSlotOrProps}
|
|
2014
2014
|
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2015
|
-
>${this.description?m`${z(this.description)}`:
|
|
2015
|
+
>${this.description?m`${z(this.description)}`:C}</slot>
|
|
2016
2016
|
<slot name="list"></slot>
|
|
2017
2017
|
</div>
|
|
2018
|
-
`}};j.styles=[Nt,ji,Zs,
|
|
2018
|
+
`}};j.styles=[Nt,ji,Zs,Xs,Kl,P`
|
|
2019
2019
|
:host([type="hidden"]) {
|
|
2020
2020
|
appearance: none !important;
|
|
2021
2021
|
display: none !important;
|
|
@@ -2023,7 +2023,7 @@
|
|
|
2023
2023
|
:host > .form-control {
|
|
2024
2024
|
position: relative;
|
|
2025
2025
|
}
|
|
2026
|
-
`],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})],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([at({slot:"label",flatten:!0})],j.prototype,"slotLabelNodes",2),U([at({slot:"description",flatten:!0})],j.prototype,"slotDescriptionNodes",2),U([at({slot:"suffix",flatten:!0})],j.prototype,"slotSuffixNodes",2),U([at({slot:"prefix",flatten:!0})],j.prototype,"slotPrefixNodes",2),U([le("input")],j.prototype,"input",2),U([N()],j.prototype,"hasDescription",2),U([N()],j.prototype,"hasLabel",2),U([N()],j.prototype,"hasSuffix",2),U([N()],j.prototype,"hasPrefix",2),U([N()],j.prototype,"isPassword",2),j=U([
|
|
2026
|
+
`],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})],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([at({slot:"label",flatten:!0})],j.prototype,"slotLabelNodes",2),U([at({slot:"description",flatten:!0})],j.prototype,"slotDescriptionNodes",2),U([at({slot:"suffix",flatten:!0})],j.prototype,"slotSuffixNodes",2),U([at({slot:"prefix",flatten:!0})],j.prototype,"slotPrefixNodes",2),U([le("input")],j.prototype,"input",2),U([N()],j.prototype,"hasDescription",2),U([N()],j.prototype,"hasLabel",2),U([N()],j.prototype,"hasSuffix",2),U([N()],j.prototype,"hasPrefix",2),U([N()],j.prototype,"isPassword",2),j=U([$(Xl)],j);const yo=P`
|
|
2027
2027
|
/*OMBRE*/
|
|
2028
2028
|
:host([shadow]) .shadowable,
|
|
2029
2029
|
:host([shadow="md"]) .shadowable,
|
|
@@ -2042,7 +2042,7 @@
|
|
|
2042
2042
|
:host([shadow="none"]) .shadowable {
|
|
2043
2043
|
box-shadow: none;
|
|
2044
2044
|
}
|
|
2045
|
-
`;var
|
|
2045
|
+
`;var Gl=Object.defineProperty,Ql=Object.getOwnPropertyDescriptor,qt=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ql(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Gl(t,s,e),e};const Jl="sonic-pop";let nt=class extends x{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!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(){this.setMaxZindex(),this.popContent.style.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 s=t.style;s.zIndex="999999999";const i=getComputedStyle(t);return i.position!=="relative"&&i.position!=="absolute"&&(s.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(),s=t[0];nt.pops.forEach(i=>{const e=t.includes(i),o=t.includes(i.querySelector('[slot="content"]')),n=K.getAncestorAttributeValue(s,"data-on-select")==="keep";r.type=="pointerdown"&&e||r.type=="click"&&(e&&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 T,q,W,kt;const t=r.split(" "),s=t[0];let i=t[1];const e=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)+e,h=Math.max(0,(a==null?void 0:a.top)||0)+e,d=Math.min(window.innerWidth,(a==null?void 0:a.right)||window.innerWidth)-e,p=Math.min(window.innerHeight,(a==null?void 0:a.bottom)||window.innerHeight)-e,g=o.left,v=o.top;let b=g,y=v,_=(T=this.popContent)==null?void 0:T.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(s){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&&s=="left"&&(b=u),_.y<h&&s=="top"&&(y=w),_.x+_.width>d&&s=="right"&&(b=f),_.y+_.height>p&&s=="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`
|
|
2046
2046
|
<slot
|
|
2047
2047
|
@click=${this.toggle}
|
|
2048
2048
|
@keydown=${this.toggle}
|
|
@@ -2056,7 +2056,7 @@
|
|
|
2056
2056
|
class="shadowable
|
|
2057
2057
|
${this.open?"is-open":""}"
|
|
2058
2058
|
></slot>
|
|
2059
|
-
`}};nt.pops=new Set,nt.styles=[
|
|
2059
|
+
`}};nt.pops=new Set,nt.styles=[P`
|
|
2060
2060
|
:host {
|
|
2061
2061
|
display: inline-block;
|
|
2062
2062
|
vertical-align: middle;
|
|
@@ -2088,11 +2088,11 @@
|
|
|
2088
2088
|
:host([inline]) {
|
|
2089
2089
|
vertical-align: baseline;
|
|
2090
2090
|
}
|
|
2091
|
-
`,yo],qt([N()],nt.prototype,"open",2),qt([le("slot:not([name=content])")],nt.prototype,"popBtn",2),qt([le("slot[name=content]")],nt.prototype,"popContent",2),qt([l({type:Boolean})],nt.prototype,"noToggle",2),qt([l({type:Boolean,reflect:!0})],nt.prototype,"inline",2),qt([l({type:String,reflect:!0})],nt.prototype,"shadow",2),qt([l({type:String})],nt.prototype,"placement",2),qt([N()],nt.prototype,"triggerElement",2),nt=qt([
|
|
2091
|
+
`,yo],qt([N()],nt.prototype,"open",2),qt([le("slot:not([name=content])")],nt.prototype,"popBtn",2),qt([le("slot[name=content]")],nt.prototype,"popContent",2),qt([l({type:Boolean})],nt.prototype,"noToggle",2),qt([l({type:Boolean,reflect:!0})],nt.prototype,"inline",2),qt([l({type:String,reflect:!0})],nt.prototype,"shadow",2),qt([l({type:String})],nt.prototype,"placement",2),qt([N()],nt.prototype,"triggerElement",2),nt=qt([$(Jl)],nt);var tc=Object.defineProperty,ec=Object.getOwnPropertyDescriptor,sc=(r,t,s,i)=>{for(var e=i>1?void 0:i?ec(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&tc(t,s,e),e};const ic="sonic-menu-item";let _o=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()}};_o=sc([$(ic)],_o);/**
|
|
2092
2092
|
* @license
|
|
2093
2093
|
* Copyright 2021 Google LLC
|
|
2094
2094
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2095
|
-
*/class wo{constructor(t,{target:s,config:i,callback:e,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,s!==null&&this.t.add(s??t),this.l=i,this.o=o??this.o,this.callback=e,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 s;this.value=(s=this.callback)==null?void 0:s.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 rc=Object.defineProperty,oc=Object.getOwnPropertyDescriptor,bt=(r,t,s,i)=>{for(var e=i>1?void 0:i?oc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&rc(t,s,e),e};let ct=class extends Ei(lo(ao(te(
|
|
2095
|
+
*/class wo{constructor(t,{target:s,config:i,callback:e,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,s!==null&&this.t.add(s??t),this.l=i,this.o=o??this.o,this.callback=e,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 s;this.value=(s=this.callback)==null?void 0:s.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 rc=Object.defineProperty,oc=Object.getOwnPropertyDescriptor,bt=(r,t,s,i)=>{for(var e=i>1?void 0:i?oc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&rc(t,s,e),e};let ct=class extends Ei(lo(ao(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 wo(this,{}),this.isPopVisible=!1,this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=r=>{var s;if(r==""){this.lastValidSearch="";return}this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)===!1&&(!this.searchParameter||this.searchParameter===this.name)&&(this.lastValidSearch=r,(s=this.searchPublisher)==null||s.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 s;const t=this.propertyName==="_self"?r:r[this.propertyName||this.name];(s=this.formValuePublisher)==null||s.set(t)},this.findSearchedItem=r=>{var s;return(this.propertyName==="_self"?r:r[this.propertyName||this.searchParameter||this.name])==((s=this.searchPublisher)==null?void 0:s.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],(t=this.searchPublisher)==null||t.set(this.lastValidSearch)},this.updateActiveSelection=()=>{var r,t,s;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())&&((s=this.formValuePublisher)==null||s.set(""))}}hasSlotOrProps(){var r;this.hasInputPrefix=!!((r=this.slotInputPrefixNodes)!=null&&r.length)}get value(){return super.value}set value(r){var t;(t=this.searchPublisher)==null||t.set(r),super.value=r}connectedCallback(){var e,o,n,a;super.connectedCallback();const r=this.searchParameter||this.name,t=this.getAncestorAttributeValue("formDataProvider"),s=t+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${s}_init_search__`,this.initQueueDataProvider=`${s}_init_queue__`,this.searchDataProvider=`${s}_search__`,this.queueDataProvider=`${s}_queue__`;const i=it.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&&(it.get(this.initSearchDataProvider)[this.name]=this.value),(e=this.initCountPublisher)==null||e.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,s,i,e;super.disconnectedCallback(),(t=this.initCountPublisher)==null||t.offAssign(this.initSearchParameter),(s=this.formValuePublisher)==null||s.offAssign(this.updateSearchParameter),(i=this.countPublisher)==null||i.offAssign(this.updateActiveSelection);const r=it.get;r(this.initSearchDataProvider).delete(),r(this.initQueueDataProvider).delete(),r(this.searchDataProvider).delete(),r(this.queueDataProvider).delete(),(e=this.searchPublisher)==null||e.offAssign(this.updatePopContentVisibility)}queryQueueListItem(r,t,s){const i=it.get(r);let e,o=i.get();if(!o||!Array.isArray(o)||!o.length)return!1;for(const n of o){let a=it.get(n.dataProvider).get();if(Array.isArray(a)&&(e=a.find(t),e))break}return e?(s(e),!0):!1}setSelectionRange(r,t){var s;(s=this.querySelector("sonic-input"))==null||s.setSelectionRange(r,t)}handleHide(){var r,t,s;if(this.select){if(((r=this.searchPublisher)==null?void 0:r.get())==""){this.lastValidSearch="",(t=this.formValuePublisher)==null||t.set("");return}(s=this.searchPublisher)==null||s.set(this.lastValidSearch)}}render(){var r;return m`
|
|
2096
2096
|
<sonic-pop noToggle style="display:block;" @hide=${this.handleHide}>
|
|
2097
2097
|
<sonic-input
|
|
2098
2098
|
dataProvider="${this.initSearchDataProvider+Math.random()}"
|
|
@@ -2100,16 +2100,16 @@
|
|
|
2100
2100
|
formDataProvider="${this.searchDataProvider}"
|
|
2101
2101
|
type="search"
|
|
2102
2102
|
data-keyboard-nav="${this.getAttribute("data-keyboard-nav")||""}"
|
|
2103
|
-
label="${
|
|
2104
|
-
description="${
|
|
2105
|
-
name="${
|
|
2106
|
-
placeholder="${
|
|
2103
|
+
label="${A(this.label)}"
|
|
2104
|
+
description="${A(this.description)}"
|
|
2105
|
+
name="${A(this.searchParameter||this.name)}"
|
|
2106
|
+
placeholder="${A(this.placeholder)}"
|
|
2107
2107
|
?readonly="${this.readonly}"
|
|
2108
2108
|
autocomplete="off"
|
|
2109
2109
|
clearable
|
|
2110
2110
|
inlineContent
|
|
2111
2111
|
size=${this.size}
|
|
2112
|
-
value="${
|
|
2112
|
+
value="${A(((r=this.searchPublisher)==null?void 0:r.get())||this.value)}"
|
|
2113
2113
|
>
|
|
2114
2114
|
<slot
|
|
2115
2115
|
name="prefix"
|
|
@@ -2124,7 +2124,7 @@
|
|
|
2124
2124
|
name="nav-arrow-down"
|
|
2125
2125
|
.size=${this.size}
|
|
2126
2126
|
></sonic-icon>
|
|
2127
|
-
`:
|
|
2127
|
+
`:C}
|
|
2128
2128
|
</sonic-input>
|
|
2129
2129
|
<sonic-menu
|
|
2130
2130
|
slot="content"
|
|
@@ -2154,7 +2154,7 @@
|
|
|
2154
2154
|
</sonic-queue>
|
|
2155
2155
|
</sonic-menu>
|
|
2156
2156
|
</sonic-pop>
|
|
2157
|
-
`}};ct.styles=[cs
|
|
2157
|
+
`}};ct.styles=[cs,P`
|
|
2158
2158
|
:host {
|
|
2159
2159
|
display: block;
|
|
2160
2160
|
}
|
|
@@ -2168,7 +2168,7 @@
|
|
|
2168
2168
|
min-width: 14rem;
|
|
2169
2169
|
width: 100%;
|
|
2170
2170
|
}
|
|
2171
|
-
`],bt([l({type:String})],ct.prototype,"size",2),bt([l({type:String})],ct.prototype,"placeholder",2),bt([l()],ct.prototype,"filteredFields",2),bt([l({type:Boolean})],ct.prototype,"readonly",2),bt([l({type:String})],ct.prototype,"dataProviderExpression",2),bt([l({type:Number})],ct.prototype,"minSearchLength",2),bt([l({type:Boolean})],ct.prototype,"select",2),bt([l({type:String})],ct.prototype,"key",2),bt([l({type:String})],ct.prototype,"searchParameter",2),bt([l({type:String})],ct.prototype,"propertyName",2),bt([at({slot:"prefix",flatten:!0})],ct.prototype,"slotInputPrefixNodes",2),bt([N()],ct.prototype,"hasInputPrefix",2),bt([N()],ct.prototype,"isPopVisible",2),ct=bt([
|
|
2171
|
+
`],bt([l({type:String})],ct.prototype,"size",2),bt([l({type:String})],ct.prototype,"placeholder",2),bt([l()],ct.prototype,"filteredFields",2),bt([l({type:Boolean})],ct.prototype,"readonly",2),bt([l({type:String})],ct.prototype,"dataProviderExpression",2),bt([l({type:Number})],ct.prototype,"minSearchLength",2),bt([l({type:Boolean})],ct.prototype,"select",2),bt([l({type:String})],ct.prototype,"key",2),bt([l({type:String})],ct.prototype,"searchParameter",2),bt([l({type:String})],ct.prototype,"propertyName",2),bt([at({slot:"prefix",flatten:!0})],ct.prototype,"slotInputPrefixNodes",2),bt([N()],ct.prototype,"hasInputPrefix",2),bt([N()],ct.prototype,"isPopVisible",2),ct=bt([$("sonic-input-autocomplete")],ct);var nc=Object.defineProperty,ac=Object.getOwnPropertyDescriptor,ut=(r,t,s,i)=>{for(var e=i>1?void 0:i?ac(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&nc(t,s,e),e};const lc="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)},it.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&it.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?C:m`
|
|
2172
2172
|
<div>${this.wording_password_helper_decription}</div>
|
|
2173
2173
|
<div>
|
|
2174
2174
|
${this.getIcon(this.hasEnoughChars)}
|
|
@@ -2189,11 +2189,11 @@
|
|
|
2189
2189
|
${this.getIcon(this.hasSpecialChar)}
|
|
2190
2190
|
${this.wording_password_helper_special_char}
|
|
2191
2191
|
</div>
|
|
2192
|
-
`}};ut([l()],ht.prototype,"name",2),ut([l()],ht.prototype,"minChars",2),ut([N()],ht.prototype,"hasNoChar",2),ut([N()],ht.prototype,"hasEnoughChars",2),ut([N()],ht.prototype,"hasMinuscule",2),ut([N()],ht.prototype,"hasMajuscule",2),ut([N()],ht.prototype,"hasNumber",2),ut([N()],ht.prototype,"hasSpecialChar",2),ut([l()],ht.prototype,"wording_password_helper_decription",2),ut([l()],ht.prototype,"wording_password_helper_min_length",2),ut([l()],ht.prototype,"wording_password_helper_lower_case",2),ut([l()],ht.prototype,"wording_password_helper_upper_case",2),ut([l()],ht.prototype,"wording_password_helper_number",2),ut([l()],ht.prototype,"wording_password_helper_special_char",2),ht=ut([
|
|
2192
|
+
`}};ut([l()],ht.prototype,"name",2),ut([l()],ht.prototype,"minChars",2),ut([N()],ht.prototype,"hasNoChar",2),ut([N()],ht.prototype,"hasEnoughChars",2),ut([N()],ht.prototype,"hasMinuscule",2),ut([N()],ht.prototype,"hasMajuscule",2),ut([N()],ht.prototype,"hasNumber",2),ut([N()],ht.prototype,"hasSpecialChar",2),ut([l()],ht.prototype,"wording_password_helper_decription",2),ut([l()],ht.prototype,"wording_password_helper_min_length",2),ut([l()],ht.prototype,"wording_password_helper_lower_case",2),ut([l()],ht.prototype,"wording_password_helper_upper_case",2),ut([l()],ht.prototype,"wording_password_helper_number",2),ut([l()],ht.prototype,"wording_password_helper_special_char",2),ht=ut([$(lc)],ht);var cc=Object.defineProperty,hc=Object.getOwnPropertyDescriptor,xe=(r,t,s,i)=>{for(var e=i>1?void 0:i?hc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&cc(t,s,e),e};const dc="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=it.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=it.get(this.getAncestorAttributeValue("formDataProvider"));pt(r,this.name).offAssign(this.checkValue),pt(r,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?C:m`
|
|
2193
2193
|
<span>
|
|
2194
2194
|
${this.areEqual?z(this.descriptionWhenEqual):z(this.descriptionWhenNotEqual)}
|
|
2195
2195
|
</span>
|
|
2196
|
-
`}};xe([l()],re.prototype,"name",2),xe([l()],re.prototype,"sameValueAs",2),xe([l()],re.prototype,"descriptionWhenEqual",2),xe([l()],re.prototype,"descriptionWhenNotEqual",2),xe([N()],re.prototype,"areEqual",2),xe([N()],re.prototype,"hasNoChar",2),re=xe([
|
|
2196
|
+
`}};xe([l()],re.prototype,"name",2),xe([l()],re.prototype,"sameValueAs",2),xe([l()],re.prototype,"descriptionWhenEqual",2),xe([l()],re.prototype,"descriptionWhenNotEqual",2),xe([N()],re.prototype,"areEqual",2),xe([N()],re.prototype,"hasNoChar",2),re=xe([$(dc)],re);var pc=Object.defineProperty,uc=Object.getOwnPropertyDescriptor,Wt=(r,t,s,i)=>{for(var e=i>1?void 0:i?uc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&pc(t,s,e),e};const fc="sonic-checkbox";let ft=class extends xi(Vs(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`
|
|
2197
2197
|
<label class="checkbox-container ${this.disabled?"disabled":""}">
|
|
2198
2198
|
|
|
2199
2199
|
<span class="icon-container">
|
|
@@ -2204,12 +2204,12 @@
|
|
|
2204
2204
|
?required=${this.required}
|
|
2205
2205
|
?data-indeterminate=${this.showAsIndeterminate}
|
|
2206
2206
|
?disabled=${this.disabled}
|
|
2207
|
-
.checked=${
|
|
2207
|
+
.checked=${A(this.checked)}
|
|
2208
2208
|
.name=${this.name}
|
|
2209
2209
|
.value=${this.value}
|
|
2210
2210
|
?autofocus=${this.autofocus}
|
|
2211
|
-
aria-label=${
|
|
2212
|
-
aria-labelledby=${
|
|
2211
|
+
aria-label=${A(this.ariaLabel)}
|
|
2212
|
+
aria-labelledby=${A(this.ariaLabelledby)}
|
|
2213
2213
|
/>
|
|
2214
2214
|
<sonic-icon name="${this.checked=="indeterminate"||this.showAsIndeterminate?this.indeterminateIconName:this.iconName}" class="sc-input-icon"></sonic-icon>
|
|
2215
2215
|
</span>
|
|
@@ -2221,7 +2221,7 @@
|
|
|
2221
2221
|
</div>
|
|
2222
2222
|
</label>
|
|
2223
2223
|
</label>
|
|
2224
|
-
`}};ft.styles=[Nt
|
|
2224
|
+
`}};ft.styles=[Nt,P`
|
|
2225
2225
|
:host {
|
|
2226
2226
|
--sc-checkbox-border-width: var(--sc-form-border-width);
|
|
2227
2227
|
--sc-checkbox-border-color: var(
|
|
@@ -2343,7 +2343,7 @@
|
|
|
2343
2343
|
.hidden {
|
|
2344
2344
|
display: none;
|
|
2345
2345
|
}
|
|
2346
|
-
`],Wt([l({type:Boolean,reflect:!0})],ft.prototype,"touched",2),Wt([l({type:String})],ft.prototype,"iconName",2),Wt([l({type:String})],ft.prototype,"indeterminateIconName",2),Wt([l({type:Boolean})],ft.prototype,"showAsIndeterminate",2),Wt([l({type:Boolean})],ft.prototype,"hasDescription",2),Wt([l({type:Boolean})],ft.prototype,"hasLabel",2),Wt([at({flatten:!0})],ft.prototype,"slotLabelNodes",2),Wt([at({slot:"description",flatten:!0})],ft.prototype,"slotDescriptionNodes",2),ft=Wt([
|
|
2346
|
+
`],Wt([l({type:Boolean,reflect:!0})],ft.prototype,"touched",2),Wt([l({type:String})],ft.prototype,"iconName",2),Wt([l({type:String})],ft.prototype,"indeterminateIconName",2),Wt([l({type:Boolean})],ft.prototype,"showAsIndeterminate",2),Wt([l({type:Boolean})],ft.prototype,"hasDescription",2),Wt([l({type:Boolean})],ft.prototype,"hasLabel",2),Wt([at({flatten:!0})],ft.prototype,"slotLabelNodes",2),Wt([at({slot:"description",flatten:!0})],ft.prototype,"slotDescriptionNodes",2),ft=Wt([$(fc)],ft);var mc=Object.defineProperty,gc=Object.getOwnPropertyDescriptor,bc=(r,t,s,i)=>{for(var e=i>1?void 0:i?gc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&mc(t,s,e),e};const vc="sonic-radio";let zi=class extends ft{constructor(){super(),this.radio=!0}connectedCallback(){super.connectedCallback(),this.type="radio"}};zi.styles=[ft.styles,P`
|
|
2347
2347
|
:host input {
|
|
2348
2348
|
border-radius: 50%;
|
|
2349
2349
|
}
|
|
@@ -2359,7 +2359,7 @@
|
|
|
2359
2359
|
width: 0.6em;
|
|
2360
2360
|
width: round(0.6em, 1px);
|
|
2361
2361
|
}
|
|
2362
|
-
`],zi=bc([
|
|
2362
|
+
`],zi=bc([$(vc)],zi);var yc=Object.defineProperty,_c=Object.getOwnPropertyDescriptor,wc=(r,t,s,i)=>{for(var e=i>1?void 0:i?_c(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&yc(t,s,e),e};const xc="sonic-switch";let Ri=class extends ft{constructor(){super(),this.unique=!0}};Ri.styles=[ft.styles,P`
|
|
2363
2363
|
sonic-icon {
|
|
2364
2364
|
display: none;
|
|
2365
2365
|
}
|
|
@@ -2424,7 +2424,7 @@
|
|
|
2424
2424
|
input + sonic-icon {
|
|
2425
2425
|
display: none;
|
|
2426
2426
|
}
|
|
2427
|
-
`],Ri=wc([
|
|
2427
|
+
`],Ri=wc([$(xc)],Ri);var $c=Object.defineProperty,Pc=Object.getOwnPropertyDescriptor,J=(r,t,s,i)=>{for(var e=i>1?void 0:i?Pc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&$c(t,s,e),e};const Ac="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 s of r)s.selected&&(this.value=s.value||"");!(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,s,i;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length),this.hasSuffix=!!((s=this.slotSuffixNodes)!=null&&s.length),this.hasPrefix=!!((i=this.slotPrefixNodes)!=null&&i.length)}validateFormElement(){var s;const r=(s=this.shadowRoot)==null?void 0:s.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`
|
|
2428
2428
|
<label
|
|
2429
2429
|
for="form-element"
|
|
2430
2430
|
class="${this.hasLabel?"form-label":"hidden"}"
|
|
@@ -2445,12 +2445,12 @@
|
|
|
2445
2445
|
?disabled=${this.disabled}
|
|
2446
2446
|
?required=${this.required}
|
|
2447
2447
|
?multiple=${this.multiple}
|
|
2448
|
-
size=${
|
|
2448
|
+
size=${A(this.selectSize)}
|
|
2449
2449
|
?autofocus=${this.autofocus}
|
|
2450
2450
|
.value="${this.value}"
|
|
2451
2451
|
class="form-element"
|
|
2452
|
-
aria-label=${
|
|
2453
|
-
aria-labelledby=${
|
|
2452
|
+
aria-label=${A(this.ariaLabel)}
|
|
2453
|
+
aria-labelledby=${A(this.ariaLabelledby)}
|
|
2454
2454
|
>
|
|
2455
2455
|
${Ns(this.options,t=>t[this.valueKey],t=>{const s=this.value==t[this.valueKey];return m`<option
|
|
2456
2456
|
?selected=${s}
|
|
@@ -2475,7 +2475,7 @@
|
|
|
2475
2475
|
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2476
2476
|
>${this.description?m`${z(this.description)}`:""}</slot
|
|
2477
2477
|
>
|
|
2478
|
-
`}};Z.styles=[Nt,ji,Zs,
|
|
2478
|
+
`}};Z.styles=[Nt,ji,Zs,Xs,P`
|
|
2479
2479
|
.form-element {
|
|
2480
2480
|
appearance: none;
|
|
2481
2481
|
}
|
|
@@ -2525,7 +2525,7 @@
|
|
|
2525
2525
|
:host([multiple]) sonic-icon {
|
|
2526
2526
|
display: none !important;
|
|
2527
2527
|
}
|
|
2528
|
-
`],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([at({slot:"label",flatten:!0})],Z.prototype,"slotLabelNodes",2),J([at({slot:"description",flatten:!0})],Z.prototype,"slotDescriptionNodes",2),J([at({slot:"suffix",flatten:!0})],Z.prototype,"slotSuffixNodes",2),J([at({slot:"prefix",flatten:!0})],Z.prototype,"slotPrefixNodes",2),J([N()],Z.prototype,"hasDescription",2),J([N()],Z.prototype,"hasLabel",2),J([N()],Z.prototype,"hasSuffix",2),J([N()],Z.prototype,"hasPrefix",2),Z=J([
|
|
2528
|
+
`],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([at({slot:"label",flatten:!0})],Z.prototype,"slotLabelNodes",2),J([at({slot:"description",flatten:!0})],Z.prototype,"slotDescriptionNodes",2),J([at({slot:"suffix",flatten:!0})],Z.prototype,"slotSuffixNodes",2),J([at({slot:"prefix",flatten:!0})],Z.prototype,"slotPrefixNodes",2),J([N()],Z.prototype,"hasDescription",2),J([N()],Z.prototype,"hasLabel",2),J([N()],Z.prototype,"hasSuffix",2),J([N()],Z.prototype,"hasPrefix",2),Z=J([$(Ac)],Z);var Cc=Object.defineProperty,Sc=Object.getOwnPropertyDescriptor,vt=(r,t,s,i)=>{for(var e=i>1?void 0:i?Sc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Cc(t,s,e),e};const Oc="sonic-textarea";let dt=class extends Vs(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 s;const r=(s=this.shadowRoot)==null?void 0:s.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`
|
|
2529
2529
|
<label
|
|
2530
2530
|
for="${this.id||"form-element"}"
|
|
2531
2531
|
class="${this.hasLabel?"form-label":"hidden"}"
|
|
@@ -2544,19 +2544,19 @@
|
|
|
2544
2544
|
?disabled=${this.disabled}
|
|
2545
2545
|
?required=${this.required}
|
|
2546
2546
|
?autofocus=${this.autofocus}
|
|
2547
|
-
rows=${
|
|
2548
|
-
cols=${
|
|
2549
|
-
maxlength=${
|
|
2550
|
-
minlength=${
|
|
2547
|
+
rows=${A(this.rows)}
|
|
2548
|
+
cols=${A(this.cols)}
|
|
2549
|
+
maxlength=${A(this.maxlength)}
|
|
2550
|
+
minlength=${A(this.minlength)}
|
|
2551
2551
|
?readonly=${this.readonly}
|
|
2552
|
-
spellcheck=${
|
|
2553
|
-
autocomplete=${
|
|
2554
|
-
tabindex=${
|
|
2555
|
-
wrap=${
|
|
2552
|
+
spellcheck=${A(this.spellcheck)}
|
|
2553
|
+
autocomplete=${A(this.autocomplete)}
|
|
2554
|
+
tabindex=${A(this.tabindex)}
|
|
2555
|
+
wrap=${A(this.wrap)}
|
|
2556
2556
|
placeholder="${this.placeholder}"
|
|
2557
2557
|
class="form-element textarea custom-scroll"
|
|
2558
|
-
aria-label=${
|
|
2559
|
-
aria-labelledby=${
|
|
2558
|
+
aria-label=${A(this.ariaLabel)}
|
|
2559
|
+
aria-labelledby=${A(this.ariaLabelledby)}
|
|
2560
2560
|
style=${gt(r)}
|
|
2561
2561
|
>
|
|
2562
2562
|
${this.value}</textarea
|
|
@@ -2569,12 +2569,12 @@ ${this.value}</textarea
|
|
|
2569
2569
|
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2570
2570
|
>${this.description?m`${z(this.description)}`:""}</slot
|
|
2571
2571
|
>
|
|
2572
|
-
`}};dt.styles=[Nt,ji,Zs,
|
|
2572
|
+
`}};dt.styles=[Nt,ji,Zs,Xs,cs,P`
|
|
2573
2573
|
textarea {
|
|
2574
2574
|
overflow-y: auto !important;
|
|
2575
2575
|
font-size: inherit;
|
|
2576
2576
|
}
|
|
2577
|
-
`],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([at({slot:"label",flatten:!0})],dt.prototype,"slotLabelNodes",2),vt([at({slot:"description",flatten:!0})],dt.prototype,"slotDescriptionNodes",2),vt([N()],dt.prototype,"hasDescription",2),vt([N()],dt.prototype,"hasLabel",2),dt=vt([
|
|
2577
|
+
`],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([at({slot:"label",flatten:!0})],dt.prototype,"slotLabelNodes",2),vt([at({slot:"description",flatten:!0})],dt.prototype,"slotDescriptionNodes",2),vt([N()],dt.prototype,"hasDescription",2),vt([N()],dt.prototype,"hasLabel",2),dt=vt([$(Oc)],dt);var Dc=Object.defineProperty,kc=Object.getOwnPropertyDescriptor,Lc=(r,t,s,i)=>{for(var e=i>1?void 0:i?kc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Dc(t,s,e),e};let Ui=class extends x{render(){return m`<slot></slot>`}};Ui.styles=[P`
|
|
2578
2578
|
:host {
|
|
2579
2579
|
font-size: 1.15rem;
|
|
2580
2580
|
line-height: 1.2;
|
|
@@ -2591,12 +2591,12 @@ ${this.value}</textarea
|
|
|
2591
2591
|
font-size: 1rem;
|
|
2592
2592
|
}
|
|
2593
2593
|
}
|
|
2594
|
-
`],Ui=Lc([
|
|
2594
|
+
`],Ui=Lc([$("sonic-legend-description")],Ui);var Ec=Object.defineProperty,Nc=Object.getOwnPropertyDescriptor,$e=(r,t,s,i)=>{for(var e=i>1?void 0:i?Nc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ec(t,s,e),e};const Tc="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">
|
|
2595
2595
|
${this.iconName?m`<div class="icon">
|
|
2596
2596
|
<sonic-icon
|
|
2597
2597
|
name=${this.iconName}
|
|
2598
|
-
prefix=${
|
|
2599
|
-
library=${
|
|
2598
|
+
prefix=${A(this.iconPrefix)}
|
|
2599
|
+
library=${A(this.iconLibrary)}
|
|
2600
2600
|
></sonic-icon>
|
|
2601
2601
|
</div>`:""}
|
|
2602
2602
|
|
|
@@ -2608,7 +2608,7 @@ ${this.value}</textarea
|
|
|
2608
2608
|
<slot></slot>
|
|
2609
2609
|
</div>
|
|
2610
2610
|
<slot name="suffix"></slot>
|
|
2611
|
-
</legend>`}};Kt.styles=[
|
|
2611
|
+
</legend>`}};Kt.styles=[P`
|
|
2612
2612
|
:host {
|
|
2613
2613
|
--sc-legend-font-size: 1.5rem;
|
|
2614
2614
|
--sc-legend-font-weight: var(--sc-font-weight-base, 400);
|
|
@@ -2652,19 +2652,19 @@ ${this.value}</textarea
|
|
|
2652
2652
|
.legend-content {
|
|
2653
2653
|
flex-grow: 1;
|
|
2654
2654
|
}
|
|
2655
|
-
`],$e([l({type:Boolean})],Kt.prototype,"forceAutoFill",2),$e([l()],Kt.prototype,"description",1),$e([l()],Kt.prototype,"label",1),$e([l({type:String})],Kt.prototype,"iconName",2),$e([l({type:String})],Kt.prototype,"iconLibrary",2),$e([l({type:String})],Kt.prototype,"iconPrefix",2),Kt=$e([
|
|
2656
|
-
form="${
|
|
2655
|
+
`],$e([l({type:Boolean})],Kt.prototype,"forceAutoFill",2),$e([l()],Kt.prototype,"description",1),$e([l()],Kt.prototype,"label",1),$e([l({type:String})],Kt.prototype,"iconName",2),$e([l({type:String})],Kt.prototype,"iconLibrary",2),$e([l({type:String})],Kt.prototype,"iconPrefix",2),Kt=$e([$(Tc)],Kt);var Mc=Object.defineProperty,Ic=Object.getOwnPropertyDescriptor,It=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ic(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Mc(t,s,e),e};const jc="sonic-fieldset";let Pt=class extends G(x){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return m`<fieldset
|
|
2656
|
+
form="${A(this.form)}"
|
|
2657
2657
|
?disabled="${this.disabled}"
|
|
2658
2658
|
>
|
|
2659
2659
|
${this.label?m` <sonic-legend
|
|
2660
|
-
label=${
|
|
2661
|
-
description=${
|
|
2662
|
-
iconName=${
|
|
2663
|
-
iconPrefix=${
|
|
2664
|
-
iconLibrary=${
|
|
2665
|
-
></sonic-legend>`:
|
|
2660
|
+
label=${A(this.label)}
|
|
2661
|
+
description=${A(this.description)}
|
|
2662
|
+
iconName=${A(this.iconName)}
|
|
2663
|
+
iconPrefix=${A(this.iconPrefix)}
|
|
2664
|
+
iconLibrary=${A(this.iconLibrary)}
|
|
2665
|
+
></sonic-legend>`:C}
|
|
2666
2666
|
<slot></slot>
|
|
2667
|
-
</fieldset>`}};Pt.styles=[
|
|
2667
|
+
</fieldset>`}};Pt.styles=[P`
|
|
2668
2668
|
:host {
|
|
2669
2669
|
--sc-fieldset-mt: 0;
|
|
2670
2670
|
--sc-fieldset-mb: 1rem;
|
|
@@ -2713,9 +2713,9 @@ ${this.value}</textarea
|
|
|
2713
2713
|
::slotted(sonic-legend:last-child) {
|
|
2714
2714
|
margin-bottom: 0;
|
|
2715
2715
|
}
|
|
2716
|
-
`],It([l({type:Boolean,reflect:!0})],Pt.prototype,"disabled",2),It([l({type:String})],Pt.prototype,"form",2),It([l({type:String})],Pt.prototype,"label",2),It([l({type:String})],Pt.prototype,"description",2),It([l({type:String})],Pt.prototype,"iconName",2),It([l({type:String})],Pt.prototype,"iconLibrary",2),It([l({type:String})],Pt.prototype,"iconPrefix",2),It([l({type:Boolean,reflect:!0})],Pt.prototype,"tight",2),It([l({type:String,reflect:!0})],Pt.prototype,"variant",2),Pt=It([
|
|
2716
|
+
`],It([l({type:Boolean,reflect:!0})],Pt.prototype,"disabled",2),It([l({type:String})],Pt.prototype,"form",2),It([l({type:String})],Pt.prototype,"label",2),It([l({type:String})],Pt.prototype,"description",2),It([l({type:String})],Pt.prototype,"iconName",2),It([l({type:String})],Pt.prototype,"iconLibrary",2),It([l({type:String})],Pt.prototype,"iconPrefix",2),It([l({type:Boolean,reflect:!0})],Pt.prototype,"tight",2),It([l({type:String,reflect:!0})],Pt.prototype,"variant",2),Pt=It([$(jc)],Pt);var Fc=Object.defineProperty,zc=Object.getOwnPropertyDescriptor,Vi=(r,t,s,i)=>{for(var e=i>1?void 0:i?zc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Fc(t,s,e),e};const Rc="sonic-form-layout";let ms=class extends G(x){constructor(){super(...arguments),this._resizeController=new wo(this,{}),this.oneFormElement=!1}onSlotChange(){let r=this.slottedElements;const t=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];r=r.filter(s=>t.includes(s.nodeName.toLowerCase())),this.oneFormElement=r.length==1}render(){const r={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return m`<div class=${Fi(r)}>
|
|
2717
2717
|
<slot @slotchange=${this.onSlotChange}></slot>
|
|
2718
|
-
</div>`}};ms.styles=[
|
|
2718
|
+
</div>`}};ms.styles=[P`
|
|
2719
2719
|
:host {
|
|
2720
2720
|
display: block;
|
|
2721
2721
|
}
|
|
@@ -2750,7 +2750,7 @@ ${this.value}</textarea
|
|
|
2750
2750
|
::slotted(sonic-divider) {
|
|
2751
2751
|
--sc-divider-my: 0;
|
|
2752
2752
|
}
|
|
2753
|
-
`],Vi([ce({flatten:!0})],ms.prototype,"slottedElements",2),Vi([l({type:Boolean})],ms.prototype,"oneFormElement",2),ms=Vi([
|
|
2753
|
+
`],Vi([ce({flatten:!0})],ms.prototype,"slottedElements",2),Vi([l({type:Boolean})],ms.prototype,"oneFormElement",2),ms=Vi([$(Rc)],ms);var Uc=Object.defineProperty,Vc=Object.getOwnPropertyDescriptor,Hi=(r,t,s,i)=>{for(var e=i>1?void 0:i?Vc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Uc(t,s,e),e};const Hc="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=${gt(r)}></slot>`}};gs.styles=[P`
|
|
2754
2754
|
:host {
|
|
2755
2755
|
display: block;
|
|
2756
2756
|
}
|
|
@@ -2759,7 +2759,7 @@ ${this.value}</textarea
|
|
|
2759
2759
|
flex-wrap: wrap;
|
|
2760
2760
|
gap: 0.3rem;
|
|
2761
2761
|
}
|
|
2762
|
-
`],Hi([l({type:String})],gs.prototype,"direction",2),Hi([l({type:String})],gs.prototype,"justify",2),gs=Hi([
|
|
2762
|
+
`],Hi([l({type:String})],gs.prototype,"direction",2),Hi([l({type:String})],gs.prototype,"justify",2),gs=Hi([$(Hc)],gs);var Bc=Object.defineProperty,qc=Object.getOwnPropertyDescriptor,oe=(r,t,s,i)=>{for(var e=i>1?void 0:i?qc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Bc(t,s,e),e};const Wc="sonic-group";let jt=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((s,i)=>{const e=s;i===0?(e.style.setProperty("--sc-item-rounded-tr","0"),e.style.setProperty("--sc-item-rounded-br","0")):i===t-1?(e.style.setProperty("--sc-item-rounded-tl","0"),e.style.setProperty("--sc-item-rounded-bl","0")):(e.style.setProperty("--sc-item-rounded-tr","0"),e.style.setProperty("--sc-item-rounded-br","0"),e.style.setProperty("--sc-item-rounded-tl","0"),e.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"}"
|
|
2763
2763
|
>${this.label?z(this.label):""}<slot
|
|
2764
2764
|
name="label"
|
|
2765
2765
|
@slotchange=${this.hasSlotOrProps}
|
|
@@ -2772,7 +2772,7 @@ ${this.value}</textarea
|
|
|
2772
2772
|
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2773
2773
|
>
|
|
2774
2774
|
${this.description?m`${z(this.description)}`:""}
|
|
2775
|
-
</slot>`}};jt.styles=[Nt,Zs,
|
|
2775
|
+
</slot>`}};jt.styles=[Nt,Zs,Xs,P`
|
|
2776
2776
|
:host {
|
|
2777
2777
|
display: inline-block;
|
|
2778
2778
|
vertical-align: middle;
|
|
@@ -2792,7 +2792,7 @@ ${this.value}</textarea
|
|
|
2792
2792
|
::slotted(sonic-select) {
|
|
2793
2793
|
flex-grow: 1;
|
|
2794
2794
|
}
|
|
2795
|
-
`],oe([l({type:String})],jt.prototype,"alignItems",2),oe([l({type:String})],jt.prototype,"label",2),oe([l({type:String})],jt.prototype,"description",2),oe([at({slot:"label",flatten:!0})],jt.prototype,"slotLabelNodes",2),oe([at({slot:"description",flatten:!0})],jt.prototype,"slotDescriptionNodes",2),oe([N()],jt.prototype,"hasDescription",2),oe([N()],jt.prototype,"hasLabel",2),jt=oe([
|
|
2795
|
+
`],oe([l({type:String})],jt.prototype,"alignItems",2),oe([l({type:String})],jt.prototype,"label",2),oe([l({type:String})],jt.prototype,"description",2),oe([at({slot:"label",flatten:!0})],jt.prototype,"slotLabelNodes",2),oe([at({slot:"description",flatten:!0})],jt.prototype,"slotDescriptionNodes",2),oe([N()],jt.prototype,"hasDescription",2),oe([N()],jt.prototype,"hasLabel",2),jt=oe([$(Wc)],jt);var Kc=Object.defineProperty,Yc=Object.getOwnPropertyDescriptor,Ft=(r,t,s,i)=>{for(var e=i>1?void 0:i?Yc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Kc(t,s,e),e};const Zc="sonic-image";let At=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 s=(t=this.shadowRoot)==null?void 0:t.querySelector("img");if(!s)return;s.onload=function(){s.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">
|
|
2796
2796
|
<picture part="picture"
|
|
2797
2797
|
><img
|
|
2798
2798
|
part="img"
|
|
@@ -2801,7 +2801,7 @@ ${this.value}</textarea
|
|
|
2801
2801
|
alt="${this.alt}"
|
|
2802
2802
|
style=${gt(r)}
|
|
2803
2803
|
/></picture>
|
|
2804
|
-
</div>`}};At.styles=[
|
|
2804
|
+
</div>`}};At.styles=[P`
|
|
2805
2805
|
:host {
|
|
2806
2806
|
--sc-img-radius: 0;
|
|
2807
2807
|
--sc-img-bg: var(--sc-placeholder-bg, rgba(12, 12, 12, 0.05));
|
|
@@ -2875,7 +2875,7 @@ ${this.value}</textarea
|
|
|
2875
2875
|
opacity: 1;
|
|
2876
2876
|
scale: 1;
|
|
2877
2877
|
}
|
|
2878
|
-
`],Ft([l({type:String})],At.prototype,"rounded",2),Ft([l({type:String})],At.prototype,"src",2),Ft([l({type:String})],At.prototype,"alt",2),Ft([l({type:String})],At.prototype,"loading",2),Ft([l({type:String,reflect:!0})],At.prototype,"transition",2),Ft([l({type:String})],At.prototype,"ratio",2),Ft([l({type:String})],At.prototype,"objectPosition",2),Ft([l({type:String})],At.prototype,"imageRendering",2),Ft([l({type:Boolean,reflect:!0})],At.prototype,"cover",2),At=Ft([
|
|
2878
|
+
`],Ft([l({type:String})],At.prototype,"rounded",2),Ft([l({type:String})],At.prototype,"src",2),Ft([l({type:String})],At.prototype,"alt",2),Ft([l({type:String})],At.prototype,"loading",2),Ft([l({type:String,reflect:!0})],At.prototype,"transition",2),Ft([l({type:String})],At.prototype,"ratio",2),Ft([l({type:String})],At.prototype,"objectPosition",2),Ft([l({type:String})],At.prototype,"imageRendering",2),Ft([l({type:Boolean,reflect:!0})],At.prototype,"cover",2),At=Ft([$(Zc)],At);var Xc=Object.defineProperty,Gc=Object.getOwnPropertyDescriptor,wt=(r,t,s,i)=>{for(var e=i>1?void 0:i?Gc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Xc(t,s,e),e};const Qc="sonic-menu";let mt=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,s;this.scrollable&&(this.addEventListener("mousedown",i=>{r=!0,this.classList.add("active"),t=i.pageX-this.offsetLeft,s=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=s-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",s={display:"block",alignSelf:t?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:t?"":".55em"};return m`<menu
|
|
2879
2879
|
part="menu"
|
|
2880
2880
|
class="shadowable"
|
|
2881
2881
|
style=${gt(r)}
|
|
@@ -2898,7 +2898,7 @@ ${this.value}</textarea
|
|
|
2898
2898
|
</sonic-menu-item>
|
|
2899
2899
|
<slot name="more" @slotchange=${this.checkIfMore} slot="content"></slot>
|
|
2900
2900
|
</sonic-pop>
|
|
2901
|
-
</menu>`}};mt.styles=[
|
|
2901
|
+
</menu>`}};mt.styles=[P`
|
|
2902
2902
|
:host {
|
|
2903
2903
|
display: block;
|
|
2904
2904
|
--sc-menu-gap: 0.15rem;
|
|
@@ -3015,16 +3015,16 @@ ${this.value}</textarea
|
|
|
3015
3015
|
rgba(0, 0, 0, 0) 100%
|
|
3016
3016
|
);
|
|
3017
3017
|
}
|
|
3018
|
-
`,yo],wt([l({type:String,reflect:!0})],mt.prototype,"size",2),wt([l({type:String,reflect:!0})],mt.prototype,"direction",2),wt([l({type:String})],mt.prototype,"gap",2),wt([l({type:String,reflect:!0})],mt.prototype,"align",2),wt([l({type:String,reflect:!0})],mt.prototype,"shadow",2),wt([l({type:String})],mt.prototype,"moreShape",2),wt([l({type:Boolean})],mt.prototype,"scrollable",2),wt([l({type:String})],mt.prototype,"minWidth",2),wt([le("menu")],mt.prototype,"menu",2),wt([ce({selector:"sonic-menu-item"})],mt.prototype,"menuChildren",2),wt([ce({slot:"more",selector:"*"})],mt.prototype,"moreElements",2),wt([N()],mt.prototype,"hasMoreElements",2),mt=wt([
|
|
3018
|
+
`,yo],wt([l({type:String,reflect:!0})],mt.prototype,"size",2),wt([l({type:String,reflect:!0})],mt.prototype,"direction",2),wt([l({type:String})],mt.prototype,"gap",2),wt([l({type:String,reflect:!0})],mt.prototype,"align",2),wt([l({type:String,reflect:!0})],mt.prototype,"shadow",2),wt([l({type:String})],mt.prototype,"moreShape",2),wt([l({type:Boolean})],mt.prototype,"scrollable",2),wt([l({type:String})],mt.prototype,"minWidth",2),wt([le("menu")],mt.prototype,"menu",2),wt([ce({selector:"sonic-menu-item"})],mt.prototype,"menuChildren",2),wt([ce({slot:"more",selector:"*"})],mt.prototype,"moreElements",2),wt([N()],mt.prototype,"hasMoreElements",2),mt=wt([$(Qc)],mt);var Jc=Object.defineProperty,th=Object.getOwnPropertyDescriptor,xo=(r,t,s,i)=>{for(var e=i>1?void 0:i?th(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Jc(t,s,e),e};const eh="sonic-modal-actions";let Gs=class extends x{firstUpdated(r){var t;(t=this.buttons)==null||t.forEach(s=>{s.hasAttribute("hideModal")&&s.addEventListener("click",()=>{const i=Gt.getClosestElement(this,"sonic-modal");i==null||i.hide()})}),super.firstUpdated(r)}render(){return m`<slot></slot>`}};Gs.styles=[P`
|
|
3019
3019
|
:host {
|
|
3020
3020
|
display: flex;
|
|
3021
3021
|
gap: 0.5rem;
|
|
3022
3022
|
margin-top: auto;
|
|
3023
3023
|
padding-top: 1.5rem;
|
|
3024
3024
|
}
|
|
3025
|
-
`],xo([ce({selector:"sonic-button"})],
|
|
3025
|
+
`],xo([ce({selector:"sonic-button"})],Gs.prototype,"buttons",2),Gs=xo([$(eh)],Gs);var sh=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,$o=(r,t,s,i)=>{for(var e=i>1?void 0:i?ih(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&sh(t,s,e),e};const rh="sonic-modal-close";let Qs=class extends x{render(){return m`<sonic-button reset=${A(this.reset)} shape="circle" @click=${this.handleClick}
|
|
3026
3026
|
><sonic-icon name="cancel" size="lg"></sonic-icon
|
|
3027
|
-
></sonic-button>`}handleClick(){K.getClosestElement(this,"sonic-modal").hide()}};Qs.styles=[
|
|
3027
|
+
></sonic-button>`}handleClick(){K.getClosestElement(this,"sonic-modal").hide()}};Qs.styles=[P`
|
|
3028
3028
|
:host {
|
|
3029
3029
|
position: sticky;
|
|
3030
3030
|
display: block;
|
|
@@ -3035,12 +3035,12 @@ ${this.value}</textarea
|
|
|
3035
3035
|
transform: translate3d(calc(var(--sc-modal-px)), calc(-1 * var(--sc-modal-py)), 0);
|
|
3036
3036
|
z-index: 20;
|
|
3037
3037
|
}
|
|
3038
|
-
`],$o([l()],Qs.prototype,"reset",2),Qs=$o([
|
|
3038
|
+
`],$o([l()],Qs.prototype,"reset",2),Qs=$o([$(rh)],Qs);var oh=Object.defineProperty,nh=Object.getOwnPropertyDescriptor,ah=(r,t,s,i)=>{for(var e=i>1?void 0:i?nh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&oh(t,s,e),e};const lh="sonic-modal-content";let Bi=class extends x{render(){return m`<slot></slot>`}};Bi.styles=[P`
|
|
3039
3039
|
:host {
|
|
3040
3040
|
display: block;
|
|
3041
3041
|
width: 100%;
|
|
3042
3042
|
}
|
|
3043
|
-
`],Bi=ah([
|
|
3043
|
+
`],Bi=ah([$(lh)],Bi);var ch=Object.defineProperty,hh=Object.getOwnPropertyDescriptor,dh=(r,t,s,i)=>{for(var e=i>1?void 0:i?hh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ch(t,s,e),e};const ph="sonic-modal-subtitle";let qi=class extends x{render(){return m`<slot></slot>`}};qi.styles=[P`
|
|
3044
3044
|
:host {
|
|
3045
3045
|
font-size: 1.1rem;
|
|
3046
3046
|
display: block;
|
|
@@ -3053,7 +3053,7 @@ ${this.value}</textarea
|
|
|
3053
3053
|
font-weight: var(--sc-headings-font-weight, 700);
|
|
3054
3054
|
font-style: var(--sc-headings-font-style, normal);
|
|
3055
3055
|
}
|
|
3056
|
-
`],qi=dh([
|
|
3056
|
+
`],qi=dh([$(ph)],qi);var uh=Object.defineProperty,fh=Object.getOwnPropertyDescriptor,mh=(r,t,s,i)=>{for(var e=i>1?void 0:i?fh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&uh(t,s,e),e};const gh="sonic-modal-title";let Wi=class extends x{render(){return m`<slot></slot>`}};Wi.styles=[P`
|
|
3057
3057
|
:host {
|
|
3058
3058
|
font-weight: bold;
|
|
3059
3059
|
font-size: 1.5rem;
|
|
@@ -3066,7 +3066,7 @@ ${this.value}</textarea
|
|
|
3066
3066
|
font-weight: var(--sc-headings-font-weight, 700);
|
|
3067
3067
|
font-style: var(--sc-headings-font-style, normal);
|
|
3068
3068
|
}
|
|
3069
|
-
`],Wi=mh([
|
|
3069
|
+
`],Wi=mh([$(gh)],Wi);var bh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,st=(r,t,s,i)=>{for(var e=i>1?void 0:i?vh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&bh(t,s,e),e};const Po="sonic-modal";let F=class extends G(x){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(r){const t=document.createElement(Po);return t.options=r,r.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),r.removeOnHide===!0&&t.setAttribute("removeOnHide","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.style.setProperty("--sc-modal-px",r==null?void 0:r.paddingX),r.paddingY&&t.style.setProperty("--sc-modal-py",r==null?void 0:r.paddingY),r.zIndex&&t.style.setProperty("--sc-modal-z-index",r==null?void 0:r.zIndex),_t.getPopContainer().appendChild(t),t.show(),t}connectedCallback(){F.modals.push(this),super.connectedCallback(),this.handleFullsceen()}disconnectedCallback(){F.modals.splice(F.modals.indexOf(this),1),super.disconnectedCallback()}updated(){const r=this;document.addEventListener("keydown",this.handleEscape),r.closeBtn.forEach(t=>{t.addEventListener("click",function(){r.hide()},{once:!0})})}willUpdate(r){r.has("fullScreen")&&this.handleFullsceen(),r.has("effect")&&(this.effect=="fade"?this.animation={keyframeOptions:{duration:400},in:Qr,out:Gr}:this.effect=="none"?this.animation=void 0:this.animation={keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]}),super.willUpdate(r)}render(){if(this.visible==!1)return C;const r={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return m`
|
|
3070
3070
|
<div
|
|
3071
3071
|
class="overlay"
|
|
3072
3072
|
@click="${this.forceAction?null:this.hide}"
|
|
@@ -3075,7 +3075,7 @@ ${this.value}</textarea
|
|
|
3075
3075
|
<div
|
|
3076
3076
|
class="modal-wrapper"
|
|
3077
3077
|
style=${gt(t)}
|
|
3078
|
-
${zs({out:
|
|
3078
|
+
${zs({out:Gr})}
|
|
3079
3079
|
tabindex="0"
|
|
3080
3080
|
>
|
|
3081
3081
|
<div
|
|
@@ -3085,7 +3085,7 @@ ${this.value}</textarea
|
|
|
3085
3085
|
${zs(this.animation)}
|
|
3086
3086
|
>
|
|
3087
3087
|
<div class="modal-content">
|
|
3088
|
-
${this.forceAction?
|
|
3088
|
+
${this.forceAction?C:m`<sonic-modal-close></sonic-modal-close>`}
|
|
3089
3089
|
${this.modalFragment("title")} ${this.modalFragment("subtitle")}
|
|
3090
3090
|
${this.modalFragment("content")} ${this.modalFragment("actions")}
|
|
3091
3091
|
|
|
@@ -3093,7 +3093,7 @@ ${this.value}</textarea
|
|
|
3093
3093
|
</div>
|
|
3094
3094
|
</div>
|
|
3095
3095
|
</div>
|
|
3096
|
-
`}modalFragment(r){var i;const t=(i=this.options)==null?void 0:i[r];if(!t)return
|
|
3096
|
+
`}modalFragment(r){var i;const t=(i=this.options)==null?void 0:i[r];if(!t)return C;let s;switch(t instanceof Object?s=t:s=z(t),r){case"title":return m`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return m`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return m`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return m`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return C}}show(){var r,t;this.visible=!0,(r=this.modalElement)==null||r.setAttribute("tabindex","0"),(t=this.modalElement)==null||t.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var r;this.visible=!1,(r=this.modalElement)==null||r.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&it.get(this.getAttribute("resetDataProviderOnHide")).set({}),setTimeout(()=>{this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))},480)}dispose(){this.hide(),this.remove()}static disposeAll(){F.modals.forEach(r=>{r.dispose()})}handleEscape(r){r.key==="Escape"&&F.modals.forEach(t=>{t.forceAction||t.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};F.styles=[cs,P`
|
|
3097
3097
|
:host {
|
|
3098
3098
|
--sc-modal-py: 2.5rem;
|
|
3099
3099
|
--sc-modal-px: 1.5rem;
|
|
@@ -3185,6 +3185,21 @@ ${this.value}</textarea
|
|
|
3185
3185
|
transform: translateX(-50%) translateY(-50%);
|
|
3186
3186
|
}
|
|
3187
3187
|
|
|
3188
|
+
/* Solution améliorée pour les navigateurs supportant round() */
|
|
3189
|
+
@supports (transform: translateX(round(-50%, 1px))) {
|
|
3190
|
+
.modal-wrapper {
|
|
3191
|
+
transform: translateX(round(-50%, 1px)) translateY(round(-50%, 1px));
|
|
3192
|
+
}
|
|
3193
|
+
}
|
|
3194
|
+
|
|
3195
|
+
:host([fullScreen]) .modal-wrapper {
|
|
3196
|
+
top: 0;
|
|
3197
|
+
left: 0;
|
|
3198
|
+
right: 0;
|
|
3199
|
+
bottom: 0;
|
|
3200
|
+
transform: none;
|
|
3201
|
+
}
|
|
3202
|
+
|
|
3188
3203
|
.modal {
|
|
3189
3204
|
top: 50%;
|
|
3190
3205
|
bottom: auto;
|
|
@@ -3212,14 +3227,14 @@ ${this.value}</textarea
|
|
|
3212
3227
|
:host([rounded="none"]) modal {
|
|
3213
3228
|
--sc-img-radius: 0 !important;
|
|
3214
3229
|
}
|
|
3215
|
-
`],F.modals=[],st([l({type:Boolean})],F.prototype,"forceAction",2),st([l({type:Boolean})],F.prototype,"removeOnHide",2),st([l({type:Boolean})],F.prototype,"removeHashOnHide",2),st([l({type:String,reflect:!0})],F.prototype,"align",2),st([l({type:String})],F.prototype,"padding",2),st([l({type:String})],F.prototype,"maxWidth",2),st([l({type:String})],F.prototype,"maxHeight",2),st([l({type:String})],F.prototype,"width",2),st([l({type:String})],F.prototype,"height",2),st([l({type:String})],F.prototype,"zIndex",2),st([l({type:String})],F.prototype,"effect",2),st([l({type:Object})],F.prototype,"options",2),st([l({type:Boolean,reflect:!0})],F.prototype,"fullScreen",2),st([l({type:Boolean,reflect:!0})],F.prototype,"visible",2),st([l({type:Object})],F.prototype,"animation",2),st([le(".modal-wrapper")],F.prototype,"modalWrapper",2),st([le(".modal")],F.prototype,"modalElement",2),st([ce({selector:"sonic-modal-close"})],F.prototype,"closeBtn",2),F=st([
|
|
3230
|
+
`],F.modals=[],st([l({type:Boolean})],F.prototype,"forceAction",2),st([l({type:Boolean})],F.prototype,"removeOnHide",2),st([l({type:Boolean})],F.prototype,"removeHashOnHide",2),st([l({type:String,reflect:!0})],F.prototype,"align",2),st([l({type:String})],F.prototype,"padding",2),st([l({type:String})],F.prototype,"maxWidth",2),st([l({type:String})],F.prototype,"maxHeight",2),st([l({type:String})],F.prototype,"width",2),st([l({type:String})],F.prototype,"height",2),st([l({type:String})],F.prototype,"zIndex",2),st([l({type:String})],F.prototype,"effect",2),st([l({type:Object})],F.prototype,"options",2),st([l({type:Boolean,reflect:!0})],F.prototype,"fullScreen",2),st([l({type:Boolean,reflect:!0})],F.prototype,"visible",2),st([l({type:Object})],F.prototype,"animation",2),st([le(".modal-wrapper")],F.prototype,"modalWrapper",2),st([le(".modal")],F.prototype,"modalElement",2),st([ce({selector:"sonic-modal-close"})],F.prototype,"closeBtn",2),F=st([$(Po)],F),typeof window<"u"&&(window.SonicModal=F);var yh=Object.defineProperty,_h=Object.getOwnPropertyDescriptor,zt=(r,t,s,i)=>{for(var e=i>1?void 0:i?_h(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&yh(t,s,e),e};const wh={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"},xh="sonic-alert";let Ct=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`
|
|
3216
3231
|
<slot name="icon" class="${this.noIcon?"hidden":""}"
|
|
3217
|
-
>${this.noIcon?
|
|
3232
|
+
>${this.noIcon?C:m`<div>
|
|
3218
3233
|
${this.status&&m`<sonic-icon name=${wh[this.status]}></sonic-icon>`}
|
|
3219
3234
|
</div>`}</slot
|
|
3220
3235
|
>
|
|
3221
3236
|
<div class="content">
|
|
3222
|
-
${this.label?m`<span class="label">${z(this.label)}</span>`:
|
|
3237
|
+
${this.label?m`<span class="label">${z(this.label)}</span>`:C}
|
|
3223
3238
|
<div>${this.text}<slot></slot></div>
|
|
3224
3239
|
</div>
|
|
3225
3240
|
${this.dismissible?m`<sonic-button
|
|
@@ -3230,8 +3245,8 @@ ${this.value}</textarea
|
|
|
3230
3245
|
icon
|
|
3231
3246
|
>
|
|
3232
3247
|
<sonic-icon name="cancel"></sonic-icon>
|
|
3233
|
-
</sonic-button>`:
|
|
3234
|
-
`}close(){if(this.remove(),this.dismissForever){const r=localStorage.getItem("sonic-alert-dismissed")||"{}",t=JSON.parse(r);t[this.id]=!0,localStorage.setItem("sonic-alert-dismissed",JSON.stringify(t))}}};Ct.styles=[Nt
|
|
3248
|
+
</sonic-button>`:C}
|
|
3249
|
+
`}close(){if(this.remove(),this.dismissForever){const r=localStorage.getItem("sonic-alert-dismissed")||"{}",t=JSON.parse(r);t[this.id]=!0,localStorage.setItem("sonic-alert-dismissed",JSON.stringify(t))}}};Ct.styles=[Nt,P`
|
|
3235
3250
|
:host {
|
|
3236
3251
|
--sc_color: var(--sc-base-content, #000);
|
|
3237
3252
|
--sc_rounded: var(--sc-rounded);
|
|
@@ -3318,27 +3333,27 @@ ${this.value}</textarea
|
|
|
3318
3333
|
top: 0.4rem;
|
|
3319
3334
|
right: 0.3rem;
|
|
3320
3335
|
}
|
|
3321
|
-
`],zt([l({type:String})],Ct.prototype,"label",2),zt([l({type:Boolean,reflect:!0})],Ct.prototype,"noIcon",2),zt([l({type:String})],Ct.prototype,"text",2),zt([l({type:String})],Ct.prototype,"id",2),zt([l({type:String,reflect:!0})],Ct.prototype,"size",2),zt([l({type:Boolean,reflect:!0})],Ct.prototype,"dismissible",2),zt([l({type:Boolean,reflect:!0})],Ct.prototype,"background",2),zt([l({type:String,reflect:!0})],Ct.prototype,"status",2),zt([l({type:Boolean,reflect:!0})],Ct.prototype,"dismissForever",2),Ct=zt([
|
|
3336
|
+
`],zt([l({type:String})],Ct.prototype,"label",2),zt([l({type:Boolean,reflect:!0})],Ct.prototype,"noIcon",2),zt([l({type:String})],Ct.prototype,"text",2),zt([l({type:String})],Ct.prototype,"id",2),zt([l({type:String,reflect:!0})],Ct.prototype,"size",2),zt([l({type:Boolean,reflect:!0})],Ct.prototype,"dismissible",2),zt([l({type:Boolean,reflect:!0})],Ct.prototype,"background",2),zt([l({type:String,reflect:!0})],Ct.prototype,"status",2),zt([l({type:Boolean,reflect:!0})],Ct.prototype,"dismissForever",2),Ct=zt([$(xh)],Ct);var $h=Object.defineProperty,Ph=Object.getOwnPropertyDescriptor,bs=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ph(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&$h(t,s,e),e};const Ah="sonic-alert-messages";let Pe=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">
|
|
3322
3337
|
${uo(this.messages,t=>t.type=="public"?m`<sonic-alert
|
|
3323
3338
|
status=${t.status||"default"}
|
|
3324
|
-
text=${
|
|
3339
|
+
text=${A(t.content)}
|
|
3325
3340
|
size=${this.size}
|
|
3326
3341
|
?noIcon=${this.noIcon}
|
|
3327
3342
|
?background=${this.background}
|
|
3328
|
-
></sonic-alert>`:
|
|
3329
|
-
</div>`:
|
|
3343
|
+
></sonic-alert>`:C)}
|
|
3344
|
+
</div>`:C}};Pe.styles=[P`
|
|
3330
3345
|
.container {
|
|
3331
3346
|
display: grid;
|
|
3332
3347
|
gap: 0.5em;
|
|
3333
3348
|
grid-template-columns: minmax(0, 1fr);
|
|
3334
3349
|
width: 100%;
|
|
3335
3350
|
}
|
|
3336
|
-
`],bs([l({type:String})],Pe.prototype,"size",2),bs([l({type:Boolean})],Pe.prototype,"background",2),bs([l({type:Boolean})],Pe.prototype,"noIcon",2),bs([l({type:Array})],Pe.prototype,"messages",2),Pe=bs([
|
|
3351
|
+
`],bs([l({type:String})],Pe.prototype,"size",2),bs([l({type:Boolean})],Pe.prototype,"background",2),bs([l({type:Boolean})],Pe.prototype,"noIcon",2),bs([l({type:Array})],Pe.prototype,"messages",2),Pe=bs([$(Ah)],Pe);var Ch=Object.defineProperty,Sh=Object.getOwnPropertyDescriptor,Ao=(r,t,s,i)=>{for(var e=i>1?void 0:i?Sh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ch(t,s,e),e};const Oh="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"&&M.add({text:t.content||"",status:t.status})})}render(){return C}};Ao([l({type:Array})],Ki.prototype,"messages",1),Ki=Ao([$(Oh)],Ki);var Dh=Object.defineProperty,kh=Object.getOwnPropertyDescriptor,vs=(r,t,s,i)=>{for(var e=i>1?void 0:i?kh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Dh(t,s,e),e};const Lh="sonic-tooltip";let Ae=class extends x{constructor(){super(...arguments),this.label="",this.disabled=!1,this.focusable=!1}connectedCallback(){this.focusable&&this.setAttribute("tabindex","0"),super.connectedCallback()}render(){const r=this.disabled||this.label==""?"disabled":"";return m`<div
|
|
3337
3352
|
data-tooltip-text="${this.label.trim().replace(" "," ")}"
|
|
3338
3353
|
class="tooltip ${r}"
|
|
3339
3354
|
>
|
|
3340
3355
|
<slot></slot>
|
|
3341
|
-
</div>`}};Ae.styles=[
|
|
3356
|
+
</div>`}};Ae.styles=[P`
|
|
3342
3357
|
:host {
|
|
3343
3358
|
position: relative;
|
|
3344
3359
|
display: inline-flex;
|
|
@@ -3437,11 +3452,11 @@ ${this.value}</textarea
|
|
|
3437
3452
|
bottom: 0;
|
|
3438
3453
|
left: var(--sc-tooltip-position);
|
|
3439
3454
|
}
|
|
3440
|
-
`],vs([l({type:String})],Ae.prototype,"label",2),vs([l({type:String,reflect:!0})],Ae.prototype,"placement",2),vs([l({type:Boolean})],Ae.prototype,"disabled",2),vs([l({type:Boolean})],Ae.prototype,"focusable",2),Ae=vs([
|
|
3455
|
+
`],vs([l({type:String})],Ae.prototype,"label",2),vs([l({type:String,reflect:!0})],Ae.prototype,"placement",2),vs([l({type:Boolean})],Ae.prototype,"disabled",2),vs([l({type:Boolean})],Ae.prototype,"focusable",2),Ae=vs([$(Lh)],Ae);var Eh=Object.defineProperty,Nh=Object.getOwnPropertyDescriptor,Rt=(r,t,s,i)=>{for(var e=i>1?void 0:i?Nh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Eh(t,s,e),e};const Th="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,s;super.firstUpdated(r),(this.label||(t=this.slotNodes)!=null&&t.length)&&((s=this.divider)==null||s.classList.add("has-text"))}render(){return m`<div part="divider">
|
|
3441
3456
|
<span class="text"
|
|
3442
3457
|
>${z(this.label?this.label:"")}<slot></slot
|
|
3443
3458
|
></span>
|
|
3444
|
-
</div>`}};St.styles=[
|
|
3459
|
+
</div>`}};St.styles=[P`
|
|
3445
3460
|
:host {
|
|
3446
3461
|
--sc-divider-my: 0.5rem;
|
|
3447
3462
|
--sc-divider-mx: 0;
|
|
@@ -3572,7 +3587,7 @@ ${this.value}</textarea
|
|
|
3572
3587
|
:host([dashed]) {
|
|
3573
3588
|
--sc-divider-border-style: dashed;
|
|
3574
3589
|
}
|
|
3575
|
-
`],Rt([at({flatten:!0})],St.prototype,"slotNodes",2),Rt([le("div")],St.prototype,"divider",2),Rt([l({type:String})],St.prototype,"label",2),Rt([l({type:String,reflect:!0})],St.prototype,"size",2),Rt([l({type:String,reflect:!0})],St.prototype,"align",2),Rt([l({type:Boolean,reflect:!0})],St.prototype,"vertical",2),Rt([l({type:Boolean,reflect:!0})],St.prototype,"noMargin",2),Rt([l({type:Boolean,reflect:!0})],St.prototype,"dashed",2),Rt([l({type:Boolean,reflect:!0})],St.prototype,"dotted",2),St=Rt([
|
|
3590
|
+
`],Rt([at({flatten:!0})],St.prototype,"slotNodes",2),Rt([le("div")],St.prototype,"divider",2),Rt([l({type:String})],St.prototype,"label",2),Rt([l({type:String,reflect:!0})],St.prototype,"size",2),Rt([l({type:String,reflect:!0})],St.prototype,"align",2),Rt([l({type:Boolean,reflect:!0})],St.prototype,"vertical",2),Rt([l({type:Boolean,reflect:!0})],St.prototype,"noMargin",2),Rt([l({type:Boolean,reflect:!0})],St.prototype,"dashed",2),Rt([l({type:Boolean,reflect:!0})],St.prototype,"dotted",2),St=Rt([$(Th)],St);var Mh=Object.defineProperty,Ih=Object.getOwnPropertyDescriptor,jh=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ih(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Mh(t,s,e),e};const Fh="sonic-card-header-description";let Yi=class extends x{render(){return m`<slot></slot>`}};Yi.styles=[P`
|
|
3576
3591
|
:host() {
|
|
3577
3592
|
display: block;
|
|
3578
3593
|
font-size: 0.7em;
|
|
@@ -3580,16 +3595,16 @@ ${this.value}</textarea
|
|
|
3580
3595
|
font-family: var(--sc-font-family-base, sans-serif);
|
|
3581
3596
|
font-weight: var(--sc-font-style-base, normal);
|
|
3582
3597
|
}
|
|
3583
|
-
`],Yi=jh([
|
|
3598
|
+
`],Yi=jh([$(Fh)],Yi);var zh=Object.defineProperty,Rh=Object.getOwnPropertyDescriptor,Zi=(r,t,s,i)=>{for(var e=i>1?void 0:i?Rh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&zh(t,s,e),e};const Uh="sonic-card-header";let ys=class extends x{render(){return m`
|
|
3584
3599
|
<div class="header-content">
|
|
3585
3600
|
${z(this.label)}
|
|
3586
3601
|
${this.description?m`<sonic-card-header-description
|
|
3587
3602
|
>${z(this.description)}</sonic-card-header-description
|
|
3588
|
-
>`:
|
|
3603
|
+
>`:C}
|
|
3589
3604
|
<slot></slot>
|
|
3590
3605
|
</div>
|
|
3591
3606
|
<slot name="suffix"></slot>
|
|
3592
|
-
`}};ys.styles=[
|
|
3607
|
+
`}};ys.styles=[P`
|
|
3593
3608
|
:host {
|
|
3594
3609
|
--sc-card-header-mb: 1.35rem;
|
|
3595
3610
|
--sc-card-header-font-size: 1.875rem;
|
|
@@ -3627,15 +3642,15 @@ ${this.value}</textarea
|
|
|
3627
3642
|
::slotted(sonic-card-header-description) {
|
|
3628
3643
|
margin-top: 0.1em;
|
|
3629
3644
|
}
|
|
3630
|
-
`],Zi([l()],ys.prototype,"label",2),Zi([l()],ys.prototype,"description",2),ys=Zi([
|
|
3645
|
+
`],Zi([l()],ys.prototype,"label",2),Zi([l()],ys.prototype,"description",2),ys=Zi([$(Uh)],ys);var Vh=Object.defineProperty,Hh=Object.getOwnPropertyDescriptor,Bh=(r,t,s,i)=>{for(var e=i>1?void 0:i?Hh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Vh(t,s,e),e};const qh="sonic-card-main";let Xi=class extends x{render(){return m`<slot></slot>`}};Xi.styles=[P`
|
|
3631
3646
|
:host {
|
|
3632
3647
|
display: block;
|
|
3633
3648
|
}
|
|
3634
|
-
`],
|
|
3649
|
+
`],Xi=Bh([$(qh)],Xi);var Wh=Object.defineProperty,Kh=Object.getOwnPropertyDescriptor,Yh=(r,t,s,i)=>{for(var e=i>1?void 0:i?Kh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Wh(t,s,e),e};const Zh="sonic-card-footer";let Gi=class extends x{render(){return m` <slot></slot> `}};Gi.styles=[P`
|
|
3635
3650
|
:host {
|
|
3636
3651
|
display: block;
|
|
3637
3652
|
}
|
|
3638
|
-
`],
|
|
3653
|
+
`],Gi=Yh([$(Zh)],Gi);const Qi=P`
|
|
3639
3654
|
:host {
|
|
3640
3655
|
--sc-_color: inherit;
|
|
3641
3656
|
color: var(--sc-_color);
|
|
@@ -3660,7 +3675,7 @@ ${this.value}</textarea
|
|
|
3660
3675
|
.inherit-color {
|
|
3661
3676
|
color: var(--sc-_color);
|
|
3662
3677
|
}
|
|
3663
|
-
`,
|
|
3678
|
+
`,Xh=P`
|
|
3664
3679
|
:host {
|
|
3665
3680
|
--sc-_color: inherit;
|
|
3666
3681
|
--sc-_bg: inherit;
|
|
@@ -3723,7 +3738,7 @@ ${this.value}</textarea
|
|
|
3723
3738
|
.inherit-bg {
|
|
3724
3739
|
color: inherit;
|
|
3725
3740
|
}
|
|
3726
|
-
`;var
|
|
3741
|
+
`;var Gh=Object.defineProperty,Qh=Object.getOwnPropertyDescriptor,Co=(r,t,s,i)=>{for(var e=i>1?void 0:i?Qh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Gh(t,s,e),e};const Jh="sonic-card";let Js=class extends x{constructor(){super(...arguments),this.type="base"}render(){return m`<slot></slot> `}};Js.styles=[Xh,P`
|
|
3727
3742
|
* {
|
|
3728
3743
|
box-sizing: border-box;
|
|
3729
3744
|
}
|
|
@@ -3753,7 +3768,7 @@ ${this.value}</textarea
|
|
|
3753
3768
|
box-shadow: var(--sc-_shadow);
|
|
3754
3769
|
color: var(--sc-_color);
|
|
3755
3770
|
}
|
|
3756
|
-
`],Co([l({type:String,reflect:!0})],Js.prototype,"type",2),Js=Co([
|
|
3771
|
+
`],Co([l({type:String,reflect:!0})],Js.prototype,"type",2),Js=Co([$(Jh)],Js);var td=Object.defineProperty,ed=Object.getOwnPropertyDescriptor,_s=(r,t,s,i)=>{for(var e=i>1?void 0:i?ed(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&td(t,s,e),e};const sd="sonic-tr";let Ce=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>`}};Ce.styles=[Qi,P`
|
|
3757
3772
|
:host {
|
|
3758
3773
|
display: table-row;
|
|
3759
3774
|
}
|
|
@@ -3771,14 +3786,14 @@ ${this.value}</textarea
|
|
|
3771
3786
|
:host(:hover) {
|
|
3772
3787
|
background: var(--sc-table-hover-bg) !important;
|
|
3773
3788
|
}
|
|
3774
|
-
`],_s([l({type:Object})],Ce.prototype,"_metadata_",2),_s([l({type:Boolean,reflect:!0})],Ce.prototype,"even",2),_s([l({type:Boolean,reflect:!0})],Ce.prototype,"odd",2),_s([l({type:Boolean,reflect:!0})],Ce.prototype,"last",2),Ce=_s([
|
|
3789
|
+
`],_s([l({type:Object})],Ce.prototype,"_metadata_",2),_s([l({type:Boolean,reflect:!0})],Ce.prototype,"even",2),_s([l({type:Boolean,reflect:!0})],Ce.prototype,"odd",2),_s([l({type:Boolean,reflect:!0})],Ce.prototype,"last",2),Ce=_s([$(sd)],Ce);var id=Object.defineProperty,rd=Object.getOwnPropertyDescriptor,Se=(r,t,s,i)=>{for(var e=i>1?void 0:i?rd(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&id(t,s,e),e};const od="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
|
|
3775
3790
|
part="th"
|
|
3776
3791
|
style=${gt(r)}
|
|
3777
|
-
colspan=${
|
|
3778
|
-
rowspan=${
|
|
3792
|
+
colspan=${A(this.colSpan)}
|
|
3793
|
+
rowspan=${A(this.rowSpan)}
|
|
3779
3794
|
>
|
|
3780
3795
|
<slot></slot>
|
|
3781
|
-
</th> `}};Yt.styles=[Qi
|
|
3796
|
+
</th> `}};Yt.styles=[Qi,P`
|
|
3782
3797
|
:host {
|
|
3783
3798
|
display: contents;
|
|
3784
3799
|
background: var(--sc-table-bg);
|
|
@@ -3801,9 +3816,9 @@ ${this.value}</textarea
|
|
|
3801
3816
|
:host([noBorder]) th {
|
|
3802
3817
|
border-bottom: none;
|
|
3803
3818
|
}
|
|
3804
|
-
`],Se([l({type:Number})],Yt.prototype,"colSpan",2),Se([l({type:Number})],Yt.prototype,"rowSpan",2),Se([l({type:String})],Yt.prototype,"align",2),Se([l({type:String})],Yt.prototype,"minWidth",2),Se([l({type:String})],Yt.prototype,"maxWidth",2),Se([l({type:String})],Yt.prototype,"width",2),Yt=Se([
|
|
3819
|
+
`],Se([l({type:Number})],Yt.prototype,"colSpan",2),Se([l({type:Number})],Yt.prototype,"rowSpan",2),Se([l({type:String})],Yt.prototype,"align",2),Se([l({type:String})],Yt.prototype,"minWidth",2),Se([l({type:String})],Yt.prototype,"maxWidth",2),Se([l({type:String})],Yt.prototype,"width",2),Yt=Se([$(od)],Yt);var nd=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,ne=(r,t,s,i)=>{for(var e=i>1?void 0:i?ad(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&nd(t,s,e),e};const ld="sonic-td";let Ut=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=${gt(r)} colspan=${A(this.colSpan)} rowspan=${A(this.rowSpan)}>
|
|
3805
3820
|
<slot></slot>
|
|
3806
|
-
</td>`}};Ut.styles=[Qi
|
|
3821
|
+
</td>`}};Ut.styles=[Qi,P`
|
|
3807
3822
|
:host {
|
|
3808
3823
|
display: contents;
|
|
3809
3824
|
}
|
|
@@ -3816,13 +3831,13 @@ ${this.value}</textarea
|
|
|
3816
3831
|
border-right: var(--sc-table-td-border-r, none);
|
|
3817
3832
|
border-left: var(--sc-table-td-border-l, none);
|
|
3818
3833
|
}
|
|
3819
|
-
`],ne([l({type:Number})],Ut.prototype,"colSpan",2),ne([l({type:Number})],Ut.prototype,"rowSpan",2),ne([l({type:String})],Ut.prototype,"align",2),ne([l({type:String})],Ut.prototype,"vAlign",2),ne([l({type:String})],Ut.prototype,"minWidth",2),ne([l({type:String})],Ut.prototype,"maxWidth",2),ne([l({type:String})],Ut.prototype,"width",2),Ut=ne([
|
|
3834
|
+
`],ne([l({type:Number})],Ut.prototype,"colSpan",2),ne([l({type:Number})],Ut.prototype,"rowSpan",2),ne([l({type:String})],Ut.prototype,"align",2),ne([l({type:String})],Ut.prototype,"vAlign",2),ne([l({type:String})],Ut.prototype,"minWidth",2),ne([l({type:String})],Ut.prototype,"maxWidth",2),ne([l({type:String})],Ut.prototype,"width",2),Ut=ne([$(ld)],Ut);var cd=Object.defineProperty,hd=Object.getOwnPropertyDescriptor,dd=(r,t,s,i)=>{for(var e=i>1?void 0:i?hd(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&cd(t,s,e),e};const pd="sonic-thead";let Ji=class extends x{render(){return m`<slot></slot>`}};Ji.styles=[P`
|
|
3820
3835
|
:host {
|
|
3821
3836
|
display: table-header-group;
|
|
3822
3837
|
}
|
|
3823
|
-
`],Ji=dd([
|
|
3838
|
+
`],Ji=dd([$(pd)],Ji);var ud=Object.defineProperty,fd=Object.getOwnPropertyDescriptor,md=(r,t,s,i)=>{for(var e=i>1?void 0:i?fd(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ud(t,s,e),e};const gd="sonic-tbody";let tr=class extends x{render(){return m`<tbody part="tbody">
|
|
3824
3839
|
<slot></slot>
|
|
3825
|
-
</tbody>`}};tr.styles=[
|
|
3840
|
+
</tbody>`}};tr.styles=[P`
|
|
3826
3841
|
:host {
|
|
3827
3842
|
display: table-row-group;
|
|
3828
3843
|
}
|
|
@@ -3839,20 +3854,20 @@ ${this.value}</textarea
|
|
|
3839
3854
|
border-bottom: var(--sc-form-border-width) solid
|
|
3840
3855
|
var(--sc-base-200, rgba(0, 0, 0, 0.12)) !important;
|
|
3841
3856
|
}
|
|
3842
|
-
`],tr=md([
|
|
3857
|
+
`],tr=md([$(gd)],tr);var bd=Object.defineProperty,vd=Object.getOwnPropertyDescriptor,yd=(r,t,s,i)=>{for(var e=i>1?void 0:i?vd(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&bd(t,s,e),e};const _d="sonic-tfoot";let er=class extends x{render(){return m`<tfoot>
|
|
3843
3858
|
<slot></slot>
|
|
3844
|
-
</tfoot>`}};er.styles=[
|
|
3859
|
+
</tfoot>`}};er.styles=[P`
|
|
3845
3860
|
:host {
|
|
3846
3861
|
display: contents;
|
|
3847
3862
|
}
|
|
3848
|
-
`],er=yd([
|
|
3863
|
+
`],er=yd([$(_d)],er);var wd=Object.defineProperty,xd=Object.getOwnPropertyDescriptor,$d=(r,t,s,i)=>{for(var e=i>1?void 0:i?xd(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&wd(t,s,e),e};const Pd="sonic-caption";let sr=class extends x{render(){return m`<slot></slot>`}};sr.styles=[P`
|
|
3849
3864
|
:host {
|
|
3850
3865
|
display: table-caption;
|
|
3851
3866
|
font-size: 0.75rem;
|
|
3852
3867
|
color: var(--sc-table-caption-color);
|
|
3853
3868
|
padding: var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py));
|
|
3854
3869
|
}
|
|
3855
|
-
`],sr=$d([
|
|
3870
|
+
`],sr=$d([$(Pd)],sr);var Ad=Object.defineProperty,Cd=Object.getOwnPropertyDescriptor,Ue=(r,t,s,i)=>{for(var e=i>1?void 0:i?Cd(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ad(t,s,e),e};const Sd="sonic-table";let ae=class extends x{render(){const r={maxHeight:this.maxHeight};return m`
|
|
3856
3871
|
<div
|
|
3857
3872
|
class="table-container ${this.noCustomScroll?"":"custom-scroll"}"
|
|
3858
3873
|
style=${gt(r)}
|
|
@@ -3861,7 +3876,7 @@ ${this.value}</textarea
|
|
|
3861
3876
|
<slot></slot>
|
|
3862
3877
|
</div>
|
|
3863
3878
|
</div>
|
|
3864
|
-
`}};ae.styles=[cs,Nt
|
|
3879
|
+
`}};ae.styles=[cs,Nt,P`
|
|
3865
3880
|
:host {
|
|
3866
3881
|
--sc-table-fw: var(--sc-font-weight-base, 400);
|
|
3867
3882
|
--sc-table-fst: var(--sc-font-style-base, normal);
|
|
@@ -3906,7 +3921,7 @@ ${this.value}</textarea
|
|
|
3906
3921
|
--sc-table-td-border-b: var(--sc-table-bw) solid
|
|
3907
3922
|
var(--sc-table-border-color);
|
|
3908
3923
|
}
|
|
3909
|
-
`],Ue([l({type:String,reflect:!0})],ae.prototype,"size",2),Ue([l({type:Boolean,reflect:!0})],ae.prototype,"bordered",2),Ue([l({type:Boolean,reflect:!0})],ae.prototype,"rounded",2),Ue([l({type:Boolean,reflect:!0})],ae.prototype,"noCustomScroll",2),Ue([l({type:String})],ae.prototype,"maxHeight",2),ae=Ue([
|
|
3924
|
+
`],Ue([l({type:String,reflect:!0})],ae.prototype,"size",2),Ue([l({type:Boolean,reflect:!0})],ae.prototype,"bordered",2),Ue([l({type:Boolean,reflect:!0})],ae.prototype,"rounded",2),Ue([l({type:Boolean,reflect:!0})],ae.prototype,"noCustomScroll",2),Ue([l({type:String})],ae.prototype,"maxHeight",2),ae=Ue([$(Sd)],ae);const So="AES-CBC",Od=256;async function Dd(){return crypto.subtle.generateKey({name:So,length:Od},!0,["encrypt","decrypt"])}function kd(r){return btoa(String.fromCharCode(...new Uint8Array(r)))}async function Ld(r,t,s){const i=new TextEncoder().encode(r),e=await crypto.subtle.encrypt({name:So,iv:s},t,i);return kd(e)}var Ed=Object.defineProperty,Nd=Object.getOwnPropertyDescriptor,ti=(r,t,s,i)=>{for(var e=i>1?void 0:i?Nd(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ed(t,s,e),e};const Td="supersoniks_altcha",Md="Si2\\]X8M4!n9DCLd";let Oo=!1;const Id="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(!Oo){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",Oo=!0,document.head.appendChild(r)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=it.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 s;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=((s=t.get("altcha"))==null?void 0:s.toString())||""}async generateEncryptedKey(){if(this.key)return;const r=await Dd(),t=new TextEncoder().encode(Md),s=await Ld(Td,r,t);this.key=s}render(){if(!this.key)return C;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`
|
|
3910
3925
|
<form>
|
|
3911
3926
|
<altcha-widget
|
|
3912
3927
|
challengeurl="${this.chalengeUrl}?key=${this.key}&maxNumber=${this.maxNumber}"
|
|
@@ -3918,7 +3933,7 @@ ${this.value}</textarea
|
|
|
3918
3933
|
></altcha-widget>
|
|
3919
3934
|
</form>
|
|
3920
3935
|
<slot></slot>
|
|
3921
|
-
`}};Ve.styles=[
|
|
3936
|
+
`}};Ve.styles=[P`
|
|
3922
3937
|
:host {
|
|
3923
3938
|
--altcha-border-width: var(--sc-border-width, 1px);
|
|
3924
3939
|
--altcha-border-radius: var(--sc-rounded);
|
|
@@ -3936,4 +3951,4 @@ ${this.value}</textarea
|
|
|
3936
3951
|
--altcha-color-footer-bg: var(--sc-base-100);
|
|
3937
3952
|
--altcha-max-width: 260px;
|
|
3938
3953
|
}
|
|
3939
|
-
`],ti([l()],Ve.prototype,"key",2),ti([l()],Ve.prototype,"action",2),ti([l({type:Number})],Ve.prototype,"zIndex",2),Ve=ti([
|
|
3954
|
+
`],ti([l()],Ve.prototype,"key",2),ti([l()],Ve.prototype,"action",2),ti([l({type:Number})],Ve.prototype,"zIndex",2),Ve=ti([$(Id)],Ve),window.queueMicrotask=window.queueMicrotask||function(r){Promise.resolve().then(r).catch(t=>setTimeout(()=>{throw t}))};function jd(r){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(r)}function Fd(r){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(r)}function Do(r){if(r.__is__setSubscribable__)return;r.__is__setSubscribable__=!0,r.__onConnected__=jd,r.__onDisconnected__=Fd;const t=r.connectedCallback;r.connectedCallback=function(){t.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(i=>i(this))};const s=r.disconnectedCallback;r.disconnectedCallback=function(){s.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(i=>i(this))}}function zd(r){const t=r.split(".");if(t.length==0)return function(){};const s=t.shift()||"";let i=E.get(s);return i=ts.traverse(i,t),function(e,o){if(!e)return;let n;Do(e),e.__onConnected__(a=>{n=c=>{a[o]=c},i.onAssign(n)}),e.__onDisconnected__(()=>{i.offAssign(n)})}}function Rd(...r){const t=[],s=[];for(let i=0;i<r.length;i++){const o=r[i].split(".");if(o.length==0)continue;const n=o.shift()||"";let a=E.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))};s.push({publisher:a,onAssign:h,callbacks:c})}return function(i,e,o){Do(i);let n;i.__onConnected__(a=>{for(const c of s)n=o.value.bind(a),c.callbacks.add(n),c.publisher.onAssign(c.onAssign)}),i.__onDisconnected__(()=>{for(const a of s)a.callbacks.delete(n),a.publisher.offAssign(a.onAssign)})}}window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:zd,onAssing:Rd},window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:Lr,dataProvider:pn,sub:hn,subscribe:cn,get:dn,set:un};const Ud=M,Vd=F;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:Ud,SonicModal:Vd};const Hd=window;Hd.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))});
|