ds-one 0.2.5-alpha.17 → 0.2.5-alpha.18

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.
@@ -1,6 +1,6 @@
1
- function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigator,e=window,r=t&&(t.userAgent||t.vendor)||e&&e.opera||"",s=/Mobile|Android|iP(ad|hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)|Windows Phone|Phone|Tablet/i.test(r),i=(t&&t.maxTouchPoints||0)>1,o=e?Math.min(e.innerWidth||0,e.innerHeight||0)<=820:!1;return s||i&&o}function cr(){let t=De(),e=navigator,r=window,n=(e&&e.maxTouchPoints||0)>1,i=typeof document<"u"?document.documentElement.clientWidth:r?.innerWidth||0,o=typeof document<"u"?document.documentElement.clientHeight:r?.innerHeight||0,f=t&&Math.min(i,o)>=600;return{isMobile:t,isTablet:f,isDesktop:!t,isTouchCapable:n,deviceType:t?f?"tablet":"mobile":"desktop",userAgent:e&&(e.userAgent||e.vendor)||"",screenWidth:i,screenHeight:o}}function Me(){let t=cr();if(t.isMobile&&typeof document<"u"){let s=t.screenWidth/280;document.documentElement.style.setProperty("--sf",s.toFixed(3)),document.documentElement.style.setProperty("--sf",s.toFixed(3)),document.documentElement.classList.add("mobile"),document.documentElement.classList.remove("desktop"),console.log(`[DS one] Mobile device detected - ${t.deviceType} (${t.screenWidth}x${t.screenHeight}), scaling factor: ${s.toFixed(2)}`)}else typeof document<"u"&&(document.documentElement.style.setProperty("--sf","1"),document.documentElement.style.setProperty("--sf","1"),document.documentElement.classList.add("desktop"),document.documentElement.classList.remove("mobile")),console.log(`[DS one] Desktop device detected (${t.screenWidth}x${t.screenHeight})`);return typeof window<"u"&&window.DS_ONE_DEBUG&&console.log("[DS one] Device Info:",{type:t.deviceType,isMobile:t.isMobile,isTablet:t.isTablet,isDesktop:t.isDesktop,isTouchCapable:t.isTouchCapable,viewport:`${t.screenWidth}x${t.screenHeight}`,userAgent:t.userAgent}),t}if(typeof window<"u"){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Me()}):Me();let t;window.addEventListener("resize",()=>{clearTimeout(t),t=setTimeout(()=>{Me()},100)})}var dr={},yt=["da","de","en","es","fr","it","ja","pt","sv","zh"],ur=new Map(yt.map((t,e)=>[t,e])),ct={da:"Danish","da-dk":"Danish",de:"German","de-de":"German",en:"English","en-us":"English",es:"Spanish","es-es":"Spanish",fr:"French","fr-fr":"French",it:"Italian","it-it":"Italian",ja:"Japanese","ja-jp":"Japanese",pt:"Portuguese","pt-pt":"Portuguese",sv:"Swedish","sv-se":"Swedish",zh:"Chinese","zh-cn":"Chinese","zh-tw":"Chinese","zh-hans":"Chinese","zh-hant":"Chinese"},dt=new Map,ut=!1,wt="./translations.json",ht=!1;function pt(t){if(!t)return null;let e=t.trim();return e?e.startsWith("./")||e.startsWith("../")||e.startsWith("/")||/^https?:\/\//i.test(e)?e:`./${e}`:null}function hr(){if(typeof document>"u")return null;let e=document.querySelector("script[data-ds-one-translations]")?.getAttribute("data-ds-one-translations");if(e)return e;let r=document.querySelector('meta[name="ds-one:translations"]')?.getAttribute("content");if(r)return r;let s=document.querySelector('link[rel="ds-one-translations"]')?.getAttribute("href");return s||null}function pr(){let t=[],e=typeof window<"u"?window.DS_ONE_TRANSLATIONS_FILE:null,r=hr(),s=pt(e??"");s&&t.push(s);let n=pt(r??"");return n&&!t.includes(n)&&t.push(n),t.length===0&&t.push(wt),t}function fr(t){return!t||typeof t!="object"?!1:Object.values(t).every(e=>e&&typeof e=="object")}async function gr(t){try{let e=await fetch(t);if(!e.ok)return null;let r=await e.json();return fr(r)?Object.keys(r).length===0?(console.warn(`[DS one] No languages found in ${t}`),null):r:(console.warn(`[DS one] Invalid translation format in ${t}. Expected object with language codes as keys.`),null)}catch{return null}}async function ft(){if(ht||(ht=!0,typeof window>"u"))return!1;if(window.DS_ONE_TRANSLATIONS&&Object.keys(window.DS_ONE_TRANSLATIONS).length>0)return console.log(`[DS one] Translations already loaded (${Object.keys(window.DS_ONE_TRANSLATIONS).length} languages), skipping auto-load`),!0;let t=pr();for(let e of t){let r=await gr(e);if(!r)continue;window.DS_ONE_TRANSLATIONS=r;let s=Object.keys(r);return console.log(`[DS one] External translations loaded from ${e}: ${s.length} language(s) \u2013 ${s.join(", ")}`),window.dispatchEvent(new CustomEvent("translations-ready")),!0}return console.info(`[DS one] No external translations found at ${t[0]??wt}. Using bundled translations.`),!1}function ge(){return typeof window<"u"&&window.DS_ONE_TRANSLATIONS?window.DS_ONE_TRANSLATIONS:dr}var N=ge(),E="en";function F(t){return t?t.toLowerCase().split(/[-_]/)[0]??"":""}function gt(t){let e=F(t),r=ur.get(e);return typeof r=="number"?r:yt.length}function bt(t){return[...t].sort((e,r)=>{let s=gt(e),n=gt(r);return s!==n?s-n:e.localeCompare(r)})}function mr(t,e){let r=t?.replace("_","-");if(r)try{let s=dt.get(r);s||(s=new Intl.DisplayNames([r],{type:"language"}),dt.set(r,s));let n=e.replace("_","-"),i=s.of(n);if(i&&i!==n)return i;let o=s.of(F(n));if(o)return o}catch{ut||(console.info("[DS one] Intl.DisplayNames is not available, using fallback language names."),ut=!0)}}function vr(t){let e=t.toLowerCase().replace("_","-"),r=ct[e];if(r)return r;let s=F(e);return ct[s]}function xt(t,e={}){if(!t)return"";let r=[];e.locale&&r.push(e.locale),typeof navigator<"u"&&(Array.isArray(navigator.languages)&&r.push(...navigator.languages),navigator.language&&r.push(navigator.language)),r.push(E),r.push("en");let s=new Set;for(let o of r){if(!o||s.has(o))continue;s.add(o);let f=mr(o,t);if(f)return f}let n=vr(t);if(n)return n;let i=F(t);return i?i.toUpperCase():t}var mt={da:"da","da-dk":"da",de:"de","de-de":"de",en:"en","en-us":"en","en-gb":"en",es:"es","es-es":"es","es-mx":"es",fr:"fr","fr-fr":"fr",it:"it","it-it":"it",ja:"ja","ja-jp":"ja",pt:"pt","pt-pt":"pt","pt-br":"pt",sv:"sv","sv-se":"sv",zh:"zh","zh-cn":"zh","zh-hans":"zh","zh-tw":"zh","zh-hant":"zh"};function vt(t){if(!t)return null;let e=t.toLowerCase().replace("_","-"),r=mt[e];if(r)return r;let s=F(e),n=mt[s];return n||t}function yr(){if(typeof navigator>"u")return E;let t=navigator.language;if(t){let e=vt(t);if(e)return e}if(Array.isArray(navigator.languages))for(let e of navigator.languages){let r=vt(e);if(r)return r}return E}var as=typeof window<"u"?window.localStorage?.getItem("ds-one:language")??void 0:void 0,S={value:localStorage.getItem("language")||yr(),set:function(t){this.value=t,localStorage.setItem("language",t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}};typeof window<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{ft()}):ft());typeof window<"u"&&window.addEventListener("translations-ready",()=>{N=ge(),window.dispatchEvent(new CustomEvent("translations-loaded"));let t=S.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))});setTimeout(()=>{window.dispatchEvent(new CustomEvent("translations-loaded"));let t=S.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))},100);function O(t){let e=S.value;return N?.[e]?.[t]?N[e][t]:e!==E&&N?.[E]?.[t]?N[E][t]:(console.warn(`[DS one (Internationalization)] No translation found for key "${t}"`),t)}function ls(t,e=S.value){if(!t)return!1;let r=N?.[e];return!!(r&&Object.prototype.hasOwnProperty.call(r,t)||e!==E&&N?.[E]&&Object.prototype.hasOwnProperty.call(N[E],t))}function _t(t){return O(t)}function cs(){let t=ge();if(t&&Object.keys(t).length>0){let e=Object.keys(t);return Promise.resolve(bt(e))}return Promise.resolve([E])}function Re(){let t=ge();return t&&Object.keys(t).length>0?bt(Object.keys(t)):[E]}function ds(t,e){console.log(`Loading additional translations for ${t}:`,Object.keys(e).length,"keys")}function Ue(t){localStorage.setItem("language",t),S.set(t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}function P(t){if(!(typeof window>"u"))try{let e=window.localStorage?.getItem("ds-one:preferences"),s={...e?JSON.parse(e):{},...t};window.localStorage?.setItem("ds-one:preferences",JSON.stringify(s))}catch(e){console.warn("ds-one: unable to persist preferences",e)}}var wr={da:"kr.",nb:"kr.",sv:"kr.",de:"\u20AC",en:"$",pt:"\u20AC",es:"\u20AC",zh:"\xA5",ja:"\xA5",ko:"\u20A9"};function ps(t){let{language:e,country:r}=t;if(r){let n=r.toUpperCase();if(n==="US"||n==="USA")return"$";if(n==="GB"||n==="UK")return"\xA3";if(n==="JP"||n==="JPN"||n==="CN"||n==="CHN")return"\xA5";if(n==="KR"||n==="KOR")return"\u20A9"}let s=e.toLowerCase().split(/[-_]/)[0];return wr[s]||"$"}var br=Object.defineProperty,xr=(t,e,r)=>e in t?br(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,We=(t,e,r)=>(xr(t,typeof e!="symbol"?e+"":e,r),r),_r=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},je=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},me=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},$t=(t,e,r)=>(_r(t,e,"access private method"),r);function St(t,e){return Object.is(t,e)}var b=null,G=!1,ve=1,ye=Symbol("SIGNAL");function R(t){let e=b;return b=t,e}function $r(){return b}function Sr(){return G}var Ke={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function we(t){if(G)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(b===null)return;b.consumerOnSignalRead(t);let e=b.nextProducerIndex++;if(U(b),e<b.producerNode.length&&b.producerNode[e]!==t&&Fe(b)){let r=b.producerNode[e];be(r,b.producerIndexOfThis[e])}b.producerNode[e]!==t&&(b.producerNode[e]=t,b.producerIndexOfThis[e]=Fe(b)?Et(t,b,e):0),b.producerLastReadVersion[e]=t.version}function Ar(){ve++}function At(t){if(!(!t.dirty&&t.lastCleanEpoch===ve)){if(!t.producerMustRecompute(t)&&!Lr(t)){t.dirty=!1,t.lastCleanEpoch=ve;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=ve}}function Ct(t){if(t.liveConsumerNode===void 0)return;let e=G;G=!0;try{for(let r of t.liveConsumerNode)r.dirty||Er(r)}finally{G=e}}function Cr(){return b?.consumerAllowSignalWrites!==!1}function Er(t){var e;t.dirty=!0,Ct(t),(e=t.consumerMarkedDirty)==null||e.call(t.wrapper??t)}function kr(t){return t&&(t.nextProducerIndex=0),R(t)}function Tr(t,e){if(R(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(Fe(t))for(let r=t.nextProducerIndex;r<t.producerNode.length;r++)be(t.producerNode[r],t.producerIndexOfThis[r]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function Lr(t){U(t);for(let e=0;e<t.producerNode.length;e++){let r=t.producerNode[e],s=t.producerLastReadVersion[e];if(s!==r.version||(At(r),s!==r.version))return!0}return!1}function Et(t,e,r){var s;if(Ze(t),U(t),t.liveConsumerNode.length===0){(s=t.watched)==null||s.call(t.wrapper);for(let n=0;n<t.producerNode.length;n++)t.producerIndexOfThis[n]=Et(t.producerNode[n],t,n)}return t.liveConsumerIndexOfThis.push(r),t.liveConsumerNode.push(e)-1}function be(t,e){var r;if(Ze(t),U(t),typeof ngDevMode<"u"&&ngDevMode&&e>=t.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${e} is out of bounds of ${t.liveConsumerNode.length} consumers)`);if(t.liveConsumerNode.length===1){(r=t.unwatched)==null||r.call(t.wrapper);for(let n=0;n<t.producerNode.length;n++)be(t.producerNode[n],t.producerIndexOfThis[n])}let s=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[s],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[s],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){let n=t.liveConsumerIndexOfThis[e],i=t.liveConsumerNode[e];U(i),i.producerIndexOfThis[n]=e}}function Fe(t){var e;return t.consumerIsAlwaysLive||(((e=t?.liveConsumerNode)==null?void 0:e.length)??0)>0}function U(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function Ze(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}function kt(t){if(At(t),we(t),t.value===Ge)throw t.error;return t.value}function Nr(t){let e=Object.create(Ir);e.computation=t;let r=()=>kt(e);return r[ye]=e,r}var Be=Symbol("UNSET"),qe=Symbol("COMPUTING"),Ge=Symbol("ERRORED"),Ir={...Ke,value:Be,dirty:!0,error:null,equal:St,producerMustRecompute(t){return t.value===Be||t.value===qe},producerRecomputeValue(t){if(t.value===qe)throw new Error("Detected cycle in computations.");let e=t.value;t.value=qe;let r=kr(t),s,n=!1;try{s=t.computation.call(t.wrapper),n=e!==Be&&e!==Ge&&t.equal.call(t.wrapper,e,s)}catch(i){s=Ge,t.error=i}finally{Tr(t,r)}if(n){t.value=e;return}t.value=s,t.version++}};function Or(){throw new Error}var Pr=Or;function Hr(){Pr()}function Vr(t){let e=Object.create(Dr);e.value=t;let r=()=>(we(e),e.value);return r[ye]=e,r}function zr(){return we(this),this.value}function Mr(t,e){Cr()||Hr(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,Rr(t))}var Dr={...Ke,equal:St,value:void 0};function Rr(t){t.version++,Ar(),Ct(t)}var x=Symbol("node"),_;(t=>{var e,r,s,n,i,o;class f{constructor(v,l={}){me(this,r),We(this,e);let g=Vr(v)[ye];if(this[x]=g,g.wrapper=this,l){let $=l.equals;$&&(g.equal=$),g.watched=l[t.subtle.watched],g.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return zr.call(this[x])}set(v){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(Sr())throw new Error("Writes to signals not permitted during Watcher callback");let l=this[x];Mr(l,v)}}e=x,r=new WeakSet,s=function(){},t.isState=u=>typeof u=="object"&&je(r,u),t.State=f;class d{constructor(v,l){me(this,i),We(this,n);let g=Nr(v)[ye];if(g.consumerAllowSignalWrites=!0,this[x]=g,g.wrapper=this,l){let $=l.equals;$&&(g.equal=$),g.watched=l[t.subtle.watched],g.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return kt(this[x])}}n=x,i=new WeakSet,o=function(){},t.isComputed=u=>typeof u=="object"&&je(i,u),t.Computed=d,(u=>{var v,l,A,g,$;function tr(y){let m,c=null;try{c=R(null),m=y()}finally{R(c)}return m}u.untrack=tr;function rr(y){var m;if(!(0,t.isComputed)(y)&&!(0,t.isWatcher)(y))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((m=y[x].producerNode)==null?void 0:m.map(c=>c.wrapper))??[]}u.introspectSources=rr;function sr(y){var m;if(!(0,t.isComputed)(y)&&!(0,t.isState)(y))throw new TypeError("Called introspectSinks without a Signal argument");return((m=y[x].liveConsumerNode)==null?void 0:m.map(c=>c.wrapper))??[]}u.introspectSinks=sr;function nr(y){if(!(0,t.isComputed)(y)&&!(0,t.isState)(y))throw new TypeError("Called hasSinks without a Signal argument");let m=y[x].liveConsumerNode;return m?m.length>0:!1}u.hasSinks=nr;function ir(y){if(!(0,t.isComputed)(y)&&!(0,t.isWatcher)(y))throw new TypeError("Called hasSources without a Computed or Watcher argument");let m=y[x].producerNode;return m?m.length>0:!1}u.hasSources=ir;class or{constructor(m){me(this,l),me(this,g),We(this,v);let c=Object.create(Ke);c.wrapper=this,c.consumerMarkedDirty=m,c.consumerIsAlwaysLive=!0,c.consumerAllowSignalWrites=!1,c.producerNode=[],this[x]=c}watch(...m){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");$t(this,g,$).call(this,m);let c=this[x];c.dirty=!1;let C=R(c);for(let fe of m)we(fe[x]);R(C)}unwatch(...m){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");$t(this,g,$).call(this,m);let c=this[x];U(c);for(let C=c.producerNode.length-1;C>=0;C--)if(m.includes(c.producerNode[C].wrapper)){be(c.producerNode[C],c.producerIndexOfThis[C]);let fe=c.producerNode.length-1;if(c.producerNode[C]=c.producerNode[fe],c.producerIndexOfThis[C]=c.producerIndexOfThis[fe],c.producerNode.length--,c.producerIndexOfThis.length--,c.nextProducerIndex--,C<c.producerNode.length){let lr=c.producerIndexOfThis[C],lt=c.producerNode[C];Ze(lt),lt.liveConsumerIndexOfThis[lr]=C}}}getPending(){if(!(0,t.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[x].producerNode.filter(c=>c.dirty).map(c=>c.wrapper)}}v=x,l=new WeakSet,A=function(){},g=new WeakSet,$=function(y){for(let m of y)if(!(0,t.isComputed)(m)&&!(0,t.isState)(m))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=y=>je(l,y),u.Watcher=or;function ar(){var y;return(y=$r())==null?void 0:y.wrapper}u.currentComputed=ar,u.watched=Symbol("watched"),u.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(_||(_={}));var vs=Symbol("SignalWatcherBrand"),ys=new FinalizationRegistry((({watcher:t,signal:e})=>{t.unwatch(e)}));var xe={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},K=t=>(...e)=>({_$litDirective$:t,values:e}),W=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,s){this._$Ct=e,this._$AM=r,this._$Ci=s}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var J=globalThis,_e=J.trustedTypes,Tt=_e?_e.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ye="$lit$",k=`lit$${Math.random().toFixed(9).slice(2)}$`,Xe="?"+k,Ur=`<${Xe}>`,z=document,Y=()=>z.createComment(""),X=t=>t===null||typeof t!="object"&&typeof t!="function",Qe=Array.isArray,Ht=t=>Qe(t)||typeof t?.[Symbol.iterator]=="function",Je=`[
2
- \f\r]`,Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Lt=/-->/g,Nt=/>/g,H=RegExp(`>|${Je}(?:([^\\s"'>=/]+)(${Je}*=${Je}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),It=/'/g,Ot=/"/g,Vt=/^(?:script|style|textarea|title)$/i,et=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),a=et(1),zt=et(2),$s=et(3),T=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),Pt=new WeakMap,V=z.createTreeWalker(z,129);function Mt(t,e){if(!Qe(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Tt!==void 0?Tt.createHTML(e):e}var Dt=(t,e)=>{let r=t.length-1,s=[],n,i=e===2?"<svg>":e===3?"<math>":"",o=Z;for(let f=0;f<r;f++){let d=t[f],u,v,l=-1,A=0;for(;A<d.length&&(o.lastIndex=A,v=o.exec(d),v!==null);)A=o.lastIndex,o===Z?v[1]==="!--"?o=Lt:v[1]!==void 0?o=Nt:v[2]!==void 0?(Vt.test(v[2])&&(n=RegExp("</"+v[2],"g")),o=H):v[3]!==void 0&&(o=H):o===H?v[0]===">"?(o=n??Z,l=-1):v[1]===void 0?l=-2:(l=o.lastIndex-v[2].length,u=v[1],o=v[3]===void 0?H:v[3]==='"'?Ot:It):o===Ot||o===It?o=H:o===Lt||o===Nt?o=Z:(o=H,n=void 0);let g=o===H&&t[f+1].startsWith("/>")?" ":"";i+=o===Z?d+Ur:l>=0?(s.push(u),d.slice(0,l)+Ye+d.slice(l)+k+g):d+k+(l===-2?f:g)}return[Mt(t,i+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]},Q=class t{constructor({strings:e,_$litType$:r},s){let n;this.parts=[];let i=0,o=0,f=e.length-1,d=this.parts,[u,v]=Dt(e,r);if(this.el=t.createElement(u,s),V.currentNode=this.el.content,r===2||r===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(n=V.nextNode())!==null&&d.length<f;){if(n.nodeType===1){if(n.hasAttributes())for(let l of n.getAttributeNames())if(l.endsWith(Ye)){let A=v[o++],g=n.getAttribute(l).split(k),$=/([.?@])?(.*)/.exec(A);d.push({type:1,index:i,name:$[2],strings:g,ctor:$[1]==="."?Se:$[1]==="?"?Ae:$[1]==="@"?Ce:D}),n.removeAttribute(l)}else l.startsWith(k)&&(d.push({type:6,index:i}),n.removeAttribute(l));if(Vt.test(n.tagName)){let l=n.textContent.split(k),A=l.length-1;if(A>0){n.textContent=_e?_e.emptyScript:"";for(let g=0;g<A;g++)n.append(l[g],Y()),V.nextNode(),d.push({type:2,index:++i});n.append(l[A],Y())}}}else if(n.nodeType===8)if(n.data===Xe)d.push({type:2,index:i});else{let l=-1;for(;(l=n.data.indexOf(k,l+1))!==-1;)d.push({type:7,index:i}),l+=k.length-1}i++}}static createElement(e,r){let s=z.createElement("template");return s.innerHTML=e,s}};function M(t,e,r=t,s){if(e===T)return e;let n=s!==void 0?r._$Co?.[s]:r._$Cl,i=X(e)?void 0:e._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),i===void 0?n=void 0:(n=new i(t),n._$AT(t,r,s)),s!==void 0?(r._$Co??(r._$Co=[]))[s]=n:r._$Cl=n),n!==void 0&&(e=M(t,n._$AS(t,e.values),n,s)),e}var $e=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:s}=this._$AD,n=(e?.creationScope??z).importNode(r,!0);V.currentNode=n;let i=V.nextNode(),o=0,f=0,d=s[0];for(;d!==void 0;){if(o===d.index){let u;d.type===2?u=new j(i,i.nextSibling,this,e):d.type===1?u=new d.ctor(i,d.name,d.strings,this,e):d.type===6&&(u=new Ee(i,this,e)),this._$AV.push(u),d=s[++f]}o!==d?.index&&(i=V.nextNode(),o++)}return V.currentNode=z,n}p(e){let r=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,r),r+=s.strings.length-2):s._$AI(e[r])),r++}},j=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,s,n){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=s,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=M(this,e,r),X(e)?e===w||e==null||e===""?(this._$AH!==w&&this._$AR(),this._$AH=w):e!==this._$AH&&e!==T&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ht(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==w&&X(this._$AH)?this._$AA.nextSibling.data=e:this.T(z.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:s}=e,n=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=Q.createElement(Mt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===n)this._$AH.p(r);else{let i=new $e(n,this),o=i.u(this.options);i.p(r),this.T(o),this._$AH=i}}_$AC(e){let r=Pt.get(e.strings);return r===void 0&&Pt.set(e.strings,r=new Q(e)),r}k(e){Qe(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,s,n=0;for(let i of e)n===r.length?r.push(s=new t(this.O(Y()),this.O(Y()),this,this.options)):s=r[n],s._$AI(i),n++;n<r.length&&(this._$AR(s&&s._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},D=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,s,n,i){this.type=1,this._$AH=w,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w}_$AI(e,r=this,s,n){let i=this.strings,o=!1;if(i===void 0)e=M(this,e,r,0),o=!X(e)||e!==this._$AH&&e!==T,o&&(this._$AH=e);else{let f=e,d,u;for(e=i[0],d=0;d<i.length-1;d++)u=M(this,f[s+d],r,d),u===T&&(u=this._$AH[d]),o||(o=!X(u)||u!==this._$AH[d]),u===w?e=w:e!==w&&(e+=(u??"")+i[d+1]),this._$AH[d]=u}o&&!n&&this.j(e)}j(e){e===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Se=class extends D{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===w?void 0:e}},Ae=class extends D{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==w)}},Ce=class extends D{constructor(e,r,s,n,i){super(e,r,s,n,i),this.type=5}_$AI(e,r=this){if((e=M(this,e,r,0)??w)===T)return;let s=this._$AH,n=e===w&&s!==w||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,i=e!==w&&(s===w||n);n&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ee=class{constructor(e,r,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){M(this,e)}},Rt={M:Ye,P:k,A:Xe,C:1,L:Dt,R:$e,D:Ht,V:M,I:j,H:D,N:Ae,U:Ce,B:Se,F:Ee},Wr=J.litHtmlPolyfillSupport;Wr?.(Q,j),(J.litHtmlVersions??(J.litHtmlVersions=[])).push("3.3.1");var Ut=(t,e,r)=>{let s=r?.renderBefore??e,n=s._$litPart$;if(n===void 0){let i=r?.renderBefore??null;s._$litPart$=n=new j(e.insertBefore(Y(),i),i,void 0,r??{})}return n._$AI(t),n};var{I:Cs}=Rt;var Wt=t=>t.strings===void 0;var ee=(t,e)=>{let r=t._$AN;if(r===void 0)return!1;for(let s of r)s._$AO?.(e,!1),ee(s,e);return!0},ke=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},jt=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(r===void 0)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),qr(e)}};function jr(t){this._$AN!==void 0?(ke(this),this._$AM=t,jt(this)):this._$AM=t}function Br(t,e=!1,r=0){let s=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(e)if(Array.isArray(s))for(let i=r;i<s.length;i++)ee(s[i],!1),ke(s[i]);else s!=null&&(ee(s,!1),ke(s));else ee(this,t)}var qr=t=>{t.type==xe.CHILD&&(t._$AP??(t._$AP=Br),t._$AQ??(t._$AQ=jr))},Te=class extends W{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,s){super._$AT(e,r,s),jt(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(ee(this,e),ke(this))}setValue(e){if(Wt(this._$Ct))this._$Ct._$AI(e,this);else{let r=[...this._$Ct._$AH];r[this._$Ci]=e,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}};var Le=class extends Te{_$Sl(){if(this._$Su!==void 0)return;this._$SW=new _.Computed((()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}));let e=this._$Su=new _.subtle.Watcher((()=>{var r;(r=this._$SO)===null||r===void 0||r._(this),e.watch()}));e.watch(this._$SW)}_$Sp(){var e;this._$Su!==void 0&&(this._$Su.unwatch(this._$SW),this._$SW=void 0,this._$Su=void 0,(e=this._$SO)===null||e===void 0||e.m(this))}commit(){this.setValue(_.subtle.untrack((()=>{var e;return(e=this._$SW)===null||e===void 0?void 0:e.get()})))}render(e){return _.subtle.untrack((()=>e.get()))}update(e,[r]){var s,n;return(s=this._$SO)!==null&&s!==void 0||(this._$SO=(n=e.options)===null||n===void 0?void 0:n.host),r!==this._$Sj&&this._$Sj!==void 0&&this._$Sp(),this._$Sj=r,this._$Sl(),_.subtle.untrack((()=>this._$SW.get()))}disconnected(){this._$Sp()}reconnected(){this._$Sl()}},tt=K(Le);var rt=t=>(e,...r)=>t(e,...r.map((s=>s instanceof _.State||s instanceof _.Computed?tt(s):s))),Fr=rt(a),Gr=rt(zt);var Fs=_.State,Gs=_.Computed,Bt=(t,e)=>new _.State(t,e);function Kr(){if(typeof window>"u")return"light";let t=window.localStorage?.getItem("ds-one:theme");return t==="light"||t==="dark"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var B=Bt(Kr());function qt(t){if(t!==B.get()&&(B.set(t),typeof window<"u")){try{window.localStorage?.setItem("ds-one:theme",t)}catch(r){console.warn("ds-one: unable to persist theme preference",r)}let e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`)),window.dispatchEvent(new CustomEvent("theme-changed",{detail:{theme:t}}))}}if(typeof window<"u"){let t=B.get(),e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`))}var Ne=globalThis,Ie=Ne.ShadowRoot&&(Ne.ShadyCSS===void 0||Ne.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,st=Symbol(),Ft=new WeakMap,te=class{constructor(e,r,s){if(this._$cssResult$=!0,s!==st)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(Ie&&e===void 0){let s=r!==void 0&&r.length===1;s&&(e=Ft.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Ft.set(r,e))}return e}toString(){return this.cssText}},Gt=t=>new te(typeof t=="string"?t:t+"",void 0,st),p=(t,...e)=>{let r=t.length===1?t[0]:e.reduce(((s,n,i)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[i+1]),t[0]);return new te(r,t,st)},Kt=(t,e)=>{if(Ie)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let s=document.createElement("style"),n=Ne.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=r.cssText,t.appendChild(s)}},nt=Ie?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let s of e.cssRules)r+=s.cssText;return Gt(r)})(t):t;var{is:Zr,defineProperty:Jr,getOwnPropertyDescriptor:Yr,getOwnPropertyNames:Xr,getOwnPropertySymbols:Qr,getPrototypeOf:es}=Object,I=globalThis,Zt=I.trustedTypes,ts=Zt?Zt.emptyScript:"",rs=I.reactiveElementPolyfillSupport,re=(t,e)=>t,it={toAttribute(t,e){switch(e){case Boolean:t=t?ts:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},Yt=(t,e)=>!Zr(t,e),Jt={attribute:!0,type:String,converter:it,reflect:!1,useDefault:!1,hasChanged:Yt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),I.litPropertyMetadata??(I.litPropertyMetadata=new WeakMap);var L=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=Jt){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){let s=Symbol(),n=this.getPropertyDescriptor(e,s,r);n!==void 0&&Jr(this.prototype,e,n)}}static getPropertyDescriptor(e,r,s){let{get:n,set:i}=Yr(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get:n,set(o){let f=n?.call(this);i?.call(this,o),this.requestUpdate(e,f,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Jt}static _$Ei(){if(this.hasOwnProperty(re("elementProperties")))return;let e=es(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(re("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(re("properties"))){let r=this.properties,s=[...Xr(r),...Qr(r)];for(let n of s)this.createProperty(n,r[n])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[s,n]of r)this.elementProperties.set(s,n)}this._$Eh=new Map;for(let[r,s]of this.elementProperties){let n=this._$Eu(r,s);n!==void 0&&this._$Eh.set(n,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let s=new Set(e.flat(1/0).reverse());for(let n of s)r.unshift(nt(n))}else e!==void 0&&r.push(nt(e));return r}static _$Eu(e,r){let s=r.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let s of r.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Kt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,r,s){this._$AK(e,s)}_$ET(e,r){let s=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,s);if(n!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:it).toAttribute(r,s.type);this._$Em=e,i==null?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,r){let s=this.constructor,n=s._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let i=s.getPropertyOptions(n),o=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:it;this._$Em=n;let f=o.fromAttribute(r,i.type);this[n]=f??this._$Ej?.get(n)??f,this._$Em=null}}requestUpdate(e,r,s){if(e!==void 0){let n=this.constructor,i=this[e];if(s??(s=n.getPropertyOptions(e)),!((s.hasChanged??Yt)(i,r)||s.useDefault&&s.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,s))))return;this.C(e,r,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:s,reflect:n,wrapped:i},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??r??this[e]),i!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(r=void 0),this._$AL.set(e,r)),n===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,i]of this._$Ep)this[n]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[n,i]of s){let{wrapped:o}=i,f=this[n];o!==!0||this._$AL.has(n)||f===void 0||this.C(n,void 0,i,f)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(r)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach((r=>r.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach((r=>this._$ET(r,this[r])))),this._$EM()}updated(e){}firstUpdated(e){}};L.elementStyles=[],L.shadowRootOptions={mode:"open"},L[re("elementProperties")]=new Map,L[re("finalized")]=new Map,rs?.({ReactiveElement:L}),(I.reactiveElementVersions??(I.reactiveElementVersions=[])).push("2.1.1");var se=globalThis,h=class extends L{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;let e=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=e.firstChild),e}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ut(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return T}};h._$litElement$=!0,h.finalized=!0,se.litElementHydrateSupport?.({LitElement:h});var ss=se.litElementPolyfillSupport;ss?.({LitElement:h});(se.litElementVersions??(se.litElementVersions=[])).push("4.2.1");var Oe=class extends h{static get properties(){return{key:{type:String,reflect:!0},defaultValue:{type:String,reflect:!0,attribute:"default-value"},fallback:{type:String,reflect:!0},_text:{type:String,state:!0}}}constructor(){super(),this.key="",this.defaultValue="",this.fallback="",this._text="",this._currentLanguage=S.value,this.boundHandlers={languageChanged:(()=>{console.log("Language changed event received in ds-text"),this._currentLanguage=S.value,this._updateLanguageAttribute(),this._loadText(),this.requestUpdate()})}}connectedCallback(){super.connectedCallback(),this._currentLanguage=S.value,this._updateLanguageAttribute(),this._loadText(),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundHandlers.languageChanged)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundHandlers.languageChanged)}updated(e){super.updated(e),(e.has("key")||e.has("defaultValue"))&&this._loadText()}_updateLanguageAttribute(){let r=(this._currentLanguage||S.value||"").toLowerCase().split(/[-_]/).filter(Boolean),s=r[0]||"";if(s==="ja"){this.setAttribute("data-language","ja");return}if(s==="zh"){let n=r.includes("hans")||r.includes("cn")||r.includes("sg"),i=r.includes("hant")||r.includes("tw")||r.includes("hk")||r.includes("mo");n?this.setAttribute("data-language","zh-hans"):i?this.setAttribute("data-language","zh-hant"):this.setAttribute("data-language","zh");return}this.removeAttribute("data-language")}_loadText(){if(!this.key){this._text=this.defaultValue||this.fallback||"",this._updateLanguageAttribute(),this.requestUpdate();return}try{let e=_t(this.key);this._text=e||this.defaultValue||this.fallback||this.key}catch(e){console.error("Error loading text for key:",this.key,e),this._text=this.defaultValue||this.fallback||this.key}this._updateLanguageAttribute(),this.requestUpdate()}render(){return a`<span>${this._text||this.defaultValue||this.key}</span>`}};Oe.styles=p`
1
+ function Ue(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigator,e=window,r=t&&(t.userAgent||t.vendor)||e&&e.opera||"",s=/Mobile|Android|iP(ad|hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)|Windows Phone|Phone|Tablet/i.test(r),i=(t&&t.maxTouchPoints||0)>1,a=e?Math.min(e.innerWidth||0,e.innerHeight||0)<=820:!1;return s||i&&a}function dr(){let t=Ue(),e=navigator,r=window,n=(e&&e.maxTouchPoints||0)>1,i=typeof document<"u"?document.documentElement.clientWidth:r?.innerWidth||0,a=typeof document<"u"?document.documentElement.clientHeight:r?.innerHeight||0,f=t&&Math.min(i,a)>=600;return{isMobile:t,isTablet:f,isDesktop:!t,isTouchCapable:n,deviceType:t?f?"tablet":"mobile":"desktop",userAgent:e&&(e.userAgent||e.vendor)||"",screenWidth:i,screenHeight:a}}function Re(){let t=dr();if(t.isMobile&&typeof document<"u"){let s=t.screenWidth/280;document.documentElement.style.setProperty("--sf",s.toFixed(3)),document.documentElement.style.setProperty("--sf",s.toFixed(3)),document.documentElement.classList.add("mobile"),document.documentElement.classList.remove("desktop"),console.log(`[DS one] Mobile device detected - ${t.deviceType} (${t.screenWidth}x${t.screenHeight}), scaling factor: ${s.toFixed(2)}`)}else typeof document<"u"&&(document.documentElement.style.setProperty("--sf","1"),document.documentElement.style.setProperty("--sf","1"),document.documentElement.classList.add("desktop"),document.documentElement.classList.remove("mobile")),console.log(`[DS one] Desktop device detected (${t.screenWidth}x${t.screenHeight})`);return typeof window<"u"&&window.DS_ONE_DEBUG&&console.log("[DS one] Device Info:",{type:t.deviceType,isMobile:t.isMobile,isTablet:t.isTablet,isDesktop:t.isDesktop,isTouchCapable:t.isTouchCapable,viewport:`${t.screenWidth}x${t.screenHeight}`,userAgent:t.userAgent}),t}if(typeof window<"u"){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Re()}):Re();let t;window.addEventListener("resize",()=>{clearTimeout(t),t=setTimeout(()=>{Re()},100)})}var ur={},bt=["da","de","en","es","fr","it","ja","pt","sv","zh"],hr=new Map(bt.map((t,e)=>[t,e])),ut={da:"Danish","da-dk":"Danish",de:"German","de-de":"German",en:"English","en-us":"English",es:"Spanish","es-es":"Spanish",fr:"French","fr-fr":"French",it:"Italian","it-it":"Italian",ja:"Japanese","ja-jp":"Japanese",pt:"Portuguese","pt-pt":"Portuguese",sv:"Swedish","sv-se":"Swedish",zh:"Chinese","zh-cn":"Chinese","zh-tw":"Chinese","zh-hans":"Chinese","zh-hant":"Chinese"},ht=new Map,pt=!1,xt="./translations.json",ft=!1;function gt(t){if(!t)return null;let e=t.trim();return e?e.startsWith("./")||e.startsWith("../")||e.startsWith("/")||/^https?:\/\//i.test(e)?e:`./${e}`:null}function pr(){if(typeof document>"u")return null;let e=document.querySelector("script[data-ds-one-translations]")?.getAttribute("data-ds-one-translations");if(e)return e;let r=document.querySelector('meta[name="ds-one:translations"]')?.getAttribute("content");if(r)return r;let s=document.querySelector('link[rel="ds-one-translations"]')?.getAttribute("href");return s||null}function fr(){let t=[],e=typeof window<"u"?window.DS_ONE_TRANSLATIONS_FILE:null,r=pr(),s=gt(e??"");s&&t.push(s);let n=gt(r??"");return n&&!t.includes(n)&&t.push(n),t.length===0&&t.push(xt),t}function gr(t){return!t||typeof t!="object"?!1:Object.values(t).every(e=>e&&typeof e=="object")}async function mr(t){try{let e=await fetch(t);if(!e.ok)return null;let r=await e.json();return gr(r)?Object.keys(r).length===0?(console.warn(`[DS one] No languages found in ${t}`),null):r:(console.warn(`[DS one] Invalid translation format in ${t}. Expected object with language codes as keys.`),null)}catch{return null}}async function mt(){if(ft||(ft=!0,typeof window>"u"))return!1;if(window.DS_ONE_TRANSLATIONS&&Object.keys(window.DS_ONE_TRANSLATIONS).length>0)return console.log(`[DS one] Translations already loaded (${Object.keys(window.DS_ONE_TRANSLATIONS).length} languages), skipping auto-load`),!0;let t=fr();for(let e of t){let r=await mr(e);if(!r)continue;window.DS_ONE_TRANSLATIONS=r;let s=Object.keys(r);return console.log(`[DS one] External translations loaded from ${e}: ${s.length} language(s) \u2013 ${s.join(", ")}`),window.dispatchEvent(new CustomEvent("translations-ready")),!0}return console.info(`[DS one] No external translations found at ${t[0]??xt}. Using bundled translations.`),!1}function ve(){return typeof window<"u"&&window.DS_ONE_TRANSLATIONS?window.DS_ONE_TRANSLATIONS:ur}var N=ve(),E="en";function F(t){return t?t.toLowerCase().split(/[-_]/)[0]??"":""}function vt(t){let e=F(t),r=hr.get(e);return typeof r=="number"?r:bt.length}function _t(t){return[...t].sort((e,r)=>{let s=vt(e),n=vt(r);return s!==n?s-n:e.localeCompare(r)})}function vr(t,e){let r=t?.replace("_","-");if(r)try{let s=ht.get(r);s||(s=new Intl.DisplayNames([r],{type:"language"}),ht.set(r,s));let n=e.replace("_","-"),i=s.of(n);if(i&&i!==n)return i;let a=s.of(F(n));if(a)return a}catch{pt||(console.info("[DS one] Intl.DisplayNames is not available, using fallback language names."),pt=!0)}}function yr(t){let e=t.toLowerCase().replace("_","-"),r=ut[e];if(r)return r;let s=F(e);return ut[s]}function $t(t,e={}){if(!t)return"";let r=[];e.locale&&r.push(e.locale),typeof navigator<"u"&&(Array.isArray(navigator.languages)&&r.push(...navigator.languages),navigator.language&&r.push(navigator.language)),r.push(E),r.push("en");let s=new Set;for(let a of r){if(!a||s.has(a))continue;s.add(a);let f=vr(a,t);if(f)return f}let n=yr(t);if(n)return n;let i=F(t);return i?i.toUpperCase():t}var yt={da:"da","da-dk":"da",de:"de","de-de":"de",en:"en","en-us":"en","en-gb":"en",es:"es","es-es":"es","es-mx":"es",fr:"fr","fr-fr":"fr",it:"it","it-it":"it",ja:"ja","ja-jp":"ja",pt:"pt","pt-pt":"pt","pt-br":"pt",sv:"sv","sv-se":"sv",zh:"zh","zh-cn":"zh","zh-hans":"zh","zh-tw":"zh","zh-hant":"zh"};function wt(t){if(!t)return null;let e=t.toLowerCase().replace("_","-"),r=yt[e];if(r)return r;let s=F(e),n=yt[s];return n||t}function wr(){if(typeof navigator>"u")return E;let t=navigator.language;if(t){let e=wt(t);if(e)return e}if(Array.isArray(navigator.languages))for(let e of navigator.languages){let r=wt(e);if(r)return r}return E}var ls=typeof window<"u"?window.localStorage?.getItem("ds-one:language")??void 0:void 0,S={value:localStorage.getItem("language")||wr(),set:function(t){this.value=t,localStorage.setItem("language",t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}};typeof window<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{mt()}):mt());typeof window<"u"&&window.addEventListener("translations-ready",()=>{N=ve(),window.dispatchEvent(new CustomEvent("translations-loaded"));let t=S.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))});setTimeout(()=>{window.dispatchEvent(new CustomEvent("translations-loaded"));let t=S.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))},100);function O(t){let e=S.value;return N?.[e]?.[t]?N[e][t]:e!==E&&N?.[E]?.[t]?N[E][t]:(console.warn(`[DS one (Internationalization)] No translation found for key "${t}"`),t)}function cs(t,e=S.value){if(!t)return!1;let r=N?.[e];return!!(r&&Object.prototype.hasOwnProperty.call(r,t)||e!==E&&N?.[E]&&Object.prototype.hasOwnProperty.call(N[E],t))}function R(t){return O(t)}function ds(){let t=ve();if(t&&Object.keys(t).length>0){let e=Object.keys(t);return Promise.resolve(_t(e))}return Promise.resolve([E])}function je(){let t=ve();return t&&Object.keys(t).length>0?_t(Object.keys(t)):[E]}function us(t,e){console.log(`Loading additional translations for ${t}:`,Object.keys(e).length,"keys")}function We(t){localStorage.setItem("language",t),S.set(t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}function V(t){if(!(typeof window>"u"))try{let e=window.localStorage?.getItem("ds-one:preferences"),s={...e?JSON.parse(e):{},...t};window.localStorage?.setItem("ds-one:preferences",JSON.stringify(s))}catch(e){console.warn("ds-one: unable to persist preferences",e)}}var br={da:"kr.",nb:"kr.",sv:"kr.",de:"\u20AC",en:"$",pt:"\u20AC",es:"\u20AC",zh:"\xA5",ja:"\xA5",ko:"\u20A9"};function fs(t){let{language:e,country:r}=t;if(r){let n=r.toUpperCase();if(n==="US"||n==="USA")return"$";if(n==="GB"||n==="UK")return"\xA3";if(n==="JP"||n==="JPN"||n==="CN"||n==="CHN")return"\xA5";if(n==="KR"||n==="KOR")return"\u20A9"}let s=e.toLowerCase().split(/[-_]/)[0];return br[s]||"$"}var xr=Object.defineProperty,_r=(t,e,r)=>e in t?xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Be=(t,e,r)=>(_r(t,typeof e!="symbol"?e+"":e,r),r),$r=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},qe=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},ye=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},St=(t,e,r)=>($r(t,e,"access private method"),r);function At(t,e){return Object.is(t,e)}var b=null,G=!1,we=1,be=Symbol("SIGNAL");function U(t){let e=b;return b=t,e}function Sr(){return b}function Ar(){return G}var Je={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function xe(t){if(G)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(b===null)return;b.consumerOnSignalRead(t);let e=b.nextProducerIndex++;if(j(b),e<b.producerNode.length&&b.producerNode[e]!==t&&Ge(b)){let r=b.producerNode[e];_e(r,b.producerIndexOfThis[e])}b.producerNode[e]!==t&&(b.producerNode[e]=t,b.producerIndexOfThis[e]=Ge(b)?kt(t,b,e):0),b.producerLastReadVersion[e]=t.version}function Cr(){we++}function Ct(t){if(!(!t.dirty&&t.lastCleanEpoch===we)){if(!t.producerMustRecompute(t)&&!Nr(t)){t.dirty=!1,t.lastCleanEpoch=we;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=we}}function Et(t){if(t.liveConsumerNode===void 0)return;let e=G;G=!0;try{for(let r of t.liveConsumerNode)r.dirty||kr(r)}finally{G=e}}function Er(){return b?.consumerAllowSignalWrites!==!1}function kr(t){var e;t.dirty=!0,Et(t),(e=t.consumerMarkedDirty)==null||e.call(t.wrapper??t)}function Lr(t){return t&&(t.nextProducerIndex=0),U(t)}function Tr(t,e){if(U(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(Ge(t))for(let r=t.nextProducerIndex;r<t.producerNode.length;r++)_e(t.producerNode[r],t.producerIndexOfThis[r]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function Nr(t){j(t);for(let e=0;e<t.producerNode.length;e++){let r=t.producerNode[e],s=t.producerLastReadVersion[e];if(s!==r.version||(Ct(r),s!==r.version))return!0}return!1}function kt(t,e,r){var s;if(Ye(t),j(t),t.liveConsumerNode.length===0){(s=t.watched)==null||s.call(t.wrapper);for(let n=0;n<t.producerNode.length;n++)t.producerIndexOfThis[n]=kt(t.producerNode[n],t,n)}return t.liveConsumerIndexOfThis.push(r),t.liveConsumerNode.push(e)-1}function _e(t,e){var r;if(Ye(t),j(t),typeof ngDevMode<"u"&&ngDevMode&&e>=t.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${e} is out of bounds of ${t.liveConsumerNode.length} consumers)`);if(t.liveConsumerNode.length===1){(r=t.unwatched)==null||r.call(t.wrapper);for(let n=0;n<t.producerNode.length;n++)_e(t.producerNode[n],t.producerIndexOfThis[n])}let s=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[s],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[s],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){let n=t.liveConsumerIndexOfThis[e],i=t.liveConsumerNode[e];j(i),i.producerIndexOfThis[n]=e}}function Ge(t){var e;return t.consumerIsAlwaysLive||(((e=t?.liveConsumerNode)==null?void 0:e.length)??0)>0}function j(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function Ye(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}function Lt(t){if(Ct(t),xe(t),t.value===Ze)throw t.error;return t.value}function Ir(t){let e=Object.create(Or);e.computation=t;let r=()=>Lt(e);return r[be]=e,r}var Ke=Symbol("UNSET"),Fe=Symbol("COMPUTING"),Ze=Symbol("ERRORED"),Or={...Je,value:Ke,dirty:!0,error:null,equal:At,producerMustRecompute(t){return t.value===Ke||t.value===Fe},producerRecomputeValue(t){if(t.value===Fe)throw new Error("Detected cycle in computations.");let e=t.value;t.value=Fe;let r=Lr(t),s,n=!1;try{s=t.computation.call(t.wrapper),n=e!==Ke&&e!==Ze&&t.equal.call(t.wrapper,e,s)}catch(i){s=Ze,t.error=i}finally{Tr(t,r)}if(n){t.value=e;return}t.value=s,t.version++}};function Vr(){throw new Error}var Pr=Vr;function Hr(){Pr()}function zr(t){let e=Object.create(Rr);e.value=t;let r=()=>(xe(e),e.value);return r[be]=e,r}function Mr(){return xe(this),this.value}function Dr(t,e){Er()||Hr(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,Ur(t))}var Rr={...Je,equal:At,value:void 0};function Ur(t){t.version++,Cr(),Et(t)}var x=Symbol("node"),_;(t=>{var e,r,s,n,i,a;class f{constructor(v,l={}){ye(this,r),Be(this,e);let g=zr(v)[be];if(this[x]=g,g.wrapper=this,l){let $=l.equals;$&&(g.equal=$),g.watched=l[t.subtle.watched],g.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return Mr.call(this[x])}set(v){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(Ar())throw new Error("Writes to signals not permitted during Watcher callback");let l=this[x];Dr(l,v)}}e=x,r=new WeakSet,s=function(){},t.isState=u=>typeof u=="object"&&qe(r,u),t.State=f;class d{constructor(v,l){ye(this,i),Be(this,n);let g=Ir(v)[be];if(g.consumerAllowSignalWrites=!0,this[x]=g,g.wrapper=this,l){let $=l.equals;$&&(g.equal=$),g.watched=l[t.subtle.watched],g.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Lt(this[x])}}n=x,i=new WeakSet,a=function(){},t.isComputed=u=>typeof u=="object"&&qe(i,u),t.Computed=d,(u=>{var v,l,A,g,$;function rr(y){let m,c=null;try{c=U(null),m=y()}finally{U(c)}return m}u.untrack=rr;function sr(y){var m;if(!(0,t.isComputed)(y)&&!(0,t.isWatcher)(y))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((m=y[x].producerNode)==null?void 0:m.map(c=>c.wrapper))??[]}u.introspectSources=sr;function nr(y){var m;if(!(0,t.isComputed)(y)&&!(0,t.isState)(y))throw new TypeError("Called introspectSinks without a Signal argument");return((m=y[x].liveConsumerNode)==null?void 0:m.map(c=>c.wrapper))??[]}u.introspectSinks=nr;function ir(y){if(!(0,t.isComputed)(y)&&!(0,t.isState)(y))throw new TypeError("Called hasSinks without a Signal argument");let m=y[x].liveConsumerNode;return m?m.length>0:!1}u.hasSinks=ir;function or(y){if(!(0,t.isComputed)(y)&&!(0,t.isWatcher)(y))throw new TypeError("Called hasSources without a Computed or Watcher argument");let m=y[x].producerNode;return m?m.length>0:!1}u.hasSources=or;class ar{constructor(m){ye(this,l),ye(this,g),Be(this,v);let c=Object.create(Je);c.wrapper=this,c.consumerMarkedDirty=m,c.consumerIsAlwaysLive=!0,c.consumerAllowSignalWrites=!1,c.producerNode=[],this[x]=c}watch(...m){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");St(this,g,$).call(this,m);let c=this[x];c.dirty=!1;let C=U(c);for(let me of m)xe(me[x]);U(C)}unwatch(...m){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");St(this,g,$).call(this,m);let c=this[x];j(c);for(let C=c.producerNode.length-1;C>=0;C--)if(m.includes(c.producerNode[C].wrapper)){_e(c.producerNode[C],c.producerIndexOfThis[C]);let me=c.producerNode.length-1;if(c.producerNode[C]=c.producerNode[me],c.producerIndexOfThis[C]=c.producerIndexOfThis[me],c.producerNode.length--,c.producerIndexOfThis.length--,c.nextProducerIndex--,C<c.producerNode.length){let cr=c.producerIndexOfThis[C],dt=c.producerNode[C];Ye(dt),dt.liveConsumerIndexOfThis[cr]=C}}}getPending(){if(!(0,t.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[x].producerNode.filter(c=>c.dirty).map(c=>c.wrapper)}}v=x,l=new WeakSet,A=function(){},g=new WeakSet,$=function(y){for(let m of y)if(!(0,t.isComputed)(m)&&!(0,t.isState)(m))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=y=>qe(l,y),u.Watcher=ar;function lr(){var y;return(y=Sr())==null?void 0:y.wrapper}u.currentComputed=lr,u.watched=Symbol("watched"),u.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(_||(_={}));var ys=Symbol("SignalWatcherBrand"),ws=new FinalizationRegistry((({watcher:t,signal:e})=>{t.unwatch(e)}));var $e={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Z=t=>(...e)=>({_$litDirective$:t,values:e}),W=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,s){this._$Ct=e,this._$AM=r,this._$Ci=s}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var Y=globalThis,Se=Y.trustedTypes,Tt=Se?Se.createPolicy("lit-html",{createHTML:t=>t}):void 0,Qe="$lit$",k=`lit$${Math.random().toFixed(9).slice(2)}$`,et="?"+k,jr=`<${et}>`,z=document,X=()=>z.createComment(""),Q=t=>t===null||typeof t!="object"&&typeof t!="function",tt=Array.isArray,Ht=t=>tt(t)||typeof t?.[Symbol.iterator]=="function",Xe=`[
2
+ \f\r]`,J=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Nt=/-->/g,It=/>/g,P=RegExp(`>|${Xe}(?:([^\\s"'>=/]+)(${Xe}*=${Xe}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ot=/'/g,Vt=/"/g,zt=/^(?:script|style|textarea|title)$/i,rt=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),o=rt(1),Mt=rt(2),Ss=rt(3),L=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),Pt=new WeakMap,H=z.createTreeWalker(z,129);function Dt(t,e){if(!tt(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Tt!==void 0?Tt.createHTML(e):e}var Rt=(t,e)=>{let r=t.length-1,s=[],n,i=e===2?"<svg>":e===3?"<math>":"",a=J;for(let f=0;f<r;f++){let d=t[f],u,v,l=-1,A=0;for(;A<d.length&&(a.lastIndex=A,v=a.exec(d),v!==null);)A=a.lastIndex,a===J?v[1]==="!--"?a=Nt:v[1]!==void 0?a=It:v[2]!==void 0?(zt.test(v[2])&&(n=RegExp("</"+v[2],"g")),a=P):v[3]!==void 0&&(a=P):a===P?v[0]===">"?(a=n??J,l=-1):v[1]===void 0?l=-2:(l=a.lastIndex-v[2].length,u=v[1],a=v[3]===void 0?P:v[3]==='"'?Vt:Ot):a===Vt||a===Ot?a=P:a===Nt||a===It?a=J:(a=P,n=void 0);let g=a===P&&t[f+1].startsWith("/>")?" ":"";i+=a===J?d+jr:l>=0?(s.push(u),d.slice(0,l)+Qe+d.slice(l)+k+g):d+k+(l===-2?f:g)}return[Dt(t,i+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]},ee=class t{constructor({strings:e,_$litType$:r},s){let n;this.parts=[];let i=0,a=0,f=e.length-1,d=this.parts,[u,v]=Rt(e,r);if(this.el=t.createElement(u,s),H.currentNode=this.el.content,r===2||r===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(n=H.nextNode())!==null&&d.length<f;){if(n.nodeType===1){if(n.hasAttributes())for(let l of n.getAttributeNames())if(l.endsWith(Qe)){let A=v[a++],g=n.getAttribute(l).split(k),$=/([.?@])?(.*)/.exec(A);d.push({type:1,index:i,name:$[2],strings:g,ctor:$[1]==="."?Ce:$[1]==="?"?Ee:$[1]==="@"?ke:D}),n.removeAttribute(l)}else l.startsWith(k)&&(d.push({type:6,index:i}),n.removeAttribute(l));if(zt.test(n.tagName)){let l=n.textContent.split(k),A=l.length-1;if(A>0){n.textContent=Se?Se.emptyScript:"";for(let g=0;g<A;g++)n.append(l[g],X()),H.nextNode(),d.push({type:2,index:++i});n.append(l[A],X())}}}else if(n.nodeType===8)if(n.data===et)d.push({type:2,index:i});else{let l=-1;for(;(l=n.data.indexOf(k,l+1))!==-1;)d.push({type:7,index:i}),l+=k.length-1}i++}}static createElement(e,r){let s=z.createElement("template");return s.innerHTML=e,s}};function M(t,e,r=t,s){if(e===L)return e;let n=s!==void 0?r._$Co?.[s]:r._$Cl,i=Q(e)?void 0:e._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),i===void 0?n=void 0:(n=new i(t),n._$AT(t,r,s)),s!==void 0?(r._$Co??(r._$Co=[]))[s]=n:r._$Cl=n),n!==void 0&&(e=M(t,n._$AS(t,e.values),n,s)),e}var Ae=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:s}=this._$AD,n=(e?.creationScope??z).importNode(r,!0);H.currentNode=n;let i=H.nextNode(),a=0,f=0,d=s[0];for(;d!==void 0;){if(a===d.index){let u;d.type===2?u=new B(i,i.nextSibling,this,e):d.type===1?u=new d.ctor(i,d.name,d.strings,this,e):d.type===6&&(u=new Le(i,this,e)),this._$AV.push(u),d=s[++f]}a!==d?.index&&(i=H.nextNode(),a++)}return H.currentNode=z,n}p(e){let r=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,r),r+=s.strings.length-2):s._$AI(e[r])),r++}},B=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,s,n){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=s,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=M(this,e,r),Q(e)?e===w||e==null||e===""?(this._$AH!==w&&this._$AR(),this._$AH=w):e!==this._$AH&&e!==L&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ht(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==w&&Q(this._$AH)?this._$AA.nextSibling.data=e:this.T(z.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:s}=e,n=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=ee.createElement(Dt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===n)this._$AH.p(r);else{let i=new Ae(n,this),a=i.u(this.options);i.p(r),this.T(a),this._$AH=i}}_$AC(e){let r=Pt.get(e.strings);return r===void 0&&Pt.set(e.strings,r=new ee(e)),r}k(e){tt(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,s,n=0;for(let i of e)n===r.length?r.push(s=new t(this.O(X()),this.O(X()),this,this.options)):s=r[n],s._$AI(i),n++;n<r.length&&(this._$AR(s&&s._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},D=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,s,n,i){this.type=1,this._$AH=w,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w}_$AI(e,r=this,s,n){let i=this.strings,a=!1;if(i===void 0)e=M(this,e,r,0),a=!Q(e)||e!==this._$AH&&e!==L,a&&(this._$AH=e);else{let f=e,d,u;for(e=i[0],d=0;d<i.length-1;d++)u=M(this,f[s+d],r,d),u===L&&(u=this._$AH[d]),a||(a=!Q(u)||u!==this._$AH[d]),u===w?e=w:e!==w&&(e+=(u??"")+i[d+1]),this._$AH[d]=u}a&&!n&&this.j(e)}j(e){e===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Ce=class extends D{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===w?void 0:e}},Ee=class extends D{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==w)}},ke=class extends D{constructor(e,r,s,n,i){super(e,r,s,n,i),this.type=5}_$AI(e,r=this){if((e=M(this,e,r,0)??w)===L)return;let s=this._$AH,n=e===w&&s!==w||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,i=e!==w&&(s===w||n);n&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Le=class{constructor(e,r,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){M(this,e)}},Ut={M:Qe,P:k,A:et,C:1,L:Rt,R:Ae,D:Ht,V:M,I:B,H:D,N:Ee,U:ke,B:Ce,F:Le},Wr=Y.litHtmlPolyfillSupport;Wr?.(ee,B),(Y.litHtmlVersions??(Y.litHtmlVersions=[])).push("3.3.1");var jt=(t,e,r)=>{let s=r?.renderBefore??e,n=s._$litPart$;if(n===void 0){let i=r?.renderBefore??null;s._$litPart$=n=new B(e.insertBefore(X(),i),i,void 0,r??{})}return n._$AI(t),n};var{I:Es}=Ut;var Wt=t=>t.strings===void 0;var te=(t,e)=>{let r=t._$AN;if(r===void 0)return!1;for(let s of r)s._$AO?.(e,!1),te(s,e);return!0},Te=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},Bt=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(r===void 0)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),Kr(e)}};function Br(t){this._$AN!==void 0?(Te(this),this._$AM=t,Bt(this)):this._$AM=t}function qr(t,e=!1,r=0){let s=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(e)if(Array.isArray(s))for(let i=r;i<s.length;i++)te(s[i],!1),Te(s[i]);else s!=null&&(te(s,!1),Te(s));else te(this,t)}var Kr=t=>{t.type==$e.CHILD&&(t._$AP??(t._$AP=qr),t._$AQ??(t._$AQ=Br))},Ne=class extends W{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,s){super._$AT(e,r,s),Bt(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(te(this,e),Te(this))}setValue(e){if(Wt(this._$Ct))this._$Ct._$AI(e,this);else{let r=[...this._$Ct._$AH];r[this._$Ci]=e,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}};var Ie=class extends Ne{_$Sl(){if(this._$Su!==void 0)return;this._$SW=new _.Computed((()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}));let e=this._$Su=new _.subtle.Watcher((()=>{var r;(r=this._$SO)===null||r===void 0||r._(this),e.watch()}));e.watch(this._$SW)}_$Sp(){var e;this._$Su!==void 0&&(this._$Su.unwatch(this._$SW),this._$SW=void 0,this._$Su=void 0,(e=this._$SO)===null||e===void 0||e.m(this))}commit(){this.setValue(_.subtle.untrack((()=>{var e;return(e=this._$SW)===null||e===void 0?void 0:e.get()})))}render(e){return _.subtle.untrack((()=>e.get()))}update(e,[r]){var s,n;return(s=this._$SO)!==null&&s!==void 0||(this._$SO=(n=e.options)===null||n===void 0?void 0:n.host),r!==this._$Sj&&this._$Sj!==void 0&&this._$Sp(),this._$Sj=r,this._$Sl(),_.subtle.untrack((()=>this._$SW.get()))}disconnected(){this._$Sp()}reconnected(){this._$Sl()}},st=Z(Ie);var nt=t=>(e,...r)=>t(e,...r.map((s=>s instanceof _.State||s instanceof _.Computed?st(s):s))),Fr=nt(o),Gr=nt(Mt);var Fs=_.State,Gs=_.Computed,qt=(t,e)=>new _.State(t,e);function Zr(){if(typeof window>"u")return"light";let t=window.localStorage?.getItem("ds-one:theme");return t==="light"||t==="dark"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var q=qt(Zr());function Kt(t){if(t!==q.get()&&(q.set(t),typeof window<"u")){try{window.localStorage?.setItem("ds-one:theme",t)}catch(r){console.warn("ds-one: unable to persist theme preference",r)}let e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`)),window.dispatchEvent(new CustomEvent("theme-changed",{detail:{theme:t}}))}}if(typeof window<"u"){let t=q.get(),e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`))}var Oe=globalThis,Ve=Oe.ShadowRoot&&(Oe.ShadyCSS===void 0||Oe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,it=Symbol(),Ft=new WeakMap,re=class{constructor(e,r,s){if(this._$cssResult$=!0,s!==it)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(Ve&&e===void 0){let s=r!==void 0&&r.length===1;s&&(e=Ft.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Ft.set(r,e))}return e}toString(){return this.cssText}},Gt=t=>new re(typeof t=="string"?t:t+"",void 0,it),p=(t,...e)=>{let r=t.length===1?t[0]:e.reduce(((s,n,i)=>s+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[i+1]),t[0]);return new re(r,t,it)},Zt=(t,e)=>{if(Ve)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let s=document.createElement("style"),n=Oe.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=r.cssText,t.appendChild(s)}},ot=Ve?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let s of e.cssRules)r+=s.cssText;return Gt(r)})(t):t;var{is:Jr,defineProperty:Yr,getOwnPropertyDescriptor:Xr,getOwnPropertyNames:Qr,getOwnPropertySymbols:es,getPrototypeOf:ts}=Object,I=globalThis,Jt=I.trustedTypes,rs=Jt?Jt.emptyScript:"",ss=I.reactiveElementPolyfillSupport,se=(t,e)=>t,at={toAttribute(t,e){switch(e){case Boolean:t=t?rs:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},Xt=(t,e)=>!Jr(t,e),Yt={attribute:!0,type:String,converter:at,reflect:!1,useDefault:!1,hasChanged:Xt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),I.litPropertyMetadata??(I.litPropertyMetadata=new WeakMap);var T=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=Yt){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){let s=Symbol(),n=this.getPropertyDescriptor(e,s,r);n!==void 0&&Yr(this.prototype,e,n)}}static getPropertyDescriptor(e,r,s){let{get:n,set:i}=Xr(this.prototype,e)??{get(){return this[r]},set(a){this[r]=a}};return{get:n,set(a){let f=n?.call(this);i?.call(this,a),this.requestUpdate(e,f,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Yt}static _$Ei(){if(this.hasOwnProperty(se("elementProperties")))return;let e=ts(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(se("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(se("properties"))){let r=this.properties,s=[...Qr(r),...es(r)];for(let n of s)this.createProperty(n,r[n])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[s,n]of r)this.elementProperties.set(s,n)}this._$Eh=new Map;for(let[r,s]of this.elementProperties){let n=this._$Eu(r,s);n!==void 0&&this._$Eh.set(n,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let s=new Set(e.flat(1/0).reverse());for(let n of s)r.unshift(ot(n))}else e!==void 0&&r.push(ot(e));return r}static _$Eu(e,r){let s=r.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let s of r.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Zt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,r,s){this._$AK(e,s)}_$ET(e,r){let s=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,s);if(n!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:at).toAttribute(r,s.type);this._$Em=e,i==null?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,r){let s=this.constructor,n=s._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let i=s.getPropertyOptions(n),a=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:at;this._$Em=n;let f=a.fromAttribute(r,i.type);this[n]=f??this._$Ej?.get(n)??f,this._$Em=null}}requestUpdate(e,r,s){if(e!==void 0){let n=this.constructor,i=this[e];if(s??(s=n.getPropertyOptions(e)),!((s.hasChanged??Xt)(i,r)||s.useDefault&&s.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,s))))return;this.C(e,r,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:s,reflect:n,wrapped:i},a){s&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,a??r??this[e]),i!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(r=void 0),this._$AL.set(e,r)),n===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,i]of this._$Ep)this[n]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[n,i]of s){let{wrapped:a}=i,f=this[n];a!==!0||this._$AL.has(n)||f===void 0||this.C(n,void 0,i,f)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(r)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach((r=>r.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach((r=>this._$ET(r,this[r])))),this._$EM()}updated(e){}firstUpdated(e){}};T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[se("elementProperties")]=new Map,T[se("finalized")]=new Map,ss?.({ReactiveElement:T}),(I.reactiveElementVersions??(I.reactiveElementVersions=[])).push("2.1.1");var ne=globalThis,h=class extends T{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;let e=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=e.firstChild),e}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=jt(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return L}};h._$litElement$=!0,h.finalized=!0,ne.litElementHydrateSupport?.({LitElement:h});var ns=ne.litElementPolyfillSupport;ns?.({LitElement:h});(ne.litElementVersions??(ne.litElementVersions=[])).push("4.2.1");var Pe=class extends h{static get properties(){return{key:{type:String,reflect:!0},defaultValue:{type:String,reflect:!0,attribute:"default-value"},fallback:{type:String,reflect:!0},_text:{type:String,state:!0}}}constructor(){super(),this.key="",this.defaultValue="",this.fallback="",this._text="",this._currentLanguage=S.value,this.boundHandlers={languageChanged:(()=>{console.log("Language changed event received in ds-text"),this._currentLanguage=S.value,this._updateLanguageAttribute(),this._loadText(),this.requestUpdate()})}}connectedCallback(){super.connectedCallback(),this._currentLanguage=S.value,this._updateLanguageAttribute(),this._loadText(),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundHandlers.languageChanged)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundHandlers.languageChanged)}updated(e){super.updated(e),(e.has("key")||e.has("defaultValue"))&&this._loadText()}_updateLanguageAttribute(){let r=(this._currentLanguage||S.value||"").toLowerCase().split(/[-_]/).filter(Boolean),s=r[0]||"";if(s==="ja"){this.setAttribute("data-language","ja");return}if(s==="zh"){let n=r.includes("hans")||r.includes("cn")||r.includes("sg"),i=r.includes("hant")||r.includes("tw")||r.includes("hk")||r.includes("mo");n?this.setAttribute("data-language","zh-hans"):i?this.setAttribute("data-language","zh-hant"):this.setAttribute("data-language","zh");return}this.removeAttribute("data-language")}_loadText(){if(!this.key){this._text=this.defaultValue||this.fallback||"",this._updateLanguageAttribute(),this.requestUpdate();return}try{let e=R(this.key);this._text=e||this.defaultValue||this.fallback||this.key}catch(e){console.error("Error loading text for key:",this.key,e),this._text=this.defaultValue||this.fallback||this.key}this._updateLanguageAttribute(),this.requestUpdate()}render(){return o`<span>${this._text||this.defaultValue||this.key}</span>`}};Pe.styles=p`
4
4
  :host {
5
5
  display: inline;
6
6
  font-family: var(--typeface-regular);
@@ -27,7 +27,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
27
27
  font-family: var(--typeface-regular-zh-hans);
28
28
  font-weight: 800;
29
29
  }
30
- `;customElements.define("ds-text",Oe);var ne=class extends h{constructor(){super(),this.variant="title",this.disabled=!1,this.bold=!1,this["no-background"]=!1,this.blank=!1,this.key="",this.fallback="",this.language="en-US",this.defaultText="",this.href="",this._loading=!1}connectedCallback(){super.connectedCallback()}render(){let e=this.key||this.defaultText||this.fallback;return a`
30
+ `;customElements.define("ds-text",Pe);var ie=class extends h{constructor(){super(),this.variant="title",this.disabled=!1,this.bold=!1,this["no-background"]=!1,this.blank=!1,this.key="",this.fallback="",this.language="en-US",this.defaultText="",this.href="",this._loading=!1}connectedCallback(){super.connectedCallback()}render(){let e=this.key||this.defaultText||this.fallback;return o`
31
31
  <button
32
32
  class=${this.variant}
33
33
  ?disabled=${this.disabled}
@@ -35,13 +35,13 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
35
35
  ?no-background=${this["no-background"]}
36
36
  @click=${this._handleClick}
37
37
  >
38
- ${e?a`<ds-text
38
+ ${e?o`<ds-text
39
39
  .key=${this.key}
40
40
  .defaultValue=${this.defaultText}
41
41
  .fallback=${this.fallback}
42
- ></ds-text>`:a`<slot></slot>`}
42
+ ></ds-text>`:o`<slot></slot>`}
43
43
  </button>
44
- `}_handleClick(e){if(this.disabled){e.preventDefault(),e.stopPropagation();return}if(this.href){e.preventDefault(),e.stopPropagation(),this.blank?window.open(this.href,"_blank","noopener,noreferrer"):window.location.href=this.href;return}}};ne.properties={variant:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},bold:{type:Boolean,reflect:!0},"no-background":{type:Boolean,reflect:!0,attribute:"no-background"},blank:{type:Boolean,reflect:!0},key:{type:String},fallback:{type:String},language:{type:String},defaultText:{type:String,attribute:"default-text"},href:{type:String},_loading:{type:Boolean,state:!0}};ne.styles=p`
44
+ `}_handleClick(e){if(this.disabled){e.preventDefault(),e.stopPropagation();return}if(this.href){e.preventDefault(),e.stopPropagation(),this.blank?window.open(this.href,"_blank","noopener,noreferrer"):window.location.href=this.href;return}}};ie.properties={variant:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},bold:{type:Boolean,reflect:!0},"no-background":{type:Boolean,reflect:!0,attribute:"no-background"},blank:{type:Boolean,reflect:!0},key:{type:String},fallback:{type:String},language:{type:String},defaultText:{type:String,attribute:"default-text"},href:{type:String},_loading:{type:Boolean,state:!0}};ie.styles=p`
45
45
  button {
46
46
  max-height: calc(var(--08) * var(--sf));
47
47
  display: inline-flex;
@@ -106,7 +106,96 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
106
106
  .loading {
107
107
  opacity: 0.7;
108
108
  }
109
- `;customElements.define("ds-button",ne);var ie=class extends W{constructor(e){if(super(e),this.it=w,e.type!==xe.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===w||e==null)return this._t=void 0,this.it=e;if(e===T)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};ie.directiveName="unsafeHTML",ie.resultType=1;var Xt=K(ie);var q=class t extends h{get type(){return this._type}set type(e){let r=this._type;this._type=e,this.requestUpdate("type",r)}constructor(){super(),this._type="",this.size="1em",this.color="currentColor",this.background="transparent",console.log("Icon constructor",this._type)}connectedCallback(){super.connectedCallback(),console.log("Icon connected",this._type)}renderIcon(){if(console.log("renderIcon called with type:",this._type),!this._type||this._type==="")return console.log("No type specified, rendering default slot"),a`<div class="icon-container"><slot></slot></div>`;let e=t.iconNameToSvgMap[this._type.toLowerCase()];if(e)return a`<div class="icon-container">${Xt(e)}</div>`;switch(this._type.toLowerCase()){case"close":return console.log("Rendering close icon"),a`
109
+ `;customElements.define("ds-button",ie);var oe=class extends h{constructor(){super(...arguments),this.textKey="",this.actionKey="",this.href="",this.mailto="",this.subjectKey="",this.describeKey="",this.appVersionKey="",this.variant="warning",this.version="",this._showVersion=!1,this._boundUpdate=()=>this.requestUpdate()}connectedCallback(){super.connectedCallback(),window.addEventListener("translations-loaded",this._boundUpdate),window.addEventListener("language-changed",this._boundUpdate)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("translations-loaded",this._boundUpdate),window.removeEventListener("language-changed",this._boundUpdate)}_toggleVersion(){this.version&&(this._showVersion=!this._showVersion)}_getMailtoHref(){if(this.href&&this.href!=="#")return this.href;if(this.mailto)try{let e=this.subjectKey?R(this.subjectKey)||this.subjectKey:"Issue report",r=this.describeKey?R(this.describeKey)||this.describeKey:"Describe the issue:",s=this.appVersionKey?R(this.appVersionKey)||this.appVersionKey:"App version:",n=`${r}
110
+
111
+
112
+ ${s} ${this.version||""}`;return`mailto:${this.mailto}?subject=${encodeURIComponent(e)}&body=${encodeURIComponent(n)}`}catch{return`mailto:${this.mailto}?subject=Issue%20report&body=Describe%20the%20issue%3A%0A%0A%0AApp%20version%3A%20${this.version||""}`}return"#"}render(){let e=this._getMailtoHref();return o`
113
+ <div class="text-wrapper" @click=${this._toggleVersion}>
114
+ ${this._showVersion&&this.version?o`<ds-text default-value=${this.version}></ds-text>`:o`<ds-text key=${this.textKey}><slot></slot></ds-text>`}
115
+ </div>
116
+ ${this.actionKey?o`
117
+ <div class="action-wrapper">
118
+ <a href=${e}>
119
+ <ds-text key=${this.actionKey}></ds-text>
120
+ </a>
121
+ </div>
122
+ `:""}
123
+ `}};oe.properties={textKey:{type:String,attribute:"text-key"},actionKey:{type:String,attribute:"action-key"},href:{type:String},mailto:{type:String},subjectKey:{type:String,attribute:"subject-key"},describeKey:{type:String,attribute:"describe-key"},appVersionKey:{type:String,attribute:"app-version-key"},variant:{type:String},version:{type:String},_showVersion:{type:Boolean,state:!0}};oe.styles=p`
124
+ :host {
125
+ display: flex;
126
+ position: absolute;
127
+ top: 0;
128
+ left: 0;
129
+ right: 0;
130
+ width: 100%;
131
+ height: calc(var(--unit) * var(--sf, 1));
132
+ align-items: center;
133
+ justify-content: space-between;
134
+ padding: 0 calc(var(--unit) * var(--sf, 1));
135
+ box-sizing: border-box;
136
+ z-index: 9999;
137
+ }
138
+
139
+ :host([variant="warning"]) {
140
+ background-color: color-mix(in srgb, var(--yellow) 50%, transparent);
141
+ --banner-text-color: color-mix(in srgb, var(--black) 50%, transparent);
142
+ --banner-action-color: var(--slate);
143
+ }
144
+
145
+ :host([variant="info"]) {
146
+ background-color: rgba(var(--sharp-blue-rgb, 0, 122, 255), 0.7);
147
+ --banner-text-color: var(--white, #fff);
148
+ --banner-action-color: var(--white, #fff);
149
+ }
150
+
151
+ :host([variant="success"]) {
152
+ background-color: rgba(var(--apple-green-rgb, 52, 199, 89), 0.7);
153
+ --banner-text-color: var(--white, #fff);
154
+ --banner-action-color: var(--white, #fff);
155
+ }
156
+
157
+ :host([variant="error"]) {
158
+ background-color: rgba(var(--tuned-red-rgb, 255, 59, 48), 0.7);
159
+ --banner-text-color: var(--white, #fff);
160
+ --banner-action-color: var(--slate, #1e1e1e);
161
+ }
162
+
163
+ .text-wrapper {
164
+ flex: 1;
165
+ cursor: pointer;
166
+ user-select: none;
167
+ }
168
+
169
+ .text-wrapper ds-text,
170
+ .text-wrapper .version {
171
+ color: var(--banner-text-color);
172
+ }
173
+
174
+ .action-wrapper {
175
+ font-size: calc(12px * var(--sf, 1));
176
+ }
177
+
178
+ .action-wrapper a {
179
+ color: var(--banner-action-color);
180
+ text-decoration: none;
181
+ font-family: var(--typeface-regular);
182
+ font-size: calc(12px * var(--sf, 1));
183
+ cursor: pointer;
184
+ pointer-events: auto;
185
+ display: inline-block;
186
+ }
187
+
188
+ .action-wrapper a:hover {
189
+ opacity: 0.8;
190
+ }
191
+
192
+ .action-wrapper ds-text {
193
+ color: var(--banner-action-color);
194
+ font-family: var(--typeface-regular);
195
+ font-size: calc(12px * var(--sf, 1));
196
+ pointer-events: none;
197
+ }
198
+ `;customElements.define("ds-banner",oe);var ae=class extends W{constructor(e){if(super(e),this.it=w,e.type!==$e.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===w||e==null)return this._t=void 0,this.it=e;if(e===L)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};ae.directiveName="unsafeHTML",ae.resultType=1;var Qt=Z(ae);var K=class t extends h{get type(){return this._type}set type(e){let r=this._type;this._type=e,this.requestUpdate("type",r)}constructor(){super(),this._type="",this.size="1em",this.color="currentColor",this.background="transparent",console.log("Icon constructor",this._type)}connectedCallback(){super.connectedCallback(),console.log("Icon connected",this._type)}renderIcon(){if(console.log("renderIcon called with type:",this._type),!this._type||this._type==="")return console.log("No type specified, rendering default slot"),o`<div class="icon-container"><slot></slot></div>`;let e=t.iconNameToSvgMap[this._type.toLowerCase()];if(e)return o`<div class="icon-container">${Qt(e)}</div>`;switch(this._type.toLowerCase()){case"close":return console.log("Rendering close icon"),o`
110
199
  <div class="icon-container">
111
200
  <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
112
201
  <path
@@ -114,7 +203,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
114
203
  />
115
204
  </svg>
116
205
  </div>
117
- `;case"page":return console.log("Rendering page icon"),a`
206
+ `;case"page":return console.log("Rendering page icon"),o`
118
207
  <div class="icon-container">
119
208
  <svg viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg">
120
209
  <rect
@@ -129,7 +218,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
129
218
  />
130
219
  </svg>
131
220
  </div>
132
- `;case"note":return console.log("Rendering note icon"),a`
221
+ `;case"note":return console.log("Rendering note icon"),o`
133
222
  <div class="icon-container">
134
223
  <svg viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg">
135
224
  <rect
@@ -148,7 +237,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
148
237
  />
149
238
  </svg>
150
239
  </div>
151
- `;case"default":return console.log("Rendering default icon"),a`
240
+ `;case"default":return console.log("Rendering default icon"),o`
152
241
  <div class="icon-container">
153
242
  <svg
154
243
  width="17"
@@ -175,7 +264,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
175
264
  />
176
265
  </svg>
177
266
  </div>
178
- `;case"big":return console.log("Rendering big icon"),a`
267
+ `;case"big":return console.log("Rendering big icon"),o`
179
268
  <div class="icon-container">
180
269
  <svg
181
270
  width="17"
@@ -214,7 +303,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
214
303
  </defs>
215
304
  </svg>
216
305
  </div>
217
- `;case"gallery":return console.log("Rendering gallery icon"),a`
306
+ `;case"gallery":return console.log("Rendering gallery icon"),o`
218
307
  <div class="icon-container">
219
308
  <svg
220
309
  width="17"
@@ -249,7 +338,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
249
338
  </defs>
250
339
  </svg>
251
340
  </div>
252
- `;case"check":return console.log("Rendering check icon"),a`
341
+ `;case"check":return console.log("Rendering check icon"),o`
253
342
  <div class="icon-container">
254
343
  <svg
255
344
  viewBox="0 0 17 17"
@@ -268,7 +357,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
268
357
  />
269
358
  </svg>
270
359
  </div>
271
- `;default:return console.log(`Unknown icon type: ${this._type}, rendering default slot`),a`<div class="icon-container"><slot></slot></div>`}}updated(e){console.log("Icon updated",e),this.style.setProperty("--icon-size",this.size),this.style.setProperty("--icon-color",this.color),this.style.setProperty("--icon-background",this.background)}render(){return console.log("Icon render",this._type),this.renderIcon()}};q.properties={type:{type:String,reflect:!0}};q.styles=p`
360
+ `;default:return console.log(`Unknown icon type: ${this._type}, rendering default slot`),o`<div class="icon-container"><slot></slot></div>`}}updated(e){console.log("Icon updated",e),this.style.setProperty("--icon-size",this.size),this.style.setProperty("--icon-color",this.color),this.style.setProperty("--icon-background",this.background)}render(){return console.log("Icon render",this._type),this.renderIcon()}};K.properties={type:{type:String,reflect:!0}};K.styles=p`
272
361
  :host {
273
362
  display: inline-flex;
274
363
  justify-content: center;
@@ -299,40 +388,40 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
299
388
  :host {
300
389
  --notes-style-color: #ffb6b9;
301
390
  }
302
- `;q.iconNameToSvgMap=(()=>{try{let t=import.meta.glob("../x Icon/*.svg",{as:"raw",eager:!0}),e={};for(let[r,s]of Object.entries(t)){let i=(r.split("/").pop()??"").replace(/\.svg$/i,"").toLowerCase();i&&(e[i]=s)}return e}catch(t){return console.warn("Icon: failed to glob SVGs from x Icon/; falling back only to inline switch icons.",t),{}}})();customElements.define("ds-icon",q);console.log("Icon component registered with custom elements registry");var ns=t=>{localStorage.setItem("accentColor",t)},at=()=>localStorage.getItem("accentColor")||"--sharp-blue",ot=()=>{let t=at();document.documentElement.style.setProperty("--accent-color",`var(${t})`)},is=t=>{localStorage.setItem("notesStyleMedium",t)},Qt=()=>localStorage.getItem("notesStyleMedium")||"note",er=t=>{localStorage.setItem("pageStyle",t)},oe=()=>localStorage.getItem("pageStyle")||"note",Pe=class extends h{static get properties(){return{type:{type:String},values:{type:Array},currentValue:{type:String,state:!0},translationsReady:{type:Boolean,state:!0},disabled:{type:Boolean,state:!0},variant:{type:String}}}constructor(){super(),this.type="",this.values=[],this.currentValue="",this.translationsReady=!1,this.disabled=!1,this.variant="",this.boundHandlers={translationsLoaded:this.handleTranslationsLoaded.bind(this),languageChanged:this.handleLanguageChanged.bind(this),handleLanguageChanged:this.handleLanguageChanged.bind(this),handleThemeChanged:this.handleThemeChanged.bind(this),handleAccentColorChanged:this.handleAccentColorChanged.bind(this),handleNoteBehaviorChanged:this.handleNoteBehaviorChanged.bind(this)}}connectedCallback(){super.connectedCallback(),window.addEventListener("translations-loaded",this.boundHandlers.translationsLoaded),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("theme-changed",this.boundHandlers.handleThemeChanged),window.addEventListener("accent-color-changed",this.boundHandlers.handleAccentColorChanged),window.addEventListener("page-style-changed",this.boundHandlers.handleNoteBehaviorChanged),this.initializeValues()}async initializeValues(){if(this.type==="language"){let e=Re();this.values=e,this.currentValue=S.value}else if(this.type==="theme"){this.values=["light","dark"];let e=B.get();this.currentValue=e}else if(this.type==="accent-color"){this.values=["--apple-green","--every-green","--zenith-blue","--sharp-blue","--pink","--tuned-red","--orange","--yellow"];let e=at();this.currentValue=e,ot()}else if(this.type==="notes-style-medium"){this.values=["default","big","gallery"];let e=Qt();this.currentValue=e;let r=oe();this.disabled=r==="note"}else if(this.type==="page-style"){this.values=["note","page"];let e=oe();this.currentValue=e}else this.type==="icon-only"&&(this.values=["note","page"],this.currentValue=this.values[0]);this.requestUpdate()}ensureThemeInitialized(){if(!localStorage.getItem("theme")){let s=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";localStorage.setItem("theme",s),document.documentElement.classList.add(`${s}-theme`)}}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e==="type"&&r!==s&&this.initializeValues()}async setupInitialValue(){if(this.type==="language"){let e=S.value;this.currentValue=e}else if(this.type==="theme"){let e=B.get();this.currentValue=e}else if(this.type==="accent-color"){let e=at();this.currentValue=e,ot()}else if(this.type==="notes-style-medium"){let e=Qt();this.currentValue=e;let r=oe();this.disabled=r==="note"}else if(this.type==="page-style"){let e=oe();this.currentValue=e}else if(this.type==="icon-only"){let e=oe();this.currentValue=e}this.requestUpdate()}handleSettingsChanges(){this.setupInitialValue()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("translations-loaded",this.boundHandlers.translationsLoaded),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("theme-changed",this.boundHandlers.handleThemeChanged),window.removeEventListener("accent-color-changed",this.boundHandlers.handleAccentColorChanged),window.removeEventListener("page-style-changed",this.boundHandlers.handleNoteBehaviorChanged)}handleButtonClick(e){if(e.preventDefault(),e.stopPropagation(),!this.disabled){if(this.type==="language"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,document.startViewTransition?document.startViewTransition(()=>{Ue(n)}):Ue(n),P({language:n}),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:n}}))}else if(this.type==="theme"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,qt(n),P({theme:n})}else if(this.type==="accent-color"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,ns(n),ot(),P({accentColor:n}),window.dispatchEvent(new CustomEvent("accent-color-changed",{detail:{color:n}}))}else if(this.type==="notes-style-medium"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,is(n),P({notesStyleMedium:n}),window.dispatchEvent(new CustomEvent("notes-style-medium-changed",{detail:{style:n}}))}else if(this.type==="page-style"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,er(n),P({pageStyle:n}),window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:n}}))}else if(this.type==="icon-only"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,er(n),P({pageStyle:n}),window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:n}}))}this.requestUpdate()}}getValueDisplay(e){if(this.type==="language")return xt(e,{locale:S.value});if(this.type==="theme"){if(this.translationsReady){let r=O(e);if(r&&r!==e)return r}return e}else{if(this.type==="accent-color")return this.getColorName(e);if(this.type==="notes-style-medium")return this.getNotesStyleIcon(e);if(this.type==="page-style"){if(this.translationsReady){let r=O(e==="note"?"note":"page");if(r&&r!==(e==="note"?"note":"page"))return r}return e}else if(this.type==="icon-only")return e==="note"?a`<ds-icon type="note"></ds-icon>`:e==="page"?a`<ds-icon type="page"></ds-icon>`:a`<span>${e}</span>`}return e}getColorKey(e){return{"--tuned-red":"red","--orange":"orange","--yellow":"yellow","--apple-green":"appleGreen","--every-green":"green","--zenith-blue":"lightBlue","--sharp-blue":"blue","--pink":"pink"}[e]||e.replace("--","").replace("-"," ")}getColorName(e){let s={"--tuned-red":"red","--orange":"orange","--yellow":"yellow","--apple-green":"appleGreen","--every-green":"green","--zenith-blue":"lightBlue","--sharp-blue":"blue","--pink":"pink"}[e];if(s&&this.translationsReady){let n=O(s);if(n&&n!==s)return n}return e.replace("--","").replace("-"," ")}getNotesStyleIcon(e){return e==="page"?a`<ds-icon type="page"></ds-icon>`:e==="note"?a`<ds-icon type="note"></ds-icon>`:e==="default"?a`<ds-icon type="default"></ds-icon>`:e==="big"?a`<ds-icon type="big"></ds-icon>`:e==="gallery"?a`<ds-icon type="gallery"></ds-icon>`:a`<span>${e}</span>`}render(){return a`
391
+ `;K.iconNameToSvgMap=(()=>{try{let t=import.meta.glob("../x Icon/*.svg",{as:"raw",eager:!0}),e={};for(let[r,s]of Object.entries(t)){let i=(r.split("/").pop()??"").replace(/\.svg$/i,"").toLowerCase();i&&(e[i]=s)}return e}catch(t){return console.warn("Icon: failed to glob SVGs from x Icon/; falling back only to inline switch icons.",t),{}}})();customElements.define("ds-icon",K);console.log("Icon component registered with custom elements registry");var is=t=>{localStorage.setItem("accentColor",t)},ct=()=>localStorage.getItem("accentColor")||"--sharp-blue",lt=()=>{let t=ct();document.documentElement.style.setProperty("--accent-color",`var(${t})`)},os=t=>{localStorage.setItem("notesStyleMedium",t)},er=()=>localStorage.getItem("notesStyleMedium")||"note",tr=t=>{localStorage.setItem("pageStyle",t)},le=()=>localStorage.getItem("pageStyle")||"note",He=class extends h{static get properties(){return{type:{type:String},values:{type:Array},currentValue:{type:String,state:!0},translationsReady:{type:Boolean,state:!0},disabled:{type:Boolean,state:!0},variant:{type:String}}}constructor(){super(),this.type="",this.values=[],this.currentValue="",this.translationsReady=!1,this.disabled=!1,this.variant="",this.boundHandlers={translationsLoaded:this.handleTranslationsLoaded.bind(this),languageChanged:this.handleLanguageChanged.bind(this),handleLanguageChanged:this.handleLanguageChanged.bind(this),handleThemeChanged:this.handleThemeChanged.bind(this),handleAccentColorChanged:this.handleAccentColorChanged.bind(this),handleNoteBehaviorChanged:this.handleNoteBehaviorChanged.bind(this)}}connectedCallback(){super.connectedCallback(),window.addEventListener("translations-loaded",this.boundHandlers.translationsLoaded),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("theme-changed",this.boundHandlers.handleThemeChanged),window.addEventListener("accent-color-changed",this.boundHandlers.handleAccentColorChanged),window.addEventListener("page-style-changed",this.boundHandlers.handleNoteBehaviorChanged),this.initializeValues()}async initializeValues(){if(this.type==="language"){let e=je();this.values=e,this.currentValue=S.value}else if(this.type==="theme"){this.values=["light","dark"];let e=q.get();this.currentValue=e}else if(this.type==="accent-color"){this.values=["--apple-green","--every-green","--zenith-blue","--sharp-blue","--pink","--tuned-red","--orange","--yellow"];let e=ct();this.currentValue=e,lt()}else if(this.type==="notes-style-medium"){this.values=["default","big","gallery"];let e=er();this.currentValue=e;let r=le();this.disabled=r==="note"}else if(this.type==="page-style"){this.values=["note","page"];let e=le();this.currentValue=e}else this.type==="icon-only"&&(this.values=["note","page"],this.currentValue=this.values[0]);this.requestUpdate()}ensureThemeInitialized(){if(!localStorage.getItem("theme")){let s=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";localStorage.setItem("theme",s),document.documentElement.classList.add(`${s}-theme`)}}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e==="type"&&r!==s&&this.initializeValues()}async setupInitialValue(){if(this.type==="language"){let e=S.value;this.currentValue=e}else if(this.type==="theme"){let e=q.get();this.currentValue=e}else if(this.type==="accent-color"){let e=ct();this.currentValue=e,lt()}else if(this.type==="notes-style-medium"){let e=er();this.currentValue=e;let r=le();this.disabled=r==="note"}else if(this.type==="page-style"){let e=le();this.currentValue=e}else if(this.type==="icon-only"){let e=le();this.currentValue=e}this.requestUpdate()}handleSettingsChanges(){this.setupInitialValue()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("translations-loaded",this.boundHandlers.translationsLoaded),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("theme-changed",this.boundHandlers.handleThemeChanged),window.removeEventListener("accent-color-changed",this.boundHandlers.handleAccentColorChanged),window.removeEventListener("page-style-changed",this.boundHandlers.handleNoteBehaviorChanged)}handleButtonClick(e){if(e.preventDefault(),e.stopPropagation(),!this.disabled){if(this.type==="language"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,document.startViewTransition?document.startViewTransition(()=>{We(n)}):We(n),V({language:n}),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:n}}))}else if(this.type==="theme"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,Kt(n),V({theme:n})}else if(this.type==="accent-color"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,is(n),lt(),V({accentColor:n}),window.dispatchEvent(new CustomEvent("accent-color-changed",{detail:{color:n}}))}else if(this.type==="notes-style-medium"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,os(n),V({notesStyleMedium:n}),window.dispatchEvent(new CustomEvent("notes-style-medium-changed",{detail:{style:n}}))}else if(this.type==="page-style"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,tr(n),V({pageStyle:n}),window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:n}}))}else if(this.type==="icon-only"){let s=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[s];this.currentValue=n,tr(n),V({pageStyle:n}),window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:n}}))}this.requestUpdate()}}getValueDisplay(e){if(this.type==="language")return $t(e,{locale:S.value});if(this.type==="theme"){if(this.translationsReady){let r=O(e);if(r&&r!==e)return r}return e}else{if(this.type==="accent-color")return this.getColorName(e);if(this.type==="notes-style-medium")return this.getNotesStyleIcon(e);if(this.type==="page-style"){if(this.translationsReady){let r=O(e==="note"?"note":"page");if(r&&r!==(e==="note"?"note":"page"))return r}return e}else if(this.type==="icon-only")return e==="note"?o`<ds-icon type="note"></ds-icon>`:e==="page"?o`<ds-icon type="page"></ds-icon>`:o`<span>${e}</span>`}return e}getColorKey(e){return{"--tuned-red":"red","--orange":"orange","--yellow":"yellow","--apple-green":"appleGreen","--every-green":"green","--zenith-blue":"lightBlue","--sharp-blue":"blue","--pink":"pink"}[e]||e.replace("--","").replace("-"," ")}getColorName(e){let s={"--tuned-red":"red","--orange":"orange","--yellow":"yellow","--apple-green":"appleGreen","--every-green":"green","--zenith-blue":"lightBlue","--sharp-blue":"blue","--pink":"pink"}[e];if(s&&this.translationsReady){let n=O(s);if(n&&n!==s)return n}return e.replace("--","").replace("-"," ")}getNotesStyleIcon(e){return e==="page"?o`<ds-icon type="page"></ds-icon>`:e==="note"?o`<ds-icon type="note"></ds-icon>`:e==="default"?o`<ds-icon type="default"></ds-icon>`:e==="big"?o`<ds-icon type="big"></ds-icon>`:e==="gallery"?o`<ds-icon type="gallery"></ds-icon>`:o`<span>${e}</span>`}render(){return o`
303
392
  <div class="cycle">
304
393
  <ds-button
305
394
  variant=${this.variant||(this.type==="language"||this.type==="theme"?"secondary":"primary")}
306
395
  ?disabled=${this.disabled}
307
396
  @click=${this.handleButtonClick}
308
397
  >
309
- ${this.type==="notes-style-medium"||this.type==="icon-only"?a`<span
398
+ ${this.type==="notes-style-medium"||this.type==="icon-only"?o`<span
310
399
  style="display: inline-flex; align-items: center; gap: var(--025)"
311
400
  >${this.getValueDisplay(this.currentValue)}</span
312
- >`:this.type==="language"?a`<ds-text
401
+ >`:this.type==="language"?o`<ds-text
313
402
  default-value=${this.getValueDisplay(this.currentValue)}
314
- ></ds-text>`:this.type==="theme"?a`<ds-text
403
+ ></ds-text>`:this.type==="theme"?o`<ds-text
315
404
  key=${this.currentValue}
316
405
  default-value=${this.currentValue}
317
- ></ds-text>`:this.type==="accent-color"?a`<ds-text
406
+ ></ds-text>`:this.type==="accent-color"?o`<ds-text
318
407
  key=${this.getColorKey(this.currentValue)}
319
408
  default-value=${this.getColorName(this.currentValue)}
320
- ></ds-text>`:this.type==="page-style"?a`<ds-text
409
+ ></ds-text>`:this.type==="page-style"?o`<ds-text
321
410
  key=${this.currentValue}
322
411
  default-value=${this.currentValue}
323
- ></ds-text>`:a`<ds-text
412
+ ></ds-text>`:o`<ds-text
324
413
  default-value=${this.getValueDisplay(this.currentValue)}
325
414
  ></ds-text>`}
326
415
  </ds-button>
327
416
 
328
- ${this.type==="accent-color"?a`
417
+ ${this.type==="accent-color"?o`
329
418
  <div
330
419
  class="color-preview"
331
420
  style="background-color: var(${this.currentValue})"
332
421
  ></div>
333
422
  `:""}
334
423
  </div>
335
- `}async waitForTranslations(){return new Promise(e=>{if(this.translationsReady){e();return}let r=()=>{this.translationsReady=!0,e()};window.addEventListener("translations-loaded",r,{once:!0}),setTimeout(()=>{this.translationsReady=!0,e()},5e3)})}handleTranslationsLoaded(){if(this.translationsReady=!0,this.type==="language"){let e=Re();this.values=e}this.setupInitialValue()}handleLanguageChanged(){this.setupInitialValue()}handleThemeChanged(){this.setupInitialValue()}handleAccentColorChanged(){this.setupInitialValue()}handleNoteBehaviorChanged(){this.setupInitialValue()}};Pe.styles=p`
424
+ `}async waitForTranslations(){return new Promise(e=>{if(this.translationsReady){e();return}let r=()=>{this.translationsReady=!0,e()};window.addEventListener("translations-loaded",r,{once:!0}),setTimeout(()=>{this.translationsReady=!0,e()},5e3)})}handleTranslationsLoaded(){if(this.translationsReady=!0,this.type==="language"){let e=je();this.values=e}this.setupInitialValue()}handleLanguageChanged(){this.setupInitialValue()}handleThemeChanged(){this.setupInitialValue()}handleAccentColorChanged(){this.setupInitialValue()}handleNoteBehaviorChanged(){this.setupInitialValue()}};He.styles=p`
336
425
  :host {
337
426
  display: inline-flex;
338
427
  align-items: center;
@@ -352,7 +441,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
352
441
  color-mix(in srgb, var(--text-color-primary) 20%, transparent);
353
442
  flex: 0 0 auto;
354
443
  }
355
- `;customElements.define("ds-cycle",Pe);var ae=class extends h{constructor(){super(),this.size=""}render(){return a``}};ae.properties={size:{type:String,reflect:!0}};ae.styles=p`
444
+ `;customElements.define("ds-cycle",He);var ce=class extends h{constructor(){super(),this.size=""}render(){return o``}};ce.properties={size:{type:String,reflect:!0}};ce.styles=p`
356
445
  :host {
357
446
  display: block;
358
447
  width: 100%;
@@ -425,10 +514,10 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
425
514
  :host([size="12"]) {
426
515
  --gap-size: var(--12);
427
516
  }
428
- `;customElements.define("ds-gap",ae);var le=class extends h{constructor(){super(),this.key="",this.defaultValue="",this._text="",this._visible=!1,this.boundWindowHandlers={languageChanged:(()=>{this._loadText()}),translationsLoaded:(()=>{this._loadText()})},this.boundHostHandlers={mouseenter:(()=>{this._visible=!0,this.requestUpdate()}),mouseleave:(()=>{this._visible=!1,this.requestUpdate()}),focusin:(()=>{this._visible=!0,this.requestUpdate()}),focusout:(()=>{this._visible=!1,this.requestUpdate()})}}connectedCallback(){super.connectedCallback(),this._loadText(),window.addEventListener("language-changed",this.boundWindowHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundWindowHandlers.translationsLoaded),this.addEventListener("mouseenter",this.boundHostHandlers.mouseenter),this.addEventListener("mouseleave",this.boundHostHandlers.mouseleave),this.addEventListener("focusin",this.boundHostHandlers.focusin),this.addEventListener("focusout",this.boundHostHandlers.focusout)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundWindowHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundWindowHandlers.translationsLoaded),this.removeEventListener("mouseenter",this.boundHostHandlers.mouseenter),this.removeEventListener("mouseleave",this.boundHostHandlers.mouseleave),this.removeEventListener("focusin",this.boundHostHandlers.focusin),this.removeEventListener("focusout",this.boundHostHandlers.focusout)}updated(e){(e.has("key")||e.has("defaultValue"))&&this._loadText()}_loadText(){if(!this.key){this._text=this.defaultValue||"",this.requestUpdate();return}try{let e=O(this.key);this._text=e&&e!==this.key?e:this.defaultValue||this.key}catch(e){console.error("ds-tooltip: error loading text for key",this.key,e),this._text=this.defaultValue||this.key}this.requestUpdate()}render(){let e=["bubble",this._visible?"visible":""].join(" ");return a`
517
+ `;customElements.define("ds-gap",ce);var de=class extends h{constructor(){super(),this.key="",this.defaultValue="",this._text="",this._visible=!1,this.boundWindowHandlers={languageChanged:(()=>{this._loadText()}),translationsLoaded:(()=>{this._loadText()})},this.boundHostHandlers={mouseenter:(()=>{this._visible=!0,this.requestUpdate()}),mouseleave:(()=>{this._visible=!1,this.requestUpdate()}),focusin:(()=>{this._visible=!0,this.requestUpdate()}),focusout:(()=>{this._visible=!1,this.requestUpdate()})}}connectedCallback(){super.connectedCallback(),this._loadText(),window.addEventListener("language-changed",this.boundWindowHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundWindowHandlers.translationsLoaded),this.addEventListener("mouseenter",this.boundHostHandlers.mouseenter),this.addEventListener("mouseleave",this.boundHostHandlers.mouseleave),this.addEventListener("focusin",this.boundHostHandlers.focusin),this.addEventListener("focusout",this.boundHostHandlers.focusout)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundWindowHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundWindowHandlers.translationsLoaded),this.removeEventListener("mouseenter",this.boundHostHandlers.mouseenter),this.removeEventListener("mouseleave",this.boundHostHandlers.mouseleave),this.removeEventListener("focusin",this.boundHostHandlers.focusin),this.removeEventListener("focusout",this.boundHostHandlers.focusout)}updated(e){(e.has("key")||e.has("defaultValue"))&&this._loadText()}_loadText(){if(!this.key){this._text=this.defaultValue||"",this.requestUpdate();return}try{let e=O(this.key);this._text=e&&e!==this.key?e:this.defaultValue||this.key}catch(e){console.error("ds-tooltip: error loading text for key",this.key,e),this._text=this.defaultValue||this.key}this.requestUpdate()}render(){let e=["bubble",this._visible?"visible":""].join(" ");return o`
429
518
  <span class="slot-wrapper"><slot></slot></span>
430
- ${this._text?a`<div class="${e}">${this._text}</div>`:null}
431
- `}};le.properties={key:{type:String,reflect:!0},defaultValue:{type:String,reflect:!0,attribute:"default-value"},_text:{state:!0},_visible:{state:!0}};le.styles=p`
519
+ ${this._text?o`<div class="${e}">${this._text}</div>`:null}
520
+ `}};de.properties={key:{type:String,reflect:!0},defaultValue:{type:String,reflect:!0,attribute:"default-value"},_text:{state:!0},_visible:{state:!0}};de.styles=p`
432
521
  :host {
433
522
  position: relative;
434
523
  display: inline-block;
@@ -475,21 +564,21 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
475
564
  .bubble.visible {
476
565
  opacity: 1;
477
566
  }
478
- `;customElements.define("ds-tooltip",le);var He=class extends h{render(){let e=new Date().getFullYear();return a`<span>${e}</span>`}};He.styles=p`
567
+ `;customElements.define("ds-tooltip",de);var ze=class extends h{render(){let e=new Date().getFullYear();return o`<span>${e}</span>`}};ze.styles=p`
479
568
  :host {
480
569
  display: inline;
481
570
  font-family: var(--typeface-regular, var(--typeface-regular-regular));
482
571
  font-size: inherit;
483
572
  color: inherit;
484
573
  }
485
- `;customElements.define("ds-date",He);var Ve=class extends h{render(){return a`<slot></slot>`}};Ve.styles=p`
574
+ `;customElements.define("ds-date",ze);var Me=class extends h{render(){return o`<slot></slot>`}};Me.styles=p`
486
575
  :host {
487
576
  display: flex;
488
577
  flex-direction: column;
489
578
  gap: 0;
490
579
  width: 100%;
491
580
  }
492
- `;customElements.define("ds-list",Ve);var ce=class extends h{constructor(){super(),this.type="fill"}render(){return a`<slot></slot>`}};ce.properties={type:{type:String,reflect:!0}};ce.styles=p`
581
+ `;customElements.define("ds-list",Me);var ue=class extends h{constructor(){super(),this.type="fill"}render(){return o`<slot></slot>`}};ue.properties={type:{type:String,reflect:!0}};ue.styles=p`
493
582
  :host {
494
583
  display: flex;
495
584
  align-items: end;
@@ -506,7 +595,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
506
595
  height: calc(var(--1) * var(--sf));
507
596
  gap: calc(var(--025) * var(--sf));
508
597
  }
509
- `;customElements.define("ds-row",ce);var de=class extends h{constructor(){super(),this.summaryKey="",this.detailsKey="",this.open=!1}render(){return a`
598
+ `;customElements.define("ds-row",ue);var he=class extends h{constructor(){super(),this.summaryKey="",this.detailsKey="",this.open=!1}render(){return o`
510
599
  <details ?open=${this.open}>
511
600
  <summary>
512
601
  <ds-row class="summaryRow" type="centered">
@@ -531,7 +620,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
531
620
  <ds-text class="detailsText" .key=${this.detailsKey}></ds-text>
532
621
  </div>
533
622
  </details>
534
- `}};de.properties={summaryKey:{type:String,attribute:"summary-key"},detailsKey:{type:String,attribute:"details-key"},open:{type:Boolean,reflect:!0}};de.styles=p`
623
+ `}};he.properties={summaryKey:{type:String,attribute:"summary-key"},detailsKey:{type:String,attribute:"details-key"},open:{type:Boolean,reflect:!0}};he.styles=p`
535
624
  :host {
536
625
  display: block;
537
626
  width: calc(240px * var(--sf));
@@ -575,26 +664,26 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
575
664
  white-space: normal;
576
665
  text-align: left;
577
666
  }
578
- `;customElements.define("ds-accordion",de);var ue=class extends h{constructor(){super(),this.data=[],this.columns=["Product","Users","Retention"],this.showStatus=!0}render(){return a`
667
+ `;customElements.define("ds-accordion",he);var pe=class extends h{constructor(){super(),this.data=[],this.columns=["Product","Users","Retention"],this.showStatus=!0}render(){return o`
579
668
  <div class="table-container">
580
669
  <div class="table-header">
581
670
  <div class="header-cell product-cell">Product</div>
582
671
  <div class="header-cell users-cell">Users</div>
583
672
  <div class="header-cell retention-cell">Retention</div>
584
- ${this.showStatus?a`<div class="header-cell">Status</div>`:""}
673
+ ${this.showStatus?o`<div class="header-cell">Status</div>`:""}
585
674
  </div>
586
675
  <div class="table-body">
587
- ${this.data.map((e,r)=>a`
676
+ ${this.data.map((e,r)=>o`
588
677
  <div class="data-cell product-cell">${e.product}</div>
589
678
  <div class="data-cell users-cell">${e.users}</div>
590
679
  <div class="data-cell retention-cell">${e.retention}</div>
591
- ${this.showStatus?a`<div class="data-cell status-cell">
680
+ ${this.showStatus?o`<div class="data-cell status-cell">
592
681
  ${e.status||"Pending"}
593
682
  </div>`:""}
594
683
  `)}
595
684
  </div>
596
685
  </div>
597
- `}};ue.properties={data:{type:Array},columns:{type:Array},showStatus:{type:Boolean,attribute:"show-status"}};ue.styles=p`
686
+ `}};pe.properties={data:{type:Array},columns:{type:Array},showStatus:{type:Boolean,attribute:"show-status"}};pe.styles=p`
598
687
  :host {
599
688
  display: block;
600
689
  width: 100%;
@@ -677,7 +766,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
677
766
  grid-template-columns: 1fr 60px 60px 60px;
678
767
  }
679
768
  }
680
- `;customElements.define("ds-table",ue);var ze=class extends h{render(){return a`<slot></slot>`}};ze.styles=p`
769
+ `;customElements.define("ds-table",pe);var De=class extends h{render(){return o`<slot></slot>`}};De.styles=p`
681
770
  :host {
682
771
  display: flex;
683
772
  width: 100%;
@@ -710,7 +799,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
710
799
  width: 100%;
711
800
  }
712
801
  }
713
- `;customElements.define("ds-container",ze);var he=class extends h{connectedCallback(){super.connectedCallback(),this.updateMobileClass(),this.resizeObserver=()=>{this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.updateMobileClass()},100)},window.addEventListener("resize",this.resizeObserver)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&window.removeEventListener("resize",this.resizeObserver),this.resizeTimeout&&clearTimeout(this.resizeTimeout)}updateMobileClass(){De()?(this.classList.add("mobile"),this.classList.remove("desktop")):(this.classList.add("desktop"),this.classList.remove("mobile"))}render(){return a``}};he.properties={align:{type:String}};he.styles=p`
802
+ `;customElements.define("ds-container",De);var fe=class extends h{connectedCallback(){super.connectedCallback(),this.updateMobileClass(),this.resizeObserver=()=>{this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.updateMobileClass()},100)},window.addEventListener("resize",this.resizeObserver)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&window.removeEventListener("resize",this.resizeObserver),this.resizeTimeout&&clearTimeout(this.resizeTimeout)}updateMobileClass(){Ue()?(this.classList.add("mobile"),this.classList.remove("desktop")):(this.classList.add("desktop"),this.classList.remove("mobile"))}render(){return o``}};fe.properties={align:{type:String}};fe.styles=p`
714
803
  :host {
715
804
  margin-top: 0.5px !important;
716
805
  margin-left: 0.5px !important;
@@ -764,11 +853,11 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
764
853
  right: 0;
765
854
  transform: none;
766
855
  }
767
- `;customElements.define("ds-grid",he);var pe=class extends h{constructor(){super(...arguments),this.mode="portfolio"}render(){let e=this.view||this.mode==="view",r=this.mode==="portfolio",s=this.mode==="company",n=this.mode==="app";return a`
856
+ `;customElements.define("ds-grid",fe);var ge=class extends h{constructor(){super(...arguments),this.mode="portfolio"}render(){let e=this.view||this.mode==="view",r=this.mode==="portfolio",s=this.mode==="company",n=this.mode==="app";return o`
768
857
  <slot></slot>
769
- ${e?a`
858
+ ${e?o`
770
859
  <div class="view-overlay">
771
- ${n?a`
860
+ ${n?o`
772
861
  <div class="view-area view-banner">
773
862
  <ds-text key="banner">banner</ds-text>
774
863
  </div>
@@ -782,7 +871,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
782
871
  <div class="view-area view-footer">
783
872
  <ds-text key="footer">footer</ds-text>
784
873
  </div>
785
- `:s?a`
874
+ `:s?o`
786
875
  <div class="view-area view-header">
787
876
  <ds-text key="header">header</ds-text>
788
877
  </div>
@@ -792,7 +881,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
792
881
  <div class="view-area view-footer">
793
882
  <ds-text key="footer">footer</ds-text>
794
883
  </div>
795
- `:r?a`
884
+ `:r?o`
796
885
  <div class="view-area view-square">
797
886
  <ds-text key="square">square</ds-text>
798
887
  </div>
@@ -817,7 +906,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
817
906
  `:""}
818
907
  </div>
819
908
  `:""}
820
- `}};pe.properties={mode:{type:String},align:{type:String},view:{type:Boolean}};pe.styles=p`
909
+ `}};ge.properties={mode:{type:String},align:{type:String},view:{type:Boolean}};ge.styles=p`
821
910
  :host {
822
911
  display: grid;
823
912
  position: relative;
@@ -1037,7 +1126,7 @@ function De(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
1037
1126
  .view-main {
1038
1127
  grid-area: main;
1039
1128
  }
1040
- `;customElements.define("ds-layout",pe);export{de as Accordion,ne as Button,ze as Container,Pe as Cycle,He as DateComponent,ue as DsTable,ae as Gap,he as Grid,q as Icon,pe as Layout,Ve as List,ce as Row,Oe as Text,le as Tooltip,S as currentLanguage,B as currentTheme,De as detectMobileDevice,cs as getAvailableLanguages,Re as getAvailableLanguagesSync,yr as getBrowserLanguage,cr as getDeviceInfo,xt as getLanguageDisplayName,ps as getPriceLabel,_t as getText,ls as hasTranslation,Me as initDeviceDetection,ds as loadTranslations,P as savePreferences,Ue as setLanguage,qt as setTheme,O as translate};
1129
+ `;customElements.define("ds-layout",ge);export{he as Accordion,oe as Banner,ie as Button,De as Container,He as Cycle,ze as DateComponent,pe as DsTable,ce as Gap,fe as Grid,K as Icon,ge as Layout,Me as List,ue as Row,Pe as Text,de as Tooltip,S as currentLanguage,q as currentTheme,Ue as detectMobileDevice,ds as getAvailableLanguages,je as getAvailableLanguagesSync,wr as getBrowserLanguage,dr as getDeviceInfo,$t as getLanguageDisplayName,fs as getPriceLabel,R as getText,cs as hasTranslation,Re as initDeviceDetection,us as loadTranslations,V as savePreferences,We as setLanguage,Kt as setTheme,O as translate};
1041
1130
  /*! Bundled license information:
1042
1131
 
1043
1132
  signal-polyfill/dist/index.js: