@supersoniks/concorde 3.0.6 → 3.0.7
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/docs/assets/{index-DWBLY4SP.js → index-Ce3mr_lI.js} +1 -1
- package/docs/index.html +3 -3
- package/index.html +2 -2
- package/package.json +1 -1
- package/vite.config.mts +1 -1
- package/docs/assets/index-1TMaJjPy.js +0 -4040
- package/docs/assets/index-3W2s1DcY.js +0 -4040
- package/docs/assets/index-B-7rKIow.js +0 -4040
- package/docs/assets/index-BGZLt2PX.js +0 -4040
- package/docs/assets/index-BJY63wEA.js +0 -4040
- package/docs/assets/index-BLpP1vLa.js +0 -4040
- package/docs/assets/index-BLr8ygoi.js +0 -4040
- package/docs/assets/index-BXaJoTcR.js +0 -4040
- package/docs/assets/index-Bln0wc2P.js +0 -4040
- package/docs/assets/index-BsUX98bJ.js +0 -4040
- package/docs/assets/index-CILRGlUn.js +0 -4040
- package/docs/assets/index-Cutw0yfi.js +0 -4040
- package/docs/assets/index-DyD3o74q.js +0 -4040
- package/docs/assets/index-NCT3BKv0.js +0 -4040
- package/docs/assets/index-PbOx6NxY.js +0 -4040
- package/docs/assets/index-U_hssYGq.js +0 -4040
- package/docs/assets/index-cNBBlbBt.js +0 -4040
- package/docs/assets/index-gx6CCJoi.js +0 -4040
- package/docs/assets/index-l8XRMBvs.js +0 -4040
package/build-infos.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"date":
|
|
1
|
+
{"date":1712843665}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Co=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var Qh=Co((dd,kt)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))r(t);new MutationObserver(t=>{for(const n of t)if(n.type==="childList")for(const o of n.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function s(t){const n={};return t.integrity&&(n.integrity=t.integrity),t.referrerPolicy&&(n.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?n.credentials="include":t.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function r(t){if(t.ep)return;t.ep=!0;const n=s(t);fetch(t.href,n)}})();let pe=class Ue{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,s)=>{const r=s.indexOf("=");return e[s.substring(0,r).trim()]=s.substring(r+1),e},{})}static everyAncestors(e,s){for(;e;){if(!s(e))return;e=e.parentNode||e.host}}static getAncestorAttributeValue(e,s){if(!e)return null;for(;!("hasAttribute"in e&&e.hasAttribute(s))&&(e.parentNode||e.host);)e=e.parentNode||e.host;return"hasAttribute"in e?e.getAttribute(s):null}static getApiConfiguration(e){const s=Ue.getAncestorAttributeValue(e,"token"),r=Ue.getAncestorAttributeValue(e,"addHTTPResponse")!=null,t=Ue.getAncestorAttributeValue(e,"serviceURL");let n=null,o=null;const a=Ue.getAncestorAttributeValue(e,"tokenProvider"),c=Ue.getAncestorAttributeValue(e,"eventsApiToken");s||(n=Ue.getAncestorAttributeValue(e,"userName"),o=Ue.getAncestorAttributeValue(e,"password"));const d=Ue.getAncestorAttributeValue(e,"credentials")||void 0,b=e.getAttribute("cache"),m=e.hasAttribute("blockUntilDone");return{serviceURL:t,token:s,userName:n,password:o,authToken:c,tokenProvider:a,addHTTPResponse:r,credentials:d,cache:b,blockUntilDone:m}}static getClosestElement(e,s){for(;!(e.nodeName&&e.nodeName.toLowerCase()===s)&&(e.parentNode||e.host);)e=e.parentNode||e.host;return e.nodeName?e:null}static getClosestForm(e){return Ue.getClosestElement(e,"form")}static async loadJS(e){return new Promise(async r=>{const t=document.createElement("script");t.src=e,t.onload=()=>r(!0),t.onerror=()=>r(!0),document.head.appendChild(t)})}static async loadCSS(e){return new Promise(async r=>{const t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e,t.onload=()=>r(!0),t.onerror=()=>r(!0),document.head.appendChild(t)})}},Ms=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,s="",r="long"){s||(s=pe.getLanguage());const t=(d,b)=>[Math.floor(d/b),d%b];function n(d,b,m){return new Intl.NumberFormat(d,{style:"unit",unit:b,unitDisplay:m}).format}const[o,a]=t(e,60),c=[];return o&&c.push(n(s,"hour",r)(o)),a&&c.push(n(s,"minute",r)(a)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(e){try{return Function("return "+e)()}catch{return""}}};function ns(i){return typeof i=="object"&&i!=null}const Fo=async()=>new Promise(i=>{window.queueMicrotask(()=>i(null))});var qe;let Ir=(qe=class{constructor(e,s){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=s||null,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e of this._proxies_.values())e.delete();this._invalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),qe.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!B.changed){B.changed=!0,B.saveId++;const s=B.saveId;setTimeout(()=>B.getInstance().saveToLocalStorage(s),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){this._assignmentId_++;const s=this._assignmentId_;if(await Fo(),s!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(t=>t(r)),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,s){this._fillListeners_.forEach(r=>{r[e]!==s&&(r[e]=s)}),this._publishTemplateFilling_(e,s)}_publishTemplateFilling_(e,s){this._templateFillListeners_.forEach(r=>{const t=Object.getOwnPropertyDescriptor(r,e);t&&!t.set&&!t.writable||(r.propertyMap&&r.propertyMap[e]&&(e=r.propertyMap[e]),typeof r[e]<"u"&&r[e]!==s&&(r[e]=s))})}onAssign(e,s=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),s&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const s in this._value_){let r=s;const t=this._value_[s];e.propertyMap&&e.propertyMap[s]&&(r=e.propertyMap[s]),typeof e[s]<"u"&&e[s]!==t&&(e[r]=t)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const s in this._value_){const r=this._value_[s];e[s]!==r&&(e[s]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}async set(e,s=!1){var n;if(this._value_===e||this._value_&&e&&Object.prototype.hasOwnProperty.call(this._value_,"__value")&&Object.prototype.hasOwnProperty.call(e,"__value")&&this._value_.__value===e.__value)return!0;const r=this._value_;if(this._value_=ns(e)?e:{__value:e},this._cachedGet_=void 0,Object.prototype.hasOwnProperty.call(this._value_,"__value"))return await this._publishAssignement_(s),!0;for(const o in this._value_)this._value_[o]===void 0&&delete this._value_[o];if(this._proxies_.forEach((o,a)=>{this._value_[a]===void 0&&a!="_parent_"&&r[a]&&(this._value_[a]=null)}),await this._publishAssignement_(),ns(this._value_))for(const o in this._value_){const a=e[o],d=ns(a)?a:{__value:a};if(!this._proxies_.has(o)){this._publishDynamicFilling_(o,a);continue}await((n=this._proxies_.get(o))==null?void 0:n.set(d,!0)),this._publishDynamicFilling_(o,a)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(B.modifiedCollectore.length>0&&B.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_}get $tag(){return this._instanceCounter_||(qe.instancesCounter++,this._instanceCounter_=qe.instancesCounter),qe.instances.set(this._instanceCounter_,this),'<reactive-publisher-proxy publisher="'+this._instanceCounter_+'"></reactive-publisher-proxy>'}},qe.instances=new Map,qe.instancesCounter=0,qe);var q;let B=(q=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],q.instance!=null)throw"Singleton / use getInstance";q.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let r=localStorage.getItem("publisher-proxies-data"),t=null;if(r&&(t=await this.decompress(r,"gzip")),t)try{this.localStorageData=JSON.parse(t)}catch{this.localStorageData={}}else r=await this.compress("{}","gzip"),localStorage.setItem("publisher-proxies-data",r),this.localStorageData={};const n=new Date().getTime()-1e3*60*60*12;for(const o in this.localStorageData)this.localStorageData[o].lastModifiationMS<n&&delete this.localStorageData[o];e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.log("no publisher cache in this browser")}})()})}static getInstance(){return q.instance==null?new q:q.instance}static get(e,s){return q.getInstance().get(e,s)}static collectModifiedPublisher(){q.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return q.modifiedCollectore.shift()}static delete(e){return e?q.getInstance().delete(e):!1}async setLocalData(e,s){var r;await this.isLocalStrorageReady,e.set(((r=this.localStorageData[s+"¤lang_"+pe.getLanguage()])==null?void 0:r.data)||e.get())}get(e,s){const r=(s==null?void 0:s.localStorageMode)==="enabled";if(!this.publishers.has(e)){const n={},o=new hs(n);this.set(e,o)}const t=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(t._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(t,e)),this.publishers.get(e)}set(e,s){this.publishers.set(e,s)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==q.saveId&&e%10!=0))try{if(!q.changed||q.saving)return;q.saving=!0,q.changed=!1;const s=Array.from(this.publishers.keys());let r=!1;for(const t of s){const n=this.publishers.get(t);if(!(n!=null&&n._is_savable_))continue;const o=n==null?void 0:n.get();o&&(this.localStorageData[t+"¤lang_"+pe.getLanguage()]={lastModifiationMS:new Date().getTime(),data:o},r=!0)}if(r){const t=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem("publisher-proxies-data",t)}if(q.saving=!1,q.changed){q.saveId++;const t=q.saveId;setTimeout(()=>this.saveToLocalStorage(t),1e3)}}catch{q.saving=!1}}async compress(e,s){const r=new TextEncoder().encode(e),t=window,n=new t.CompressionStream(s),o=n.writable.getWriter();o.write(r),o.close();const a=await new Response(n.readable).arrayBuffer(),c=new Uint8Array(a);let d="";for(let b=0;b<c.length;b++)d+=String.fromCharCode(c[b]);return btoa(d)}async decompress(e,s){const r=atob(e),n=Uint8Array.from(r,b=>b.charCodeAt(0)).buffer,o=window,a=new o.DecompressionStream(s),c=a.writable.getWriter();c.write(n),c.close();const d=await new Response(a.readable).arrayBuffer();return new TextDecoder().decode(d)}},q.buildDate="Thu Apr 11 2024 15:43:26 GMT+0200 (Central European Summer Time)",q.changed=!1,q.saving=!1,q.saveId=0,q.instance=null,q.modifiedCollectore=[],q);const So=new Set(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class hs extends Ir{constructor(e,s=null){super(e,s);const r=new Proxy(this,{get:function(t,n){if(n==Symbol.toPrimitive)return()=>r.get();if(So.has(n))return t[n];if(!t._proxies_.has(n)){const o=t._value_[n],a=new hs(ns(o)?o:{__value:o},t);a._proxies_.set("_parent_",r),t._proxies_.set(n,a)}return t._proxies_.get(n)},set:function(t,n,o){var c;if(n=="_value_")return t._value_=o,!0;if(n=="_cachedGet_")return t._cachedGet_=o,!0;if(n=="_assignmentId_")return t._assignmentId_=o,!0;if(n=="_is_savable_")return t._is_savable_=o,!0;if(n=="_instanceCounter_")return t._instanceCounter_=o,!0;if(!t._proxies_.has(n)){const d=new hs({},t);d._proxies_.set("_parent_",r),t._proxies_.set(n,d)}return t._value_[n]!==o&&(t._value_[n]=o,t._publishDynamicFilling_(n,o),(c=t._proxies_.get(n))==null||c.set(ns(o)?o:{__value:o})),!0},deleteProperty:function(t,n){var o;return t._publishDynamicFilling_(n,null),(o=t._proxies_.get(n))==null||o.set(null),delete t._value_[n]},has:function(t,n){return n in t._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(t,n,o){return o&&"value"in o&&(t._value_[n]=o.value),!0},getOwnPropertyDescriptor:function(t,n){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}});return r}toString(){return"hey"}valueOf(){return 2}getProperty(e,s){return e[s]}}class Po extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){var e;this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ir.instances.get(parseInt(this.publisherId)),(e=this.publisher)==null||e.onAssign(this.onAssign)}disconnectedCallback(){var e;(e=this.publisher)==null||e.offAssign(this.onAssign)}}customElements.define("reactive-publisher-proxy",Po);var N;let ws=(N=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(N.observedElements.keys()).forEach(e=>N.unObserve(e)))}static observe(e){if(!e||!N.enabled||N.observedElements.has(e))return;const s=new MutationObserver(N.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],s.observe(e,r),e.querySelectorAll("[data-bind]").forEach(t=>N.addPublisherListeners(t)),N.observedElements.set(e,s)}static unObserve(e){if(!e)return;const s=this.observedElements.get(e);s&&(s.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>N.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&N.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>N.addPublisherListeners(s)):e.childNodes.forEach(s=>N.onAdded(s))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&N.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>N.removePublisherListeners(s)):e.childNodes.forEach(s=>N.onRemoved(s))}static onMutation(e){for(const s of e)switch(s.type){case"attributes":N.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(r=>{N.onAdded(r)}),s.removedNodes.forEach(r=>{N.onRemoved(r)});break}}static removePublisherListeners(e){const s=N.publisherListeners.get(e);s&&(N.publisherListeners.delete(e),s.forEach(r=>{var t;(t=r.publisher)==null||t.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let s=e.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(r=>r.replace("$","")):s=[e],s=s.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:s.map(r=>r.split(/\b\.\b/).map(t=>t.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,t=>t.substring(1).toUpperCase()),bindedVariablesDescriptor:N.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(e,s){if(!s)return e;for(const r of s)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){N.removePublisherListeners(e);const s=pe.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!s)return;const r=B.getInstance().get(s),t=N.getDataBindItems(e),n=[];t.forEach(o=>{const a=o.bindedVariablesDescriptor,c=o.propertyToUpdate;for(const d of a.variables){const b=d;let m=r;m=N.getSubPublisher(r,b);const y=e,A={publisher:m,onAssign:()=>{const g=a.variables.map(x=>{var u;return(u=N.getSubPublisher(r,x))==null?void 0:u.get()});let f=a.expression,w=!1;if(g.length==1&&a.variables[0].join(".")==f.substring(1)){let x=g[0];x===null&&(x=""),y[c]=x;return}for(let x=0;x<g.length;x++){let u=g[x];const h=a.variables[x];u===null&&(w=!0,u=void 0),f=f.replace("$"+h.join("."),u)}if(f.indexOf("|")!=-1){const x=f.indexOf("|");if(x==0)f=Ms.js(f.substring(1));else{const u=f.substring(0,x),h=f.substring(x+1),p=Ms[u];f=w?"":p?p(h):f}}else f=w?"":f;y[c]=f}};m==null||m.onAssign(A.onAssign),n.push(A)}}),N.publisherListeners.set(e,n)}},N.observedElements=new Map,N.enabled=!0,N.publisherListeners=new Map,N);ws.observe(document.documentElement);window.SonicDataBindObserver||(window.SonicDataBindObserver=ws);let ne=class ht{static shallowEqual(e,s,r=!0){const t=Object.keys(e),n=Object.keys(s);if(t.length!==n.length&&r)return!1;for(const o of t){const a=e[o],c=s[o];if(r?a!==c:a!=c)return!1}return!0}static deepEqual(e,s,r=!0){const t=Object.keys(e),n=Object.keys(s);if(t.length!==n.length&&r)return!1;for(const o of t){const a=e[o],c=s[o],d=ht.isObject(a)&&ht.isObject(c),b=r?a!==c:a!=c;if(d&&!ht.deepEqual(a,c)||!d&&b)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return ht.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,s,r=!1){for(const t of s){const n=e[t];if(n===void 0)return;r&&ht.isObject(n)?e=Object.assign(Array.isArray(n)?[]:{},e,n):e=e[t]}return e}static getURLSearchArray(e,s=""){let r=[];for(let t in e){const n=e[t];s&&(t=s+"["+t+"]"),ht.isObject(n)?r=[...r,...this.getURLSearchArray(n,t)]:r.push(`${t}=${n}`)}return r}static getURLSearchString(e){return ht.getURLSearchArray(e,"").join("&")}};/**
|
|
1
|
+
var Co=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var Qh=Co((dd,kt)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))r(t);new MutationObserver(t=>{for(const n of t)if(n.type==="childList")for(const o of n.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function s(t){const n={};return t.integrity&&(n.integrity=t.integrity),t.referrerPolicy&&(n.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?n.credentials="include":t.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function r(t){if(t.ep)return;t.ep=!0;const n=s(t);fetch(t.href,n)}})();let pe=class Ue{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,s)=>{const r=s.indexOf("=");return e[s.substring(0,r).trim()]=s.substring(r+1),e},{})}static everyAncestors(e,s){for(;e;){if(!s(e))return;e=e.parentNode||e.host}}static getAncestorAttributeValue(e,s){if(!e)return null;for(;!("hasAttribute"in e&&e.hasAttribute(s))&&(e.parentNode||e.host);)e=e.parentNode||e.host;return"hasAttribute"in e?e.getAttribute(s):null}static getApiConfiguration(e){const s=Ue.getAncestorAttributeValue(e,"token"),r=Ue.getAncestorAttributeValue(e,"addHTTPResponse")!=null,t=Ue.getAncestorAttributeValue(e,"serviceURL");let n=null,o=null;const a=Ue.getAncestorAttributeValue(e,"tokenProvider"),c=Ue.getAncestorAttributeValue(e,"eventsApiToken");s||(n=Ue.getAncestorAttributeValue(e,"userName"),o=Ue.getAncestorAttributeValue(e,"password"));const d=Ue.getAncestorAttributeValue(e,"credentials")||void 0,b=e.getAttribute("cache"),m=e.hasAttribute("blockUntilDone");return{serviceURL:t,token:s,userName:n,password:o,authToken:c,tokenProvider:a,addHTTPResponse:r,credentials:d,cache:b,blockUntilDone:m}}static getClosestElement(e,s){for(;!(e.nodeName&&e.nodeName.toLowerCase()===s)&&(e.parentNode||e.host);)e=e.parentNode||e.host;return e.nodeName?e:null}static getClosestForm(e){return Ue.getClosestElement(e,"form")}static async loadJS(e){return new Promise(async r=>{const t=document.createElement("script");t.src=e,t.onload=()=>r(!0),t.onerror=()=>r(!0),document.head.appendChild(t)})}static async loadCSS(e){return new Promise(async r=>{const t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e,t.onload=()=>r(!0),t.onerror=()=>r(!0),document.head.appendChild(t)})}},Ms=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,s="",r="long"){s||(s=pe.getLanguage());const t=(d,b)=>[Math.floor(d/b),d%b];function n(d,b,m){return new Intl.NumberFormat(d,{style:"unit",unit:b,unitDisplay:m}).format}const[o,a]=t(e,60),c=[];return o&&c.push(n(s,"hour",r)(o)),a&&c.push(n(s,"minute",r)(a)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(e){try{return Function("return "+e)()}catch{return""}}};function ns(i){return typeof i=="object"&&i!=null}const Fo=async()=>new Promise(i=>{window.queueMicrotask(()=>i(null))});var qe;let Ir=(qe=class{constructor(e,s){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=s||null,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e of this._proxies_.values())e.delete();this._invalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),qe.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!B.changed){B.changed=!0,B.saveId++;const s=B.saveId;setTimeout(()=>B.getInstance().saveToLocalStorage(s),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){this._assignmentId_++;const s=this._assignmentId_;if(await Fo(),s!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(t=>t(r)),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,s){this._fillListeners_.forEach(r=>{r[e]!==s&&(r[e]=s)}),this._publishTemplateFilling_(e,s)}_publishTemplateFilling_(e,s){this._templateFillListeners_.forEach(r=>{const t=Object.getOwnPropertyDescriptor(r,e);t&&!t.set&&!t.writable||(r.propertyMap&&r.propertyMap[e]&&(e=r.propertyMap[e]),typeof r[e]<"u"&&r[e]!==s&&(r[e]=s))})}onAssign(e,s=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),s&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const s in this._value_){let r=s;const t=this._value_[s];e.propertyMap&&e.propertyMap[s]&&(r=e.propertyMap[s]),typeof e[s]<"u"&&e[s]!==t&&(e[r]=t)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const s in this._value_){const r=this._value_[s];e[s]!==r&&(e[s]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}async set(e,s=!1){var n;if(this._value_===e||this._value_&&e&&Object.prototype.hasOwnProperty.call(this._value_,"__value")&&Object.prototype.hasOwnProperty.call(e,"__value")&&this._value_.__value===e.__value)return!0;const r=this._value_;if(this._value_=ns(e)?e:{__value:e},this._cachedGet_=void 0,Object.prototype.hasOwnProperty.call(this._value_,"__value"))return await this._publishAssignement_(s),!0;for(const o in this._value_)this._value_[o]===void 0&&delete this._value_[o];if(this._proxies_.forEach((o,a)=>{this._value_[a]===void 0&&a!="_parent_"&&r[a]&&(this._value_[a]=null)}),await this._publishAssignement_(),ns(this._value_))for(const o in this._value_){const a=e[o],d=ns(a)?a:{__value:a};if(!this._proxies_.has(o)){this._publishDynamicFilling_(o,a);continue}await((n=this._proxies_.get(o))==null?void 0:n.set(d,!0)),this._publishDynamicFilling_(o,a)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(B.modifiedCollectore.length>0&&B.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_}get $tag(){return this._instanceCounter_||(qe.instancesCounter++,this._instanceCounter_=qe.instancesCounter),qe.instances.set(this._instanceCounter_,this),'<reactive-publisher-proxy publisher="'+this._instanceCounter_+'"></reactive-publisher-proxy>'}},qe.instances=new Map,qe.instancesCounter=0,qe);var q;let B=(q=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],q.instance!=null)throw"Singleton / use getInstance";q.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let r=localStorage.getItem("publisher-proxies-data"),t=null;if(r&&(t=await this.decompress(r,"gzip")),t)try{this.localStorageData=JSON.parse(t)}catch{this.localStorageData={}}else r=await this.compress("{}","gzip"),localStorage.setItem("publisher-proxies-data",r),this.localStorageData={};const n=new Date().getTime()-1e3*60*60*12;for(const o in this.localStorageData)this.localStorageData[o].lastModifiationMS<n&&delete this.localStorageData[o];e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.log("no publisher cache in this browser")}})()})}static getInstance(){return q.instance==null?new q:q.instance}static get(e,s){return q.getInstance().get(e,s)}static collectModifiedPublisher(){q.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return q.modifiedCollectore.shift()}static delete(e){return e?q.getInstance().delete(e):!1}async setLocalData(e,s){var r;await this.isLocalStrorageReady,e.set(((r=this.localStorageData[s+"¤lang_"+pe.getLanguage()])==null?void 0:r.data)||e.get())}get(e,s){const r=(s==null?void 0:s.localStorageMode)==="enabled";if(!this.publishers.has(e)){const n={},o=new hs(n);this.set(e,o)}const t=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(t._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(t,e)),this.publishers.get(e)}set(e,s){this.publishers.set(e,s)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==q.saveId&&e%10!=0))try{if(!q.changed||q.saving)return;q.saving=!0,q.changed=!1;const s=Array.from(this.publishers.keys());let r=!1;for(const t of s){const n=this.publishers.get(t);if(!(n!=null&&n._is_savable_))continue;const o=n==null?void 0:n.get();o&&(this.localStorageData[t+"¤lang_"+pe.getLanguage()]={lastModifiationMS:new Date().getTime(),data:o},r=!0)}if(r){const t=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem("publisher-proxies-data",t)}if(q.saving=!1,q.changed){q.saveId++;const t=q.saveId;setTimeout(()=>this.saveToLocalStorage(t),1e3)}}catch{q.saving=!1}}async compress(e,s){const r=new TextEncoder().encode(e),t=window,n=new t.CompressionStream(s),o=n.writable.getWriter();o.write(r),o.close();const a=await new Response(n.readable).arrayBuffer(),c=new Uint8Array(a);let d="";for(let b=0;b<c.length;b++)d+=String.fromCharCode(c[b]);return btoa(d)}async decompress(e,s){const r=atob(e),n=Uint8Array.from(r,b=>b.charCodeAt(0)).buffer,o=window,a=new o.DecompressionStream(s),c=a.writable.getWriter();c.write(n),c.close();const d=await new Response(a.readable).arrayBuffer();return new TextDecoder().decode(d)}},q.buildDate="Thu Apr 11 2024 15:54:25 GMT+0200 (Central European Summer Time)",q.changed=!1,q.saving=!1,q.saveId=0,q.instance=null,q.modifiedCollectore=[],q);const So=new Set(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class hs extends Ir{constructor(e,s=null){super(e,s);const r=new Proxy(this,{get:function(t,n){if(n==Symbol.toPrimitive)return()=>r.get();if(So.has(n))return t[n];if(!t._proxies_.has(n)){const o=t._value_[n],a=new hs(ns(o)?o:{__value:o},t);a._proxies_.set("_parent_",r),t._proxies_.set(n,a)}return t._proxies_.get(n)},set:function(t,n,o){var c;if(n=="_value_")return t._value_=o,!0;if(n=="_cachedGet_")return t._cachedGet_=o,!0;if(n=="_assignmentId_")return t._assignmentId_=o,!0;if(n=="_is_savable_")return t._is_savable_=o,!0;if(n=="_instanceCounter_")return t._instanceCounter_=o,!0;if(!t._proxies_.has(n)){const d=new hs({},t);d._proxies_.set("_parent_",r),t._proxies_.set(n,d)}return t._value_[n]!==o&&(t._value_[n]=o,t._publishDynamicFilling_(n,o),(c=t._proxies_.get(n))==null||c.set(ns(o)?o:{__value:o})),!0},deleteProperty:function(t,n){var o;return t._publishDynamicFilling_(n,null),(o=t._proxies_.get(n))==null||o.set(null),delete t._value_[n]},has:function(t,n){return n in t._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(t,n,o){return o&&"value"in o&&(t._value_[n]=o.value),!0},getOwnPropertyDescriptor:function(t,n){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}});return r}toString(){return"hey"}valueOf(){return 2}getProperty(e,s){return e[s]}}class Po extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){var e;this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ir.instances.get(parseInt(this.publisherId)),(e=this.publisher)==null||e.onAssign(this.onAssign)}disconnectedCallback(){var e;(e=this.publisher)==null||e.offAssign(this.onAssign)}}customElements.define("reactive-publisher-proxy",Po);var N;let ws=(N=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(N.observedElements.keys()).forEach(e=>N.unObserve(e)))}static observe(e){if(!e||!N.enabled||N.observedElements.has(e))return;const s=new MutationObserver(N.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],s.observe(e,r),e.querySelectorAll("[data-bind]").forEach(t=>N.addPublisherListeners(t)),N.observedElements.set(e,s)}static unObserve(e){if(!e)return;const s=this.observedElements.get(e);s&&(s.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>N.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&N.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>N.addPublisherListeners(s)):e.childNodes.forEach(s=>N.onAdded(s))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&N.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>N.removePublisherListeners(s)):e.childNodes.forEach(s=>N.onRemoved(s))}static onMutation(e){for(const s of e)switch(s.type){case"attributes":N.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(r=>{N.onAdded(r)}),s.removedNodes.forEach(r=>{N.onRemoved(r)});break}}static removePublisherListeners(e){const s=N.publisherListeners.get(e);s&&(N.publisherListeners.delete(e),s.forEach(r=>{var t;(t=r.publisher)==null||t.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let s=e.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(r=>r.replace("$","")):s=[e],s=s.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:s.map(r=>r.split(/\b\.\b/).map(t=>t.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,t=>t.substring(1).toUpperCase()),bindedVariablesDescriptor:N.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(e,s){if(!s)return e;for(const r of s)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){N.removePublisherListeners(e);const s=pe.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!s)return;const r=B.getInstance().get(s),t=N.getDataBindItems(e),n=[];t.forEach(o=>{const a=o.bindedVariablesDescriptor,c=o.propertyToUpdate;for(const d of a.variables){const b=d;let m=r;m=N.getSubPublisher(r,b);const y=e,A={publisher:m,onAssign:()=>{const g=a.variables.map(x=>{var u;return(u=N.getSubPublisher(r,x))==null?void 0:u.get()});let f=a.expression,w=!1;if(g.length==1&&a.variables[0].join(".")==f.substring(1)){let x=g[0];x===null&&(x=""),y[c]=x;return}for(let x=0;x<g.length;x++){let u=g[x];const h=a.variables[x];u===null&&(w=!0,u=void 0),f=f.replace("$"+h.join("."),u)}if(f.indexOf("|")!=-1){const x=f.indexOf("|");if(x==0)f=Ms.js(f.substring(1));else{const u=f.substring(0,x),h=f.substring(x+1),p=Ms[u];f=w?"":p?p(h):f}}else f=w?"":f;y[c]=f}};m==null||m.onAssign(A.onAssign),n.push(A)}}),N.publisherListeners.set(e,n)}},N.observedElements=new Map,N.enabled=!0,N.publisherListeners=new Map,N);ws.observe(document.documentElement);window.SonicDataBindObserver||(window.SonicDataBindObserver=ws);let ne=class ht{static shallowEqual(e,s,r=!0){const t=Object.keys(e),n=Object.keys(s);if(t.length!==n.length&&r)return!1;for(const o of t){const a=e[o],c=s[o];if(r?a!==c:a!=c)return!1}return!0}static deepEqual(e,s,r=!0){const t=Object.keys(e),n=Object.keys(s);if(t.length!==n.length&&r)return!1;for(const o of t){const a=e[o],c=s[o],d=ht.isObject(a)&&ht.isObject(c),b=r?a!==c:a!=c;if(d&&!ht.deepEqual(a,c)||!d&&b)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return ht.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,s,r=!1){for(const t of s){const n=e[t];if(n===void 0)return;r&&ht.isObject(n)?e=Object.assign(Array.isArray(n)?[]:{},e,n):e=e[t]}return e}static getURLSearchArray(e,s=""){let r=[];for(let t in e){const n=e[t];s&&(t=s+"["+t+"]"),ht.isObject(n)?r=[...r,...this.getURLSearchArray(n,t)]:r.push(`${t}=${n}`)}return r}static getURLSearchString(e){return ht.getURLSearchArray(e,"").join("&")}};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
package/docs/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
11
11
|
<link href="https://fonts.cdnfonts.com/css/inter" rel="stylesheet" />
|
|
12
12
|
|
|
13
|
-
<script type="module" crossorigin src="./assets/index-
|
|
13
|
+
<script type="module" crossorigin src="./assets/index-Ce3mr_lI.js"></script>
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/index--bDsd7qW.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body class="px-6 lg:px-20">
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
class="flex items-center gap-4 border-b-[.3rem] border-current py-3 sticky top-0 z-40 text-neutral-900 bg-neutral-0"
|
|
21
21
|
>
|
|
22
22
|
<div class="font-bold text-4xl">
|
|
23
|
-
<sonic-link href="
|
|
23
|
+
<sonic-link href="#">
|
|
24
24
|
<svg
|
|
25
25
|
xmlns="http://www.w3.org/2000/svg"
|
|
26
26
|
width="222.442"
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
size="2xl"
|
|
103
103
|
variant="outline"
|
|
104
104
|
type="primary"
|
|
105
|
-
href="
|
|
105
|
+
href="#docs/_getting-started/start.md/start"
|
|
106
106
|
>
|
|
107
107
|
<sonic-icon
|
|
108
108
|
name="airplane"
|
package/index.html
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
class="flex items-center gap-4 border-b-[.3rem] border-current py-3 sticky top-0 z-40 text-neutral-900 bg-neutral-0"
|
|
21
21
|
>
|
|
22
22
|
<div class="font-bold text-4xl">
|
|
23
|
-
<sonic-link href="
|
|
23
|
+
<sonic-link href="#">
|
|
24
24
|
<svg
|
|
25
25
|
xmlns="http://www.w3.org/2000/svg"
|
|
26
26
|
width="222.442"
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
size="2xl"
|
|
103
103
|
variant="outline"
|
|
104
104
|
type="primary"
|
|
105
|
-
href="
|
|
105
|
+
href="#docs/_getting-started/start.md/start"
|
|
106
106
|
>
|
|
107
107
|
<sonic-icon
|
|
108
108
|
name="airplane"
|
package/package.json
CHANGED
package/vite.config.mts
CHANGED
|
@@ -42,7 +42,7 @@ if (!libName) libName = "core";
|
|
|
42
42
|
const currentConfig = config[libName];
|
|
43
43
|
const build = {
|
|
44
44
|
// minify: "terser",
|
|
45
|
-
emptyOutDir:
|
|
45
|
+
emptyOutDir: true, //!currentConfig.isLibrary,
|
|
46
46
|
outDir: currentConfig.outDir,
|
|
47
47
|
};
|
|
48
48
|
if (currentConfig.isLibrary) {
|