ds-one 0.2.5-alpha.12 → 0.2.5-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DS1/0-face/device.ts +8 -0
- package/DS1/1-root/one.css +36 -16
- package/DS1/2-core/ds-button.ts +1 -2
- package/DS1/2-core/ds-text.ts +1 -1
- package/DS1/4-page/ds-container.ts +59 -0
- package/DS1/4-page/ds-grid.ts +43 -3
- package/DS1/4-page/ds-layout.ts +139 -134
- package/DS1/index.ts +1 -0
- package/README.md +2 -2
- package/dist/0-face/device.d.ts.map +1 -1
- package/dist/0-face/device.js +6 -0
- package/dist/2-core/ds-button.d.ts.map +1 -1
- package/dist/2-core/ds-button.js +1 -2
- package/dist/2-core/ds-text.js +1 -1
- package/dist/4-page/ds-container.d.ts +17 -0
- package/dist/4-page/ds-container.d.ts.map +1 -0
- package/dist/4-page/ds-container.js +42 -0
- package/dist/4-page/ds-grid.d.ts +5 -0
- package/dist/4-page/ds-grid.d.ts.map +1 -1
- package/dist/4-page/ds-grid.js +38 -3
- package/dist/4-page/ds-layout.d.ts +2 -2
- package/dist/4-page/ds-layout.d.ts.map +1 -1
- package/dist/4-page/ds-layout.js +138 -133
- package/dist/ds-one.bundle.js +220 -138
- package/dist/ds-one.bundle.js.map +4 -4
- package/dist/ds-one.bundle.min.js +181 -145
- package/dist/ds-one.bundle.min.js.map +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
function ir(){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 or(){let t=ir(),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,p=t&&Math.min(i,o)>=600;return{isMobile:t,isTablet:p,isDesktop:!t,isTouchCapable:n,deviceType:t?p?"tablet":"mobile":"desktop",userAgent:e&&(e.userAgent||e.vendor)||"",screenWidth:i,screenHeight:o}}function He(){let t=or();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)),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")),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",()=>{He()}):He();let t;window.addEventListener("resize",()=>{clearTimeout(t),t=setTimeout(()=>{He()},100)})}var ar={},ft=["da","de","en","es","fr","it","ja","pt","sv","zh"],lr=new Map(ft.map((t,e)=>[t,e])),it={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"},ot=new Map,at=!1,gt="./translations.json",lt=!1;function ct(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 cr(){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 dr(){let t=[],e=typeof window<"u"?window.DS_ONE_TRANSLATIONS_FILE:null,r=cr(),s=ct(e??"");s&&t.push(s);let n=ct(r??"");return n&&!t.includes(n)&&t.push(n),t.length===0&&t.push(gt),t}function ur(t){return!t||typeof t!="object"?!1:Object.values(t).every(e=>e&&typeof e=="object")}async function hr(t){try{let e=await fetch(t);if(!e.ok)return null;let r=await e.json();return ur(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 dt(){if(lt||(lt=!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=dr();for(let e of t){let r=await hr(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]??gt}. Using bundled translations.`),!1}function pe(){return typeof window<"u"&&window.DS_ONE_TRANSLATIONS?window.DS_ONE_TRANSLATIONS:ar}var I=pe(),k="en";function F(t){return t?t.toLowerCase().split(/[-_]/)[0]??"":""}function ut(t){let e=F(t),r=lr.get(e);return typeof r=="number"?r:ft.length}function mt(t){return[...t].sort((e,r)=>{let s=ut(e),n=ut(r);return s!==n?s-n:e.localeCompare(r)})}function pr(t,e){let r=t?.replace("_","-");if(r)try{let s=ot.get(r);s||(s=new Intl.DisplayNames([r],{type:"language"}),ot.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{at||(console.info("[DS one] Intl.DisplayNames is not available, using fallback language names."),at=!0)}}function fr(t){let e=t.toLowerCase().replace("_","-"),r=it[e];if(r)return r;let s=F(e);return it[s]}function vt(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(k),r.push("en");let s=new Set;for(let o of r){if(!o||s.has(o))continue;s.add(o);let p=pr(o,t);if(p)return p}let n=fr(t);if(n)return n;let i=F(t);return i?i.toUpperCase():t}var ht={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 pt(t){if(!t)return null;let e=t.toLowerCase().replace("_","-"),r=ht[e];if(r)return r;let s=F(e),n=ht[s];return n||t}function gr(){if(typeof navigator>"u")return k;let t=navigator.language;if(t){let e=pt(t);if(e)return e}if(Array.isArray(navigator.languages))for(let e of navigator.languages){let r=pt(e);if(r)return r}return k}var ns=typeof window<"u"?window.localStorage?.getItem("ds-one:language")??void 0:void 0,S={value:localStorage.getItem("language")||gr(),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",()=>{dt()}):dt());typeof window<"u"&&window.addEventListener("translations-ready",()=>{I=pe(),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 E(t){let e=S.value;return I?.[e]?.[t]?I[e][t]:e!==k&&I?.[k]?.[t]?I[k][t]:(console.warn(`[DS one (Internationalization)] No translation found for key "${t}"`),t)}function is(t,e=S.value){if(!t)return!1;let r=I?.[e];return!!(r&&Object.prototype.hasOwnProperty.call(r,t)||e!==k&&I?.[k]&&Object.prototype.hasOwnProperty.call(I[k],t))}function yt(t){return E(t)}function os(){let t=pe();if(t&&Object.keys(t).length>0){let e=Object.keys(t);return Promise.resolve(mt(e))}return Promise.resolve([k])}function Ve(){let t=pe();return t&&Object.keys(t).length>0?mt(Object.keys(t)):[k]}function as(t,e){console.log(`Loading additional translations for ${t}:`,Object.keys(e).length,"keys")}function Me(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 mr={da:"kr.",nb:"kr.",sv:"kr.",de:"\u20AC",en:"$",pt:"\u20AC",es:"\u20AC",zh:"\xA5",ja:"\xA5",ko:"\u20A9"};function ds(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 mr[s]||"$"}var vr=Object.defineProperty,yr=(t,e,r)=>e in t?vr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Re=(t,e,r)=>(yr(t,typeof e!="symbol"?e+"":e,r),r),br=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},De=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},fe=(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)},bt=(t,e,r)=>(br(t,e,"access private method"),r);function wt(t,e){return Object.is(t,e)}var w=null,G=!1,ge=1,me=Symbol("SIGNAL");function U(t){let e=w;return w=t,e}function wr(){return w}function xr(){return G}var Be={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 ve(t){if(G)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(w===null)return;w.consumerOnSignalRead(t);let e=w.nextProducerIndex++;if(W(w),e<w.producerNode.length&&w.producerNode[e]!==t&&je(w)){let r=w.producerNode[e];ye(r,w.producerIndexOfThis[e])}w.producerNode[e]!==t&&(w.producerNode[e]=t,w.producerIndexOfThis[e]=je(w)?$t(t,w,e):0),w.producerLastReadVersion[e]=t.version}function _r(){ge++}function xt(t){if(!(!t.dirty&&t.lastCleanEpoch===ge)){if(!t.producerMustRecompute(t)&&!Er(t)){t.dirty=!1,t.lastCleanEpoch=ge;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=ge}}function _t(t){if(t.liveConsumerNode===void 0)return;let e=G;G=!0;try{for(let r of t.liveConsumerNode)r.dirty||Sr(r)}finally{G=e}}function $r(){return w?.consumerAllowSignalWrites!==!1}function Sr(t){var e;t.dirty=!0,_t(t),(e=t.consumerMarkedDirty)==null||e.call(t.wrapper??t)}function Ar(t){return t&&(t.nextProducerIndex=0),U(t)}function Cr(t,e){if(U(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(je(t))for(let r=t.nextProducerIndex;r<t.producerNode.length;r++)ye(t.producerNode[r],t.producerIndexOfThis[r]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function Er(t){W(t);for(let e=0;e<t.producerNode.length;e++){let r=t.producerNode[e],s=t.producerLastReadVersion[e];if(s!==r.version||(xt(r),s!==r.version))return!0}return!1}function $t(t,e,r){var s;if(qe(t),W(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]=$t(t.producerNode[n],t,n)}return t.liveConsumerIndexOfThis.push(r),t.liveConsumerNode.push(e)-1}function ye(t,e){var r;if(qe(t),W(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++)ye(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];W(i),i.producerIndexOfThis[n]=e}}function je(t){var e;return t.consumerIsAlwaysLive||(((e=t?.liveConsumerNode)==null?void 0:e.length)??0)>0}function W(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function qe(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}function St(t){if(xt(t),ve(t),t.value===ze)throw t.error;return t.value}function kr(t){let e=Object.create(Lr);e.computation=t;let r=()=>St(e);return r[me]=e,r}var Ue=Symbol("UNSET"),We=Symbol("COMPUTING"),ze=Symbol("ERRORED"),Lr={...Be,value:Ue,dirty:!0,error:null,equal:wt,producerMustRecompute(t){return t.value===Ue||t.value===We},producerRecomputeValue(t){if(t.value===We)throw new Error("Detected cycle in computations.");let e=t.value;t.value=We;let r=Ar(t),s,n=!1;try{s=t.computation.call(t.wrapper),n=e!==Ue&&e!==ze&&t.equal.call(t.wrapper,e,s)}catch(i){s=ze,t.error=i}finally{Cr(t,r)}if(n){t.value=e;return}t.value=s,t.version++}};function Tr(){throw new Error}var Nr=Tr;function Ir(){Nr()}function Or(t){let e=Object.create(Vr);e.value=t;let r=()=>(ve(e),e.value);return r[me]=e,r}function Pr(){return ve(this),this.value}function Hr(t,e){$r()||Ir(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,Mr(t))}var Vr={...Be,equal:wt,value:void 0};function Mr(t){t.version++,_r(),_t(t)}var x=Symbol("node"),_;(t=>{var e,r,s,n,i,o;class p{constructor(m,l={}){fe(this,r),Re(this,e);let f=Or(m)[me];if(this[x]=f,f.wrapper=this,l){let $=l.equals;$&&(f.equal=$),f.watched=l[t.subtle.watched],f.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return Pr.call(this[x])}set(m){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(xr())throw new Error("Writes to signals not permitted during Watcher callback");let l=this[x];Hr(l,m)}}e=x,r=new WeakSet,s=function(){},t.isState=u=>typeof u=="object"&&De(r,u),t.State=p;class d{constructor(m,l){fe(this,i),Re(this,n);let f=kr(m)[me];if(f.consumerAllowSignalWrites=!0,this[x]=f,f.wrapper=this,l){let $=l.equals;$&&(f.equal=$),f.watched=l[t.subtle.watched],f.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return St(this[x])}}n=x,i=new WeakSet,o=function(){},t.isComputed=u=>typeof u=="object"&&De(i,u),t.Computed=d,(u=>{var m,l,A,f,$;function Yt(v){let g,c=null;try{c=U(null),g=v()}finally{U(c)}return g}u.untrack=Yt;function Xt(v){var g;if(!(0,t.isComputed)(v)&&!(0,t.isWatcher)(v))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((g=v[x].producerNode)==null?void 0:g.map(c=>c.wrapper))??[]}u.introspectSources=Xt;function Qt(v){var g;if(!(0,t.isComputed)(v)&&!(0,t.isState)(v))throw new TypeError("Called introspectSinks without a Signal argument");return((g=v[x].liveConsumerNode)==null?void 0:g.map(c=>c.wrapper))??[]}u.introspectSinks=Qt;function er(v){if(!(0,t.isComputed)(v)&&!(0,t.isState)(v))throw new TypeError("Called hasSinks without a Signal argument");let g=v[x].liveConsumerNode;return g?g.length>0:!1}u.hasSinks=er;function tr(v){if(!(0,t.isComputed)(v)&&!(0,t.isWatcher)(v))throw new TypeError("Called hasSources without a Computed or Watcher argument");let g=v[x].producerNode;return g?g.length>0:!1}u.hasSources=tr;class rr{constructor(g){fe(this,l),fe(this,f),Re(this,m);let c=Object.create(Be);c.wrapper=this,c.consumerMarkedDirty=g,c.consumerIsAlwaysLive=!0,c.consumerAllowSignalWrites=!1,c.producerNode=[],this[x]=c}watch(...g){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");bt(this,f,$).call(this,g);let c=this[x];c.dirty=!1;let C=U(c);for(let he of g)ve(he[x]);U(C)}unwatch(...g){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");bt(this,f,$).call(this,g);let c=this[x];W(c);for(let C=c.producerNode.length-1;C>=0;C--)if(g.includes(c.producerNode[C].wrapper)){ye(c.producerNode[C],c.producerIndexOfThis[C]);let he=c.producerNode.length-1;if(c.producerNode[C]=c.producerNode[he],c.producerIndexOfThis[C]=c.producerIndexOfThis[he],c.producerNode.length--,c.producerIndexOfThis.length--,c.nextProducerIndex--,C<c.producerNode.length){let nr=c.producerIndexOfThis[C],nt=c.producerNode[C];qe(nt),nt.liveConsumerIndexOfThis[nr]=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)}}m=x,l=new WeakSet,A=function(){},f=new WeakSet,$=function(v){for(let g of v)if(!(0,t.isComputed)(g)&&!(0,t.isState)(g))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=v=>De(l,v),u.Watcher=rr;function sr(){var v;return(v=wr())==null?void 0:v.wrapper}u.currentComputed=sr,u.watched=Symbol("watched"),u.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(_||(_={}));var fs=Symbol("SignalWatcherBrand"),gs=new FinalizationRegistry((({watcher:t,signal:e})=>{t.unwatch(e)}));var be={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Z=t=>(...e)=>({_$litDirective$:t,values:e}),j=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,we=J.trustedTypes,At=we?we.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ge="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,Ze="?"+L,Rr=`<${Ze}>`,M=document,Y=()=>M.createComment(""),X=t=>t===null||typeof t!="object"&&typeof t!="function",Ke=Array.isArray,Nt=t=>Ke(t)||typeof t?.[Symbol.iterator]=="function",Fe=`[
|
|
2
|
-
\f\r]`,K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),kt=/'/g,Lt=/"/g,It=/^(?:script|style|textarea|title)$/i,Je=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),a=Je(1),Ot=Je(2),ws=Je(3),T=Symbol.for("lit-noChange"),b=Symbol.for("lit-nothing"),Tt=new WeakMap,V=M.createTreeWalker(M,129);function Pt(t,e){if(!Ke(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return At!==void 0?At.createHTML(e):e}var Ht=(t,e)=>{let r=t.length-1,s=[],n,i=e===2?"<svg>":e===3?"<math>":"",o=K;for(let p=0;p<r;p++){let d=t[p],u,m,l=-1,A=0;for(;A<d.length&&(o.lastIndex=A,m=o.exec(d),m!==null);)A=o.lastIndex,o===K?m[1]==="!--"?o=Ct:m[1]!==void 0?o=Et:m[2]!==void 0?(It.test(m[2])&&(n=RegExp("</"+m[2],"g")),o=H):m[3]!==void 0&&(o=H):o===H?m[0]===">"?(o=n??K,l=-1):m[1]===void 0?l=-2:(l=o.lastIndex-m[2].length,u=m[1],o=m[3]===void 0?H:m[3]==='"'?Lt:kt):o===Lt||o===kt?o=H:o===Ct||o===Et?o=K:(o=H,n=void 0);let f=o===H&&t[p+1].startsWith("/>")?" ":"";i+=o===K?d+Rr:l>=0?(s.push(u),d.slice(0,l)+Ge+d.slice(l)+L+f):d+L+(l===-2?p:f)}return[Pt(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,p=e.length-1,d=this.parts,[u,m]=Ht(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<p;){if(n.nodeType===1){if(n.hasAttributes())for(let l of n.getAttributeNames())if(l.endsWith(Ge)){let A=m[o++],f=n.getAttribute(l).split(L),$=/([.?@])?(.*)/.exec(A);d.push({type:1,index:i,name:$[2],strings:f,ctor:$[1]==="."?_e:$[1]==="?"?$e:$[1]==="@"?Se:D}),n.removeAttribute(l)}else l.startsWith(L)&&(d.push({type:6,index:i}),n.removeAttribute(l));if(It.test(n.tagName)){let l=n.textContent.split(L),A=l.length-1;if(A>0){n.textContent=we?we.emptyScript:"";for(let f=0;f<A;f++)n.append(l[f],Y()),V.nextNode(),d.push({type:2,index:++i});n.append(l[A],Y())}}}else if(n.nodeType===8)if(n.data===Ze)d.push({type:2,index:i});else{let l=-1;for(;(l=n.data.indexOf(L,l+1))!==-1;)d.push({type:7,index:i}),l+=L.length-1}i++}}static createElement(e,r){let s=M.createElement("template");return s.innerHTML=e,s}};function R(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=R(t,n._$AS(t,e.values),n,s)),e}var xe=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??M).importNode(r,!0);V.currentNode=n;let i=V.nextNode(),o=0,p=0,d=s[0];for(;d!==void 0;){if(o===d.index){let u;d.type===2?u=new z(i,i.nextSibling,this,e):d.type===1?u=new d.ctor(i,d.name,d.strings,this,e):d.type===6&&(u=new Ae(i,this,e)),this._$AV.push(u),d=s[++p]}o!==d?.index&&(i=V.nextNode(),o++)}return V.currentNode=M,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++}},z=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,s,n){this.type=2,this._$AH=b,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=R(this,e,r),X(e)?e===b||e==null||e===""?(this._$AH!==b&&this._$AR(),this._$AH=b):e!==this._$AH&&e!==T&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Nt(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!==b&&X(this._$AH)?this._$AA.nextSibling.data=e:this.T(M.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(Pt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===n)this._$AH.p(r);else{let i=new xe(n,this),o=i.u(this.options);i.p(r),this.T(o),this._$AH=i}}_$AC(e){let r=Tt.get(e.strings);return r===void 0&&Tt.set(e.strings,r=new Q(e)),r}k(e){Ke(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=b,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=b}_$AI(e,r=this,s,n){let i=this.strings,o=!1;if(i===void 0)e=R(this,e,r,0),o=!X(e)||e!==this._$AH&&e!==T,o&&(this._$AH=e);else{let p=e,d,u;for(e=i[0],d=0;d<i.length-1;d++)u=R(this,p[s+d],r,d),u===T&&(u=this._$AH[d]),o||(o=!X(u)||u!==this._$AH[d]),u===b?e=b:e!==b&&(e+=(u??"")+i[d+1]),this._$AH[d]=u}o&&!n&&this.j(e)}j(e){e===b?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},_e=class extends D{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===b?void 0:e}},$e=class extends D{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==b)}},Se=class extends D{constructor(e,r,s,n,i){super(e,r,s,n,i),this.type=5}_$AI(e,r=this){if((e=R(this,e,r,0)??b)===T)return;let s=this._$AH,n=e===b&&s!==b||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,i=e!==b&&(s===b||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)}},Ae=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){R(this,e)}},Vt={M:Ge,P:L,A:Ze,C:1,L:Ht,R:xe,D:Nt,V:R,I:z,H:D,N:$e,U:Se,B:_e,F:Ae},Dr=J.litHtmlPolyfillSupport;Dr?.(Q,z),(J.litHtmlVersions??(J.litHtmlVersions=[])).push("3.3.1");var Mt=(t,e,r)=>{let s=r?.renderBefore??e,n=s._$litPart$;if(n===void 0){let i=r?.renderBefore??null;s._$litPart$=n=new z(e.insertBefore(Y(),i),i,void 0,r??{})}return n._$AI(t),n};var{I:$s}=Vt;var Rt=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},Ce=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},Dt=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),jr(e)}};function Ur(t){this._$AN!==void 0?(Ce(this),this._$AM=t,Dt(this)):this._$AM=t}function Wr(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),Ce(s[i]);else s!=null&&(ee(s,!1),Ce(s));else ee(this,t)}var jr=t=>{t.type==be.CHILD&&(t._$AP??(t._$AP=Wr),t._$AQ??(t._$AQ=Ur))},Ee=class extends j{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,s){super._$AT(e,r,s),Dt(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(ee(this,e),Ce(this))}setValue(e){if(Rt(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 ke=class extends Ee{_$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()}},Ye=Z(ke);var Xe=t=>(e,...r)=>t(e,...r.map((s=>s instanceof _.State||s instanceof _.Computed?Ye(s):s))),zr=Xe(a),Br=Xe(Ot);var zs=_.State,Bs=_.Computed,Ut=(t,e)=>new _.State(t,e);function qr(){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=Ut(qr());function Wt(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 Le=globalThis,Te=Le.ShadowRoot&&(Le.ShadyCSS===void 0||Le.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Qe=Symbol(),jt=new WeakMap,te=class{constructor(e,r,s){if(this._$cssResult$=!0,s!==Qe)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(Te&&e===void 0){let s=r!==void 0&&r.length===1;s&&(e=jt.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&jt.set(r,e))}return e}toString(){return this.cssText}},zt=t=>new te(typeof t=="string"?t:t+"",void 0,Qe),y=(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,Qe)},Bt=(t,e)=>{if(Te)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let s=document.createElement("style"),n=Le.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=r.cssText,t.appendChild(s)}},et=Te?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let s of e.cssRules)r+=s.cssText;return zt(r)})(t):t;var{is:Fr,defineProperty:Gr,getOwnPropertyDescriptor:Zr,getOwnPropertyNames:Kr,getOwnPropertySymbols:Jr,getPrototypeOf:Yr}=Object,O=globalThis,qt=O.trustedTypes,Xr=qt?qt.emptyScript:"",Qr=O.reactiveElementPolyfillSupport,re=(t,e)=>t,tt={toAttribute(t,e){switch(e){case Boolean:t=t?Xr: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}},Gt=(t,e)=>!Fr(t,e),Ft={attribute:!0,type:String,converter:tt,reflect:!1,useDefault:!1,hasChanged:Gt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),O.litPropertyMetadata??(O.litPropertyMetadata=new WeakMap);var N=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=Ft){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&&Gr(this.prototype,e,n)}}static getPropertyDescriptor(e,r,s){let{get:n,set:i}=Zr(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get:n,set(o){let p=n?.call(this);i?.call(this,o),this.requestUpdate(e,p,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ft}static _$Ei(){if(this.hasOwnProperty(re("elementProperties")))return;let e=Yr(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=[...Kr(r),...Jr(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(et(n))}else e!==void 0&&r.push(et(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 Bt(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:tt).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:tt;this._$Em=n;let p=o.fromAttribute(r,i.type);this[n]=p??this._$Ej?.get(n)??p,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??Gt)(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,p=this[n];o!==!0||this._$AL.has(n)||p===void 0||this.C(n,void 0,i,p)}}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){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[re("elementProperties")]=new Map,N[re("finalized")]=new Map,Qr?.({ReactiveElement:N}),(O.reactiveElementVersions??(O.reactiveElementVersions=[])).push("2.1.1");var se=globalThis,h=class extends N{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=Mt(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 es=se.litElementPolyfillSupport;es?.({LitElement:h});(se.litElementVersions??(se.litElementVersions=[])).push("4.2.1");var Ne=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(){((this._currentLanguage||S.value)?.toLowerCase().split(/[-_]/)[0]||"")==="ja"?this.setAttribute("data-language","ja"):this.removeAttribute("data-language")}_loadText(){if(!this.key){this._text=this.defaultValue||this.fallback||"",this._updateLanguageAttribute(),this.requestUpdate();return}try{let e=yt(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>`}};Ne.styles=y`
|
|
1
|
+
function Me(){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 ar(){let t=Me(),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,p=t&&Math.min(i,o)>=600;return{isMobile:t,isTablet:p,isDesktop:!t,isTouchCapable:n,deviceType:t?p?"tablet":"mobile":"desktop",userAgent:e&&(e.userAgent||e.vendor)||"",screenWidth:i,screenHeight:o}}function He(){let t=ar();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",()=>{He()}):He();let t;window.addEventListener("resize",()=>{clearTimeout(t),t=setTimeout(()=>{He()},100)})}var lr={},mt=["da","de","en","es","fr","it","ja","pt","sv","zh"],cr=new Map(mt.map((t,e)=>[t,e])),at={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"},lt=new Map,ct=!1,vt="./translations.json",dt=!1;function ut(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 dr(){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 ur(){let t=[],e=typeof window<"u"?window.DS_ONE_TRANSLATIONS_FILE:null,r=dr(),s=ut(e??"");s&&t.push(s);let n=ut(r??"");return n&&!t.includes(n)&&t.push(n),t.length===0&&t.push(vt),t}function hr(t){return!t||typeof t!="object"?!1:Object.values(t).every(e=>e&&typeof e=="object")}async function pr(t){try{let e=await fetch(t);if(!e.ok)return null;let r=await e.json();return hr(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 ht(){if(dt||(dt=!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=ur();for(let e of t){let r=await pr(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]??vt}. Using bundled translations.`),!1}function pe(){return typeof window<"u"&&window.DS_ONE_TRANSLATIONS?window.DS_ONE_TRANSLATIONS:lr}var I=pe(),k="en";function F(t){return t?t.toLowerCase().split(/[-_]/)[0]??"":""}function pt(t){let e=F(t),r=cr.get(e);return typeof r=="number"?r:mt.length}function yt(t){return[...t].sort((e,r)=>{let s=pt(e),n=pt(r);return s!==n?s-n:e.localeCompare(r)})}function fr(t,e){let r=t?.replace("_","-");if(r)try{let s=lt.get(r);s||(s=new Intl.DisplayNames([r],{type:"language"}),lt.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{ct||(console.info("[DS one] Intl.DisplayNames is not available, using fallback language names."),ct=!0)}}function gr(t){let e=t.toLowerCase().replace("_","-"),r=at[e];if(r)return r;let s=F(e);return at[s]}function wt(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(k),r.push("en");let s=new Set;for(let o of r){if(!o||s.has(o))continue;s.add(o);let p=fr(o,t);if(p)return p}let n=gr(t);if(n)return n;let i=F(t);return i?i.toUpperCase():t}var ft={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 gt(t){if(!t)return null;let e=t.toLowerCase().replace("_","-"),r=ft[e];if(r)return r;let s=F(e),n=ft[s];return n||t}function mr(){if(typeof navigator>"u")return k;let t=navigator.language;if(t){let e=gt(t);if(e)return e}if(Array.isArray(navigator.languages))for(let e of navigator.languages){let r=gt(e);if(r)return r}return k}var is=typeof window<"u"?window.localStorage?.getItem("ds-one:language")??void 0:void 0,S={value:localStorage.getItem("language")||mr(),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",()=>{ht()}):ht());typeof window<"u"&&window.addEventListener("translations-ready",()=>{I=pe(),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 E(t){let e=S.value;return I?.[e]?.[t]?I[e][t]:e!==k&&I?.[k]?.[t]?I[k][t]:(console.warn(`[DS one (Internationalization)] No translation found for key "${t}"`),t)}function os(t,e=S.value){if(!t)return!1;let r=I?.[e];return!!(r&&Object.prototype.hasOwnProperty.call(r,t)||e!==k&&I?.[k]&&Object.prototype.hasOwnProperty.call(I[k],t))}function bt(t){return E(t)}function as(){let t=pe();if(t&&Object.keys(t).length>0){let e=Object.keys(t);return Promise.resolve(yt(e))}return Promise.resolve([k])}function Re(){let t=pe();return t&&Object.keys(t).length>0?yt(Object.keys(t)):[k]}function ls(t,e){console.log(`Loading additional translations for ${t}:`,Object.keys(e).length,"keys")}function De(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 vr={da:"kr.",nb:"kr.",sv:"kr.",de:"\u20AC",en:"$",pt:"\u20AC",es:"\u20AC",zh:"\xA5",ja:"\xA5",ko:"\u20A9"};function us(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 vr[s]||"$"}var yr=Object.defineProperty,wr=(t,e,r)=>e in t?yr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ue=(t,e,r)=>(wr(t,typeof e!="symbol"?e+"":e,r),r),br=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},ze=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},fe=(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)},xt=(t,e,r)=>(br(t,e,"access private method"),r);function _t(t,e){return Object.is(t,e)}var b=null,G=!1,ge=1,me=Symbol("SIGNAL");function U(t){let e=b;return b=t,e}function xr(){return b}function _r(){return G}var Fe={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 ve(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(z(b),e<b.producerNode.length&&b.producerNode[e]!==t&&Be(b)){let r=b.producerNode[e];ye(r,b.producerIndexOfThis[e])}b.producerNode[e]!==t&&(b.producerNode[e]=t,b.producerIndexOfThis[e]=Be(b)?At(t,b,e):0),b.producerLastReadVersion[e]=t.version}function $r(){ge++}function $t(t){if(!(!t.dirty&&t.lastCleanEpoch===ge)){if(!t.producerMustRecompute(t)&&!kr(t)){t.dirty=!1,t.lastCleanEpoch=ge;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=ge}}function St(t){if(t.liveConsumerNode===void 0)return;let e=G;G=!0;try{for(let r of t.liveConsumerNode)r.dirty||Ar(r)}finally{G=e}}function Sr(){return b?.consumerAllowSignalWrites!==!1}function Ar(t){var e;t.dirty=!0,St(t),(e=t.consumerMarkedDirty)==null||e.call(t.wrapper??t)}function Cr(t){return t&&(t.nextProducerIndex=0),U(t)}function Er(t,e){if(U(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(Be(t))for(let r=t.nextProducerIndex;r<t.producerNode.length;r++)ye(t.producerNode[r],t.producerIndexOfThis[r]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function kr(t){z(t);for(let e=0;e<t.producerNode.length;e++){let r=t.producerNode[e],s=t.producerLastReadVersion[e];if(s!==r.version||($t(r),s!==r.version))return!0}return!1}function At(t,e,r){var s;if(Ge(t),z(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]=At(t.producerNode[n],t,n)}return t.liveConsumerIndexOfThis.push(r),t.liveConsumerNode.push(e)-1}function ye(t,e){var r;if(Ge(t),z(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++)ye(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];z(i),i.producerIndexOfThis[n]=e}}function Be(t){var e;return t.consumerIsAlwaysLive||(((e=t?.liveConsumerNode)==null?void 0:e.length)??0)>0}function z(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function Ge(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}function Ct(t){if($t(t),ve(t),t.value===qe)throw t.error;return t.value}function Lr(t){let e=Object.create(Tr);e.computation=t;let r=()=>Ct(e);return r[me]=e,r}var We=Symbol("UNSET"),je=Symbol("COMPUTING"),qe=Symbol("ERRORED"),Tr={...Fe,value:We,dirty:!0,error:null,equal:_t,producerMustRecompute(t){return t.value===We||t.value===je},producerRecomputeValue(t){if(t.value===je)throw new Error("Detected cycle in computations.");let e=t.value;t.value=je;let r=Cr(t),s,n=!1;try{s=t.computation.call(t.wrapper),n=e!==We&&e!==qe&&t.equal.call(t.wrapper,e,s)}catch(i){s=qe,t.error=i}finally{Er(t,r)}if(n){t.value=e;return}t.value=s,t.version++}};function Nr(){throw new Error}var Ir=Nr;function Or(){Ir()}function Pr(t){let e=Object.create(Mr);e.value=t;let r=()=>(ve(e),e.value);return r[me]=e,r}function Vr(){return ve(this),this.value}function Hr(t,e){Sr()||Or(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,Rr(t))}var Mr={...Fe,equal:_t,value:void 0};function Rr(t){t.version++,$r(),St(t)}var x=Symbol("node"),_;(t=>{var e,r,s,n,i,o;class p{constructor(m,l={}){fe(this,r),Ue(this,e);let f=Pr(m)[me];if(this[x]=f,f.wrapper=this,l){let $=l.equals;$&&(f.equal=$),f.watched=l[t.subtle.watched],f.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return Vr.call(this[x])}set(m){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(_r())throw new Error("Writes to signals not permitted during Watcher callback");let l=this[x];Hr(l,m)}}e=x,r=new WeakSet,s=function(){},t.isState=u=>typeof u=="object"&&ze(r,u),t.State=p;class d{constructor(m,l){fe(this,i),Ue(this,n);let f=Lr(m)[me];if(f.consumerAllowSignalWrites=!0,this[x]=f,f.wrapper=this,l){let $=l.equals;$&&(f.equal=$),f.watched=l[t.subtle.watched],f.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Ct(this[x])}}n=x,i=new WeakSet,o=function(){},t.isComputed=u=>typeof u=="object"&&ze(i,u),t.Computed=d,(u=>{var m,l,A,f,$;function Qt(v){let g,c=null;try{c=U(null),g=v()}finally{U(c)}return g}u.untrack=Qt;function er(v){var g;if(!(0,t.isComputed)(v)&&!(0,t.isWatcher)(v))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((g=v[x].producerNode)==null?void 0:g.map(c=>c.wrapper))??[]}u.introspectSources=er;function tr(v){var g;if(!(0,t.isComputed)(v)&&!(0,t.isState)(v))throw new TypeError("Called introspectSinks without a Signal argument");return((g=v[x].liveConsumerNode)==null?void 0:g.map(c=>c.wrapper))??[]}u.introspectSinks=tr;function rr(v){if(!(0,t.isComputed)(v)&&!(0,t.isState)(v))throw new TypeError("Called hasSinks without a Signal argument");let g=v[x].liveConsumerNode;return g?g.length>0:!1}u.hasSinks=rr;function sr(v){if(!(0,t.isComputed)(v)&&!(0,t.isWatcher)(v))throw new TypeError("Called hasSources without a Computed or Watcher argument");let g=v[x].producerNode;return g?g.length>0:!1}u.hasSources=sr;class nr{constructor(g){fe(this,l),fe(this,f),Ue(this,m);let c=Object.create(Fe);c.wrapper=this,c.consumerMarkedDirty=g,c.consumerIsAlwaysLive=!0,c.consumerAllowSignalWrites=!1,c.producerNode=[],this[x]=c}watch(...g){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");xt(this,f,$).call(this,g);let c=this[x];c.dirty=!1;let C=U(c);for(let he of g)ve(he[x]);U(C)}unwatch(...g){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");xt(this,f,$).call(this,g);let c=this[x];z(c);for(let C=c.producerNode.length-1;C>=0;C--)if(g.includes(c.producerNode[C].wrapper)){ye(c.producerNode[C],c.producerIndexOfThis[C]);let he=c.producerNode.length-1;if(c.producerNode[C]=c.producerNode[he],c.producerIndexOfThis[C]=c.producerIndexOfThis[he],c.producerNode.length--,c.producerIndexOfThis.length--,c.nextProducerIndex--,C<c.producerNode.length){let or=c.producerIndexOfThis[C],ot=c.producerNode[C];Ge(ot),ot.liveConsumerIndexOfThis[or]=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)}}m=x,l=new WeakSet,A=function(){},f=new WeakSet,$=function(v){for(let g of v)if(!(0,t.isComputed)(g)&&!(0,t.isState)(g))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=v=>ze(l,v),u.Watcher=nr;function ir(){var v;return(v=xr())==null?void 0:v.wrapper}u.currentComputed=ir,u.watched=Symbol("watched"),u.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(_||(_={}));var gs=Symbol("SignalWatcherBrand"),ms=new FinalizationRegistry((({watcher:t,signal:e})=>{t.unwatch(e)}));var we={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 J=globalThis,be=J.trustedTypes,Et=be?be.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ke="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,Je="?"+L,Dr=`<${Je}>`,M=document,Y=()=>M.createComment(""),X=t=>t===null||typeof t!="object"&&typeof t!="function",Ye=Array.isArray,Ot=t=>Ye(t)||typeof t?.[Symbol.iterator]=="function",Ze=`[
|
|
2
|
+
\f\r]`,K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,kt=/-->/g,Lt=/>/g,V=RegExp(`>|${Ze}(?:([^\\s"'>=/]+)(${Ze}*=${Ze}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Tt=/'/g,Nt=/"/g,Pt=/^(?:script|style|textarea|title)$/i,Xe=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),a=Xe(1),Vt=Xe(2),xs=Xe(3),T=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),It=new WeakMap,H=M.createTreeWalker(M,129);function Ht(t,e){if(!Ye(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Et!==void 0?Et.createHTML(e):e}var Mt=(t,e)=>{let r=t.length-1,s=[],n,i=e===2?"<svg>":e===3?"<math>":"",o=K;for(let p=0;p<r;p++){let d=t[p],u,m,l=-1,A=0;for(;A<d.length&&(o.lastIndex=A,m=o.exec(d),m!==null);)A=o.lastIndex,o===K?m[1]==="!--"?o=kt:m[1]!==void 0?o=Lt:m[2]!==void 0?(Pt.test(m[2])&&(n=RegExp("</"+m[2],"g")),o=V):m[3]!==void 0&&(o=V):o===V?m[0]===">"?(o=n??K,l=-1):m[1]===void 0?l=-2:(l=o.lastIndex-m[2].length,u=m[1],o=m[3]===void 0?V:m[3]==='"'?Nt:Tt):o===Nt||o===Tt?o=V:o===kt||o===Lt?o=K:(o=V,n=void 0);let f=o===V&&t[p+1].startsWith("/>")?" ":"";i+=o===K?d+Dr:l>=0?(s.push(u),d.slice(0,l)+Ke+d.slice(l)+L+f):d+L+(l===-2?p:f)}return[Ht(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,p=e.length-1,d=this.parts,[u,m]=Mt(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<p;){if(n.nodeType===1){if(n.hasAttributes())for(let l of n.getAttributeNames())if(l.endsWith(Ke)){let A=m[o++],f=n.getAttribute(l).split(L),$=/([.?@])?(.*)/.exec(A);d.push({type:1,index:i,name:$[2],strings:f,ctor:$[1]==="."?_e:$[1]==="?"?$e:$[1]==="@"?Se:D}),n.removeAttribute(l)}else l.startsWith(L)&&(d.push({type:6,index:i}),n.removeAttribute(l));if(Pt.test(n.tagName)){let l=n.textContent.split(L),A=l.length-1;if(A>0){n.textContent=be?be.emptyScript:"";for(let f=0;f<A;f++)n.append(l[f],Y()),H.nextNode(),d.push({type:2,index:++i});n.append(l[A],Y())}}}else if(n.nodeType===8)if(n.data===Je)d.push({type:2,index:i});else{let l=-1;for(;(l=n.data.indexOf(L,l+1))!==-1;)d.push({type:7,index:i}),l+=L.length-1}i++}}static createElement(e,r){let s=M.createElement("template");return s.innerHTML=e,s}};function R(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=R(t,n._$AS(t,e.values),n,s)),e}var xe=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??M).importNode(r,!0);H.currentNode=n;let i=H.nextNode(),o=0,p=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 Ae(i,this,e)),this._$AV.push(u),d=s[++p]}o!==d?.index&&(i=H.nextNode(),o++)}return H.currentNode=M,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=R(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):Ot(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(M.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(Ht(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===n)this._$AH.p(r);else{let i=new xe(n,this),o=i.u(this.options);i.p(r),this.T(o),this._$AH=i}}_$AC(e){let r=It.get(e.strings);return r===void 0&&It.set(e.strings,r=new Q(e)),r}k(e){Ye(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=R(this,e,r,0),o=!X(e)||e!==this._$AH&&e!==T,o&&(this._$AH=e);else{let p=e,d,u;for(e=i[0],d=0;d<i.length-1;d++)u=R(this,p[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??"")}},_e=class extends D{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===w?void 0:e}},$e=class extends D{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==w)}},Se=class extends D{constructor(e,r,s,n,i){super(e,r,s,n,i),this.type=5}_$AI(e,r=this){if((e=R(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)}},Ae=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){R(this,e)}},Rt={M:Ke,P:L,A:Je,C:1,L:Mt,R:xe,D:Ot,V:R,I:j,H:D,N:$e,U:Se,B:_e,F:Ae},Ur=J.litHtmlPolyfillSupport;Ur?.(Q,j),(J.litHtmlVersions??(J.litHtmlVersions=[])).push("3.3.1");var Dt=(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:Ss}=Rt;var Ut=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},Ce=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},zt=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),jr(e)}};function zr(t){this._$AN!==void 0?(Ce(this),this._$AM=t,zt(this)):this._$AM=t}function Wr(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),Ce(s[i]);else s!=null&&(ee(s,!1),Ce(s));else ee(this,t)}var jr=t=>{t.type==we.CHILD&&(t._$AP??(t._$AP=Wr),t._$AQ??(t._$AQ=zr))},Ee=class extends W{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,s){super._$AT(e,r,s),zt(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(ee(this,e),Ce(this))}setValue(e){if(Ut(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 ke=class extends Ee{_$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()}},Qe=Z(ke);var et=t=>(e,...r)=>t(e,...r.map((s=>s instanceof _.State||s instanceof _.Computed?Qe(s):s))),Br=et(a),qr=et(Vt);var Bs=_.State,qs=_.Computed,Wt=(t,e)=>new _.State(t,e);function Fr(){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=Wt(Fr());function jt(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 Le=globalThis,Te=Le.ShadowRoot&&(Le.ShadyCSS===void 0||Le.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,tt=Symbol(),Bt=new WeakMap,te=class{constructor(e,r,s){if(this._$cssResult$=!0,s!==tt)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(Te&&e===void 0){let s=r!==void 0&&r.length===1;s&&(e=Bt.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Bt.set(r,e))}return e}toString(){return this.cssText}},qt=t=>new te(typeof t=="string"?t:t+"",void 0,tt),y=(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,tt)},Ft=(t,e)=>{if(Te)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let s=document.createElement("style"),n=Le.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=r.cssText,t.appendChild(s)}},rt=Te?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let s of e.cssRules)r+=s.cssText;return qt(r)})(t):t;var{is:Gr,defineProperty:Zr,getOwnPropertyDescriptor:Kr,getOwnPropertyNames:Jr,getOwnPropertySymbols:Yr,getPrototypeOf:Xr}=Object,O=globalThis,Gt=O.trustedTypes,Qr=Gt?Gt.emptyScript:"",es=O.reactiveElementPolyfillSupport,re=(t,e)=>t,st={toAttribute(t,e){switch(e){case Boolean:t=t?Qr: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}},Kt=(t,e)=>!Gr(t,e),Zt={attribute:!0,type:String,converter:st,reflect:!1,useDefault:!1,hasChanged:Kt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),O.litPropertyMetadata??(O.litPropertyMetadata=new WeakMap);var N=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=Zt){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&&Zr(this.prototype,e,n)}}static getPropertyDescriptor(e,r,s){let{get:n,set:i}=Kr(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get:n,set(o){let p=n?.call(this);i?.call(this,o),this.requestUpdate(e,p,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Zt}static _$Ei(){if(this.hasOwnProperty(re("elementProperties")))return;let e=Xr(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=[...Jr(r),...Yr(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(rt(n))}else e!==void 0&&r.push(rt(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 Ft(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:st).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:st;this._$Em=n;let p=o.fromAttribute(r,i.type);this[n]=p??this._$Ej?.get(n)??p,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??Kt)(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,p=this[n];o!==!0||this._$AL.has(n)||p===void 0||this.C(n,void 0,i,p)}}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){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[re("elementProperties")]=new Map,N[re("finalized")]=new Map,es?.({ReactiveElement:N}),(O.reactiveElementVersions??(O.reactiveElementVersions=[])).push("2.1.1");var se=globalThis,h=class extends N{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=Dt(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 ts=se.litElementPolyfillSupport;ts?.({LitElement:h});(se.litElementVersions??(se.litElementVersions=[])).push("4.2.1");var Ne=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(){((this._currentLanguage||S.value)?.toLowerCase().split(/[-_]/)[0]||"")==="ja"?this.setAttribute("data-language","ja"):this.removeAttribute("data-language")}_loadText(){if(!this.key){this._text=this.defaultValue||this.fallback||"",this._updateLanguageAttribute(),this.requestUpdate();return}try{let e=bt(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>`}};Ne.styles=y`
|
|
4
4
|
:host {
|
|
5
5
|
display: inline;
|
|
6
6
|
font-family: var(--typeface-regular);
|
|
7
|
-
font-size:
|
|
7
|
+
font-size: var(--type-size-default);
|
|
8
8
|
font-weight: var(--type-weight-default);
|
|
9
9
|
line-height: calc(var(--type-lineheight-default) * var(--sf));
|
|
10
10
|
letter-spacing: calc(var(--type-letterspacing-default) * var(--sf));
|
|
@@ -35,8 +35,7 @@ function ir(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
|
|
|
35
35
|
max-height: calc(var(--08) * var(--sf));
|
|
36
36
|
border: none;
|
|
37
37
|
cursor: pointer;
|
|
38
|
-
|
|
39
|
-
padding: 0 calc(1px * var(--sf));
|
|
38
|
+
padding: 0 calc(2px * var(--sf));
|
|
40
39
|
color: var(--button-text-color);
|
|
41
40
|
font-family: var(--typeface-regular);
|
|
42
41
|
}
|
|
@@ -80,7 +79,7 @@ function ir(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
|
|
|
80
79
|
.loading {
|
|
81
80
|
opacity: 0.7;
|
|
82
81
|
}
|
|
83
|
-
`;customElements.define("ds-button",ne);var ie=class extends
|
|
82
|
+
`;customElements.define("ds-button",ne);var ie=class extends W{constructor(e){if(super(e),this.it=w,e.type!==we.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 Jt=Z(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">${Jt(e)}</div>`;switch(this._type.toLowerCase()){case"close":return console.log("Rendering close icon"),a`
|
|
84
83
|
<div class="icon-container">
|
|
85
84
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
86
85
|
<path
|
|
@@ -273,7 +272,7 @@ function ir(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
|
|
|
273
272
|
:host {
|
|
274
273
|
--notes-style-color: #ffb6b9;
|
|
275
274
|
}
|
|
276
|
-
`;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
|
|
275
|
+
`;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 rs=t=>{localStorage.setItem("accentColor",t)},it=()=>localStorage.getItem("accentColor")||"--sharp-blue",nt=()=>{let t=it();document.documentElement.style.setProperty("--accent-color",`var(${t})`)},ss=t=>{localStorage.setItem("notesStyleMedium",t)},Yt=()=>localStorage.getItem("notesStyleMedium")||"note",Xt=t=>{localStorage.setItem("pageStyle",t)},oe=()=>localStorage.getItem("pageStyle")||"note",Ie=class extends h{static get properties(){return{type:{type:String},values:{type:Array},label:{type:String},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.label="",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,this.label=this.getLabel()}else if(this.type==="theme"){this.values=["light","dark"];let e=B.get();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="accent-color"){this.values=["--apple-green","--every-green","--zenith-blue","--sharp-blue","--pink","--tuned-red","--orange","--yellow"];let e=it();this.currentValue=e,nt()}else if(this.type==="notes-style-medium"){this.values=["default","big","gallery"];let e=Yt();this.currentValue=e;let r=oe();this.disabled=r==="note",this.label=this.getLabel()}else if(this.type==="page-style"){this.values=["note","page"];let e=oe();this.currentValue=e,this.label=this.getLabel()}else this.type==="icon-only"&&(this.values=["note","page"],this.currentValue=this.values[0],this.label="");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,this.label=this.getLabel()}else if(this.type==="theme"){let e=B.get();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="accent-color"){let e=it();this.currentValue=e,nt()}else if(this.type==="notes-style-medium"){let e=Yt();this.currentValue=e;let r=oe();this.disabled=r==="note",this.label=this.getLabel()}else if(this.type==="page-style"){let e=oe();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="icon-only"){let e=oe();this.currentValue=e,this.label=""}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(()=>{De(n)}):De(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,jt(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,rs(n),nt(),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,ss(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,Xt(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,Xt(n),P({pageStyle:n}),this.label="",window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:n}}))}this.label=this.getLabel(),this.requestUpdate()}}getValueDisplay(e){if(this.type==="language")return wt(e,{locale:S.value});if(this.type==="theme"){if(this.translationsReady){let r=E(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=E(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=E(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>`}getLabel(){if(this.type==="language"){if(this.translationsReady){let e=E("language");if(e&&e!=="language")return e}return"Language"}else if(this.type==="theme"){if(this.translationsReady){let e=E("theme");if(e&&e!=="theme")return e}return"Theme"}else if(this.type==="accent-color"){if(this.translationsReady){let e=E("accentColor");if(e&&e!=="accentColor")return e}return"Accent Color"}else if(this.type==="notes-style-medium"){if(this.translationsReady){let e=E("notesStyle");if(e&&e!=="notesStyle")return e}return"Notes Style"}else if(this.type==="page-style"){if(this.translationsReady){let e=E("clickingItem");if(e&&e!=="clickingItem")return e}return"Clic"}else if(this.type==="icon-only")return"";return this.label}render(){return a`
|
|
277
276
|
<div class="cycle-container">
|
|
278
277
|
${this.type!=="icon-only"?a`${this.type==="language"?a`<ds-text
|
|
279
278
|
key="language"
|
|
@@ -322,7 +321,7 @@ function ir(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
|
|
|
322
321
|
`:""}
|
|
323
322
|
</div>
|
|
324
323
|
</div>
|
|
325
|
-
`}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=
|
|
324
|
+
`}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()}};Ie.styles=y`
|
|
326
325
|
.cycle-container {
|
|
327
326
|
display: flex;
|
|
328
327
|
justify-content: space-between;
|
|
@@ -516,19 +515,51 @@ function ir(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
|
|
|
516
515
|
grid-template-columns: 1fr 60px 60px 60px;
|
|
517
516
|
}
|
|
518
517
|
}
|
|
519
|
-
`;customElements.define("ds-table",ce);var
|
|
518
|
+
`;customElements.define("ds-table",ce);var Ve=class extends h{render(){return a`<slot></slot>`}};Ve.styles=y`
|
|
519
|
+
:host {
|
|
520
|
+
display: flex;
|
|
521
|
+
width: 100%;
|
|
522
|
+
max-width: 100%;
|
|
523
|
+
flex-direction: column;
|
|
524
|
+
box-sizing: border-box;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/* Ensure children don't overflow */
|
|
528
|
+
:host ::slotted(*) {
|
|
529
|
+
max-width: 100%;
|
|
530
|
+
box-sizing: border-box;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/* Mobile: 100% width */
|
|
534
|
+
@media (max-width: 820px) {
|
|
535
|
+
:host {
|
|
536
|
+
width: 100%;
|
|
537
|
+
max-width: 100%;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/* Desktop: max-width 1000px, centered */
|
|
542
|
+
@media (min-width: 821px) {
|
|
543
|
+
:host {
|
|
544
|
+
max-width: 1000px;
|
|
545
|
+
margin-left: auto;
|
|
546
|
+
margin-right: auto;
|
|
547
|
+
width: 100%;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
`;customElements.define("ds-container",Ve);var de=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(){Me()?(this.classList.add("mobile"),this.classList.remove("desktop")):(this.classList.add("desktop"),this.classList.remove("mobile"))}render(){return a``}};de.properties={align:{type:String}};de.styles=y`
|
|
520
551
|
:host {
|
|
521
552
|
margin-top: 0.5px !important;
|
|
522
553
|
margin-left: 0.5px !important;
|
|
523
554
|
display: grid;
|
|
524
555
|
width: 1440px;
|
|
525
|
-
height:
|
|
556
|
+
height: 1280px;
|
|
526
557
|
grid-template-columns: repeat(auto-fill, 19px);
|
|
527
558
|
grid-template-rows: repeat(auto-fill, 19px);
|
|
528
559
|
gap: 1px;
|
|
529
560
|
row-rule: calc(1px * var(--sf)) solid var(--grid-color);
|
|
530
561
|
column-rule: calc(1px * var(--sf)) solid var(--grid-color);
|
|
531
|
-
outline: 1px solid
|
|
562
|
+
outline: calc(1px * var(--sf)) solid var(--yellow);
|
|
532
563
|
position: fixed;
|
|
533
564
|
top: 0;
|
|
534
565
|
left: 50%;
|
|
@@ -541,7 +572,7 @@ function ir(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
|
|
|
541
572
|
:host(.mobile) {
|
|
542
573
|
width: calc(100% - calc(1px * var(--sf)));
|
|
543
574
|
max-width: 100vw;
|
|
544
|
-
margin-left: 0 !important;
|
|
575
|
+
margin-left: 0.5px !important;
|
|
545
576
|
margin-top: 0 !important;
|
|
546
577
|
box-sizing: border-box;
|
|
547
578
|
position: fixed;
|
|
@@ -570,60 +601,60 @@ function ir(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
|
|
|
570
601
|
right: 0;
|
|
571
602
|
transform: none;
|
|
572
603
|
}
|
|
573
|
-
`;customElements.define("ds-grid",de);var ue=class extends h{constructor(){super(...arguments),this.mode="portfolio"}render(){let e=this.
|
|
604
|
+
`;customElements.define("ds-grid",de);var ue=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`
|
|
574
605
|
<slot></slot>
|
|
575
606
|
${e?a`
|
|
576
|
-
<div class="
|
|
607
|
+
<div class="view-overlay">
|
|
577
608
|
${n?a`
|
|
578
|
-
<div class="
|
|
609
|
+
<div class="view-area view-banner">
|
|
579
610
|
<ds-text key="banner">banner</ds-text>
|
|
580
611
|
</div>
|
|
581
|
-
<div class="
|
|
612
|
+
<div class="view-area view-header">
|
|
582
613
|
<ds-text key="header">header</ds-text>
|
|
583
614
|
</div>
|
|
584
615
|
|
|
585
|
-
<div class="
|
|
616
|
+
<div class="view-area view-main">
|
|
586
617
|
<ds-text key="main">main</ds-text>
|
|
587
618
|
</div>
|
|
588
|
-
<div class="
|
|
619
|
+
<div class="view-area view-footer">
|
|
589
620
|
<ds-text key="footer">footer</ds-text>
|
|
590
621
|
</div>
|
|
591
622
|
`:s?a`
|
|
592
|
-
<div class="
|
|
623
|
+
<div class="view-area view-header">
|
|
593
624
|
<ds-text key="header">header</ds-text>
|
|
594
625
|
</div>
|
|
595
|
-
<div class="
|
|
626
|
+
<div class="view-area view-content">
|
|
596
627
|
<ds-text key="content">content</ds-text>
|
|
597
628
|
</div>
|
|
598
|
-
<div class="
|
|
629
|
+
<div class="view-area view-footer">
|
|
599
630
|
<ds-text key="footer">footer</ds-text>
|
|
600
631
|
</div>
|
|
601
632
|
`:r?a`
|
|
602
|
-
<div class="
|
|
633
|
+
<div class="view-area view-square">
|
|
603
634
|
<ds-text key="square">square</ds-text>
|
|
604
635
|
</div>
|
|
605
|
-
<div class="
|
|
636
|
+
<div class="view-area view-title">
|
|
606
637
|
<ds-text key="title">title</ds-text>
|
|
607
638
|
</div>
|
|
608
|
-
<div class="
|
|
639
|
+
<div class="view-area view-header">
|
|
609
640
|
<ds-text key="header">header</ds-text>
|
|
610
641
|
</div>
|
|
611
|
-
<div class="
|
|
642
|
+
<div class="view-area view-projects">
|
|
612
643
|
<ds-text key="projects">projects</ds-text>
|
|
613
644
|
</div>
|
|
614
|
-
<div class="
|
|
645
|
+
<div class="view-area view-bio">
|
|
615
646
|
<ds-text key="bio">bio</ds-text>
|
|
616
647
|
</div>
|
|
617
|
-
<div class="
|
|
648
|
+
<div class="view-area view-nav">
|
|
618
649
|
<ds-text key="nav">nav</ds-text>
|
|
619
650
|
</div>
|
|
620
|
-
<div class="
|
|
651
|
+
<div class="view-area view-footer">
|
|
621
652
|
<ds-text key="footer">footer</ds-text>
|
|
622
653
|
</div>
|
|
623
654
|
`:""}
|
|
624
655
|
</div>
|
|
625
656
|
`:""}
|
|
626
|
-
`}};ue.properties={mode:{type:String},align:{type:String},
|
|
657
|
+
`}};ue.properties={mode:{type:String},align:{type:String},view:{type:Boolean}};ue.styles=y`
|
|
627
658
|
:host {
|
|
628
659
|
display: grid;
|
|
629
660
|
position: relative;
|
|
@@ -631,79 +662,103 @@ function ir(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
|
|
|
631
662
|
}
|
|
632
663
|
|
|
633
664
|
:host([mode="portfolio"]) {
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
"
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
".
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
". nav ."
|
|
645
|
-
". . ."
|
|
646
|
-
". footer ."
|
|
647
|
-
". . .";
|
|
665
|
+
--portfolio-cols: 120px 480px 40px;
|
|
666
|
+
--portfolio-rows: 120px 120px 60px 180px 60px 120px 60px 20px 120px 120px;
|
|
667
|
+
--portfolio-areas: "square . ." ". title ." ". header ." ". projects ."
|
|
668
|
+
". . ." ". bio ." ". . ." ". nav ." ". . ." ". footer ." ". . .";
|
|
669
|
+
--portfolio-overlay-cols: 120px 480px;
|
|
670
|
+
--portfolio-overlay-areas: "square ." ". title" ". header" ". projects"
|
|
671
|
+
". ." ". bio" ". ." ". nav" ". ." ". footer" ". .";
|
|
672
|
+
grid-template-columns: var(--portfolio-cols);
|
|
673
|
+
grid-template-rows: var(--portfolio-rows);
|
|
674
|
+
grid-template-areas: var(--portfolio-areas);
|
|
648
675
|
min-height: 600px;
|
|
649
676
|
background-color: rgba(165, 165, 165, 0.03);
|
|
650
677
|
max-width: 640px;
|
|
651
|
-
margin: 0
|
|
678
|
+
margin: 0;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
:host([mode="portfolio"]) .view-overlay {
|
|
682
|
+
grid-template-columns: var(--portfolio-overlay-cols);
|
|
683
|
+
grid-template-rows: var(--portfolio-rows);
|
|
684
|
+
grid-template-areas: var(--portfolio-overlay-areas);
|
|
652
685
|
}
|
|
653
686
|
|
|
654
687
|
:host([mode="company"]) {
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
". . ."
|
|
659
|
-
". header ."
|
|
660
|
-
". . ."
|
|
661
|
-
". content ."
|
|
662
|
-
". . ."
|
|
688
|
+
--company-cols: auto 400px auto;
|
|
689
|
+
--company-rows: 80px 20px 20px 120px 20px 120px;
|
|
690
|
+
--company-areas: ". . ." ". header ." ". . ." ". content ." ". . ."
|
|
663
691
|
". footer .";
|
|
692
|
+
grid-template-columns: var(--company-cols);
|
|
693
|
+
grid-template-rows: var(--company-rows);
|
|
694
|
+
grid-template-areas: var(--company-areas);
|
|
664
695
|
gap: 0;
|
|
665
696
|
max-width: 100%;
|
|
666
697
|
}
|
|
667
698
|
|
|
668
|
-
:host([
|
|
699
|
+
:host([mode="company"]) .view-overlay {
|
|
700
|
+
grid-template-columns: var(--company-cols);
|
|
701
|
+
grid-template-rows: var(--company-rows);
|
|
702
|
+
grid-template-areas: var(--company-areas);
|
|
703
|
+
gap: 0;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
:host([align="left"]),
|
|
707
|
+
:host([mode="portfolio"][align="left"]),
|
|
708
|
+
:host([mode="company"][align="left"]),
|
|
709
|
+
:host([mode="app"][align="left"]) {
|
|
669
710
|
margin: 0;
|
|
670
711
|
justify-self: start;
|
|
671
712
|
}
|
|
672
713
|
|
|
673
|
-
:host([align="center"])
|
|
714
|
+
:host([align="center"]),
|
|
715
|
+
:host([mode="portfolio"][align="center"]),
|
|
716
|
+
:host([mode="company"][align="center"]),
|
|
717
|
+
:host([mode="app"][align="center"]) {
|
|
674
718
|
margin: 0 auto;
|
|
675
719
|
justify-self: center;
|
|
676
720
|
}
|
|
677
721
|
|
|
678
|
-
:host([align="right"])
|
|
722
|
+
:host([align="right"]),
|
|
723
|
+
:host([mode="portfolio"][align="right"]),
|
|
724
|
+
:host([mode="company"][align="right"]),
|
|
725
|
+
:host([mode="app"][align="right"]) {
|
|
679
726
|
margin: 0 0 0 auto;
|
|
680
727
|
justify-self: end;
|
|
681
728
|
}
|
|
682
729
|
|
|
683
730
|
/* App mode - Base */
|
|
684
731
|
:host([mode="app"]) {
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
732
|
+
--app-cols: calc(var(--double) * var(--sf));
|
|
733
|
+
--app-rows: calc(var(--unit) * var(--sf)) calc(var(--2) * var(--sf))
|
|
734
|
+
calc(var(--unit) * var(--sf)) calc(var(--unit) * var(--sf))
|
|
735
|
+
calc(var(--unit) * var(--sf));
|
|
736
|
+
--app-areas: "1" "." "2" "." "3";
|
|
737
|
+
--app-overlay-cols: calc(var(--oct) * var(--sf));
|
|
738
|
+
--app-overlay-rows: calc(var(--unit) * var(--sf))
|
|
739
|
+
calc(var(--double) * var(--sf)) calc(var(--unit) * var(--sf))
|
|
740
|
+
calc(var(--unit) * var(--sf));
|
|
741
|
+
--app-overlay-areas: "banner" "." "header" "." "main" "." "footer";
|
|
742
|
+
grid-template-columns: var(--app-cols);
|
|
743
|
+
grid-template-rows: var(--app-rows);
|
|
744
|
+
grid-template-areas: var(--app-areas);
|
|
691
745
|
min-height: 100vh;
|
|
692
746
|
background-color: transparent;
|
|
693
747
|
width: 100%;
|
|
694
|
-
margin: 0 auto;
|
|
695
748
|
gap: 0;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
/* App mode - with scaling factor */
|
|
699
|
-
:host([mode="app"]) {
|
|
700
749
|
max-width: calc(400px * var(--sf, 1));
|
|
701
750
|
padding: calc(60px * var(--sf, 1)) calc(28px * var(--sf, 1))
|
|
702
751
|
calc(9.751px * var(--sf, 1));
|
|
703
752
|
gap: calc(28px * var(--sf, 1));
|
|
704
753
|
}
|
|
705
754
|
|
|
706
|
-
.
|
|
755
|
+
:host([mode="app"]) .view-overlay {
|
|
756
|
+
grid-template-columns: var(--app-overlay-cols);
|
|
757
|
+
grid-template-rows: var(--app-overlay-rows);
|
|
758
|
+
grid-template-areas: var(--app-overlay-areas);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.view-overlay {
|
|
707
762
|
position: absolute;
|
|
708
763
|
margin-left: -1px;
|
|
709
764
|
top: 0;
|
|
@@ -717,37 +772,7 @@ function ir(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
|
|
|
717
772
|
font-weight: bold;
|
|
718
773
|
}
|
|
719
774
|
|
|
720
|
-
|
|
721
|
-
grid-template-columns: 120px 480px;
|
|
722
|
-
grid-template-rows: 120px 120px 60px 180px 60px 120px 60px 20px 120px 120px;
|
|
723
|
-
grid-template-areas:
|
|
724
|
-
"square ."
|
|
725
|
-
". title"
|
|
726
|
-
". header"
|
|
727
|
-
". projects"
|
|
728
|
-
". ."
|
|
729
|
-
". bio"
|
|
730
|
-
". ."
|
|
731
|
-
". nav"
|
|
732
|
-
". ."
|
|
733
|
-
". footer"
|
|
734
|
-
". .";
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
:host([mode="company"]) .debug-overlay {
|
|
738
|
-
grid-template-columns: auto 400px auto;
|
|
739
|
-
grid-template-rows: 80px 20px 20px 120px 20px 120px;
|
|
740
|
-
grid-template-areas:
|
|
741
|
-
". . ."
|
|
742
|
-
". header ."
|
|
743
|
-
". . ."
|
|
744
|
-
". content ."
|
|
745
|
-
". . ."
|
|
746
|
-
". footer .";
|
|
747
|
-
gap: 0;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
.debug-area {
|
|
775
|
+
.view-area {
|
|
751
776
|
display: flex;
|
|
752
777
|
align-items: center;
|
|
753
778
|
justify-content: center;
|
|
@@ -755,84 +780,95 @@ function ir(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
|
|
|
755
780
|
font-weight: var(--type-weight-default);
|
|
756
781
|
font-family: var(--typeface-regular);
|
|
757
782
|
color: var(--black);
|
|
758
|
-
border: 1px solid
|
|
783
|
+
border: 1px solid;
|
|
759
784
|
opacity: 1;
|
|
760
785
|
}
|
|
761
786
|
|
|
762
|
-
.
|
|
787
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(1) {
|
|
788
|
+
border-color: var(--tuned-red);
|
|
789
|
+
}
|
|
790
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(2) {
|
|
791
|
+
border-color: var(--sharp-blue);
|
|
792
|
+
}
|
|
793
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(3) {
|
|
794
|
+
border-color: var(--yellow);
|
|
795
|
+
}
|
|
796
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(4) {
|
|
797
|
+
border-color: var(--apple-green);
|
|
798
|
+
}
|
|
799
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(5) {
|
|
800
|
+
border-color: var(--pink);
|
|
801
|
+
}
|
|
802
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(6) {
|
|
803
|
+
border-color: var(--orange);
|
|
804
|
+
}
|
|
805
|
+
:host([mode="portfolio"]) .view-area:nth-of-type(7) {
|
|
806
|
+
border-color: var(--zenith-blue);
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
:host([mode="company"]) .view-area:nth-of-type(1) {
|
|
810
|
+
border-color: var(--tuned-red);
|
|
811
|
+
}
|
|
812
|
+
:host([mode="company"]) .view-area:nth-of-type(2) {
|
|
813
|
+
border-color: var(--sharp-blue);
|
|
814
|
+
}
|
|
815
|
+
:host([mode="company"]) .view-area:nth-of-type(3) {
|
|
816
|
+
border-color: var(--yellow);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
:host([mode="app"]) .view-area:nth-of-type(1) {
|
|
820
|
+
border-color: var(--tuned-red);
|
|
821
|
+
}
|
|
822
|
+
:host([mode="app"]) .view-area:nth-of-type(2) {
|
|
823
|
+
border-color: var(--sharp-blue);
|
|
824
|
+
}
|
|
825
|
+
:host([mode="app"]) .view-area:nth-of-type(3) {
|
|
826
|
+
border-color: var(--yellow);
|
|
827
|
+
}
|
|
828
|
+
:host([mode="app"]) .view-area:nth-of-type(4) {
|
|
829
|
+
border-color: var(--apple-green);
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
.view-square {
|
|
763
833
|
grid-area: square;
|
|
764
834
|
}
|
|
765
835
|
|
|
766
|
-
.
|
|
836
|
+
.view-title {
|
|
767
837
|
grid-area: title;
|
|
768
838
|
}
|
|
769
839
|
|
|
770
|
-
.
|
|
840
|
+
.view-header {
|
|
771
841
|
grid-area: header;
|
|
772
|
-
border-color: #0000ff;
|
|
773
842
|
}
|
|
774
843
|
|
|
775
|
-
.
|
|
844
|
+
.view-projects {
|
|
776
845
|
grid-area: projects;
|
|
777
|
-
border-color: #ffff00;
|
|
778
846
|
}
|
|
779
847
|
|
|
780
|
-
.
|
|
848
|
+
.view-bio {
|
|
781
849
|
grid-area: bio;
|
|
782
|
-
border-color: #ff00ff;
|
|
783
850
|
}
|
|
784
851
|
|
|
785
|
-
.
|
|
852
|
+
.view-nav {
|
|
786
853
|
grid-area: nav;
|
|
787
|
-
border-color: #00ffff;
|
|
788
854
|
}
|
|
789
855
|
|
|
790
|
-
.
|
|
856
|
+
.view-footer {
|
|
791
857
|
grid-area: footer;
|
|
792
|
-
border-color: rgb(24, 147, 73);
|
|
793
|
-
background-color: rgba(127, 123, 11, 0.1);
|
|
794
858
|
}
|
|
795
859
|
|
|
796
|
-
.
|
|
860
|
+
.view-content {
|
|
797
861
|
grid-area: content;
|
|
798
|
-
border-color: rgba(71, 231, 71, 0.63);
|
|
799
862
|
}
|
|
800
863
|
|
|
801
|
-
|
|
802
|
-
grid-template-columns: 1fr;
|
|
803
|
-
grid-template-rows:
|
|
804
|
-
calc(var(--1) * var(--sf))
|
|
805
|
-
calc(var(--2) * var(--sf))
|
|
806
|
-
calc(var(--4) * var(--sf))
|
|
807
|
-
calc(var(--1) * var(--sf));
|
|
808
|
-
grid-template-areas:
|
|
809
|
-
"banner"
|
|
810
|
-
"header"
|
|
811
|
-
"main"
|
|
812
|
-
"footer";
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
.debug-banner {
|
|
864
|
+
.view-banner {
|
|
816
865
|
grid-area: banner;
|
|
817
|
-
border-color: #daed09;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
.debug-header {
|
|
821
|
-
grid-area: header;
|
|
822
|
-
border-color: #0000ff;
|
|
823
|
-
background-color: rgba(127, 123, 11, 0.5);
|
|
824
866
|
}
|
|
825
867
|
|
|
826
|
-
.
|
|
868
|
+
.view-main {
|
|
827
869
|
grid-area: main;
|
|
828
|
-
border-color: #0000ff;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
.debug-footer-app {
|
|
832
|
-
grid-area: footer;
|
|
833
|
-
border-color: #ffa500;
|
|
834
870
|
}
|
|
835
|
-
`;customElements.define("ds-layout",ue);export{ne as Button,Ie as Cycle,Oe as DateComponent,ce as DsTable,de as Grid,q as Icon,ue as Layout,Pe as List,le as Row,Ne as Text,ae as Tooltip,S as currentLanguage,B as currentTheme,
|
|
871
|
+
`;customElements.define("ds-layout",ue);export{ne as Button,Ve as Container,Ie as Cycle,Oe as DateComponent,ce as DsTable,de as Grid,q as Icon,ue as Layout,Pe as List,le as Row,Ne as Text,ae as Tooltip,S as currentLanguage,B as currentTheme,Me as detectMobileDevice,as as getAvailableLanguages,Re as getAvailableLanguagesSync,mr as getBrowserLanguage,ar as getDeviceInfo,wt as getLanguageDisplayName,us as getPriceLabel,bt as getText,os as hasTranslation,He as initDeviceDetection,ls as loadTranslations,P as savePreferences,De as setLanguage,jt as setTheme,E as translate};
|
|
836
872
|
/*! Bundled license information:
|
|
837
873
|
|
|
838
874
|
signal-polyfill/dist/index.js:
|