tosijs-ui 1.7.2 → 1.7.3
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/CHANGELOG.md +35 -0
- package/dist/color-input.d.ts +0 -1
- package/dist/color-input.js +24 -10
- package/dist/doc-browser.js +4 -2
- package/dist/doc-system/doc-system-styles.d.ts +2 -0
- package/dist/doc-system/doc-system-styles.js +15 -1
- package/dist/doc-system/site/check-examples-cli.js +5 -3
- package/dist/doc-system/site/check-examples.d.ts +13 -0
- package/dist/doc-system/site/check-examples.js +26 -10
- package/dist/doc-system/site/orchestrator.js +15 -2
- package/dist/form.d.ts +0 -1
- package/dist/form.js +35 -21
- package/dist/hydrate/hydrate.js +82 -82
- package/dist/hydrate/hydrate.js.map +15 -14
- package/dist/iife.js +114 -114
- package/dist/iife.js.map +15 -14
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/live-example/code-transform.d.ts +14 -0
- package/dist/live-example/code-transform.js +20 -2
- package/dist/live-example/component.d.ts +24 -51
- package/dist/live-example/component.js +44 -51
- package/dist/live-example/styles.d.ts +22 -50
- package/dist/live-example/styles.js +48 -49
- package/dist/live-example/types.d.ts +2 -2
- package/dist/pocket-bar.d.ts +99 -0
- package/dist/pocket-bar.js +298 -0
- package/dist/pop-float.d.ts +1 -1
- package/dist/pop-float.js +13 -7
- package/dist/segmented.d.ts +0 -1
- package/dist/segmented.js +38 -20
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/llms.txt +3 -1
- package/package.json +3 -3
package/dist/hydrate/hydrate.js
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import{Sa as c5,Ta as V2}from"./index-iife-415dypjp.js";var T9={};c5(T9,{xrControllersText:()=>xk,xrControllers:()=>yk,xinTagList:()=>xg,xinTag:()=>ek,xinTabs:()=>Rl,xinTable:()=>RC,xinSizer:()=>fk,xinSidenav:()=>Vi,xinSelect:()=>KC,xinSegmented:()=>rk,xinRating:()=>$k,xinPasswordStrength:()=>Qk,xinNotification:()=>Sl,xinMenu:()=>jC,xinMd:()=>Kk,xinLocalized:()=>OC,xinForm:()=>bi,xinFloat:()=>oh,xinField:()=>Hi,xinCarousel:()=>Th,wrapIcon:()=>C3,version:()=>Zy,valueRenderer:()=>O3,updateLocalized:()=>U3,trackDrag:()=>P1,tosijs:()=>k0,tosiThemeEditor:()=>jk,tosiTagList:()=>Jy,tosiTag:()=>s9,tosiTabs:()=>X0,tosiTable:()=>W3,tosiSizer:()=>Yy,tosiSidenav:()=>Z0,tosiSelect:()=>F1,tosiSegmented:()=>Xy,tosiRow:()=>hk,tosiRouteView:()=>Ik,tosiRichText:()=>Fy,tosiRating:()=>Ay,tosiPasswordStrength:()=>_y,tosiNotification:()=>n3,tosiMonth:()=>Fk,tosiMenu:()=>I6,tosiMd:()=>N9,tosiLocalized:()=>Q1,tosiLocalePicker:()=>o6,tosiHeaderLinks:()=>ti,tosiHeader:()=>mi,tosiGrid:()=>lk,tosiForm:()=>n4,tosiFloat:()=>z0,tosiField:()=>o4,tosiDocSystem:()=>Ti,tosiDiff:()=>w0,tosiDialog:()=>$4,tosiColumn:()=>Ck,tosiCarousel:()=>q6,testManager:()=>_1,tabSelector:()=>vl,svgIcon:()=>bh,svg2DataUrl:()=>g0,styleSheet:()=>B4,spacer:()=>X9,sizeBreak:()=>ok,sideNav:()=>ji,setLocale:()=>O4,scriptTag:()=>b1,runTests:()=>c4,router:()=>M0,richTextWidgets:()=>Gy,richText:()=>Rk,rewriteImports:()=>Y1,resolveMenuItems:()=>G1,resolveIcon:()=>e1,removeLastMenu:()=>h1,postNotification:()=>f3,positionFloat:()=>O6,popMenu:()=>n,popFloat:()=>q0,popDropMenu:()=>M6,parseValueType:()=>f6,parseShortcut:()=>_4,navigate:()=>Mk,modifierKeys:()=>fh,menu:()=>b6,matchShortcut:()=>z3,markdownViewer:()=>Ak,mapBox:()=>Pk,makeSorter:()=>P4,localize:()=>c,localePicker:()=>FC,loadTransform:()=>Y0,liveTheme:()=>r,liveExample:()=>T4,legacyAliases:()=>By,keystroke:()=>uh,keycode:()=>Q6,isBreached:()=>Py,insertExamples:()=>M4,initTooltips:()=>Bg,initLocalization:()=>G3,icons:()=>O,iconRules:()=>h3,i18n:()=>L,getRouterParams:()=>Dk,gamepadText:()=>ei,gamepadState:()=>iy,findShortcutAction:()=>K3,findHighestZ:()=>P2,filterPart:()=>f4,filterForDrop:()=>V0,filterForClick:()=>P3,filterBuilder:()=>Ei,expect:()=>h9,executeInline:()=>b4,executeInIframe:()=>S4,executeCode:()=>Q7,enableTests:()=>g9,enableLiveTheme:()=>qy,elastic:()=>ik,editableRect:()=>ri,dragAndDrop:()=>U4,displayShortcut:()=>A4,disableTests:()=>w9,disableLiveTheme:()=>qk,digest:()=>Vy,diffLines:()=>P6,defineRoutes:()=>Sk,defineIcons:()=>Zh,defaultColors:()=>s1,dataTable:()=>vC,createThemeWithLegacy:()=>wk,createTheme:()=>s2,createTestContext:()=>C9,createSubMenu:()=>_3,createMenuItem:()=>H6,createMenuAction:()=>R6,createDropMenuItem:()=>D6,createDocBrowser:()=>z9,createDarkTheme:()=>u4,createColorVariables:()=>wy,componentVars:()=>Bk,commandButton:()=>p1,colorInput:()=>B3,codeEditor:()=>n1,canonicalShortcut:()=>ah,bringToFront:()=>x2,bodymovinPlayer:()=>Ih,blockStyle:()=>H9,baseVariables:()=>gy,baseTheme:()=>kk,baseDarkTheme:()=>gk,b3d:()=>Mh,availableFilters:()=>_9,applyTheme:()=>$9,applyLocalized:()=>A0,abTest:()=>Jh,XinWord:()=>vk,XinTagList:()=>yg,XinTag:()=>tk,XinSizer:()=>nk,XinSelect:()=>AC,XinSegmented:()=>Lk,XinRating:()=>Xk,XinPasswordStrength:()=>Wk,XinNotification:()=>bl,XinMenu:()=>VC,XinLocalized:()=>F4,XinForm:()=>Di,XinFloat:()=>rh,XinField:()=>Ri,XinCarousel:()=>sh,TosiThemeEditor:()=>Y9,TosiTagList:()=>L2,TosiTag:()=>c0,TosiTabs:()=>D4,TosiTable:()=>X4,TosiSizer:()=>i5,TosiSidenav:()=>I2,TosiSelect:()=>S1,TosiSegmented:()=>d2,TosiRow:()=>O9,TosiRouteView:()=>M9,TosiRating:()=>x5,TosiPasswordStrength:()=>y5,TosiNotification:()=>h2,TosiMonth:()=>v9,TosiMenu:()=>G4,TosiMd:()=>t4,TosiLocalized:()=>M1,TosiLocalePicker:()=>W4,TosiHeaderLinks:()=>G9,TosiHeader:()=>U9,TosiGrid:()=>Q9,TosiForm:()=>r4,TosiFloat:()=>f1,TosiField:()=>L4,TosiDocSystem:()=>V9,TosiDiff:()=>g3,TosiDialog:()=>N3,TosiColumn:()=>W9,TosiCarousel:()=>q4,TabSelector:()=>pl,SvgIcon:()=>l3,SizeBreak:()=>I9,SideNav:()=>qi,STORAGE_KEY:()=>H4,RichText:()=>h5,RemoteSyncManager:()=>N0,MarkdownViewer:()=>_k,MapBox:()=>G2,LocalePicker:()=>GC,LiveExample:()=>l2,FilterPart:()=>A9,FilterBuilder:()=>K9,EditableRect:()=>Z1,DataTable:()=>pC,CodeEditor:()=>o1,BodymovinPlayer:()=>Z2,B3d:()=>i3,AbTest:()=>J2});var k0={};c5(k0,{xinValue:()=>lx,xinSlot:()=>lh,xinProxy:()=>i6,xinPath:()=>Cx,xin:()=>l1,warnDeprecated:()=>j1,version:()=>l6,vars:()=>z,varDefault:()=>P,validateAgainstConstraints:()=>y6,updates:()=>d5,unobserve:()=>x0,touchElement:()=>u5,touch:()=>O1,tosiValue:()=>b,tosiUnique:()=>Oh,tosiSlot:()=>Ch,tosiSetValue:()=>hx,tosiPath:()=>V1,tosiLoader:()=>$h,tosiBlueprint:()=>Xh,tosiAccessor:()=>xx,tosi:()=>t,throttle:()=>X2,sync:()=>Gh,svgElements:()=>l4,share:()=>Ah,settings:()=>a0,scrollListItemIntoView:()=>Ex,onThemePreferencesChange:()=>Dx,onStylesheetChange:()=>Jx,on:()=>N2,observe:()=>n5,mathML:()=>E8,makeComponent:()=>m5,invertLuminance:()=>i0,initVars:()=>Rx,hotReload:()=>ih,getThemePreferences:()=>n8,getListItem:()=>q2,getListInstance:()=>f5,getListBinding:()=>Y2,getCssVar:()=>T8,elements:()=>G,deprecated:()=>B1,deleteListItem:()=>fx,debounce:()=>l0,css:()=>$2,boxedProxy:()=>a5,boxed:()=>U1,blueprintLoader:()=>Nh,blueprint:()=>Yh,bindings:()=>r1,bindParts:()=>Mx,bind:()=>d1,TOSI_ACCESSOR:()=>T5,TAKE_DESCRIPTOR:()=>x4,StyleSheet:()=>W1,MoreMath:()=>$x,Component:()=>F,Color:()=>X,BlueprintLoader:()=>t5,Blueprint:()=>g4});function D1(y,x){if(y==null||typeof y!=="object")return y;if(y instanceof Date)return new Date(y.getTime());if(x===void 0)x=new WeakMap;else if(x.has(y))return x.get(y);if(y instanceof Set){let C=new Set;x.set(y,C);for(let l of y)C.add(D1(l,x));return C}if(y instanceof Map){let C=new Map;x.set(y,C);for(let[l,i]of y)C.set(D1(l,x),D1(i,x));return C}if(Array.isArray(y)){let C=[];x.set(y,C);for(let l of y)C.push(D1(l,x));return C}let h={};x.set(y,h);for(let C in y)h[C]=D1(y[C],x);return h}var s5="-xin-data",B2=`.${s5}`,p8="-xin-event",h8=`.${p8}`,H1=Symbol.for("xin-path"),z2=Symbol.for("xin-value"),ay="xinObserve",my="xinBind",ty="xinOn",T5=Symbol.for("tosi-accessor"),x4=Symbol.for("tosi-take"),E0=Symbol("list-binding"),Q2=Symbol("list-instance"),X5=new Map;function ey(y,x){let h=X5.get(y);if(h===void 0)h=new Set,X5.set(y,h);h.add(x)}function yx(y){return X5.get(y)}var C8=new Set;function j1(y,x){if(!C8.has(y))console.warn(x),C8.add(y)}function B1(y,x){let h=!1;return(...C)=>{if(!h)console.warn(x),h=!0;return y(...C)}}var V1=(y)=>{return y&&y[H1]||void 0};function b(y){if(typeof y==="object"&&y!==null){let x=y[z2];return x!==void 0?x:y}return y}function xx(y){return y!=null?y[T5]:void 0}function hx(y,x){if(V1(y)===void 0)throw Error("tosiSetValue requires a xin or boxed proxy");y[z2]=x}var Cx=B1(V1,"xinPath is deprecated. Use tosiPath instead."),lx=B1(b,"xinValue is deprecated. Use tosiValue instead."),t2=new WeakMap,L1=new WeakMap,e2=(y)=>{let x=y.cloneNode();if(x instanceof Element){let C=L1.get(y),l=t2.get(y);if(C!=null)L1.set(x,D1(C));if(l!=null)t2.set(x,D1(l))}let h=x instanceof HTMLTemplateElement?x.content:x;for(let C of Array.from(y instanceof HTMLTemplateElement?y.content.childNodes:y.childNodes))if(C instanceof Element||C instanceof DocumentFragment)h.appendChild(e2(C));else h.appendChild(C.cloneNode());return x},a0={debug:!1,perf:!1},ix=(y)=>{try{return JSON.stringify(y)}catch(x){return"{has circular references}"}},v8=(...y)=>Error(y.map(ix).join(" ")),kx=()=>new Date(parseInt("1000000000",36)+Date.now()).valueOf().toString(36).slice(1),gx=0,wx=()=>(parseInt("10000",36)+ ++gx).toString(36).slice(-5),R8=()=>kx()+wx(),$5=Symbol("delete"),D8=Symbol("new-object"),A5=Symbol("automatic-index");function H8(y){if(y==="")return[];if(Array.isArray(y))return y;else{let x=[];while(y.length>0){let h=y.search(/\[[^\]]+\]/);if(h===-1){x.push(y.split("."));break}else{let C=y.slice(0,h);if(y=y.slice(h),C!=="")x.push(C.split("."));if(h=y.indexOf("]")+1,x.push(y.slice(1,h-1)),y.slice(h,h+1)===".")h+=1;y=y.slice(h)}}return x}}var w2=new WeakMap;function b8(y,x){if(w2.get(y)===void 0)w2.set(y,{});let h={};if(w2.get(y)[x]=h,x==="_auto_")y.forEach((C,l)=>{if(C[A5]===void 0)C[A5]=R8();h[C[A5]+""]=l});else y.forEach((C,l)=>{h[y1(C,x)+""]=l});return h}function Bx(y,x){if(w2.get(y)===void 0||w2.get(y)[x]===void 0)return b8(y,x);else return w2.get(y)[x]}function zx(y,x,h){h=h+"";let C=Bx(y,x)[h];if(C===void 0||y1(y[C],x)+""!==h)C=b8(y,x)[h];return C}function qx(y,x,h){if(y[x]===void 0&&h!==void 0)y[x]=h;return y[x]}function S8(y,x,h,C){let l=x!==""?zx(y,x,h):h;if(C===$5){if(l!==void 0)y.splice(l,1),w2.delete(y);return Symbol("deleted")}else if(C===D8){if(x===""&&y[l]===void 0)y[l]={}}else if(C!==void 0)if(l!==void 0)y[l]=C;else if(x!==""&&y1(C,x)+""===h+"")y.push(C),l=y.length-1;else throw Error(`byIdPath insert failed at [${x}=${h}]`);return y[l]}function l8(y){if(!Array.isArray(y))throw v8("setByPath failed: expected array, found",y)}function i8(y){if(y==null||!(y instanceof Object))throw v8("setByPath failed: expected Object, found",y)}function y1(y,x){let h=H8(x),C=y,l,i,k,g;for(l=0,i=h.length;C!==void 0&&l<i;l++){let w=h[l];if(Array.isArray(w))for(k=0,g=w.length;C!==void 0&&k<g;k++){let B=w[k];C=C[B]}else if(C.length===0){if(C=C[Number(w.slice(1))],w[0]!=="=")return}else if(w.includes("=")){let[B,...q]=w.split("=");C=S8(C,B,q.join("="))}else k=parseInt(w,10),C=C[k]}return C}function h4(y,x,h){let C=y;if(x==="")throw Error("setByPath cannot be used to set the root object");let l=H8(x);while(C!=null&&l.length>0){let i=l.shift();if(typeof i==="string"){let k=i.indexOf("=");if(k>-1){if(k===0)i8(C);else l8(C);let g=i.slice(0,k),w=i.slice(k+1);if(C=S8(C,g,w,l.length>0?D8:h),l.length===0)return!0}else{l8(C);let g=parseInt(i,10);if(l.length>0)C=C[g];else{if(h!==$5){if(C[g]===h)return!1;C[g]=h}else C.splice(g,1);return!0}}}else if(Array.isArray(i)&&i.length>0){i8(C);while(i.length>0){let k=i.shift();if(i.length>0||l.length>0)C=qx(C,k,i.length>0?{}:[]);else{if(h!==$5){if(C[k]===h)return!1;C[k]=h}else{if(!Object.prototype.hasOwnProperty.call(C,k))return!1;delete C[k]}return!0}}}else throw Error(`setByPath failed, bad path ${x}`)}throw Error(`setByPath(${y}, ${x}, ${h}) failed`)}var w1={},Y5=null,jx=(y)=>{Y5=y},C4=()=>{if(Y5===null)throw Error("xin proxy not initialized");return Y5},N5=null,J5=null,Vx=(y,x)=>{N5=y,J5=x},Px=()=>{if(N5===null)throw Error("bind not initialized");return N5},_x=()=>{if(J5===null)throw Error("on not initialized");return J5},k8=Symbol("observer should be removed"),m0=[],W2=[],Z5=!1,p5,v5;function Ax(y,x,h,C){let l=yx(y);if(l===void 0)return[];let i=[];for(let k of l){let g=y1(h,k);if(g!==void 0)i.push(`${y}[${k}=${g}]${C}`)}return i}var y0=(y,x)=>{if(!x.startsWith(y))return!1;if(x.length===y.length)return!0;let h=x.charAt(y.length);return h==="."||h==="["};class M8{description;test;callback;constructor(y,x){let h=typeof x==="string"?`"${x}"`:`function ${x.name}`,C;if(typeof y==="string")this.test=(l)=>typeof l==="string"&&l!==""&&(y0(l,y)||y0(y,l)),C=`test = "${y}"`;else if(y instanceof RegExp)this.test=y.test.bind(y),C=`test = "${y.toString()}"`;else if(y instanceof Function)this.test=y,C=`test = function ${y.name}`;else throw Error("expect listener test to be a string, RegExp, or test function");if(this.description=`${C}, ${h}`,typeof x==="function")this.callback=x;else throw Error("expect callback to be a path or function");m0.push(this)}}var d5=async()=>{if(p5===void 0)return;await p5},Kx=()=>{if(a0.perf)console.time("xin async update");let y=Array.from(W2);W2.length=0,Z5=!1;let x=v5;v5=void 0;try{for(let h of y)m0.filter((C)=>{let l;try{l=C.test(h)}catch(i){return console.error(`Listener ${C.description} threw "${i}" at "${h}"`),!1}if(l===k8)return x0(C),!1;return l}).forEach((C)=>{let l;try{l=C.callback(h)}catch(i){console.error(`Listener ${C.description} threw "${i}" handling "${h}"`)}if(l===k8)x0(C)})}finally{if(typeof x==="function")x();if(a0.perf)console.timeEnd("xin async update")}},O1=(y)=>{let x=typeof y==="string"?y:V1(y);if(x===void 0)throw console.error("touch was called on an invalid target",y),Error("touch was called on an invalid target");if(Z5===!1)p5=new Promise((C)=>{v5=C}),Z5=setTimeout(Kx);if(W2.find((C)=>y0(C,x))==null)W2.push(x);let h=x.match(/^(.+)\[(\d+)\](.*)$/);if(h!==null){let[,C,l,i]=h,k=parseInt(l,10),g=y1(w1,`${C}[${k}]`);if(g!=null){let w=Ax(C,k,g,i);for(let B of w)if(W2.find((q)=>y0(q,B))==null)W2.push(B)}}},C0=(y,x)=>{return new M8(y,x)},x0=(y)=>{let x=m0.indexOf(y);if(x>-1)m0.splice(x,1);else throw Error("unobserve failed, listener not found")},I8=(y,x,{bubbles:h=!1,composed:C=!1}={})=>{let l=new Event(x,{bubbles:h,composed:C});y.dispatchEvent(l)},c8=(y)=>{if(y instanceof HTMLInputElement)return y.type;else if(y instanceof HTMLSelectElement&&y.hasAttribute("multiple"))return"multi-select";else return"other"},q1=(y,x=2)=>String(y).padStart(x,"0"),Ux=(y,x)=>{switch(y){case"date":return`${x.getUTCFullYear()}-${q1(x.getUTCMonth()+1)}-${q1(x.getUTCDate())}`;case"month":return`${x.getUTCFullYear()}-${q1(x.getUTCMonth()+1)}`;case"datetime-local":return`${x.getFullYear()}-${q1(x.getMonth()+1)}-${q1(x.getDate())}T${q1(x.getHours())}:${q1(x.getMinutes())}`;default:return x.toISOString()}},Gx=(y)=>{let x=Math.floor(y/1000),h=`${q1(Math.floor(x/3600))}:${q1(Math.floor(x/60)%60)}`;return x%60===0?h:`${h}:${q1(x%60)}`},Fx=(y)=>{let x=y.match(/^(\d\d):(\d\d)(?::(\d\d)(?:\.(\d+))?)?$/);if(x==null)return NaN;let[,h,C,l,i]=x;return(Number(h)*60+Number(C))*60000+Number(l??0)*1000+Number(i??0)},Ox=(y,x)=>{let h=c8(y);switch(h){case"radio":y.checked=x!=null&&y.value===String(x);break;case"checkbox":y.checked=!!x;break;case"date":case"datetime-local":case"month":case"week":{let C=y;if(x==null||x==="")C.value="";else if(x instanceof Date||typeof x==="number"){let l=x instanceof Date?x:new Date(x);if(h==="week")try{C.valueAsDate=l}catch(i){}else C.value=Ux(h,l)}else C.value=String(x);break}case"time":{let C=y;if(x==null||x==="")C.value="";else if(typeof x==="number")C.value=Gx(x);else if(x instanceof Date)C.value=`${q1(x.getHours())}:${q1(x.getMinutes())}:${q1(x.getSeconds())}`;else C.value=String(x);break}case"multi-select":for(let C of Array.from(y.querySelectorAll("option")))C.selected=Array.isArray(x)?x.map(String).includes(C.value):x!=null?!!x[C.value]:!1;break;default:y.value=x==null?"":x}},Wx=(y)=>{switch(c8(y)){case"radio":{let x=y.parentElement?.querySelector(`[name="${y.name}"]:checked`);return x!=null?x.value:null}case"checkbox":return y.checked;case"number":case"range":{let x=y,h=typeof x.valueAsNumber==="number"?x.valueAsNumber:Number(x.value);return Number.isNaN(h)?x.value:h}case"date":case"datetime-local":case"month":case"week":{let x=y,h=x.valueAsDate??(x.value!==""?new Date(x.value):null);return h!=null&&!Number.isNaN(h.getTime())?h:x.value}case"time":{let x=y,h=typeof x.valueAsNumber==="number"?x.valueAsNumber:NaN;if(Number.isNaN(h))h=Fx(x.value);return Number.isNaN(h)?x.value:h}case"multi-select":return Array.from(y.querySelectorAll("option")).reduce((x,h)=>{return x[h.value]=h.selected,x},{});default:return y.value}},{ResizeObserver:g8}=globalThis,R5=g8!=null?new g8((y)=>{for(let x of y){let h=x.target;I8(h,"resize")}}):{observe(){},unobserve(){}},w8=(y,x,h=!0)=>{if(y!=null&&x!=null)if(typeof x==="string")y.textContent=x;else if(Array.isArray(x))x.forEach((C)=>{y.append(C instanceof Node&&h?e2(C):C)});else if(x instanceof Node)y.append(h?e2(x):x);else throw Error("expect text content or document node")},l0=(y,x=250)=>{let h;return function(...C){if(h!==void 0)clearTimeout(h);h=setTimeout(()=>{y.apply(this,C)},x)}},X2=(y,x=250)=>{let h,C=Date.now()-x;return function(...l){clearTimeout(h);let i=Date.now()-C;if(i>=x)C=Date.now(),y.apply(this,l);else h=setTimeout(()=>{C=Date.now(),y.apply(this,l)},x-i)}},r1={value:{toDOM:Ox,fromDOM(y){return Wx(y)}},text:{toDOM(y,x){y.textContent=x}},enabled:{toDOM(y,x){y.disabled=!x}},disabled:{toDOM(y,x){y.disabled=Boolean(x)}},list:{toDOM(y,x,h){Y2(y,x,h).update(x)}}};function K1(y){return y.replace(/[A-Z]/g,(x)=>{return`-${x.toLocaleLowerCase()}`})}function s8(y){return y.replace(/-([a-z])/g,(x,h)=>{return h.toLocaleUpperCase()})}var Qx=180/Math.PI,Xx=Math.PI/180;function R1(y,x,h){return h<y?NaN:x<y?y:x>h?h:x}function a1(y,x,h,C=!0){if(C)h=R1(0,h,1);return h*(x-y)+y}var $x={RADIANS_TO_DEGREES:Qx,DEGREES_TO_RADIANS:Xx,clamp:R1,lerp:a1};function T8(y,x=document.body){let h=getComputedStyle(x);if(y.endsWith(")")&&y.startsWith("var("))y=y.slice(4,-1);return h.getPropertyValue(y).trim()}var d8={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Yx=(y,x,h)=>{return(0.299*y+0.587*x+0.114*h)/255},k2=(y)=>("00"+Math.round(Number(y)).toString(16)).slice(-2);class L8{h;s;l;constructor(y,x,h){y/=255,x/=255,h/=255;let C=Math.max(y,x,h),l=C-Math.min(y,x,h),i=l!==0?C===y?(x-h)/l:C===x?2+(h-y)/l:4+(y-x)/l:0;this.h=60*i<0?60*i+360:60*i,this.s=l!==0?C<=0.5?l/(2*C-l):l/(2-(2*C-l)):0,this.l=(2*C-l)/2}}var m1=globalThis.document!==void 0?globalThis.document.createElement("span"):void 0;if(m1)m1.style.display="none";class X{r;g;b;a;static fromVar(y,x=document.body){return X.fromCss(T8(y,x))}static fromCss(y){let x=d8[String(y).trim().toLowerCase()];if(x!==void 0)y=x;let h=y.match(/^#([0-9a-fA-F]+)$/);if(h){let B=h[1],q=(j,_)=>parseInt(B.slice(j,j+_),16);if(B.length===3||B.length===4){let j=(_)=>q(_,1)*17;return new X(j(0),j(1),j(2),B.length===4?j(3)/255:1)}if(B.length===6||B.length===8)return new X(q(0,2),q(2,2),q(4,2),B.length===8?q(6,2)/255:1)}let C=y;if(m1 instanceof HTMLSpanElement)m1.style.color="black",m1.style.color=y,document.body.appendChild(m1),C=getComputedStyle(m1).color,m1.remove();let[l,i,k,g]=C.match(/[\d.]+/g)||["0","0","0","0"],w=C.startsWith("color(srgb")?255:1;return new X(Number(l)*w,Number(i)*w,Number(k)*w,g==null?1:Number(g))}static fromHsl(y,x,h,C=1){let l,i,k;if(x===0)l=i=k=h;else{let w=(_,K,U)=>{if(U<0)U+=1;if(U>1)U-=1;if(U<0.16666666666666666)return _+(K-_)*6*U;if(U<0.5)return K;if(U<0.6666666666666666)return _+(K-_)*(0.6666666666666666-U)*6;return _},B=h<0.5?h*(1+x):h+x-h*x,q=2*h-B,j=(y%360+360)%360/360;l=w(q,B,j+0.3333333333333333),i=w(q,B,j),k=w(q,B,j-0.3333333333333333)}let g=new X(l*255,i*255,k*255,C);return g.hslCached={h:(y%360+360)%360,s:x,l:h},g}static black=new X(0,0,0);static white=new X(255,255,255);constructor(y,x,h,C=1){this.r=R1(0,y,255),this.g=R1(0,x,255),this.b=R1(0,h,255),this.a=R1(0,C,1)}get inverse(){return new X(255-this.r,255-this.g,255-this.b,this.a)}get inverseLuminance(){let{h:y,s:x,l:h}=this._hsl;return X.fromHsl(y,x,1-h,this.a)}get opaque(){return this.a===1?this:new X(this.r,this.g,this.b,1)}contrasting(y=1){return this.opaque.blend(this.brightness>0.5?X.black:X.white,y)}get rgb(){let{r:y,g:x,b:h}=this;return`rgb(${y.toFixed(0)},${x.toFixed(0)},${h.toFixed(0)})`}get rgba(){let{r:y,g:x,b:h,a:C}=this;return`rgba(${y.toFixed(0)},${x.toFixed(0)},${h.toFixed(0)},${C.toFixed(2)})`}get RGBA(){return[this.r/255,this.g/255,this.b/255,this.a]}get ARGB(){return[this.a,this.r/255,this.g/255,this.b/255]}hslCached;get _hsl(){if(this.hslCached==null)this.hslCached=new L8(this.r,this.g,this.b);return this.hslCached}get hsl(){let{h:y,s:x,l:h}=this._hsl;return`hsl(${y.toFixed(0)}deg ${(x*100).toFixed(0)}% ${(h*100).toFixed(0)}%)`}get hsla(){let{h:y,s:x,l:h}=this._hsl;return`hsl(${y.toFixed(0)}deg ${(x*100).toFixed(0)}% ${(h*100).toFixed(0)}% / ${(this.a*100).toFixed(0)}%)`}get mono(){let y=this.brightness*255;return new X(y,y,y)}get brightness(){return Yx(this.r,this.g,this.b)}get html(){return this.toString()}toString(){return this.a===1?"#"+k2(this.r)+k2(this.g)+k2(this.b):"#"+k2(this.r)+k2(this.g)+k2(this.b)+k2(255*this.a)}brighten(y){let{h:x,s:h,l:C}=this._hsl,l=R1(0,C+y*(1-C),1);return X.fromHsl(x,h,l,this.a)}darken(y){let{h:x,s:h,l:C}=this._hsl,l=R1(0,C*(1-y),1);return X.fromHsl(x,h,l,this.a)}saturate(y){let{h:x,s:h,l:C}=this._hsl,l=R1(0,h+y*(1-h),1);return X.fromHsl(x,l,C,this.a)}desaturate(y){let{h:x,s:h,l:C}=this._hsl,l=R1(0,h*(1-y),1);return X.fromHsl(x,l,C,this.a)}rotate(y){let{h:x,s:h,l:C}=this._hsl,l=(x+360+y)%360;return X.fromHsl(l,h,C,this.a)}opacity(y){let{h:x,s:h,l:C}=this._hsl;return X.fromHsl(x,h,C,y)}swatch(){return console.log(`%c %c ${this.html}, ${this.rgba}`,`background-color: ${this.html}`,"background-color: transparent"),this}blend(y,x){return new X(a1(this.r,y.r,x),a1(this.g,y.g,x),a1(this.b,y.b,x),a1(this.a,y.a,x))}static blendHue(y,x,h){let C=(x-y+720)%360;if(C<180)return y+h*C;else return y-(360-C)*h}mix(y,x){let h=this._hsl,C=y._hsl;return X.fromHsl(h.s===0?C.h:C.s===0?h.h:X.blendHue(h.h,C.h,x),a1(h.s,C.s,x),a1(h.l,C.l,x),a1(this.a,y.a,x))}colorMix(y,x){return X.fromCss(`color-mix(in hsl, ${this.html}, ${y.html} ${(x*100).toFixed(0)}%)`)}static computedColorStylesheet=null;static computedColors=new Map;static recomputeQueued=!1;static registerComputedColor(y,x,h,C){if(!X.computedColors.has(y))X.computedColors.set(y,{varName:x,scale:h,method:C}),X.queueRecompute()}static queueRecompute(){if(X.recomputeQueued)return;X.recomputeQueued=!0,queueMicrotask(()=>{X.recomputeQueued=!1,X.recomputeColors()})}static recomputeColors(){if(X.computedColors.size===0)return;let y=[];for(let[h,{varName:C,scale:l,method:i}]of X.computedColors)try{let k=X.fromVar(C),g;switch(i){case"b":g=l>0?k.brighten(l):k.darken(-l);break;case"s":g=l>0?k.saturate(l):k.desaturate(-l);break;case"h":g=k.rotate(l*100);break;case"o":g=k.opacity(l);break;default:continue}y.push(` ${h}: ${g.rgba};`)}catch(k){}if(y.length===0)return;let x=`:root {
|
|
1
|
+
import{Sa as c5,Ta as X2}from"./index-iife-415dypjp.js";var u9={};c5(u9,{xrControllersText:()=>Vw,xrControllers:()=>jw,xinTagList:()=>Vg,xinTag:()=>lg,xinTabs:()=>Tk,xinTable:()=>TC,xinSizer:()=>kg,xinSidenav:()=>iB,xinSelect:()=>YC,xinSegmented:()=>xg,xinRating:()=>Iw,xinPasswordStrength:()=>Mw,xinNotification:()=>uk,xinMenu:()=>GC,xinMd:()=>Jw,xinLocalized:()=>WC,xinForm:()=>rB,xinFloat:()=>ah,xinField:()=>uB,xinCarousel:()=>mh,wrapIcon:()=>k3,version:()=>vy,valueRenderer:()=>Y3,updateLocalized:()=>Q3,trackDrag:()=>_1,tosijs:()=>g0,tosiThemeEditor:()=>Yw,tosiTagList:()=>Hy,tosiTag:()=>s9,tosiTabs:()=>F0,tosiTable:()=>i3,tosiSizer:()=>Ry,tosiSidenav:()=>Z0,tosiSelect:()=>Q1,tosiSegmented:()=>Jy,tosiRow:()=>Xw,tosiRouteView:()=>Ew,tosiRichText:()=>iy,tosiRating:()=>Qy,tosiPocketBar:()=>n3,tosiPasswordStrength:()=>Uy,tosiNotification:()=>o3,tosiMonth:()=>Dw,tosiMenu:()=>c6,tosiMd:()=>D9,tosiLocalized:()=>i1,tosiLocalePicker:()=>n6,tosiHeaderLinks:()=>qw,tosiHeader:()=>zw,tosiGrid:()=>Aw,tosiForm:()=>m4,tosiFloat:()=>j0,tosiField:()=>r4,tosiDocSystem:()=>tB,tosiDiff:()=>q0,tosiDialog:()=>N4,tosiColumn:()=>_w,tosiCarousel:()=>A6,testManager:()=>A1,tabSelector:()=>bk,svgIcon:()=>w3,svg2DataUrl:()=>z0,styleSheet:()=>q4,spacer:()=>J9,sizeBreak:()=>hg,sideNav:()=>YB,setLocale:()=>O4,scriptTag:()=>S1,runTests:()=>L4,router:()=>b0,richTextWidgets:()=>Yy,richText:()=>fw,rewriteImports:()=>W1,resolveMenuItems:()=>U1,resolveIcon:()=>y2,removeLastMenu:()=>h1,postNotification:()=>a3,positionFloat:()=>A4,popMenu:()=>r,popFloat:()=>V0,popDropMenu:()=>L6,parseValueType:()=>o6,parseShortcut:()=>K4,navigate:()=>nw,modifierKeys:()=>eh,menu:()=>T6,matchShortcut:()=>V3,markdownViewer:()=>Ww,mapBox:()=>Fw,makeSorter:()=>_4,localize:()=>p,localePicker:()=>NC,loadTransform:()=>W0,liveTheme:()=>s,liveExample:()=>d4,legacyAliases:()=>Xy,keystroke:()=>yC,keycode:()=>N6,isBreached:()=>Gy,insertExamples:()=>T4,initTooltips:()=>Qg,initLocalization:()=>$3,icons:()=>Q,iconRules:()=>C3,i18n:()=>f,getRouterParams:()=>sw,gamepadText:()=>lw,gamepadState:()=>qy,findShortcutAction:()=>U3,findHighestZ:()=>_2,filterPart:()=>n4,filterForDrop:()=>_0,filterForClick:()=>K3,filterBuilder:()=>ww,expect:()=>w9,executeInline:()=>I4,executeInIframe:()=>b4,executeCode:()=>W7,enableTests:()=>j9,enableLiveTheme:()=>Ay,elastic:()=>Kw,editableRect:()=>xw,dragAndDrop:()=>U4,displayShortcut:()=>P4,disableTests:()=>V9,disableLiveTheme:()=>Ow,digest:()=>Py,diffLines:()=>G6,defineRoutes:()=>mw,defineIcons:()=>Ih,defaultColors:()=>c1,dataTable:()=>bC,createThemeWithLegacy:()=>Uw,createTheme:()=>d2,createTestContext:()=>g9,createSubMenu:()=>P3,createMenuItem:()=>b6,createMenuAction:()=>S6,createDropMenuItem:()=>I6,createDocBrowser:()=>_9,createDarkTheme:()=>E4,createColorVariables:()=>Vy,componentVars:()=>Qw,commandButton:()=>R1,colorInput:()=>j3,codeEditor:()=>m1,canonicalShortcut:()=>hC,bringToFront:()=>h2,bodymovinPlayer:()=>sh,blockStyle:()=>T9,baseVariables:()=>jy,baseTheme:()=>Pw,baseDarkTheme:()=>Gw,b3d:()=>fh,availableFilters:()=>U9,applyTheme:()=>Z9,applyLocalized:()=>P0,abTest:()=>Sh,XinWord:()=>dw,XinTagList:()=>jg,XinTag:()=>qg,XinSizer:()=>Cg,XinSelect:()=>OC,XinSegmented:()=>yg,XinRating:()=>Sw,XinPasswordStrength:()=>vw,XinNotification:()=>sk,XinMenu:()=>UC,XinLocalized:()=>$4,XinForm:()=>sB,XinFloat:()=>oh,XinField:()=>fB,XinCarousel:()=>rh,TosiThemeEditor:()=>R9,TosiTagList:()=>u2,TosiTag:()=>p0,TosiTabs:()=>M4,TosiTable:()=>F4,TosiSizer:()=>w5,TosiSidenav:()=>L2,TosiSelect:()=>I1,TosiSegmented:()=>s2,TosiRow:()=>F9,TosiRouteView:()=>c9,TosiRating:()=>h5,TosiPocketBar:()=>m3,TosiPasswordStrength:()=>x5,TosiNotification:()=>C2,TosiMonth:()=>S9,TosiMenu:()=>Q4,TosiMd:()=>e4,TosiLocalized:()=>b1,TosiLocalePicker:()=>Y4,TosiHeaderLinks:()=>Y9,TosiHeader:()=>O9,TosiGrid:()=>W9,TosiForm:()=>u4,TosiFloat:()=>Y1,TosiField:()=>s4,TosiDocSystem:()=>P9,TosiDiff:()=>q3,TosiDialog:()=>Z3,TosiColumn:()=>N9,TosiCarousel:()=>j4,TabSelector:()=>Ik,SvgIcon:()=>B3,SizeBreak:()=>d9,SideNav:()=>OB,STORAGE_KEY:()=>S4,RichText:()=>C5,RemoteSyncManager:()=>J0,MarkdownViewer:()=>Nw,MapBox:()=>Q2,LocalePicker:()=>FC,LiveExample:()=>B2,FilterPart:()=>Q9,FilterBuilder:()=>$9,EditableRect:()=>Z1,DataTable:()=>IC,CodeEditor:()=>r1,BodymovinPlayer:()=>D2,B3d:()=>g3,AbTest:()=>R2});var g0={};c5(g0,{xinValue:()=>zx,xinSlot:()=>jh,xinProxy:()=>z6,xinPath:()=>gx,xin:()=>k1,warnDeprecated:()=>z1,version:()=>g6,vars:()=>l,varDefault:()=>_,validateAgainstConstraints:()=>C6,updates:()=>f5,unobserve:()=>h0,touchElement:()=>E5,touch:()=>$1,tosiValue:()=>S,tosiUnique:()=>Jh,tosiSlot:()=>lh,tosiSetValue:()=>wx,tosiPath:()=>X1,tosiLoader:()=>Hh,tosiBlueprint:()=>Dh,tosiAccessor:()=>Bx,tosi:()=>t,throttle:()=>N2,sync:()=>Nh,svgElements:()=>k4,share:()=>Yh,settings:()=>a0,scrollListItemIntoView:()=>yh,onThemePreferencesChange:()=>Tx,onStylesheetChange:()=>Hx,on:()=>Z2,observe:()=>m5,mathML:()=>t8,makeComponent:()=>t5,invertLuminance:()=>w0,initVars:()=>bx,hotReload:()=>Vh,getThemePreferences:()=>E8,getListItem:()=>j2,getListInstance:()=>n5,getListBinding:()=>J2,getCssVar:()=>s8,elements:()=>U,deprecated:()=>l1,deleteListItem:()=>tx,debounce:()=>B0,css:()=>W2,boxedProxy:()=>a5,boxed:()=>G1,blueprintLoader:()=>Mh,blueprint:()=>vh,bindings:()=>u1,bindParts:()=>dx,bind:()=>f1,TOSI_ACCESSOR:()=>d5,TAKE_DESCRIPTOR:()=>x4,StyleSheet:()=>O1,MoreMath:()=>Zx,Component:()=>$,Color:()=>Y,BlueprintLoader:()=>e5,Blueprint:()=>g4,BOUND_SELECTOR:()=>E0,BOUND_CLASS:()=>e1});function v1(y,x){if(y==null||typeof y!=="object")return y;if(y instanceof Date)return new Date(y.getTime());if(x===void 0)x=new WeakMap;else if(x.has(y))return x.get(y);if(y instanceof Set){let C=new Set;x.set(y,C);for(let k of y)C.add(v1(k,x));return C}if(y instanceof Map){let C=new Map;x.set(y,C);for(let[k,B]of y)C.set(v1(k,x),v1(B,x));return C}if(Array.isArray(y)){let C=[];x.set(y,C);for(let k of y)C.push(v1(k,x));return C}let h={};x.set(y,h);for(let C in y)h[C]=v1(y[C],x);return h}var e1="-tosi-data",E0=`.${e1}`,M1=Symbol.for("xin-path"),l2=Symbol.for("xin-value"),yx="xinObserve",xx="xinBind",hx="xinOn",d5=Symbol.for("tosi-accessor"),x4=Symbol.for("tosi-take"),o0=Symbol("list-binding"),i2=Symbol("list-instance"),F5=new Map;function Cx(y,x){let h=F5.get(y);if(h===void 0)h=new Set,F5.set(y,h);h.add(x)}function kx(y){return F5.get(y)}var w8=new Set;function z1(y,x){if(!w8.has(y))console.warn(x),w8.add(y)}function l1(y,x){let h=!1;return(...C)=>{if(!h)console.warn(x),h=!0;return y(...C)}}var X1=(y)=>{return y&&y[M1]||void 0};function S(y){if(typeof y==="object"&&y!==null){let x=y[l2];return x!==void 0?x:y}return y}function Bx(y){return y!=null?y[d5]:void 0}function wx(y,x){if(X1(y)===void 0)throw Error("tosiSetValue requires a xin or boxed proxy");y[l2]=x}var gx=l1(X1,"xinPath is deprecated. Use tosiPath instead."),zx=l1(S,"xinValue is deprecated. Use tosiValue instead."),F2=new WeakMap,s1=new WeakMap,y0=(y)=>{let x=y.cloneNode();if(x instanceof Element){let C=s1.get(y),k=F2.get(y);if(C!=null)s1.set(x,v1(C));if(k!=null)F2.set(x,v1(k))}let h=x instanceof HTMLTemplateElement?x.content:x;for(let C of Array.from(y instanceof HTMLTemplateElement?y.content.childNodes:y.childNodes))if(C instanceof Element||C instanceof DocumentFragment)h.appendChild(y0(C));else h.appendChild(C.cloneNode());return x},a0={debug:!1,perf:!1},qx=(y)=>{try{return JSON.stringify(y)}catch(x){return"{has circular references}"}},M8=(...y)=>Error(y.map(qx).join(" ")),lx=()=>new Date(parseInt("1000000000",36)+Date.now()).valueOf().toString(36).slice(1),jx=0,Vx=()=>(parseInt("10000",36)+ ++jx).toString(36).slice(-5),S8=()=>lx()+Vx(),N5=Symbol("delete"),I8=Symbol("new-object"),P5=Symbol("automatic-index");function b8(y){if(y==="")return[];if(Array.isArray(y))return y;else{let x=[];while(y.length>0){let h=y.search(/\[[^\]]+\]/);if(h===-1){x.push(y.split("."));break}else{let C=y.slice(0,h);if(y=y.slice(h),C!=="")x.push(C.split("."));if(h=y.indexOf("]")+1,x.push(y.slice(1,h-1)),y.slice(h,h+1)===".")h+=1;y=y.slice(h)}}return x}}var q2=new WeakMap;function T8(y,x){if(q2.get(y)===void 0)q2.set(y,{});let h={};if(q2.get(y)[x]=h,x==="_auto_")y.forEach((C,k)=>{if(C[P5]===void 0)C[P5]=S8();h[C[P5]+""]=k});else y.forEach((C,k)=>{h[y1(C,x)+""]=k});return h}function Xx(y,x){if(q2.get(y)===void 0||q2.get(y)[x]===void 0)return T8(y,x);else return q2.get(y)[x]}function _x(y,x,h){h=h+"";let C=Xx(y,x)[h];if(C===void 0||y1(y[C],x)+""!==h)C=T8(y,x)[h];return C}function Ax(y,x,h){if(y[x]===void 0&&h!==void 0)y[x]=h;return y[x]}function p8(y,x,h,C){let k=x!==""?_x(y,x,h):h;if(C===N5){if(k!==void 0)y.splice(k,1),q2.delete(y);return Symbol("deleted")}else if(C===I8){if(x===""&&y[k]===void 0)y[k]={}}else if(C!==void 0)if(k!==void 0)y[k]=C;else if(x!==""&&y1(C,x)+""===h+"")y.push(C),k=y.length-1;else throw Error(`byIdPath insert failed at [${x}=${h}]`);return y[k]}function g8(y){if(!Array.isArray(y))throw M8("setByPath failed: expected array, found",y)}function z8(y){if(y==null||!(y instanceof Object))throw M8("setByPath failed: expected Object, found",y)}function y1(y,x){let h=b8(x),C=y,k,B,w,g;for(k=0,B=h.length;C!==void 0&&k<B;k++){let z=h[k];if(Array.isArray(z))for(w=0,g=z.length;C!==void 0&&w<g;w++){let q=z[w];C=C[q]}else if(C.length===0){if(C=C[Number(z.slice(1))],z[0]!=="=")return}else if(z.includes("=")){let[q,...j]=z.split("=");C=p8(C,q,j.join("="))}else w=parseInt(z,10),C=C[w]}return C}function h4(y,x,h){let C=y;if(x==="")throw Error("setByPath cannot be used to set the root object");let k=b8(x);while(C!=null&&k.length>0){let B=k.shift();if(typeof B==="string"){let w=B.indexOf("=");if(w>-1){if(w===0)z8(C);else g8(C);let g=B.slice(0,w),z=B.slice(w+1);if(C=p8(C,g,z,k.length>0?I8:h),k.length===0)return!0}else{g8(C);let g=parseInt(B,10);if(k.length>0)C=C[g];else{if(h!==N5){if(C[g]===h)return!1;C[g]=h}else C.splice(g,1);return!0}}}else if(Array.isArray(B)&&B.length>0){z8(C);while(B.length>0){let w=B.shift();if(B.length>0||k.length>0)C=Ax(C,w,B.length>0?{}:[]);else{if(h!==N5){if(C[w]===h)return!1;C[w]=h}else{if(!Object.prototype.hasOwnProperty.call(C,w))return!1;delete C[w]}return!0}}}else throw Error(`setByPath failed, bad path ${x}`)}throw Error(`setByPath(${y}, ${x}, ${h}) failed`)}var q1={},W5=null,Kx=(y)=>{W5=y},C4=()=>{if(W5===null)throw Error("xin proxy not initialized");return W5},J5=null,Z5=null,Px=(y,x)=>{J5=y,Z5=x},Gx=()=>{if(J5===null)throw Error("bind not initialized");return J5},Ux=()=>{if(Z5===null)throw Error("on not initialized");return Z5},q8=Symbol("observer should be removed"),t0=[],Y2=[],R5=!1,D5,H5;function Qx(y,x,h,C){let k=kx(y);if(k===void 0)return[];let B=[];for(let w of k){let g=y1(h,w);if(g!==void 0)B.push(`${y}[${w}=${g}]${C}`)}return B}var x0=(y,x)=>{if(!x.startsWith(y))return!1;if(x.length===y.length)return!0;let h=x.charAt(y.length);return h==="."||h==="["};class L8{description;test;callback;constructor(y,x){let h=typeof x==="string"?`"${x}"`:`function ${x.name}`,C;if(typeof y==="string")this.test=(k)=>typeof k==="string"&&k!==""&&(x0(k,y)||x0(y,k)),C=`test = "${y}"`;else if(y instanceof RegExp)this.test=y.test.bind(y),C=`test = "${y.toString()}"`;else if(y instanceof Function)this.test=y,C=`test = function ${y.name}`;else throw Error("expect listener test to be a string, RegExp, or test function");if(this.description=`${C}, ${h}`,typeof x==="function")this.callback=x;else throw Error("expect callback to be a path or function");t0.push(this)}}var f5=async()=>{if(D5===void 0)return;await D5},$x=()=>{if(a0.perf)console.time("xin async update");let y=Array.from(Y2);Y2.length=0,R5=!1;let x=H5;H5=void 0;try{for(let h of y)t0.filter((C)=>{let k;try{k=C.test(h)}catch(B){return console.error(`Listener ${C.description} threw "${B}" at "${h}"`),!1}if(k===q8)return h0(C),!1;return k}).forEach((C)=>{let k;try{k=C.callback(h)}catch(B){console.error(`Listener ${C.description} threw "${B}" handling "${h}"`)}if(k===q8)h0(C)})}finally{if(typeof x==="function")x();if(a0.perf)console.timeEnd("xin async update")}},$1=(y)=>{let x=typeof y==="string"?y:X1(y);if(x===void 0)throw console.error("touch was called on an invalid target",y),Error("touch was called on an invalid target");if(R5===!1)D5=new Promise((C)=>{H5=C}),R5=setTimeout($x);if(Y2.find((C)=>x0(C,x))==null)Y2.push(x);let h=x.match(/^(.+)\[(\d+)\](.*)$/);if(h!==null){let[,C,k,B]=h,w=parseInt(k,10),g=y1(q1,`${C}[${w}]`);if(g!=null){let z=Qx(C,w,g,B);for(let q of z)if(Y2.find((j)=>x0(j,q))==null)Y2.push(q)}}},k0=(y,x)=>{return new L8(y,x)},h0=(y)=>{let x=t0.indexOf(y);if(x>-1)t0.splice(x,1);else throw Error("unobserve failed, listener not found")},c8=(y,x,{bubbles:h=!1,composed:C=!1}={})=>{let k=new Event(x,{bubbles:h,composed:C});y.dispatchEvent(k)},d8=(y)=>{if(y instanceof HTMLInputElement)return y.type;else if(y instanceof HTMLSelectElement&&y.hasAttribute("multiple"))return"multi-select";else return"other"},V1=(y,x=2)=>String(y).padStart(x,"0"),Ox=(y,x)=>{switch(y){case"date":return`${x.getUTCFullYear()}-${V1(x.getUTCMonth()+1)}-${V1(x.getUTCDate())}`;case"month":return`${x.getUTCFullYear()}-${V1(x.getUTCMonth()+1)}`;case"datetime-local":return`${x.getFullYear()}-${V1(x.getMonth()+1)}-${V1(x.getDate())}T${V1(x.getHours())}:${V1(x.getMinutes())}`;default:return x.toISOString()}},Yx=(y)=>{let x=Math.floor(y/1000),h=`${V1(Math.floor(x/3600))}:${V1(Math.floor(x/60)%60)}`;return x%60===0?h:`${h}:${V1(x%60)}`},ix=(y)=>{let x=y.match(/^(\d\d):(\d\d)(?::(\d\d)(?:\.(\d+))?)?$/);if(x==null)return NaN;let[,h,C,k,B]=x;return(Number(h)*60+Number(C))*60000+Number(k??0)*1000+Number(B??0)},Fx=(y,x)=>{let h=d8(y);switch(h){case"radio":y.checked=x!=null&&y.value===String(x);break;case"checkbox":y.checked=!!x;break;case"date":case"datetime-local":case"month":case"week":{let C=y;if(x==null||x==="")C.value="";else if(x instanceof Date||typeof x==="number"){let k=x instanceof Date?x:new Date(x);if(h==="week")try{C.valueAsDate=k}catch(B){}else C.value=Ox(h,k)}else C.value=String(x);break}case"time":{let C=y;if(x==null||x==="")C.value="";else if(typeof x==="number")C.value=Yx(x);else if(x instanceof Date)C.value=`${V1(x.getHours())}:${V1(x.getMinutes())}:${V1(x.getSeconds())}`;else C.value=String(x);break}case"multi-select":for(let C of Array.from(y.querySelectorAll("option")))C.selected=Array.isArray(x)?x.map(String).includes(C.value):x!=null?!!x[C.value]:!1;break;default:y.value=x==null?"":x}},Nx=(y)=>{switch(d8(y)){case"radio":{let x=y.parentElement?.querySelector(`[name="${y.name}"]:checked`);return x!=null?x.value:null}case"checkbox":return y.checked;case"number":case"range":{let x=y,h=typeof x.valueAsNumber==="number"?x.valueAsNumber:Number(x.value);return Number.isNaN(h)?x.value:h}case"date":case"datetime-local":case"month":case"week":{let x=y,h=x.valueAsDate??(x.value!==""?new Date(x.value):null);return h!=null&&!Number.isNaN(h.getTime())?h:x.value}case"time":{let x=y,h=typeof x.valueAsNumber==="number"?x.valueAsNumber:NaN;if(Number.isNaN(h))h=ix(x.value);return Number.isNaN(h)?x.value:h}case"multi-select":return Array.from(y.querySelectorAll("option")).reduce((x,h)=>{return x[h.value]=h.selected,x},{});default:return y.value}},{ResizeObserver:l8}=globalThis,v5=l8!=null?new l8((y)=>{for(let x of y){let h=x.target;c8(h,"resize")}}):{observe(){},unobserve(){}},j8=(y,x,h=!0)=>{if(y!=null&&x!=null)if(typeof x==="string")y.textContent=x;else if(Array.isArray(x))x.forEach((C)=>{y.append(C instanceof Node&&h?y0(C):C)});else if(x instanceof Node)y.append(h?y0(x):x);else throw Error("expect text content or document node")},B0=(y,x=250)=>{let h;return function(...C){if(h!==void 0)clearTimeout(h);h=setTimeout(()=>{y.apply(this,C)},x)}},N2=(y,x=250)=>{let h,C=Date.now()-x;return function(...k){clearTimeout(h);let B=Date.now()-C;if(B>=x)C=Date.now(),y.apply(this,k);else h=setTimeout(()=>{C=Date.now(),y.apply(this,k)},x-B)}},u1={value:{toDOM:Fx,fromDOM(y){return Nx(y)}},text:{toDOM(y,x){y.textContent=x}},enabled:{toDOM(y,x){y.disabled=!x}},disabled:{toDOM(y,x){y.disabled=Boolean(x)}},list:{toDOM(y,x,h){J2(y,x,h).update(x)}}};function P1(y){return y.replace(/[A-Z]/g,(x)=>{return`-${x.toLocaleLowerCase()}`})}function f8(y){return y.replace(/-([a-z])/g,(x,h)=>{return h.toLocaleUpperCase()})}var Wx=180/Math.PI,Jx=Math.PI/180;function H1(y,x,h){return h<y?NaN:x<y?y:x>h?h:x}function o1(y,x,h,C=!0){if(C)h=H1(0,h,1);return h*(x-y)+y}var Zx={RADIANS_TO_DEGREES:Wx,DEGREES_TO_RADIANS:Jx,clamp:H1,lerp:o1};function s8(y,x=document.body){let h=getComputedStyle(x);if(y.endsWith(")")&&y.startsWith("var("))y=y.slice(4,-1);return h.getPropertyValue(y).trim()}var u8={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Rx=(y,x,h)=>{return(0.299*y+0.587*x+0.114*h)/255},g2=(y)=>("00"+Math.round(Number(y)).toString(16)).slice(-2);class r8{h;s;l;constructor(y,x,h){y/=255,x/=255,h/=255;let C=Math.max(y,x,h),k=C-Math.min(y,x,h),B=k!==0?C===y?(x-h)/k:C===x?2+(h-y)/k:4+(y-x)/k:0;this.h=60*B<0?60*B+360:60*B,this.s=k!==0?C<=0.5?k/(2*C-k):k/(2-(2*C-k)):0,this.l=(2*C-k)/2}}var a1=globalThis.document!==void 0?globalThis.document.createElement("span"):void 0;if(a1)a1.style.display="none";class Y{r;g;b;a;static fromVar(y,x=document.body){return Y.fromCss(s8(y,x))}static fromCss(y){let x=u8[String(y).trim().toLowerCase()];if(x!==void 0)y=x;let h=y.match(/^#([0-9a-fA-F]+)$/);if(h){let q=h[1],j=(V,A)=>parseInt(q.slice(V,V+A),16);if(q.length===3||q.length===4){let V=(A)=>j(A,1)*17;return new Y(V(0),V(1),V(2),q.length===4?V(3)/255:1)}if(q.length===6||q.length===8)return new Y(j(0,2),j(2,2),j(4,2),q.length===8?j(6,2)/255:1)}let C=y;if(a1 instanceof HTMLSpanElement)a1.style.color="black",a1.style.color=y,document.body.appendChild(a1),C=getComputedStyle(a1).color,a1.remove();let[k,B,w,g]=C.match(/[\d.]+/g)||["0","0","0","0"],z=C.startsWith("color(srgb")?255:1;return new Y(Number(k)*z,Number(B)*z,Number(w)*z,g==null?1:Number(g))}static fromHsl(y,x,h,C=1){let k,B,w;if(x===0)k=B=w=h;else{let z=(A,P,G)=>{if(G<0)G+=1;if(G>1)G-=1;if(G<0.16666666666666666)return A+(P-A)*6*G;if(G<0.5)return P;if(G<0.6666666666666666)return A+(P-A)*(0.6666666666666666-G)*6;return A},q=h<0.5?h*(1+x):h+x-h*x,j=2*h-q,V=(y%360+360)%360/360;k=z(j,q,V+0.3333333333333333),B=z(j,q,V),w=z(j,q,V-0.3333333333333333)}let g=new Y(k*255,B*255,w*255,C);return g.hslCached={h:(y%360+360)%360,s:x,l:h},g}static black=new Y(0,0,0);static white=new Y(255,255,255);constructor(y,x,h,C=1){this.r=H1(0,y,255),this.g=H1(0,x,255),this.b=H1(0,h,255),this.a=H1(0,C,1)}get inverse(){return new Y(255-this.r,255-this.g,255-this.b,this.a)}get inverseLuminance(){let{h:y,s:x,l:h}=this._hsl;return Y.fromHsl(y,x,1-h,this.a)}get opaque(){return this.a===1?this:new Y(this.r,this.g,this.b,1)}contrasting(y=1){return this.opaque.blend(this.brightness>0.5?Y.black:Y.white,y)}get rgb(){let{r:y,g:x,b:h}=this;return`rgb(${y.toFixed(0)},${x.toFixed(0)},${h.toFixed(0)})`}get rgba(){let{r:y,g:x,b:h,a:C}=this;return`rgba(${y.toFixed(0)},${x.toFixed(0)},${h.toFixed(0)},${C.toFixed(2)})`}get RGBA(){return[this.r/255,this.g/255,this.b/255,this.a]}get ARGB(){return[this.a,this.r/255,this.g/255,this.b/255]}hslCached;get _hsl(){if(this.hslCached==null)this.hslCached=new r8(this.r,this.g,this.b);return this.hslCached}get hsl(){let{h:y,s:x,l:h}=this._hsl;return`hsl(${y.toFixed(0)}deg ${(x*100).toFixed(0)}% ${(h*100).toFixed(0)}%)`}get hsla(){let{h:y,s:x,l:h}=this._hsl;return`hsl(${y.toFixed(0)}deg ${(x*100).toFixed(0)}% ${(h*100).toFixed(0)}% / ${(this.a*100).toFixed(0)}%)`}get mono(){let y=this.brightness*255;return new Y(y,y,y)}get brightness(){return Rx(this.r,this.g,this.b)}get html(){return this.toString()}toString(){return this.a===1?"#"+g2(this.r)+g2(this.g)+g2(this.b):"#"+g2(this.r)+g2(this.g)+g2(this.b)+g2(255*this.a)}brighten(y){let{h:x,s:h,l:C}=this._hsl,k=H1(0,C+y*(1-C),1);return Y.fromHsl(x,h,k,this.a)}darken(y){let{h:x,s:h,l:C}=this._hsl,k=H1(0,C*(1-y),1);return Y.fromHsl(x,h,k,this.a)}saturate(y){let{h:x,s:h,l:C}=this._hsl,k=H1(0,h+y*(1-h),1);return Y.fromHsl(x,k,C,this.a)}desaturate(y){let{h:x,s:h,l:C}=this._hsl,k=H1(0,h*(1-y),1);return Y.fromHsl(x,k,C,this.a)}rotate(y){let{h:x,s:h,l:C}=this._hsl,k=(x+360+y)%360;return Y.fromHsl(k,h,C,this.a)}opacity(y){let{h:x,s:h,l:C}=this._hsl;return Y.fromHsl(x,h,C,y)}swatch(){return console.log(`%c %c ${this.html}, ${this.rgba}`,`background-color: ${this.html}`,"background-color: transparent"),this}blend(y,x){return new Y(o1(this.r,y.r,x),o1(this.g,y.g,x),o1(this.b,y.b,x),o1(this.a,y.a,x))}static blendHue(y,x,h){let C=(x-y+720)%360;if(C<180)return y+h*C;else return y-(360-C)*h}mix(y,x){let h=this._hsl,C=y._hsl;return Y.fromHsl(h.s===0?C.h:C.s===0?h.h:Y.blendHue(h.h,C.h,x),o1(h.s,C.s,x),o1(h.l,C.l,x),o1(this.a,y.a,x))}colorMix(y,x){return Y.fromCss(`color-mix(in hsl, ${this.html}, ${y.html} ${(x*100).toFixed(0)}%)`)}static computedColorStylesheet=null;static computedColors=new Map;static recomputeQueued=!1;static registerComputedColor(y,x,h,C){if(!Y.computedColors.has(y))Y.computedColors.set(y,{varName:x,scale:h,method:C}),Y.queueRecompute()}static queueRecompute(){if(Y.recomputeQueued)return;Y.recomputeQueued=!0,queueMicrotask(()=>{Y.recomputeQueued=!1,Y.recomputeColors()})}static recomputeColors(){if(Y.computedColors.size===0)return;let y=[];for(let[h,{varName:C,scale:k,method:B}]of Y.computedColors)try{let w=Y.fromVar(C),g;switch(B){case"b":g=k>0?w.brighten(k):w.darken(-k);break;case"s":g=k>0?w.saturate(k):w.desaturate(-k);break;case"h":g=w.rotate(k*100);break;case"o":g=w.opacity(k);break;default:continue}y.push(` ${h}: ${g.rgba};`)}catch(w){}if(y.length===0)return;let x=`:root {
|
|
2
2
|
${y.join(`
|
|
3
3
|
`)}
|
|
4
|
-
}`;if(
|
|
4
|
+
}`;if(Y.computedColorStylesheet===null)Y.computedColorStylesheet=document.createElement("style"),Y.computedColorStylesheet.id="tosijs-computed-colors",document.head.append(Y.computedColorStylesheet);Y.computedColorStylesheet.textContent=x}}var e0=new Set,V8=!1;function Dx(){if(!V8)V8=!0,e0.add(()=>Y.queueRecompute())}function Hx(y){return e0.add(y),()=>e0.delete(y)}function vx(){Dx();for(let y of e0)y()}function O1(y,x){let h=S(x),C=U.style(W2(h));C.id=y,document.head.append(C);let k=X1(x);if(k!==void 0)m5(k,()=>{C.textContent=W2(S(x)),vx()});return C}var Mx=/^(animation-iteration-count|column-count|flex(-grow|-shrink)?|font-weight|opacity|order|orphans|scale|tab-size|widows|z-index|zoom)$/,Sx=/^line-height$/,m8=(y,x)=>{let h=y.replace(/^_+/,""),C=y.startsWith("_"),k=Mx.test(h)||!C&&Sx.test(h);if(typeof x==="number"&&!k)x=`${x}px`;if(y.startsWith("_"))if(y.startsWith("__"))y="--"+y.substring(2),x=`var(${y}-default, ${x})`;else y="--"+y.substring(1);return{prop:y,value:String(x)}},Ix=(y,x,h)=>{if(h===void 0)return"";if(h instanceof Y)h=h.html;let C=m8(x,h);return`${y} ${C.prop}: ${C.value};`},n8=(y,x,h="")=>{let C=P1(y);if(typeof x==="object"&&!(x instanceof Y)){let k=Object.keys(x).map((B)=>n8(B,x[B],`${h} `)).join(`
|
|
5
5
|
`);return`${h} ${y} {
|
|
6
|
-
${
|
|
7
|
-
${h} }`}else return
|
|
6
|
+
${k}
|
|
7
|
+
${h} }`}else return Ix(h,C,x)},W2=(y,x="")=>{return Object.keys(y).map((h)=>{let C=y[h];if(typeof C==="string"){if(h==="@import")return`@import url('${C}');`;throw Error("top-level string value only allowed for `@import`")}let k=Object.keys(C).map((B)=>n8(B,C[B])).join(`
|
|
8
8
|
`);return`${x}${h} {
|
|
9
|
-
${
|
|
9
|
+
${k}
|
|
10
10
|
}`}).join(`
|
|
11
11
|
|
|
12
|
-
`)},Rx=(y)=>{j1("initVars","initVars is deprecated. Just use _ and __ prefixes instead.");let x={};for(let h of Object.keys(y)){let C=y[h],l=K1(h);x[`--${l}`]=typeof C==="number"&&C!==0?String(C)+"px":C}return x},i0=(y)=>{let x={};for(let h of Object.keys(y)){let C=y[h];if(C instanceof X)x[h]=C.inverseLuminance;else if(typeof C==="string"&&(C.match(/^(#[0-9a-fA-F]{3}|rgba?\(|hsla?\()/)!=null||d8[C.trim().toLowerCase()]!==void 0))x[h]=X.fromCss(C).inverseLuminance}return x},P=new Proxy({},{get(y,x){if(y[x]===void 0){let h="--"+K1(x);y[x]=(C)=>`var(${h}, ${C})`}return y[x]}}),z=new Proxy({},{get(y,x){if(x==="default")return P;if(y[x]==null){x=K1(x);let[,h,,C,l,i]=x.match(/^([-\w]*?)((_)?(\d+)(\w?))?$/)||["",x],k=`--${h}`;if(l!=null){let g=C==null?Number(l)/100:-Number(l)/100;switch(i){case"b":case"s":case"h":case"o":{let w=`--${x}`;X.registerComputedColor(w,k,g,i),y[x]=`var(${w})`}break;case"":y[x]=`calc(var(${k}) * ${g})`;break;default:throw console.error(i),Error(`Unrecognized method ${i} for css variable ${k}`)}}else y[x]=`var(${k})`}return y[x]}});function n8(){let y=(x)=>typeof matchMedia<"u"&&matchMedia(x).matches;return{colorScheme:y("(prefers-color-scheme: dark)")?"dark":"light",contrast:y("(prefers-contrast: more)")?"more":y("(prefers-contrast: less)")?"less":y("(prefers-contrast: custom)")?"custom":"no-preference",reducedMotion:y("(prefers-reduced-motion: reduce)"),reducedTransparency:y("(prefers-reduced-transparency: reduce)"),forcedColors:y("(forced-colors: active)")}}function Dx(y){if(typeof matchMedia>"u")return()=>{};let x=["(prefers-color-scheme: dark)","(prefers-contrast: more)","(prefers-contrast: less)","(prefers-contrast: custom)","(prefers-reduced-motion: reduce)","(prefers-reduced-transparency: reduce)","(forced-colors: active)"],h=()=>y(n8()),C=x.map((l)=>matchMedia(l));for(let l of C)l.addEventListener("change",h);return()=>{for(let l of C)l.removeEventListener("change",h)}}var Hx="http://www.w3.org/1998/Math/MathML",bx="http://www.w3.org/2000/svg",n0={},f8=(y,x,h)=>{let C=r8(K1(x),h);if(C.prop.startsWith("--"))y.style.setProperty(C.prop,C.value);else y.style[x]=C.value},Sx=(y)=>{return{toDOM(x,h){f8(x,y,h)}}},z8=new WeakMap,u8=(y,x,h)=>{if(x==="style")if(typeof h==="object")for(let C of Object.keys(h))if(V1(h[C]))d1(y,h[C],Sx(C));else f8(y,C,h[C]);else y.setAttribute("style",h);else{let C=K1(x),l=y.constructor.observedAttributes;if(l?.includes(x)||l?.includes(C))if(typeof h==="boolean")h?y.setAttribute(C,""):y.removeAttribute(C);else y.setAttribute(C,h);else if(y[x]!==void 0){let{MathMLElement:i}=globalThis;if(y instanceof SVGElement||i!==void 0&&y instanceof i)y.setAttribute(x,h);else y[x]=h}else if(C==="class"){let i=(B)=>String(B||"").split(/\s+/).filter(Boolean),k=new Set,g=new Set;if(Array.isArray(h))for(let B of h)for(let q of i(B))k.add(q);else if(h!=null&&typeof h==="object")for(let[B,q]of Object.entries(h))for(let j of i(B))(q?k:g).add(j);else for(let B of i(h))k.add(B);let w=z8.get(y);if(w){for(let B of w)if(!k.has(B))y.classList.remove(B)}for(let B of g)y.classList.remove(B);for(let B of k)y.classList.add(B);z8.set(y,k)}else if(y[C]!==void 0)y[C]=h;else if(typeof h==="boolean")h?y.setAttribute(C,""):y.removeAttribute(C);else y.setAttribute(C,h)}},K5={},q8=(y)=>{if(!K5[y])K5[y]={toDOM(x,h){u8(x,y,h)}};return K5[y]},L5=(y,x,h)=>{if(x==="apply")h(y);else if(x.match(/^on[A-Z]/)!=null){let C=x.substring(2).toLowerCase();N2(y,C,h)}else if(x==="bind"){let C=typeof h.binding==="string"?r1[h.binding]:h.binding;if(C!==void 0&&h.value!==void 0)d1(y,h.value,C instanceof Function?{toDOM:C}:C);else throw Error("bad binding")}else if(x.match(/^bind[A-Z]/)!=null){let C=x.substring(4,5).toLowerCase()+x.substring(5);if(C!=="value"){let i=C==="text"?"textContent":C==="enabled"?"disabled (with .tosi.take(v => !v))":C==="disabled"?"disabled":C==="list"?".tosi.listBinding()":null;if(i)j1(`bind${C}`,`bind${x.substring(4)} is deprecated. Use { ${i}: ... } instead.`)}let l=r1[C];if(l!==void 0)d1(y,h,l);else throw Error(`${x} is not allowed, bindings.${C} is not defined`)}else if(h!=null&&typeof h==="object"&&h[x4])d1(y,h,q8(x));else if(V1(h))d1(y,h,q8(x));else u8(y,x,h)},r5=(y,...x)=>{if(n0[y]===void 0){let[l,i]=y.split("|");if(i===void 0)n0[y]=globalThis.document.createElement(l);else n0[y]=globalThis.document.createElementNS(i,l)}let h=n0[y].cloneNode(),C={};for(let l of x)if(l instanceof Element||l instanceof DocumentFragment||typeof l==="string"||typeof l==="number")if(h instanceof HTMLTemplateElement)h.content.append(l);else h.append(l);else if(V1(l))h.append(G.span({bindText:l}));else Object.assign(C,l);for(let l of Object.keys(C)){let i=C[l];L5(h,l,i)}return h},o5=(...y)=>{let x=globalThis.document.createDocumentFragment();for(let h of y)x.append(h);return x},G=new Proxy({fragment:o5},{get(y,x){if(x=x.replace(/[A-Z]/g,(h)=>`-${h.toLocaleLowerCase()}`),y[x]===void 0)y[x]=(...h)=>r5(x,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),l4=new Proxy({fragment:o5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>r5(`${x}|${bx}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),E8=new Proxy({fragment:o5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>r5(`${x}|${Hx}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),j8=new WeakSet;function Mx(y,x,h="part"){let C=`[data-${h}]`;for(let l of Array.from(y.querySelectorAll(C))){if(j8.has(l))continue;let i=l.getAttribute(`data-${h}`);if(i==null)continue;let k=x[i];if(k==null)continue;j8.add(l);for(let g of Object.keys(k))L5(l,g,k[g])}}var Ix=["sort","splice","copyWithin","fill","pop","push","reverse","shift","unshift"],cx=!0,sx=/^\.?([^.[\](),])+(\.[^.[\](),]+|\[\d+\]|\[[^=[\](),]*=[^[\]()]+\])*$/,Tx=(y)=>sx.test(y),E1=(y="",x="")=>{if(y==="")return x;else if(x.startsWith("[")&&x.endsWith("]"))return`${y}${x}`;else if(x.match(/^\d+$/)!==null||x.includes("="))return`${y}[${x}]`;else return`${y}.${x}`},e0={};function U5(y,x){if(y!==null&&(typeof y==="object"||typeof y==="function"))return y;return new Proxy(e0,t1(x,!0))}var a8=()=>new Proxy({},t1("^",!0)),G5=(y)=>{let x=y(a8())?.path;if(!x?.startsWith("^."))throw Error("selector must return a property of the item");return x.substring(2)},F5=(y,x,h)=>{for(let C=0;C<y.length;C++)if(`${y1(y[C],x)}`===`${h}`)return C;return-1},dx=(y,x)=>({listFind(h,C){if(h instanceof Element){let k=h;while(k&&!k[Q2]&&k.parentElement)k=k.parentElement;let g=k?.[Q2];if(g==null)return;let w=x.indexOf(g);return w!==-1?U1[y][w]:void 0}let l=G5(h),i=F5(x,l,C);return i!==-1?U1[y][i]:void 0},listUpdate(h,C){let l=G5(h),i=y1(C,l),k=F5(x,l,i);if(k!==-1){let g=U1[y][k];for(let w of Object.keys(C))g[w]=C[w];return g}return U1[y].push(C),U1[y][x.length-1]},listRemove(h,C){let l=G5(h),i=F5(x,l,C);if(i===-1)return!1;return U1[y].splice(i,1),!0}}),V8=!1;function Lx(){if(!V8)console.warn("xinValue, tosiValue, xinPath, tosiPath, etc. are deprecated. Use .tosi.value, .tosi.path, .tosi.observe(), etc. instead."),V8=!0}var P8=(y)=>{return y===e0},rx=(y,x)=>({get(h,C){switch(C){case"value":return x===e0?y1(w1,y):x.valueOf?x.valueOf():x;case"path":return y;case"touch":return()=>O1(y);case"observe":return(l)=>{let i=C0(y,l);return()=>x0(i)};case"bind":return(l,i,k)=>{Px()(l,y,i,k)};case"on":{let l=x===e0?y1(w1,y):x.valueOf?x.valueOf():x;return(i,k)=>_x()(i,k,l)}case"binding":return(l)=>({bind:{value:y,binding:l}});case"listBinding":return(l=({span:k})=>k({bindText:"^"}),i={})=>{let k=i.virtual?.itemsPerRow??1,g=[];for(let w=0;w<k;w++)g.push(l(G,a8(),w));return[{bindList:{value:y,...i}},G.template(...g)]};case"listFind":case"listUpdate":case"listRemove":return dx(y,Array.isArray(x)?x:[])[C];case"take":return(...l)=>{let i=l[l.length-1],k=l.slice(0,-1).map((g)=>typeof g==="string"?g:g[H1]);return{[x4]:!0,paths:[y,...k],transform:i}}}return},set(h,C,l){if(C==="value"){if(l=b(l),b(l1[y])!==l&&h4(w1,y,l))O1(y);return!0}return!1}}),E2=(y,x)=>new Proxy(x,rx(y,x)),_8=new Set(["path","value","touch","observe","bind","on","binding","listBinding","listFind","listUpdate","listRemove","take"]),A8=new Map([[H1,"path"],["xinPath","path"],["tosiPath","path"],[z2,"value"],["xinValue","value"],["tosiValue","value"],[ay,"observe"],["xinObserve","observe"],["tosiObserve","observe"],[ty,"on"],["xinOn","on"],["tosiOn","on"],[my,"bind"],["xinBind","bind"],["tosiBind","bind"],["tosiBinding","binding"],["tosiListBinding","listBinding"]]),t1=(y,x)=>({get(h,C){if((C==="tosi"||C===T5)&&x)return E2(y,h);if(P8(h)){let w=()=>y1(w1,y);switch(C){case"valueOf":case"toJSON":return()=>w();case Symbol.toPrimitive:return(j)=>{let _=w();if(j==="number")return Number(_);if(j==="string")return String(_);return _};case"toString":return()=>String(w())}if(_8.has(C))return E2(y,h)[C];let B=A8.get(C);if(B!==void 0)return Lx(),E2(y,h)[B];let q=w();if(q!=null){let j=Object(q);if(C in j){let _=j[C];return typeof _==="function"?_.bind(j):_}}return}if(x&&(C==="valueOf"||C==="toJSON"))return()=>h.valueOf?h.valueOf():h;if(x&&!(C in h)&&_8.has(C))return E2(y,h)[C];let l=A8.get(C);if(l!==void 0)return E2(y,h)[l];if(typeof C==="symbol")return h[C];let i=Object.getOwnPropertyDescriptor(h,C);if(i&&!i.configurable&&!i.writable&&"value"in i)return i.value;let k=C,g=k.match(/^([^.[]+)\.(.+)$/)??k.match(/^([^\]]+)(\[.+)/)??k.match(/^(\[[^\]]+\])\.(.+)$/)??k.match(/^(\[[^\]]+\])\[(.+)$/);if(g!==null){let[,w,B]=g,q=E1(y,w),j=b(y1(h,w));return j!==null&&typeof j==="object"?new Proxy(j,t1(q,x))[B]:j}if(k.startsWith("[")&&k.endsWith("]"))k=k.substring(1,k.length-1);if(!Array.isArray(h)&&h[k]!==void 0||Array.isArray(h)&&k.includes("=")){let w;if(k.includes("=")){let[B,q]=k.split("=");w=h.find((j)=>`${y1(j,B)}`===q)}else w=h[k];if(w instanceof Object){w=b(w);let B=E1(y,k);return new Proxy(w instanceof Function?w.bind(h):w,t1(B,x))}else return x?U5(w,E1(y,k)):w}else if(Array.isArray(h)){let w=h[k];return typeof w==="function"?(...B)=>{let q=B.map((_)=>b(_)),j=w.apply(h,q);if(Ix.includes(k))O1(y);if(j!=null&&typeof j==="object"){if(k==="find"||k==="findLast"||k==="at"){let _=h.indexOf(j);if(_!==-1)return new Proxy(j,t1(E1(y,String(_)),x))}}return j}:typeof w==="object"?new Proxy(b(w),t1(E1(y,k),x)):x?U5(w,E1(y,k)):w}else{let w=h[k];if(w!==null&&typeof w==="object")w=b(w);return x?U5(w,E1(y,k)):w}},set(h,C,l){if(l=b(l),typeof C==="symbol"&&C!==z2)return h[C]=l,!0;if(l!==null&&typeof l==="object")if(Array.isArray(l))for(let k=0;k<l.length;k++)l[k]=b(l[k]);else for(let k of Object.keys(l))l[k]=b(l[k]);let i=C===z2||C==="xinValue"||C==="tosiValue"||C==="value"&&(P8(h)||x&&!("value"in h))?y:E1(y,C);if(cx&&!Tx(i))throw Error(`setting invalid path ${i}`);if(b(l1[i])!==l&&h4(w1,i,l))O1(i);return!0}}),n5=(y,x)=>{let h=typeof x==="function"?x:l1[x];if(typeof h!=="function")throw Error(`observe expects a function or path to a function, ${x} is neither`);return C0(y,h)},l1=new Proxy(w1,t1("",!1));jx(l1);var U1=new Proxy(w1,t1("",!0)),ox=16,nx=100;function K8(y,x){let h=Array.from(y.querySelectorAll(B2));if(y.matches(B2))h.unshift(y);for(let C of h){let l=L1.get(C);for(let i of l){if(i.path.startsWith("^"))i.path=`${x}${i.path.substring(1)}`;if(i.binding.toDOM!=null)i.binding.toDOM(C,l1[i.path],i.options)}}}var U8=!1;class m8{boundElement;listTop;listBottom;isNamespaced;templates;options;itemToElement;idToElement=new Map;array=[];_filteredCache;_update;_previousSlice;static filterBoundObservers=new WeakMap;constructor(y,x,h={}){if(this.boundElement=y,this.itemToElement=new WeakMap,h.idPath!=null){let g=V1(x);if(g!=null)ey(g,h.idPath)}let C=h.virtual?.itemsPerRow??1,l=Array.from(y.children).find((g)=>g instanceof HTMLTemplateElement),i=null;if(l!=null){let g=C;if(l.content.children.length<1||l.content.children.length!==g)throw Error(`ListBinding expects a template with exactly ${g} child element(s)`);this.templates=Array.from(l.content.children).map((w)=>e2(w)),i=l.nextElementSibling,l.remove()}else if(y.children.length===1)this.templates=[y.children[0]],this.templates[0].remove();else throw Error("ListBinding expects a <template> child or exactly one child element");this.options=h;let k=y.namespaceURI;if(this.isNamespaced=k==="http://www.w3.org/2000/svg"||k==="http://www.w3.org/1998/Math/MathML",this.isNamespaced)this.listTop=null,this.listBottom=null;else if(this.listTop=document.createElement("div"),this.listBottom=document.createElement("div"),this.listTop.classList.add("virtual-list-padding"),this.listBottom.classList.add("virtual-list-padding"),this.listTop.setAttribute("role","presentation"),this.listBottom.setAttribute("role","presentation"),this.listTop.setAttribute("aria-hidden","true"),this.listBottom.setAttribute("aria-hidden","true"),i!=null)this.boundElement.insertBefore(this.listTop,i),this.boundElement.insertBefore(this.listBottom,i);else this.boundElement.append(this.listTop),this.boundElement.append(this.listBottom);if(C>1){this.boundElement.classList.add("tosi-virtual-grid");let g=this.boundElement.style;if(g!=null)g.setProperty("--tosi-columns",String(C)),g.display=g.display||"grid",g.gridTemplateColumns=g.gridTemplateColumns||"repeat(var(--tosi-columns), 1fr)";if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.gridColumn="1 / -1",this.listBottom.style.gridColumn="1 / -1"}if(h.virtual!=null&&!this.boundElement.getAttribute("role"))this.boundElement.setAttribute("role",C>1?"grid":"list");if(this.boundElement[E0]=this,this.isNamespaced&&h.virtual!=null)console.warn("ListBinding: virtual scrolling is not supported in SVG/MathML containers, ignoring virtual option");if(!this.isNamespaced&&h.virtual!=null)if(R5.observe(this.boundElement),this._update=X2(()=>{this.update(this.array,!0)},ox),this.boundElement.addEventListener("resize",this._update),h.virtual.scrollContainer==="window")window.addEventListener("scroll",this._update),window.addEventListener("resize",this._update);else this.boundElement.addEventListener("scroll",this._update)}filteredArray(){if(this._filteredCache!=null)return this._filteredCache;let{hiddenProp:y,visibleProp:x}=this.options,h=this.array;if(y!==void 0)h=h.filter((C)=>C[y]!==!0);if(x!==void 0)h=h.filter((C)=>C[x]===!0);if(this.options.filter&&this.needle!==void 0)h=this.options.filter(h,this.needle);return this._filteredCache=h,h}visibleSlice(){let{virtual:y}=this.options,x=this.filteredArray(),h=0,C=x.length-1,l=0,i=0;if(y!=null&&this.boundElement instanceof HTMLElement){let k=this.boundElement.offsetWidth,g=y.scrollContainer==="window",w,B;if(g){w=window.innerHeight;let _=this.boundElement.getBoundingClientRect();B=Math.max(0,-_.top)}else w=this.boundElement.offsetHeight,B=this.boundElement.scrollTop;let q=y.width!=null?Math.max(1,Math.floor(k/y.width)):y.visibleColumns??1,j=Math.ceil(x.length/q);if(y.minHeight!=null){let _=y.minHeight,K=Math.ceil(w/_)+(y.rowChunkSize||1),U=q*K,Q=j*_,Y=Math.max(0,Q-w),$=Y>0?Math.min(1,Math.max(0,B/Y)):0,Z=Math.max(0,j-K+1),p=$*Z,T=Math.floor(p);if(y.rowChunkSize)T-=T%y.rowChunkSize;return h=T*q,C=h+U-1,l=B,i=Math.max(0,Q-B-w),{items:x,firstItem:h,lastItem:C,topBuffer:l,bottomBuffer:i,interpolation:{t:$,position:p,scrollTop:B,viewportHeight:w,totalScrollHeight:Q,rowHeight:y.height}}}else{let _=Math.ceil(w/y.height)+(y.rowChunkSize||1),K=q*_,U=Math.floor(B/y.height);if(U>j-_+1)U=Math.max(0,j-_+1);if(y.rowChunkSize)U-=U%y.rowChunkSize;h=U*q,C=h+K-1,l=U*y.height,i=Math.max((j-_)*y.height-l,0)}}return{items:x,firstItem:h,lastItem:C,topBuffer:l,bottomBuffer:i}}needle;filter=X2((y)=>{if(this.needle!==y)this.needle=y,this.update(this.array)},nx);update(y,x){if(y==null)y=[];if(this.array=y,!x)this._filteredCache=void 0;let{hiddenProp:h,visibleProp:C}=this.options,l=V1(y),i=this.visibleSlice();if(this.boundElement.classList.toggle("-xin-empty-list",i.items.length===0),this.options.virtual!=null)this.boundElement.setAttribute("aria-rowcount",String(i.items.length));let k=this._previousSlice,{firstItem:g,lastItem:w,topBuffer:B,bottomBuffer:q}=i,j=h===void 0&&C===void 0&&x===!0&&k!=null&&g===k.firstItem&&w===k.lastItem;if(j&&i.interpolation==null&&B===k.topBuffer&&q===k.bottomBuffer)return;if(j&&i.interpolation!=null){this._updateInterpolatedBuffers(i);return}this._previousSlice=i;let _=0,K=0,U=0,{idPath:Q}=this.options,Y=this.options.virtual?.itemsPerRow??1,$;if(Q!=null){$=new Set;for(let M=g;M<=w;M++){let N=i.items[M];if(N!==void 0)$.add(String(N[Q]))}}let Z=new Set;for(let M of Array.from(this.boundElement.children)){if(M===this.listTop||M===this.listBottom)continue;let N=M[Q2];if(N==null)continue;else if(N===!0)M.remove(),_++;else{if(Z.has(N))continue;let I;if(Q!=null)I=!$.has(String(N[Q]));else{let D=i.items.indexOf(N);I=D<g||D>w}if(I){Z.add(N);let D=this.itemToElement.get(N);if(D!=null)for(let v of D)v.remove();else M.remove();if(this.itemToElement.delete(N),Q!=null)this.idToElement.delete(String(N[Q]));_++}}}if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(B)+"px",this.listBottom.style.height=String(q)+"px";let p=[],T=Q!=null?new Set:null;for(let M=g;M<=w;M++){let N=i.items[M];if(N===void 0)continue;if(T!=null&&Q!=null){let D=String(N[Q]);if(T.has(D)){if(!U8)U8=!0,console.error(`tosijs list binding: duplicate idPath value "${D}" (idPath: "${Q}"). `+"id-path values must be unique — items sharing an id collapse to a single "+"row and updates target the wrong item. Warned once per session.")}else T.add(D)}let I=this.itemToElement.get(b(N));if(I==null&&Q!=null){let D=String(N[Q]);if(I=this.idToElement.get(D),I!=null){let v=b(N);this.itemToElement.set(v,I);for(let A1 of I)A1[Q2]=v}}if(I==null){U++;let D=b(N);if(I=this.templates.map((v)=>e2(v)),typeof N==="object")this.itemToElement.set(D,I);for(let v of I)v[Q2]=typeof N==="object"?D:!0;for(let v of I)if(this.listBottom!=null)this.boundElement.insertBefore(v,this.listBottom);else this.boundElement.append(v);if(Q!=null){let v=N[Q],A1=`${l}[${Q}=${v}]`;for(let u1 of I)K8(u1,A1);this.idToElement.set(String(v),I)}else{let v=`${l}[${M}]`;for(let A1 of I)K8(A1,v)}}if(this.options.virtual!=null){let D=String(M+1);if(Y>1)for(let v=0;v<I.length;v++){let A1=I[v];A1.setAttribute("role","gridcell"),A1.setAttribute("aria-rowindex",D),A1.setAttribute("aria-colindex",String(v+1))}else for(let v of I)v.setAttribute("role","listitem"),v.setAttribute("aria-rowindex",D)}p.push(...I)}let C1=this.listTop;for(let M of p){if(M.previousElementSibling!==C1)if(K++,C1?.nextElementSibling!=null)this.boundElement.insertBefore(M,C1.nextElementSibling);else if(this.listBottom!=null)this.boundElement.insertBefore(M,this.listBottom);else this.boundElement.append(M);C1=M}if(i.interpolation!=null)this._updateInterpolatedBuffers(i);if(a0.perf)console.log(l,"updated",{removed:_,created:U,moved:K})}_updateInterpolatedBuffers(y){let{t:x,position:h,scrollTop:C,viewportHeight:l,totalScrollHeight:i,rowHeight:k}=y.interpolation,g=0;for(let j of Array.from(this.boundElement.children)){if(j===this.listTop||j===this.listBottom)continue;g+=j.offsetHeight||k}let w=C,B=C+l-g,q=Math.max(0,x*B+(1-x)*w-h%1*k);if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(q)+"px",this.listBottom.style.height=String(Math.max(0,i-q-g))+"px"}}var Y2=(y,x,h)=>{let C=y[E0];if(x&&C===void 0)C=new m8(y,x,h),y[E0]=C;return C},f5=(y)=>{let x;while(!(x=y[Q2])&&y&&y.parentElement)y=y.parentElement;return x?{element:y,item:x}:void 0},q2=(y)=>{let x=f5(y);return x?x.item:void 0},fx=(y)=>{let x=f5(y);if(!x)return console.error("deleteListItem failed, element is not part of a list instance",y),!1;let h=Y2(x.element.parentElement);if(!h.options.idPath)return console.error("deleteListItem failed, list binding has no idPath",y.parentElement,h),!1;let C=h.array.indexOf(x.item);if(C>-1)return h.array.splice(C,1),!0;return!1},ux={start:"start",middle:"center",end:"end",nearest:"nearest"},Ex=(y,x,h={})=>{let C=Y2(y);if(C==null)return console.error("scrollListItemIntoView failed, element has no list binding",y),!1;let{position:l="middle",behavior:i="smooth"}=h,k=C.filteredArray(),g=b(x)??x,w=k.indexOf(g);if(w===-1)return console.error("scrollListItemIntoView failed, item not found in list",x),!1;let{virtual:B}=C.options;if(B!=null&&y instanceof HTMLElement){let q=B.width!=null?Math.max(1,Math.floor(y.offsetWidth/B.width)):B.visibleColumns??1,j=Math.floor(w/q),_=B.minHeight??B.height,K=Math.ceil(k.length/q),U=B.scrollContainer==="window",Q=U?window.innerHeight:y.offsetHeight,Y;if(B.minHeight!=null){let $=Math.ceil(Q/_)+(B.rowChunkSize||1),Z=K*_,p=Math.max(0,Z-Q),T=Math.max(1,K-$+1),C1=j/T;switch(l){case"start":Y=C1*p;break;case"end":Y=Math.max(0,(j-$+1)/T*p);break;case"nearest":{let M=U?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop,N=p>0?M/p:0,I=Math.floor(N*T);if(j<I)Y=C1*p;else if(j>=I+$)Y=Math.max(0,(j-$+1)/T*p);else return!0;break}default:{let M=j-Math.floor($/2);Y=Math.max(0,M)/T*p}}}else{let $=j*B.height;switch(l){case"start":Y=$;break;case"end":Y=$-Q+B.height;break;case"nearest":{let Z=U?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop;if($<Z)Y=$;else if($+B.height>Z+Q)Y=$-Q+B.height;else return!0;break}default:Y=$-(Q-B.height)/2}}if(Y=Math.max(0,Y),U){let $=y.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:$+Y,behavior:i})}else y.scrollTo({top:Y,behavior:i})}else{let q=C.itemToElement.get(g);if(q==null||q.length===0)return console.error("scrollListItemIntoView failed, no DOM element found for item",x),!1;q[0].scrollIntoView({block:ux[l]??"center",behavior:i})}return!0},{document:h0,MutationObserver:G8}=globalThis,u5=(y,x)=>{let h=L1.get(y);if(h==null)return;for(let C of h){let{binding:l,options:i}=C,{path:k}=C,{toDOM:g}=l;if(g!=null){if(k.startsWith("^")){let w=q2(y);if(w!=null&&w[H1]!=null)k=C.path=`${w[H1]}${k.substring(1)}`;else{if(y instanceof HTMLElement)console.warn(`Unresolved relative binding "${k}" —`,y,"is not part of a list. If this is a list template, wrap it in a <template>.");continue}}if(x==null||y0(x,k))g(y,C4()[k],i)}}};if(G8!=null)new G8((y)=>{y.forEach((x)=>{Array.from(x.addedNodes).forEach((h)=>{if(h instanceof Element)Array.from(h.querySelectorAll(B2)).forEach((C)=>u5(C))})})}).observe(h0.body,{subtree:!0,childList:!0});C0(()=>!0,(y)=>{let x=Array.from(h0.querySelectorAll(B2));for(let h of x)u5(h,y)});var t8=(y)=>{let x=y.composedPath!=null?y.composedPath()[0]:y.target;return x instanceof Element?x:null},y4=(y,x)=>{while(y!=null){let h=y.closest(x);if(h!=null)return h;let C=y.getRootNode();y=typeof ShadowRoot<"u"&&C instanceof ShadowRoot?C.host:null}return null},e8=(y,x)=>{if(y.parentElement!=null)return y4(y.parentElement,x);let h=y.getRootNode();if(typeof ShadowRoot<"u"&&h instanceof ShadowRoot)return y4(h.host,x);return null},F8=(y)=>{let x=y4(t8(y),B2);while(x!=null){let h=L1.get(x);for(let C of h??[]){let{binding:l,path:i}=C,{fromDOM:k}=l;if(k!=null){let g;try{g=k(x,C.options)}catch(w){throw console.error("Cannot get value from",x,"via",C),Error("Cannot obtain value fromDOM")}if(g!=null){let w=C4(),B=w[i];if(B==null)w[i]=g;else{let q=B[H1]!=null?B[z2]:B,j=g[H1]!=null?g[z2]:g;if(typeof q==="number"&&typeof j==="string"){let _=j.trim();if(_!==""){let K=Number(_);if(!Number.isNaN(K))j=K}}else if(j instanceof Date){if(typeof q==="number")j=j.getTime();else if(typeof q==="string")j=x.value}if(q instanceof Date&&j instanceof Date?q.getTime()!==j.getTime():q!==j)w[i]=j}}}}x=e8(x,B2)}};if(globalThis.document!=null)h0.body.addEventListener("change",F8,!0),h0.body.addEventListener("input",F8,!0);function ax(y,x,h,C){let{paths:l,transform:i}=x,{toDOM:k}=h;if(k==null)return y;let g=null,w={toDOM(q,j,_){let K=C4(),U=l.map((Y)=>K[Y]);if(g!==null&&U.every((Y,$)=>Y===g[$]))return;g=U;let Q=i(...U);k(q,Q,_)},fromDOM:h.fromDOM};y.classList?.add(s5);let B=L1.get(y);if(B==null)B=[],L1.set(y,B);for(let q of l)B.push({path:q,binding:w,options:C});if(!l[0].startsWith("^"))O1(l[0]);return y}var O8=!1,mx=(y,x)=>{if(O8)return;if(typeof ShadowRoot<"u"&&y.getRootNode!=null&&y.getRootNode()instanceof ShadowRoot)O8=!0,console.warn(`tosijs: ${x} targets an element inside a shadow root, where data bindings do not operate (documented Component design boundary). A shadow-DOM component is bound like an <input>: bind its VALUE from outside (bindings.value) and implement render() to reflect value into the shadow DOM. Warned once per session.`,y)};function d1(y,x,h,C){if(y instanceof DocumentFragment)throw Error("bind cannot bind to a DocumentFragment");if(mx(y,"bind()"),x!=null&&typeof x==="object"&&x[x4])return ax(y,x,h,C);let l;if(typeof x==="object"&&x[H1]===void 0&&C===void 0){let{value:g}=x;l=typeof g==="string"?g:g[H1],C={...x},delete C.value}else l=typeof x==="string"?x:x[H1];if(l==null)throw Error("bind requires a path or object with xin Proxy");let{toDOM:i}=h;y.classList?.add(s5);let k=L1.get(y);if(k==null)k=[],L1.set(y,k);if(k.push({path:l,binding:h,options:C}),i!=null&&!l.startsWith("^"))O1(l);if(C?.filter&&C?.needle)d1(y,C.needle,{toDOM(g,w){g[E0]?.filter(w)}});return y}var W8=new Set,tx=(y)=>{let x=y4(t8(y),h8),h=!1,C=new Proxy(y,{get(i,k){if(k==="stopPropagation")return()=>{y.stopPropagation(),h=!0};else{let g=i[k];return typeof g==="function"?g.bind(i):g}}}),l=new Set;while(!h&&x!=null){let i=t2.get(x)?.[y.type]??l;for(let k of i){if(typeof k==="function")k(C);else{let g=C4()[k];if(typeof g==="function")g(C);else throw Error(`no event handler found at path ${k}`)}if(h)continue}x=e8(x,h8)}};function N2(y,x,h){let C=t2.get(y);if(y.classList.add(p8),C==null)C={},t2.set(y,C);if(!C[x])C[x]=new Set;if(C[x].add(h),!W8.has(x))W8.add(x),h0.body.addEventListener(x,tx,!0);return()=>{C[x].delete(h)}}Vx(d1,N2);function y6(y,x){if(!y.internals)return;let h={},C="";if(y.hasAttribute("required")&&x==="")h.valueMissing=!0,C="Please fill out this field.";let l=y.getAttribute("minlength");if(l&&x.length<parseInt(l,10))h.tooShort=!0,C=`Please use at least ${l} characters.`;let i=y.getAttribute("maxlength");if(i&&x.length>parseInt(i,10))h.tooLong=!0,C=`Please use no more than ${i} characters.`;let k=y.getAttribute("pattern");if(k&&x!=="")try{if(!new RegExp(`^(?:${k})$`).test(x))h.patternMismatch=!0,C="Please match the requested format."}catch{}if(Object.keys(h).length>0)y.internals.setValidity(h,C,y);else y.internals.setValidity({})}var ex=0;function O5(){return`custom-elt${(ex++).toString(36)}`}var Q8=0,X8=new Set,$8=new Set,Y8=Symbol("tosiDrainWrapped"),N8=new WeakSet,W5=null;function yh(){if(W5===null)W5=new MutationObserver((y)=>{let x=new Set;for(let h of y)if(h.type==="attributes"&&h.target instanceof F){let C=h.target,l=s8(h.attributeName);if(C._legacyTrackedAttrs?.has(l))x.add(C)}for(let h of x)h.queueRender(!1)});return W5}var m2={};function xh(y,x){let h=m2[y],C=$2(x).replace(/:host\(([^)]+)\)/g,`${y}$1`).replace(/:host\b/g,y);m2[y]=h?h+`
|
|
13
|
-
`+C:C}function hh(y){if(m2[y])document.head.append(G.style({id:y+"-component"},m2[y]));delete m2[y]}class F extends HTMLElement{static elements=G;static _elementCreator;static initAttributes;static formAssociated;static preferredTagName;static shadowStyleSpec;static lightStyleSpec;static extends;internals;get validity(){return this.internals?.validity}get validationMessage(){return this.internals?.validationMessage??""}get willValidate(){return this.internals?.willValidate??!1}checkValidity(){return this.internals?.checkValidity()??!0}reportValidity(){return this.internals?.reportValidity()??!0}setCustomValidity(y){if(this.internals)if(y)this.internals.setValidity({customError:!0},y);else this.internals.setValidity({})}setValidity(y,x,h){this.internals?.setValidity(y,x,h)}setFormValue(y,x){this.internals?.setFormValue(y,x)}static get observedAttributes(){let y=this.initAttributes;if(y)return["hidden",...Object.keys(y).map(K1)];return["hidden"]}instanceId;styleNode;static styleSpec;static styleNode;content=G.slot();isSlotted;static _tagName=null;static get tagName(){return this._tagName}_legacyTrackedAttrs;_attrValues;_valueChanged=!1;_pendingAttrOps;static StyleNode(y){return console.warn("StyleNode is deprecated, use static shadowStyleSpec instead"),G.style($2(y))}static elementCreator(y={}){let x=this;if(!Object.prototype.hasOwnProperty.call(x,"_elementCreator")){if(y.tag!==void 0)j1("elementCreator-tag","Passing tag to elementCreator() is deprecated. Use static preferredTagName instead.");if(y.styleSpec!==void 0)j1("elementCreator-styleSpec","Passing styleSpec to elementCreator() is deprecated. Use static lightStyleSpec instead.");if(y.extends!==void 0)j1("elementCreator-extends","Passing extends to elementCreator() is deprecated. Use static extends instead.");let h=y.tag??x.preferredTagName;if(h==null)if(typeof x.name==="string"&&x.name!==""){if(h=K1(x.name),h.startsWith("-"))h=h.slice(1)}else h=O5();if(customElements.get(h)!=null)console.warn(`${h} is already defined`);if(h.match(/\w+(-\w+)+/)==null)console.warn(`${h} is not a legal tag for a custom-element`),h=O5();while(customElements.get(h)!==void 0)h=O5();x._tagName=h;let C=y.styleSpec??x.lightStyleSpec;if(C!==void 0)xh(h,C);let l=y.extends??x.extends,i=l?{extends:l}:void 0,k=this.prototype;if(k!=null&&!Object.prototype.hasOwnProperty.call(k,Y8)){let g=k.connectedCallback;k.connectedCallback=function(){if(this._drainPendingAttrOps(),g)g.call(this)},Object.defineProperty(k,Y8,{value:!0,enumerable:!1})}window.customElements.define(h,this,i),x._elementCreator=G[h]}return x._elementCreator}initAttributes(...y){if(j1("initAttributes","initAttributes() is deprecated. Use static initAttributes = { ... } instead."),!this._legacyTrackedAttrs)this._legacyTrackedAttrs=new Set;for(let C of y)this._legacyTrackedAttrs.add(C);yh().observe(this,{attributes:!0});let x={},h={};y.forEach((C)=>{x[C]=D1(this[C]);let l=K1(C);Object.defineProperty(this,C,{enumerable:!1,get(){if(typeof x[C]==="boolean")return this.hasAttribute(l);else if(this.hasAttribute(l))return typeof x[C]==="number"?parseFloat(this.getAttribute(l)):this.getAttribute(l);else if(h[C]!==void 0)return h[C];else return x[C]},set(i){if(typeof x[C]==="boolean"){if(i!==this[C]){if(i)this.setAttribute(l,"");else this.removeAttribute(l);this.queueRender()}}else if(typeof x[C]==="number"){if(i!==parseFloat(this[C]))this.setAttribute(l,i),this.queueRender()}else if(typeof i==="object"||`${i}`!==`${this[C]}`){if(i===null||i===void 0||typeof i==="object")this.removeAttribute(l);else this.setAttribute(l,i);this.queueRender(),h[C]=i}}})})}initValue(){let y=Object.getOwnPropertyDescriptor(this,"value");if(y===void 0||y.get!==void 0||y.set!==void 0)return;let x=this.hasAttribute("value")?this.getAttribute("value"):D1(this.value);delete this.value,Object.defineProperty(this,"value",{enumerable:!1,get(){return x},set(h){if(x!==h)x=h,this._valueChanged=!0,this.queueRender(!0)}})}_parts;get parts(){let y=this.shadowRoot!=null?this.shadowRoot:this;if(this._parts==null)this._parts=new Proxy({},{get(x,h){if(typeof h!=="string")return;if(x[h]===void 0){let C=y.querySelector(`[part="${h}"]`);if(C==null)C=y.querySelector(`[data-ref="${h}"]`);if(C==null)C=y.querySelector(h);if(C==null)throw Error(`elementRef "${h}" does not exist!`);C.removeAttribute("data-ref"),x[h]=C}return x[h]}});return this._parts}attributeChangedCallback(y,x,h){let C=s8(y);if(h===null&&this._attrValues?.has(C))this._attrValues.delete(C);if(!this._legacyTrackedAttrs?.has(C))this.queueRender(!1)}constructor(){super();if(Q8+=1,this._installAttributeQueue(),this.constructor.formAssociated&&typeof this.attachInternals==="function"&&!this.internals)this.internals=this.attachInternals();let y=this.constructor.initAttributes;if(y)this._setupAttributeAccessors(y);this.instanceId=`${this.tagName.toLocaleLowerCase()}-${Q8}`,this._value=D1(this.defaultValue),this._warnOnHandlerCollisions()}_warnOnHandlerCollisions(){let y=this.constructor;if(N8.has(y))return;N8.add(y),queueMicrotask(()=>{let x=new Set;for(let i of Object.keys(this))if(/^on[A-Z]/.test(i))x.add(i);let h=Object.getPrototypeOf(this);while(h&&h!==F.prototype){for(let i of Object.getOwnPropertyNames(h))if(/^on[A-Z]/.test(i))x.add(i);h=Object.getPrototypeOf(h)}let C=this.tagName.toLowerCase();if(x.delete("onResize")&&this.handleResize===void 0)console.warn(`<${C}> defines 'onResize', which is deprecated. Rename it to 'handleResize'. The on<Event> prefix is reserved for event-handler sugar in the elements factory (creator({ onResize }) would attach a 'resize' listener) and is being retired for component callbacks in favor of the handle<Event> convention.`);if(x.size===0)return;let l=Array.from(x,(i)=>`'${i}'`).join(", ");console.warn(`<${C}> defines ${l}. The elements factory treats on<Event> property `+"names as event-handler sugar — e.g. creator({ onClick }) attaches a "+"'click' listener rather than assigning the property — so these members "+"are shadowed and cannot be set or read via the element creator. Rename them with the handle<Event> convention (e.g. 'handleClick') to keep them usable as component members.")})}_installAttributeQueue(){let y=this.constructor.initAttributes;if(!y)return;let x=new Set(Object.keys(y).map(K1)),h=[];this._pendingAttrOps=h;let C=HTMLElement.prototype;this.setAttribute=(l,i)=>{if(x.has(l))h.push(["set",l,String(i)]);else C.setAttribute.call(this,l,i)},this.removeAttribute=(l)=>{if(x.has(l))h.push(["remove",l]);else C.removeAttribute.call(this,l)},queueMicrotask(()=>this._drainPendingAttrOps())}_drainPendingAttrOps(){let y=this._pendingAttrOps;if(y===void 0)return;this._pendingAttrOps=void 0,delete this.setAttribute,delete this.removeAttribute;let x=new Set;for(let h of y)if(this.hasAttribute(h[1]))x.add(h[1]);for(let h of y)if(h[0]==="set"){if(!x.has(h[1]))this.setAttribute(h[1],h[2])}else x.delete(h[1]),this.removeAttribute(h[1])}_installedAttrAccessors;_setupAttributeAccessors(y){if(!this._attrValues)this._attrValues=new Map;if(!this._installedAttrAccessors)this._installedAttrAccessors=new Set;for(let x of Object.keys(y)){let h=K1(x),C=y[x];if(x==="value"){console.warn(`${this.tagName}: 'value' cannot be an attribute. Use the Component value property instead.`);continue}if(typeof C==="object"&&C!==null){console.warn(`${this.tagName}: initAttributes.${x} is an object. Use a regular property instead.`);continue}if(C===!0)throw Error(`${this.tagName}: static initAttributes.${x} defaults a boolean attribute to true, but HTML boolean attributes are false-by-default (presence = true, absence = false) and `+`cannot reflect a true default — it would silently become false. Use { ${x}: false }, or model it as a string/number attribute or a plain (non-attribute) property.`);let l=this,i=!1;while(l){let k=Object.getOwnPropertyDescriptor(l,x);if(k){if(!k.configurable||k.get||k.set){i=!0;break}break}l=Object.getPrototypeOf(l)}if(i)continue;this._installAttrAccessor(x,h,C)}}_installAttrAccessor(y,x,h){Object.defineProperty(this,y,{enumerable:!1,configurable:!0,get:()=>{if(typeof h==="boolean"){if(this.hasAttribute(x))return!0;if(this._attrValues.has(y))return this._attrValues.get(y);return!1}else if(this.hasAttribute(x))return typeof h==="number"?parseFloat(this.getAttribute(x)):this.getAttribute(x);else if(this._attrValues.has(y))return this._attrValues.get(y);else return h},set:(C)=>{if(typeof h==="boolean"){if(C!==this[y]){if(C)this.setAttribute(x,"");else this.removeAttribute(x);this.queueRender(),this._attrValues.set(y,!!C)}}else if(typeof h==="number"){if(C!==parseFloat(this[y]))this.setAttribute(x,C),this.queueRender(),this._attrValues.set(y,C)}else if(typeof C==="object"||`${C}`!==`${this[y]}`){if(C===null||C===void 0||typeof C==="object")this.removeAttribute(x);else this.setAttribute(x,C);this.queueRender(),this._attrValues.set(y,C)}}}),this._installedAttrAccessors.add(y)}_recoverShadowedAttrAccessors(){let y=this._installedAttrAccessors,x=this.constructor.initAttributes;if(y==null||x==null)return;let h=[];for(let C of y){let l=Object.getOwnPropertyDescriptor(this,C);if(l==null||l.get!=null||l.set!=null)continue;let i=l.value;delete this[C],this._installAttrAccessor(C,K1(C),x[C]),this[C]=i,h.push(C)}if(h.length>0&&!$8.has(this.tagName)){$8.add(this.tagName);let C=h.map((l)=>`'${l}'`).join(", ");console.warn(`<${this.tagName.toLowerCase()}> declares instance field(s) ${C} that shadow static initAttributes accessors (class fields use [[Define]] semantics). The field value was adopted and the `+"reactive accessor restored — delete the field declaration; "+"static initAttributes already defines the property.")}}connectedCallback(){if(this._recoverShadowedAttrAccessors(),this._drainPendingAttrOps(),hh(this.constructor.tagName),this.hydrate(),this.role!=null)this.setAttribute("role",this.role);if(this.constructor.formAssociated&&!this.hasAttribute("tabindex"))this.setAttribute("tabindex","0");let y=this.handleResize??this.onResize;if(y!==void 0){if(R5.observe(this),this._onResize==null)this._onResize=y.bind(this);this.addEventListener("resize",this._onResize)}if(this.value!=null&&this.getAttribute("value")!=null)this._value=this.getAttribute("value");if(this.internals&&this.value!==void 0)this.internals.setFormValue(this.value),this.validateValue();this.queueRender()}disconnectedCallback(){R5.unobserve(this)}formResetCallback(){if(this.value!==void 0)this.value=this.defaultValue??""}formDisabledCallback(y){if(y)this.setAttribute("disabled","");else this.removeAttribute("disabled")}formStateRestoreCallback(y){if(this.value!==void 0&&typeof y==="string")this.value=y}_changeQueued=!1;_renderQueued=!1;queueRender(y=!1){if(!this._hydrated)return;if(!this._changeQueued)this._changeQueued=y;if(!this._renderQueued)this._renderQueued=!0,requestAnimationFrame(()=>{if(this._changeQueued){if(I8(this,"change",{bubbles:!0,composed:!0}),this.internals&&this.value!==void 0)this.internals.setFormValue(this.value)}this._changeQueued=!1,this._renderQueued=!1,this.render()})}_hydrated=!1;_whenHydrated;_resolveHydrated;get hydrated(){return this._hydrated}get whenHydrated(){if(this._hydrated)return Promise.resolve();if(this._whenHydrated==null)this._whenHydrated=new Promise((y)=>{this._resolveHydrated=y});return this._whenHydrated}hydrate(){if(!this._hydrated){this.initValue();let y=typeof this.content!=="function",x=typeof this.content==="function"?this.content(G):this.content;if(Array.isArray(x)){let i={};x=x.filter((k)=>{if(k instanceof Node||typeof k==="string"||typeof k==="number"||V1(k))return!0;return Object.assign(i,k),!1});for(let k of Object.keys(i))L5(this,k,i[k])}let h=this.constructor,C=h.shadowStyleSpec??h.styleSpec;if(h.styleSpec&&!h.shadowStyleSpec)j1("static-styleSpec","static styleSpec is deprecated. Use static shadowStyleSpec instead.");let{styleNode:l}=h;if(C)l=h.styleNode=G.style($2(C)),delete h.styleNode;if(this.styleNode)console.warn(this,"styleNode is deprecated, use static shadowStyleSpec instead"),l=this.styleNode;if(l){let i=this.attachShadow({mode:"open"});if(i.appendChild(l.cloneNode(!0)),w8(i,x,y),!X8.has(this.tagName)&&i.querySelector(B2)!=null)X8.add(this.tagName),console.warn(`<${this.tagName.toLowerCase()}> has data-binding sugar in its shadow-DOM content, where bindings do not operate. A shadow-DOM component is bound like an <input>: bind its VALUE from outside (bindings.value) and implement render() to reflect value into `+"the shadow DOM — setting value queues render() and emits change "+"automatically. on() event handlers are fine. Warned once per component class.")}else if(x!==null){let i=Array.from(this.childNodes);w8(this,x,y),this.isSlotted=this.querySelector("slot,tosi-slot,xin-slot")!==null;let k=Array.from(this.querySelectorAll("slot"));if(k.length>0)k.forEach(i4.replaceSlot);if(i.length>0){let g={"":this};Array.from(this.querySelectorAll("tosi-slot,xin-slot")).forEach((w)=>{g[w.name]=w}),i.forEach((w)=>{let B=g[""],q=w instanceof Element?g[w.slot]:B;(q!==void 0?q:B).append(w)})}}this._hydrated=!0,this._parts=void 0,this._resolveHydrated?.()}}render(){if(this._valueChanged&&this.internals&&this.value!==void 0)this.internals.setFormValue(this.value),this.validateValue();this._valueChanged=!1}validateValue(){if(!this.internals||this.value===void 0)return;let y=typeof this.value==="string"?this.value:String(this.value);y6(this,y)}}class i4 extends F{static preferredTagName="tosi-slot";static initAttributes={name:""};content=null;static replaceSlot(y){let x=document.createElement("tosi-slot");if(y.name!=="")x.setAttribute("name",y.name);while(y.firstChild!=null)x.appendChild(y.firstChild);y.replaceWith(x)}}var Ch=i4.elementCreator();class x6 extends F{static preferredTagName="xin-slot";static initAttributes={name:""};content=null;constructor(){super();j1("xin-slot","<xin-slot> is deprecated. Use <tosi-slot> instead.")}static replaceSlot=i4.replaceSlot}var lh=x6.elementCreator(),ih=(y=()=>!0)=>{let x=localStorage.getItem("xin-state");if(x!=null){let C=JSON.parse(x);for(let l of Object.keys(C).filter(y))l1[l]=C[l]}let h=l0(()=>{let C={},l=b(l1);for(let i of Object.keys(l).filter(y))C[i]=l[i];localStorage.setItem("xin-state",JSON.stringify(C)),console.log("xin state saved to localStorage")},500);n5((C)=>{let l=C.split(/[.[]/)[0];return y(l)},h)},kh="tosijs-share",gh="tosijs-share",a2="shared",wh=1,D5=new Set,H5=new Set,b5=new Set,S5=new Set,Q5=new Map,g2=null,M5="",f0=null,Bh=null;function J8(){if(f0!=null)return Promise.resolve(f0);return new Promise((y,x)=>{let h=indexedDB.open(gh,wh);h.onupgradeneeded=()=>{h.result.createObjectStore(a2)},h.onsuccess=()=>{f0=h.result,y(f0)},h.onerror=()=>x(h.error)})}var zh={async get(y){let x=await J8();return new Promise((h,C)=>{let l=x.transaction(a2,"readonly").objectStore(a2).get(y);l.onsuccess=()=>h(l.result),l.onerror=()=>C(l.error)})},async set(y,x){let h=await J8();return new Promise((C,l)=>{let i=h.transaction(a2,"readwrite");i.objectStore(a2).put(x,y),i.oncomplete=()=>C(),i.onerror=()=>l(i.error)})}};function h6(){return Bh??zh}function qh(y){return y!=null&&y.type==="tosijs-share"&&typeof y.path==="string"}function E5(y){for(let x of D5)if(y===x||y.startsWith(x+"."))return x;return}function jh(y){for(let x of H5)if(y===x||y.startsWith(x+"."))return!0;return!1}function C6(y,x){let h=E5(y);if(h!==void 0&&b5.has(h))S5.add(h);H5.add(y),h4(w1,y,x),O1(y),d5().then(()=>{H5.delete(y)})}function Vh(){if(g2!=null)return g2;return M5=crypto.randomUUID(),g2=new BroadcastChannel(kh),g2.onmessage=(y)=>{let x=y.data;if(!qh(x))return;if(x.origin===M5)return;if(E5(x.path)===void 0)return;C6(x.path,x.value)},g2}function Ph(y,x){if(g2==null)return;let h={type:"tosijs-share",path:y,value:x,origin:M5};g2.postMessage(h)}function _h(y){if(!Q5.has(y))Q5.set(y,l0(()=>{let x=y1(w1,y);h6().set(y,x)},500));Q5.get(y)()}async function Ah(...y){if(typeof BroadcastChannel>"u")return{restored:[]};Vh();let x=[],h=h6();for(let C of y){let l=typeof C==="string"?C:V1(C);if(l===void 0)throw Error("share() requires boxed proxies or string paths. Got a non-proxy value.");if(D5.has(l))continue;D5.add(l),b5.add(l);let i=await h.get(l),k=S5.has(l);if(b5.delete(l),S5.delete(l),i!==void 0&&!k)C6(l,i),x.push(C);else if(i===void 0){let g=y1(w1,l);await h.set(l,g)}C0((g)=>g===l||g.startsWith(l+"."),(g)=>{if(jh(g))return;let w=E5(g);if(w===void 0)return;let B=y1(w1,g);Ph(g,B),_h(w)})}return{restored:x}}var I5=new Set;function Z8(y,x){for(let h of y)if(x===h||x.startsWith(h+"."))return h;return}function Kh(y){for(let x of I5)if(y===x||y.startsWith(x+"."))return!0;return!1}function Uh(y,x){I5.add(y),h4(w1,y,x),O1(y),d5().then(()=>{I5.delete(y)})}async function Gh(y,x,...h){let C=new Set,l=[],i=[],k=x.throttleInterval??100;await y.connect();let g=X2(()=>{if(l.length===0)return;let w=l.splice(0);try{y.send(w)}catch(B){l.unshift(...w),console.error("sync: transport.send failed; deltas requeued and will retry on the next flush",B)}},k);y.onReceive((w)=>{for(let B of w){if(Z8(C,B.path)===void 0)continue;Uh(B.path,B.value)}});for(let w of h){let B=typeof w==="string"?w:V1(w);if(B===void 0)throw Error("sync() requires boxed proxies or string paths. Got a non-proxy value.");C.add(B);let q=C0((j)=>j===B||j.startsWith(B+"."),(j)=>{if(Kh(j))return;if(Z8(C,j)===void 0)return;let _=y1(w1,j);l.push({path:j,value:_}),g()});i.push(q)}return{disconnect(){for(let w of i)x0(w);i.length=0,C.clear(),l.length=0,y.disconnect()}}}var l6="1.7.0";function t(y){return Object.assign(U1,y),U1}function a5(y){return j1("boxedProxy","boxedProxy is deprecated, please use tosi() instead"),t(y)}var Fh=new FinalizationRegistry((y)=>{y()});function Oh(y,x){let h=R8();U1[h]=y;let C=U1[h],l=()=>{delete l1[h]};if(x)Fh.register(x,l);return[C,l]}function i6(y,x=!1){if(x)return j1("xinProxy-boxed","xinProxy(..., true) is deprecated; use tosi(...) instead"),a5(y);return Object.keys(y).forEach((h)=>{l1[h]=y[h]}),l1}var Wh={};async function m5(y,x){let h=await x(y,{Color:X,Component:F,elements:G,svgElements:l4,mathML:E8,varDefault:P,vars:z,xin:l1,boxed:U1,xinProxy:i6,boxedProxy:a5,tosi:t,makeComponent:m5,bind:d1,on:N2,version:l6}),{type:C}=h;C.preferredTagName=y;let l=h.lightStyleSpec??h.styleSpec;if(l)C.lightStyleSpec=l;let i={type:C,creator:C.elementCreator()};return Wh[y]=i,i}var k4={":host":{display:"none"}},u0={},Qh=(y)=>import(y);class g4 extends F{static preferredTagName="tosi-blueprint";static lightStyleSpec=k4;static initAttributes={tag:"anon-elt",src:"",property:"default"};loaded;blueprintLoaded=(y)=>{};async packaged(){let{tag:y,src:x,property:h}=this,C=`${y}.${h}:${x}`;if(!this.loaded){if(u0[C]===void 0)u0[C]=Qh(x).then((l)=>{let i=l[h];return m5(y,i)});else console.log(`using cached ${y} with signature ${C}`);try{this.loaded=await u0[C]}catch(l){throw delete u0[C],l}this.blueprintLoaded(this.loaded)}return this.loaded}}var Xh=g4.elementCreator();class t5 extends F{static preferredTagName="tosi-loader";static lightStyleSpec=k4;allLoaded=()=>{};async load(){let y=Array.from(this.querySelectorAll("tosi-blueprint, xin-blueprint")).filter((h)=>h.src),x=await Promise.allSettled(y.map((h)=>h.packaged()));for(let h=0;h<x.length;h++){let C=x[h];if(C.status==="rejected")console.error(`<tosi-loader> failed to load blueprint from "${y[h].src}":`,C.reason)}this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var $h=t5.elementCreator();class k6 extends g4{static preferredTagName="xin-blueprint";static lightStyleSpec=k4;constructor(){super();j1("xin-blueprint","<xin-blueprint> is deprecated. Use <tosi-blueprint> instead.")}}var Yh=k6.elementCreator();class g6 extends F{static preferredTagName="xin-loader";static lightStyleSpec=k4;allLoaded=()=>{};constructor(){super();j1("xin-loader","<xin-loader> is deprecated. Use <tosi-loader> instead.")}async load(){let y=Array.from(this.querySelectorAll("xin-blueprint")).filter((h)=>h.src),x=await Promise.allSettled(y.map((h)=>h.packaged()));for(let h=0;h<x.length;h++){let C=x[h];if(C.status==="rejected")console.error(`<xin-loader> failed to load blueprint from "${y[h].src}":`,C.reason)}this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var Nh=g6.elementCreator();var e5={};class J2 extends F{static preferredTagName="tosi-ab";static set conditions(y){Object.assign(e5,y);for(let x of[...J2.instances])x.queueRender()}static initAttributes={condition:"",not:!1};static instances=new Set;connectedCallback(){super.connectedCallback(),J2.instances.add(this)}disconnectedCallback(){super.disconnectedCallback(),J2.instances.delete(this)}render(){if(this.condition!==""&&(this.not?e5[this.condition]!==!0:e5[this.condition]===!0))this.toggleAttribute("hidden",!1);else this.toggleAttribute("hidden",!0)}}var Jh=J2.elementCreator();var w4={};function b1(y,x){if(w4[y]===void 0){if(x!==void 0){let C=globalThis[x];w4[y]=Promise.resolve({[x]:C})}let h=G.script({src:y});document.head.append(h),w4[y]=new Promise((C)=>{h.onload=()=>C(globalThis)})}return w4[y]}var y3={};function B4(y){if(y3[y]===void 0){let x=G.link({rel:"stylesheet",type:"text/css",href:y});document.head.append(x),y3[y]=new Promise((h)=>{x.onload=h})}return y3[y]}var j2={blueprint:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,7.5,15.5,7.5,17.5 C7.5,19.5,10.5,19.5,10.5,19.5"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,14.5 C18.5,14.5,21.5,15.5,21.5,17.5 C21.5,19.5,18.5,19.5,18.5,19.5"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M7,5.09 C7,3.94,7.9,3,9,3 C9,3,20,3,20,3 C21.1,3,22,3.94,22,5.09 C22,5.09,22,12.41,22,12.41 C22,13.56,21.1,14.5,20,14.5 C20,14.5,9,14.5,9,14.5 C7.9,14.5,7,13.56,7,12.41 C7,12.41,7,5.09,7,5.09 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14.5,5.5 C14.5,5.5,14.5,11.5,14.5,11.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16.5,7.5 C16.5,7.5,16.5,8.5,16.5,8.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,7.5 C12.5,7.5,12.5,8.5,12.5,8.5"/><g/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,21.5 C18.5,21.5,17.5,20.5,17.5,20.5 C17.5,20.5,16.5,21.5,16.5,21.5"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,21.5 C12.5,21.5,11.5,20.5,11.5,20.5 C11.5,20.5,10.5,21.5,10.5,21.5"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,18.5,14.5,18.5,14.5 C18.5,14.5,18.5,19.5,18.5,19.5 C18.5,19.5,10.5,19.5,10.5,19.5 C10.5,19.5,10.5,14.5,10.5,14.5 z"/><g><g><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,16.5 C14,16.5,16,16.5,16,16.5 C16,16.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:evenodd;stroke:none;" d="M3.59,8.5 C3.59,8.5,12.59,8.5,12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5 C14.53,19.5,5.53,19.5,5.53,19.5 C5.53,19.5,3.59,8.5,3.59,8.5 z"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,11.12,11.5,11.12,11.5 C11.12,11.5,2.12,11.5,2.12,11.5 C2.12,11.5,3.59,8.5,3.59,8.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.12,11.5 C4.12,11.5,5.53,19.5,5.53,19.5"/></g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M9.24,12.5 C10.75,12.5,12.2,13.73,12.46,15.24 C12.46,15.24,12.46,15.24,12.46,15.24 C12.68,16.49,11.85,17.5,10.6,17.5 C10.6,17.5,10.55,17.5,10.55,17.5 C10.17,17.5,9.92,17.81,9.98,18.19 C9.98,18.19,9.98,18.19,9.98,18.19 C10.21,19.47,9.36,20.5,8.08,20.5 C8.08,20.5,6.39,20.5,6.39,20.5 C5.1,20.5,3.87,19.45,3.64,18.16 C3.64,18.16,3.12,15.21,3.12,15.21 C2.86,13.71,3.86,12.5,5.35,12.5 C5.35,12.5,9.24,12.5,9.24,12.5 z"/></g></g></svg> ',earth:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,13.46 C5.1,16.52,4,20.13,4,24 C4,31.81,8.47,38.57,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 z"/><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C20.18,4.28,22.06,4,24,4 C27.57,4,30.92,4.93,33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C33.81,42.07,29.13,44,24,44 C21.03,44,18.22,43.35,15.69,42.2 C15.69,42.2,27,29,27,29 C27,29,27,25,27,25 C27,25,21,23,21,23 C21,23,15,19,15,19 C15,19,11,19,11,19 C11,19,11,13,11,13 C11,13,13,11,13,11 C13,11,15,15,15,15 C15,15,17,15,17,15 C17,15,17,9,17,9 C17,9,18.4,4.79,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C18.4,4.79,17,9,17,9 C17,9,17,15,17,15 C17,15,15,15,15,15 C15,15,13,11,13,11 C13,11,11,13,11,13 C11,13,11,19,11,19 C11,19,15,19,15,19 C15,19,21,23,21,23 C21,23,27,25,27,25 C27,25,27,29,27,29 C27,29,15.69,42.2,15.69,42.2 C15.46,42.09,15.23,41.98,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 C9.57,9.32,13.62,6.19,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C41.43,35.23,44,29.91,44,24 C44,16.52,39.9,10,33.82,6.57 z"/></g></g></g></svg> ',cmy:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#00ff00;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#000000;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#02fefe;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#fffe00;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#ff00ff;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',rgb:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#ff00ff;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#ffff00;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#ffffff;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#00ffff;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#00ff00;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',xrColor:'<svg class="color filled" viewBox="0 0 40 24"><g><g><g><path style="fill:#000000;fill-rule:evenodd;" d="M20,2 C19.99,2,19.98,2,19.98,2 C8.39,2,2,3.61,2,12 C2,18.41,5.32,22,10.54,22 C15.77,22,17.37,17.85,19.98,17.85 C19.98,17.85,19.99,17.85,20,17.85 C20.01,17.85,20.02,17.85,20.02,17.85 C22.63,17.85,24.23,22,29.46,22 C34.68,22,38,18.41,38,12 C38,3.61,31.61,2,20.02,2 C20.02,2,20.01,2,20,2 C20,2,20,2,20,2 z"/></g><path style="fill:#fbed21;fill-rule:evenodd;" d="M12.2,19.84 C15.79,19.39,17.07,16.46,19.07,16.46 C19.07,16.46,19.08,16.46,19.09,16.46 C19.09,16.46,19.1,16.46,19.11,16.46 C19.44,16.46,19.75,16.54,20.06,16.68 C20.37,16.54,20.68,16.46,21.01,16.46 C21.02,16.46,21.02,16.46,21.03,16.46 C21.04,16.46,21.04,16.46,21.05,16.46 C23.05,16.46,24.33,19.39,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M12.2,19.84 C12.52,19.87,12.86,19.89,13.21,19.89 C16.86,19.89,18.37,17.43,20.06,16.68 C19.75,16.54,19.44,16.46,19.11,16.46 C19.1,16.46,19.09,16.46,19.09,16.46 C19.08,16.46,19.07,16.46,19.07,16.46 C17.07,16.46,15.79,19.39,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M20.06,3.35 C20.37,3.35,20.69,3.35,21.01,3.35 C21.02,3.35,21.02,3.35,21.03,3.35 C21.03,3.35,21.03,3.35,21.03,3.35 C21.04,3.35,21.04,3.35,21.05,3.35 C30.64,3.35,35.92,4.68,35.92,11.62 C35.92,16.92,33.18,19.89,28.86,19.89 C28.53,19.89,28.22,19.87,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C20.06,3.35,20.06,3.35,20.06,3.35 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M20.06,16.68 C21.74,17.43,23.25,19.89,26.91,19.89 C27.26,19.89,27.59,19.87,27.92,19.84 C24.33,19.39,23.05,16.46,21.05,16.46 C21.04,16.46,21.04,16.46,21.03,16.46 C21.02,16.46,21.02,16.46,21.01,16.46 C20.68,16.46,20.37,16.54,20.06,16.68 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M12.2,19.84 C11.9,19.87,11.59,19.89,11.26,19.89 C6.94,19.89,4.19,16.92,4.19,11.62 C4.19,4.68,9.48,3.35,19.07,3.35 C19.07,3.35,19.08,3.35,19.09,3.35 C19.09,3.35,19.09,3.35,19.09,3.35 C19.09,3.35,19.1,3.35,19.11,3.35 C19.43,3.35,19.75,3.35,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/></g><g><path style="fill:#8cc63e;fill-rule:nonzero;" d="M22.55,8.63 C22.55,9.05,22.55,9.46,22.55,9.88 C22.54,10.25,22.85,10.56,23.2,10.55 C23.54,10.56,23.85,10.25,23.85,9.88 C23.85,9.46,23.85,9.05,23.85,8.63 C23.85,8.26,23.54,7.95,23.2,7.96 C22.85,7.95,22.54,8.26,22.55,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M17.32,8.63 C17.32,9.05,17.32,9.46,17.32,9.88 C17.31,10.25,17.62,10.56,17.97,10.55 C18.31,10.56,18.62,10.25,18.62,9.88 C18.62,9.46,18.62,9.05,18.62,8.63 C18.62,8.26,18.31,7.95,17.97,7.96 C17.62,7.95,17.31,8.26,17.32,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M19.99,4.39 C19.99,8.09,19.99,11.8,19.99,15.5 C19.99,15.87,20.3,16.18,20.64,16.17 C20.99,16.18,21.3,15.87,21.29,15.5 C21.29,11.8,21.29,8.09,21.29,4.39 C21.3,4.02,20.99,3.71,20.64,3.72 C20.3,3.71,19.99,4.02,19.99,4.39 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M21.43,8.63 C21.43,9.05,21.43,9.46,21.43,9.88 C21.42,10.25,21.73,10.56,22.08,10.55 C22.42,10.56,22.73,10.25,22.73,9.88 C22.73,9.46,22.73,9.05,22.73,8.63 C22.73,8.26,22.42,7.95,22.08,7.96 C21.73,7.95,21.42,8.26,21.43,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M16.2,8.63 C16.2,9.05,16.2,9.46,16.2,9.88 C16.19,10.25,16.5,10.56,16.85,10.55 C17.19,10.56,17.5,10.25,17.5,9.88 C17.5,9.46,17.5,9.05,17.5,8.63 C17.5,8.26,17.19,7.95,16.85,7.96 C16.5,7.95,16.19,8.26,16.2,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M18.87,4.39 C18.87,8.09,18.87,11.8,18.87,15.5 C18.87,15.87,19.18,16.18,19.52,16.17 C19.86,16.18,20.18,15.87,20.17,15.5 C20.17,11.8,20.17,8.09,20.17,4.39 C20.18,4.02,19.86,3.71,19.52,3.72 C19.18,3.71,18.87,4.02,18.87,4.39 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M21.97,8.63 C21.97,9.05,21.97,9.46,21.97,9.88 C21.97,10.25,22.28,10.56,22.62,10.55 C22.97,10.56,23.28,10.25,23.27,9.88 C23.27,9.46,23.27,9.05,23.27,8.63 C23.28,8.26,22.97,7.95,22.62,7.96 C22.28,7.95,21.97,8.26,21.97,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M16.74,8.63 C16.74,9.05,16.74,9.46,16.74,9.88 C16.74,10.25,17.05,10.56,17.39,10.55 C17.74,10.56,18.05,10.25,18.04,9.88 C18.04,9.46,18.04,9.05,18.04,8.63 C18.05,8.26,17.74,7.95,17.39,7.96 C17.05,7.95,16.74,8.26,16.74,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M19.41,4.39 C19.41,8.09,19.41,11.8,19.41,15.5 C19.41,15.87,19.72,16.18,20.07,16.17 C20.41,16.18,20.72,15.87,20.72,15.5 C20.72,11.8,20.72,8.09,20.72,4.39 C20.72,4.02,20.41,3.71,20.07,3.72 C19.72,3.71,19.41,4.02,19.41,4.39 z"/></g></g></svg> ',tosiFavicon:'<svg class="color" viewBox="0 0 48 48"><g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M1,9 C1,4.58,4.58,1,9,1 C9,1,39,1,39,1 C43.42,1,47,4.58,47,9 C47,9,47,39,47,39 C47,43.42,43.42,47,39,47 C39,47,9,47,9,47 C4.58,47,1,43.42,1,39 C1,39,1,9,1,9 z"/><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,10,31,10,35 C10,39,16,39,16,39"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,29 C32,29,38,31,38,35 C38,39,32,39,32,39"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,10.18 C9,7.87,10.79,6,13,6 C13,6,35,6,35,6 C37.21,6,39,7.87,39,10.18 C39,10.18,39,24.82,39,24.82 C39,27.13,37.21,29,35,29 C35,29,13,29,13,29 C10.79,29,9,27.13,9,24.82 C9,24.82,9,10.18,9,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,43 C32,43,30,41,30,41 C30,41,28,43,28,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,43 C20,43,18,41,18,41 C18,41,16,43,16,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,32,29,32,29 C32,29,32,39,32,39 C32,39,16,39,16,39 C16,39,16,29,16,29 z"/></g></g></g></svg> ',tosiPlatform:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#3ea9f5;fill-rule:evenodd;stroke:none;" d="M23.97,47 C23.97,47,39,47,39,47 C43.42,47,47,43.42,47,39 C47,39,47,9,47,9 C47,4.58,43.42,1,39,1 C39,1,9,1,9,1 C4.58,1,1,4.58,1,9 C1,9,1,39,1,39 C1,41.64,2.28,43.98,4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:none;" d="M4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 C23.97,47,9,47,9,47 C7.22,47,5.58,46.42,4.25,45.44 z"/></g><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M35,35 C35,35,32.17,35,32.17,35 C32.17,35,32.17,37.83,32.17,37.83"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,39 C31,39,28.17,39,28.17,39 C28.17,39,28.17,41.83,28.17,41.83"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7.48,16 C4.45,16,2,18.45,2,21.48 C2,21.48,2,21.48,2,21.48 C2,23.98,4.02,26,6.52,26 C6.52,26,6.62,26,6.62,26 C7.38,26,8,26.62,8,27.38 C8,27.38,8,27.38,8,27.38 C8,29.93,10.07,32,12.62,32 C12.62,32,16,32,16,32 C18.58,32,20.68,29.91,20.68,27.32 C20.68,27.32,20.68,21.42,20.68,21.42 C20.68,18.43,18.25,16,15.26,16 C15.26,16,7.48,16,7.48,16 z"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,29 C17,29,33,29,33,29 C33,29,33,29,33,29 C33,34.52,28.52,39,23,39 C23,39,23,39,23,39 C19.69,39,17,36.31,17,33 C17,33,17,29,17,29 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40.52,16 C43.55,16,46,18.45,46,21.48 C46,21.48,46,21.48,46,21.48 C46,23.98,43.98,26,41.48,26 C41.48,26,41.38,26,41.38,26 C40.62,26,40,26.62,40,27.38 C40,27.38,40,27.38,40,27.38 C40,29.93,37.93,32,35.38,32 C35.38,32,32,32,32,32 C29.42,32,27.32,29.91,27.32,27.32 C27.32,27.32,27.32,21.42,27.32,21.42 C27.32,18.43,29.75,16,32.74,16 C32.74,16,40.52,16,40.52,16 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M6,10.18 C6,7.87,7.79,6,10,6 C10,6,32,6,32,6 C34.21,6,36,7.87,36,10.18 C36,10.18,36,24.82,36,24.82 C36,27.13,34.21,29,32,29 C32,29,10,29,10,29 C7.79,29,6,27.13,6,24.82 C6,24.82,6,10.18,6,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M21,11 C21,11,21,23,21,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M25,15 C25,15,25,17,25,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,15 C17,15,17,17,17,17"/></g></g></g></svg> ',tosiUi:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M3,33 C3,31.9,3.9,31,5,31 C5,31,43,31,43,31 C44.1,31,45,31.9,45,33 C45,33,45,43,45,43 C45,44.1,44.1,45,43,45 C43,45,5,45,5,45 C3.9,45,3,44.1,3,43 C3,43,3,33,3,33 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,35 C7,35,7,36.34,7,38 C7,39.66,8.34,41,10,41 C11.66,41,13,39.66,13,38 C13,36.34,13,35,13,35"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,35 C17,35,17,41,17,41"/></g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M38,33 C40.76,33,43,35.24,43,38 C43,40.76,40.76,43,38,43 C35.24,43,33,40.76,33,38 C33,35.24,35.24,33,38,33 z"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40,36 C40,36,36,40,36,40"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M36,36 C36,36,40,40,40,40"/></g></g><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21.01 C15.97,21.01,9.97,23.01,9.97,27.01 C9.97,31.01,15.97,31.01,15.97,31.01"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31.97,21.01 C31.97,21.01,37.97,23.01,37.97,27.01 C37.97,31.01,31.97,31.01,31.97,31.01"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,33 C31,33,29.49,31,29.49,31 C29.49,31,27.97,33,27.97,33"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M19.97,33 C19.97,33,17.97,31,17.97,31 C17.97,31,15.97,33,15.97,33"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21 C15.97,21,31.97,21,31.97,21 C31.97,21,31.97,31,31.97,31 C31.97,31,15.97,31,15.97,31 C15.97,31,15.97,21,15.97,21 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,7.18 C9,4.87,10.79,3,13,3 C13,3,35.02,3,35.02,3 C37.23,3,39.03,4.87,39.03,7.18 C39.03,7.18,39.03,21.82,39.03,21.82 C39.03,24.13,37.23,26,35.02,26 C35.02,26,13,26,13,26 C10.79,26,9,24.13,9,21.82 C9,21.82,9,7.18,9,7.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/></g></g></g></svg> ',tosiXr:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,5,15.25,5,17.25 C5,19.25,8,19.25,8,19.25"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,14.25 C16,14.25,19,15.25,19,17.25 C19,19.25,16,19.25,16,19.25"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.5,4.85 C4.5,3.69,5.4,2.75,6.5,2.75 C6.5,2.75,17.5,2.75,17.5,2.75 C18.61,2.75,19.5,3.69,19.5,4.85 C19.5,4.85,19.5,12.16,19.5,12.16 C19.5,13.32,18.61,14.25,17.5,14.25 C17.5,14.25,6.5,14.25,6.5,14.25 C5.4,14.25,4.5,13.32,4.5,12.16 C4.5,12.16,4.5,4.85,4.5,4.85 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12,5.25 C12,5.25,12,11.25,12,11.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,7.25 C14,7.25,14,8.25,14,8.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,7.25 C10,7.25,10,8.25,10,8.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,21.25 C16,21.25,15,20.25,15,20.25 C15,20.25,14,21.25,14,21.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,21.25 C10,21.25,9,20.25,9,20.25 C9,20.25,8,21.25,8,21.25"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,16,14.25,16,14.25 C16,14.25,16,19.25,16,19.25 C16,19.25,8,19.25,8,19.25 C8,19.25,8,14.25,8,14.25 z"/><path style="fill:#ff7bac;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-width:1;" d="M12,4 C12,4,11.99,4,11.99,4 C6.19,4,3,4.73,3,8.5 C3,11.39,4.66,13,7.27,13 C9.88,13,10.68,11.13,11.99,11.13 C11.99,11.13,12,11.13,12,11.13 C12,11.13,12.01,11.13,12.01,11.13 C13.32,11.13,14.12,13,16.73,13 C19.34,13,21,11.39,21,8.5 C21,4.73,17.81,4,12.01,4 C12.01,4,12,4,12,4 C12,4,12,4,12,4 z"/></g></svg> ',tosi:'<svg class="color" viewBox="0 0 48 48"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M38.35,31.7 C39.78,34.37,38.78,37.69,36.11,39.13 C36.11,39.13,36.11,39.13,36.11,39.13 C33.92,40.31,31.18,39.48,29.99,37.29 C29.99,37.29,29.95,37.2,29.95,37.2 C29.58,36.53,28.75,36.27,28.08,36.64 C28.08,36.64,28.08,36.64,28.08,36.64 C25.83,37.84,23.03,37,21.82,34.76 C21.82,34.76,20.22,31.78,20.22,31.78 C18.99,29.5,19.85,26.67,22.12,25.44 C22.12,25.44,27.32,22.65,27.32,22.65 C29.96,21.23,33.24,22.22,34.66,24.85 C34.66,24.85,38.35,31.7,38.35,31.7 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M10.65,31.7 C9.22,34.37,10.22,37.69,12.89,39.13 C12.89,39.13,12.89,39.13,12.89,39.13 C15.08,40.31,17.82,39.48,19.01,37.29 C19.01,37.29,19.05,37.2,19.05,37.2 C19.42,36.53,20.25,36.27,20.92,36.64 C20.92,36.64,20.92,36.64,20.92,36.64 C23.17,37.84,25.97,37,27.18,34.76 C27.18,34.76,28.78,31.78,28.78,31.78 C30.01,29.5,29.15,26.67,26.88,25.44 C26.88,25.44,21.68,22.65,21.68,22.65 C19.04,21.23,15.76,22.22,14.34,24.85 C14.34,24.85,10.65,31.7,10.65,31.7 z"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32.5,43 C32.5,43,30.5,41,30.5,41 C30.5,41,28.5,43,28.5,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,43 C20.5,43,18.5,41,18.5,41 C18.5,41,16.5,43,16.5,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16.5,29 C16.5,29,32.5,29,32.5,29 C32.5,29,32.5,36,32.5,36 C32.5,37.66,31.16,39,29.5,39 C29.5,39,19.5,39,19.5,39 C17.84,39,16.5,37.66,16.5,36 C16.5,36,16.5,29,16.5,29 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9.5,10.18 C9.5,7.87,11.29,6,13.5,6 C13.5,6,35.5,6,35.5,6 C37.71,6,39.5,7.87,39.5,10.18 C39.5,10.18,39.5,24.82,39.5,24.82 C39.5,27.13,37.71,29,35.5,29 C35.5,29,13.5,29,13.5,29 C11.29,29,9.5,27.13,9.5,24.82 C9.5,24.82,9.5,10.18,9.5,10.18 z"/><g><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24.5,11 C24.5,11,24.5,23,24.5,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28.5,15 C28.5,15,28.5,17,28.5,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,15 C20.5,15,20.5,17,20.5,17"/></g></g></g></svg> ',discord:'<svg class="filled" version="1" viewBox="0 0 1013 768"><path d="M858 64c-60-28-131-51-204-64l-5-1c-8 14-17 32-25 51l-1 4c-35-6-75-9-116-9s-81 3-120 9l4-1c-9-22-18-40-28-57l1 3c-79 14-149 36-214 67l5-2c-132 196-168 387-150 575v0c73 55 158 99 250 127l6 2c19-26 38-55 53-85l2-3c-33-13-62-27-89-43l2 1c7-5 14-11 21-16 75 36 163 57 256 57s181-21 260-59l-4 2c7 6 14 11 21 16-25 15-53 29-83 40l-4 1c17 34 36 63 56 90l-1-2c98-30 183-74 259-130l-2 2c21-218-36-407-151-575zM338 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101zM675 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101z"></path></svg> ',facebook:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>',game:'<svg class="filled" version="1" viewBox="0 0 704 512"><path d="M528 97v-1h-336c-88 0-160 72-160 160s72 160 160 160c52 0 99-25 128-64h64c29 39 76 64 128 64 88 0 160-72 160-160 0-83-63-151-144-159zM288 288h-64v64h-64v-64h-64v-64h64v-64h64v64h64v64zM480 288c-18 0-32-14-32-32s14-32 32-32 32 14 32 32-14 32-32 32zM576 288c-18 0-32-14-32-32 0-18 14-32 32-32s32 14 32 32c0 18-14 32-32 32z"></path></svg> ',google:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M256 0c-141 0-256 115-256 256s115 256 256 256 256-115 256-256-115-256-256-256zM260 448c-106 0-192-86-192-192s86-192 192-192c52 0 95 19 129 50l-52 50c-14-14-39-30-77-30-66 0-119 54-119 121s54 121 119 121c76 0 105-55 109-83h-109v-66h181c2 10 3 19 3 32 0 110-73 188-184 188z"></path></svg> ',npm:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M0 0v512h512v-512h-512zM416 416h-64v-256h-96v256h-160v-320h320v320z"></path></svg> ',youtube:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon></svg>',blog:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10.02 C21,10.02,21,15,21,15 C21,15.53,20.79,16.04,20.41,16.41 C20.04,16.79,19.53,17,19,17 C19,17,7,17,7,17 C5.67,18.33,4.33,19.67,3,21 C3,21,3,5,3,5 C3,4.47,3.21,3.96,3.59,3.59 C3.96,3.21,4.47,3,5,3 C8.53,3,10.49,3,14.02,3"/><path style="" d="M19,2 C19.54,1.46,20.32,1.25,21.05,1.45 C21.78,1.65,22.35,2.22,22.55,2.95 C22.75,3.68,22.54,4.46,22,5 C22,5,15.5,11.5,15.5,11.5 C14.17,11.83,12.83,12.17,11.5,12.5 C11.83,11.17,12.17,9.83,12.5,8.5 C15.67,5.33,15.83,5.17,19,2 z"/><path style="" d="M14.6,3"/><path style="" d="M21,8.77"/><path style="" d="M7,7 C7,7,10,7,10,7"/><path style="" d="M7,10 C7,10,9,10,9,10"/></g></svg> ',bug:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M8,6 C8,3.79,9.79,2,12,2 C14.21,2,16,3.79,16,6 C16,6,8,6,8,6 z"/><path style="" d="M20,7 C20,7,18,9,18,9"/><path style="" d="M20,19 C20,19,18,17,18,17"/><path style="" d="M21,13 C21,13,18,13,18,13"/><path style="" d="M16.44,9 C17.3,9,18,9.7,18,10.56 C18,10.56,18,15,18,15 C18,18.31,15.31,21,12,21 C8.69,21,6,18.31,6,15 C6,15,6,10.56,6,10.56 C6,9.7,6.7,9,7.56,9 C7.56,9,16.44,9,16.44,9 z"/><path style="" d="M4,7 C4,7,6,9,6,9"/><path style="" d="M4,19 C4,19,6,17,6,17"/><path style="" d="M3,13 C3,13,6,13,6,13"/><path style="" d="M12,12 C12,12,12,17,12,17"/></g></svg> ',activity:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>',airplay:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg>',alertCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertTriangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',alignCenter:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line></svg>',alignJustify:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="3" y2="18"></line></svg>',alignLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line></svg>',alignRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line></svg>',anchor:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="5" r="3"></circle><line x1="12" y1="22" x2="12" y2="8"></line><path d="M5 12H2a10 10 0 0 0 20 0h-3"></path></svg>',aperture:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line></svg>',archive:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line></svg>',arrowUpRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline></svg>',atSign:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path></svg>',award:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline></svg>',barChart2:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line></svg>',barChart:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="20" x2="12" y2="10"></line><line x1="18" y1="20" x2="18" y2="4"></line><line x1="6" y1="20" x2="6" y2="16"></line></svg>',batteryCharging:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19"></path><line x1="23" y1="13" x2="23" y2="11"></line><polyline points="11 6 7 12 13 12 9 18"></polyline></svg>',battery:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="6" width="18" height="12" rx="2" ry="2"></rect><line x1="23" y1="13" x2="23" y2="11"></line></svg>',bellOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',bell:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>',bluetooth:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6.5 6.5 17.5 17.5 12 23 12 1 17.5 6.5 6.5 17.5"></polyline></svg>',bold:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path></svg>',bookOpen:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg>',book:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>',bookmark:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path></svg>',box:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',briefcase:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path></svg>',calendar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>',cameraOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56"></path></svg>',camera:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle></svg>',cast:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line></svg>',checkCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>',checkSquare:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg>',check:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></svg>',chrome:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="21.17" y1="8" x2="12" y2="8"></line><line x1="3.95" y1="6.06" x2="8.54" y2="14"></line><line x1="10.88" y1="21.94" x2="15.46" y2="14"></line></svg>',circle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle></svg>',clipboard:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg>',clock:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>',cloudDrizzle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="19" x2="8" y2="21"></line><line x1="8" y1="13" x2="8" y2="15"></line><line x1="16" y1="19" x2="16" y2="21"></line><line x1="16" y1="13" x2="16" y2="15"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="12" y1="15" x2="12" y2="17"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudLightning:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9"></path><polyline points="13 11 9 17 15 17 11 23"></polyline></svg>',cloudOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',cloudRain:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16" y1="13" x2="16" y2="21"></line><line x1="8" y1="13" x2="8" y2="21"></line><line x1="12" y1="15" x2="12" y2="23"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudSnow:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25"></path><line x1="8" y1="16" x2="8.01" y2="16"></line><line x1="8" y1="20" x2="8.01" y2="20"></line><line x1="12" y1="18" x2="12.01" y2="18"></line><line x1="12" y1="22" x2="12.01" y2="22"></line><line x1="16" y1="16" x2="16.01" y2="16"></line><line x1="16" y1="20" x2="16.01" y2="20"></line></svg>',cloud:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path></svg>',code:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>',codepen:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line></svg>',codesandbox:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',coffee:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8h1a4 4 0 0 1 0 8h-1"></path><path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path><line x1="6" y1="1" x2="6" y2="4"></line><line x1="10" y1="1" x2="10" y2="4"></line><line x1="14" y1="1" x2="14" y2="4"></line></svg>',columns:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path></svg>',command:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"></path></svg>',compass:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon></svg>',copy:'<svg class="stroked" viewBox="0 0 24 24"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>',cpu:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line></svg>',creditCard:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line></svg>',crop:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6.13 1L6 16a2 2 0 0 0 2 2h15"></path><path d="M1 6.13L16 6a2 2 0 0 1 2 2v15"></path></svg>',crosshair:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="22" y1="12" x2="18" y2="12"></line><line x1="6" y1="12" x2="2" y2="12"></line><line x1="12" y1="6" x2="12" y2="2"></line><line x1="12" y1="22" x2="12" y2="18"></line></svg>',database:'<svg class="stroked" viewBox="0 0 24 24"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path></svg>',delete:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"></path><line x1="18" y1="9" x2="12" y2="15"></line><line x1="12" y1="9" x2="18" y2="15"></line></svg>',disc:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="3"></circle></svg>',divideCircle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line><circle cx="12" cy="12" r="10"></circle></svg>',divideSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line></svg>',divide:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="6" r="2"></circle><line x1="5" y1="12" x2="19" y2="12"></line><circle cx="12" cy="18" r="2"></circle></svg>',dollarSign:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path></svg>',downloadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="8 17 12 21 16 17"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"></path></svg>',download:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>',dribbble:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8.56 2.75c4.37 6.03 6.02 9.42 8.03 17.72m2.54-15.38c-3.72 4.35-8.94 5.66-16.88 5.85m19.5 1.9c-3.5-.93-6.63-.82-8.94 0-2.58.92-5.01 2.86-7.44 6.32"></path></svg>',droplet:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path></svg>',edit2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>',edit3:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 20h9"></path><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>',edit:'<svg class="stroked" viewBox="0 0 24 24"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg>',externalLink:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>',eyeOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',eye:'<svg class="stroked" viewBox="0 0 24 24"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>',fastForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 19 22 12 13 5 13 19"></polygon><polygon points="2 19 11 12 2 5 2 19"></polygon></svg>',feather:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line></svg>',figma:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z"></path><path d="M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z"></path><path d="M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z"></path><path d="M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z"></path><path d="M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z"></path></svg>',fileMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line></svg>',filePlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></svg>',fileText:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>',file:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg>',film:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line></svg>',filter:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon></svg>',flag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line></svg>',folderMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folderPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folder:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>',framer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></path></svg>',frown:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M16 16s-1.5-2-4-2-4 2-4 2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',gift:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path></svg>',gitBranch:'<svg class="stroked" viewBox="0 0 24 24"><line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg>',gitCommit:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg>',gitMerge:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M6 21V9a9 9 0 0 0 9 9"></path></svg>',gitPullRequest:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M13 6h3a2 2 0 0 1 2 2v7"></path><line x1="6" y1="9" x2="6" y2="21"></line></svg>',github:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>',gitlab:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path></svg>',globe:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>',grid:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg>',hardDrive:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="12" x2="2" y2="12"></line><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><line x1="6" y1="16" x2="6.01" y2="16"></line><line x1="10" y1="16" x2="10.01" y2="16"></line></svg>',hash:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line></svg>',headphones:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 18v-6a9 9 0 0 1 18 0v6"></path><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"></path></svg>',heart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>',helpCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',hexagon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg>',home:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>',image:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>',inbox:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12"></polyline><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path></svg>',info:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="7.75"></line></svg>',instagram:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line></svg>',italic:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line></svg>',key:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.78 7.78 5.5 5.5 0 0 1 7.78-7.78zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path></svg>',layers:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline></svg>',layout:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line></svg>',lifeBuoy:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line><line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line><line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line><line x1="14.83" y1="9.17" x2="18.36" y2="5.64"></line><line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line></svg>',link2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg>',link:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>',linkedin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>',list:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg>',loader:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',lock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg> ',logIn:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line></svg>',logOut:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>',mail:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>',mapPin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>',map:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"></polygon><line x1="8" y1="2" x2="8" y2="18"></line><line x1="16" y1="6" x2="16" y2="22"></line></svg>',maximize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',maximize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path></svg>',meh:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="15" x2="16" y2="15"></line><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',menu:'<svg class="stroked" viewBox="0 0 24 24"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>',messageCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path></svg>',messageSquare:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>',micOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',mic:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',minimize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',minimize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path></svg>',minusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line></svg>',monitor:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>',moon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>',moreHorizontal:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle></svg>',moreVertical:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle></svg>',mousePointer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg>',move:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line></svg>',music:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle></svg>',navigation2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 19 21 12 17 5 21 12 2"></polygon></svg>',navigation:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="3 11 22 2 13 21 11 13 3 11"></polygon></svg>',octagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon></svg>',package:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',paperclip:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"></path></svg>',pauseCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="10" y1="15" x2="10" y2="9"></line><line x1="14" y1="15" x2="14" y2="9"></line></svg>',pause:'<svg class="stroked" viewBox="0 0 24 24"><rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect></svg>',penTool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path><path d="M2 2l7.59 7.59"></path><circle cx="11" cy="11" r="2"></circle></svg>',percent:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle></svg>',phoneCall:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneForwarded:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="19 1 23 5 19 9"></polyline><line x1="15" y1="5" x2="23" y2="5"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneIncoming:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 2 16 8 22 8"></polyline><line x1="23" y1="1" x2="16" y2="8"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneMissed:'<svg class="stroked" viewBox="0 0 24 24"><line x1="23" y1="1" x2="17" y2="7"></line><line x1="17" y1="1" x2="23" y2="7"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"></path><line x1="23" y1="1" x2="1" y2="23"></line></svg>',phoneOutgoing:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 7 23 1 17 1"></polyline><line x1="16" y1="8" x2="23" y2="1"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phone:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',pieChart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path></svg>',playCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="10 8 16 12 10 16 10 8"></polygon></svg>',play:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>',plusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>',pocket:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 3h16a2 2 0 0 1 2 2v6a10 10 0 0 1-10 10A10 10 0 0 1 2 11V5a2 2 0 0 1 2-2z"></path><polyline points="8 10 12 14 16 10"></polyline></svg>',power:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>',printer:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg>',radio:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="2"></circle><path d="M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"></path></svg>',repeat:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg>',rewind:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 19 2 12 11 5 11 19"></polygon><polygon points="22 19 13 12 22 5 22 19"></polygon></svg>',cornerDownRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12"></path></svg>',cornerRightDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 15 15 20 20 15"></polyline><path d="M4 4h7a4 4 0 0 1 4 4v12"></path></svg>',cornerRightUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 9 15 4 20 9"></polyline><path d="M4 20h7a4 4 0 0 0 4-4V4"></path></svg>',cornerUpRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path></svg>',refreshCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>',rotateCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path></svg>',skipForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line></svg>',toggleRight:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="16" cy="12" r="3"></circle></svg>',rss:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>',save:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg>',scissors:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line></svg>',search:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',send:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>',server:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line></svg>',settings:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M4.78,6.75 C6.02,7.26,7.26,6.02,6.75,4.78 C6.75,4.78,6.24,3.57,6.24,3.57 C5.93,2.8,6.29,1.92,7.06,1.6 C7.06,1.6,8.14,1.15,8.14,1.15 C8.91,0.83,9.79,1.2,10.11,1.96 C10.11,1.96,10.61,3.18,10.61,3.18 C11.12,4.42,12.88,4.42,13.39,3.18 C13.39,3.18,13.89,1.97,13.89,1.97 C14.21,1.2,15.09,0.83,15.86,1.15 C15.86,1.15,16.94,1.6,16.94,1.6 C17.71,1.92,18.08,2.8,17.76,3.57 C17.76,3.57,17.15,5.03,17.15,5.03 C16.64,6.27,17.88,7.51,19.12,7 C19.12,7,20.51,6.42,20.51,6.42 C21.28,6.1,22.16,6.47,22.47,7.23 C22.47,7.23,22.92,8.32,22.92,8.32 C23.24,9.09,22.88,9.96,22.11,10.28 C22.11,10.28,21.07,10.71,21.07,10.71 C19.83,11.23,19.83,12.98,21.07,13.49 C21.07,13.49,22.04,13.89,22.04,13.89 C22.8,14.21,23.17,15.09,22.85,15.86 C22.85,15.86,22.4,16.94,22.4,16.94 C22.08,17.71,21.2,18.07,20.43,17.76 C20.43,17.76,19.22,17.25,19.22,17.25 C17.98,16.74,16.74,17.98,17.25,19.22 C17.25,19.22,17.76,20.43,17.76,20.43 C18.07,21.2,17.71,22.08,16.94,22.4 C16.94,22.4,15.86,22.85,15.86,22.85 C15.09,23.17,14.21,22.8,13.89,22.04 C13.89,22.04,13.39,20.82,13.39,20.82 C12.88,19.58,11.12,19.58,10.61,20.82 C10.61,20.82,10.11,22.04,10.11,22.04 C9.79,22.8,8.91,23.17,8.14,22.85 C8.14,22.85,7.06,22.4,7.06,22.4 C6.29,22.08,5.93,21.2,6.24,20.44 C6.24,20.44,6.64,19.47,6.64,19.47 C7.16,18.23,5.92,16.99,4.68,17.5 C4.68,17.5,3.64,17.93,3.64,17.93 C2.87,18.25,1.99,17.89,1.67,17.12 C1.67,17.12,1.22,16.04,1.22,16.04 C0.91,15.27,1.27,14.39,2.04,14.07 C2.04,14.07,3.43,13.49,3.43,13.49 C4.67,12.98,4.67,11.23,3.43,10.71 C3.43,10.71,1.96,10.11,1.96,10.11 C1.2,9.79,0.83,8.91,1.15,8.14 C1.15,8.14,1.6,7.06,1.6,7.06 C1.92,6.29,2.8,5.93,3.57,6.24 C3.57,6.24,4.78,6.75,4.78,6.75 z M14.31,11.04 C14.84,12.32,14.23,13.78,12.96,14.31 C11.68,14.84,10.22,14.23,9.69,12.96 C9.16,11.68,9.77,10.22,11.04,9.69 C12.32,9.16,13.78,9.77,14.31,11.04 z"/></g></svg> ',share2:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg>',share:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line></svg>',shieldOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19.69 14a6.9 6.9 0 0 0 .31-2V5l-8-3-3.16 1.18"></path><path d="M4.73 4.73L4 5v7c0 6 8 10 8 10a20.29 20.29 0 0 0 5.62-4.38"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',shield:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>',shoppingBag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path></svg>',shoppingCart:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>',shuffle:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line></svg>',sidebar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line></svg>',slack:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path><path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path><path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path><path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path><path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path><path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path><path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path><path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path></svg>',slash:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line></svg>',sliders:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line></svg>',smartphone:'<svg class="stroked" viewBox="0 0 24 24"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',smile:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',speaker:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><circle cx="12" cy="14" r="4"></circle><line x1="12" y1="6" x2="12.01" y2="6"></line></svg>',square:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect></svg>',star:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>',stopCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect></svg>',sun:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>',sunrise:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="2" x2="12" y2="9"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="8 6 12 2 16 6"></polyline></svg>',sunset:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="9" x2="12" y2="2"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="16 5 12 9 8 5"></polyline></svg>',table:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"></path></svg>',tablet:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',tag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line></svg>',target:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="6"></circle><circle cx="12" cy="12" r="2"></circle></svg>',terminal:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg>',thermometer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"></path></svg>',tool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path></svg>',trash2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>',trash:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',trello:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><rect x="7" y="7" width="3" height="9"></rect><rect x="14" y="7" width="3" height="5"></rect></svg>',trendingDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 18 13.5 8.5 8.5 13.5 1 6"></polyline><polyline points="17 18 23 18 23 12"></polyline></svg>',trendingUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline></svg>',triangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path></svg>',truck:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="3" width="15" height="13"></rect><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon><circle cx="5.5" cy="18.5" r="2.5"></circle><circle cx="18.5" cy="18.5" r="2.5"></circle></svg>',tv:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline></svg>',twitch:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path></svg>',twitter:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>',type:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line></svg>',umbrella:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7"></path></svg>',underline:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line></svg>',unlock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path></svg>',thumbsUp:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>',arrowRightCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg>',arrowRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>',chevronRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 18 15 12 9 6"></polyline></svg>',chevronsRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline></svg>',uploadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline></svg>',upload:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>',userCheck:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline></svg>',userMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userX:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line></svg>',user:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>',users:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>',videoOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',video:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>',voicemail:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="5.5" cy="11.5" r="4.5"></circle><circle cx="18.5" cy="11.5" r="4.5"></circle><line x1="5.5" y1="16" x2="18.5" y2="16"></line></svg>',volume1:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volume2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volumeX:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line></svg>',volume:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon></svg>',watch:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="7"></circle><polyline points="12 9 12 12 13.5 13.5"></polyline><path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"></path></svg>',wifiOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wifi:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wind:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path></svg>',xCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line></svg>',x:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',zapOff:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line></svg>',zap:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>',zoomIn:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',zoomOut:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',fontBold:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M13.5,11 C15.71,11,17.5,12.68,17.5,14.75 C17.5,16.82,15.71,18.5,13.5,18.5 C13.5,18.5,8.5,18.5,8.5,18.5 C8.5,18.5,8.5,3.5,8.5,3.5 C8.5,3.5,13.5,3.5,13.5,3.5 C15.71,3.5,17.5,5.18,17.5,7.25 C17.5,9.32,15.71,11,13.5,11 C13.5,11,13.5,11,13.5,11 z"/><path style="" d="M13.5,11 C13.5,11,8.5,11,8.5,11"/><path style="" d="M12.5,11 C14.71,11,16.5,12.68,16.5,14.75 C16.5,16.82,14.71,18.5,12.5,18.5 C12.5,18.5,7.5,18.5,7.5,18.5 C7.5,18.5,7.5,3.5,7.5,3.5 C7.5,3.5,12.5,3.5,12.5,3.5 C14.71,3.5,16.5,5.18,16.5,7.25 C16.5,9.32,14.71,11,12.5,11 C12.5,11,12.5,11,12.5,11 z"/><path style="" d="M12.5,11 C12.5,11,7.5,11,7.5,11"/></g></svg> ',fontItalic:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M17,4.5 C17,4.5,13,4.5,13,4.5"/><path style="" d="M11,19.5 C11,19.5,7,19.5,7,19.5"/><path style="" d="M15,4.5 C15,4.5,9,19.5,9,19.5"/></g></svg> ',fontUnderline:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M7.5,3.5 C7.5,3.5,7.5,10.74,7.5,13.5 C7.5,16.26,9.74,18.5,12.5,18.5 C15.26,18.5,17.5,16.26,17.5,13.5 C17.5,10.74,17.5,3.5,17.5,3.5"/><path style="" d="M7.5,21.5 C7.5,21.5,17.5,21.5,17.5,21.5"/></g></svg> ',indent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M2.5,9 C2.5,9,5.5,12,5.5,12 C5.5,12,2.5,15,2.5,15"/></g></svg> ',listBullet:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M5.5,5 C6.05,5,6.5,5.45,6.5,6 C6.5,6.55,6.05,7,5.5,7 C4.95,7,4.5,6.55,4.5,6 C4.5,5.45,4.95,5,5.5,5 z"/><path style="" d="M5.5,11 C6.05,11,6.5,11.45,6.5,12 C6.5,12.55,6.05,13,5.5,13 C4.95,13,4.5,12.55,4.5,12 C4.5,11.45,4.95,11,5.5,11 z"/><path style="" d="M5.5,17 C6.05,17,6.5,17.45,6.5,18 C6.5,18.55,6.05,19,5.5,19 C4.95,19,4.5,18.55,4.5,18 C4.5,17.45,4.95,17,5.5,17 z"/></g></svg> ',listNumber:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M4.5,5 C4.5,5,5.5,4,5.5,4 C5.5,4,5.5,8,5.5,8"/><path style="" d="M4.5,10 C4.5,10,5.5,10,5.5,10 C6.05,10,6.5,10.45,6.5,11 C6.5,11,6.5,11,6.5,11 C6.5,11.55,6.05,12,5.5,12 C5.5,12,5.5,12,5.5,12 C4.95,12,4.5,12.45,4.5,13 C4.5,13,4.5,14,4.5,14 C4.5,14,6.5,14,6.5,14"/><path style="" d="M4.5,16 C4.5,16,5.5,16,5.5,16 C6.05,16,6.5,16.45,6.5,17 C6.5,17,6.5,17,6.5,17 C6.5,17.55,6.05,18,5.5,18 C5.5,18,4.5,18,4.5,18 C4.5,18,5.5,18,5.5,18 C6.05,18,6.5,18.45,6.5,19 C6.5,19,6.5,19,6.5,19 C6.5,19.55,6.05,20,5.5,20 C5.5,20,4.5,20,4.5,20"/></g></svg> ',outdent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M5.5,9 C5.5,9,2.5,12,2.5,12 C2.5,12,5.5,15,5.5,15"/></g></svg> ',pin:'<svg class="stroked" viewBox="0 0 24 24"><g><g><path style="" d="M16.23,4.73 C16.23,4.73,19.42,7.9,19.42,7.9 C19.42,7.9,14.46,15.69,14.46,15.69 C14.46,15.69,8.45,9.68,8.45,9.68 C8.45,9.68,16.23,4.73,16.23,4.73 z"/><path style="" d="M20.84,9.32 C20.84,9.32,14.47,2.95,14.47,2.95"/><path style="" d="M16.6,17.8 C16.6,17.8,6.7,7.9,6.7,7.9"/><path style="" d="M10.23,11.44 C10.23,11.44,5.99,18.51,5.99,18.51 C5.99,18.51,13.06,14.27,13.06,14.27"/></g></g></svg> ',resize:'<svg class="stroked" version="1.1" viewBox="0, 0, 24, 24"><g><path d="M9,3 L3,3 L3,9"/><path d="M15,21 L21,21 L21,15"/><path d="M3,3 L10,10"/><path d="M21,21 L14,14"/></g></svg> ',sortAscending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,10.5 C16.5,10.5,7.5,10.5,7.5,10.5"/><path d="M14.5,6.5 C14.5,6.5,9.5,6.5,9.5,6.5"/><path d="M18.5,14.5 C18.5,14.5,5.5,14.5,5.5,14.5"/><path d="M20.5,18.5 C20.5,18.5,3.5,18.5,3.5,18.5"/></g></svg> ',sortDescending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,14.5 C16.5,14.5,7.5,14.5,7.5,14.5"/><path d="M14.5,18.5 C14.5,18.5,9.5,18.5,9.5,18.5"/><path d="M18.5,10.5 C18.5,10.5,5.5,10.5,5.5,10.5"/><path d="M20.5,6.5 C20.5,6.5,3.5,6.5,3.5,6.5"/></g></svg> ',cornerDownLeft:"cornerDownRight0f",cornerLeftDown:"cornerRightDown0f",cornerLeftUp:"cornerRightUp0f",cornerUpLeft:"cornerUpRight0f",refreshCcw:"refreshCw0f",rotateCcw:"rotateCw0f",skipBack:"skipForward0f",toggleLeft:"toggleRight0f",thumbsDown:"thumbsUp1f",arrowDownCircle:"arrowRightCircle90r",arrowLeftCircle:"arrowRightCircle180r",arrowUpCircle:"arrowRightCircle270r",arrowDown:"arrowRight90r",arrowLeft:"arrowRight180r",arrowUp:"arrowRight270r",chevronDown:"chevronRight90r",chevronLeft:"chevronRight180r",chevronUp:"chevronRight270r",chevronsDown:"chevronsRight90r",chevronsLeft:"chevronsRight180r",chevronsUp:"chevronsRight270r",arrowDownRight:"arrowUpRight90r",arrowDownLeft:"arrowUpRight180r",arrowUpLeft:"arrowUpRight270r"};var Zh=(y)=>{Object.assign(j2,y)},g0=(y,x,h,C)=>{let l=y instanceof SVGElement?[y]:Array.from(y.querySelectorAll("svg"));if(l.length>1){let w=y.dataset?.icon||"unknown";console.error(`svg2DataUrl: composite icon "${w}" cannot be serialized as a data URL, rendering base icon only`)}let i=l[0];i.setAttribute("xmlns","http://www.w3.org/2000/svg");for(let w of i.querySelectorAll("path, polygon, line, circle, rect, ellipse, polyline")){if(x!==void 0)w.setAttribute("fill",x);if(h!==void 0)w.setAttribute("stroke",h);if(C!==void 0)w.setAttribute("stroke-width",String(C))}let k=i.querySelectorAll("[style]");i.removeAttribute("style");for(let w of[...k]){let B=w.style;if(B.fill)w.setAttribute("fill",X.fromCss(B.fill).html);if(B.stroke)w.setAttribute("stroke",X.fromCss(B.stroke).html);if(B.strokeWidth)w.setAttribute("strokeWidth",B.strokeWidth);if(B.strokeLinecap)w.setAttribute("strokeLinecap",B.strokeLinecap);if(B.strokeLinejoin)w.setAttribute("strokeLinejoin",B.strokeLinejoin);w.removeAttribute("style")}return`url(data:image/svg+xml;charset=UTF-8,${encodeURIComponent(i.outerHTML)})`},ph=(y)=>/\d$/.test(y)?y+"_":y,h3=[{prefix:/^spin(_?\d+)/,apply(y,x,h){let C=x[1].replace("_","-"),l=360/Math.abs(parseFloat(C)),i=C.startsWith("-")?"reverse":"normal",k=e1(y,[]),g=k;if(g.animate){let w=g.style.transform||"";g.animate([{transform:`${w} rotate(0deg)`},{transform:`${w} rotate(360deg)`}],{duration:l*1000,iterations:1/0,direction:i})}return C3(y,h,k)}},{prefix:"un",apply:(y)=>`slash25o$${y}75s75o`},{prefix:"check",apply:(y)=>`check75o_00aa00S$${y}75s50o`},{prefix:"cancel",apply:(y)=>`x75o_cc0000S$${y}75s50o`},{prefix:"search",apply:(y)=>`search80s30x30y$${y}50o`}],vh=0;function w6(y,x){let h=G.div();h.innerHTML=y;let C=h.querySelector("svg"),l=C.querySelectorAll("[id]");if(l.length>0){let g=new Map;for(let q of l){let j=q.id,_=`tosi_svg_id_${++vh}`;g.set(j,_),q.id=_}let w=C.innerHTML,B=w;for(let[q,j]of g){let _=q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");B=B.replace(new RegExp(`url\\(#${_}\\)`,"g"),`url(#${j})`).replace(new RegExp(`href="#${_}"`,"g"),`href="#${j}"`)}if(B!==w)C.innerHTML=B}let i=new Set(C.classList);i.add("tosi-icon");let k=l4.svg({class:Array.from(i).join(" "),viewBox:C.getAttribute("viewBox")},...x,...C.children);if(k.style.strokeWidth=P.tosiIconStrokeWidth("2px"),i.has("filled"))k.style.stroke="none",k.style.fill="currentColor";else if(i.has("stroked"))k.style.stroke=P.tosiIconStroke("currentColor"),k.style.fill=P.tosiIconFill("none");else k.style.stroke=P.tosiIconStroke("currentColor"),k.style.fill=P.tosiIconFill("currentColor");return k.style.height=P.tosiIconSize("16px"),k}function C3(y,x,...h){let C=G.span({class:"tosi-icon-composite",dataIcon:y,style:{display:"inline-flex",position:"relative",pointerEvents:"none"}},...h);for(let l of x)if(l&&typeof l==="object"&&!("nodeType"in l)){let i=l;if(i.style&&typeof i.style==="object")Object.assign(C.style,i.style);if(i.class)C.classList.add(...String(i.class).split(" "))}return C}function Rh(y){let x=j2;if(x[y])return!0;let h=x3(y);return h!=null&&!!x[h.baseName]}function B6(y,x){for(let h of h3){let C,l;if(h.prefix instanceof RegExp){let k=new RegExp(h.prefix.source+"(.+)$"),g=y.match(k);if(!g)continue;C=g[g.length-1],C=C[0].toLowerCase()+C.slice(1),l=g}else{if(!y.startsWith(h.prefix)||y.length<=h.prefix.length)continue;C=y[h.prefix.length].toLowerCase()+y.slice(h.prefix.length+1),l=h.prefix}if(!Rh(C))continue;let i=h.apply(ph(C),l,x);if(typeof i==="string")return e1(i,x);if(i)return i}return null}var Dh=10,Hh=/(?:(?<=[a-zA-Z_])(?:_?\d+[osxyr]|[01]f|\d+W)|_[a-zA-Z0-9]+[FS])+$/;function x3(y){let x=y.match(Hh);if(!x)return null;let h=y.slice(0,x.index);if(!h)return null;if(h.endsWith("_"))h=h.slice(0,-1);if(!h)return null;if(!j2[h]){if(!h3.some((w)=>{if(w.prefix instanceof RegExp)return w.prefix.test(h);return h.startsWith(w.prefix)&&h.length>w.prefix.length}))return null}let l={},i=x[0].match(/_?\d+[osxyr]|[01]f|_[a-zA-Z0-9]+[FS]|\d+W/g);if(!i)return null;let k=[];for(let g of i){let w=g[g.length-1];if(w==="F"||w==="S"){let B=g.slice(1,-1),j=/^[0-9a-fA-F]{3,8}$/.test(B)?"#"+B:z[B];if(w==="F")l.fill=j;else l.stroke=j}else if(w==="W")l.strokeWidth=g.slice(0,-1);else{let B=parseInt(g.replace("_","-"));switch(w){case"o":l.opacity=String(B/100);break;case"s":k.push(`scale(${B/100})`);break;case"x":k.push(`translateX(${B}%)`);break;case"y":k.push(`translateY(${B}%)`);break;case"r":k.push(`rotate(${B}deg)`);break;case"f":k.push(B===0?"scaleX(-1)":"scaleY(-1)");break}}}if(k.length>0)l.transform=k.join(" "),l.transformOrigin="50% 50%";return{baseName:h,style:l}}function e1(y,x){if(y.endsWith("_"))y=y.slice(0,-1);let h=j2,C=y;for(let k=0;k<Dh;k++){let g=h[C];if(!g)break;if(g.startsWith("<"))return w6(g,x);C=g}if(C!==y){let k=B6(C,x);if(k)return k;let g=x3(C);if(g){let w=e1(g.baseName,x);return Object.assign(w.style,g.style),w}}if(y.includes("$")){let k=y.split("$"),g=e1(k[k.length-1],[]),w=k.slice(0,-1).reverse().map((B)=>{let q=e1(B,[]);return Object.assign(q.style,{position:"absolute",inset:"0",width:"100%",height:"100%"}),q});return C3(y,x,g,...w)}let l=B6(y,x);if(l)return l;let i=x3(y);if(i){let k=e1(i.baseName,x);return Object.assign(k.style,i.style),k}if(y)console.warn(`icon ${y} does not exist`);return w6(j2.square,x)}var O=new Proxy(j2,{get(y,x){return(...h)=>e1(x,h)}});class l3 extends F{static preferredTagName="tosi-icon";static lightStyleSpec={":host":{"--tosi-icon-size":"var(--xin-icon-size, 16px)","--tosi-icon-stroke-width":"var(--xin-icon-stroke-width, var(--icon-stroke-width, 2px))","--tosi-icon-stroke-linejoin":"var(--icon-stroke-linejoin, round)","--tosi-icon-stroke-linecap":"var(--icon-stroke-linecap, round)","--tosi-icon-fill":"var(--xin-icon-fill, var(--icon-fill, none))",display:"inline-flex",verticalAlign:"text-bottom",stroke:"currentColor",strokeWidth:P.tosiIconStrokeWidth("2px"),strokeLinejoin:P.tosiIconStrokeLinejoin("round"),strokeLinecap:P.tosiIconStrokeLinecap("round"),fill:P.tosiIconFill("none"),height:z.tosiIconSize},":host svg, :host .tosi-icon-composite":{height:P.tosiIconSize("16px")}};static initAttributes={icon:"",size:0,fill:"",stroke:"",strokeWidth:1};render(){super.render(),this.textContent="";let y={};if(this.size)y.height=this.size+"px",this.style.setProperty("--tosi-icon-size",`${this.size}px`),this.style.setProperty("--xin-icon-size",`${this.size}px`);if(this.stroke)y.stroke=this.stroke,y.strokeWidth=this.strokeWidth;if(this.fill)y.fill=this.fill;this.append(O[this.icon]({style:y}))}}var bh=l3.elementCreator();var z6=()=>{};function Sh(y,x){if(!x||x.trim()==="transparent")return new y.Color4(0,0,0,0);let h=x.trim().replace(/^#/,"");if(h.length===3)h=h.split("").map((l)=>l+l).join("");if(h.length===6)h+="ff";let C=parseInt(h,16);if(Number.isNaN(C)||h.length!==8)return new y.Color4(0,0,0,1);return new y.Color4((C>>>24&255)/255,(C>>>16&255)/255,(C>>>8&255)/255,(C&255)/255)}class i3 extends F{static preferredTagName="tosi-3d";static initAttributes={src:"",clearColor:"",fov:1,heroLight:!1};babylonReady;BABYLON;static shadowStyleSpec={":host":{display:"block",position:"relative"},":host canvas":{width:"100%",height:"100%"},":host .babylonVRicon":{height:50,width:80,backgroundColor:"transparent",filter:"drop-shadow(0 0 4px #000c)",backgroundImage:g0(O.xrColor()),backgroundPosition:"center",backgroundRepeat:"no-repeat",border:"none",borderRadius:5,borderStyle:"none",outline:"none",transition:"transform 0.125s ease-out"},":host .babylonVRicon:hover":{transform:"scale(1.1)"}};content=G.canvas({part:"canvas"});constructor(){super();this.babylonReady=(async()=>{let{BABYLON:y}=await b1("https://cdn.babylonjs.com/babylon.js","BABYLON");return y})()}scene;engine;sceneCreated=z6;update=z6;_update=()=>{if(this.scene){if(this.update!==void 0)this.update(this,this.BABYLON);if(this.scene.activeCamera!==void 0)this.scene.render()}};handleResize(){if(this.engine)this.engine.resize()}loadScene=async(y,x,h)=>{let{BABYLON:C}=await b1("https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js","BABYLON");C.SceneLoader.Append(y,x,this.scene,h)};loadUI=async(y)=>{let{BABYLON:x}=await b1("https://cdn.babylonjs.com/gui/babylon.gui.min.js","BABYLON"),h=x.GUI.AdvancedDynamicTexture.CreateFullscreenUI("GUI",!0,this.scene),{snippetId:C,jsonUrl:l,data:i,size:k}=y;if(k)h.idealWidth=k,h.renderAtIdealSize=!0;let g;if(C)g=await h.parseFromSnippetAsync(C);else if(l)g=await h.parseFromURLAsync(l);else if(i)g=h.parseContent(i);else return null;let w=h.getChildren()[0],B=w.children.reduce((q,j)=>{return q[j.name]=j,q},{});return{advancedTexture:h,gui:g,root:w,widgets:B}};connectedCallback(){super.connectedCallback();let{canvas:y}=this.parts;this.babylonReady.then(async(x)=>{this.BABYLON=x;let h=this.clearColor?Sh(x,this.clearColor):null;if(this.engine=new x.Engine(y,!0,h&&h.a<1?{alpha:!0,premultipliedAlpha:!1}:void 0),this.scene=new x.Scene(this.engine),h)this.scene.clearColor=h;if(this.sceneCreated)await this.sceneCreated(this,x);if(this.src){let C=this.src.lastIndexOf("/");await this.loadScene(this.src.slice(0,C+1)||"/",this.src.slice(C+1))}if(this.scene.activeCamera===void 0)new x.ArcRotateCamera("default-camera",-Math.PI/2,Math.PI/2.5,3,new x.Vector3(0,0,0),this.scene).attachControl(this.parts.canvas,!0);if(this.fov&&this.fov!==1&&this.scene.activeCamera)this.scene.activeCamera.fov*=this.fov;if(this.scene.lights.length===0){let C=new x.HemisphericLight("hemi",new x.Vector3(0,1,0),this.scene);C.intensity=0.6}if(this.heroLight){let C=new x.DirectionalLight("hero",new x.Vector3(-1,-2,1),this.scene);C.intensity=0.8}this.engine.runRenderLoop(this._update)})}}var Mh=i3.elementCreator();class Z2 extends F{static preferredTagName="tosi-lottie";static initAttributes={src:"",json:""};content=null;config={renderer:"svg",loop:!0,autoplay:!0};static bodymovinAvailable;animation;static shadowStyleSpec={":host":{width:400,height:400,display:"inline-block"}};_loading=!1;get loading(){return this._loading}constructor(){super();if(Z2.bodymovinAvailable===void 0)Z2.bodymovinAvailable=b1("https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js","bodymovin")}doneLoading=()=>{this._loading=!1};load=({bodymovin:y})=>{if(this._loading=!0,this.config.container=this.shadowRoot!==null?this.shadowRoot:void 0,this.json!=="")this.config.animationData=this.json,delete this.config.path;else if(this.src!=="")delete this.config.animationData,this.config.path=this.src;else console.log("%c<tosi-lottie>%c expected either %cjson%c (animation data) or %csrc% c(url) but found neither.","color: #44f; background: #fff; padding: 0 5px","color: default","color: #44f; background: #fff; padding: 0 5px","color: default","color: #44f; background: #fff; padding: 0 5px","color: default");if(this.animation){this.animation.destroy();let x=this.shadowRoot;if(x!==null)x.querySelector("svg")?.remove()}this.animation=y.loadAnimation(this.config),this.animation.addEventListener("DOMLoaded",this.doneLoading)};render(){super.render(),Z2.bodymovinAvailable.then(this.load).catch((y)=>{console.error(y)})}}var Ih=Z2.elementCreator();var{button:k3,slot:ch,div:z4}=G;class q4 extends F{static preferredTagName="tosi-carousel";static initAttributes={dots:!1,arrows:!1,maxVisibleItems:1,snapDuration:0.25,snapDelay:0.1,loop:!1,auto:0};lastAutoAdvance=Date.now();interval;autoAdvance=()=>{if(this.auto>0&&this.auto*1000<Date.now()-this.lastAutoAdvance)this.forward()};_page=0;get page(){return this._page}set page(y){let{scroller:x,back:h,forward:C}=this.parts;if(this.lastPage<=0)C.disabled=h.disabled=!0,y=0;else y=Math.max(0,Math.min(this.lastPage,y)),y=isNaN(y)?0:y;if(this._page!==y)this._page=isNaN(y)?0:y,this.animateScroll(this._page*x.offsetWidth),h.disabled=this.page<=0&&!this.loop,C.disabled=this.page>=this.lastPage&&!this.loop}get visibleItems(){return[...this.children].filter((y)=>getComputedStyle(y).display!=="none")}get lastPage(){return Math.max(Math.ceil(this.visibleItems.length/(this.maxVisibleItems||1))-1,0)}static shadowStyleSpec={":host":{_carouselIconSize:24,_carouselButtonColor:"#0004",_carouselButtonHoverColor:"#0006",_carouselButtonActiveColor:"#000c",_carouseButtonWidth:48,_carouselDotCurrentColor:"#0008",_carouselDotSize:8,_carouselDotSpacing:z.carouselDotSize,_carouselProgressPadding:12,_carouselDotTransition:"0.125s ease-in-out",display:"flex",flexDirection:"column",position:"relative"},":host:focus":{outline:"none",boxShadow:"none"},":host svg":{height:z.carouselIconSize},":host button":{outline:"none",border:"none",boxShadow:"none",background:"transparent",color:z.carouselButtonColor,padding:0},":host::part(back), :host::part(forward)":{position:"absolute",top:0,bottom:0,width:z.carouseButtonWidth,zIndex:2},":host::part(back)":{left:0},":host::part(forward)":{right:0},":host button:disabled":{opacity:0.5,pointerEvents:"none"},":host button:hover":{color:z.carouselButtonHoverColor},":host button:active":{color:z.carouselButtonActiveColor},":host::part(pager)":{position:"relative"},":host::part(scroller)":{overflow:"auto hidden",position:"relative"},":host::part(grid)":{display:"grid",justifyItems:"center"},":host *::-webkit-scrollbar, *::-webkit-scrollbar-thumb":{display:"none"},":host .dot":{background:z.carouselButtonColor,borderRadius:z.carouselDotSize,height:z.carouselDotSize,width:z.carouselDotSize,transition:z.carouselDotTransition},":host .dot:not(.current):hover":{background:z.carouselButtonHoverColor,height:z.carouselDotSize150,width:z.carouselDotSize150,margin:z.carouselDotSize_25},":host .dot:not(.current):active":{background:z.carouselButtonActiveColor},":host .dot.current":{background:z.carouselDotCurrentColor},":host::part(progress)":{display:"flex",gap:z.carouselDotSpacing,justifyContent:"center",padding:z.carouselProgressPadding}};easing=(y)=>{return Math.sin(y*Math.PI*0.5)};indicateCurrent=()=>{let{scroller:y,progress:x}=this.parts,h=y.scrollLeft/y.offsetWidth;[...x.children].forEach((C,l)=>{C.classList.toggle("current",Math.floor(l/this.maxVisibleItems-h)===0)}),this.lastAutoAdvance=Date.now(),clearTimeout(this.snapTimer),this.snapTimer=setTimeout(this.snapPosition,this.snapDelay*1000)};snapPosition=()=>{let{scroller:y}=this.parts,x=Math.round(y.scrollLeft/y.offsetWidth);if(x!==this.page)this.page=x>this.page?Math.ceil(x):Math.floor(x);this.lastAutoAdvance=Date.now()};back=()=>{this.page=this.page>0?this.page-1:this.lastPage};forward=()=>{this.page=this.page<this.lastPage?this.page+1:0};handleDotClick=(y)=>{let{progress:x}=this.parts,h=[...x.children].indexOf(y.target);if(h>-1)this.page=Math.floor(h/this.maxVisibleItems)};snapTimer;animationFrame;animateScroll(y,x=-1,h=0){cancelAnimationFrame(this.animationFrame);let{scroller:C}=this.parts;if(x===-1){x=C.scrollLeft,h=Date.now(),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)});return}let l=(Date.now()-h)/1000;if(l>=this.snapDuration||Math.abs(C.scrollLeft-y)<2)C.scrollLeft=y,this.animationFrame=null;else C.scrollLeft=x+this.easing(l/this.snapDuration)*(y-x),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)})}content=()=>[z4({part:"pager"},k3({title:"previous slide",part:"back"},O.chevronLeft()),z4({title:"slides",role:"group",part:"scroller"},z4({part:"grid"},ch())),k3({title:"next slide",part:"forward"},O.chevronRight())),z4({title:"choose slide to display",role:"group",part:"progress"})];connectedCallback(){super.connectedCallback(),this.ariaRoleDescription="carousel",this.ariaOrientation="horizontal",this.ariaReadOnly="true";let{back:y,forward:x,scroller:h,progress:C}=this.parts;y.addEventListener("click",this.back),x.addEventListener("click",this.forward),h.addEventListener("scroll",this.indicateCurrent),C.addEventListener("click",this.handleDotClick),this.lastAutoAdvance=Date.now(),this.interval=setInterval(this.autoAdvance,100)}disconnectedCallback(){clearInterval(this.interval)}render(){super.render();let{dots:y,arrows:x,visibleItems:h,lastPage:C}=this,{progress:l,back:i,forward:k,grid:g}=this.parts;h.forEach((w)=>{w.role="group"}),g.style.gridTemplateColumns=`${100/this.maxVisibleItems/(1+this.lastPage)}% `.repeat(h.length).trim(),g.style.width=(1+this.lastPage)*100+"%",l.textContent="",l.append(...h.map((w,B)=>k3({title:`item ${B+1}`,class:"dot"}))),this.indicateCurrent(),l.style.display=y&&C>0?"":"none",i.hidden=k.hidden=!(x&&C>0)}}var sh=q4,q6=q4.elementCreator(),Th=q6;var{div:j6,span:V6}=G;function P6(y,x){let h=y.split(`
|
|
12
|
+
`)},bx=(y)=>{z1("initVars","initVars is deprecated. Just use _ and __ prefixes instead.");let x={};for(let h of Object.keys(y)){let C=y[h],k=P1(h);x[`--${k}`]=typeof C==="number"&&C!==0?String(C)+"px":C}return x},w0=(y)=>{let x={};for(let h of Object.keys(y)){let C=y[h];if(C instanceof Y)x[h]=C.inverseLuminance;else if(typeof C==="string"&&(C.match(/^(#[0-9a-fA-F]{3}|rgba?\(|hsla?\()/)!=null||u8[C.trim().toLowerCase()]!==void 0))x[h]=Y.fromCss(C).inverseLuminance}return x},_=new Proxy({},{get(y,x){if(y[x]===void 0){let h="--"+P1(x);y[x]=(C)=>`var(${h}, ${C})`}return y[x]}}),l=new Proxy({},{get(y,x){if(x==="default")return _;if(y[x]==null){x=P1(x);let[,h,,C,k,B]=x.match(/^([-\w]*?)((_)?(\d+)(\w?))?$/)||["",x],w=`--${h}`;if(k!=null){let g=C==null?Number(k)/100:-Number(k)/100;switch(B){case"b":case"s":case"h":case"o":{let z=`--${x}`;Y.registerComputedColor(z,w,g,B),y[x]=`var(${z})`}break;case"":y[x]=`calc(var(${w}) * ${g})`;break;default:throw console.error(B),Error(`Unrecognized method ${B} for css variable ${w}`)}}else y[x]=`var(${w})`}return y[x]}});function E8(){let y=(x)=>typeof matchMedia<"u"&&matchMedia(x).matches;return{colorScheme:y("(prefers-color-scheme: dark)")?"dark":"light",contrast:y("(prefers-contrast: more)")?"more":y("(prefers-contrast: less)")?"less":y("(prefers-contrast: custom)")?"custom":"no-preference",reducedMotion:y("(prefers-reduced-motion: reduce)"),reducedTransparency:y("(prefers-reduced-transparency: reduce)"),forcedColors:y("(forced-colors: active)")}}function Tx(y){if(typeof matchMedia>"u")return()=>{};let x=["(prefers-color-scheme: dark)","(prefers-contrast: more)","(prefers-contrast: less)","(prefers-contrast: custom)","(prefers-reduced-motion: reduce)","(prefers-reduced-transparency: reduce)","(forced-colors: active)"],h=()=>y(E8()),C=x.map((k)=>matchMedia(k));for(let k of C)k.addEventListener("change",h);return()=>{for(let k of C)k.removeEventListener("change",h)}}var px="http://www.w3.org/1998/Math/MathML",Lx="http://www.w3.org/2000/svg",r0={},o8=(y,x,h)=>{let C=m8(P1(x),h);if(C.prop.startsWith("--"))y.style.setProperty(C.prop,C.value);else y.style[x]=C.value},cx=(y)=>{return{toDOM(x,h){o8(x,y,h)}}},X8=new WeakMap,a8=(y,x,h)=>{if(x==="style")if(typeof h==="object")for(let C of Object.keys(h))if(X1(h[C]))f1(y,h[C],cx(C));else o8(y,C,h[C]);else y.setAttribute("style",h);else{let C=P1(x),k=y.constructor.observedAttributes;if(k?.includes(x)||k?.includes(C))if(typeof h==="boolean")h?y.setAttribute(C,""):y.removeAttribute(C);else y.setAttribute(C,h);else if(y[x]!==void 0){let{MathMLElement:B}=globalThis;if(y instanceof SVGElement||B!==void 0&&y instanceof B)y.setAttribute(x,h);else y[x]=h}else if(C==="class"){let B=(q)=>String(q||"").split(/\s+/).filter(Boolean),w=new Set,g=new Set;if(Array.isArray(h))for(let q of h)for(let j of B(q))w.add(j);else if(h!=null&&typeof h==="object")for(let[q,j]of Object.entries(h))for(let V of B(q))(j?w:g).add(V);else for(let q of B(h))w.add(q);let z=X8.get(y);if(z){for(let q of z)if(!w.has(q))y.classList.remove(q)}for(let q of g)y.classList.remove(q);for(let q of w)y.classList.add(q);X8.set(y,w)}else if(y[C]!==void 0)y[C]=h;else if(typeof h==="boolean")h?y.setAttribute(C,""):y.removeAttribute(C);else y.setAttribute(C,h)}},G5={},_8=(y)=>{if(!G5[y])G5[y]={toDOM(x,h){a8(x,y,h)}};return G5[y]},s5=(y,x,h)=>{if(x==="apply")h(y);else if(x.match(/^on[A-Z]/)!=null){let C=x.substring(2).toLowerCase();Z2(y,C,h)}else if(x==="bind"){let C=typeof h.binding==="string"?u1[h.binding]:h.binding;if(C!==void 0&&h.value!==void 0)f1(y,h.value,C instanceof Function?{toDOM:C}:C);else throw Error("bad binding")}else if(x.match(/^bind[A-Z]/)!=null){let C=x.substring(4,5).toLowerCase()+x.substring(5);if(C!=="value"){let B=C==="text"?"textContent":C==="enabled"?"disabled (with .tosi.take(v => !v))":C==="disabled"?"disabled":C==="list"?".tosi.listBinding()":null;if(B)z1(`bind${C}`,`bind${x.substring(4)} is deprecated. Use { ${B}: ... } instead.`)}let k=u1[C];if(k!==void 0)f1(y,h,k);else throw Error(`${x} is not allowed, bindings.${C} is not defined`)}else if(h!=null&&typeof h==="object"&&h[x4])f1(y,h,_8(x));else if(X1(h))f1(y,h,_8(x));else a8(y,x,h)},u5=(y,...x)=>{if(r0[y]===void 0){let[k,B]=y.split("|");if(B===void 0)r0[y]=globalThis.document.createElement(k);else r0[y]=globalThis.document.createElementNS(B,k)}let h=r0[y].cloneNode(),C={};for(let k of x)if(k instanceof Element||k instanceof DocumentFragment||typeof k==="string"||typeof k==="number")if(h instanceof HTMLTemplateElement)h.content.append(k);else h.append(k);else if(X1(k))h.append(U.span({bindText:k}));else Object.assign(C,k);for(let k of Object.keys(C)){let B=C[k];s5(h,k,B)}return h},r5=(...y)=>{let x=globalThis.document.createDocumentFragment();for(let h of y)x.append(h);return x},U=new Proxy({fragment:r5},{get(y,x){if(x=x.replace(/[A-Z]/g,(h)=>`-${h.toLocaleLowerCase()}`),y[x]===void 0)y[x]=(...h)=>u5(x,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),k4=new Proxy({fragment:r5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>u5(`${x}|${Lx}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),t8=new Proxy({fragment:r5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>u5(`${x}|${px}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),A8=new WeakSet;function dx(y,x,h="part"){let C=`[data-${h}]`;for(let k of Array.from(y.querySelectorAll(C))){if(A8.has(k))continue;let B=k.getAttribute(`data-${h}`);if(B==null)continue;let w=x[B];if(w==null)continue;A8.add(k);for(let g of Object.keys(w))s5(k,g,w[g])}}var fx=["sort","splice","copyWithin","fill","pop","push","reverse","shift","unshift"],sx=!0,ux=/^\.?([^.[\](),])+(\.[^.[\](),]+|\[\d+\]|\[[^=[\](),]*=[^[\]()]+\])*$/,rx=(y)=>ux.test(y),E1=(y="",x="")=>{if(y==="")return x;else if(x.startsWith("[")&&x.endsWith("]"))return`${y}${x}`;else if(x.match(/^\d+$/)!==null||x.includes("="))return`${y}[${x}]`;else return`${y}.${x}`},y4={};function U5(y,x){if(y!==null&&(typeof y==="object"||typeof y==="function"))return y;return new Proxy(y4,t1(x,!0))}var e8=()=>new Proxy({},t1("^",!0)),Q5=(y)=>{let x=y(e8())?.path;if(!x?.startsWith("^."))throw Error("selector must return a property of the item");return x.substring(2)},$5=(y,x,h)=>{for(let C=0;C<y.length;C++)if(`${y1(y[C],x)}`===`${h}`)return C;return-1},mx=(y,x)=>({listFind(h,C){if(h instanceof Element){let w=h;while(w&&!w[i2]&&w.parentElement)w=w.parentElement;let g=w?.[i2];if(g==null)return;let z=x.indexOf(g);return z!==-1?G1[y][z]:void 0}let k=Q5(h),B=$5(x,k,C);return B!==-1?G1[y][B]:void 0},listUpdate(h,C){let k=Q5(h),B=y1(C,k),w=$5(x,k,B);if(w!==-1){let g=G1[y][w];for(let z of Object.keys(C))g[z]=C[z];return g}return G1[y].push(C),G1[y][x.length-1]},listRemove(h,C){let k=Q5(h),B=$5(x,k,C);if(B===-1)return!1;return G1[y].splice(B,1),!0}}),K8=!1;function nx(){if(!K8)console.warn("xinValue, tosiValue, xinPath, tosiPath, etc. are deprecated. Use .tosi.value, .tosi.path, .tosi.observe(), etc. instead."),K8=!0}var P8=(y)=>{return y===y4},Ex=(y,x)=>({get(h,C){switch(C){case"value":return x===y4?y1(q1,y):x.valueOf?x.valueOf():x;case"path":return y;case"touch":return()=>$1(y);case"observe":return(k)=>{let B=k0(y,k);return()=>h0(B)};case"bind":return(k,B,w)=>{Gx()(k,y,B,w)};case"on":{let k=x===y4?y1(q1,y):x.valueOf?x.valueOf():x;return(B,w)=>Ux()(B,w,k)}case"binding":return(k)=>({bind:{value:y,binding:k}});case"listBinding":return(k=({span:w})=>w({bindText:"^"}),B={})=>{let w=B.virtual?.itemsPerRow??1,g=[];for(let z=0;z<w;z++)g.push(k(U,e8(),z));return[{bindList:{value:y,...B}},U.template(...g)]};case"listFind":case"listUpdate":case"listRemove":return mx(y,Array.isArray(x)?x:[])[C];case"take":return(...k)=>{let B=k[k.length-1],w=k.slice(0,-1).map((g)=>typeof g==="string"?g:g[M1]);return{[x4]:!0,paths:[y,...w],transform:B}}}return},set(h,C,k){if(C==="value"){if(k=S(k),S(k1[y])!==k&&h4(q1,y,k))$1(y);return!0}return!1}}),a2=(y,x)=>new Proxy(x,Ex(y,x)),G8=new Set(["path","value","touch","observe","bind","on","binding","listBinding","listFind","listUpdate","listRemove","take"]),U8=new Map([[M1,"path"],["xinPath","path"],["tosiPath","path"],[l2,"value"],["xinValue","value"],["tosiValue","value"],[yx,"observe"],["xinObserve","observe"],["tosiObserve","observe"],[hx,"on"],["xinOn","on"],["tosiOn","on"],[xx,"bind"],["xinBind","bind"],["tosiBind","bind"],["tosiBinding","binding"],["tosiListBinding","listBinding"]]),t1=(y,x)=>({get(h,C){if((C==="tosi"||C===d5)&&x)return a2(y,h);if(P8(h)){let z=()=>y1(q1,y);switch(C){case"valueOf":case"toJSON":return()=>z();case Symbol.toPrimitive:return(V)=>{let A=z();if(V==="number")return Number(A);if(V==="string")return String(A);return A};case"toString":return()=>String(z())}if(G8.has(C))return a2(y,h)[C];let q=U8.get(C);if(q!==void 0)return nx(),a2(y,h)[q];let j=z();if(j!=null){let V=Object(j);if(C in V){let A=V[C];return typeof A==="function"?A.bind(V):A}}return}if(x&&(C==="valueOf"||C==="toJSON"))return()=>h.valueOf?h.valueOf():h;if(x&&!(C in h)&&G8.has(C))return a2(y,h)[C];let k=U8.get(C);if(k!==void 0)return a2(y,h)[k];if(typeof C==="symbol")return h[C];let B=Object.getOwnPropertyDescriptor(h,C);if(B&&!B.configurable&&!B.writable&&"value"in B)return B.value;let w=C,g=w.match(/^([^.[]+)\.(.+)$/)??w.match(/^([^\]]+)(\[.+)/)??w.match(/^(\[[^\]]+\])\.(.+)$/)??w.match(/^(\[[^\]]+\])\[(.+)$/);if(g!==null){let[,z,q]=g,j=E1(y,z),V=S(y1(h,z));return V!==null&&typeof V==="object"?new Proxy(V,t1(j,x))[q]:V}if(w.startsWith("[")&&w.endsWith("]"))w=w.substring(1,w.length-1);if(!Array.isArray(h)&&h[w]!==void 0||Array.isArray(h)&&w.includes("=")){let z;if(w.includes("=")){let[q,j]=w.split("=");z=h.find((V)=>`${y1(V,q)}`===j)}else z=h[w];if(z instanceof Object){z=S(z);let q=E1(y,w);return new Proxy(z instanceof Function?z.bind(h):z,t1(q,x))}else return x?U5(z,E1(y,w)):z}else if(Array.isArray(h)){let z=h[w];return typeof z==="function"?(...q)=>{let j=q.map((A)=>S(A)),V=z.apply(h,j);if(fx.includes(w))$1(y);if(V!=null&&typeof V==="object"){if(w==="find"||w==="findLast"||w==="at"){let A=h.indexOf(V);if(A!==-1)return new Proxy(V,t1(E1(y,String(A)),x))}}return V}:typeof z==="object"?new Proxy(S(z),t1(E1(y,w),x)):x?U5(z,E1(y,w)):z}else{let z=h[w];if(z!==null&&typeof z==="object")z=S(z);return x?U5(z,E1(y,w)):z}},set(h,C,k){if(k=S(k),typeof C==="symbol"&&C!==l2)return h[C]=k,!0;if(k!==null&&typeof k==="object")if(Array.isArray(k))for(let w=0;w<k.length;w++){let g=Object.getOwnPropertyDescriptor(k,w);if(g===void 0||g.writable!==!0)continue;if(g.value!==null&&typeof g.value==="object")k[w]=S(g.value)}else for(let w of Object.keys(k)){let g=Object.getOwnPropertyDescriptor(k,w);if(g===void 0||g.writable!==!0)continue;if(g.value!==null&&typeof g.value==="object")k[w]=S(g.value)}let B=C===l2||C==="xinValue"||C==="tosiValue"||C==="value"&&(P8(h)||x&&!("value"in h))?y:E1(y,C);if(sx&&!rx(B))throw Error(`setting invalid path ${B}`);if(S(k1[B])!==k&&h4(q1,B,k))$1(B);return!0}}),m5=(y,x)=>{let h=typeof x==="function"?x:k1[x];if(typeof h!=="function")throw Error(`observe expects a function or path to a function, ${x} is neither`);return k0(y,h)},k1=new Proxy(q1,t1("",!1));Kx(k1);var G1=new Proxy(q1,t1("",!0)),ox=16,ax=100;function Q8(y,x){let h=Array.from(y.getElementsByClassName(e1));if(y.classList.contains(e1))h.unshift(y);for(let C of h){let k=s1.get(C);for(let B of k){if(B.path.startsWith("^"))B.path=`${x}${B.path.substring(1)}`;if(B.binding.toDOM!=null)B.binding.toDOM(C,k1[B.path],B.options)}}}var $8=!1;class y6{boundElement;listTop;listBottom;isNamespaced;templates;options;itemToElement;idToElement=new Map;array=[];_filteredCache;_update;_previousSlice;static filterBoundObservers=new WeakMap;constructor(y,x,h={}){if(this.boundElement=y,this.itemToElement=new WeakMap,h.idPath!=null){let g=X1(x);if(g!=null)Cx(g,h.idPath)}let C=h.virtual?.itemsPerRow??1,k=Array.from(y.children).find((g)=>g instanceof HTMLTemplateElement),B=null;if(k!=null){let g=C;if(k.content.children.length<1||k.content.children.length!==g)throw Error(`ListBinding expects a template with exactly ${g} child element(s)`);this.templates=Array.from(k.content.children).map((z)=>y0(z)),B=k.nextElementSibling,k.remove()}else if(y.children.length===1)this.templates=[y.children[0]],this.templates[0].remove();else throw Error("ListBinding expects a <template> child or exactly one child element");this.options=h;let w=y.namespaceURI;if(this.isNamespaced=w==="http://www.w3.org/2000/svg"||w==="http://www.w3.org/1998/Math/MathML",this.isNamespaced)this.listTop=null,this.listBottom=null;else if(this.listTop=document.createElement("div"),this.listBottom=document.createElement("div"),this.listTop.classList.add("virtual-list-padding"),this.listBottom.classList.add("virtual-list-padding"),this.listTop.setAttribute("role","presentation"),this.listBottom.setAttribute("role","presentation"),this.listTop.setAttribute("aria-hidden","true"),this.listBottom.setAttribute("aria-hidden","true"),B!=null)this.boundElement.insertBefore(this.listTop,B),this.boundElement.insertBefore(this.listBottom,B);else this.boundElement.append(this.listTop),this.boundElement.append(this.listBottom);if(C>1){this.boundElement.classList.add("tosi-virtual-grid");let g=this.boundElement.style;if(g!=null)g.setProperty("--tosi-columns",String(C)),g.display=g.display||"grid",g.gridTemplateColumns=g.gridTemplateColumns||"repeat(var(--tosi-columns), 1fr)";if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.gridColumn="1 / -1",this.listBottom.style.gridColumn="1 / -1"}if(h.virtual!=null&&!this.boundElement.getAttribute("role"))this.boundElement.setAttribute("role",C>1?"grid":"list");if(this.boundElement[o0]=this,this.isNamespaced&&h.virtual!=null)console.warn("ListBinding: virtual scrolling is not supported in SVG/MathML containers, ignoring virtual option");if(!this.isNamespaced&&h.virtual!=null)if(v5.observe(this.boundElement),this._update=N2(()=>{this.update(this.array,!0)},ox),this.boundElement.addEventListener("resize",this._update),h.virtual.scrollContainer==="window")window.addEventListener("scroll",this._update),window.addEventListener("resize",this._update);else this.boundElement.addEventListener("scroll",this._update)}filteredArray(){if(this._filteredCache!=null)return this._filteredCache;let{hiddenProp:y,visibleProp:x}=this.options,h=this.array;if(y!==void 0)h=h.filter((C)=>C[y]!==!0);if(x!==void 0)h=h.filter((C)=>C[x]===!0);if(this.options.filter&&this.needle!==void 0)h=this.options.filter(h,this.needle);return this._filteredCache=h,h}visibleSlice(){let{virtual:y}=this.options,x=this.filteredArray(),h=0,C=x.length-1,k=0,B=0;if(y!=null&&this.boundElement instanceof HTMLElement){let w=this.boundElement.offsetWidth,g=y.scrollContainer==="window",z,q;if(g){z=window.innerHeight;let A=this.boundElement.getBoundingClientRect();q=Math.max(0,-A.top)}else z=this.boundElement.offsetHeight,q=this.boundElement.scrollTop;let j=y.width!=null?Math.max(1,Math.floor(w/y.width)):y.visibleColumns??1,V=Math.ceil(x.length/j);if(y.minHeight!=null){let A=y.minHeight,P=Math.ceil(z/A)+(y.rowChunkSize||1),G=j*P,i=V*A,N=Math.max(0,i-z),F=N>0?Math.min(1,Math.max(0,q/N)):0,Z=Math.max(0,V-P+1),R=F*Z,c=Math.floor(R);if(y.rowChunkSize)c-=c%y.rowChunkSize;return h=c*j,C=h+G-1,k=q,B=Math.max(0,i-q-z),{items:x,firstItem:h,lastItem:C,topBuffer:k,bottomBuffer:B,interpolation:{t:F,position:R,scrollTop:q,viewportHeight:z,totalScrollHeight:i,rowHeight:y.height}}}else{let A=Math.ceil(z/y.height)+(y.rowChunkSize||1),P=j*A,G=Math.floor(q/y.height);if(G>V-A+1)G=Math.max(0,V-A+1);if(y.rowChunkSize)G-=G%y.rowChunkSize;h=G*j,C=h+P-1,k=G*y.height,B=Math.max((V-A)*y.height-k,0)}}return{items:x,firstItem:h,lastItem:C,topBuffer:k,bottomBuffer:B}}needle;filter=N2((y)=>{if(this.needle!==y)this.needle=y,this.update(this.array)},ax);update(y,x){if(y==null)y=[];if(this.array=y,!x)this._filteredCache=void 0;let{hiddenProp:h,visibleProp:C}=this.options,k=X1(y),B=this.visibleSlice();if(this.boundElement.classList.toggle("-xin-empty-list",B.items.length===0),this.options.virtual!=null)this.boundElement.setAttribute("aria-rowcount",String(B.items.length));let w=this._previousSlice,{firstItem:g,lastItem:z,topBuffer:q,bottomBuffer:j}=B,V=h===void 0&&C===void 0&&x===!0&&w!=null&&g===w.firstItem&&z===w.lastItem;if(V&&B.interpolation==null&&q===w.topBuffer&&j===w.bottomBuffer)return;if(V&&B.interpolation!=null){this._updateInterpolatedBuffers(B);return}this._previousSlice=B;let A=0,P=0,G=0,{idPath:i}=this.options,N=this.options.virtual?.itemsPerRow??1,F;if(i!=null){F=new Set;for(let b=g;b<=z;b++){let W=B.items[b];if(W!==void 0)F.add(String(W[i]))}}let Z=new Set;for(let b of Array.from(this.boundElement.children)){if(b===this.listTop||b===this.listBottom)continue;let W=b[i2];if(W==null)continue;else if(W===!0)b.remove(),A++;else{if(Z.has(W))continue;let T;if(i!=null)T=!F.has(String(W[i]));else{let v=B.items.indexOf(W);T=v<g||v>z}if(T){Z.add(W);let v=this.itemToElement.get(W);if(v!=null)for(let D of v)D.remove();else b.remove();if(this.itemToElement.delete(W),i!=null)this.idToElement.delete(String(W[i]));A++}}}if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(q)+"px",this.listBottom.style.height=String(j)+"px";let R=[],c=i!=null?new Set:null;for(let b=g;b<=z;b++){let W=B.items[b];if(W===void 0)continue;if(c!=null&&i!=null){let v=String(W[i]);if(c.has(v)){if(!$8)$8=!0,console.error(`tosijs list binding: duplicate idPath value "${v}" (idPath: "${i}"). `+"id-path values must be unique — items sharing an id collapse to a single "+"row and updates target the wrong item. Warned once per session.")}else c.add(v)}let T=this.itemToElement.get(S(W));if(T==null&&i!=null){let v=String(W[i]);if(T=this.idToElement.get(v),T!=null){let D=S(W);this.itemToElement.set(D,T);for(let K1 of T)K1[i2]=D}}if(T==null){G++;let v=S(W);if(T=this.templates.map((D)=>y0(D)),typeof W==="object")this.itemToElement.set(v,T);for(let D of T)D[i2]=typeof W==="object"?v:!0;for(let D of T)if(this.listBottom!=null)this.boundElement.insertBefore(D,this.listBottom);else this.boundElement.append(D);if(i!=null){let D=W[i],K1=`${k}[${i}=${D}]`;for(let n1 of T)Q8(n1,K1);this.idToElement.set(String(D),T)}else{let D=`${k}[${b}]`;for(let K1 of T)Q8(K1,D)}}if(this.options.virtual!=null){let v=String(b+1);if(N>1)for(let D=0;D<T.length;D++){let K1=T[D];K1.setAttribute("role","gridcell"),K1.setAttribute("aria-rowindex",v),K1.setAttribute("aria-colindex",String(D+1))}else for(let D of T)D.setAttribute("role","listitem"),D.setAttribute("aria-rowindex",v)}R.push(...T)}let C1=this.listTop;for(let b of R){if(b.previousElementSibling!==C1)if(P++,C1?.nextElementSibling!=null)this.boundElement.insertBefore(b,C1.nextElementSibling);else if(this.listBottom!=null)this.boundElement.insertBefore(b,this.listBottom);else this.boundElement.append(b);C1=b}if(B.interpolation!=null)this._updateInterpolatedBuffers(B);if(a0.perf)console.log(k,"updated",{removed:A,created:G,moved:P})}_updateInterpolatedBuffers(y){let{t:x,position:h,scrollTop:C,viewportHeight:k,totalScrollHeight:B,rowHeight:w}=y.interpolation,g=0;for(let V of Array.from(this.boundElement.children)){if(V===this.listTop||V===this.listBottom)continue;g+=V.offsetHeight||w}let z=C,q=C+k-g,j=Math.max(0,x*q+(1-x)*z-h%1*w);if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(j)+"px",this.listBottom.style.height=String(Math.max(0,B-j-g))+"px"}}var J2=(y,x,h)=>{let C=y[o0];if(x&&C===void 0)C=new y6(y,x,h),y[o0]=C;return C},n5=(y)=>{let x;while(!(x=y[i2])&&y&&y.parentElement)y=y.parentElement;return x?{element:y,item:x}:void 0},j2=(y)=>{let x=n5(y);return x?x.item:void 0},tx=(y)=>{let x=n5(y);if(!x)return console.error("deleteListItem failed, element is not part of a list instance",y),!1;let h=J2(x.element.parentElement);if(!h.options.idPath)return console.error("deleteListItem failed, list binding has no idPath",y.parentElement,h),!1;let C=h.array.indexOf(x.item);if(C>-1)return h.array.splice(C,1),!0;return!1},ex={start:"start",middle:"center",end:"end",nearest:"nearest"},yh=(y,x,h={})=>{let C=J2(y);if(C==null)return console.error("scrollListItemIntoView failed, element has no list binding",y),!1;let{position:k="middle",behavior:B="smooth"}=h,w=C.filteredArray(),g=S(x)??x,z=w.indexOf(g);if(z===-1)return console.error("scrollListItemIntoView failed, item not found in list",x),!1;let{virtual:q}=C.options;if(q!=null&&y instanceof HTMLElement){let j=q.width!=null?Math.max(1,Math.floor(y.offsetWidth/q.width)):q.visibleColumns??1,V=Math.floor(z/j),A=q.minHeight??q.height,P=Math.ceil(w.length/j),G=q.scrollContainer==="window",i=G?window.innerHeight:y.offsetHeight,N;if(q.minHeight!=null){let F=Math.ceil(i/A)+(q.rowChunkSize||1),Z=P*A,R=Math.max(0,Z-i),c=Math.max(1,P-F+1),C1=V/c;switch(k){case"start":N=C1*R;break;case"end":N=Math.max(0,(V-F+1)/c*R);break;case"nearest":{let b=G?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop,W=R>0?b/R:0,T=Math.floor(W*c);if(V<T)N=C1*R;else if(V>=T+F)N=Math.max(0,(V-F+1)/c*R);else return!0;break}default:{let b=V-Math.floor(F/2);N=Math.max(0,b)/c*R}}}else{let F=V*q.height;switch(k){case"start":N=F;break;case"end":N=F-i+q.height;break;case"nearest":{let Z=G?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop;if(F<Z)N=F;else if(F+q.height>Z+i)N=F-i+q.height;else return!0;break}default:N=F-(i-q.height)/2}}if(N=Math.max(0,N),G){let F=y.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:F+N,behavior:B})}else y.scrollTo({top:N,behavior:B})}else{let j=C.itemToElement.get(g);if(j==null||j.length===0)return console.error("scrollListItemIntoView failed, no DOM element found for item",x),!1;j[0].scrollIntoView({block:ex[k]??"center",behavior:B})}return!0},{document:C0,MutationObserver:O8}=globalThis,E5=(y,x)=>{let h=s1.get(y);if(h==null)return;for(let C of h){let{binding:k,options:B}=C,{path:w}=C,{toDOM:g}=k;if(g!=null){if(w.startsWith("^")){let z=j2(y);if(z!=null&&z[M1]!=null)w=C.path=`${z[M1]}${w.substring(1)}`;else{if(y instanceof HTMLElement)console.warn(`Unresolved relative binding "${w}" —`,y,"is not part of a list. If this is a list template, wrap it in a <template>.");continue}}if(x==null||x0(x,w))g(y,C4()[w],B)}}};if(O8!=null)new O8((y)=>{y.forEach((x)=>{Array.from(x.addedNodes).forEach((h)=>{if(h instanceof Element)Array.from(h.getElementsByClassName(e1)).forEach((C)=>E5(C))})})}).observe(C0.body,{subtree:!0,childList:!0});k0(()=>!0,(y)=>{let x=Array.from(C0.getElementsByClassName(e1));for(let h of x)E5(h,y)});var x6=(y)=>{let x=y.composed&&y.composedPath!=null?y.composedPath()[0]:y.target;return x instanceof Element?x:null},M5=(y,x)=>{while(y!=null){let h=y.closest(x);if(h!=null)return h;let C=y.getRootNode();y=typeof ShadowRoot<"u"&&C instanceof ShadowRoot?C.host:null}return null},xh=(y,x)=>{if(y.parentElement!=null)return M5(y.parentElement,x);let h=y.getRootNode();if(typeof ShadowRoot<"u"&&h instanceof ShadowRoot)return M5(h.host,x);return null},h6=(y)=>{if(y.parentElement!=null)return y.parentElement;let x=y.getRootNode();return typeof ShadowRoot<"u"&&x instanceof ShadowRoot?x.host:null},Y8=(y)=>{while(y!=null&&!F2.has(y))y=h6(y);return y},i8=(y)=>{let x=M5(x6(y),E0);while(x!=null){let h=s1.get(x);for(let C of h??[]){let{binding:k,path:B}=C,{fromDOM:w}=k;if(w!=null){let g;try{g=w(x,C.options)}catch(z){throw console.error("Cannot get value from",x,"via",C),Error("Cannot obtain value fromDOM")}if(g!=null){let z=C4(),q=z[B];if(q==null)z[B]=g;else{let j=q[M1]!=null?q[l2]:q,V=g[M1]!=null?g[l2]:g;if(typeof j==="number"&&typeof V==="string"){let A=V.trim();if(A!==""){let P=Number(A);if(!Number.isNaN(P))V=P}}else if(V instanceof Date){if(typeof j==="number")V=V.getTime();else if(typeof j==="string")V=x.value}if(j instanceof Date&&V instanceof Date?j.getTime()!==V.getTime():j!==V)z[B]=V}}}}x=xh(x,E0)}};if(globalThis.document!=null)C0.body.addEventListener("change",i8,!0),C0.body.addEventListener("input",i8,!0);function hh(y,x,h,C){let{paths:k,transform:B}=x,{toDOM:w}=h;if(w==null)return y;let g=null,z={toDOM(j,V,A){let P=C4(),G=k.map((N)=>P[N]);if(g!==null&&G.every((N,F)=>N===g[F]))return;g=G;let i=B(...G);w(j,i,A)},fromDOM:h.fromDOM};y.classList?.add(e1);let q=s1.get(y);if(q==null)q=[],s1.set(y,q);for(let j of k)q.push({path:j,binding:z,options:C});if(!k[0].startsWith("^"))$1(k[0]);return y}var F8=!1,Ch=(y,x)=>{if(F8)return;if(typeof ShadowRoot<"u"&&y.getRootNode!=null&&y.getRootNode()instanceof ShadowRoot)F8=!0,console.warn(`tosijs: ${x} targets an element inside a shadow root, where data bindings do not operate (documented Component design boundary). A shadow-DOM component is bound like an <input>: bind its VALUE from outside (bindings.value) and implement render() to reflect value into the shadow DOM. Warned once per session.`,y)};function f1(y,x,h,C){if(y instanceof DocumentFragment)throw Error("bind cannot bind to a DocumentFragment");if(Ch(y,"bind()"),x!=null&&typeof x==="object"&&x[x4])return hh(y,x,h,C);let k;if(typeof x==="object"&&x[M1]===void 0&&C===void 0){let{value:g}=x;k=typeof g==="string"?g:g[M1],C={...x},delete C.value}else k=typeof x==="string"?x:x[M1];if(k==null)throw Error("bind requires a path or object with xin Proxy");let{toDOM:B}=h;y.classList?.add(e1);let w=s1.get(y);if(w==null)w=[],s1.set(y,w);if(w.push({path:k,binding:h,options:C}),B!=null&&!k.startsWith("^"))$1(k);if(C?.filter&&C?.needle)f1(y,C.needle,{toDOM(g,z){g[o0]?.filter(z)}});return y}var N8=new Set,kh=(y)=>{let x=Y8(x6(y)),h=!1,C=new Proxy(y,{get(B,w){if(w==="stopPropagation")return()=>{y.stopPropagation(),h=!0};else{let g=B[w];return typeof g==="function"?g.bind(B):g}}}),k=new Set;while(!h&&x!=null){let B=F2.get(x)?.[y.type]??k;for(let w of B){if(typeof w==="function")w(C);else{let g=C4()[w];if(typeof g==="function")g(C);else throw Error(`no event handler found at path ${w}`)}if(h)continue}x=Y8(h6(x))}};function Z2(y,x,h){let C=F2.get(y);if(C==null)C={},F2.set(y,C);if(!C[x])C[x]=new Set;if(C[x].add(h),!N8.has(x))N8.add(x),C0.body.addEventListener(x,kh,!0);return()=>{C[x].delete(h)}}Px(f1,Z2);function C6(y,x){if(!y.internals)return;let h={},C="";if(y.hasAttribute("required")&&x==="")h.valueMissing=!0,C="Please fill out this field.";let k=y.getAttribute("minlength");if(k&&x.length<parseInt(k,10))h.tooShort=!0,C=`Please use at least ${k} characters.`;let B=y.getAttribute("maxlength");if(B&&x.length>parseInt(B,10))h.tooLong=!0,C=`Please use no more than ${B} characters.`;let w=y.getAttribute("pattern");if(w&&x!=="")try{if(!new RegExp(`^(?:${w})$`).test(x))h.patternMismatch=!0,C="Please match the requested format."}catch{}if(Object.keys(h).length>0)y.internals.setValidity(h,C,y);else y.internals.setValidity({})}var Bh=0;function O5(){return`custom-elt${(Bh++).toString(36)}`}var W8=0,J8=new Set,Z8=new Set,R8=Symbol("tosiDrainWrapped"),D8=new WeakSet,Y5=null;function wh(){if(Y5===null)Y5=new MutationObserver((y)=>{let x=new Set;for(let h of y)if(h.type==="attributes"&&h.target instanceof $){let C=h.target,k=f8(h.attributeName);if(C._legacyTrackedAttrs?.has(k))x.add(C)}for(let h of x)h.queueRender(!1)});return Y5}var e2={};function gh(y,x){let h=e2[y],C=W2(x).replace(/:host\(([^)]+)\)/g,`${y}$1`).replace(/:host\b/g,y);e2[y]=h?h+`
|
|
13
|
+
`+C:C}function zh(y){if(e2[y])document.head.append(U.style({id:y+"-component"},e2[y]));delete e2[y]}function qh(y){let x=Object.create(null),h=(C)=>{if(Array.isArray(C)){C.forEach(h);return}if(!(C instanceof Element))return;let k=C.getAttribute("part");if(k!=null&&!(k in x))x[k]=C;for(let B of Array.from(C.children))h(B)};return h(y),x}class $ extends HTMLElement{static elements=U;static _elementCreator;static initAttributes;static formAssociated;static preferredTagName;static shadowStyleSpec;static lightStyleSpec;static extends;internals;get validity(){return this.internals?.validity}get validationMessage(){return this.internals?.validationMessage??""}get willValidate(){return this.internals?.willValidate??!1}checkValidity(){return this.internals?.checkValidity()??!0}reportValidity(){return this.internals?.reportValidity()??!0}setCustomValidity(y){if(this.internals)if(y)this.internals.setValidity({customError:!0},y);else this.internals.setValidity({})}setValidity(y,x,h){this.internals?.setValidity(y,x,h)}setFormValue(y,x){this.internals?.setFormValue(y,x)}static get observedAttributes(){let y=this.initAttributes;if(y)return["hidden",...Object.keys(y).map(P1)];return["hidden"]}instanceId;styleNode;static styleSpec;static styleNode;content=U.slot();isSlotted;static _tagName=null;static get tagName(){return this._tagName}_legacyTrackedAttrs;_attrValues;_valueChanged=!1;_pendingAttrOps;static StyleNode(y){return console.warn("StyleNode is deprecated, use static shadowStyleSpec instead"),U.style(W2(y))}static elementCreator(y={}){let x=this;if(!Object.prototype.hasOwnProperty.call(x,"_elementCreator")){if(y.tag!==void 0)z1("elementCreator-tag","Passing tag to elementCreator() is deprecated. Use static preferredTagName instead.");if(y.styleSpec!==void 0)z1("elementCreator-styleSpec","Passing styleSpec to elementCreator() is deprecated. Use static lightStyleSpec instead.");if(y.extends!==void 0)z1("elementCreator-extends","Passing extends to elementCreator() is deprecated. Use static extends instead.");let h=y.tag??x.preferredTagName;if(h==null)if(typeof x.name==="string"&&x.name!==""){if(h=P1(x.name),h.startsWith("-"))h=h.slice(1)}else h=O5();if(customElements.get(h)!=null)console.warn(`${h} is already defined`);if(h.match(/\w+(-\w+)+/)==null)console.warn(`${h} is not a legal tag for a custom-element`),h=O5();while(customElements.get(h)!==void 0)h=O5();x._tagName=h;let C=y.styleSpec??x.lightStyleSpec;if(C!==void 0)gh(h,C);let k=y.extends??x.extends,B=k?{extends:k}:void 0,w=this.prototype;if(w!=null&&!Object.prototype.hasOwnProperty.call(w,R8)){let g=w.connectedCallback;w.connectedCallback=function(){if(this._drainPendingAttrOps(),g)g.call(this)},Object.defineProperty(w,R8,{value:!0,enumerable:!1})}window.customElements.define(h,this,B),x._elementCreator=U[h]}return x._elementCreator}initAttributes(...y){if(z1("initAttributes","initAttributes() is deprecated. Use static initAttributes = { ... } instead."),!this._legacyTrackedAttrs)this._legacyTrackedAttrs=new Set;for(let C of y)this._legacyTrackedAttrs.add(C);wh().observe(this,{attributes:!0});let x={},h={};y.forEach((C)=>{x[C]=v1(this[C]);let k=P1(C);Object.defineProperty(this,C,{enumerable:!1,get(){if(typeof x[C]==="boolean")return this.hasAttribute(k);else if(this.hasAttribute(k))return typeof x[C]==="number"?parseFloat(this.getAttribute(k)):this.getAttribute(k);else if(h[C]!==void 0)return h[C];else return x[C]},set(B){if(typeof x[C]==="boolean"){if(B!==this[C]){if(B)this.setAttribute(k,"");else this.removeAttribute(k);this.queueRender()}}else if(typeof x[C]==="number"){if(B!==parseFloat(this[C]))this.setAttribute(k,B),this.queueRender()}else if(typeof B==="object"||`${B}`!==`${this[C]}`){if(B===null||B===void 0||typeof B==="object")this.removeAttribute(k);else this.setAttribute(k,B);this.queueRender(),h[C]=B}}})})}initValue(){let y=Object.getOwnPropertyDescriptor(this,"value");if(y===void 0||y.get!==void 0||y.set!==void 0)return;let x=this.hasAttribute("value")?this.getAttribute("value"):v1(this.value);delete this.value,Object.defineProperty(this,"value",{enumerable:!1,get(){return x},set(h){if(x!==h)x=h,this._valueChanged=!0,this.queueRender(!0)}})}_parts;_partsCache=Object.create(null);get parts(){let y=this;if(this._parts==null)this._parts=new Proxy({},{get(x,h){if(typeof h!=="string")return;let C=y._partsCache,k=C[h]??null,B=k;if(B!=null&&!B.isConnected)B=null;if(B==null){let w=y.shadowRoot!=null?y.shadowRoot:y;if(B=w.querySelector(`[part="${h}"]`),B==null){let g=w.querySelector(`[data-ref="${h}"]`);if(g!=null)z1("data-ref",'data-ref is deprecated and will be removed in tosijs 1.8.0 — use part="…" instead.'),g.removeAttribute("data-ref"),B=g}if(B==null)B=w.querySelector(h);if(B==null&&k!=null)return k;if(B==null)throw Error(`elementRef "${h}" does not exist!`);C[h]=B}return B}});return this._parts}attributeChangedCallback(y,x,h){let C=f8(y);if(h===null&&this._attrValues?.has(C))this._attrValues.delete(C);if(!this._legacyTrackedAttrs?.has(C))this.queueRender(!1)}constructor(){super();if(W8+=1,this._installAttributeQueue(),this.constructor.formAssociated&&typeof this.attachInternals==="function"&&!this.internals)this.internals=this.attachInternals();let y=this.constructor.initAttributes;if(y)this._setupAttributeAccessors(y);this.instanceId=`${this.tagName.toLocaleLowerCase()}-${W8}`,this._value=v1(this.defaultValue),this._warnOnHandlerCollisions()}_warnOnHandlerCollisions(){let y=this.constructor;if(D8.has(y))return;D8.add(y),queueMicrotask(()=>{let x=new Set;for(let B of Object.keys(this))if(/^on[A-Z]/.test(B))x.add(B);let h=Object.getPrototypeOf(this);while(h&&h!==$.prototype){for(let B of Object.getOwnPropertyNames(h))if(/^on[A-Z]/.test(B))x.add(B);h=Object.getPrototypeOf(h)}let C=this.tagName.toLowerCase();if(x.delete("onResize")&&this.handleResize===void 0)console.warn(`<${C}> defines 'onResize', which is deprecated. Rename it to 'handleResize'. The on<Event> prefix is reserved for event-handler sugar in the elements factory (creator({ onResize }) would attach a 'resize' listener) and is being retired for component callbacks in favor of the handle<Event> convention.`);if(x.size===0)return;let k=Array.from(x,(B)=>`'${B}'`).join(", ");console.warn(`<${C}> defines ${k}. The elements factory treats on<Event> property `+"names as event-handler sugar — e.g. creator({ onClick }) attaches a "+"'click' listener rather than assigning the property — so these members "+"are shadowed and cannot be set or read via the element creator. Rename by intent: use 'handle<Event>' for a handler function the component invokes (e.g. 'handleClick'), or 'add<Event>Listener' for a method that registers listeners for a synthetic event the component dispatches (e.g. 'addClickListener').")})}_installAttributeQueue(){let y=this.constructor.initAttributes;if(!y)return;let x=new Set(Object.keys(y).map(P1)),h=[];this._pendingAttrOps=h;let C=HTMLElement.prototype;this.setAttribute=(k,B)=>{if(x.has(k))h.push(["set",k,String(B)]);else C.setAttribute.call(this,k,B)},this.removeAttribute=(k)=>{if(x.has(k))h.push(["remove",k]);else C.removeAttribute.call(this,k)},queueMicrotask(()=>this._drainPendingAttrOps())}_drainPendingAttrOps(){let y=this._pendingAttrOps;if(y===void 0)return;this._pendingAttrOps=void 0,delete this.setAttribute,delete this.removeAttribute;let x=new Set;for(let h of y)if(this.hasAttribute(h[1]))x.add(h[1]);for(let h of y)if(h[0]==="set"){if(!x.has(h[1]))this.setAttribute(h[1],h[2])}else x.delete(h[1]),this.removeAttribute(h[1])}_installedAttrAccessors;_setupAttributeAccessors(y){if(!this._attrValues)this._attrValues=new Map;if(!this._installedAttrAccessors)this._installedAttrAccessors=new Set;for(let x of Object.keys(y)){let h=P1(x),C=y[x];if(x==="value"){console.warn(`${this.tagName}: 'value' cannot be an attribute. Use the Component value property instead.`);continue}if(typeof C==="object"&&C!==null){console.warn(`${this.tagName}: initAttributes.${x} is an object. Use a regular property instead.`);continue}if(C===!0)throw Error(`${this.tagName}: static initAttributes.${x} defaults a boolean attribute to true, but HTML boolean attributes are false-by-default (presence = true, absence = false) and `+`cannot reflect a true default — it would silently become false. Use { ${x}: false }, or model it as a string/number attribute or a plain (non-attribute) property.`);let k=this,B=!1;while(k){let w=Object.getOwnPropertyDescriptor(k,x);if(w){if(!w.configurable||w.get||w.set){B=!0;break}break}k=Object.getPrototypeOf(k)}if(B)continue;this._installAttrAccessor(x,h,C)}}_installAttrAccessor(y,x,h){Object.defineProperty(this,y,{enumerable:!1,configurable:!0,get:()=>{if(typeof h==="boolean"){if(this.hasAttribute(x))return!0;if(this._attrValues.has(y))return this._attrValues.get(y);return!1}else if(this.hasAttribute(x))return typeof h==="number"?parseFloat(this.getAttribute(x)):this.getAttribute(x);else if(this._attrValues.has(y))return this._attrValues.get(y);else return h},set:(C)=>{if(typeof h==="boolean"){if(C!==this[y]){if(C)this.setAttribute(x,"");else this.removeAttribute(x);this.queueRender(),this._attrValues.set(y,!!C)}}else if(typeof h==="number"){if(C!==parseFloat(this[y]))this.setAttribute(x,C),this.queueRender(),this._attrValues.set(y,C)}else if(typeof C==="object"||`${C}`!==`${this[y]}`){if(C===null||C===void 0||typeof C==="object")this.removeAttribute(x);else this.setAttribute(x,C);this.queueRender(),this._attrValues.set(y,C)}}}),this._installedAttrAccessors.add(y)}_recoverShadowedAttrAccessors(){let y=this._installedAttrAccessors,x=this.constructor.initAttributes;if(y==null||x==null)return;let h=[];for(let C of y){let k=Object.getOwnPropertyDescriptor(this,C);if(k==null||k.get!=null||k.set!=null)continue;let B=k.value;delete this[C],this._installAttrAccessor(C,P1(C),x[C]),this[C]=B,h.push(C)}if(h.length>0&&!Z8.has(this.tagName)){Z8.add(this.tagName);let C=h.map((k)=>`'${k}'`).join(", ");console.warn(`<${this.tagName.toLowerCase()}> declares instance field(s) ${C} that shadow static initAttributes accessors (class fields use [[Define]] semantics). The field value was adopted and the `+"reactive accessor restored — delete the field declaration; "+"static initAttributes already defines the property.")}}connectedCallback(){if(this._recoverShadowedAttrAccessors(),this._drainPendingAttrOps(),zh(this.constructor.tagName),this.hydrate(),this.role!=null)this.setAttribute("role",this.role);if(this.constructor.formAssociated&&!this.hasAttribute("tabindex"))this.setAttribute("tabindex","0");let y=this.handleResize??this.onResize;if(y!==void 0){if(v5.observe(this),this._onResize==null)this._onResize=y.bind(this);this.addEventListener("resize",this._onResize)}if(this.value!=null&&this.getAttribute("value")!=null)this._value=this.getAttribute("value");if(this.internals&&this.value!==void 0)this.internals.setFormValue(this.value),this.validateValue();this.queueRender()}disconnectedCallback(){v5.unobserve(this)}formResetCallback(){if(this.value!==void 0)this.value=this.defaultValue??""}formDisabledCallback(y){if(y)this.setAttribute("disabled","");else this.removeAttribute("disabled")}formStateRestoreCallback(y){if(this.value!==void 0&&typeof y==="string")this.value=y}_changeQueued=!1;_renderQueued=!1;queueRender(y=!1){if(!this._hydrated)return;if(!this._changeQueued)this._changeQueued=y;if(!this._renderQueued)this._renderQueued=!0,requestAnimationFrame(()=>{if(this._changeQueued){if(c8(this,"change",{bubbles:!0,composed:!0}),this.internals&&this.value!==void 0)this.internals.setFormValue(this.value)}this._changeQueued=!1,this._renderQueued=!1,this.render()})}_hydrated=!1;_whenHydrated;_resolveHydrated;get hydrated(){return this._hydrated}get whenHydrated(){if(this._hydrated)return Promise.resolve();if(this._whenHydrated==null)this._whenHydrated=new Promise((y)=>{this._resolveHydrated=y});return this._whenHydrated}hydrate(){if(!this._hydrated){this.initValue();let y=typeof this.content!=="function",x=typeof this.content==="function"?this.content(U):this.content;if(Array.isArray(x)){let B={};x=x.filter((w)=>{if(w instanceof Node||typeof w==="string"||typeof w==="number"||X1(w))return!0;return Object.assign(B,w),!1});for(let w of Object.keys(B))s5(this,w,B[w])}let h=this.constructor,C=h.shadowStyleSpec??h.styleSpec;if(h.styleSpec&&!h.shadowStyleSpec)z1("static-styleSpec","static styleSpec is deprecated. Use static shadowStyleSpec instead.");let{styleNode:k}=h;if(C)k=h.styleNode=U.style(W2(C)),delete h.styleNode;if(this.styleNode)console.warn(this,"styleNode is deprecated, use static shadowStyleSpec instead"),k=this.styleNode;if(k){let B=this.attachShadow({mode:"open"});if(B.appendChild(k.cloneNode(!0)),j8(B,x,y),!J8.has(this.tagName)&&B.querySelector(E0)!=null)J8.add(this.tagName),console.warn(`<${this.tagName.toLowerCase()}> has data-binding sugar in its shadow-DOM content, where bindings do not operate. A shadow-DOM component is bound like an <input>: bind its VALUE from outside (bindings.value) and implement render() to reflect value into `+"the shadow DOM — setting value queues render() and emits change "+"automatically. on() event handlers are fine. Warned once per component class.")}else if(x!==null){let B=Array.from(this.childNodes);if(!y)this._partsCache=qh(x);j8(this,x,y),this.isSlotted=this.querySelector("slot,tosi-slot,xin-slot")!==null;let w=Array.from(this.querySelectorAll("slot"));if(w.length>0)w.forEach(B4.replaceSlot);if(B.length>0){let g={"":this};Array.from(this.querySelectorAll("tosi-slot,xin-slot")).forEach((z)=>{g[z.name]=z}),B.forEach((z)=>{let q=g[""],j=z instanceof Element?g[z.slot]:q;(j!==void 0?j:q).append(z)})}}this._hydrated=!0,this._parts=void 0,this._resolveHydrated?.()}}render(){if(this._valueChanged&&this.internals&&this.value!==void 0)this.internals.setFormValue(this.value),this.validateValue();this._valueChanged=!1}validateValue(){if(!this.internals||this.value===void 0)return;let y=typeof this.value==="string"?this.value:String(this.value);C6(this,y)}}class B4 extends ${static preferredTagName="tosi-slot";static initAttributes={name:""};content=null;static replaceSlot(y){let x=document.createElement("tosi-slot");if(y.name!=="")x.setAttribute("name",y.name);while(y.firstChild!=null)x.appendChild(y.firstChild);y.replaceWith(x)}}var lh=B4.elementCreator();class k6 extends ${static preferredTagName="xin-slot";static initAttributes={name:""};content=null;constructor(){super();z1("xin-slot","<xin-slot> is deprecated. Use <tosi-slot> instead.")}static replaceSlot=B4.replaceSlot}var jh=k6.elementCreator(),Vh=(y=()=>!0)=>{let x=localStorage.getItem("xin-state");if(x!=null){let C=JSON.parse(x);for(let k of Object.keys(C).filter(y))k1[k]=C[k]}let h=B0(()=>{let C={},k=S(k1);for(let B of Object.keys(k).filter(y))C[B]=k[B];localStorage.setItem("xin-state",JSON.stringify(C)),console.log("xin state saved to localStorage")},500);m5((C)=>{let k=C.split(/[.[]/)[0];return y(k)},h)},Xh="tosijs-share",_h="tosijs-share",t2="shared",Ah=1,S5=new Set,I5=new Set,b5=new Set,T5=new Set,i5=new Map,z2=null,p5="",m0=null,Kh=null;function H8(){if(m0!=null)return Promise.resolve(m0);return new Promise((y,x)=>{let h=indexedDB.open(_h,Ah);h.onupgradeneeded=()=>{h.result.createObjectStore(t2)},h.onsuccess=()=>{m0=h.result,y(m0)},h.onerror=()=>x(h.error)})}var Ph={async get(y){let x=await H8();return new Promise((h,C)=>{let k=x.transaction(t2,"readonly").objectStore(t2).get(y);k.onsuccess=()=>h(k.result),k.onerror=()=>C(k.error)})},async set(y,x){let h=await H8();return new Promise((C,k)=>{let B=h.transaction(t2,"readwrite");B.objectStore(t2).put(x,y),B.oncomplete=()=>C(),B.onerror=()=>k(B.error)})}};function B6(){return Kh??Ph}function Gh(y){return y!=null&&y.type==="tosijs-share"&&typeof y.path==="string"}function o5(y){for(let x of S5)if(y===x||y.startsWith(x+"."))return x;return}function Uh(y){for(let x of I5)if(y===x||y.startsWith(x+"."))return!0;return!1}function w6(y,x){let h=o5(y);if(h!==void 0&&b5.has(h))T5.add(h);I5.add(y),h4(q1,y,x),$1(y),f5().then(()=>{I5.delete(y)})}function Qh(){if(z2!=null)return z2;return p5=crypto.randomUUID(),z2=new BroadcastChannel(Xh),z2.onmessage=(y)=>{let x=y.data;if(!Gh(x))return;if(x.origin===p5)return;if(o5(x.path)===void 0)return;w6(x.path,x.value)},z2}function $h(y,x){if(z2==null)return;let h={type:"tosijs-share",path:y,value:x,origin:p5};z2.postMessage(h)}function Oh(y){if(!i5.has(y))i5.set(y,B0(()=>{let x=y1(q1,y);B6().set(y,x)},500));i5.get(y)()}async function Yh(...y){if(typeof BroadcastChannel>"u")return{restored:[]};Qh();let x=[],h=B6();for(let C of y){let k=typeof C==="string"?C:X1(C);if(k===void 0)throw Error("share() requires boxed proxies or string paths. Got a non-proxy value.");if(S5.has(k))continue;S5.add(k),b5.add(k);let B=await h.get(k),w=T5.has(k);if(b5.delete(k),T5.delete(k),B!==void 0&&!w)w6(k,B),x.push(C);else if(B===void 0){let g=y1(q1,k);await h.set(k,g)}k0((g)=>g===k||g.startsWith(k+"."),(g)=>{if(Uh(g))return;let z=o5(g);if(z===void 0)return;let q=y1(q1,g);$h(g,q),Oh(z)})}return{restored:x}}var L5=new Set;function v8(y,x){for(let h of y)if(x===h||x.startsWith(h+"."))return h;return}function ih(y){for(let x of L5)if(y===x||y.startsWith(x+"."))return!0;return!1}function Fh(y,x){L5.add(y),h4(q1,y,x),$1(y),f5().then(()=>{L5.delete(y)})}async function Nh(y,x,...h){let C=new Set,k=[],B=[],w=x.throttleInterval??100;await y.connect();let g=N2(()=>{if(k.length===0)return;let z=k.splice(0);try{y.send(z)}catch(q){k.unshift(...z),console.error("sync: transport.send failed; deltas requeued and will retry on the next flush",q)}},w);y.onReceive((z)=>{for(let q of z){if(v8(C,q.path)===void 0)continue;Fh(q.path,q.value)}});for(let z of h){let q=typeof z==="string"?z:X1(z);if(q===void 0)throw Error("sync() requires boxed proxies or string paths. Got a non-proxy value.");C.add(q);let j=k0((V)=>V===q||V.startsWith(q+"."),(V)=>{if(ih(V))return;if(v8(C,V)===void 0)return;let A=y1(q1,V);k.push({path:V,value:A}),g()});B.push(j)}return{disconnect(){for(let z of B)h0(z);B.length=0,C.clear(),k.length=0,y.disconnect()}}}var g6="1.7.8";function t(y){return Object.assign(G1,y),G1}function a5(y){return z1("boxedProxy","boxedProxy is deprecated, please use tosi() instead"),t(y)}var Wh=new FinalizationRegistry((y)=>{y()});function Jh(y,x){let h=S8();G1[h]=y;let C=G1[h],k=()=>{delete k1[h]};if(x)Wh.register(x,k);return[C,k]}function z6(y,x=!1){if(x)return z1("xinProxy-boxed","xinProxy(..., true) is deprecated; use tosi(...) instead"),a5(y);return Object.keys(y).forEach((h)=>{k1[h]=y[h]}),k1}var Zh={};async function t5(y,x){let h=await x(y,{Color:Y,Component:$,elements:U,svgElements:k4,mathML:t8,varDefault:_,vars:l,xin:k1,boxed:G1,xinProxy:z6,boxedProxy:a5,tosi:t,makeComponent:t5,bind:f1,on:Z2,version:g6}),{type:C}=h;C.preferredTagName=y;let k=h.lightStyleSpec??h.styleSpec;if(k)C.lightStyleSpec=k;let B={type:C,creator:C.elementCreator()};return Zh[y]=B,B}var w4={":host":{display:"none"}},n0={},Rh=(y)=>import(y);async function q6(y,x,h){let C=Array.from(y.querySelectorAll(x)).filter((B)=>B.src),k=await Promise.allSettled(C.map((B)=>B.packaged()));for(let B=0;B<k.length;B++){let w=k[B];if(w.status==="rejected")console.error(`<${h}> failed to load blueprint from "${C[B].src}":`,w.reason)}}class g4 extends ${static preferredTagName="tosi-blueprint";static lightStyleSpec=w4;static initAttributes={tag:"anon-elt",src:"",property:"default"};loaded;blueprintLoaded=(y)=>{};async packaged(){let{tag:y,src:x,property:h}=this,C=`${y}.${h}:${x}`;if(!this.loaded){if(n0[C]===void 0)n0[C]=Rh(x).then((k)=>{let B=k[h];return t5(y,B)});else console.log(`using cached ${y} with signature ${C}`);try{this.loaded=await n0[C]}catch(k){throw delete n0[C],k}this.blueprintLoaded(this.loaded)}return this.loaded}}var Dh=g4.elementCreator();class e5 extends ${static preferredTagName="tosi-loader";static lightStyleSpec=w4;allLoaded=()=>{};async load(){await q6(this,"tosi-blueprint, xin-blueprint","tosi-loader"),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var Hh=e5.elementCreator();class l6 extends g4{static preferredTagName="xin-blueprint";static lightStyleSpec=w4;constructor(){super();z1("xin-blueprint","<xin-blueprint> is deprecated. Use <tosi-blueprint> instead.")}}var vh=l6.elementCreator();class j6 extends ${static preferredTagName="xin-loader";static lightStyleSpec=w4;allLoaded=()=>{};constructor(){super();z1("xin-loader","<xin-loader> is deprecated. Use <tosi-loader> instead.")}async load(){await q6(this,"xin-blueprint","xin-loader"),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var Mh=j6.elementCreator();var y3={};class R2 extends ${static preferredTagName="tosi-ab";static set conditions(y){Object.assign(y3,y);for(let x of[...R2.instances])x.queueRender()}static initAttributes={condition:"",not:!1};static instances=new Set;connectedCallback(){super.connectedCallback(),R2.instances.add(this)}disconnectedCallback(){super.disconnectedCallback(),R2.instances.delete(this)}render(){if(this.condition!==""&&(this.not?y3[this.condition]!==!0:y3[this.condition]===!0))this.toggleAttribute("hidden",!1);else this.toggleAttribute("hidden",!0)}}var Sh=R2.elementCreator();var z4={};function S1(y,x){if(z4[y]===void 0){if(x!==void 0){let C=globalThis[x];z4[y]=Promise.resolve({[x]:C})}let h=U.script({src:y});document.head.append(h),z4[y]=new Promise((C)=>{h.onload=()=>C(globalThis)})}return z4[y]}var x3={};function q4(y){if(x3[y]===void 0){let x=U.link({rel:"stylesheet",type:"text/css",href:y});document.head.append(x),x3[y]=new Promise((h)=>{x.onload=h})}return x3[y]}var V2={blueprint:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,7.5,15.5,7.5,17.5 C7.5,19.5,10.5,19.5,10.5,19.5"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,14.5 C18.5,14.5,21.5,15.5,21.5,17.5 C21.5,19.5,18.5,19.5,18.5,19.5"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M7,5.09 C7,3.94,7.9,3,9,3 C9,3,20,3,20,3 C21.1,3,22,3.94,22,5.09 C22,5.09,22,12.41,22,12.41 C22,13.56,21.1,14.5,20,14.5 C20,14.5,9,14.5,9,14.5 C7.9,14.5,7,13.56,7,12.41 C7,12.41,7,5.09,7,5.09 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14.5,5.5 C14.5,5.5,14.5,11.5,14.5,11.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16.5,7.5 C16.5,7.5,16.5,8.5,16.5,8.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,7.5 C12.5,7.5,12.5,8.5,12.5,8.5"/><g/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,21.5 C18.5,21.5,17.5,20.5,17.5,20.5 C17.5,20.5,16.5,21.5,16.5,21.5"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,21.5 C12.5,21.5,11.5,20.5,11.5,20.5 C11.5,20.5,10.5,21.5,10.5,21.5"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,18.5,14.5,18.5,14.5 C18.5,14.5,18.5,19.5,18.5,19.5 C18.5,19.5,10.5,19.5,10.5,19.5 C10.5,19.5,10.5,14.5,10.5,14.5 z"/><g><g><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,16.5 C14,16.5,16,16.5,16,16.5 C16,16.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:evenodd;stroke:none;" d="M3.59,8.5 C3.59,8.5,12.59,8.5,12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5 C14.53,19.5,5.53,19.5,5.53,19.5 C5.53,19.5,3.59,8.5,3.59,8.5 z"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,11.12,11.5,11.12,11.5 C11.12,11.5,2.12,11.5,2.12,11.5 C2.12,11.5,3.59,8.5,3.59,8.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.12,11.5 C4.12,11.5,5.53,19.5,5.53,19.5"/></g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M9.24,12.5 C10.75,12.5,12.2,13.73,12.46,15.24 C12.46,15.24,12.46,15.24,12.46,15.24 C12.68,16.49,11.85,17.5,10.6,17.5 C10.6,17.5,10.55,17.5,10.55,17.5 C10.17,17.5,9.92,17.81,9.98,18.19 C9.98,18.19,9.98,18.19,9.98,18.19 C10.21,19.47,9.36,20.5,8.08,20.5 C8.08,20.5,6.39,20.5,6.39,20.5 C5.1,20.5,3.87,19.45,3.64,18.16 C3.64,18.16,3.12,15.21,3.12,15.21 C2.86,13.71,3.86,12.5,5.35,12.5 C5.35,12.5,9.24,12.5,9.24,12.5 z"/></g></g></svg> ',earth:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,13.46 C5.1,16.52,4,20.13,4,24 C4,31.81,8.47,38.57,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 z"/><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C20.18,4.28,22.06,4,24,4 C27.57,4,30.92,4.93,33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C33.81,42.07,29.13,44,24,44 C21.03,44,18.22,43.35,15.69,42.2 C15.69,42.2,27,29,27,29 C27,29,27,25,27,25 C27,25,21,23,21,23 C21,23,15,19,15,19 C15,19,11,19,11,19 C11,19,11,13,11,13 C11,13,13,11,13,11 C13,11,15,15,15,15 C15,15,17,15,17,15 C17,15,17,9,17,9 C17,9,18.4,4.79,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C18.4,4.79,17,9,17,9 C17,9,17,15,17,15 C17,15,15,15,15,15 C15,15,13,11,13,11 C13,11,11,13,11,13 C11,13,11,19,11,19 C11,19,15,19,15,19 C15,19,21,23,21,23 C21,23,27,25,27,25 C27,25,27,29,27,29 C27,29,15.69,42.2,15.69,42.2 C15.46,42.09,15.23,41.98,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 C9.57,9.32,13.62,6.19,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C41.43,35.23,44,29.91,44,24 C44,16.52,39.9,10,33.82,6.57 z"/></g></g></g></svg> ',cmy:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#00ff00;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#000000;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#02fefe;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#fffe00;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#ff00ff;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',rgb:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#ff00ff;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#ffff00;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#ffffff;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#00ffff;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#00ff00;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',xrColor:'<svg class="color filled" viewBox="0 0 40 24"><g><g><g><path style="fill:#000000;fill-rule:evenodd;" d="M20,2 C19.99,2,19.98,2,19.98,2 C8.39,2,2,3.61,2,12 C2,18.41,5.32,22,10.54,22 C15.77,22,17.37,17.85,19.98,17.85 C19.98,17.85,19.99,17.85,20,17.85 C20.01,17.85,20.02,17.85,20.02,17.85 C22.63,17.85,24.23,22,29.46,22 C34.68,22,38,18.41,38,12 C38,3.61,31.61,2,20.02,2 C20.02,2,20.01,2,20,2 C20,2,20,2,20,2 z"/></g><path style="fill:#fbed21;fill-rule:evenodd;" d="M12.2,19.84 C15.79,19.39,17.07,16.46,19.07,16.46 C19.07,16.46,19.08,16.46,19.09,16.46 C19.09,16.46,19.1,16.46,19.11,16.46 C19.44,16.46,19.75,16.54,20.06,16.68 C20.37,16.54,20.68,16.46,21.01,16.46 C21.02,16.46,21.02,16.46,21.03,16.46 C21.04,16.46,21.04,16.46,21.05,16.46 C23.05,16.46,24.33,19.39,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M12.2,19.84 C12.52,19.87,12.86,19.89,13.21,19.89 C16.86,19.89,18.37,17.43,20.06,16.68 C19.75,16.54,19.44,16.46,19.11,16.46 C19.1,16.46,19.09,16.46,19.09,16.46 C19.08,16.46,19.07,16.46,19.07,16.46 C17.07,16.46,15.79,19.39,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M20.06,3.35 C20.37,3.35,20.69,3.35,21.01,3.35 C21.02,3.35,21.02,3.35,21.03,3.35 C21.03,3.35,21.03,3.35,21.03,3.35 C21.04,3.35,21.04,3.35,21.05,3.35 C30.64,3.35,35.92,4.68,35.92,11.62 C35.92,16.92,33.18,19.89,28.86,19.89 C28.53,19.89,28.22,19.87,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C20.06,3.35,20.06,3.35,20.06,3.35 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M20.06,16.68 C21.74,17.43,23.25,19.89,26.91,19.89 C27.26,19.89,27.59,19.87,27.92,19.84 C24.33,19.39,23.05,16.46,21.05,16.46 C21.04,16.46,21.04,16.46,21.03,16.46 C21.02,16.46,21.02,16.46,21.01,16.46 C20.68,16.46,20.37,16.54,20.06,16.68 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M12.2,19.84 C11.9,19.87,11.59,19.89,11.26,19.89 C6.94,19.89,4.19,16.92,4.19,11.62 C4.19,4.68,9.48,3.35,19.07,3.35 C19.07,3.35,19.08,3.35,19.09,3.35 C19.09,3.35,19.09,3.35,19.09,3.35 C19.09,3.35,19.1,3.35,19.11,3.35 C19.43,3.35,19.75,3.35,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/></g><g><path style="fill:#8cc63e;fill-rule:nonzero;" d="M22.55,8.63 C22.55,9.05,22.55,9.46,22.55,9.88 C22.54,10.25,22.85,10.56,23.2,10.55 C23.54,10.56,23.85,10.25,23.85,9.88 C23.85,9.46,23.85,9.05,23.85,8.63 C23.85,8.26,23.54,7.95,23.2,7.96 C22.85,7.95,22.54,8.26,22.55,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M17.32,8.63 C17.32,9.05,17.32,9.46,17.32,9.88 C17.31,10.25,17.62,10.56,17.97,10.55 C18.31,10.56,18.62,10.25,18.62,9.88 C18.62,9.46,18.62,9.05,18.62,8.63 C18.62,8.26,18.31,7.95,17.97,7.96 C17.62,7.95,17.31,8.26,17.32,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M19.99,4.39 C19.99,8.09,19.99,11.8,19.99,15.5 C19.99,15.87,20.3,16.18,20.64,16.17 C20.99,16.18,21.3,15.87,21.29,15.5 C21.29,11.8,21.29,8.09,21.29,4.39 C21.3,4.02,20.99,3.71,20.64,3.72 C20.3,3.71,19.99,4.02,19.99,4.39 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M21.43,8.63 C21.43,9.05,21.43,9.46,21.43,9.88 C21.42,10.25,21.73,10.56,22.08,10.55 C22.42,10.56,22.73,10.25,22.73,9.88 C22.73,9.46,22.73,9.05,22.73,8.63 C22.73,8.26,22.42,7.95,22.08,7.96 C21.73,7.95,21.42,8.26,21.43,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M16.2,8.63 C16.2,9.05,16.2,9.46,16.2,9.88 C16.19,10.25,16.5,10.56,16.85,10.55 C17.19,10.56,17.5,10.25,17.5,9.88 C17.5,9.46,17.5,9.05,17.5,8.63 C17.5,8.26,17.19,7.95,16.85,7.96 C16.5,7.95,16.19,8.26,16.2,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M18.87,4.39 C18.87,8.09,18.87,11.8,18.87,15.5 C18.87,15.87,19.18,16.18,19.52,16.17 C19.86,16.18,20.18,15.87,20.17,15.5 C20.17,11.8,20.17,8.09,20.17,4.39 C20.18,4.02,19.86,3.71,19.52,3.72 C19.18,3.71,18.87,4.02,18.87,4.39 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M21.97,8.63 C21.97,9.05,21.97,9.46,21.97,9.88 C21.97,10.25,22.28,10.56,22.62,10.55 C22.97,10.56,23.28,10.25,23.27,9.88 C23.27,9.46,23.27,9.05,23.27,8.63 C23.28,8.26,22.97,7.95,22.62,7.96 C22.28,7.95,21.97,8.26,21.97,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M16.74,8.63 C16.74,9.05,16.74,9.46,16.74,9.88 C16.74,10.25,17.05,10.56,17.39,10.55 C17.74,10.56,18.05,10.25,18.04,9.88 C18.04,9.46,18.04,9.05,18.04,8.63 C18.05,8.26,17.74,7.95,17.39,7.96 C17.05,7.95,16.74,8.26,16.74,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M19.41,4.39 C19.41,8.09,19.41,11.8,19.41,15.5 C19.41,15.87,19.72,16.18,20.07,16.17 C20.41,16.18,20.72,15.87,20.72,15.5 C20.72,11.8,20.72,8.09,20.72,4.39 C20.72,4.02,20.41,3.71,20.07,3.72 C19.72,3.71,19.41,4.02,19.41,4.39 z"/></g></g></svg> ',tosiFavicon:'<svg class="color" viewBox="0 0 48 48"><g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M1,9 C1,4.58,4.58,1,9,1 C9,1,39,1,39,1 C43.42,1,47,4.58,47,9 C47,9,47,39,47,39 C47,43.42,43.42,47,39,47 C39,47,9,47,9,47 C4.58,47,1,43.42,1,39 C1,39,1,9,1,9 z"/><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,10,31,10,35 C10,39,16,39,16,39"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,29 C32,29,38,31,38,35 C38,39,32,39,32,39"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,10.18 C9,7.87,10.79,6,13,6 C13,6,35,6,35,6 C37.21,6,39,7.87,39,10.18 C39,10.18,39,24.82,39,24.82 C39,27.13,37.21,29,35,29 C35,29,13,29,13,29 C10.79,29,9,27.13,9,24.82 C9,24.82,9,10.18,9,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,43 C32,43,30,41,30,41 C30,41,28,43,28,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,43 C20,43,18,41,18,41 C18,41,16,43,16,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,32,29,32,29 C32,29,32,39,32,39 C32,39,16,39,16,39 C16,39,16,29,16,29 z"/></g></g></g></svg> ',tosiPlatform:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#3ea9f5;fill-rule:evenodd;stroke:none;" d="M23.97,47 C23.97,47,39,47,39,47 C43.42,47,47,43.42,47,39 C47,39,47,9,47,9 C47,4.58,43.42,1,39,1 C39,1,9,1,9,1 C4.58,1,1,4.58,1,9 C1,9,1,39,1,39 C1,41.64,2.28,43.98,4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:none;" d="M4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 C23.97,47,9,47,9,47 C7.22,47,5.58,46.42,4.25,45.44 z"/></g><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M35,35 C35,35,32.17,35,32.17,35 C32.17,35,32.17,37.83,32.17,37.83"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,39 C31,39,28.17,39,28.17,39 C28.17,39,28.17,41.83,28.17,41.83"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7.48,16 C4.45,16,2,18.45,2,21.48 C2,21.48,2,21.48,2,21.48 C2,23.98,4.02,26,6.52,26 C6.52,26,6.62,26,6.62,26 C7.38,26,8,26.62,8,27.38 C8,27.38,8,27.38,8,27.38 C8,29.93,10.07,32,12.62,32 C12.62,32,16,32,16,32 C18.58,32,20.68,29.91,20.68,27.32 C20.68,27.32,20.68,21.42,20.68,21.42 C20.68,18.43,18.25,16,15.26,16 C15.26,16,7.48,16,7.48,16 z"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,29 C17,29,33,29,33,29 C33,29,33,29,33,29 C33,34.52,28.52,39,23,39 C23,39,23,39,23,39 C19.69,39,17,36.31,17,33 C17,33,17,29,17,29 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40.52,16 C43.55,16,46,18.45,46,21.48 C46,21.48,46,21.48,46,21.48 C46,23.98,43.98,26,41.48,26 C41.48,26,41.38,26,41.38,26 C40.62,26,40,26.62,40,27.38 C40,27.38,40,27.38,40,27.38 C40,29.93,37.93,32,35.38,32 C35.38,32,32,32,32,32 C29.42,32,27.32,29.91,27.32,27.32 C27.32,27.32,27.32,21.42,27.32,21.42 C27.32,18.43,29.75,16,32.74,16 C32.74,16,40.52,16,40.52,16 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M6,10.18 C6,7.87,7.79,6,10,6 C10,6,32,6,32,6 C34.21,6,36,7.87,36,10.18 C36,10.18,36,24.82,36,24.82 C36,27.13,34.21,29,32,29 C32,29,10,29,10,29 C7.79,29,6,27.13,6,24.82 C6,24.82,6,10.18,6,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M21,11 C21,11,21,23,21,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M25,15 C25,15,25,17,25,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,15 C17,15,17,17,17,17"/></g></g></g></svg> ',tosiUi:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M3,33 C3,31.9,3.9,31,5,31 C5,31,43,31,43,31 C44.1,31,45,31.9,45,33 C45,33,45,43,45,43 C45,44.1,44.1,45,43,45 C43,45,5,45,5,45 C3.9,45,3,44.1,3,43 C3,43,3,33,3,33 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,35 C7,35,7,36.34,7,38 C7,39.66,8.34,41,10,41 C11.66,41,13,39.66,13,38 C13,36.34,13,35,13,35"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,35 C17,35,17,41,17,41"/></g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M38,33 C40.76,33,43,35.24,43,38 C43,40.76,40.76,43,38,43 C35.24,43,33,40.76,33,38 C33,35.24,35.24,33,38,33 z"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40,36 C40,36,36,40,36,40"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M36,36 C36,36,40,40,40,40"/></g></g><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21.01 C15.97,21.01,9.97,23.01,9.97,27.01 C9.97,31.01,15.97,31.01,15.97,31.01"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31.97,21.01 C31.97,21.01,37.97,23.01,37.97,27.01 C37.97,31.01,31.97,31.01,31.97,31.01"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,33 C31,33,29.49,31,29.49,31 C29.49,31,27.97,33,27.97,33"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M19.97,33 C19.97,33,17.97,31,17.97,31 C17.97,31,15.97,33,15.97,33"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21 C15.97,21,31.97,21,31.97,21 C31.97,21,31.97,31,31.97,31 C31.97,31,15.97,31,15.97,31 C15.97,31,15.97,21,15.97,21 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,7.18 C9,4.87,10.79,3,13,3 C13,3,35.02,3,35.02,3 C37.23,3,39.03,4.87,39.03,7.18 C39.03,7.18,39.03,21.82,39.03,21.82 C39.03,24.13,37.23,26,35.02,26 C35.02,26,13,26,13,26 C10.79,26,9,24.13,9,21.82 C9,21.82,9,7.18,9,7.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/></g></g></g></svg> ',tosiXr:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,5,15.25,5,17.25 C5,19.25,8,19.25,8,19.25"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,14.25 C16,14.25,19,15.25,19,17.25 C19,19.25,16,19.25,16,19.25"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.5,4.85 C4.5,3.69,5.4,2.75,6.5,2.75 C6.5,2.75,17.5,2.75,17.5,2.75 C18.61,2.75,19.5,3.69,19.5,4.85 C19.5,4.85,19.5,12.16,19.5,12.16 C19.5,13.32,18.61,14.25,17.5,14.25 C17.5,14.25,6.5,14.25,6.5,14.25 C5.4,14.25,4.5,13.32,4.5,12.16 C4.5,12.16,4.5,4.85,4.5,4.85 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12,5.25 C12,5.25,12,11.25,12,11.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,7.25 C14,7.25,14,8.25,14,8.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,7.25 C10,7.25,10,8.25,10,8.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,21.25 C16,21.25,15,20.25,15,20.25 C15,20.25,14,21.25,14,21.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,21.25 C10,21.25,9,20.25,9,20.25 C9,20.25,8,21.25,8,21.25"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,16,14.25,16,14.25 C16,14.25,16,19.25,16,19.25 C16,19.25,8,19.25,8,19.25 C8,19.25,8,14.25,8,14.25 z"/><path style="fill:#ff7bac;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-width:1;" d="M12,4 C12,4,11.99,4,11.99,4 C6.19,4,3,4.73,3,8.5 C3,11.39,4.66,13,7.27,13 C9.88,13,10.68,11.13,11.99,11.13 C11.99,11.13,12,11.13,12,11.13 C12,11.13,12.01,11.13,12.01,11.13 C13.32,11.13,14.12,13,16.73,13 C19.34,13,21,11.39,21,8.5 C21,4.73,17.81,4,12.01,4 C12.01,4,12,4,12,4 C12,4,12,4,12,4 z"/></g></svg> ',tosi:'<svg class="color" viewBox="0 0 48 48"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M38.35,31.7 C39.78,34.37,38.78,37.69,36.11,39.13 C36.11,39.13,36.11,39.13,36.11,39.13 C33.92,40.31,31.18,39.48,29.99,37.29 C29.99,37.29,29.95,37.2,29.95,37.2 C29.58,36.53,28.75,36.27,28.08,36.64 C28.08,36.64,28.08,36.64,28.08,36.64 C25.83,37.84,23.03,37,21.82,34.76 C21.82,34.76,20.22,31.78,20.22,31.78 C18.99,29.5,19.85,26.67,22.12,25.44 C22.12,25.44,27.32,22.65,27.32,22.65 C29.96,21.23,33.24,22.22,34.66,24.85 C34.66,24.85,38.35,31.7,38.35,31.7 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M10.65,31.7 C9.22,34.37,10.22,37.69,12.89,39.13 C12.89,39.13,12.89,39.13,12.89,39.13 C15.08,40.31,17.82,39.48,19.01,37.29 C19.01,37.29,19.05,37.2,19.05,37.2 C19.42,36.53,20.25,36.27,20.92,36.64 C20.92,36.64,20.92,36.64,20.92,36.64 C23.17,37.84,25.97,37,27.18,34.76 C27.18,34.76,28.78,31.78,28.78,31.78 C30.01,29.5,29.15,26.67,26.88,25.44 C26.88,25.44,21.68,22.65,21.68,22.65 C19.04,21.23,15.76,22.22,14.34,24.85 C14.34,24.85,10.65,31.7,10.65,31.7 z"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32.5,43 C32.5,43,30.5,41,30.5,41 C30.5,41,28.5,43,28.5,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,43 C20.5,43,18.5,41,18.5,41 C18.5,41,16.5,43,16.5,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16.5,29 C16.5,29,32.5,29,32.5,29 C32.5,29,32.5,36,32.5,36 C32.5,37.66,31.16,39,29.5,39 C29.5,39,19.5,39,19.5,39 C17.84,39,16.5,37.66,16.5,36 C16.5,36,16.5,29,16.5,29 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9.5,10.18 C9.5,7.87,11.29,6,13.5,6 C13.5,6,35.5,6,35.5,6 C37.71,6,39.5,7.87,39.5,10.18 C39.5,10.18,39.5,24.82,39.5,24.82 C39.5,27.13,37.71,29,35.5,29 C35.5,29,13.5,29,13.5,29 C11.29,29,9.5,27.13,9.5,24.82 C9.5,24.82,9.5,10.18,9.5,10.18 z"/><g><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24.5,11 C24.5,11,24.5,23,24.5,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28.5,15 C28.5,15,28.5,17,28.5,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,15 C20.5,15,20.5,17,20.5,17"/></g></g></g></svg> ',discord:'<svg class="filled" version="1" viewBox="0 0 1013 768"><path d="M858 64c-60-28-131-51-204-64l-5-1c-8 14-17 32-25 51l-1 4c-35-6-75-9-116-9s-81 3-120 9l4-1c-9-22-18-40-28-57l1 3c-79 14-149 36-214 67l5-2c-132 196-168 387-150 575v0c73 55 158 99 250 127l6 2c19-26 38-55 53-85l2-3c-33-13-62-27-89-43l2 1c7-5 14-11 21-16 75 36 163 57 256 57s181-21 260-59l-4 2c7 6 14 11 21 16-25 15-53 29-83 40l-4 1c17 34 36 63 56 90l-1-2c98-30 183-74 259-130l-2 2c21-218-36-407-151-575zM338 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101zM675 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101z"></path></svg> ',facebook:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>',game:'<svg class="filled" version="1" viewBox="0 0 704 512"><path d="M528 97v-1h-336c-88 0-160 72-160 160s72 160 160 160c52 0 99-25 128-64h64c29 39 76 64 128 64 88 0 160-72 160-160 0-83-63-151-144-159zM288 288h-64v64h-64v-64h-64v-64h64v-64h64v64h64v64zM480 288c-18 0-32-14-32-32s14-32 32-32 32 14 32 32-14 32-32 32zM576 288c-18 0-32-14-32-32 0-18 14-32 32-32s32 14 32 32c0 18-14 32-32 32z"></path></svg> ',google:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M256 0c-141 0-256 115-256 256s115 256 256 256 256-115 256-256-115-256-256-256zM260 448c-106 0-192-86-192-192s86-192 192-192c52 0 95 19 129 50l-52 50c-14-14-39-30-77-30-66 0-119 54-119 121s54 121 119 121c76 0 105-55 109-83h-109v-66h181c2 10 3 19 3 32 0 110-73 188-184 188z"></path></svg> ',npm:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M0 0v512h512v-512h-512zM416 416h-64v-256h-96v256h-160v-320h320v320z"></path></svg> ',youtube:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon></svg>',blog:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10.02 C21,10.02,21,15,21,15 C21,15.53,20.79,16.04,20.41,16.41 C20.04,16.79,19.53,17,19,17 C19,17,7,17,7,17 C5.67,18.33,4.33,19.67,3,21 C3,21,3,5,3,5 C3,4.47,3.21,3.96,3.59,3.59 C3.96,3.21,4.47,3,5,3 C8.53,3,10.49,3,14.02,3"/><path style="" d="M19,2 C19.54,1.46,20.32,1.25,21.05,1.45 C21.78,1.65,22.35,2.22,22.55,2.95 C22.75,3.68,22.54,4.46,22,5 C22,5,15.5,11.5,15.5,11.5 C14.17,11.83,12.83,12.17,11.5,12.5 C11.83,11.17,12.17,9.83,12.5,8.5 C15.67,5.33,15.83,5.17,19,2 z"/><path style="" d="M14.6,3"/><path style="" d="M21,8.77"/><path style="" d="M7,7 C7,7,10,7,10,7"/><path style="" d="M7,10 C7,10,9,10,9,10"/></g></svg> ',bug:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M8,6 C8,3.79,9.79,2,12,2 C14.21,2,16,3.79,16,6 C16,6,8,6,8,6 z"/><path style="" d="M20,7 C20,7,18,9,18,9"/><path style="" d="M20,19 C20,19,18,17,18,17"/><path style="" d="M21,13 C21,13,18,13,18,13"/><path style="" d="M16.44,9 C17.3,9,18,9.7,18,10.56 C18,10.56,18,15,18,15 C18,18.31,15.31,21,12,21 C8.69,21,6,18.31,6,15 C6,15,6,10.56,6,10.56 C6,9.7,6.7,9,7.56,9 C7.56,9,16.44,9,16.44,9 z"/><path style="" d="M4,7 C4,7,6,9,6,9"/><path style="" d="M4,19 C4,19,6,17,6,17"/><path style="" d="M3,13 C3,13,6,13,6,13"/><path style="" d="M12,12 C12,12,12,17,12,17"/></g></svg> ',activity:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>',airplay:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg>',alertCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertTriangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',alignCenter:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line></svg>',alignJustify:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="3" y2="18"></line></svg>',alignLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line></svg>',alignRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line></svg>',anchor:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="5" r="3"></circle><line x1="12" y1="22" x2="12" y2="8"></line><path d="M5 12H2a10 10 0 0 0 20 0h-3"></path></svg>',aperture:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line></svg>',archive:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line></svg>',arrowUpRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline></svg>',atSign:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path></svg>',award:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline></svg>',barChart2:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line></svg>',barChart:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="20" x2="12" y2="10"></line><line x1="18" y1="20" x2="18" y2="4"></line><line x1="6" y1="20" x2="6" y2="16"></line></svg>',batteryCharging:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19"></path><line x1="23" y1="13" x2="23" y2="11"></line><polyline points="11 6 7 12 13 12 9 18"></polyline></svg>',battery:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="6" width="18" height="12" rx="2" ry="2"></rect><line x1="23" y1="13" x2="23" y2="11"></line></svg>',bellOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',bell:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>',bluetooth:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6.5 6.5 17.5 17.5 12 23 12 1 17.5 6.5 6.5 17.5"></polyline></svg>',bold:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path></svg>',bookOpen:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg>',book:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>',bookmark:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path></svg>',box:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',briefcase:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path></svg>',calendar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>',cameraOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56"></path></svg>',camera:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle></svg>',cast:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line></svg>',checkCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>',checkSquare:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg>',check:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></svg>',chrome:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="21.17" y1="8" x2="12" y2="8"></line><line x1="3.95" y1="6.06" x2="8.54" y2="14"></line><line x1="10.88" y1="21.94" x2="15.46" y2="14"></line></svg>',circle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle></svg>',clipboard:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg>',clock:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>',cloudDrizzle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="19" x2="8" y2="21"></line><line x1="8" y1="13" x2="8" y2="15"></line><line x1="16" y1="19" x2="16" y2="21"></line><line x1="16" y1="13" x2="16" y2="15"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="12" y1="15" x2="12" y2="17"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudLightning:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9"></path><polyline points="13 11 9 17 15 17 11 23"></polyline></svg>',cloudOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',cloudRain:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16" y1="13" x2="16" y2="21"></line><line x1="8" y1="13" x2="8" y2="21"></line><line x1="12" y1="15" x2="12" y2="23"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudSnow:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25"></path><line x1="8" y1="16" x2="8.01" y2="16"></line><line x1="8" y1="20" x2="8.01" y2="20"></line><line x1="12" y1="18" x2="12.01" y2="18"></line><line x1="12" y1="22" x2="12.01" y2="22"></line><line x1="16" y1="16" x2="16.01" y2="16"></line><line x1="16" y1="20" x2="16.01" y2="20"></line></svg>',cloud:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path></svg>',code:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>',codepen:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line></svg>',codesandbox:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',coffee:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8h1a4 4 0 0 1 0 8h-1"></path><path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path><line x1="6" y1="1" x2="6" y2="4"></line><line x1="10" y1="1" x2="10" y2="4"></line><line x1="14" y1="1" x2="14" y2="4"></line></svg>',columns:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path></svg>',command:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"></path></svg>',compass:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon></svg>',copy:'<svg class="stroked" viewBox="0 0 24 24"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>',cpu:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line></svg>',creditCard:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line></svg>',crop:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6.13 1L6 16a2 2 0 0 0 2 2h15"></path><path d="M1 6.13L16 6a2 2 0 0 1 2 2v15"></path></svg>',crosshair:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="22" y1="12" x2="18" y2="12"></line><line x1="6" y1="12" x2="2" y2="12"></line><line x1="12" y1="6" x2="12" y2="2"></line><line x1="12" y1="22" x2="12" y2="18"></line></svg>',database:'<svg class="stroked" viewBox="0 0 24 24"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path></svg>',delete:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"></path><line x1="18" y1="9" x2="12" y2="15"></line><line x1="12" y1="9" x2="18" y2="15"></line></svg>',disc:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="3"></circle></svg>',divideCircle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line><circle cx="12" cy="12" r="10"></circle></svg>',divideSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line></svg>',divide:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="6" r="2"></circle><line x1="5" y1="12" x2="19" y2="12"></line><circle cx="12" cy="18" r="2"></circle></svg>',dollarSign:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path></svg>',downloadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="8 17 12 21 16 17"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"></path></svg>',download:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>',dribbble:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8.56 2.75c4.37 6.03 6.02 9.42 8.03 17.72m2.54-15.38c-3.72 4.35-8.94 5.66-16.88 5.85m19.5 1.9c-3.5-.93-6.63-.82-8.94 0-2.58.92-5.01 2.86-7.44 6.32"></path></svg>',droplet:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path></svg>',edit2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>',edit3:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 20h9"></path><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>',edit:'<svg class="stroked" viewBox="0 0 24 24"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg>',externalLink:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>',eyeOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',eye:'<svg class="stroked" viewBox="0 0 24 24"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>',fastForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 19 22 12 13 5 13 19"></polygon><polygon points="2 19 11 12 2 5 2 19"></polygon></svg>',feather:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line></svg>',figma:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z"></path><path d="M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z"></path><path d="M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z"></path><path d="M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z"></path><path d="M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z"></path></svg>',fileMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line></svg>',filePlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></svg>',fileText:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>',file:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg>',film:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line></svg>',filter:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon></svg>',flag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line></svg>',folderMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folderPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folder:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>',framer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></path></svg>',frown:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M16 16s-1.5-2-4-2-4 2-4 2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',gift:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path></svg>',gitBranch:'<svg class="stroked" viewBox="0 0 24 24"><line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg>',gitCommit:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg>',gitMerge:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M6 21V9a9 9 0 0 0 9 9"></path></svg>',gitPullRequest:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M13 6h3a2 2 0 0 1 2 2v7"></path><line x1="6" y1="9" x2="6" y2="21"></line></svg>',github:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>',gitlab:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path></svg>',globe:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>',grid:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg>',hardDrive:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="12" x2="2" y2="12"></line><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><line x1="6" y1="16" x2="6.01" y2="16"></line><line x1="10" y1="16" x2="10.01" y2="16"></line></svg>',hash:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line></svg>',headphones:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 18v-6a9 9 0 0 1 18 0v6"></path><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"></path></svg>',heart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>',helpCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',hexagon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg>',home:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>',image:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>',inbox:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12"></polyline><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path></svg>',info:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="7.75"></line></svg>',instagram:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line></svg>',italic:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line></svg>',key:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.78 7.78 5.5 5.5 0 0 1 7.78-7.78zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path></svg>',layers:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline></svg>',layout:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line></svg>',lifeBuoy:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line><line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line><line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line><line x1="14.83" y1="9.17" x2="18.36" y2="5.64"></line><line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line></svg>',link2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg>',link:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>',linkedin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>',list:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg>',loader:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',lock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg> ',logIn:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line></svg>',logOut:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>',mail:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>',mapPin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>',map:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"></polygon><line x1="8" y1="2" x2="8" y2="18"></line><line x1="16" y1="6" x2="16" y2="22"></line></svg>',maximize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',maximize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path></svg>',meh:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="15" x2="16" y2="15"></line><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',menu:'<svg class="stroked" viewBox="0 0 24 24"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>',messageCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path></svg>',messageSquare:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>',micOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',mic:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',minimize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',minimize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path></svg>',minusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line></svg>',monitor:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>',moon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>',moreHorizontal:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle></svg>',moreVertical:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle></svg>',mousePointer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg>',move:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line></svg>',music:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle></svg>',navigation2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 19 21 12 17 5 21 12 2"></polygon></svg>',navigation:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="3 11 22 2 13 21 11 13 3 11"></polygon></svg>',octagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon></svg>',package:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',paperclip:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"></path></svg>',pauseCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="10" y1="15" x2="10" y2="9"></line><line x1="14" y1="15" x2="14" y2="9"></line></svg>',pause:'<svg class="stroked" viewBox="0 0 24 24"><rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect></svg>',penTool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path><path d="M2 2l7.59 7.59"></path><circle cx="11" cy="11" r="2"></circle></svg>',percent:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle></svg>',phoneCall:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneForwarded:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="19 1 23 5 19 9"></polyline><line x1="15" y1="5" x2="23" y2="5"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneIncoming:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 2 16 8 22 8"></polyline><line x1="23" y1="1" x2="16" y2="8"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneMissed:'<svg class="stroked" viewBox="0 0 24 24"><line x1="23" y1="1" x2="17" y2="7"></line><line x1="17" y1="1" x2="23" y2="7"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"></path><line x1="23" y1="1" x2="1" y2="23"></line></svg>',phoneOutgoing:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 7 23 1 17 1"></polyline><line x1="16" y1="8" x2="23" y2="1"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phone:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',pieChart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path></svg>',playCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="10 8 16 12 10 16 10 8"></polygon></svg>',play:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>',plusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>',pocket:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 3h16a2 2 0 0 1 2 2v6a10 10 0 0 1-10 10A10 10 0 0 1 2 11V5a2 2 0 0 1 2-2z"></path><polyline points="8 10 12 14 16 10"></polyline></svg>',power:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>',printer:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg>',radio:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="2"></circle><path d="M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"></path></svg>',repeat:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg>',rewind:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 19 2 12 11 5 11 19"></polygon><polygon points="22 19 13 12 22 5 22 19"></polygon></svg>',cornerDownRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12"></path></svg>',cornerRightDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 15 15 20 20 15"></polyline><path d="M4 4h7a4 4 0 0 1 4 4v12"></path></svg>',cornerRightUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 9 15 4 20 9"></polyline><path d="M4 20h7a4 4 0 0 0 4-4V4"></path></svg>',cornerUpRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path></svg>',refreshCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>',rotateCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path></svg>',skipForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line></svg>',toggleRight:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="16" cy="12" r="3"></circle></svg>',rss:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>',save:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg>',scissors:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line></svg>',search:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',send:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>',server:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line></svg>',settings:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M4.78,6.75 C6.02,7.26,7.26,6.02,6.75,4.78 C6.75,4.78,6.24,3.57,6.24,3.57 C5.93,2.8,6.29,1.92,7.06,1.6 C7.06,1.6,8.14,1.15,8.14,1.15 C8.91,0.83,9.79,1.2,10.11,1.96 C10.11,1.96,10.61,3.18,10.61,3.18 C11.12,4.42,12.88,4.42,13.39,3.18 C13.39,3.18,13.89,1.97,13.89,1.97 C14.21,1.2,15.09,0.83,15.86,1.15 C15.86,1.15,16.94,1.6,16.94,1.6 C17.71,1.92,18.08,2.8,17.76,3.57 C17.76,3.57,17.15,5.03,17.15,5.03 C16.64,6.27,17.88,7.51,19.12,7 C19.12,7,20.51,6.42,20.51,6.42 C21.28,6.1,22.16,6.47,22.47,7.23 C22.47,7.23,22.92,8.32,22.92,8.32 C23.24,9.09,22.88,9.96,22.11,10.28 C22.11,10.28,21.07,10.71,21.07,10.71 C19.83,11.23,19.83,12.98,21.07,13.49 C21.07,13.49,22.04,13.89,22.04,13.89 C22.8,14.21,23.17,15.09,22.85,15.86 C22.85,15.86,22.4,16.94,22.4,16.94 C22.08,17.71,21.2,18.07,20.43,17.76 C20.43,17.76,19.22,17.25,19.22,17.25 C17.98,16.74,16.74,17.98,17.25,19.22 C17.25,19.22,17.76,20.43,17.76,20.43 C18.07,21.2,17.71,22.08,16.94,22.4 C16.94,22.4,15.86,22.85,15.86,22.85 C15.09,23.17,14.21,22.8,13.89,22.04 C13.89,22.04,13.39,20.82,13.39,20.82 C12.88,19.58,11.12,19.58,10.61,20.82 C10.61,20.82,10.11,22.04,10.11,22.04 C9.79,22.8,8.91,23.17,8.14,22.85 C8.14,22.85,7.06,22.4,7.06,22.4 C6.29,22.08,5.93,21.2,6.24,20.44 C6.24,20.44,6.64,19.47,6.64,19.47 C7.16,18.23,5.92,16.99,4.68,17.5 C4.68,17.5,3.64,17.93,3.64,17.93 C2.87,18.25,1.99,17.89,1.67,17.12 C1.67,17.12,1.22,16.04,1.22,16.04 C0.91,15.27,1.27,14.39,2.04,14.07 C2.04,14.07,3.43,13.49,3.43,13.49 C4.67,12.98,4.67,11.23,3.43,10.71 C3.43,10.71,1.96,10.11,1.96,10.11 C1.2,9.79,0.83,8.91,1.15,8.14 C1.15,8.14,1.6,7.06,1.6,7.06 C1.92,6.29,2.8,5.93,3.57,6.24 C3.57,6.24,4.78,6.75,4.78,6.75 z M14.31,11.04 C14.84,12.32,14.23,13.78,12.96,14.31 C11.68,14.84,10.22,14.23,9.69,12.96 C9.16,11.68,9.77,10.22,11.04,9.69 C12.32,9.16,13.78,9.77,14.31,11.04 z"/></g></svg> ',share2:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg>',share:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line></svg>',shieldOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19.69 14a6.9 6.9 0 0 0 .31-2V5l-8-3-3.16 1.18"></path><path d="M4.73 4.73L4 5v7c0 6 8 10 8 10a20.29 20.29 0 0 0 5.62-4.38"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',shield:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>',shoppingBag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path></svg>',shoppingCart:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>',shuffle:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line></svg>',sidebar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line></svg>',slack:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path><path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path><path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path><path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path><path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path><path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path><path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path><path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path></svg>',slash:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line></svg>',sliders:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line></svg>',smartphone:'<svg class="stroked" viewBox="0 0 24 24"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',smile:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',speaker:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><circle cx="12" cy="14" r="4"></circle><line x1="12" y1="6" x2="12.01" y2="6"></line></svg>',square:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect></svg>',star:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>',stopCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect></svg>',sun:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>',sunrise:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="2" x2="12" y2="9"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="8 6 12 2 16 6"></polyline></svg>',sunset:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="9" x2="12" y2="2"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="16 5 12 9 8 5"></polyline></svg>',table:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"></path></svg>',tablet:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',tag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line></svg>',target:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="6"></circle><circle cx="12" cy="12" r="2"></circle></svg>',terminal:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg>',thermometer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"></path></svg>',tool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path></svg>',trash2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>',trash:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',trello:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><rect x="7" y="7" width="3" height="9"></rect><rect x="14" y="7" width="3" height="5"></rect></svg>',trendingDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 18 13.5 8.5 8.5 13.5 1 6"></polyline><polyline points="17 18 23 18 23 12"></polyline></svg>',trendingUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline></svg>',triangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path></svg>',truck:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="3" width="15" height="13"></rect><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon><circle cx="5.5" cy="18.5" r="2.5"></circle><circle cx="18.5" cy="18.5" r="2.5"></circle></svg>',tv:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline></svg>',twitch:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path></svg>',twitter:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>',type:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line></svg>',umbrella:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7"></path></svg>',underline:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line></svg>',unlock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path></svg>',thumbsUp:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>',arrowRightCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg>',arrowRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>',chevronRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 18 15 12 9 6"></polyline></svg>',chevronsRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline></svg>',uploadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline></svg>',upload:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>',userCheck:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline></svg>',userMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userX:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line></svg>',user:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>',users:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>',videoOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',video:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>',voicemail:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="5.5" cy="11.5" r="4.5"></circle><circle cx="18.5" cy="11.5" r="4.5"></circle><line x1="5.5" y1="16" x2="18.5" y2="16"></line></svg>',volume1:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volume2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volumeX:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line></svg>',volume:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon></svg>',watch:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="7"></circle><polyline points="12 9 12 12 13.5 13.5"></polyline><path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"></path></svg>',wifiOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wifi:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wind:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path></svg>',xCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line></svg>',x:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',zapOff:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line></svg>',zap:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>',zoomIn:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',zoomOut:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',fontBold:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M13.5,11 C15.71,11,17.5,12.68,17.5,14.75 C17.5,16.82,15.71,18.5,13.5,18.5 C13.5,18.5,8.5,18.5,8.5,18.5 C8.5,18.5,8.5,3.5,8.5,3.5 C8.5,3.5,13.5,3.5,13.5,3.5 C15.71,3.5,17.5,5.18,17.5,7.25 C17.5,9.32,15.71,11,13.5,11 C13.5,11,13.5,11,13.5,11 z"/><path style="" d="M13.5,11 C13.5,11,8.5,11,8.5,11"/><path style="" d="M12.5,11 C14.71,11,16.5,12.68,16.5,14.75 C16.5,16.82,14.71,18.5,12.5,18.5 C12.5,18.5,7.5,18.5,7.5,18.5 C7.5,18.5,7.5,3.5,7.5,3.5 C7.5,3.5,12.5,3.5,12.5,3.5 C14.71,3.5,16.5,5.18,16.5,7.25 C16.5,9.32,14.71,11,12.5,11 C12.5,11,12.5,11,12.5,11 z"/><path style="" d="M12.5,11 C12.5,11,7.5,11,7.5,11"/></g></svg> ',fontItalic:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M17,4.5 C17,4.5,13,4.5,13,4.5"/><path style="" d="M11,19.5 C11,19.5,7,19.5,7,19.5"/><path style="" d="M15,4.5 C15,4.5,9,19.5,9,19.5"/></g></svg> ',fontUnderline:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M7.5,3.5 C7.5,3.5,7.5,10.74,7.5,13.5 C7.5,16.26,9.74,18.5,12.5,18.5 C15.26,18.5,17.5,16.26,17.5,13.5 C17.5,10.74,17.5,3.5,17.5,3.5"/><path style="" d="M7.5,21.5 C7.5,21.5,17.5,21.5,17.5,21.5"/></g></svg> ',indent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M2.5,9 C2.5,9,5.5,12,5.5,12 C5.5,12,2.5,15,2.5,15"/></g></svg> ',listBullet:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M5.5,5 C6.05,5,6.5,5.45,6.5,6 C6.5,6.55,6.05,7,5.5,7 C4.95,7,4.5,6.55,4.5,6 C4.5,5.45,4.95,5,5.5,5 z"/><path style="" d="M5.5,11 C6.05,11,6.5,11.45,6.5,12 C6.5,12.55,6.05,13,5.5,13 C4.95,13,4.5,12.55,4.5,12 C4.5,11.45,4.95,11,5.5,11 z"/><path style="" d="M5.5,17 C6.05,17,6.5,17.45,6.5,18 C6.5,18.55,6.05,19,5.5,19 C4.95,19,4.5,18.55,4.5,18 C4.5,17.45,4.95,17,5.5,17 z"/></g></svg> ',listNumber:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M4.5,5 C4.5,5,5.5,4,5.5,4 C5.5,4,5.5,8,5.5,8"/><path style="" d="M4.5,10 C4.5,10,5.5,10,5.5,10 C6.05,10,6.5,10.45,6.5,11 C6.5,11,6.5,11,6.5,11 C6.5,11.55,6.05,12,5.5,12 C5.5,12,5.5,12,5.5,12 C4.95,12,4.5,12.45,4.5,13 C4.5,13,4.5,14,4.5,14 C4.5,14,6.5,14,6.5,14"/><path style="" d="M4.5,16 C4.5,16,5.5,16,5.5,16 C6.05,16,6.5,16.45,6.5,17 C6.5,17,6.5,17,6.5,17 C6.5,17.55,6.05,18,5.5,18 C5.5,18,4.5,18,4.5,18 C4.5,18,5.5,18,5.5,18 C6.05,18,6.5,18.45,6.5,19 C6.5,19,6.5,19,6.5,19 C6.5,19.55,6.05,20,5.5,20 C5.5,20,4.5,20,4.5,20"/></g></svg> ',outdent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M5.5,9 C5.5,9,2.5,12,2.5,12 C2.5,12,5.5,15,5.5,15"/></g></svg> ',pin:'<svg class="stroked" viewBox="0 0 24 24"><g><g><path style="" d="M16.23,4.73 C16.23,4.73,19.42,7.9,19.42,7.9 C19.42,7.9,14.46,15.69,14.46,15.69 C14.46,15.69,8.45,9.68,8.45,9.68 C8.45,9.68,16.23,4.73,16.23,4.73 z"/><path style="" d="M20.84,9.32 C20.84,9.32,14.47,2.95,14.47,2.95"/><path style="" d="M16.6,17.8 C16.6,17.8,6.7,7.9,6.7,7.9"/><path style="" d="M10.23,11.44 C10.23,11.44,5.99,18.51,5.99,18.51 C5.99,18.51,13.06,14.27,13.06,14.27"/></g></g></svg> ',resize:'<svg class="stroked" version="1.1" viewBox="0, 0, 24, 24"><g><path d="M9,3 L3,3 L3,9"/><path d="M15,21 L21,21 L21,15"/><path d="M3,3 L10,10"/><path d="M21,21 L14,14"/></g></svg> ',sortAscending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,10.5 C16.5,10.5,7.5,10.5,7.5,10.5"/><path d="M14.5,6.5 C14.5,6.5,9.5,6.5,9.5,6.5"/><path d="M18.5,14.5 C18.5,14.5,5.5,14.5,5.5,14.5"/><path d="M20.5,18.5 C20.5,18.5,3.5,18.5,3.5,18.5"/></g></svg> ',sortDescending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,14.5 C16.5,14.5,7.5,14.5,7.5,14.5"/><path d="M14.5,18.5 C14.5,18.5,9.5,18.5,9.5,18.5"/><path d="M18.5,10.5 C18.5,10.5,5.5,10.5,5.5,10.5"/><path d="M20.5,6.5 C20.5,6.5,3.5,6.5,3.5,6.5"/></g></svg> ',cornerDownLeft:"cornerDownRight0f",cornerLeftDown:"cornerRightDown0f",cornerLeftUp:"cornerRightUp0f",cornerUpLeft:"cornerUpRight0f",refreshCcw:"refreshCw0f",rotateCcw:"rotateCw0f",skipBack:"skipForward0f",toggleLeft:"toggleRight0f",thumbsDown:"thumbsUp1f",arrowDownCircle:"arrowRightCircle90r",arrowLeftCircle:"arrowRightCircle180r",arrowUpCircle:"arrowRightCircle270r",arrowDown:"arrowRight90r",arrowLeft:"arrowRight180r",arrowUp:"arrowRight270r",chevronDown:"chevronRight90r",chevronLeft:"chevronRight180r",chevronUp:"chevronRight270r",chevronsDown:"chevronsRight90r",chevronsLeft:"chevronsRight180r",chevronsUp:"chevronsRight270r",arrowDownRight:"arrowUpRight90r",arrowDownLeft:"arrowUpRight180r",arrowUpLeft:"arrowUpRight270r"};var Ih=(y)=>{Object.assign(V2,y)},z0=(y,x,h,C)=>{let k=y instanceof SVGElement?[y]:Array.from(y.querySelectorAll("svg"));if(k.length>1){let z=y.dataset?.icon||"unknown";console.error(`svg2DataUrl: composite icon "${z}" cannot be serialized as a data URL, rendering base icon only`)}let B=k[0];B.setAttribute("xmlns","http://www.w3.org/2000/svg");for(let z of B.querySelectorAll("path, polygon, line, circle, rect, ellipse, polyline")){if(x!==void 0)z.setAttribute("fill",x);if(h!==void 0)z.setAttribute("stroke",h);if(C!==void 0)z.setAttribute("stroke-width",String(C))}let w=B.querySelectorAll("[style]");B.removeAttribute("style");for(let z of[...w]){let q=z.style;if(q.fill)z.setAttribute("fill",Y.fromCss(q.fill).html);if(q.stroke)z.setAttribute("stroke",Y.fromCss(q.stroke).html);if(q.strokeWidth)z.setAttribute("strokeWidth",q.strokeWidth);if(q.strokeLinecap)z.setAttribute("strokeLinecap",q.strokeLinecap);if(q.strokeLinejoin)z.setAttribute("strokeLinejoin",q.strokeLinejoin);z.removeAttribute("style")}return`url(data:image/svg+xml;charset=UTF-8,${encodeURIComponent(B.outerHTML)})`},bh=(y)=>/\d$/.test(y)?y+"_":y,C3=[{prefix:/^spin(_?\d+)/,apply(y,x,h){let C=x[1].replace("_","-"),k=360/Math.abs(parseFloat(C)),B=C.startsWith("-")?"reverse":"normal",w=y2(y,[]),g=w;if(g.animate){let z=g.style.transform||"";g.animate([{transform:`${z} rotate(0deg)`},{transform:`${z} rotate(360deg)`}],{duration:k*1000,iterations:1/0,direction:B})}return k3(y,h,w)}},{prefix:"un",apply:(y)=>`slash25o$${y}75s75o`},{prefix:"check",apply:(y)=>`check75o_00aa00S$${y}75s50o`},{prefix:"cancel",apply:(y)=>`x75o_cc0000S$${y}75s50o`},{prefix:"search",apply:(y)=>`search80s30x30y$${y}50o`}],Th=0;function V6(y,x){let h=U.div();h.innerHTML=y;let C=h.querySelector("svg"),k=C.querySelectorAll("[id]");if(k.length>0){let g=new Map;for(let j of k){let V=j.id,A=`tosi_svg_id_${++Th}`;g.set(V,A),j.id=A}let z=C.innerHTML,q=z;for(let[j,V]of g){let A=j.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");q=q.replace(new RegExp(`url\\(#${A}\\)`,"g"),`url(#${V})`).replace(new RegExp(`href="#${A}"`,"g"),`href="#${V}"`)}if(q!==z)C.innerHTML=q}let B=new Set(C.classList);B.add("tosi-icon");let w=k4.svg({class:Array.from(B).join(" "),viewBox:C.getAttribute("viewBox")},...x,...C.children);if(w.style.strokeWidth=_.tosiIconStrokeWidth("2px"),B.has("filled"))w.style.stroke="none",w.style.fill="currentColor";else if(B.has("stroked"))w.style.stroke=_.tosiIconStroke("currentColor"),w.style.fill=_.tosiIconFill("none");else w.style.stroke=_.tosiIconStroke("currentColor"),w.style.fill=_.tosiIconFill("currentColor");return w.style.height=_.tosiIconSize("16px"),w}function k3(y,x,...h){let C=U.span({class:"tosi-icon-composite",dataIcon:y,style:{display:"inline-flex",position:"relative",pointerEvents:"none"}},...h);for(let k of x)if(k&&typeof k==="object"&&!("nodeType"in k)){let B=k;if(B.style&&typeof B.style==="object")Object.assign(C.style,B.style);if(B.class)C.classList.add(...String(B.class).split(" "))}return C}function ph(y){let x=V2;if(x[y])return!0;let h=h3(y);return h!=null&&!!x[h.baseName]}function X6(y,x){for(let h of C3){let C,k;if(h.prefix instanceof RegExp){let w=new RegExp(h.prefix.source+"(.+)$"),g=y.match(w);if(!g)continue;C=g[g.length-1],C=C[0].toLowerCase()+C.slice(1),k=g}else{if(!y.startsWith(h.prefix)||y.length<=h.prefix.length)continue;C=y[h.prefix.length].toLowerCase()+y.slice(h.prefix.length+1),k=h.prefix}if(!ph(C))continue;let B=h.apply(bh(C),k,x);if(typeof B==="string")return y2(B,x);if(B)return B}return null}var Lh=10,ch=/(?:(?<=[a-zA-Z_])(?:_?\d+[osxyr]|[01]f|\d+W)|_[a-zA-Z0-9]+[FS])+$/;function h3(y){let x=y.match(ch);if(!x)return null;let h=y.slice(0,x.index);if(!h)return null;if(h.endsWith("_"))h=h.slice(0,-1);if(!h)return null;if(!V2[h]){if(!C3.some((z)=>{if(z.prefix instanceof RegExp)return z.prefix.test(h);return h.startsWith(z.prefix)&&h.length>z.prefix.length}))return null}let k={},B=x[0].match(/_?\d+[osxyr]|[01]f|_[a-zA-Z0-9]+[FS]|\d+W/g);if(!B)return null;let w=[];for(let g of B){let z=g[g.length-1];if(z==="F"||z==="S"){let q=g.slice(1,-1),V=/^[0-9a-fA-F]{3,8}$/.test(q)?"#"+q:l[q];if(z==="F")k.fill=V;else k.stroke=V}else if(z==="W")k.strokeWidth=g.slice(0,-1);else{let q=parseInt(g.replace("_","-"));switch(z){case"o":k.opacity=String(q/100);break;case"s":w.push(`scale(${q/100})`);break;case"x":w.push(`translateX(${q}%)`);break;case"y":w.push(`translateY(${q}%)`);break;case"r":w.push(`rotate(${q}deg)`);break;case"f":w.push(q===0?"scaleX(-1)":"scaleY(-1)");break}}}if(w.length>0)k.transform=w.join(" "),k.transformOrigin="50% 50%";return{baseName:h,style:k}}function y2(y,x){if(y.endsWith("_"))y=y.slice(0,-1);let h=V2,C=y;for(let w=0;w<Lh;w++){let g=h[C];if(!g)break;if(g.startsWith("<"))return V6(g,x);C=g}if(C!==y){let w=X6(C,x);if(w)return w;let g=h3(C);if(g){let z=y2(g.baseName,x);return Object.assign(z.style,g.style),z}}if(y.includes("$")){let w=y.split("$"),g=y2(w[w.length-1],[]),z=w.slice(0,-1).reverse().map((q)=>{let j=y2(q,[]);return Object.assign(j.style,{position:"absolute",inset:"0",width:"100%",height:"100%"}),j});return k3(y,x,g,...z)}let k=X6(y,x);if(k)return k;let B=h3(y);if(B){let w=y2(B.baseName,x);return Object.assign(w.style,B.style),w}if(y)console.warn(`icon ${y} does not exist`);return V6(V2.square,x)}var Q=new Proxy(V2,{get(y,x){return(...h)=>y2(x,h)}});class B3 extends ${static preferredTagName="tosi-icon";static lightStyleSpec={":host":{"--tosi-icon-size":"var(--xin-icon-size, 16px)","--tosi-icon-stroke-width":"var(--xin-icon-stroke-width, var(--icon-stroke-width, 2px))","--tosi-icon-stroke-linejoin":"var(--icon-stroke-linejoin, round)","--tosi-icon-stroke-linecap":"var(--icon-stroke-linecap, round)","--tosi-icon-fill":"var(--xin-icon-fill, var(--icon-fill, none))",display:"inline-flex",verticalAlign:"text-bottom",stroke:"currentColor",strokeWidth:_.tosiIconStrokeWidth("2px"),strokeLinejoin:_.tosiIconStrokeLinejoin("round"),strokeLinecap:_.tosiIconStrokeLinecap("round"),fill:_.tosiIconFill("none"),height:l.tosiIconSize},":host svg, :host .tosi-icon-composite":{height:_.tosiIconSize("16px")}};static initAttributes={icon:"",size:0,fill:"",stroke:"",strokeWidth:1};render(){super.render(),this.textContent="";let y={};if(this.size)y.height=this.size+"px",this.style.setProperty("--tosi-icon-size",`${this.size}px`),this.style.setProperty("--xin-icon-size",`${this.size}px`);if(this.stroke)y.stroke=this.stroke,y.strokeWidth=this.strokeWidth;if(this.fill)y.fill=this.fill;this.append(Q[this.icon]({style:y}))}}var w3=B3.elementCreator();var _6=()=>{};function dh(y,x){if(!x||x.trim()==="transparent")return new y.Color4(0,0,0,0);let h=x.trim().replace(/^#/,"");if(h.length===3)h=h.split("").map((k)=>k+k).join("");if(h.length===6)h+="ff";let C=parseInt(h,16);if(Number.isNaN(C)||h.length!==8)return new y.Color4(0,0,0,1);return new y.Color4((C>>>24&255)/255,(C>>>16&255)/255,(C>>>8&255)/255,(C&255)/255)}class g3 extends ${static preferredTagName="tosi-3d";static initAttributes={src:"",clearColor:"",fov:1,heroLight:!1};babylonReady;BABYLON;static shadowStyleSpec={":host":{display:"block",position:"relative"},":host canvas":{width:"100%",height:"100%"},":host .babylonVRicon":{height:50,width:80,backgroundColor:"transparent",filter:"drop-shadow(0 0 4px #000c)",backgroundImage:z0(Q.xrColor()),backgroundPosition:"center",backgroundRepeat:"no-repeat",border:"none",borderRadius:5,borderStyle:"none",outline:"none",transition:"transform 0.125s ease-out"},":host .babylonVRicon:hover":{transform:"scale(1.1)"}};content=U.canvas({part:"canvas"});constructor(){super();this.babylonReady=(async()=>{let{BABYLON:y}=await S1("https://cdn.babylonjs.com/babylon.js","BABYLON");return y})()}scene;engine;sceneCreated=_6;update=_6;_update=()=>{if(this.scene){if(this.update!==void 0)this.update(this,this.BABYLON);if(this.scene.activeCamera!==void 0)this.scene.render()}};handleResize(){if(this.engine)this.engine.resize()}loadScene=async(y,x,h)=>{let{BABYLON:C}=await S1("https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js","BABYLON");C.SceneLoader.Append(y,x,this.scene,h)};loadUI=async(y)=>{let{BABYLON:x}=await S1("https://cdn.babylonjs.com/gui/babylon.gui.min.js","BABYLON"),h=x.GUI.AdvancedDynamicTexture.CreateFullscreenUI("GUI",!0,this.scene),{snippetId:C,jsonUrl:k,data:B,size:w}=y;if(w)h.idealWidth=w,h.renderAtIdealSize=!0;let g;if(C)g=await h.parseFromSnippetAsync(C);else if(k)g=await h.parseFromURLAsync(k);else if(B)g=h.parseContent(B);else return null;let z=h.getChildren()[0],q=z.children.reduce((j,V)=>{return j[V.name]=V,j},{});return{advancedTexture:h,gui:g,root:z,widgets:q}};connectedCallback(){super.connectedCallback();let{canvas:y}=this.parts;this.babylonReady.then(async(x)=>{this.BABYLON=x;let h=this.clearColor?dh(x,this.clearColor):null;if(this.engine=new x.Engine(y,!0,h&&h.a<1?{alpha:!0,premultipliedAlpha:!1}:void 0),this.scene=new x.Scene(this.engine),h)this.scene.clearColor=h;if(this.sceneCreated)await this.sceneCreated(this,x);if(this.src){let C=this.src.lastIndexOf("/");await this.loadScene(this.src.slice(0,C+1)||"/",this.src.slice(C+1))}if(this.scene.activeCamera===void 0)new x.ArcRotateCamera("default-camera",-Math.PI/2,Math.PI/2.5,3,new x.Vector3(0,0,0),this.scene).attachControl(this.parts.canvas,!0);if(this.fov&&this.fov!==1&&this.scene.activeCamera)this.scene.activeCamera.fov*=this.fov;if(this.scene.lights.length===0){let C=new x.HemisphericLight("hemi",new x.Vector3(0,1,0),this.scene);C.intensity=0.6}if(this.heroLight){let C=new x.DirectionalLight("hero",new x.Vector3(-1,-2,1),this.scene);C.intensity=0.8}this.engine.runRenderLoop(this._update)})}}var fh=g3.elementCreator();class D2 extends ${static preferredTagName="tosi-lottie";static initAttributes={src:"",json:""};content=null;config={renderer:"svg",loop:!0,autoplay:!0};static bodymovinAvailable;animation;static shadowStyleSpec={":host":{width:400,height:400,display:"inline-block"}};_loading=!1;get loading(){return this._loading}constructor(){super();if(D2.bodymovinAvailable===void 0)D2.bodymovinAvailable=S1("https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js","bodymovin")}doneLoading=()=>{this._loading=!1};load=({bodymovin:y})=>{if(this._loading=!0,this.config.container=this.shadowRoot!==null?this.shadowRoot:void 0,this.json!=="")this.config.animationData=this.json,delete this.config.path;else if(this.src!=="")delete this.config.animationData,this.config.path=this.src;else console.log("%c<tosi-lottie>%c expected either %cjson%c (animation data) or %csrc% c(url) but found neither.","color: #44f; background: #fff; padding: 0 5px","color: default","color: #44f; background: #fff; padding: 0 5px","color: default","color: #44f; background: #fff; padding: 0 5px","color: default");if(this.animation){this.animation.destroy();let x=this.shadowRoot;if(x!==null)x.querySelector("svg")?.remove()}this.animation=y.loadAnimation(this.config),this.animation.addEventListener("DOMLoaded",this.doneLoading)};render(){super.render(),D2.bodymovinAvailable.then(this.load).catch((y)=>{console.error(y)})}}var sh=D2.elementCreator();var{button:z3,slot:uh,div:l4}=U;class j4 extends ${static preferredTagName="tosi-carousel";static initAttributes={dots:!1,arrows:!1,maxVisibleItems:1,snapDuration:0.25,snapDelay:0.1,loop:!1,auto:0};lastAutoAdvance=Date.now();interval;autoAdvance=()=>{if(this.auto>0&&this.auto*1000<Date.now()-this.lastAutoAdvance)this.forward()};_page=0;get page(){return this._page}set page(y){let{scroller:x,back:h,forward:C}=this.parts;if(this.lastPage<=0)C.disabled=h.disabled=!0,y=0;else y=Math.max(0,Math.min(this.lastPage,y)),y=isNaN(y)?0:y;if(this._page!==y)this._page=isNaN(y)?0:y,this.animateScroll(this._page*x.offsetWidth),h.disabled=this.page<=0&&!this.loop,C.disabled=this.page>=this.lastPage&&!this.loop}get visibleItems(){return[...this.children].filter((y)=>getComputedStyle(y).display!=="none")}get lastPage(){return Math.max(Math.ceil(this.visibleItems.length/(this.maxVisibleItems||1))-1,0)}static shadowStyleSpec={":host":{_carouselIconSize:24,_carouselButtonColor:"#0004",_carouselButtonHoverColor:"#0006",_carouselButtonActiveColor:"#000c",_carouseButtonWidth:48,_carouselDotCurrentColor:"#0008",_carouselDotSize:8,_carouselDotSpacing:l.carouselDotSize,_carouselProgressPadding:12,_carouselDotTransition:"0.125s ease-in-out",display:"flex",flexDirection:"column",position:"relative"},":host:focus":{outline:"none",boxShadow:"none"},":host svg":{height:l.carouselIconSize},":host button":{outline:"none",border:"none",boxShadow:"none",background:"transparent",color:l.carouselButtonColor,padding:0},":host::part(back), :host::part(forward)":{position:"absolute",top:0,bottom:0,width:l.carouseButtonWidth,zIndex:2},":host::part(back)":{left:0},":host::part(forward)":{right:0},":host button:disabled":{opacity:0.5,pointerEvents:"none"},":host button:hover":{color:l.carouselButtonHoverColor},":host button:active":{color:l.carouselButtonActiveColor},":host::part(pager)":{position:"relative"},":host::part(scroller)":{overflow:"auto hidden",position:"relative"},":host::part(grid)":{display:"grid",justifyItems:"center"},":host *::-webkit-scrollbar, *::-webkit-scrollbar-thumb":{display:"none"},":host .dot":{background:l.carouselButtonColor,borderRadius:l.carouselDotSize,height:l.carouselDotSize,width:l.carouselDotSize,transition:l.carouselDotTransition},":host .dot:not(.current):hover":{background:l.carouselButtonHoverColor,height:l.carouselDotSize150,width:l.carouselDotSize150,margin:l.carouselDotSize_25},":host .dot:not(.current):active":{background:l.carouselButtonActiveColor},":host .dot.current":{background:l.carouselDotCurrentColor},":host::part(progress)":{display:"flex",gap:l.carouselDotSpacing,justifyContent:"center",padding:l.carouselProgressPadding}};easing=(y)=>{return Math.sin(y*Math.PI*0.5)};indicateCurrent=()=>{let{scroller:y,progress:x}=this.parts,h=y.scrollLeft/y.offsetWidth;[...x.children].forEach((C,k)=>{C.classList.toggle("current",Math.floor(k/this.maxVisibleItems-h)===0)}),this.lastAutoAdvance=Date.now(),clearTimeout(this.snapTimer),this.snapTimer=setTimeout(this.snapPosition,this.snapDelay*1000)};snapPosition=()=>{let{scroller:y}=this.parts,x=Math.round(y.scrollLeft/y.offsetWidth);if(x!==this.page)this.page=x>this.page?Math.ceil(x):Math.floor(x);this.lastAutoAdvance=Date.now()};back=()=>{this.page=this.page>0?this.page-1:this.lastPage};forward=()=>{this.page=this.page<this.lastPage?this.page+1:0};handleDotClick=(y)=>{let{progress:x}=this.parts,h=[...x.children].indexOf(y.target);if(h>-1)this.page=Math.floor(h/this.maxVisibleItems)};snapTimer;animationFrame;animateScroll(y,x=-1,h=0){cancelAnimationFrame(this.animationFrame);let{scroller:C}=this.parts;if(x===-1){x=C.scrollLeft,h=Date.now(),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)});return}let k=(Date.now()-h)/1000;if(k>=this.snapDuration||Math.abs(C.scrollLeft-y)<2)C.scrollLeft=y,this.animationFrame=null;else C.scrollLeft=x+this.easing(k/this.snapDuration)*(y-x),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)})}content=()=>[l4({part:"pager"},z3({title:"previous slide",part:"back"},Q.chevronLeft()),l4({title:"slides",role:"group",part:"scroller"},l4({part:"grid"},uh())),z3({title:"next slide",part:"forward"},Q.chevronRight())),l4({title:"choose slide to display",role:"group",part:"progress"})];connectedCallback(){super.connectedCallback(),this.ariaRoleDescription="carousel",this.ariaOrientation="horizontal",this.ariaReadOnly="true";let{back:y,forward:x,scroller:h,progress:C}=this.parts;y.addEventListener("click",this.back),x.addEventListener("click",this.forward),h.addEventListener("scroll",this.indicateCurrent),C.addEventListener("click",this.handleDotClick),this.lastAutoAdvance=Date.now(),this.interval=setInterval(this.autoAdvance,100)}disconnectedCallback(){clearInterval(this.interval)}render(){super.render();let{dots:y,arrows:x,visibleItems:h,lastPage:C}=this,{progress:k,back:B,forward:w,grid:g}=this.parts;h.forEach((z)=>{z.role="group"}),g.style.gridTemplateColumns=`${100/this.maxVisibleItems/(1+this.lastPage)}% `.repeat(h.length).trim(),g.style.width=(1+this.lastPage)*100+"%",k.textContent="",k.append(...h.map((z,q)=>z3({title:`item ${q+1}`,class:"dot"}))),this.indicateCurrent(),k.style.display=y&&C>0?"":"none",B.hidden=w.hidden=!(x&&C>0)}}var rh=j4,A6=j4.elementCreator(),mh=A6;var{div:K6,span:P6}=U;function G6(y,x){let h=y.split(`
|
|
14
14
|
`),C=x.split(`
|
|
15
|
-
`),l=h.length,i=C.length,k=Array.from({length:l+1},()=>Array(i+1).fill(0));for(let q=l-1;q>=0;q-=1)for(let j=i-1;j>=0;j-=1)k[q][j]=h[q]===C[j]?k[q+1][j+1]+1:Math.max(k[q+1][j],k[q][j+1]);let g=[],w=0,B=0;while(w<l&&B<i)if(h[w]===C[B])g.push({op:"context",text:h[w]}),w+=1,B+=1;else if(k[w+1][B]>=k[w][B+1])g.push({op:"remove",text:h[w]}),w+=1;else g.push({op:"add",text:C[B]}),B+=1;while(w<l)g.push({op:"remove",text:h[w]}),w+=1;while(B<i)g.push({op:"add",text:C[B]}),B+=1;return g}var dh={context:" ",add:"+",remove:"-"};class g3 extends F{static preferredTagName="tosi-diff";static initAttributes={original:"",modified:""};static shadowStyleSpec={":host":{display:"block",overflow:"auto",font:"var(--tosi-code-font, 12px/1.5 monospace)",background:"var(--tosi-diff-bg, #fff)",color:"var(--tosi-diff-color, #222)"},":host([hidden])":{display:"none"},".diff-line":{display:"grid",gridTemplateColumns:"1.5em 1fr",whiteSpace:"pre-wrap",wordBreak:"break-word"},".diff-line .marker":{textAlign:"center",userSelect:"none",opacity:"0.5"},".diff-add":{background:"var(--tosi-diff-add-bg, #e6ffed)"},".diff-add .marker":{color:"var(--tosi-diff-add-color, #22863a)"},".diff-remove":{background:"var(--tosi-diff-remove-bg, #ffeef0)"},".diff-remove .marker":{color:"var(--tosi-diff-remove-color, #cb2431)"}};content=()=>[j6({part:"body"})];render(){super.render();let y=P6(this.original,this.modified);this.parts.body.replaceChildren(...y.map((x)=>j6({class:`diff-line diff-${x.op}`},V6({class:"marker"},dh[x.op]),V6({class:"text"},x.text===""?" ":x.text))))}}var w0=g3.elementCreator();var{div:_6}=G,A6=new Set,B0=(y,x)=>{if(A6.has(y))return;A6.add(y),console.warn(`<tosi-code>.${y} was removed in tosijs-ui 1.7 (the editor is now CodeMirror 6, not ACE) — ${x}. See CHANGELOG 1.7.0.`)},K6=!1,j4=!1;class o1 extends F{static preferredTagName="tosi-code";source="";_handle;_loadPromise;_loadGeneration=0;_appliedMode="";_appliedDisabled;_tjsAutocomplete;get tjsAutocomplete(){return this._tjsAutocomplete}set tjsAutocomplete(y){if(this._tjsAutocomplete=y,this._handle&&this.isTjsMode())this.applyTjsExtension()}get value(){return this._handle?this._handle.getValue():this.source}set value(y){if(this._handle)this._handle.setValue(y);else this.source=y}_original;get original(){return this._original??this.value}set original(y){this._original=y}diffOverlay;_pendingDiff;get showingDiff(){if(!this.hydrated)return this._pendingDiff??!1;return!this.parts.diffHost.hidden}showDiff(y){if(!this.hydrated){this._pendingDiff=y;return}let{diffHost:x}=this.parts;if(y){if(this.diffOverlay===void 0)this.diffOverlay=w0(),x.append(this.diffOverlay);this.diffOverlay.original=this.original,this.diffOverlay.modified=this.value}x.hidden=!y}static initAttributes={mode:"javascript",disabled:!1};role="code editor";get editor(){if(!K6)K6=!0,console.info("<tosi-code>.editor is the CodeMirror 6 EditorView (the supported accessor; it was an ACE editor in 1.6). ACE-era `editor.session` / `getSession()` / "+"`setOption()` are gone — use undo()/redo()/canUndo()/canRedo() for history.");return this._handle?.view}get theme(){return B0("theme","style the editor with --code-bg / --text-color instead"),""}set theme(y){B0("theme","style the editor with --code-bg / --text-color instead")}get options(){return B0("options","configure CodeMirror via the `editor` (EditorView) instead"),{}}set options(y){B0("options","configure CodeMirror via the `editor` (EditorView) instead")}get ace(){B0("ace","use `editor`, which is now a CodeMirror EditorView");return}undo(){this._handle?.undo()}redo(){this._handle?.redo()}canUndo(){return this._handle?.canUndo()??!1}canRedo(){return this._handle?.canRedo()??!1}content=()=>[_6({part:"host"}),_6({part:"diffHost",hidden:!0})];static shadowStyleSpec={":host":{display:"block",position:"relative",width:"100%",height:"100%"},'[part="host"]':{height:"100%"},'[part="diffHost"]':{position:"absolute",inset:"0",zIndex:"5",overflow:"auto",background:P.tosiDiffBg(P.background("#fff"))},".cm-editor":{height:"100%"},".cm-scroller":{outline:"none",fontFamily:"Menlo, Monaco, Consolas, 'Courier New', monospace"}};handleResize(){this._handle?.refresh()}connectedCallback(){if(super.connectedCallback(),this.source==="")this.value=this.textContent!==null?this.textContent.trim():"";if(this._pendingDiff!==void 0){let y=this._pendingDiff;this._pendingDiff=void 0,this.showDiff(y)}if(this._loadPromise===void 0){let y=++this._loadGeneration;this._loadPromise=import("./code-editor-cm-95n31m4f.js").then(({createCmEditor:x})=>{if(y!==this._loadGeneration||!this.isConnected)return;let h=x(this.parts.host,{value:this.source,mode:this.mode,readOnly:this.disabled,root:this.shadowRoot??void 0,onChange:(C)=>this.dispatchEvent(new CustomEvent("change",{detail:{value:C}}))});return this._handle=h,this._appliedMode=this.mode,this._appliedDisabled=this.disabled,this.applyTjsExtension(),h})}}disconnectedCallback(){if(super.disconnectedCallback(),this._handle)this.source=this._handle.getValue(),this._handle.destroy(),this._handle=void 0;this._loadPromise=void 0,this._appliedMode="",this._appliedDisabled=void 0}isTjsMode(){return this.mode==="tjs"||this.mode==="ajs"}applyTjsExtension(){let y=this._handle;if(!y||!this.isTjsMode())return;import("./code-editor-cm-95n31m4f.js").then(({loadTjsExtension:x})=>x(this._tjsAutocomplete??{})).then((x)=>{if(x&&this._handle===y&&this.isTjsMode()){y.setLanguageExtension(x),this._tjsExtensionApplied=!0;return}if(!x&&this._handle===y&&this.isTjsMode()&&!j4)j4=!0,console.warn(`<tosi-code mode="${this.mode}">: tjs-lang's CodeMirror extension did not load — `+"falling back to TypeScript highlighting (no tjs autocomplete). Install the optional peer `tjs-lang`, or check that tjs-lang/editors/codemirror still exports `tjsEditorExtension`.")}).catch((x)=>{if(!j4)j4=!0,console.warn("<tosi-code>: failed to apply the tjs extension —",x)})}get tjsExtensionApplied(){return this._tjsExtensionApplied}_tjsExtensionApplied=!1;render(){if(super.render(),this._handle){if(this.disabled!==this._appliedDisabled)this._handle.setReadOnly(this.disabled),this._appliedDisabled=this.disabled;if(this.mode!==this._appliedMode)this._handle.setMode(this.mode),this._appliedMode=this.mode,this.applyTjsExtension()}}}var n1=o1.elementCreator();var{input:w3}=G,U6=X.fromCss("#8888");class G6 extends F{static preferredTagName="tosi-color";value=U6.rgba;color=U6;static shadowStyleSpec={":host":{_gap:8,_swatchSize:32,_cssWidth:72,_alphaWidth:72,display:"inline-flex",gap:z.gap,alignItems:"center"},':host input[type="color"]':{border:0,width:z.swatchSize,height:z.swatchSize,background:"transparent"},":host::part(alpha)":{width:z.alphaWidth},":host::part(css)":{width:z.cssWidth,fontFamily:"monospace"}};content=[w3({title:"base color",type:"color",part:"rgb"}),w3({type:"range",title:"opacity",part:"alpha",min:0,max:1,step:0.05}),w3({title:"css color spec",part:"css"})];valueChanged=!1;update=(y)=>{let{rgb:x,alpha:h,css:C}=this.parts;if(y.type==="input")this.color=X.fromCss(x.value),this.color.a=Number(h.value),C.value=this.color.html;else this.color=X.fromCss(C.value),x.value=this.color.html.substring(0,7),h.value=String(this.color.a);x.style.opacity=String(this.color.a),this.value=this.color.rgba,this.valueChanged=!0};connectedCallback(){super.connectedCallback();let{rgb:y,alpha:x,css:h}=this.parts;y.addEventListener("input",this.update),x.addEventListener("input",this.update),h.addEventListener("change",this.update)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{rgb:y,alpha:x,css:h}=this.parts;this.color=X.fromCss(this.value),y.value=this.color.html.substring(0,7),y.style.opacity=String(this.color.a),x.value=String(this.color.a),h.value=this.color.html}}var B3=G6.elementCreator();var y2=G.div({style:{content:" ",position:"fixed",top:0,left:0,right:0,bottom:0}}),V4={passive:!0},P1=(y,x,h="move")=>{if(!y.type.startsWith("touch")){let{clientX:l,clientY:i}=y;y2.style.cursor=h,x2(y2),document.body.append(y2);let k=(g)=>{let w=g.clientX-l,B=g.clientY-i;if(x(w,B,g)===!0)y2.removeEventListener("mousemove",k),y2.removeEventListener("mouseup",k),y2.remove()};y2.addEventListener("mousemove",k,V4),y2.addEventListener("mouseup",k,V4)}else if(y instanceof TouchEvent){let l=y.changedTouches[0],i=l.identifier,k=l.clientX,g=l.clientY,w=y.target,B=0,q=0,j=(_)=>{let K=[..._.touches].find((U)=>U.identifier===i);if(K!==void 0)B=K.clientX-k,q=K.clientY-g;if(_.type==="touchmove")_.stopPropagation(),_.preventDefault();if(x(B,q,_)===!0||K===void 0)w.removeEventListener("touchmove",j),w.removeEventListener("touchend",j),w.removeEventListener("touchcancel",j)};w.addEventListener("touchmove",j),w.addEventListener("touchend",j,V4),w.addEventListener("touchcancel",j,V4)}},P2=(y="body *")=>[...document.querySelectorAll(y)].map((x)=>parseFloat(getComputedStyle(x).zIndex)).reduce((x,h)=>isNaN(x)||Number(x)<h?h:Number(x),0),x2=(y,x="body *")=>{y.style.zIndex=String(P2(x)+1)};function P4(y,x=!0){return(h,C)=>{let l=y(h),i=y(C);for(let k in l)if(l[k]!==i[k])return(Array.isArray(x)?x[k]!==!1:x)?l[k]>i[k]?1:-1:l[k]>i[k]?-1:1;return 0}}var{slot:Lh}=G;class f1 extends F{static preferredTagName="tosi-float";static floats=new Set;static initAttributes={drag:!1,remainOnResize:"remove",remainOnScroll:"remain"};content=Lh();static shadowStyleSpec={":host":{position:"fixed"}};reposition=(y)=>{if(y instanceof MouseEvent&&y.button!==0)return;if(y.target?.closest(".no-drag"))return;if(this.drag){x2(this);let h=this.offsetLeft,C=this.offsetTop;P1(y,(l,i,k)=>{if(this.style.left=`${h+l}px`,this.style.top=`${C+i}px`,this.style.right="auto",this.style.bottom="auto",k.type==="mouseup")return!0})}};connectedCallback(){super.connectedCallback(),nh(),f1.floats.add(this);let y={passive:!0};this.addEventListener("touchstart",this.reposition,y),this.addEventListener("mousedown",this.reposition,y),x2(this)}disconnectedCallback(){super.disconnectedCallback(),f1.floats.delete(this)}}var rh=f1,z0=f1.elementCreator(),oh=z0,F6=!1;function nh(){if(F6)return;F6=!0,window.addEventListener("resize",()=>{Array.from(f1.floats).forEach((y)=>{if(y.remainOnResize==="hide")y.hidden=!0;else if(y.remainOnResize==="remove")y.remove()})},{passive:!0}),document.addEventListener("scroll",(y)=>{if(y.target instanceof HTMLElement&&y.target.closest(f1.tagName))return;Array.from(f1.floats).forEach((x)=>{if(x.remainOnScroll==="hide")x.hidden=!0;else if(x.remainOnScroll==="remove")x.remove()})},{passive:!0,capture:!0})}var q0=(y)=>{let{content:x,target:h,position:C,remainOnScroll:l,remainOnResize:i,draggable:k}=y,g=Array.isArray(x)?z0(...x):z0(x);if(O6(g,h,C,l,i,k),y.class)g.setAttribute("class",y.class);return document.body.append(g),g},O6=(y,x,h,C,l,i=!1)=>{{let{position:U}=getComputedStyle(y);if(U!=="fixed")y.style.position="fixed";if(l)y.remainOnResize=l;if(C)y.remainOnScroll=C;x2(y)}y.drag=i;let{left:k,top:g,width:w,height:B}=x.getBoundingClientRect(),q=k+w*0.5,j=g+B*0.5,_=window.innerWidth,K=window.innerHeight;if(h==="side")h=(q<_*0.5?"e":"w")+(j<K*0.5?"s":"n");else if(h==="auto"||h===void 0)h=(j<K*0.5?"s":"n")+(q<_*0.5?"e":"w");if(y.style.top=y.style.left=y.style.right=y.style.bottom=y.style.transform="",h.length===2){let[U,Q]=h;switch(U){case"n":y.style.bottom=(K-g).toFixed(2)+"px";break;case"e":y.style.left=(k+w).toFixed(2)+"px";break;case"s":y.style.top=(g+B).toFixed(2)+"px";break;case"w":y.style.right=(_-k).toFixed(2)+"px";break}switch(Q){case"n":y.style.bottom=(K-g-B).toFixed(2)+"px";break;case"e":y.style.left=k.toFixed(2)+"px";break;case"s":y.style.top=g.toFixed(2)+"px";break;case"w":y.style.right=(_-k-w).toFixed(2)+"px";break}y.style.transform=""}else if(h==="n")y.style.bottom=(K-g).toFixed(2)+"px",y.style.left=q.toFixed(2)+"px",y.style.transform="translateX(-50%)";else if(h==="s")y.style.top=(g+B).toFixed(2)+"px",y.style.left=q.toFixed(2)+"px",y.style.transform="translateX(-50%)";else if(h==="e")y.style.left=(k+w).toFixed(2)+"px",y.style.top=j.toFixed(2)+"px",y.style.transform="translateY(-50%)";else if(h==="w")y.style.right=(_-k).toFixed(2)+"px",y.style.top=j.toFixed(2)+"px",y.style.transform="translateY(-50%)";y.style.setProperty("--max-height",`calc(100vh - ${y.style.top||y.style.bottom})`),y.style.setProperty("--max-width",`calc(100vw - ${y.style.left||y.style.right})`)};var W6=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||""),fh=W6?{meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",escape:"⎋"}:{meta:"Meta",ctrl:"Ctrl",alt:"Alt",shift:"Shift",escape:"Esc"},Q6=(y)=>{if(y.code)return y.code.replace(/^Key|^Digit/,"");return y.key},uh=(y)=>{let x=[];if(y.altKey)x.push("alt");if(y.ctrlKey)x.push("ctrl");if(y.metaKey)x.push("meta");if(y.shiftKey)x.push("shift");return x.push(Q6(y)),x.join("-")},Eh=[[/\^|ctrl-?/i,"ctrlKey"],[/⌘|meta-?/i,"metaKey"],[/⌥|⎇|alt-?|option-?/i,"altKey"],[/⇧|shift-?/i,"shiftKey"]],_4=(y)=>{let x=y.trim(),h={ctrlKey:!1,metaKey:!1,altKey:!1,shiftKey:!1,key:""};for(let[C,l]of Eh)if(C.test(x))h[l]=!0,x=x.replace(C,"");return x=x.replace(/^-+/,""),h.key=x.toLowerCase(),h},z3=(y,x)=>{let h=_4(x);return y.key.toLowerCase()===h.key&&y.metaKey===h.metaKey&&y.ctrlKey===h.ctrlKey&&y.altKey===h.altKey&&y.shiftKey===h.shiftKey},ah=(y)=>{let x=_4(y),h=[];if(x.altKey)h.push("alt");if(x.ctrlKey)h.push("ctrl");if(x.metaKey)h.push("meta");if(x.shiftKey)h.push("shift");return h.push(x.key),h.join("-")},A4=(y)=>{let x=_4(y);if(W6){let C=[];if(x.ctrlKey)C.push("⌃");if(x.altKey)C.push("⌥");if(x.shiftKey)C.push("⇧");if(x.metaKey)C.push("⌘");return C.push(x.key.toUpperCase()),C.join("")}let h=[];if(x.ctrlKey)h.push("Ctrl");if(x.altKey)h.push("Alt");if(x.shiftKey)h.push("Shift");if(x.metaKey)h.push("Meta");return h.push(x.key.toUpperCase()),h.join("+")};var U4={};c5(U4,{stringToTypes:()=>v2,isTypeAllowed:()=>R2,init:()=>V3,draggedElement:()=>xC});var mh=()=>!!document.querySelector(".drag-source"),R2=(y,x)=>{if(!y)return!1;for(let h of y)if(h==="special/any")return!0;else if(h.indexOf("*")>-1){let[C,l]=h.split("/"),[i,k]=x.split("/");if((C==="*"||C===i)&&(l==="*"||l===k))return!0}else if(h===x)return!0},K4=(y)=>{for(let x of[...document.querySelectorAll(`.${y}`)])x.classList.remove(y)},Y6=()=>{if(p2)p2.disconnect(),p2=null;q3=[],K4("drag-over"),K4("drag-source"),K4("drag-target")},v2=(y,x=";")=>{return(y||"").split(x).map((h)=>h.trim()).filter((h)=>h!=="")},q3=[],p2=null,j3=(y)=>{if(!y)y=[];q3=y;let x=[...document.querySelectorAll("[data-drop]")];for(let h of x){let C=v2(h.dataset.drop);if(y.find((l)=>R2(C,l)))h.classList.add("drag-target");else h.classList.remove("drag-target")}if(!p2)p2=new MutationObserver(()=>j3(q3)),p2.observe(document.body,{childList:!0,subtree:!0})};function th(y){let x=y.target?.closest('[draggable="true"],a[href]');if(!x)return;x.classList.add("drag-source");let h=x.matches('[draggable="true"]')?v2(x.dataset.drag||"text/html"):v2(x.dataset.drag||"url");for(let C of h){let l=x.dataset.dragContent||(C==="text/html"?x.innerHTML:x.textContent);y.dataTransfer?.setData(C,l||"")}j3(y.dataTransfer?.types),y.stopPropagation()}function X6(y){if(!mh())j3(y.dataTransfer?.types);let x=y.target.closest(".drag-target");if(x&&y.dataTransfer)x.classList.add("drag-over"),y.dataTransfer.dropEffect="copy";else y.preventDefault(),y.stopPropagation()}function eh(){K4("drag-over")}function yC(y){let x=y.target.closest(".drag-target");if(x){let h=(x.dataset?.drop||"").split(";");for(let C of h)if(R2(y.dataTransfer?.types,C))if(C==="text/html")x.innerHTML=y.dataTransfer?.getData(C)||"";else x.textContent=y.dataTransfer?.getData(C)||""}Y6()}var xC=()=>document.querySelector(".drag-source"),$6=!1,V3=()=>{if($6)return;document.body.addEventListener("dragstart",th),document.body.addEventListener("dragenter",X6),document.body.addEventListener("dragover",X6),document.body.addEventListener("drop",yC),document.body.addEventListener("dragleave",eh),document.body.addEventListener("dragend",Y6),window.addEventListener("dragover",(y)=>y.preventDefault()),window.addEventListener("drop",(y)=>y.preventDefault()),$6=!0};var G1=(y)=>typeof y==="function"?y():y,{div:N6,button:P0,span:E,a:hC,tosiSlot:CC}=G,v6=(y)=>{let x=[];for(let h of y)if(h===null){if(x.length>0&&x[x.length-1]!==null)x.push(h)}else x.push(h);while(x.length>0&&x[x.length-1]===null)x.pop();return x},V0=(y,x,h=!1)=>{let C=[];for(let l of y){if(l===null){C.push(l);continue}if(typeof l==="function"){C.push(l);continue}let{acceptsDrop:i}=l;if(!i){if(!h)C.push({...l,enabled:()=>!1});continue}if(!x.some((w)=>R2(i,w))){if(!h)C.push({...l,enabled:()=>!1});continue}let g=l;if(g.menuItems){let w=V0(G1(g.menuItems),x,!0);if(w.length>0||g.dropAction){let B=h?w:V0(G1(g.menuItems),x,!1);C.push({...g,menuItems:B})}else if(!h)C.push({...g,enabled:()=>!1})}else C.push(l)}return v6(C)},P3=(y,x=!1)=>{let h=[];for(let C of y){if(C===null){h.push(C);continue}if(typeof C==="function"){h.push(C);continue}let{action:l,menuItems:i}=C;if(l||i)if(i){let k=P3(G1(i),!0);if(k.length>0){let g=x?k:P3(G1(i),!1);h.push({...C,menuItems:g})}else if(!x)h.push({...C,enabled:()=>!1})}else h.push(C);else if(!x)h.push({...C,enabled:()=>!1})}return v6(h)},lC={overflow:"hidden auto",maxHeight:`calc(${z.maxHeight} - ${P.menuInset("8px")})`,borderRadius:z.spacing50,background:P.menuBg("#fafafa"),boxShadow:P.menuShadow(`${z.spacing13} ${z.spacing50} ${z.spacing} #0004`)},iC={boxShadow:"none",border:"none !important",display:"grid",alignItems:"center",justifyContent:"flex-start",textDecoration:"none",gridTemplateColumns:"0px 1fr max-content",width:"100%",gap:0,background:"transparent",padding:P.menuItemPadding("0 8px"),height:P.menuItemHeight("48px"),lineHeight:P.menuItemHeight("48px"),textAlign:"left"},kC={color:P.menuItemColor("#222")},gC={boxShadow:"none !important",background:P.menuItemHoverBg("#eee")},J6={boxShadow:"none !important",background:P.menuItemActiveBg("#aaa"),color:P.menuItemActiveColor("#000")},wC={background:`${P.menuDropOverBg("#2196F3")} !important`,color:`${P.menuDropOverColor("#fff")} !important`},BC={color:`${P.menuDropOverColor("#fff")} !important`},zC={stroke:`${P.menuDropOverColor("#fff")} !important`},Z6={boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${P.menuDropOverBg("#2196F3")} 50%, transparent) !important`},qC={".xin-menu, .tosi-menu":lC,".xin-menu > div, .tosi-menu > div":{width:P.menuWidth("auto")},".xin-menu-trigger, .tosi-menu-trigger":{paddingLeft:0,paddingRight:0,minWidth:P.touchSize("48px")},".xin-menu-separator, .tosi-menu-separator":{display:"inline-block",content:" ",height:"1px",width:"100%",background:P.menuSeparatorColor("#2224"),margin:P.menuSeparatorMargin("8px 0")},".xin-menu-element, .tosi-menu-element":{minHeight:P.menuItemHeight("48px")},".xin-menu-item, .tosi-menu-item":iC,".xin-menu-item, .xin-menu-item > span, .tosi-menu-item, .tosi-menu-item > span":kC,".xin-menu-with-icons .xin-menu-item, .tosi-menu-with-icons .tosi-menu-item":{gridTemplateColumns:"24px 1fr max-content",gap:P.menuItemGap("8px")},".xin-menu-shortcut, .tosi-menu-shortcut":{whiteSpace:"nowrap",paddingLeft:"1em",textAlign:"right",opacity:"0.65"},".xin-menu-item > :first-child, .tosi-menu-item > :first-child":{justifySelf:"center",alignSelf:"center"},".xin-menu-item svg, .tosi-menu-item svg":{stroke:P.menuItemIconColor("#222")},".xin-menu-item.xin-menu-item-checked, .tosi-menu-item.tosi-menu-item-checked":{background:P.menuItemHoverBg("#eee")},".xin-menu-item > span:nth-child(2), .tosi-menu-item > span:nth-child(2)":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"left"},".xin-menu-item:hover, .tosi-menu-item:hover":gC,".xin-menu-item.drag-target:hover, .tosi-menu-item.drag-target:hover":Z6,".xin-menu-item:active, .tosi-menu-item:active":J6,".xin-menu-item:active svg, .tosi-menu-item:active svg":{stroke:P.menuItemIconActiveColor("#000")},".xin-menu-item-highlight, .tosi-menu-item-highlight":J6,".xin-menu-item-highlight svg, .tosi-menu-item-highlight svg":{stroke:P.menuItemIconActiveColor("#000")},".xin-drop-over, .tosi-drop-over":wC,".xin-drop-over > span, .tosi-drop-over > span":BC,".xin-drop-over svg, .tosi-drop-over svg":zC,".drag-target":Z6},p6=!1;function A3(){if(p6)return;p6=!0,W1("xin-menu-helper",qC),document.addEventListener("mousedown",(y)=>{if(x1.length===0)return;let x=y.composedPath();if(!x1.find((h)=>x.includes(h.target)||x.includes(h.menu)))h1(0)}),document.body.addEventListener("keydown",(y)=>{if(y.key==="Escape")h1(0)})}var R6=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,C=y?.icon||h||E(" ");if(typeof C==="string")C=O[C]();let l=x.role==="listbox"?"option":"menuitem",i,k=y.properties||{};if(typeof y?.action==="string")i=hC(k,{role:l,href:y.action},C,x.localized?E(c(y.caption)):E(y.caption),E({class:"tosi-menu-shortcut"},y.shortcut?A4(y.shortcut):" "));else i=P0(k,{role:l,onClick:y.action},C,x.localized?E(c(y.caption)):E(y.caption),E({class:"tosi-menu-shortcut"},y.shortcut?A4(y.shortcut):" "));if(i.classList.add("xin-menu-item","tosi-menu-item"),i.classList.toggle("xin-menu-item-checked",h!==!1),i.classList.toggle("tosi-menu-item-checked",h!==!1),y.tooltip)i.dataset.tooltip=y.tooltip;if(x.role==="listbox")i.toggleAttribute("aria-selected",h!==!1);if(y?.enabled&&!y.enabled())i.setAttribute("disabled",""),i.setAttribute("aria-disabled","true");return i},D6=(y,x)=>{let h=y?.icon||E(" ");if(typeof h==="string")h=O[h]();let C=y.properties||{},l=P0(C,{onDragenter(i){H2(),l.classList.add("xin-drop-over","tosi-drop-over"),i.preventDefault()},onDragover(i){if(i.preventDefault(),i.dataTransfer)i.dataTransfer.dropEffect="copy"},onDragleave(i){let k=i.relatedTarget;if(k&&l.contains(k))return;l.classList.remove("xin-drop-over","tosi-drop-over")},onDrop(i){if(i.preventDefault(),i.stopPropagation(),l.classList.remove("xin-drop-over","tosi-drop-over"),y.dropAction&&i.dataTransfer)y.dropAction(i.dataTransfer);h1(0)}},h,x.localized?E(c(y.caption)):E(y.caption),E(" "));if(l.classList.add("xin-menu-item","tosi-menu-item"),y.tooltip)l.dataset.tooltip=y.tooltip;if(y.dropAction&&y.acceptsDrop)l.dataset.drop=y.acceptsDrop.join(";");if(y?.enabled&&!y.enabled())l.setAttribute("disabled",""),l.setAttribute("aria-disabled","true");return l},_3=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,C=y?.icon||h||E(" ");if(typeof C==="string")C=O[C]();let l=null,i=!1,k=y.properties||{},g=P0(k,{disabled:!(!y.enabled||y.enabled()),onClick(w){if(x._dropMode)return;n(Object.assign({},x,{menuItems:G1(y.menuItems),target:g,submenuDepth:(x.submenuDepth||0)+1,position:"side"})),w.stopPropagation(),w.preventDefault()},onDragenter(w){if(!x._dropMode)return;H2(),w.preventDefault(),w.stopPropagation();let B=w.relatedTarget;if(B&&g.contains(B))return;if(g.classList.add("xin-drop-over","tosi-drop-over"),i){if(h1((x.submenuDepth||0)+1),i=!1,l)clearTimeout(l);l=null;return}if(l)clearTimeout(l);l=setTimeout(()=>{i=!0;let q=G1(y.menuItems),j=x._dataTypes?V0(q,x._dataTypes,x.hideDisabled):q;if(j.length>0)n(Object.assign({},x,{menuItems:j,target:g,submenuDepth:(x.submenuDepth||0)+1,position:"side",_dropMode:!0,_dataTypes:x._dataTypes}))},x.disclosureDelay??200)},onDragover(w){if(!x._dropMode)return;if(w.preventDefault(),w.stopPropagation(),w.dataTransfer)w.dataTransfer.dropEffect=y.dropAction?"copy":"link"},onDragleave(w){if(!x._dropMode)return;let B=w.relatedTarget;if(B&&g.contains(B))return;if(i&&B&&x1.some((q)=>q.menu.contains(B)||q.target.contains(B)))return;if(g.classList.remove("xin-drop-over","tosi-drop-over"),l)clearTimeout(l),l=null},onDrop(w){if(!x._dropMode||!y.dropAction)return;if(w.preventDefault(),w.stopPropagation(),g.classList.remove("xin-drop-over","tosi-drop-over"),w.dataTransfer)y.dropAction(w.dataTransfer);h1(0)}},C,x.localized?E(c(y.caption)):E(y.caption),O.chevronRight({style:{justifySelf:"flex-end"}}));if(g.classList.add("xin-menu-item","tosi-menu-item"),y.tooltip)g.dataset.tooltip=y.tooltip;if(x._dropMode&&y.dropAction&&y.acceptsDrop)g.dataset.drop=y.acceptsDrop.join(";");return g},H6=(y,x)=>{if(y===null)return E({class:"xin-menu-separator tosi-menu-separator"});else if(typeof y==="function"){let h=y();return h.classList.add("xin-menu-element","tosi-menu-element"),h}else if(x._dropMode){let h=y;if(h.menuItems&&G1(h.menuItems).length>0)return _3(h,x);else if(y.dropAction)return D6(y,x);else{let l=y?.icon||E(" ");if(typeof l==="string")l=O[l]();return P0({class:"xin-menu-item tosi-menu-item",disabled:!0},l,x.localized?E(c(y.caption)):E(y.caption),E(" "))}}else{let h=y?.action?R6(y,x):_3(y,x);if(x.showChecked&&y.checked&&y.checked())requestAnimationFrame(()=>{h.scrollIntoView({block:"center"})});return h}},b6=(y)=>{let{target:x,width:h,menuItems:C,role:l="menu"}=y,i=C.find((w)=>w!=null&&typeof w!=="function"&&(w.icon||w.checked)),k=y.submenuDepth||0,g=N6({class:i?"xin-menu tosi-menu xin-menu-with-icons tosi-menu-with-icons":"xin-menu tosi-menu",role:l,onClick(){if(!y._dropMode)h1(0)},onDragover(w){if(!y._dropMode)return;w.preventDefault()},onDragenter(){if(!y._dropMode)return;H2()},onDragleave(w){if(!y._dropMode)return;let B=w.relatedTarget;if(B&&g.contains(B))return;if(B&&x1.some((q)=>q.menu.contains(B)||q.target.contains(B)))return;S6(k)}},N6({style:{minWidth:x.offsetWidth+"px",width:typeof h==="number"?`${h}px`:h},onMousedown(w){w.preventDefault(),w.stopPropagation()}},...C.map((w)=>H6(w,y))));return g},D2,x1=[],j0=null,H2=()=>{if(j0)clearTimeout(j0),j0=null},S6=(y)=>{H2(),j0=setTimeout(()=>{j0=null,h1(y)},500)},h1=(y=0)=>{if(H2(),y===0)document.querySelectorAll("tosi-menu.xin-drop-over, tosi-menu.tosi-drop-over").forEach((h)=>h.classList.remove("xin-drop-over","tosi-drop-over"));let x=x1.splice(y);for(let h of x)if(h.menu.remove(),h.onClose)h.onClose();return D2=x[0],y>0?x1[y-1]:void 0},n=(y)=>{A3(),y=Object.assign({submenuDepth:0},y);let{target:x,position:h,submenuDepth:C}=y;if(D2&&!document.body.contains(D2?.menu))D2=void 0;if(x1.length&&!document.body.contains(x1[0].menu))x1.splice(0);if(y._dropMode){if(x1.length>C&&x1[C]?.target===x)return;h1(C)}else{if(C===0&&D2?.target===x)return;let k=h1(C);if(D2?.target===x)return;if(k&&k.target===x){h1();return}}if(!y.menuItems?.length)return;let l=b6(y),i=q0({content:l,target:x,position:h});i.remainOnScroll=y._dropMode?"remain":"remove",x1.push({target:x,menu:i,onClose:y.onClose})},M6=(y)=>{A3();let{dataTypes:x,...h}=y,C=V0(y.menuItems,x,y.hideDisabled);if(!C.length)return;n({...h,menuItems:C,_dropMode:!0,_dataTypes:x})};function K3(y,x,h=[]){for(let C of y){if(!C)continue;if(typeof C==="function")continue;let{shortcut:l}=C,{menuItems:i}=C;if(l){if(z3(x,l)){let k=C;if(k.enabled&&!k.enabled())return;if(h.some((g)=>g.enabled&&!g.enabled()))return;return{action:k,path:h}}}else if(i){let k=K3(G1(i),x,[...h,C]);if(k)return k}}return}class G4 extends F{static preferredTagName="tosi-menu";static lightStyleSpec={":host":{display:"inline-flex",minWidth:z.touchSize,minHeight:z.touchSize},":host button":{margin:0,padding:0,alignSelf:"stretch",flex:"1",textAlign:"center"},":host button > tosi-slot":{display:"flex",alignItems:"center",gap:P.tosiMenuTriggerGap("10px")}};static initAttributes={menuWidth:"auto",localized:!1,icon:"",acceptsDrop:"",disclosureDelay:0,hideDisabled:!1};menuItems=[];dropAction=null;_dragMatches=!1;_matchesDrag(y){if(!this.acceptsDrop)return!1;let x=v2(this.acceptsDrop);return[...y.dataTransfer?.types||[]].some((C)=>x.some((l)=>R2([l],C)))}showMenu=(y)=>{if(y.type==="click"||y.code==="Space")n({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),y.stopPropagation(),y.preventDefault()};handleDragEnter=(y)=>{if(this._dragMatches=this._matchesDrag(y),!this._dragMatches)return;H2(),this.classList.add("xin-drop-over","tosi-drop-over");let x=[...y.dataTransfer?.types||[]];if(this.menuItems.length)M6({target:this.parts.trigger,menuItems:this.menuItems,dataTypes:x,width:this.menuWidth,localized:this.localized,disclosureDelay:this.disclosureDelay||void 0,hideDisabled:this.hideDisabled});y.preventDefault()};handleDragOver=(y)=>{if(!this._dragMatches)return;if(y.preventDefault(),y.dataTransfer)y.dataTransfer.dropEffect=this.dropAction?"copy":"link"};handleDragLeave=(y)=>{if(!this._dragMatches)return;let x=y.relatedTarget;if(x&&this.contains(x))return;if(x&&x1.some((h)=>h.menu.contains(x)||h.target.contains(x))){this.classList.remove("xin-drop-over","tosi-drop-over");return}this.classList.remove("xin-drop-over","tosi-drop-over"),S6(0)};handleDrop=(y)=>{if(!this._dragMatches||!this.dropAction)return;if(y.preventDefault(),y.stopPropagation(),this.classList.remove("xin-drop-over","tosi-drop-over"),y.dataTransfer)this.dropAction(y.dataTransfer);h1(0)};content=()=>P0({tabindex:0,part:"trigger",onClick:this.showMenu},CC());handleShortcut=async(y)=>{let x=K3(this.menuItems,y);if(!x)return;y.preventDefault(),y.stopImmediatePropagation();let{action:h,path:C}=x;if(this.isConnected&&document.body.contains(this))await this.animateShortcut(C,h);if(h.action instanceof Function)h.action()};findMenuItemByCaption(y,x){for(let h of y.querySelectorAll(".xin-menu-item")){let C=h.children[1];if(C&&C.textContent===x)return h}return null}async animateShortcut(y,x){h1(0),n({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),await new Promise((C)=>setTimeout(C,80));for(let C=0;C<y.length;C++){let l=C+1,i=x1[C]?.menu;if(!i)break;let k=this.findMenuItemByCaption(i,y[C].caption);if(!k)break;n({target:k,width:this.menuWidth,localized:this.localized,menuItems:G1(y[C].menuItems),submenuDepth:l,position:"side"}),await new Promise((g)=>setTimeout(g,80))}let h=x1[x1.length-1]?.menu;if(h){let C=this.findMenuItemByCaption(h,x.caption);if(C)C.classList.add("xin-menu-item-highlight","tosi-menu-item-highlight")}await new Promise((C)=>setTimeout(C,300)),h1(0)}constructor(){super();this.addEventListener("keydown",this.showMenu),this.addEventListener("dragenter",this.handleDragEnter),this.addEventListener("dragover",this.handleDragOver),this.addEventListener("dragleave",this.handleDragLeave),this.addEventListener("drop",this.handleDrop)}connectedCallback(){if(super.connectedCallback(),A3(),document.addEventListener("keydown",this.handleShortcut,!0),this.acceptsDrop)this.dataset.drop=this.acceptsDrop}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleShortcut)}}var I6=G4.elementCreator(),jC=I6,VC=G4;var{button:PC,span:c6,input:_C}=G,s6=(y,x)=>{return!!y.find((h)=>{if(h===null||x==null)return!1;else if(Array.isArray(h))return s6(h,x);else if(h.value===x||h===x)return!0})};class S1 extends F{static preferredTagName="tosi-select";static formAssociated=!0;static lightStyleSpec={":host":{"--tosi-select-gap":"var(--tosi-spacing-sm, 8px)","--tosi-select-touch-size":"var(--tosi-touch-size, 44px)","--tosi-select-padding":"0 var(--tosi-spacing-sm, 8px)","--tosi-select-value-padding":"0 var(--tosi-spacing-sm, 8px)","--tosi-select-icon-width":"24px","--tosi-select-field-width":"140px","--gap":"var(--tosi-select-gap)","--touch-size":"var(--tosi-select-touch-size)","--padding":"var(--tosi-select-padding)","--value-padding":"var(--tosi-select-value-padding)","--icon-width":"var(--tosi-select-icon-width)","--fieldWidth":"var(--tosi-select-field-width)",display:"inline-flex",position:"relative"},":host button":{display:"flex",alignItems:"center",justifyItems:"center",gap:z.tosiSelectGap,textAlign:"left",height:z.tosiSelectTouchSize,padding:z.tosiSelectPadding,position:"relative",width:"100%"},":host:not([show-icon]) button > :first-child":{display:"none"},":host[hide-caption] button > :nth-child(2)":{display:"none"},':host [part="value"]':{width:z.tosiSelectFieldWidth,padding:z.tosiSelectValuePadding,height:z.tosiSelectTouchSize,lineHeight:z.tosiSelectTouchSize,boxShadow:"none",whiteSpace:"nowrap",outline:"none",background:"transparent",flex:"1"},':host [part="value"]:not(:focus)':{overflow:"hidden",textOverflow:"ellipsis",background:"transparent"}};static initAttributes={editable:!1,placeholder:"",showIcon:!1,hideCaption:!1,localized:!1,disabled:!1,required:!1,name:""};_options=[];get options(){return this._options}set options(y){if(typeof y==="string")this._options=S1.parseOptionsString(y);else this._options=y;this.queueRender()}static parseOptionsString(y){return y.split(",").map((x)=>{let h=x.trim();if(h==="")return null;let[C,l]=h.split("=").map((g)=>g.trim());if(!l)return{value:C,caption:C};let[i,k]=l.split(":").map((g)=>g.trim());return{value:C,caption:i||C,icon:k||void 0}})}value="";filter="";isExpanded=!1;formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value=""}setValue=(y,x=!1)=>{if(this.value!==y)this.value=y,this.queueRender(!0);if(x)this.dispatchEvent(new Event("action"))};getValue=()=>this.value;get selectOptions(){return this.options}buildOptionMenuItem=(y)=>{if(y===null)return null;let{setValue:x,getValue:h}=this,C,l,i,k,g;if(typeof y==="string")l=i=y;else({icon:C,caption:l,value:i,tooltip:k,properties:g}=y);if(this.localized)l=c(l);let{options:w}=y;if(w)return{icon:C,caption:l,tooltip:k,properties:g,checked:()=>s6(w,h()),menuItems:w.map(this.buildOptionMenuItem)};return{icon:C,caption:l,tooltip:k,properties:g,checked:()=>h()===i,action:typeof i==="function"?async()=>{let B=await i();if(B!==void 0)x(B,!0)}:()=>{if(typeof i==="string")x(i,!0)}}};poppedOptions=[];get optionsMenu(){let y=this.selectOptions.map(this.buildOptionMenuItem);if(this.filter==="")return y;let x=(h)=>{if(h===null||typeof h==="function")return!0;else if(h.menuItems){let C=G1(h.menuItems);return h.menuItems=C.filter(x),C.length>0}else return h.caption.toLocaleLowerCase().includes(this.filter)};return y.filter(x)}handleChange=(y)=>{let{value:x}=this.parts,h=x.value||"";if(this.value!==String(h))this.value=h,this.dispatchEvent(new Event("change"));this.filter="",y.stopPropagation(),y.preventDefault()};handleKey=(y)=>{if(y.key==="Enter")y.preventDefault()};filterMenu=X2(()=>{this.filter=this.parts.value.value.toLocaleLowerCase(),h1(0),this.popOptions()});popOptions=(y)=>{if(y&&y.type==="click")this.filter="";this.poppedOptions=this.optionsMenu,this.isExpanded=!0,this.updateAriaExpanded(),n({target:this,menuItems:this.poppedOptions,showChecked:!0,role:"listbox",onClose:()=>{this.isExpanded=!1,this.updateAriaExpanded()}})};updateAriaExpanded(){let{value:y}=this.parts;y.setAttribute("aria-expanded",String(this.isExpanded))}content=()=>[PC({type:"button",part:"button",onClick:this.popOptions},c6(),_C({part:"value",value:this.value,tabindex:0,role:"combobox",ariaHaspopup:"listbox",ariaExpanded:"false",ariaAutocomplete:this.editable?"list":"none",onKeydown:this.handleKey,onInput:this.filterMenu,onChange:this.handleChange}),O.chevronDown())];get allOptions(){let y=[];function x(h){for(let C of h)if(typeof C==="string")y.push({caption:C,value:C});else if(C?.value)y.push(C);else if(C?.options)x(C.options)}return x(this.selectOptions),y}findOption(){return this.allOptions.find((x)=>x.value===this.value)||{caption:this.value,value:this.value}}localeChanged=()=>{this.queueRender()};connectedCallback(){super.connectedCallback();let y=this.getAttribute("options");if(y&&this._options.length===0)this._options=S1.parseOptionsString(y);if(this.localized)F4.allInstances.add(this)}disconnectedCallback(){if(super.disconnectedCallback(),this.localized)F4.allInstances.delete(this)}render(){super.render();let{value:y,button:x}=this.parts;x.disabled=this.disabled;let h=y.previousElementSibling,C=this.findOption(),l=c6();if(y.value=this.localized?c(C.caption):C.caption,C.icon)if(C.icon instanceof HTMLElement)l=C.icon.cloneNode(!0);else l=O[C.icon]();h.replaceWith(l),y.setAttribute("placeholder",this.localized?c(this.placeholder):this.placeholder),y.style.pointerEvents=this.editable?"":"none",y.readOnly=!this.editable}}var AC=S1,F1=S1.elementCreator(),KC=B1((...y)=>F1(...y),"xinSelect is deprecated, use tosiSelect instead (tag is now <tosi-select>)");var{span:d6}=G,{i18n:L}=t({i18n:{locale:window.navigator.language,locales:[window.navigator.language],languages:[window.navigator.language],emoji:[""],stringMap:{},localeOptions:[{icon:d6(),caption:window.navigator.language,value:window.navigator.language}]}});r1.localeOptions={toDOM(y,x){if(y instanceof S1)y.options=x}};var O4=(y)=>{if(L.locales.value.includes(y))L.locale.value=y;else console.error(`language ${y} is not available`)},U3=()=>{let y=Array.from(M1.allInstances);for(let x of y)x.localeChanged();r6()};L.locale.observe(U3);var _0="data-tosi-localized";function A0(y){let x=y.getAttribute(_0);if(!x)return;let h;try{h=JSON.parse(x)}catch(C){console.warn(`[data-tosi-localized] invalid JSON: ${x}`,C);return}if(!h||typeof h!=="object")return;for(let[C,l]of Object.entries(h)){if(typeof l!=="string")continue;y.setAttribute(C,c(l))}}function*L6(y){for(let x of Array.from(y.querySelectorAll(`[${_0}]`)))yield x;for(let x of Array.from(y.querySelectorAll("*"))){let h=x.shadowRoot;if(h)yield*L6(h)}}function r6(){if(typeof document>"u")return;for(let y of L6(document))A0(y)}var T6=null;if(typeof document<"u"&&typeof MutationObserver<"u"){let y=()=>{if(!document.body){queueMicrotask(y);return}T6=new MutationObserver((x)=>{for(let h of x){if(h.type==="attributes"&&h.target instanceof Element){A0(h.target);continue}for(let C of Array.from(h.addedNodes)){if(!(C instanceof Element))continue;if(C.hasAttribute(_0))A0(C);for(let l of Array.from(C.querySelectorAll(`[${_0}]`)))A0(l)}}}),T6.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[_0]}),r6()};y()}var UC=P4((y)=>[y.caption.toLocaleLowerCase()]);function G3(y){let[x,,h,C,...l]=y.split(`
|
|
16
|
-
`).map((i)=>i.split("\t"));if(x&&h&&C&&l){if(L.locales.value=x,L.languages.value=h,L.emoji.value=C,L.stringMap.value=l.reduce((i,k)=>{return i[k[0].toLocaleLowerCase()]=k,i},{}),L.localeOptions.value=x.map((i,k)=>({icon:d6({title:x[k]},C[k]),caption:h[k],value:i})).sort(UC),!L.locales.value.includes(L.locale.value)){let i=L.locale.value.substring(0,2);L.locale.value=L.locales.value.find((k)=>k.substring(0,2)===i)||L.locales.value[0]}U3()}}function c(y){if(y.endsWith("…"))return c(y.substring(0,y.length-1))+"…";let x=L.locales.value.indexOf(L.locale.value);if(x>-1){let h=b(L.stringMap),C=y.toLocaleLowerCase(),l=h[C],i=l&&l[x];if((!i||i==='"')&&C.includes("#")){let k=h[C.substring(0,C.indexOf("#"))];i=k&&k[x]}if(i)i=i.split("#",2)[0],y=y.toLocaleLowerCase()===y?i.toLocaleLowerCase():i;else y=y.split("#",2)[0]}else y=y.split("#",2)[0];return y}class W4 extends F{static preferredTagName="tosi-locale-picker";static initAttributes={hideCaption:!1};content=()=>{return F1({part:"select",showIcon:!0,title:c("Language"),bindValue:L.locale,bindLocaleOptions:L.localeOptions})};render(){super.render(),this.parts.select.toggleAttribute("hide-caption",this.hideCaption)}}var GC=W4,o6=W4.elementCreator(),FC=o6;class M1 extends F{static preferredTagName="tosi-localized";static lightStyleSpec={":host":{pointerEvents:"none"}};static allInstances=new Set;static initAttributes={refString:""};contents=()=>G.tosiSlot();connectedCallback(){super.connectedCallback(),M1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),M1.allInstances.delete(this)}localeChanged(){if(!this.refString)this.refString=this.textContent||"";this.textContent=this.refString?c(this.refString):""}render(){super.render(),this.localeChanged()}}var F4=M1,Q1=M1.elementCreator(),OC=Q1;function f6(y){let x=/^\s*([a-zA-Z]+)\s*(?:\(([^)]*)\))?\s*$/.exec(y);if(!x)return{base:y.trim().toLowerCase(),args:[]};let h=x[2]===void 0?[]:x[2].split(",").map((C)=>C.trim()).filter(Boolean);return{base:x[1].toLowerCase(),args:h}}function WC(){try{return L.locale.value||void 0}catch{return}}function F3(y){let x=QC,h;return()=>{let C=WC();if(C!==x)x=C,h=y(C);return h}}var QC=Symbol("unbuilt");function n6(y){if(y===null||y===void 0||y==="")return null;let x=typeof y==="number"?y:Number(y);return Number.isFinite(x)?x:null}var XC=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],$C=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];function YC(y,x,h,C,l){let i=y<0,k=Math.abs(y),g=0;while(k>=x&&g<h.length-1)k/=x,g+=1;let w=(g===0?l:C).format(k);return`${i?"-":""}${w} ${h[g]}`}function NC(y,x){return{align:y,format:x,toDOM(h,C){h.textContent=x(C)}}}function O3(y){let{base:x,args:h}=f6(y),C=(i)=>({align:"right",format:(k)=>{let g=n6(k);return g===null?"":i(g)},toDOM(k,g){let w=n6(g);k.textContent=w===null?"":i(w),k.classList.toggle("-negative",w!==null&&w<0),k.classList.toggle("-zero",w===0)}}),l=(i)=>{let k=F3(i);return C((g)=>k().format(g))};switch(x){case"number":return l((i)=>new Intl.NumberFormat(i));case"currency":{let i=(h[0]||"USD").toUpperCase();return l((k)=>new Intl.NumberFormat(k,{style:"currency",currency:i}))}case"fixed":{let i=h[0]!==void 0?Math.max(0,Math.min(20,Math.trunc(Number(h[0]))||0)):2;return l((k)=>new Intl.NumberFormat(k,{minimumFractionDigits:i,maximumFractionDigits:i}))}case"percent":{let i=h[0]!==void 0?Math.max(0,Math.min(20,Math.trunc(Number(h[0]))||0)):0;return l((k)=>new Intl.NumberFormat(k,{style:"percent",minimumFractionDigits:i,maximumFractionDigits:i}))}case"sci":return l((i)=>new Intl.NumberFormat(i,{notation:"scientific"}));case"eng":return l((i)=>new Intl.NumberFormat(i,{notation:"engineering"}));case"bytes":{let i=(h[0]||"").toLowerCase()==="iec",k=i?1024:1000,g=i?$C:XC,w=F3((q)=>new Intl.NumberFormat(q,{maximumFractionDigits:1})),B=F3((q)=>new Intl.NumberFormat(q,{maximumFractionDigits:0}));return C((q)=>YC(q,k,g,w(),B()))}case"boolean":{let i=h[0]||"checkSquare",k=h.length===0?"square":h[1]||null,g=(w)=>{if(!w)return null;let B=O[w];return typeof B==="function"?B():document.createTextNode("")};return{align:"center",format:(w)=>g(w?i:k)??document.createTextNode(""),toDOM(w,B){let q=g(B?i:k);w.replaceChildren(...q?[q]:[])}}}default:return NC(void 0,(i)=>i==null?"":String(i))}}function JC(y,x,h){let C=y.find((l)=>l[x]!==void 0&&l[x]!==null);if(C!==void 0){let l=C[x];switch(typeof l){case"string":if(l.match(/^\d+(\.\d+)?$/))return 6*h;else if(l.includes(" "))return 20*h;else return 12*h;case"number":return 6*h;case"boolean":return 5*h;case"object":return!1;default:return 8*h}}return!1}var{div:K0,span:Q4,button:ZC}=G,u6=(y)=>y,E6=new WeakMap;function a6(y){if(!y.type||y.dataCell)return null;let x=E6.get(y);if(!x)x=O3(y.type),E6.set(y,x);return x}class X4 extends F{static preferredTagName="tosi-table";static lightStyleSpec={":host":{"--tosi-table-row-height":"32px","--tosi-table-touch-size":"var(--tosi-touch-size, 44px)","--tosi-table-dragged-header-bg":"#0004","--tosi-table-dragged-header-color":"#fff","--tosi-table-drop-header-bg":"#fff4",display:"block",overflow:"hidden",background:P.tosiTableBg("var(--tosi-bg, #fff)")},":host .scroll-area":{width:"100%",height:"100%",overflow:"auto",overscrollBehavior:"none"},":host .thead, :host .tbody":{display:"contents"},":host .tr":{display:"grid",gridTemplateColumns:z.tosiTableGridColumns,width:z.tosiTableGridRowWidth,height:z.tosiTableRowHeight,background:P.tosiTableBg("var(--tosi-bg, #fff)")},":host .thead .tr":{position:"sticky",top:"0",zIndex:"2",background:P.tosiTableHeaderBg(P.tosiTableBg("var(--tosi-bg, #fff)"))},":host .tbody-pinned-top .tr, :host .tbody-pinned-bottom .tr":{position:"sticky",zIndex:"1"},":host .th, :host .td":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"flex",alignItems:"center",height:z.tosiTableRowHeight,lineHeight:z.tosiTableRowHeight},":host .col-pinned":{position:"sticky",zIndex:"1",background:P.tosiTableBg("var(--tosi-bg, #fff)")},":host .th.col-pinned":{zIndex:"3",background:P.tosiTableHeaderBg(P.tosiTableBg("var(--tosi-bg, #fff)"))},":host .tr[aria-selected] .td":{background:P.tosiTableSelectedBg("var(--tosi-accent, #007AFF22)")},":host .td:focus, :host .th:focus":{outline:"2px solid var(--tosi-accent, #007AFF)",outlineOffset:"-2px",zIndex:"1"},":host .col-pinned:focus":{zIndex:"4"},":host .col-edge-right":{boxShadow:"1px 0 0 var(--tosi-table-edge-color, #0002)"},":host .col-edge-left":{boxShadow:"-1px 0 0 var(--tosi-table-edge-color, #0002)"},":host .row-edge-bottom":{boxShadow:"0 1px 0 var(--tosi-table-edge-color, #0002)"},":host .row-edge-top":{boxShadow:"0 -1px 0 var(--tosi-table-edge-color, #0002)"},":host .th .menu-trigger":{color:"currentColor",background:"none",padding:0,lineHeight:z.tosiTableTouchSize,height:z.tosiTableTouchSize,width:z.tosiTableTouchSize},':host [draggable="true"]':{cursor:"ew-resize"},':host [draggable="true"]:active':{background:z.tosiTableDraggedHeaderBg,color:z.tosiTableDraggedHeaderColor},":host .drag-over":{background:z.tosiTableDropHeaderBg}};static initAttributes={rowHeight:30,charWidth:15,minColumnWidth:30,select:!1,multiple:!1,pinnedTop:0,pinnedBottom:0,nosort:!1,nohide:!1,noreorder:!1,localized:!1};selectionChanged=()=>{};rowRendered=null;selectedKey=Symbol("selected");selectBinding=(y,x)=>{if(x==null)return;y.toggleAttribute("aria-selected",x[this.selectedKey]===!0)};maxVisibleRows=1e4;_head=null;_scrollArea=null;_tbodyTop=null;_tbodyBottom=null;_pinnedRowEdgeObserver=null;_rowCellsCache=new WeakMap;itemFor(y){return q2(y)}cellsFor(y){let x=b(y);for(let h of[this._tbodyTop,this._scrollArea,this._tbodyBottom]){if(!h)continue;let C=Y2(h);if(!C)continue;let l=C.itemToElement.get(x);if(l&&l.length>0){let i=l[0],k=this._rowCellsCache.get(i);if(!k)k=Array.from(i.children),this._rowCellsCache.set(i,k);return k}}return}get value(){return{array:this.array,filter:this.filter,columns:this.columns}}set value(y){let{array:x,columns:h,filter:C}=b(y);if(this._array!==x||this._columns!==h||this._filter!==C)this.queueRender();this._array=x||[],this._columns=h||null,this._filter=C||u6}rowData={visible:[],pinnedTopData:[],pinnedBottomData:[]};_array=[];_columns=null;_filter=u6;_sort;_pinnedTopRows;_pinnedBottomRows;get pinnedTopRows(){return this._pinnedTopRows}set pinnedTopRows(y){this._pinnedTopRows=y?b(y):void 0,this.queueRender()}get pinnedBottomRows(){return this._pinnedBottomRows}set pinnedBottomRows(y){this._pinnedBottomRows=y?b(y):void 0,this.queueRender()}get effectivePinnedTopData(){if(this._pinnedTopRows)return this._pinnedTopRows;return this.pinnedTop>0?this._array.slice(0,this.pinnedTop):[]}get effectivePinnedBottomData(){if(this._pinnedBottomRows)return this._pinnedBottomRows;return this.pinnedBottom>0?this._array.slice(-this.pinnedBottom):[]}get effectiveBaseData(){if(this._pinnedTopRows||this._pinnedBottomRows)return this._array;return this._array.slice(this.pinnedTop,this._array.length-this.pinnedBottom)}constructor(){super();this.rowData=t({[this.instanceId]:this.rowData})[this.instanceId]}get array(){return this._array}set array(y){this._array=b(y),this.queueRender()}get filter(){return this._filter}set filter(y){if(this._filter!==y)this._filter=y,this.queueRender()}get sort(){if(this._sort)return this._sort;let y=this._columns?.find((h)=>h.sort==="ascending"||h.sort==="descending");if(!y)return;let{prop:x}=y;return y.sort==="ascending"?(h,C)=>h[x]>C[x]?1:-1:(h,C)=>h[x]>C[x]?-1:1}set sort(y){if(this._sort!==y)this._sort=y,this.queueRender()}get columns(){if(!Array.isArray(this._columns)){let{_array:y}=this;this._columns=Object.keys(y[0]||{}).map((x)=>{let h=JC(y,x,this.charWidth);return{name:x.replace(/([a-z])([A-Z])/g,"$1 $2").toLocaleLowerCase(),prop:x,align:typeof y[0][x]==="number"||y[0][x]!==""&&!isNaN(y[0][x])?"right":"left",visible:h!==!1,width:h?h:0}})}return this._columns}set columns(y){this._columns=y,this.queueRender()}get visibleColumns(){let y=this.columns.filter((l)=>l.visible!==!1),x=y.filter((l)=>l.pinned==="left"),h=y.filter((l)=>!l.pinned),C=y.filter((l)=>l.pinned==="right");return[...x,...h,...C]}get pinnedLeft(){return this.visibleColumns.filter((y)=>y.pinned==="left").length}set pinnedLeft(y){let x=this.columns.filter((h)=>h.visible!==!1);for(let h of x)if(h.pinned==="left")delete h.pinned;for(let h=0;h<y&&h<x.length;h++)x[h].pinned="left";this.queueRender()}get pinnedRight(){return this.visibleColumns.filter((y)=>y.pinned==="right").length}set pinnedRight(y){let x=this.columns.filter((h)=>h.visible!==!1);for(let h of x)if(h.pinned==="right")delete h.pinned;for(let h=x.length-y;h<x.length;h++)if(h>=0)x[h].pinned="right";this.queueRender()}content=null;computeStickyInfo(y){let x=y.map(()=>({})),h=0,C=-1;for(let k=0;k<y.length;k++){if(y[k].pinned!=="left")break;x[k].left=h+"px",h+=y[k].width,C=k}if(C>=0)x[C].edgeClass="col-edge-right";let l=0,i=y.length;for(let k=y.length-1;k>=0;k--){if(y[k].pinned!=="right")break;x[k].right=l+"px",l+=y[k].width,i=k}if(i<y.length)x[i].edgeClass="col-edge-left";return x}cellClasses(y,x){let h=y;if(x.left!=null||x.right!=null)h+=" col-pinned";if(x.edgeClass)h+=" "+x.edgeClass;return h}rowClasses(y){return y==="visible"?"tr":"tr row-pinned"}tagPinnedRows=()=>{this.tagPinnedTbody(this._tbodyTop,"top"),this.tagPinnedTbody(this._tbodyBottom,"bottom")};tagPinnedTbody(y,x){if(!y)return;let h=Array.from(y.querySelectorAll(".tr"));if(h.length===0)return;let C=h.length-1,l=x==="top"?"row-edge-bottom":"row-edge-top";h.forEach((k,g)=>{k.classList.remove(l);let w=x==="top"?g+1:C-g;k.style[x]=`calc(var(--tosi-table-row-height) * ${w})`}),(x==="top"?h[C]:h[0]).classList.add(l)}cellStyle(y,x,h){let C={justifyContent:y.align||a6(y)?.align||"left",...h};if(x.left!=null)C.left=x.left;if(x.right!=null)C.right=x.right;return C}applyGridCellAttrs(y,x,h,C){y.setAttribute("aria-colindex",String(x+1)),y.tabIndex=-1,y.classList.add(...this.cellClasses("td",h).split(" ")),Object.assign(y.style,C)}buildCell(y,x,h,C){let l=this.cellStyle(y,h);if(y.dataCell!==void 0){let k=y.dataCell(y);return this.applyGridCellAttrs(k,x,h,l),k}let i=a6(y);if(i)return Q4({class:this.cellClasses("td",h),role:"gridcell",tabindex:-1,ariaColindex:String(x+1),style:l,bind:{value:C[y.prop],binding:{toDOM(k,g){i.toDOM(k,g)}}}});return Q4({class:this.cellClasses("td",h),role:"gridcell",tabindex:-1,ariaColindex:String(x+1),style:l,bindText:C[y.prop]})}buildRow(y,x,h,C="tr"){let l=x.map((g,w)=>this.buildCell(g,w,h[w],y)),i=this.selectBinding,k={class:C};return k.bind={value:y,binding:{toDOM:(g,w)=>{i(g,w);let B=this.rowRendered;if(B)B(w,Array.from(g.children))}}},K0(k,...l)}buildHeaderCell(y,x,h){let{popColumnMenu:C}=this,l="none",i;switch(y.sort){case"ascending":i=O.sortAscending(),l="descending";break;case"descending":l="ascending",i=O.sortDescending();break}let k=!(this.nosort&&this.nohide)?ZC({class:"menu-trigger",onClick(w){C(w.target,y),w.stopPropagation()}},i||O.moreVertical()):{},g=y.headerCell!==void 0?y.headerCell(y):Q4({class:this.cellClasses("th",h),role:"columnheader",tabindex:-1,ariaSort:l,ariaColindex:String(x+1),style:this.cellStyle(y,h)},this.captionSpan({style:{flex:"1"}},typeof y.name==="string"?y.name:y.prop),k);if(y.headerCell!==void 0)this.applyGridCellAttrs(g,x,h,this.cellStyle(y,h)),g.classList.remove("td"),g.classList.add("th"),g.setAttribute("role","columnheader");if(!this.noreorder&&g.children[0]){V3();let w=this.instanceId+"-column-header",B=g.children[0];B.setAttribute("draggable","true"),B.style.pointerEvents="all",B.dataset.drag=w,g.dataset.drop=w,B.addEventListener("dragstart",()=>{this.draggedColumn=y}),g.addEventListener("drop",this.dropColumn)}return g}buildHeader(y,x){let h=y.map((C,l)=>this.buildHeaderCell(C,l,x[l]));return K0({class:"thead",role:"rowgroup"},K0({class:"tr",role:"row"},...h))}buildPinnedBody(y,x,h,C){let l=b(y);if(!l||l.length===0)return null;let i=C==="pinned-top"?"pinnedTopRows":"pinnedBottomRows",k=this.rowClasses(C),g=y.listBinding((w,B)=>this.buildRow(B,x,h,k),{});return K0({class:`tbody tbody-${C}`,role:"rowgroup",part:i},...g)}getColumn(y){if(!this._scrollArea)return;let x=(y.touches!==void 0?y.touches[0].clientX:y.clientX)-this._scrollArea.getBoundingClientRect().x,h=y.touches!==void 0?20:5,{scrollLeft:C,clientWidth:l,scrollWidth:i}=this._scrollArea,k=this.visibleColumns,g=i-l-C,w=0;return k.find((B)=>{if(B.visible===!1)return!1;w+=B.width;let q;if(B.pinned==="left")q=w;else if(B.pinned==="right")q=w-C-g;else q=w-C;return Math.abs(x-q)<h})}setCursor=(y)=>{let x=this.getColumn(y);this.style.cursor=x!==void 0?"col-resize":""};resizeColumn=(y)=>{let x=this.getColumn(y);if(x!==void 0){let h=Number(x.width),C=y.touches!==void 0,l=C?y.touches[0].identifier:void 0;P1(y,(i,k,g)=>{if((C?[...g.touches].find((q)=>q.identifier===l):!0)===void 0)return!0;let B=h+i;if(x.width=B>this.minColumnWidth?B:this.minColumnWidth,this.setColumnWidths(),g.type==="mouseup")return!0},"col-resize")}};selectRow(y,x=!0){if(x)y[this.selectedKey]=!0;else delete y[this.selectedKey];this.updateSelectionVisuals()}selectRows(y,x=!0){for(let h of y||this.array)if(x)h[this.selectedKey]=!0;else delete h[this.selectedKey];this.updateSelectionVisuals()}deSelect(y){this.selectRows(y,!1)}updateSelectionVisuals(){let y=this._scrollArea?.querySelectorAll(".tr")??[];for(let x of y){let h=this.itemFor(x);if(h!=null)this.selectBinding(x,h)}}rangeStart;updateSelection=(y)=>{if(!this.select&&!this.multiple)return;let{target:x}=y;if(!(x instanceof HTMLElement))return;let h=this.itemFor(x);if(h==null)return;let C=y,l=window.getSelection();if(l!==null)l.removeAllRanges();let i=this.visibleRows;if(this.multiple&&C.shiftKey&&i.length>0&&this.rangeStart!==h){let k=this.rangeStart===void 0||this.rangeStart[this.selectedKey]===!0,[g,w]=[this.rangeStart!==void 0?i.indexOf(this.rangeStart):0,i.indexOf(h)].sort((B,q)=>B-q);if(g>-1)for(let B=g;B<=w;B++){let q=i[B];this.selectRow(q,k)}}else if(this.multiple&&C.metaKey){this.selectRow(h,!h[this.selectedKey]);let k=i.indexOf(h),g=i[k+1],w=k>0?i[k-1]:void 0;if(g!==void 0&&g[this.selectedKey]===!0)this.rangeStart=g;else if(w!==void 0&&w[this.selectedKey]===!0)this.rangeStart=w;else this.rangeStart=void 0}else this.rangeStart=h,this.deSelect(),this.selectRow(h,!0);this.selectionChanged(this.visibleSelectedRows),this.updateSelectionVisuals()};findCell(y,x){if(y===-1)return this.querySelector(`.thead .th[aria-colindex="${x+1}"]`);let h=this.effectivePinnedTopData,C=this.visibleRows,l=this.effectivePinnedBottomData,i;if(y<h.length)i=h[y];else if(y<h.length+C.length)i=C[y-h.length];else if(y<h.length+C.length+l.length)i=l[y-h.length-C.length];else return null;return this.cellsFor(i)?.[x]??null}_pendingFocus=null;handleScrollEnd=()=>{if(!this._pendingFocus)return;let{row:y,col:x}=this._pendingFocus;this._pendingFocus=null;let h=this.findCell(y,x);if(h)h.focus()};focusCell(y,x){this._pendingFocus={row:y,col:x};let h=this.findCell(y,x);if(h)h.focus(),h.scrollIntoView({block:"nearest",inline:"nearest"});else if(this._scrollArea){let C=this.effectivePinnedTopData,l=y-C.length;if(l>=0&&l<this.visibleRows.length)this._scrollArea.scrollTop=l*this.rowHeight}}handleKeyNav=(y)=>{let x=y.target,h=x.closest(".td")||x.closest(".th");if(!h)return;let C=parseInt(h.getAttribute("aria-colindex")||"",10);if(isNaN(C))return;let l=C-1,i=this.visibleColumns.length,k=this.effectivePinnedTopData,g=this.visibleRows,w=this.effectivePinnedBottomData,B=k.length+g.length+w.length,q=y.metaKey||y.ctrlKey,j=h.classList.contains("th"),_;if(j)_=-1;else{let Q=h.closest(".tr");if(!Q)return;let Y=q2(Q);if(Y==null)return;let $=k.indexOf(Y),Z=$===-1?g.indexOf(Y):-1,p=$===-1&&Z===-1?w.indexOf(Y):-1;if($!==-1)_=$;else if(Z!==-1)_=k.length+Z;else if(p!==-1)_=k.length+g.length+p;else return}let K=_,U=l;switch(y.key){case"ArrowUp":K=q?0:Math.max(-1,_-1);break;case"ArrowDown":K=q?B-1:Math.min(B-1,_+1);break;case"ArrowLeft":U=q?0:Math.max(0,l-1);break;case"ArrowRight":U=q?i-1:Math.min(i-1,l+1);break;case"Tab":if(y.shiftKey)if(l>0)U=l-1;else if(_>0)K=_-1,U=i-1;else return;else if(l<i-1)U=l+1;else if(_<B-1)K=_+1,U=0;else return;break;case"Home":if(q)K=0,U=0;else U=0;break;case"End":if(q)K=B-1,U=i-1;else U=i-1;break;default:return}if(K!==_||U!==l)y.preventDefault(),this.focusCell(K,U)};connectedCallback(){super.connectedCallback(),this.addEventListener("mousemove",this.setCursor),this.addEventListener("mousedown",this.resizeColumn),this.addEventListener("touchstart",this.resizeColumn,{passive:!0}),this.addEventListener("mouseup",this.updateSelection),this.addEventListener("touchend",this.updateSelection),this.addEventListener("keydown",this.handleKeyNav)}setColumnWidths(){let y=this.visibleColumns,x=y.map((l)=>l.width+"px").join(" "),h=y.reduce((l,i)=>l+i.width,0)+"px";this.style.setProperty("--tosi-table-grid-columns",x),this.style.setProperty("--tosi-table-grid-row-width",h),this.style.setProperty("--grid-columns",x),this.style.setProperty("--grid-row-width",h);let C=this.computeStickyInfo(y);for(let l of this.querySelectorAll(".col-pinned")){let i=parseInt(l.getAttribute("aria-colindex")||"",10)-1;if(!isNaN(i)&&C[i]){let k=C[i];if(k.left!=null)l.style.left=k.left;if(k.right!=null)l.style.right=k.right}}}sortByColumn=(y,x="auto")=>{for(let h of this.columns.filter((C)=>b(C.sort)!==!1))if(b(h)===y){if(x==="auto")h.sort=h.sort==="ascending"?"descending":"ascending";else h.sort=x;this.queueRender()}else delete h.sort};popColumnMenu=(y,x)=>{let{sortByColumn:h}=this,C=this.columns.filter((g)=>g.visible===!1),l=this.queueRender.bind(this),i=[];if(!this.nosort&&x.sort!==!1)i.push({caption:this.localized?`${c("Sort")} ${c("Ascending")}`:"Sort Ascending",icon:"sortAscending",action(){h(x)}},{caption:this.localized?`${c("Sort")} ${c("Descending")}`:"Sort Descending",icon:"sortDescending",action(){h(x,"descending")}});if(!this.nohide){if(i.length)i.push(null);i.push({caption:this.localized?`${c("Hide")} ${c("Column")}`:"Hide Column",icon:"eyeOff",enabled:()=>x.visible!==!0,action(){x.visible=!1,l()}},{caption:this.localized?`${c("Show")} ${c("Column")}`:"Show Column",icon:"eye",enabled:()=>C.length>0,menuItems:C.map((g)=>{return{caption:g.name||g.prop,action(){delete g.visible,l()}}})})}if(i.length)i.push(null);let k=x.pinned==="left"?"pin":x.pinned==="right"?"pin0f":"pin50o";i.push({caption:this.localized?c("Pin"):"Pin",icon:k,menuItems:[{caption:this.localized?c("Left"):"Left",icon:"pin",enabled:()=>x.pinned!=="left",action(){x.pinned="left",l()}},{caption:this.localized?c("Right"):"Right",icon:"pin0f",enabled:()=>x.pinned!=="right",action(){x.pinned="right",l()}},{caption:this.localized?c("Unpin"):"Unpin",icon:"unPin",enabled:()=>!!x.pinned,action(){delete x.pinned,l()}}]}),n({target:y,localized:this.localized,menuItems:i})};get captionSpan(){return this.localized?Q1:Q4}get visibleRows(){return b(this.rowData.visible)}get visibleSelectedRows(){return this.visibleRows.filter((y)=>y[this.selectedKey])}get selectedRows(){if(this._pinnedTopRows||this._pinnedBottomRows)return[...this._pinnedTopRows??[],...this._array,...this._pinnedBottomRows??[]].filter((x)=>x[this.selectedKey]);return this._array.filter((y)=>y[this.selectedKey])}getCells(y){let x=y instanceof Element?this.itemFor(y):y;return x==null?void 0:this.cellsFor(x)}getItem(y){return this.itemFor(y)}draggedColumn;dropColumn=(y)=>{let x=y.target.closest(".drag-over"),h=parseInt(x.getAttribute("aria-colindex")||"",10)-1,C=this.visibleColumns[h],l=this.columns.indexOf(this.draggedColumn),i=this.columns.indexOf(C);this.draggedColumn.pinned=C.pinned,this.columns.splice(l,1),this.columns.splice(i,0,this.draggedColumn),this.queueRender(),y.preventDefault(),y.stopPropagation()};render(){super.render(),this.textContent="";let y=this.effectivePinnedTopData,x=this.effectivePinnedBottomData,h=this.effectiveBaseData,C=Math.min(h.length,this.maxVisibleRows),l=this.filter(h.slice(0,C)),{sort:i}=this;if(i)l.sort(i);this.rowData.pinnedTopData=y,this.rowData.pinnedBottomData=x,this.rowData.visible=l;let k=this.visibleColumns;if(k.length===0)return;let g=this.computeStickyInfo(k);this.style.setProperty("--tosi-table-row-height",this.rowHeight>0?`${this.rowHeight}px`:"auto"),this.setColumnWidths(),this._head=this.buildHeader(k,g),this._tbodyTop=this.buildPinnedBody(this.rowData.pinnedTopData,k,g,"pinned-top"),this._tbodyBottom=this.buildPinnedBody(this.rowData.pinnedBottomData,k,g,"pinned-bottom");let w=this.rowData.visible.listBinding((B,q)=>this.buildRow(q,k,g),this.rowHeight>0?{virtual:{height:this.rowHeight}}:{});this._scrollArea=K0({class:"scroll-area",part:"visibleRows"},...[this._head,this._tbodyTop,...w,this._tbodyBottom].filter(Boolean)),this._scrollArea.addEventListener("scrollend",this.handleScrollEnd),this.append(this._scrollArea),this.observePinnedRowMutations(),this.tagPinnedRows()}observePinnedRowMutations(){this._pinnedRowEdgeObserver?.disconnect(),this._pinnedRowEdgeObserver=new MutationObserver(this.tagPinnedRows);for(let y of[this._tbodyTop,this._tbodyBottom])if(y)this._pinnedRowEdgeObserver.observe(y,{childList:!0})}}var pC=X4,W3=X4.elementCreator(),vC=W3,RC=W3;var{dialog:DC,button:Q3,header:HC,footer:bC,tosiSlot:X3,h3:$3,p:Y3,label:SC,input:MC,div:IC}=G;class N3 extends F{static preferredTagName="tosi-dialog";static lightStyleSpec={":host > dialog::backdrop":{backdropFilter:"blur(8px)"},":host > dialog:not([open])":{display:"none"},":host > dialog[open]":{minWidth:300,border:0,borderRadius:10,overflow:"hidden",maxHeight:"calc(100% - 20px)",padding:0,display:"flex",flexDirection:"column",gap:5,_dialogShadow:P.menuShadow("0 5px 10px #0004"),_dialogBackground:P.background("#fafafa"),_dialogColor:P.textColor("#222"),boxShadow:z.dialogShadow,background:z.dialogBackground,color:z.dialogColor},":host > dialog > *":{padding:"0 20px"},":host > dialog > header":{display:"flex",justifyContent:"center",gap:10},":host > dialog > footer":{display:"flex",justifyContent:"flex-end",gap:10,paddingBottom:20}};static async alert(y,x="Alert"){return new Promise((h)=>{let C=$4({removeOnClose:!0,closeOnBackgroundClick:!0,dialogWillClose(){h()}},$3({slot:"header"},x),y.includes(`
|
|
17
|
-
`)?G.pre({style:{whiteSpace:"pre-wrap",margin:0}},y):Y3(y));document.body.append(C),C.showModal()})}static async confirm(y,x="Confirm"){return new Promise((h)=>{let C=$4({removeOnClose:!0,dialogWillClose(l){h(l==="confirm")}},$3({slot:"header"},x),Y3(y),Q3({slot:"footer",onClick(){C.close()}},"Cancel"));document.body.append(C),C.showModal()})}static async prompt(y,x="Prompt",h=""){return new Promise((C)=>{let l=MC({value:h}),i=$4({removeOnClose:!0,dialogWillClose(k){C(k==="confirm"?l.value:null)},initialFocus(){l.focus()}},$3({slot:"header"},x),Y3(SC({style:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:5}},IC(y),l)),Q3({slot:"footer",onClick(){i.close()}},"Cancel"));document.body.append(i),i.showModal()})}removeOnClose=!1;closeOnBackgroundClick=!1;constructor(){super();N2(this,"click",()=>{if(this.closeOnBackgroundClick)this.close()})}dialogWillClose=(y="cancel")=>{console.log("dialog will close with",y)};initialFocus(){this.parts.ok.focus()}#y=(y)=>{};showModal=()=>{return this.style.zIndex=String(P2()),new Promise((y)=>{this.#y=y,this.parts.dialog.showModal(),requestAnimationFrame(()=>{this.initialFocus()})})};close=(y="cancel")=>{if(this.dialogWillClose(y),this.#y(y),this.parts.dialog.close(),this.removeOnClose)this.remove()};ok=()=>{this.close("confirm")};content=()=>DC({part:"dialog"},HC(X3({name:"header"})),X3(),bC(X3({name:"footer"}),Q3({part:"ok",onClick:this.ok},"OK")))}var $4=N3.elementCreator();var cC=/^readme\.md$/i;function m6(y){if(cC.test(y))return"";return y.replace(/\.[^.]+$/,"")}function b2(y){let x={};for(let C of y){let l=m6(C.filename);x[l]=(x[l]||0)+1}let h={};for(let C of y){let l=m6(C.filename);h[C.filename]=l!==""&&x[l]>1?C.filename.replace(/\./g,"-"):l}return h}function J3(y){return y===""?"/":`/${y}/`}function e6(y,x){let h=y.replace(/^\?/,"");if(!h||h.includes("=")||h.includes("&"))return null;let C=decodeURIComponent(h),l=x[C];if(l===void 0)return null;return J3(l)}function sC(y){return y.replace(/^\/+/,"").replace(/\/+$/,"").replace(/\/index\.html$/i,"")}function Z3(y,x){let h=sC(y);for(let[C,l]of Object.entries(x))if(l===h)return C;return""}function t6(y){return y.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function p3(y,x,h){if(!y)return"";for(let l of x)if(l.filename===y)return l.filename;for(let l of x)if(h[l.filename]===y)return l.filename;let C=t6(y);for(let l of x)if(h[l.filename]===C)return l.filename;for(let l of x)if(l.title&&t6(l.title)===C)return l.filename;return""}function y7(y){let x=y.pin==="top"?"A":y.pin==="bottom"?"Z":"M",h=String(y.order??500).padStart(4,"0");return x+h+(y.title||"").toLocaleLowerCase()+"\x00"+y.filename}function TC(y,x){let h=y7(y),C=y7(x);return h>C?1:C>h?-1:0}function Y4(y,x){let h=new Map;for(let k of y)h.set(k.filename,{doc:k,slug:x[k.filename]??"",children:[],depth:0});let C=new Map;for(let k of y){let g=k.parent?p3(k.parent,y,x):"";if(g&&(g===k.filename||!h.has(g)||dC(k.filename,g,y,x)))g="";C.set(k.filename,g)}let l=[];for(let k of y){let g=C.get(k.filename)||"",w=h.get(k.filename);if(g)h.get(g).children.push(w);else l.push(w)}let i=(k,g)=>{k.sort((w,B)=>TC(w.doc,B.doc));for(let w of k)w.depth=g,i(w.children,g+1)};return i(l,0),l}function dC(y,x,h,C){let l=new Map(h.map((g)=>[g.filename,g])),i=x,k=new Set([y]);while(i){if(k.has(i))return!0;k.add(i);let g=l.get(i);i=g?.parent?p3(g.parent,h,C):""}return!1}function R3(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var A2=R3();function g7(y){A2=y}var O0={exec:()=>null};function S(y,x=""){let h=typeof y=="string"?y:y.source,C={replace:(l,i)=>{let k=typeof i=="string"?i:i.source;return k=k.replace(i1.caret,"$1"),h=h.replace(l,k),C},getRegex:()=>new RegExp(h,x)};return C}var LC=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),i1={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(y)=>new RegExp(`^( {0,3}${y})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}#`),htmlBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}<(?:[a-z].*>|!--)`,"i")},rC=/^(?:[ \t]*(?:\n|$))+/,oC=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,nC=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,W0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,fC=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,D3=/(?:[*+-]|\d{1,9}[.)])/,w7=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,B7=S(w7).replace(/bull/g,D3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),uC=S(w7).replace(/bull/g,D3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),H3=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,EC=/^[^\n]+/,b3=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,aC=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",b3).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),mC=S(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,D3).getRegex(),p4="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",S3=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,tC=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",S3).replace("tag",p4).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),z7=S(H3).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",p4).getRegex(),eC=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",z7).getRegex(),M3={blockquote:eC,code:oC,def:aC,fences:nC,heading:fC,hr:W0,html:tC,lheading:B7,list:mC,newline:rC,paragraph:z7,table:O0,text:EC},x7=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",p4).getRegex(),yl={...M3,lheading:uC,table:x7,paragraph:S(H3).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",x7).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",p4).getRegex()},xl={...M3,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",S3).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(H3).replace("hr",W0).replace("heading",` *#{1,6} *[^
|
|
18
|
-
]`).replace("lheading",
|
|
19
|
-
`).map((
|
|
20
|
-
`)}var
|
|
21
|
-
`)}}}fences(y){let x=this.rules.block.fences.exec(y);if(x){let h=x[0],C=
|
|
22
|
-
`)}}blockquote(y){let x=this.rules.block.blockquote.exec(y);if(x){let h=
|
|
15
|
+
`),k=h.length,B=C.length,w=Array.from({length:k+1},()=>Array(B+1).fill(0));for(let j=k-1;j>=0;j-=1)for(let V=B-1;V>=0;V-=1)w[j][V]=h[j]===C[V]?w[j+1][V+1]+1:Math.max(w[j+1][V],w[j][V+1]);let g=[],z=0,q=0;while(z<k&&q<B)if(h[z]===C[q])g.push({op:"context",text:h[z]}),z+=1,q+=1;else if(w[z+1][q]>=w[z][q+1])g.push({op:"remove",text:h[z]}),z+=1;else g.push({op:"add",text:C[q]}),q+=1;while(z<k)g.push({op:"remove",text:h[z]}),z+=1;while(q<B)g.push({op:"add",text:C[q]}),q+=1;return g}var nh={context:" ",add:"+",remove:"-"};class q3 extends ${static preferredTagName="tosi-diff";static initAttributes={original:"",modified:""};static shadowStyleSpec={":host":{display:"block",overflow:"auto",font:"var(--tosi-code-font, 12px/1.5 monospace)",background:"var(--tosi-diff-bg, #fff)",color:"var(--tosi-diff-color, #222)"},":host([hidden])":{display:"none"},".diff-line":{display:"grid",gridTemplateColumns:"1.5em 1fr",whiteSpace:"pre-wrap",wordBreak:"break-word"},".diff-line .marker":{textAlign:"center",userSelect:"none",opacity:"0.5"},".diff-add":{background:"var(--tosi-diff-add-bg, #e6ffed)"},".diff-add .marker":{color:"var(--tosi-diff-add-color, #22863a)"},".diff-remove":{background:"var(--tosi-diff-remove-bg, #ffeef0)"},".diff-remove .marker":{color:"var(--tosi-diff-remove-color, #cb2431)"}};content=()=>[K6({part:"body"})];render(){super.render();let y=G6(this.original,this.modified);this.parts.body.replaceChildren(...y.map((x)=>K6({class:`diff-line diff-${x.op}`},P6({class:"marker"},nh[x.op]),P6({class:"text"},x.text===""?" ":x.text))))}}var q0=q3.elementCreator();var{div:U6}=U,Q6=new Set,l0=(y,x)=>{if(Q6.has(y))return;Q6.add(y),console.warn(`<tosi-code>.${y} was removed in tosijs-ui 1.7 (the editor is now CodeMirror 6, not ACE) — ${x}. See CHANGELOG 1.7.0.`)},$6=!1,V4=!1;class r1 extends ${static preferredTagName="tosi-code";source="";_handle;_loadPromise;_loadGeneration=0;_appliedMode="";_appliedDisabled;_tjsAutocomplete;get tjsAutocomplete(){return this._tjsAutocomplete}set tjsAutocomplete(y){if(this._tjsAutocomplete=y,this._handle&&this.isTjsMode())this.applyTjsExtension()}get value(){return this._handle?this._handle.getValue():this.source}set value(y){if(this._handle)this._handle.setValue(y);else this.source=y}_original;get original(){return this._original??this.value}set original(y){this._original=y}diffOverlay;_pendingDiff;get showingDiff(){if(!this.hydrated)return this._pendingDiff??!1;return!this.parts.diffHost.hidden}showDiff(y){if(!this.hydrated){this._pendingDiff=y;return}let{diffHost:x}=this.parts;if(y){if(this.diffOverlay===void 0)this.diffOverlay=q0(),x.append(this.diffOverlay);this.diffOverlay.original=this.original,this.diffOverlay.modified=this.value}x.hidden=!y}static initAttributes={mode:"javascript",disabled:!1};role="code editor";get editor(){if(!$6)$6=!0,console.info("<tosi-code>.editor is the CodeMirror 6 EditorView (the supported accessor; it was an ACE editor in 1.6). ACE-era `editor.session` / `getSession()` / "+"`setOption()` are gone — use undo()/redo()/canUndo()/canRedo() for history.");return this._handle?.view}get theme(){return l0("theme","style the editor with --code-bg / --text-color instead"),""}set theme(y){l0("theme","style the editor with --code-bg / --text-color instead")}get options(){return l0("options","configure CodeMirror via the `editor` (EditorView) instead"),{}}set options(y){l0("options","configure CodeMirror via the `editor` (EditorView) instead")}get ace(){l0("ace","use `editor`, which is now a CodeMirror EditorView");return}undo(){this._handle?.undo()}redo(){this._handle?.redo()}canUndo(){return this._handle?.canUndo()??!1}canRedo(){return this._handle?.canRedo()??!1}content=()=>[U6({part:"host"}),U6({part:"diffHost",hidden:!0})];static shadowStyleSpec={":host":{display:"block",position:"relative",width:"100%",height:"100%"},'[part="host"]':{height:"100%"},'[part="diffHost"]':{position:"absolute",inset:"0",zIndex:"5",overflow:"auto",background:_.tosiDiffBg(_.background("#fff"))},".cm-editor":{height:"100%"},".cm-scroller":{outline:"none",fontFamily:"Menlo, Monaco, Consolas, 'Courier New', monospace"}};handleResize(){this._handle?.refresh()}connectedCallback(){if(super.connectedCallback(),this.source==="")this.value=this.textContent!==null?this.textContent.trim():"";if(this._pendingDiff!==void 0){let y=this._pendingDiff;this._pendingDiff=void 0,this.showDiff(y)}if(this._loadPromise===void 0){let y=++this._loadGeneration;this._loadPromise=import("./code-editor-cm-95n31m4f.js").then(({createCmEditor:x})=>{if(y!==this._loadGeneration||!this.isConnected)return;let h=x(this.parts.host,{value:this.source,mode:this.mode,readOnly:this.disabled,root:this.shadowRoot??void 0,onChange:(C)=>this.dispatchEvent(new CustomEvent("change",{detail:{value:C}}))});return this._handle=h,this._appliedMode=this.mode,this._appliedDisabled=this.disabled,this.applyTjsExtension(),h})}}disconnectedCallback(){if(super.disconnectedCallback(),this._handle)this.source=this._handle.getValue(),this._handle.destroy(),this._handle=void 0;this._loadPromise=void 0,this._appliedMode="",this._appliedDisabled=void 0}isTjsMode(){return this.mode==="tjs"||this.mode==="ajs"}applyTjsExtension(){let y=this._handle;if(!y||!this.isTjsMode())return;import("./code-editor-cm-95n31m4f.js").then(({loadTjsExtension:x})=>x(this._tjsAutocomplete??{})).then((x)=>{if(x&&this._handle===y&&this.isTjsMode()){y.setLanguageExtension(x),this._tjsExtensionApplied=!0;return}if(!x&&this._handle===y&&this.isTjsMode()&&!V4)V4=!0,console.warn(`<tosi-code mode="${this.mode}">: tjs-lang's CodeMirror extension did not load — `+"falling back to TypeScript highlighting (no tjs autocomplete). Install the optional peer `tjs-lang`, or check that tjs-lang/editors/codemirror still exports `tjsEditorExtension`.")}).catch((x)=>{if(!V4)V4=!0,console.warn("<tosi-code>: failed to apply the tjs extension —",x)})}get tjsExtensionApplied(){return this._tjsExtensionApplied}_tjsExtensionApplied=!1;render(){if(super.render(),this._handle){if(this.disabled!==this._appliedDisabled)this._handle.setReadOnly(this.disabled),this._appliedDisabled=this.disabled;if(this.mode!==this._appliedMode)this._handle.setMode(this.mode),this._appliedMode=this.mode,this.applyTjsExtension()}}}var m1=r1.elementCreator();var{input:l3}=U,O6=Y.fromCss("#8888");class Y6 extends ${static preferredTagName="tosi-color";value=O6.rgba;color=O6;static shadowStyleSpec={":host":{_gap:8,_swatchSize:32,_cssWidth:72,_alphaWidth:72,display:"inline-flex",gap:l.gap,alignItems:"center"},':host input[type="color"]':{border:0,width:l.swatchSize,height:l.swatchSize,background:"transparent"},":host::part(alpha)":{width:l.alphaWidth},":host::part(css)":{width:l.cssWidth,fontFamily:"monospace"}};content=[l3({title:"base color",type:"color",part:"rgb"}),l3({type:"range",title:"opacity",part:"alpha",min:0,max:1,step:0.05}),l3({title:"css color spec",part:"css"})];update=(y)=>{let{rgb:x,alpha:h,css:C}=this.parts;if(y.type==="input")this.color=Y.fromCss(x.value),this.color.a=Number(h.value),C.value=this.color.html;else this.color=Y.fromCss(C.value),x.value=this.color.html.substring(0,7),h.value=String(this.color.a);x.style.opacity=String(this.color.a),this.value=this.color.rgba};connectedCallback(){super.connectedCallback();let{rgb:y,alpha:x,css:h}=this.parts;y.addEventListener("input",this.update),x.addEventListener("input",this.update),h.addEventListener("change",this.update)}render(){let{rgb:y,alpha:x,css:h}=this.parts;this.color=Y.fromCss(this.value);let C=this.color.rgba,k=String(this.color.a),B=(w)=>{try{return Y.fromCss(w).rgba===C}catch{return!1}};if(!B(y.value))y.value=this.color.html.substring(0,7);if(y.style.opacity!==k)y.style.opacity=k;if(x.value!==k)x.value=k;if(!B(h.value))h.value=this.color.html}}var j3=Y6.elementCreator();var x2=U.div({style:{content:" ",position:"fixed",top:0,left:0,right:0,bottom:0}}),X4={passive:!0},_1=(y,x,h="move")=>{if(!y.type.startsWith("touch")){let{clientX:k,clientY:B}=y;x2.style.cursor=h,h2(x2),document.body.append(x2);let w=(g)=>{let z=g.clientX-k,q=g.clientY-B;if(x(z,q,g)===!0)x2.removeEventListener("mousemove",w),x2.removeEventListener("mouseup",w),x2.remove()};x2.addEventListener("mousemove",w,X4),x2.addEventListener("mouseup",w,X4)}else if(y instanceof TouchEvent){let k=y.changedTouches[0],B=k.identifier,w=k.clientX,g=k.clientY,z=y.target,q=0,j=0,V=(A)=>{let P=[...A.touches].find((G)=>G.identifier===B);if(P!==void 0)q=P.clientX-w,j=P.clientY-g;if(A.type==="touchmove")A.stopPropagation(),A.preventDefault();if(x(q,j,A)===!0||P===void 0)z.removeEventListener("touchmove",V),z.removeEventListener("touchend",V),z.removeEventListener("touchcancel",V)};z.addEventListener("touchmove",V),z.addEventListener("touchend",V,X4),z.addEventListener("touchcancel",V,X4)}},_2=(y="body *")=>[...document.querySelectorAll(y)].map((x)=>parseFloat(getComputedStyle(x).zIndex)).reduce((x,h)=>isNaN(x)||Number(x)<h?h:Number(x),0),h2=(y,x="body *")=>{y.style.zIndex=String(_2(x)+1)};function _4(y,x=!0){return(h,C)=>{let k=y(h),B=y(C);for(let w in k)if(k[w]!==B[w])return(Array.isArray(x)?x[w]!==!1:x)?k[w]>B[w]?1:-1:k[w]>B[w]?-1:1;return 0}}var{slot:Eh}=U;class Y1 extends ${static preferredTagName="tosi-float";static floats=new Set;static initAttributes={drag:!1,remainOnResize:"remove",remainOnScroll:"remain"};content=Eh();static shadowStyleSpec={":host":{position:"fixed"}};reposition=(y)=>{if(y instanceof MouseEvent&&y.button!==0)return;if(y.target?.closest(".no-drag"))return;if(this.drag){h2(this);let h=this.offsetLeft,C=this.offsetTop;_1(y,(k,B,w)=>{if(this.style.left=`${h+k}px`,this.style.top=`${C+B}px`,this.style.right="auto",this.style.bottom="auto",w.type==="mouseup")return!0})}};connectedCallback(){super.connectedCallback(),th(),Y1.floats.add(this);let y={passive:!0};this.addEventListener("touchstart",this.reposition,y),this.addEventListener("mousedown",this.reposition,y),h2(this)}disconnectedCallback(){super.disconnectedCallback(),Y1.floats.delete(this)}}var oh=Y1,j0=Y1.elementCreator(),ah=j0,i6=!1;function th(){if(i6)return;i6=!0,window.addEventListener("resize",()=>{Array.from(Y1.floats).forEach((y)=>{if(y.remainOnResize==="hide")y.hidden=!0;else if(y.remainOnResize==="remove")y.remove()})},{passive:!0}),document.addEventListener("scroll",(y)=>{if(y.target instanceof HTMLElement&&y.target.closest(Y1.tagName))return;Array.from(Y1.floats).forEach((x)=>{if(x.remainOnScroll==="hide")x.hidden=!0;else if(x.remainOnScroll==="remove")x.remove()})},{passive:!0,capture:!0})}var V0=(y)=>{let{content:x,target:h,position:C,remainOnScroll:k,remainOnResize:B,draggable:w}=y,g=Array.isArray(x)?j0(...x):j0(x);if(A4(g,h,C,k,B,w),y.class)g.setAttribute("class",y.class);return document.body.append(g),g},A4=(y,x,h,C,k,B=!1)=>{{let{position:G}=getComputedStyle(y);if(G!=="fixed")y.style.position="fixed";if(y instanceof Y1){if(k)y.remainOnResize=k;if(C)y.remainOnScroll=C;y.drag=B}h2(y)}let{left:w,top:g,width:z,height:q}=x.getBoundingClientRect(),j=w+z*0.5,V=g+q*0.5,A=window.innerWidth,P=window.innerHeight;if(h==="side")h=(j<A*0.5?"e":"w")+(V<P*0.5?"s":"n");else if(h==="auto"||h===void 0)h=(V<P*0.5?"s":"n")+(j<A*0.5?"e":"w");if(y.style.top=y.style.left=y.style.right=y.style.bottom=y.style.transform="",h.length===2){let[G,i]=h;switch(G){case"n":y.style.bottom=(P-g).toFixed(2)+"px";break;case"e":y.style.left=(w+z).toFixed(2)+"px";break;case"s":y.style.top=(g+q).toFixed(2)+"px";break;case"w":y.style.right=(A-w).toFixed(2)+"px";break}switch(i){case"n":y.style.bottom=(P-g-q).toFixed(2)+"px";break;case"e":y.style.left=w.toFixed(2)+"px";break;case"s":y.style.top=g.toFixed(2)+"px";break;case"w":y.style.right=(A-w-z).toFixed(2)+"px";break}y.style.transform=""}else if(h==="n")y.style.bottom=(P-g).toFixed(2)+"px",y.style.left=j.toFixed(2)+"px",y.style.transform="translateX(-50%)";else if(h==="s")y.style.top=(g+q).toFixed(2)+"px",y.style.left=j.toFixed(2)+"px",y.style.transform="translateX(-50%)";else if(h==="e")y.style.left=(w+z).toFixed(2)+"px",y.style.top=V.toFixed(2)+"px",y.style.transform="translateY(-50%)";else if(h==="w")y.style.right=(A-w).toFixed(2)+"px",y.style.top=V.toFixed(2)+"px",y.style.transform="translateY(-50%)";y.style.setProperty("--max-height",`calc(100vh - ${y.style.top||y.style.bottom})`),y.style.setProperty("--max-width",`calc(100vw - ${y.style.left||y.style.right})`)};var F6=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||""),eh=F6?{meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",escape:"⎋"}:{meta:"Meta",ctrl:"Ctrl",alt:"Alt",shift:"Shift",escape:"Esc"},N6=(y)=>{if(y.code)return y.code.replace(/^Key|^Digit/,"");return y.key},yC=(y)=>{let x=[];if(y.altKey)x.push("alt");if(y.ctrlKey)x.push("ctrl");if(y.metaKey)x.push("meta");if(y.shiftKey)x.push("shift");return x.push(N6(y)),x.join("-")},xC=[[/\^|ctrl-?/i,"ctrlKey"],[/⌘|meta-?/i,"metaKey"],[/⌥|⎇|alt-?|option-?/i,"altKey"],[/⇧|shift-?/i,"shiftKey"]],K4=(y)=>{let x=y.trim(),h={ctrlKey:!1,metaKey:!1,altKey:!1,shiftKey:!1,key:""};for(let[C,k]of xC)if(C.test(x))h[k]=!0,x=x.replace(C,"");return x=x.replace(/^-+/,""),h.key=x.toLowerCase(),h},V3=(y,x)=>{let h=K4(x);return y.key.toLowerCase()===h.key&&y.metaKey===h.metaKey&&y.ctrlKey===h.ctrlKey&&y.altKey===h.altKey&&y.shiftKey===h.shiftKey},hC=(y)=>{let x=K4(y),h=[];if(x.altKey)h.push("alt");if(x.ctrlKey)h.push("ctrl");if(x.metaKey)h.push("meta");if(x.shiftKey)h.push("shift");return h.push(x.key),h.join("-")},P4=(y)=>{let x=K4(y);if(F6){let C=[];if(x.ctrlKey)C.push("⌃");if(x.altKey)C.push("⌥");if(x.shiftKey)C.push("⇧");if(x.metaKey)C.push("⌘");return C.push(x.key.toUpperCase()),C.join("")}let h=[];if(x.ctrlKey)h.push("Ctrl");if(x.altKey)h.push("Alt");if(x.shiftKey)h.push("Shift");if(x.metaKey)h.push("Meta");return h.push(x.key.toUpperCase()),h.join("+")};var U4={};c5(U4,{stringToTypes:()=>v2,isTypeAllowed:()=>M2,init:()=>A3,draggedElement:()=>gC});var CC=()=>!!document.querySelector(".drag-source"),M2=(y,x)=>{if(!y)return!1;for(let h of y)if(h==="special/any")return!0;else if(h.indexOf("*")>-1){let[C,k]=h.split("/"),[B,w]=x.split("/");if((C==="*"||C===B)&&(k==="*"||k===w))return!0}else if(h===x)return!0},G4=(y)=>{for(let x of[...document.querySelectorAll(`.${y}`)])x.classList.remove(y)},Z6=()=>{if(H2)H2.disconnect(),H2=null;X3=[],G4("drag-over"),G4("drag-source"),G4("drag-target")},v2=(y,x=";")=>{return(y||"").split(x).map((h)=>h.trim()).filter((h)=>h!=="")},X3=[],H2=null,_3=(y)=>{if(!y)y=[];X3=y;let x=[...document.querySelectorAll("[data-drop]")];for(let h of x){let C=v2(h.dataset.drop);if(y.find((k)=>M2(C,k)))h.classList.add("drag-target");else h.classList.remove("drag-target")}if(!H2)H2=new MutationObserver(()=>_3(X3)),H2.observe(document.body,{childList:!0,subtree:!0})};function kC(y){let x=y.target?.closest('[draggable="true"],a[href]');if(!x)return;x.classList.add("drag-source");let h=x.matches('[draggable="true"]')?v2(x.dataset.drag||"text/html"):v2(x.dataset.drag||"url");for(let C of h){let k=x.dataset.dragContent||(C==="text/html"?x.innerHTML:x.textContent);y.dataTransfer?.setData(C,k||"")}_3(y.dataTransfer?.types),y.stopPropagation()}function W6(y){if(!CC())_3(y.dataTransfer?.types);let x=y.target.closest(".drag-target");if(x&&y.dataTransfer)x.classList.add("drag-over"),y.dataTransfer.dropEffect="copy";else y.preventDefault(),y.stopPropagation()}function BC(){G4("drag-over")}function wC(y){let x=y.target.closest(".drag-target");if(x){let h=(x.dataset?.drop||"").split(";");for(let C of h)if(M2(y.dataTransfer?.types,C))if(C==="text/html")x.innerHTML=y.dataTransfer?.getData(C)||"";else x.textContent=y.dataTransfer?.getData(C)||""}Z6()}var gC=()=>document.querySelector(".drag-source"),J6=!1,A3=()=>{if(J6)return;document.body.addEventListener("dragstart",kC),document.body.addEventListener("dragenter",W6),document.body.addEventListener("dragover",W6),document.body.addEventListener("drop",wC),document.body.addEventListener("dragleave",BC),document.body.addEventListener("dragend",Z6),window.addEventListener("dragover",(y)=>y.preventDefault()),window.addEventListener("drop",(y)=>y.preventDefault()),J6=!0};var U1=(y)=>typeof y==="function"?y():y,{div:R6,button:A0,span:E,a:zC,tosiSlot:qC}=U,M6=(y)=>{let x=[];for(let h of y)if(h===null){if(x.length>0&&x[x.length-1]!==null)x.push(h)}else x.push(h);while(x.length>0&&x[x.length-1]===null)x.pop();return x},_0=(y,x,h=!1)=>{let C=[];for(let k of y){if(k===null){C.push(k);continue}if(typeof k==="function"){C.push(k);continue}let{acceptsDrop:B}=k;if(!B){if(!h)C.push({...k,enabled:()=>!1});continue}if(!x.some((z)=>M2(B,z))){if(!h)C.push({...k,enabled:()=>!1});continue}let g=k;if(g.menuItems){let z=_0(U1(g.menuItems),x,!0);if(z.length>0||g.dropAction){let q=h?z:_0(U1(g.menuItems),x,!1);C.push({...g,menuItems:q})}else if(!h)C.push({...g,enabled:()=>!1})}else C.push(k)}return M6(C)},K3=(y,x=!1)=>{let h=[];for(let C of y){if(C===null){h.push(C);continue}if(typeof C==="function"){h.push(C);continue}let{action:k,menuItems:B}=C;if(k||B)if(B){let w=K3(U1(B),!0);if(w.length>0){let g=x?w:K3(U1(B),!1);h.push({...C,menuItems:g})}else if(!x)h.push({...C,enabled:()=>!1})}else h.push(C);else if(!x)h.push({...C,enabled:()=>!1})}return M6(h)},lC={overflow:"hidden auto",maxHeight:`calc(${l.maxHeight} - ${_.menuInset("8px")})`,borderRadius:l.spacing50,background:_.menuBg("#fafafa"),boxShadow:_.menuShadow(`${l.spacing13} ${l.spacing50} ${l.spacing} #0004`)},jC={boxShadow:"none",border:"none !important",display:"grid",alignItems:"center",justifyContent:"flex-start",textDecoration:"none",gridTemplateColumns:"0px 1fr max-content",width:"100%",gap:0,background:"transparent",padding:_.menuItemPadding("0 8px"),height:_.menuItemHeight("48px"),lineHeight:_.menuItemHeight("48px"),textAlign:"left"},VC={color:_.menuItemColor("#222")},XC={boxShadow:"none !important",background:_.menuItemHoverBg("#eee")},D6={boxShadow:"none !important",background:_.menuItemActiveBg("#aaa"),color:_.menuItemActiveColor("#000")},_C={background:`${_.menuDropOverBg("#2196F3")} !important`,color:`${_.menuDropOverColor("#fff")} !important`},AC={color:`${_.menuDropOverColor("#fff")} !important`},KC={stroke:`${_.menuDropOverColor("#fff")} !important`},H6={boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${_.menuDropOverBg("#2196F3")} 50%, transparent) !important`},PC={".xin-menu, .tosi-menu":lC,".xin-menu > div, .tosi-menu > div":{width:_.menuWidth("auto")},".xin-menu-trigger, .tosi-menu-trigger":{paddingLeft:0,paddingRight:0,minWidth:_.touchSize("48px")},".xin-menu-separator, .tosi-menu-separator":{display:"inline-block",content:" ",height:"1px",width:"100%",background:_.menuSeparatorColor("#2224"),margin:_.menuSeparatorMargin("8px 0")},".xin-menu-element, .tosi-menu-element":{minHeight:_.menuItemHeight("48px")},".xin-menu-item, .tosi-menu-item":jC,".xin-menu-item, .xin-menu-item > span, .tosi-menu-item, .tosi-menu-item > span":VC,".xin-menu-with-icons .xin-menu-item, .tosi-menu-with-icons .tosi-menu-item":{gridTemplateColumns:"24px 1fr max-content",gap:_.menuItemGap("8px")},".xin-menu-shortcut, .tosi-menu-shortcut":{whiteSpace:"nowrap",paddingLeft:"1em",textAlign:"right",opacity:"0.65"},".xin-menu-item > :first-child, .tosi-menu-item > :first-child":{justifySelf:"center",alignSelf:"center"},".xin-menu-item svg, .tosi-menu-item svg":{stroke:_.menuItemIconColor("#222")},".xin-menu-item.xin-menu-item-checked, .tosi-menu-item.tosi-menu-item-checked":{background:_.menuItemHoverBg("#eee")},".xin-menu-item > span:nth-child(2), .tosi-menu-item > span:nth-child(2)":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"left"},".xin-menu-item:hover, .tosi-menu-item:hover":XC,".xin-menu-item.drag-target:hover, .tosi-menu-item.drag-target:hover":H6,".xin-menu-item:active, .tosi-menu-item:active":D6,".xin-menu-item:active svg, .tosi-menu-item:active svg":{stroke:_.menuItemIconActiveColor("#000")},".xin-menu-item-highlight, .tosi-menu-item-highlight":D6,".xin-menu-item-highlight svg, .tosi-menu-item-highlight svg":{stroke:_.menuItemIconActiveColor("#000")},".xin-drop-over, .tosi-drop-over":_C,".xin-drop-over > span, .tosi-drop-over > span":AC,".xin-drop-over svg, .tosi-drop-over svg":KC,".drag-target":H6},v6=!1;function G3(){if(v6)return;v6=!0,O1("xin-menu-helper",PC),document.addEventListener("mousedown",(y)=>{if(x1.length===0)return;let x=y.composedPath();if(!x1.find((h)=>x.includes(h.target)||x.includes(h.menu)))h1(0)}),document.body.addEventListener("keydown",(y)=>{if(y.key==="Escape")h1(0)})}var S6=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,C=y?.icon||h||E(" ");if(typeof C==="string")C=Q[C]();let k=x.role==="listbox"?"option":"menuitem",B,w=y.properties||{};if(typeof y?.action==="string")B=zC(w,{role:k,href:y.action},C,x.localized?E(p(y.caption)):E(y.caption),E({class:"tosi-menu-shortcut"},y.shortcut?P4(y.shortcut):" "));else B=A0(w,{role:k,onClick:y.action},C,x.localized?E(p(y.caption)):E(y.caption),E({class:"tosi-menu-shortcut"},y.shortcut?P4(y.shortcut):" "));if(B.classList.add("xin-menu-item","tosi-menu-item"),B.classList.toggle("xin-menu-item-checked",h!==!1),B.classList.toggle("tosi-menu-item-checked",h!==!1),y.tooltip)B.dataset.tooltip=y.tooltip;if(x.role==="listbox")B.toggleAttribute("aria-selected",h!==!1);if(y?.enabled&&!y.enabled())B.setAttribute("disabled",""),B.setAttribute("aria-disabled","true");return B},I6=(y,x)=>{let h=y?.icon||E(" ");if(typeof h==="string")h=Q[h]();let C=y.properties||{},k=A0(C,{onDragenter(B){I2(),k.classList.add("xin-drop-over","tosi-drop-over"),B.preventDefault()},onDragover(B){if(B.preventDefault(),B.dataTransfer)B.dataTransfer.dropEffect="copy"},onDragleave(B){let w=B.relatedTarget;if(w&&k.contains(w))return;k.classList.remove("xin-drop-over","tosi-drop-over")},onDrop(B){if(B.preventDefault(),B.stopPropagation(),k.classList.remove("xin-drop-over","tosi-drop-over"),y.dropAction&&B.dataTransfer)y.dropAction(B.dataTransfer);h1(0)}},h,x.localized?E(p(y.caption)):E(y.caption),E(" "));if(k.classList.add("xin-menu-item","tosi-menu-item"),y.tooltip)k.dataset.tooltip=y.tooltip;if(y.dropAction&&y.acceptsDrop)k.dataset.drop=y.acceptsDrop.join(";");if(y?.enabled&&!y.enabled())k.setAttribute("disabled",""),k.setAttribute("aria-disabled","true");return k},P3=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,C=y?.icon||h||E(" ");if(typeof C==="string")C=Q[C]();let k=null,B=!1,w=y.properties||{},g=A0(w,{disabled:!(!y.enabled||y.enabled()),onClick(z){if(x._dropMode)return;r(Object.assign({},x,{menuItems:U1(y.menuItems),target:g,submenuDepth:(x.submenuDepth||0)+1,position:"side"})),z.stopPropagation(),z.preventDefault()},onDragenter(z){if(!x._dropMode)return;I2(),z.preventDefault(),z.stopPropagation();let q=z.relatedTarget;if(q&&g.contains(q))return;if(g.classList.add("xin-drop-over","tosi-drop-over"),B){if(h1((x.submenuDepth||0)+1),B=!1,k)clearTimeout(k);k=null;return}if(k)clearTimeout(k);k=setTimeout(()=>{B=!0;let j=U1(y.menuItems),V=x._dataTypes?_0(j,x._dataTypes,x.hideDisabled):j;if(V.length>0)r(Object.assign({},x,{menuItems:V,target:g,submenuDepth:(x.submenuDepth||0)+1,position:"side",_dropMode:!0,_dataTypes:x._dataTypes}))},x.disclosureDelay??200)},onDragover(z){if(!x._dropMode)return;if(z.preventDefault(),z.stopPropagation(),z.dataTransfer)z.dataTransfer.dropEffect=y.dropAction?"copy":"link"},onDragleave(z){if(!x._dropMode)return;let q=z.relatedTarget;if(q&&g.contains(q))return;if(B&&q&&x1.some((j)=>j.menu.contains(q)||j.target.contains(q)))return;if(g.classList.remove("xin-drop-over","tosi-drop-over"),k)clearTimeout(k),k=null},onDrop(z){if(!x._dropMode||!y.dropAction)return;if(z.preventDefault(),z.stopPropagation(),g.classList.remove("xin-drop-over","tosi-drop-over"),z.dataTransfer)y.dropAction(z.dataTransfer);h1(0)}},C,x.localized?E(p(y.caption)):E(y.caption),Q.chevronRight({style:{justifySelf:"flex-end"}}));if(g.classList.add("xin-menu-item","tosi-menu-item"),y.tooltip)g.dataset.tooltip=y.tooltip;if(x._dropMode&&y.dropAction&&y.acceptsDrop)g.dataset.drop=y.acceptsDrop.join(";");return g},b6=(y,x)=>{if(y===null)return E({class:"xin-menu-separator tosi-menu-separator"});else if(typeof y==="function"){let h=y();return h.classList.add("xin-menu-element","tosi-menu-element"),h}else if(x._dropMode){let h=y;if(h.menuItems&&U1(h.menuItems).length>0)return P3(h,x);else if(y.dropAction)return I6(y,x);else{let k=y?.icon||E(" ");if(typeof k==="string")k=Q[k]();return A0({class:"xin-menu-item tosi-menu-item",disabled:!0},k,x.localized?E(p(y.caption)):E(y.caption),E(" "))}}else{let h=y?.action?S6(y,x):P3(y,x);if(x.showChecked&&y.checked&&y.checked())requestAnimationFrame(()=>{h.scrollIntoView({block:"center"})});return h}},T6=(y)=>{let{target:x,width:h,menuItems:C,role:k="menu"}=y,B=C.find((z)=>z!=null&&typeof z!=="function"&&(z.icon||z.checked)),w=y.submenuDepth||0,g=R6({class:B?"xin-menu tosi-menu xin-menu-with-icons tosi-menu-with-icons":"xin-menu tosi-menu",role:k,onClick(){if(!y._dropMode)h1(0)},onDragover(z){if(!y._dropMode)return;z.preventDefault()},onDragenter(){if(!y._dropMode)return;I2()},onDragleave(z){if(!y._dropMode)return;let q=z.relatedTarget;if(q&&g.contains(q))return;if(q&&x1.some((j)=>j.menu.contains(q)||j.target.contains(q)))return;p6(w)}},R6({style:{minWidth:x.offsetWidth+"px",width:typeof h==="number"?`${h}px`:h},onMousedown(z){z.preventDefault(),z.stopPropagation()}},...C.map((z)=>b6(z,y))));return g},S2,x1=[],X0=null,I2=()=>{if(X0)clearTimeout(X0),X0=null},p6=(y)=>{I2(),X0=setTimeout(()=>{X0=null,h1(y)},500)},h1=(y=0)=>{if(I2(),y===0)document.querySelectorAll("tosi-menu.xin-drop-over, tosi-menu.tosi-drop-over").forEach((h)=>h.classList.remove("xin-drop-over","tosi-drop-over"));let x=x1.splice(y);for(let h of x)if(h.menu.remove(),h.onClose)h.onClose();return S2=x[0],y>0?x1[y-1]:void 0},r=(y)=>{G3(),y=Object.assign({submenuDepth:0},y);let{target:x,position:h,submenuDepth:C}=y;if(S2&&!document.body.contains(S2?.menu))S2=void 0;if(x1.length&&!document.body.contains(x1[0].menu))x1.splice(0);if(y._dropMode){if(x1.length>C&&x1[C]?.target===x)return;h1(C)}else{if(C===0&&S2?.target===x)return;let w=h1(C);if(S2?.target===x)return;if(w&&w.target===x){h1();return}}if(!y.menuItems?.length)return;let k=T6(y),B=V0({content:k,target:x,position:h});B.remainOnScroll=y._dropMode?"remain":"remove",x1.push({target:x,menu:B,onClose:y.onClose})},L6=(y)=>{G3();let{dataTypes:x,...h}=y,C=_0(y.menuItems,x,y.hideDisabled);if(!C.length)return;r({...h,menuItems:C,_dropMode:!0,_dataTypes:x})};function U3(y,x,h=[]){for(let C of y){if(!C)continue;if(typeof C==="function")continue;let{shortcut:k}=C,{menuItems:B}=C;if(k){if(V3(x,k)){let w=C;if(w.enabled&&!w.enabled())return;if(h.some((g)=>g.enabled&&!g.enabled()))return;return{action:w,path:h}}}else if(B){let w=U3(U1(B),x,[...h,C]);if(w)return w}}return}class Q4 extends ${static preferredTagName="tosi-menu";static lightStyleSpec={":host":{display:"inline-flex",minWidth:l.touchSize,minHeight:l.touchSize},":host button":{margin:0,padding:0,alignSelf:"stretch",flex:"1",textAlign:"center"},":host button > tosi-slot":{display:"flex",alignItems:"center",gap:_.tosiMenuTriggerGap("10px")}};static initAttributes={menuWidth:"auto",localized:!1,icon:"",acceptsDrop:"",disclosureDelay:0,hideDisabled:!1};menuItems=[];dropAction=null;_dragMatches=!1;_matchesDrag(y){if(!this.acceptsDrop)return!1;let x=v2(this.acceptsDrop);return[...y.dataTransfer?.types||[]].some((C)=>x.some((k)=>M2([k],C)))}showMenu=(y)=>{if(y.type==="click"||y.code==="Space")r({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),y.stopPropagation(),y.preventDefault()};handleDragEnter=(y)=>{if(this._dragMatches=this._matchesDrag(y),!this._dragMatches)return;I2(),this.classList.add("xin-drop-over","tosi-drop-over");let x=[...y.dataTransfer?.types||[]];if(this.menuItems.length)L6({target:this.parts.trigger,menuItems:this.menuItems,dataTypes:x,width:this.menuWidth,localized:this.localized,disclosureDelay:this.disclosureDelay||void 0,hideDisabled:this.hideDisabled});y.preventDefault()};handleDragOver=(y)=>{if(!this._dragMatches)return;if(y.preventDefault(),y.dataTransfer)y.dataTransfer.dropEffect=this.dropAction?"copy":"link"};handleDragLeave=(y)=>{if(!this._dragMatches)return;let x=y.relatedTarget;if(x&&this.contains(x))return;if(x&&x1.some((h)=>h.menu.contains(x)||h.target.contains(x))){this.classList.remove("xin-drop-over","tosi-drop-over");return}this.classList.remove("xin-drop-over","tosi-drop-over"),p6(0)};handleDrop=(y)=>{if(!this._dragMatches||!this.dropAction)return;if(y.preventDefault(),y.stopPropagation(),this.classList.remove("xin-drop-over","tosi-drop-over"),y.dataTransfer)this.dropAction(y.dataTransfer);h1(0)};content=()=>A0({tabindex:0,part:"trigger",onClick:this.showMenu},qC());handleShortcut=async(y)=>{let x=U3(this.menuItems,y);if(!x)return;y.preventDefault(),y.stopImmediatePropagation();let{action:h,path:C}=x;if(this.isConnected&&document.body.contains(this))await this.animateShortcut(C,h);if(h.action instanceof Function)h.action()};findMenuItemByCaption(y,x){for(let h of y.querySelectorAll(".xin-menu-item")){let C=h.children[1];if(C&&C.textContent===x)return h}return null}async animateShortcut(y,x){h1(0),r({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),await new Promise((C)=>setTimeout(C,80));for(let C=0;C<y.length;C++){let k=C+1,B=x1[C]?.menu;if(!B)break;let w=this.findMenuItemByCaption(B,y[C].caption);if(!w)break;r({target:w,width:this.menuWidth,localized:this.localized,menuItems:U1(y[C].menuItems),submenuDepth:k,position:"side"}),await new Promise((g)=>setTimeout(g,80))}let h=x1[x1.length-1]?.menu;if(h){let C=this.findMenuItemByCaption(h,x.caption);if(C)C.classList.add("xin-menu-item-highlight","tosi-menu-item-highlight")}await new Promise((C)=>setTimeout(C,300)),h1(0)}constructor(){super();this.addEventListener("keydown",this.showMenu),this.addEventListener("dragenter",this.handleDragEnter),this.addEventListener("dragover",this.handleDragOver),this.addEventListener("dragleave",this.handleDragLeave),this.addEventListener("drop",this.handleDrop)}connectedCallback(){if(super.connectedCallback(),G3(),document.addEventListener("keydown",this.handleShortcut,!0),this.acceptsDrop)this.dataset.drop=this.acceptsDrop}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleShortcut)}}var c6=Q4.elementCreator(),GC=c6,UC=Q4;var{button:QC,span:d6,input:$C}=U,f6=(y,x)=>{return!!y.find((h)=>{if(h===null||x==null)return!1;else if(Array.isArray(h))return f6(h,x);else if(h.value===x||h===x)return!0})};class I1 extends ${static preferredTagName="tosi-select";static formAssociated=!0;static lightStyleSpec={":host":{"--tosi-select-gap":"var(--tosi-spacing-sm, 8px)","--tosi-select-touch-size":"var(--tosi-touch-size, 44px)","--tosi-select-padding":"0 var(--tosi-spacing-sm, 8px)","--tosi-select-value-padding":"0 var(--tosi-spacing-sm, 8px)","--tosi-select-icon-width":"24px","--tosi-select-field-width":"140px","--gap":"var(--tosi-select-gap)","--touch-size":"var(--tosi-select-touch-size)","--padding":"var(--tosi-select-padding)","--value-padding":"var(--tosi-select-value-padding)","--icon-width":"var(--tosi-select-icon-width)","--fieldWidth":"var(--tosi-select-field-width)",display:"inline-flex",position:"relative"},":host button":{display:"flex",alignItems:"center",justifyItems:"center",gap:l.tosiSelectGap,textAlign:"left",height:l.tosiSelectTouchSize,padding:l.tosiSelectPadding,position:"relative",width:"100%"},":host:not([show-icon]) button > :first-child":{display:"none"},":host[hide-caption] button > :nth-child(2)":{display:"none"},':host [part="value"]':{width:l.tosiSelectFieldWidth,padding:l.tosiSelectValuePadding,height:l.tosiSelectTouchSize,lineHeight:l.tosiSelectTouchSize,boxShadow:"none",whiteSpace:"nowrap",outline:"none",background:"transparent",flex:"1"},':host [part="value"]:not(:focus)':{overflow:"hidden",textOverflow:"ellipsis",background:"transparent"}};static initAttributes={editable:!1,placeholder:"",showIcon:!1,hideCaption:!1,localized:!1,disabled:!1,required:!1,name:""};_options=[];get options(){return this._options}set options(y){if(typeof y==="string")this._options=I1.parseOptionsString(y);else this._options=y;this.queueRender()}static parseOptionsString(y){return y.split(",").map((x)=>{let h=x.trim();if(h==="")return null;let[C,k]=h.split("=").map((g)=>g.trim());if(!k)return{value:C,caption:C};let[B,w]=k.split(":").map((g)=>g.trim());return{value:C,caption:B||C,icon:w||void 0}})}value="";filter="";isExpanded=!1;formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value=""}setValue=(y,x=!1)=>{if(this.value!==y)this.value=y,this.queueRender(!0);if(x)this.dispatchEvent(new Event("action"))};getValue=()=>this.value;get selectOptions(){return this.options}buildOptionMenuItem=(y)=>{if(y===null)return null;let{setValue:x,getValue:h}=this,C,k,B,w,g;if(typeof y==="string")k=B=y;else({icon:C,caption:k,value:B,tooltip:w,properties:g}=y);if(this.localized)k=p(k);let{options:z}=y;if(z)return{icon:C,caption:k,tooltip:w,properties:g,checked:()=>f6(z,h()),menuItems:z.map(this.buildOptionMenuItem)};return{icon:C,caption:k,tooltip:w,properties:g,checked:()=>h()===B,action:typeof B==="function"?async()=>{let q=await B();if(q!==void 0)x(q,!0)}:()=>{if(typeof B==="string")x(B,!0)}}};poppedOptions=[];get optionsMenu(){let y=this.selectOptions.map(this.buildOptionMenuItem);if(this.filter==="")return y;let x=(h)=>{if(h===null||typeof h==="function")return!0;else if(h.menuItems){let C=U1(h.menuItems);return h.menuItems=C.filter(x),C.length>0}else return h.caption.toLocaleLowerCase().includes(this.filter)};return y.filter(x)}handleChange=(y)=>{let{value:x}=this.parts,h=x.value||"";if(this.value!==String(h))this.value=h,this.dispatchEvent(new Event("change"));this.filter="",y.stopPropagation(),y.preventDefault()};handleKey=(y)=>{if(y.key==="Enter")y.preventDefault()};filterMenu=N2(()=>{this.filter=this.parts.value.value.toLocaleLowerCase(),h1(0),this.popOptions()});popOptions=(y)=>{if(y&&y.type==="click")this.filter="";this.poppedOptions=this.optionsMenu,this.isExpanded=!0,this.updateAriaExpanded(),r({target:this,menuItems:this.poppedOptions,showChecked:!0,role:"listbox",onClose:()=>{this.isExpanded=!1,this.updateAriaExpanded()}})};updateAriaExpanded(){let{value:y}=this.parts;y.setAttribute("aria-expanded",String(this.isExpanded))}content=()=>[QC({type:"button",part:"button",onClick:this.popOptions},d6(),$C({part:"value",value:this.value,tabindex:0,role:"combobox",ariaHaspopup:"listbox",ariaExpanded:"false",ariaAutocomplete:this.editable?"list":"none",onKeydown:this.handleKey,onInput:this.filterMenu,onChange:this.handleChange}),Q.chevronDown())];get allOptions(){let y=[];function x(h){for(let C of h)if(typeof C==="string")y.push({caption:C,value:C});else if(C?.value)y.push(C);else if(C?.options)x(C.options)}return x(this.selectOptions),y}findOption(){return this.allOptions.find((x)=>x.value===this.value)||{caption:this.value,value:this.value}}localeChanged=()=>{this.queueRender()};connectedCallback(){super.connectedCallback();let y=this.getAttribute("options");if(y&&this._options.length===0)this._options=I1.parseOptionsString(y);if(this.localized)$4.allInstances.add(this)}disconnectedCallback(){if(super.disconnectedCallback(),this.localized)$4.allInstances.delete(this)}render(){super.render();let{value:y,button:x}=this.parts;x.disabled=this.disabled;let h=y.previousElementSibling,C=this.findOption(),k=d6();if(y.value=this.localized?p(C.caption):C.caption,C.icon)if(C.icon instanceof HTMLElement)k=C.icon.cloneNode(!0);else k=Q[C.icon]();h.replaceWith(k),y.setAttribute("placeholder",this.localized?p(this.placeholder):this.placeholder),y.style.pointerEvents=this.editable?"":"none",y.readOnly=!this.editable}}var OC=I1,Q1=I1.elementCreator(),YC=l1((...y)=>Q1(...y),"xinSelect is deprecated, use tosiSelect instead (tag is now <tosi-select>)");var{span:u6}=U,{i18n:f}=t({i18n:{locale:window.navigator.language,locales:[window.navigator.language],languages:[window.navigator.language],emoji:[""],stringMap:{},localeOptions:[{icon:u6(),caption:window.navigator.language,value:window.navigator.language}]}});u1.localeOptions={toDOM(y,x){if(y instanceof I1)y.options=x}};var O4=(y)=>{if(f.locales.value.includes(y))f.locale.value=y;else console.error(`language ${y} is not available`)},Q3=()=>{let y=Array.from(b1.allInstances);for(let x of y)x.localeChanged();m6()};f.locale.observe(Q3);var K0="data-tosi-localized";function P0(y){let x=y.getAttribute(K0);if(!x)return;let h;try{h=JSON.parse(x)}catch(C){console.warn(`[data-tosi-localized] invalid JSON: ${x}`,C);return}if(!h||typeof h!=="object")return;for(let[C,k]of Object.entries(h)){if(typeof k!=="string")continue;y.setAttribute(C,p(k))}}function*r6(y){for(let x of Array.from(y.querySelectorAll(`[${K0}]`)))yield x;for(let x of Array.from(y.querySelectorAll("*"))){let h=x.shadowRoot;if(h)yield*r6(h)}}function m6(){if(typeof document>"u")return;for(let y of r6(document))P0(y)}var s6=null;if(typeof document<"u"&&typeof MutationObserver<"u"){let y=()=>{if(!document.body){queueMicrotask(y);return}s6=new MutationObserver((x)=>{for(let h of x){if(h.type==="attributes"&&h.target instanceof Element){P0(h.target);continue}for(let C of Array.from(h.addedNodes)){if(!(C instanceof Element))continue;if(C.hasAttribute(K0))P0(C);for(let k of Array.from(C.querySelectorAll(`[${K0}]`)))P0(k)}}}),s6.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[K0]}),m6()};y()}var iC=_4((y)=>[y.caption.toLocaleLowerCase()]);function $3(y){let[x,,h,C,...k]=y.split(`
|
|
16
|
+
`).map((B)=>B.split("\t"));if(x&&h&&C&&k){if(f.locales.value=x,f.languages.value=h,f.emoji.value=C,f.stringMap.value=k.reduce((B,w)=>{return B[w[0].toLocaleLowerCase()]=w,B},{}),f.localeOptions.value=x.map((B,w)=>({icon:u6({title:x[w]},C[w]),caption:h[w],value:B})).sort(iC),!f.locales.value.includes(f.locale.value)){let B=f.locale.value.substring(0,2);f.locale.value=f.locales.value.find((w)=>w.substring(0,2)===B)||f.locales.value[0]}Q3()}}function p(y){if(y.endsWith("…"))return p(y.substring(0,y.length-1))+"…";let x=f.locales.value.indexOf(f.locale.value);if(x>-1){let h=S(f.stringMap),C=y.toLocaleLowerCase(),k=h[C],B=k&&k[x];if((!B||B==='"')&&C.includes("#")){let w=h[C.substring(0,C.indexOf("#"))];B=w&&w[x]}if(B)B=B.split("#",2)[0],y=y.toLocaleLowerCase()===y?B.toLocaleLowerCase():B;else y=y.split("#",2)[0]}else y=y.split("#",2)[0];return y}class Y4 extends ${static preferredTagName="tosi-locale-picker";static initAttributes={hideCaption:!1};content=()=>{return Q1({part:"select",showIcon:!0,title:p("Language"),bindValue:f.locale,bindLocaleOptions:f.localeOptions})};render(){super.render(),this.parts.select.toggleAttribute("hide-caption",this.hideCaption)}}var FC=Y4,n6=Y4.elementCreator(),NC=n6;class b1 extends ${static preferredTagName="tosi-localized";static lightStyleSpec={":host":{pointerEvents:"none"}};static allInstances=new Set;static initAttributes={refString:""};contents=()=>U.tosiSlot();connectedCallback(){super.connectedCallback(),b1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),b1.allInstances.delete(this)}localeChanged(){if(!this.refString)this.refString=this.textContent||"";this.textContent=this.refString?p(this.refString):""}render(){super.render(),this.localeChanged()}}var $4=b1,i1=b1.elementCreator(),WC=i1;function o6(y){let x=/^\s*([a-zA-Z]+)\s*(?:\(([^)]*)\))?\s*$/.exec(y);if(!x)return{base:y.trim().toLowerCase(),args:[]};let h=x[2]===void 0?[]:x[2].split(",").map((C)=>C.trim()).filter(Boolean);return{base:x[1].toLowerCase(),args:h}}function JC(){try{return f.locale.value||void 0}catch{return}}function O3(y){let x=ZC,h;return()=>{let C=JC();if(C!==x)x=C,h=y(C);return h}}var ZC=Symbol("unbuilt");function E6(y){if(y===null||y===void 0||y==="")return null;let x=typeof y==="number"?y:Number(y);return Number.isFinite(x)?x:null}var RC=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],DC=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];function HC(y,x,h,C,k){let B=y<0,w=Math.abs(y),g=0;while(w>=x&&g<h.length-1)w/=x,g+=1;let z=(g===0?k:C).format(w);return`${B?"-":""}${z} ${h[g]}`}function vC(y,x){return{align:y,format:x,toDOM(h,C){h.textContent=x(C)}}}function Y3(y){let{base:x,args:h}=o6(y),C=(B)=>({align:"right",format:(w)=>{let g=E6(w);return g===null?"":B(g)},toDOM(w,g){let z=E6(g);w.textContent=z===null?"":B(z),w.classList.toggle("-negative",z!==null&&z<0),w.classList.toggle("-zero",z===0)}}),k=(B)=>{let w=O3(B);return C((g)=>w().format(g))};switch(x){case"number":return k((B)=>new Intl.NumberFormat(B));case"currency":{let B=(h[0]||"USD").toUpperCase();return k((w)=>new Intl.NumberFormat(w,{style:"currency",currency:B}))}case"fixed":{let B=h[0]!==void 0?Math.max(0,Math.min(20,Math.trunc(Number(h[0]))||0)):2;return k((w)=>new Intl.NumberFormat(w,{minimumFractionDigits:B,maximumFractionDigits:B}))}case"percent":{let B=h[0]!==void 0?Math.max(0,Math.min(20,Math.trunc(Number(h[0]))||0)):0;return k((w)=>new Intl.NumberFormat(w,{style:"percent",minimumFractionDigits:B,maximumFractionDigits:B}))}case"sci":return k((B)=>new Intl.NumberFormat(B,{notation:"scientific"}));case"eng":return k((B)=>new Intl.NumberFormat(B,{notation:"engineering"}));case"bytes":{let B=(h[0]||"").toLowerCase()==="iec",w=B?1024:1000,g=B?DC:RC,z=O3((j)=>new Intl.NumberFormat(j,{maximumFractionDigits:1})),q=O3((j)=>new Intl.NumberFormat(j,{maximumFractionDigits:0}));return C((j)=>HC(j,w,g,z(),q()))}case"boolean":{let B=h[0]||"checkSquare",w=h.length===0?"square":h[1]||null,g=(z)=>{if(!z)return null;let q=Q[z];return typeof q==="function"?q():document.createTextNode("")};return{align:"center",format:(z)=>g(z?B:w)??document.createTextNode(""),toDOM(z,q){let j=g(q?B:w);z.replaceChildren(...j?[j]:[])}}}default:return vC(void 0,(B)=>B==null?"":String(B))}}function MC(y,x,h){let C=y.find((k)=>k[x]!==void 0&&k[x]!==null);if(C!==void 0){let k=C[x];switch(typeof k){case"string":if(k.match(/^\d+(\.\d+)?$/))return 6*h;else if(k.includes(" "))return 20*h;else return 12*h;case"number":return 6*h;case"boolean":return 5*h;case"object":return!1;default:return 8*h}}return!1}var{div:G0,span:i4,button:SC}=U,a6=(y)=>y,t6=new WeakMap;function e6(y){if(!y.type||y.dataCell)return null;let x=t6.get(y);if(!x)x=Y3(y.type),t6.set(y,x);return x}class F4 extends ${static preferredTagName="tosi-table";static lightStyleSpec={":host":{"--tosi-table-row-height":"32px","--tosi-table-touch-size":"var(--tosi-touch-size, 44px)","--tosi-table-dragged-header-bg":"#0004","--tosi-table-dragged-header-color":"#fff","--tosi-table-drop-header-bg":"#fff4",display:"block",overflow:"hidden",background:_.tosiTableBg("var(--tosi-bg, #fff)")},":host .scroll-area":{width:"100%",height:"100%",overflow:"auto",overscrollBehavior:"none"},":host .thead, :host .tbody":{display:"contents"},":host .tr":{display:"grid",gridTemplateColumns:l.tosiTableGridColumns,width:l.tosiTableGridRowWidth,height:l.tosiTableRowHeight,background:_.tosiTableBg("var(--tosi-bg, #fff)")},":host .thead .tr":{position:"sticky",top:"0",zIndex:"2",background:_.tosiTableHeaderBg(_.tosiTableBg("var(--tosi-bg, #fff)"))},":host .tbody-pinned-top .tr, :host .tbody-pinned-bottom .tr":{position:"sticky",zIndex:"1"},":host .th, :host .td":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"flex",alignItems:"center",height:l.tosiTableRowHeight,lineHeight:l.tosiTableRowHeight},":host .col-pinned":{position:"sticky",zIndex:"1",background:_.tosiTableBg("var(--tosi-bg, #fff)")},":host .th.col-pinned":{zIndex:"3",background:_.tosiTableHeaderBg(_.tosiTableBg("var(--tosi-bg, #fff)"))},":host .tr[aria-selected] .td":{background:_.tosiTableSelectedBg("var(--tosi-accent, #007AFF22)")},":host .td:focus, :host .th:focus":{outline:"2px solid var(--tosi-accent, #007AFF)",outlineOffset:"-2px",zIndex:"1"},":host .col-pinned:focus":{zIndex:"4"},":host .col-edge-right":{boxShadow:"1px 0 0 var(--tosi-table-edge-color, #0002)"},":host .col-edge-left":{boxShadow:"-1px 0 0 var(--tosi-table-edge-color, #0002)"},":host .row-edge-bottom":{boxShadow:"0 1px 0 var(--tosi-table-edge-color, #0002)"},":host .row-edge-top":{boxShadow:"0 -1px 0 var(--tosi-table-edge-color, #0002)"},":host .th .menu-trigger":{color:"currentColor",background:"none",padding:0,lineHeight:l.tosiTableTouchSize,height:l.tosiTableTouchSize,width:l.tosiTableTouchSize},':host [draggable="true"]':{cursor:"ew-resize"},':host [draggable="true"]:active':{background:l.tosiTableDraggedHeaderBg,color:l.tosiTableDraggedHeaderColor},":host .drag-over":{background:l.tosiTableDropHeaderBg}};static initAttributes={rowHeight:30,charWidth:15,minColumnWidth:30,select:!1,multiple:!1,pinnedTop:0,pinnedBottom:0,nosort:!1,nohide:!1,noreorder:!1,localized:!1};selectionChanged=()=>{};rowRendered=null;selectedKey=Symbol("selected");selectBinding=(y,x)=>{if(x==null)return;y.toggleAttribute("aria-selected",x[this.selectedKey]===!0)};maxVisibleRows=1e4;_head=null;_scrollArea=null;_tbodyTop=null;_tbodyBottom=null;_pinnedRowEdgeObserver=null;_rowCellsCache=new WeakMap;itemFor(y){return j2(y)}cellsFor(y){let x=S(y);for(let h of[this._tbodyTop,this._scrollArea,this._tbodyBottom]){if(!h)continue;let C=J2(h);if(!C)continue;let k=C.itemToElement.get(x);if(k&&k.length>0){let B=k[0],w=this._rowCellsCache.get(B);if(!w)w=Array.from(B.children),this._rowCellsCache.set(B,w);return w}}return}get value(){return{array:this.array,filter:this.filter,columns:this.columns}}set value(y){let{array:x,columns:h,filter:C}=S(y);if(this._array!==x||this._columns!==h||this._filter!==C)this.queueRender();this._array=x||[],this._columns=h||null,this._filter=C||a6}rowData={visible:[],pinnedTopData:[],pinnedBottomData:[]};_array=[];_columns=null;_filter=a6;_sort;_pinnedTopRows;_pinnedBottomRows;get pinnedTopRows(){return this._pinnedTopRows}set pinnedTopRows(y){this._pinnedTopRows=y?S(y):void 0,this.queueRender()}get pinnedBottomRows(){return this._pinnedBottomRows}set pinnedBottomRows(y){this._pinnedBottomRows=y?S(y):void 0,this.queueRender()}get effectivePinnedTopData(){if(this._pinnedTopRows)return this._pinnedTopRows;return this.pinnedTop>0?this._array.slice(0,this.pinnedTop):[]}get effectivePinnedBottomData(){if(this._pinnedBottomRows)return this._pinnedBottomRows;return this.pinnedBottom>0?this._array.slice(-this.pinnedBottom):[]}get effectiveBaseData(){if(this._pinnedTopRows||this._pinnedBottomRows)return this._array;return this._array.slice(this.pinnedTop,this._array.length-this.pinnedBottom)}constructor(){super();this.rowData=t({[this.instanceId]:this.rowData})[this.instanceId]}get array(){return this._array}set array(y){this._array=S(y),this.queueRender()}get filter(){return this._filter}set filter(y){if(this._filter!==y)this._filter=y,this.queueRender()}get sort(){if(this._sort)return this._sort;let y=this._columns?.find((h)=>h.sort==="ascending"||h.sort==="descending");if(!y)return;let{prop:x}=y;return y.sort==="ascending"?(h,C)=>h[x]>C[x]?1:-1:(h,C)=>h[x]>C[x]?-1:1}set sort(y){if(this._sort!==y)this._sort=y,this.queueRender()}get columns(){if(!Array.isArray(this._columns)){let{_array:y}=this;this._columns=Object.keys(y[0]||{}).map((x)=>{let h=MC(y,x,this.charWidth);return{name:x.replace(/([a-z])([A-Z])/g,"$1 $2").toLocaleLowerCase(),prop:x,align:typeof y[0][x]==="number"||y[0][x]!==""&&!isNaN(y[0][x])?"right":"left",visible:h!==!1,width:h?h:0}})}return this._columns}set columns(y){this._columns=y,this.queueRender()}get visibleColumns(){let y=this.columns.filter((k)=>k.visible!==!1),x=y.filter((k)=>k.pinned==="left"),h=y.filter((k)=>!k.pinned),C=y.filter((k)=>k.pinned==="right");return[...x,...h,...C]}get pinnedLeft(){return this.visibleColumns.filter((y)=>y.pinned==="left").length}set pinnedLeft(y){let x=this.columns.filter((h)=>h.visible!==!1);for(let h of x)if(h.pinned==="left")delete h.pinned;for(let h=0;h<y&&h<x.length;h++)x[h].pinned="left";this.queueRender()}get pinnedRight(){return this.visibleColumns.filter((y)=>y.pinned==="right").length}set pinnedRight(y){let x=this.columns.filter((h)=>h.visible!==!1);for(let h of x)if(h.pinned==="right")delete h.pinned;for(let h=x.length-y;h<x.length;h++)if(h>=0)x[h].pinned="right";this.queueRender()}content=null;computeStickyInfo(y){let x=y.map(()=>({})),h=0,C=-1;for(let w=0;w<y.length;w++){if(y[w].pinned!=="left")break;x[w].left=h+"px",h+=y[w].width,C=w}if(C>=0)x[C].edgeClass="col-edge-right";let k=0,B=y.length;for(let w=y.length-1;w>=0;w--){if(y[w].pinned!=="right")break;x[w].right=k+"px",k+=y[w].width,B=w}if(B<y.length)x[B].edgeClass="col-edge-left";return x}cellClasses(y,x){let h=y;if(x.left!=null||x.right!=null)h+=" col-pinned";if(x.edgeClass)h+=" "+x.edgeClass;return h}rowClasses(y){return y==="visible"?"tr":"tr row-pinned"}tagPinnedRows=()=>{this.tagPinnedTbody(this._tbodyTop,"top"),this.tagPinnedTbody(this._tbodyBottom,"bottom")};tagPinnedTbody(y,x){if(!y)return;let h=Array.from(y.querySelectorAll(".tr"));if(h.length===0)return;let C=h.length-1,k=x==="top"?"row-edge-bottom":"row-edge-top";h.forEach((w,g)=>{w.classList.remove(k);let z=x==="top"?g+1:C-g;w.style[x]=`calc(var(--tosi-table-row-height) * ${z})`}),(x==="top"?h[C]:h[0]).classList.add(k)}cellStyle(y,x,h){let C={justifyContent:y.align||e6(y)?.align||"left",...h};if(x.left!=null)C.left=x.left;if(x.right!=null)C.right=x.right;return C}applyGridCellAttrs(y,x,h,C){y.setAttribute("aria-colindex",String(x+1)),y.tabIndex=-1,y.classList.add(...this.cellClasses("td",h).split(" ")),Object.assign(y.style,C)}buildCell(y,x,h,C){let k=this.cellStyle(y,h);if(y.dataCell!==void 0){let w=y.dataCell(y);return this.applyGridCellAttrs(w,x,h,k),w}let B=e6(y);if(B)return i4({class:this.cellClasses("td",h),role:"gridcell",tabindex:-1,ariaColindex:String(x+1),style:k,bind:{value:C[y.prop],binding:{toDOM(w,g){B.toDOM(w,g)}}}});return i4({class:this.cellClasses("td",h),role:"gridcell",tabindex:-1,ariaColindex:String(x+1),style:k,bindText:C[y.prop]})}buildRow(y,x,h,C="tr"){let k=x.map((g,z)=>this.buildCell(g,z,h[z],y)),B=this.selectBinding,w={class:C};return w.bind={value:y,binding:{toDOM:(g,z)=>{B(g,z);let q=this.rowRendered;if(q)q(z,Array.from(g.children))}}},G0(w,...k)}buildHeaderCell(y,x,h){let{popColumnMenu:C}=this,k="none",B;switch(y.sort){case"ascending":B=Q.sortAscending(),k="descending";break;case"descending":k="ascending",B=Q.sortDescending();break}let w=!(this.nosort&&this.nohide)?SC({class:"menu-trigger",onClick(z){C(z.target,y),z.stopPropagation()}},B||Q.moreVertical()):{},g=y.headerCell!==void 0?y.headerCell(y):i4({class:this.cellClasses("th",h),role:"columnheader",tabindex:-1,ariaSort:k,ariaColindex:String(x+1),style:this.cellStyle(y,h)},this.captionSpan({style:{flex:"1"}},typeof y.name==="string"?y.name:y.prop),w);if(y.headerCell!==void 0)this.applyGridCellAttrs(g,x,h,this.cellStyle(y,h)),g.classList.remove("td"),g.classList.add("th"),g.setAttribute("role","columnheader");if(!this.noreorder&&g.children[0]){A3();let z=this.instanceId+"-column-header",q=g.children[0];q.setAttribute("draggable","true"),q.style.pointerEvents="all",q.dataset.drag=z,g.dataset.drop=z,q.addEventListener("dragstart",()=>{this.draggedColumn=y}),g.addEventListener("drop",this.dropColumn)}return g}buildHeader(y,x){let h=y.map((C,k)=>this.buildHeaderCell(C,k,x[k]));return G0({class:"thead",role:"rowgroup"},G0({class:"tr",role:"row"},...h))}buildPinnedBody(y,x,h,C){let k=S(y);if(!k||k.length===0)return null;let B=C==="pinned-top"?"pinnedTopRows":"pinnedBottomRows",w=this.rowClasses(C),g=y.listBinding((z,q)=>this.buildRow(q,x,h,w),{});return G0({class:`tbody tbody-${C}`,role:"rowgroup",part:B},...g)}getColumn(y){if(!this._scrollArea)return;let x=(y.touches!==void 0?y.touches[0].clientX:y.clientX)-this._scrollArea.getBoundingClientRect().x,h=y.touches!==void 0?20:5,{scrollLeft:C,clientWidth:k,scrollWidth:B}=this._scrollArea,w=this.visibleColumns,g=B-k-C,z=0;return w.find((q)=>{if(q.visible===!1)return!1;z+=q.width;let j;if(q.pinned==="left")j=z;else if(q.pinned==="right")j=z-C-g;else j=z-C;return Math.abs(x-j)<h})}setCursor=(y)=>{let x=this.getColumn(y);this.style.cursor=x!==void 0?"col-resize":""};resizeColumn=(y)=>{let x=this.getColumn(y);if(x!==void 0){let h=Number(x.width),C=y.touches!==void 0,k=C?y.touches[0].identifier:void 0;_1(y,(B,w,g)=>{if((C?[...g.touches].find((j)=>j.identifier===k):!0)===void 0)return!0;let q=h+B;if(x.width=q>this.minColumnWidth?q:this.minColumnWidth,this.setColumnWidths(),g.type==="mouseup")return!0},"col-resize")}};selectRow(y,x=!0){if(x)y[this.selectedKey]=!0;else delete y[this.selectedKey];this.updateSelectionVisuals()}selectRows(y,x=!0){for(let h of y||this.array)if(x)h[this.selectedKey]=!0;else delete h[this.selectedKey];this.updateSelectionVisuals()}deSelect(y){this.selectRows(y,!1)}updateSelectionVisuals(){let y=this._scrollArea?.querySelectorAll(".tr")??[];for(let x of y){let h=this.itemFor(x);if(h!=null)this.selectBinding(x,h)}}rangeStart;updateSelection=(y)=>{if(!this.select&&!this.multiple)return;let{target:x}=y;if(!(x instanceof HTMLElement))return;let h=this.itemFor(x);if(h==null)return;let C=y,k=window.getSelection();if(k!==null)k.removeAllRanges();let B=this.visibleRows;if(this.multiple&&C.shiftKey&&B.length>0&&this.rangeStart!==h){let w=this.rangeStart===void 0||this.rangeStart[this.selectedKey]===!0,[g,z]=[this.rangeStart!==void 0?B.indexOf(this.rangeStart):0,B.indexOf(h)].sort((q,j)=>q-j);if(g>-1)for(let q=g;q<=z;q++){let j=B[q];this.selectRow(j,w)}}else if(this.multiple&&C.metaKey){this.selectRow(h,!h[this.selectedKey]);let w=B.indexOf(h),g=B[w+1],z=w>0?B[w-1]:void 0;if(g!==void 0&&g[this.selectedKey]===!0)this.rangeStart=g;else if(z!==void 0&&z[this.selectedKey]===!0)this.rangeStart=z;else this.rangeStart=void 0}else this.rangeStart=h,this.deSelect(),this.selectRow(h,!0);this.selectionChanged(this.visibleSelectedRows),this.updateSelectionVisuals()};findCell(y,x){if(y===-1)return this.querySelector(`.thead .th[aria-colindex="${x+1}"]`);let h=this.effectivePinnedTopData,C=this.visibleRows,k=this.effectivePinnedBottomData,B;if(y<h.length)B=h[y];else if(y<h.length+C.length)B=C[y-h.length];else if(y<h.length+C.length+k.length)B=k[y-h.length-C.length];else return null;return this.cellsFor(B)?.[x]??null}_pendingFocus=null;handleScrollEnd=()=>{if(!this._pendingFocus)return;let{row:y,col:x}=this._pendingFocus;this._pendingFocus=null;let h=this.findCell(y,x);if(h)h.focus()};focusCell(y,x){this._pendingFocus={row:y,col:x};let h=this.findCell(y,x);if(h)h.focus(),h.scrollIntoView({block:"nearest",inline:"nearest"});else if(this._scrollArea){let C=this.effectivePinnedTopData,k=y-C.length;if(k>=0&&k<this.visibleRows.length)this._scrollArea.scrollTop=k*this.rowHeight}}handleKeyNav=(y)=>{let x=y.target,h=x.closest(".td")||x.closest(".th");if(!h)return;let C=parseInt(h.getAttribute("aria-colindex")||"",10);if(isNaN(C))return;let k=C-1,B=this.visibleColumns.length,w=this.effectivePinnedTopData,g=this.visibleRows,z=this.effectivePinnedBottomData,q=w.length+g.length+z.length,j=y.metaKey||y.ctrlKey,V=h.classList.contains("th"),A;if(V)A=-1;else{let i=h.closest(".tr");if(!i)return;let N=j2(i);if(N==null)return;let F=w.indexOf(N),Z=F===-1?g.indexOf(N):-1,R=F===-1&&Z===-1?z.indexOf(N):-1;if(F!==-1)A=F;else if(Z!==-1)A=w.length+Z;else if(R!==-1)A=w.length+g.length+R;else return}let P=A,G=k;switch(y.key){case"ArrowUp":P=j?0:Math.max(-1,A-1);break;case"ArrowDown":P=j?q-1:Math.min(q-1,A+1);break;case"ArrowLeft":G=j?0:Math.max(0,k-1);break;case"ArrowRight":G=j?B-1:Math.min(B-1,k+1);break;case"Tab":if(y.shiftKey)if(k>0)G=k-1;else if(A>0)P=A-1,G=B-1;else return;else if(k<B-1)G=k+1;else if(A<q-1)P=A+1,G=0;else return;break;case"Home":if(j)P=0,G=0;else G=0;break;case"End":if(j)P=q-1,G=B-1;else G=B-1;break;default:return}if(P!==A||G!==k)y.preventDefault(),this.focusCell(P,G)};connectedCallback(){super.connectedCallback(),this.addEventListener("mousemove",this.setCursor),this.addEventListener("mousedown",this.resizeColumn),this.addEventListener("touchstart",this.resizeColumn,{passive:!0}),this.addEventListener("mouseup",this.updateSelection),this.addEventListener("touchend",this.updateSelection),this.addEventListener("keydown",this.handleKeyNav)}setColumnWidths(){let y=this.visibleColumns,x=y.map((k)=>k.width+"px").join(" "),h=y.reduce((k,B)=>k+B.width,0)+"px";this.style.setProperty("--tosi-table-grid-columns",x),this.style.setProperty("--tosi-table-grid-row-width",h),this.style.setProperty("--grid-columns",x),this.style.setProperty("--grid-row-width",h);let C=this.computeStickyInfo(y);for(let k of this.querySelectorAll(".col-pinned")){let B=parseInt(k.getAttribute("aria-colindex")||"",10)-1;if(!isNaN(B)&&C[B]){let w=C[B];if(w.left!=null)k.style.left=w.left;if(w.right!=null)k.style.right=w.right}}}sortByColumn=(y,x="auto")=>{for(let h of this.columns.filter((C)=>S(C.sort)!==!1))if(S(h)===y){if(x==="auto")h.sort=h.sort==="ascending"?"descending":"ascending";else h.sort=x;this.queueRender()}else delete h.sort};popColumnMenu=(y,x)=>{let{sortByColumn:h}=this,C=this.columns.filter((g)=>g.visible===!1),k=this.queueRender.bind(this),B=[];if(!this.nosort&&x.sort!==!1)B.push({caption:this.localized?`${p("Sort")} ${p("Ascending")}`:"Sort Ascending",icon:"sortAscending",action(){h(x)}},{caption:this.localized?`${p("Sort")} ${p("Descending")}`:"Sort Descending",icon:"sortDescending",action(){h(x,"descending")}});if(!this.nohide){if(B.length)B.push(null);B.push({caption:this.localized?`${p("Hide")} ${p("Column")}`:"Hide Column",icon:"eyeOff",enabled:()=>x.visible!==!0,action(){x.visible=!1,k()}},{caption:this.localized?`${p("Show")} ${p("Column")}`:"Show Column",icon:"eye",enabled:()=>C.length>0,menuItems:C.map((g)=>{return{caption:g.name||g.prop,action(){delete g.visible,k()}}})})}if(B.length)B.push(null);let w=x.pinned==="left"?"pin":x.pinned==="right"?"pin0f":"pin50o";B.push({caption:this.localized?p("Pin"):"Pin",icon:w,menuItems:[{caption:this.localized?p("Left"):"Left",icon:"pin",enabled:()=>x.pinned!=="left",action(){x.pinned="left",k()}},{caption:this.localized?p("Right"):"Right",icon:"pin0f",enabled:()=>x.pinned!=="right",action(){x.pinned="right",k()}},{caption:this.localized?p("Unpin"):"Unpin",icon:"unPin",enabled:()=>!!x.pinned,action(){delete x.pinned,k()}}]}),r({target:y,localized:this.localized,menuItems:B})};get captionSpan(){return this.localized?i1:i4}get visibleRows(){return S(this.rowData.visible)}get visibleSelectedRows(){return this.visibleRows.filter((y)=>y[this.selectedKey])}get selectedRows(){if(this._pinnedTopRows||this._pinnedBottomRows)return[...this._pinnedTopRows??[],...this._array,...this._pinnedBottomRows??[]].filter((x)=>x[this.selectedKey]);return this._array.filter((y)=>y[this.selectedKey])}getCells(y){let x=y instanceof Element?this.itemFor(y):y;return x==null?void 0:this.cellsFor(x)}getItem(y){return this.itemFor(y)}draggedColumn;dropColumn=(y)=>{let x=y.target.closest(".drag-over"),h=parseInt(x.getAttribute("aria-colindex")||"",10)-1,C=this.visibleColumns[h],k=this.columns.indexOf(this.draggedColumn),B=this.columns.indexOf(C);this.draggedColumn.pinned=C.pinned,this.columns.splice(k,1),this.columns.splice(B,0,this.draggedColumn),this.queueRender(),y.preventDefault(),y.stopPropagation()};render(){super.render(),this.textContent="";let y=this.effectivePinnedTopData,x=this.effectivePinnedBottomData,h=this.effectiveBaseData,C=Math.min(h.length,this.maxVisibleRows),k=this.filter(h.slice(0,C)),{sort:B}=this;if(B)k.sort(B);this.rowData.pinnedTopData=y,this.rowData.pinnedBottomData=x,this.rowData.visible=k;let w=this.visibleColumns;if(w.length===0)return;let g=this.computeStickyInfo(w);this.style.setProperty("--tosi-table-row-height",this.rowHeight>0?`${this.rowHeight}px`:"auto"),this.setColumnWidths(),this._head=this.buildHeader(w,g),this._tbodyTop=this.buildPinnedBody(this.rowData.pinnedTopData,w,g,"pinned-top"),this._tbodyBottom=this.buildPinnedBody(this.rowData.pinnedBottomData,w,g,"pinned-bottom");let z=this.rowData.visible.listBinding((q,j)=>this.buildRow(j,w,g),this.rowHeight>0?{virtual:{height:this.rowHeight}}:{});this._scrollArea=G0({class:"scroll-area",part:"visibleRows"},...[this._head,this._tbodyTop,...z,this._tbodyBottom].filter(Boolean)),this._scrollArea.addEventListener("scrollend",this.handleScrollEnd),this.append(this._scrollArea),this.observePinnedRowMutations(),this.tagPinnedRows()}observePinnedRowMutations(){this._pinnedRowEdgeObserver?.disconnect(),this._pinnedRowEdgeObserver=new MutationObserver(this.tagPinnedRows);for(let y of[this._tbodyTop,this._tbodyBottom])if(y)this._pinnedRowEdgeObserver.observe(y,{childList:!0})}}var IC=F4,i3=F4.elementCreator(),bC=i3,TC=i3;var{dialog:pC,button:F3,header:LC,footer:cC,tosiSlot:N3,h3:W3,p:J3,label:dC,input:fC,div:sC}=U;class Z3 extends ${static preferredTagName="tosi-dialog";static lightStyleSpec={":host > dialog::backdrop":{backdropFilter:"blur(8px)"},":host > dialog:not([open])":{display:"none"},":host > dialog[open]":{minWidth:300,border:0,borderRadius:10,overflow:"hidden",maxHeight:"calc(100% - 20px)",padding:0,display:"flex",flexDirection:"column",gap:5,_dialogShadow:_.menuShadow("0 5px 10px #0004"),_dialogBackground:_.background("#fafafa"),_dialogColor:_.textColor("#222"),boxShadow:l.dialogShadow,background:l.dialogBackground,color:l.dialogColor},":host > dialog > *":{padding:"0 20px"},":host > dialog > header":{display:"flex",justifyContent:"center",gap:10},":host > dialog > footer":{display:"flex",justifyContent:"flex-end",gap:10,paddingBottom:20}};static async alert(y,x="Alert"){return new Promise((h)=>{let C=N4({removeOnClose:!0,closeOnBackgroundClick:!0,dialogWillClose(){h()}},W3({slot:"header"},x),y.includes(`
|
|
17
|
+
`)?U.pre({style:{whiteSpace:"pre-wrap",margin:0}},y):J3(y));document.body.append(C),C.showModal()})}static async confirm(y,x="Confirm"){return new Promise((h)=>{let C=N4({removeOnClose:!0,dialogWillClose(k){h(k==="confirm")}},W3({slot:"header"},x),J3(y),F3({slot:"footer",onClick(){C.close()}},"Cancel"));document.body.append(C),C.showModal()})}static async prompt(y,x="Prompt",h=""){return new Promise((C)=>{let k=fC({value:h}),B=N4({removeOnClose:!0,dialogWillClose(w){C(w==="confirm"?k.value:null)},initialFocus(){k.focus()}},W3({slot:"header"},x),J3(dC({style:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:5}},sC(y),k)),F3({slot:"footer",onClick(){B.close()}},"Cancel"));document.body.append(B),B.showModal()})}removeOnClose=!1;closeOnBackgroundClick=!1;constructor(){super();Z2(this,"click",()=>{if(this.closeOnBackgroundClick)this.close()})}dialogWillClose=(y="cancel")=>{console.log("dialog will close with",y)};initialFocus(){this.parts.ok.focus()}#y=(y)=>{};showModal=()=>{return this.style.zIndex=String(_2()),new Promise((y)=>{this.#y=y,this.parts.dialog.showModal(),requestAnimationFrame(()=>{this.initialFocus()})})};close=(y="cancel")=>{if(this.dialogWillClose(y),this.#y(y),this.parts.dialog.close(),this.removeOnClose)this.remove()};ok=()=>{this.close("confirm")};content=()=>pC({part:"dialog"},LC(N3({name:"header"})),N3(),cC(N3({name:"footer"}),F3({part:"ok",onClick:this.ok},"OK")))}var N4=Z3.elementCreator();var uC=/^readme\.md$/i;function y7(y){if(uC.test(y))return"";return y.replace(/\.[^.]+$/,"")}function b2(y){let x={};for(let C of y){let k=y7(C.filename);x[k]=(x[k]||0)+1}let h={};for(let C of y){let k=y7(C.filename);h[C.filename]=k!==""&&x[k]>1?C.filename.replace(/\./g,"-"):k}return h}function R3(y){return y===""?"/":`/${y}/`}function h7(y,x){let h=y.replace(/^\?/,"");if(!h||h.includes("=")||h.includes("&"))return null;let C=decodeURIComponent(h),k=x[C];if(k===void 0)return null;return R3(k)}function rC(y){return y.replace(/^\/+/,"").replace(/\/+$/,"").replace(/\/index\.html$/i,"")}function D3(y,x){let h=rC(y);for(let[C,k]of Object.entries(x))if(k===h)return C;return""}function x7(y){return y.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function H3(y,x,h){if(!y)return"";for(let k of x)if(k.filename===y)return k.filename;for(let k of x)if(h[k.filename]===y)return k.filename;let C=x7(y);for(let k of x)if(h[k.filename]===C)return k.filename;for(let k of x)if(k.title&&x7(k.title)===C)return k.filename;return""}function C7(y){let x=y.pin==="top"?"A":y.pin==="bottom"?"Z":"M",h=String(y.order??500).padStart(4,"0");return x+h+(y.title||"").toLocaleLowerCase()+"\x00"+y.filename}function mC(y,x){let h=C7(y),C=C7(x);return h>C?1:C>h?-1:0}function W4(y,x){let h=new Map;for(let w of y)h.set(w.filename,{doc:w,slug:x[w.filename]??"",children:[],depth:0});let C=new Map;for(let w of y){let g=w.parent?H3(w.parent,y,x):"";if(g&&(g===w.filename||!h.has(g)||nC(w.filename,g,y,x)))g="";C.set(w.filename,g)}let k=[];for(let w of y){let g=C.get(w.filename)||"",z=h.get(w.filename);if(g)h.get(g).children.push(z);else k.push(z)}let B=(w,g)=>{w.sort((z,q)=>mC(z.doc,q.doc));for(let z of w)z.depth=g,B(z.children,g+1)};return B(k,0),k}function nC(y,x,h,C){let k=new Map(h.map((g)=>[g.filename,g])),B=x,w=new Set([y]);while(B){if(w.has(B))return!0;w.add(B);let g=k.get(B);B=g?.parent?H3(g.parent,h,C):""}return!1}function M3(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var K2=M3();function l7(y){K2=y}var O0={exec:()=>null};function I(y,x=""){let h=typeof y=="string"?y:y.source,C={replace:(k,B)=>{let w=typeof B=="string"?B:B.source;return w=w.replace(B1.caret,"$1"),h=h.replace(k,w),C},getRegex:()=>new RegExp(h,x)};return C}var EC=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),B1={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(y)=>new RegExp(`^( {0,3}${y})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}#`),htmlBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}<(?:[a-z].*>|!--)`,"i")},oC=/^(?:[ \t]*(?:\n|$))+/,aC=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,tC=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Y0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,eC=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,S3=/(?:[*+-]|\d{1,9}[.)])/,j7=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,V7=I(j7).replace(/bull/g,S3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),yk=I(j7).replace(/bull/g,S3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),I3=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,xk=/^[^\n]+/,b3=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,hk=I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",b3).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ck=I(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,S3).getRegex(),D4="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",T3=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,kk=I("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",T3).replace("tag",D4).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),X7=I(I3).replace("hr",Y0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D4).getRegex(),Bk=I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",X7).getRegex(),p3={blockquote:Bk,code:aC,def:hk,fences:tC,heading:eC,hr:Y0,html:kk,lheading:V7,list:Ck,newline:oC,paragraph:X7,table:O0,text:xk},k7=I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Y0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D4).getRegex(),wk={...p3,lheading:yk,table:k7,paragraph:I(I3).replace("hr",Y0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",k7).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D4).getRegex()},gk={...p3,html:I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",T3).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:I(I3).replace("hr",Y0).replace("heading",` *#{1,6} *[^
|
|
18
|
+
]`).replace("lheading",V7).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,qk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_7=/^( {2,}|\\)\n(?!\s*$)/,lk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,H4=/[\p{P}\p{S}]/u,L3=/[\s\p{P}\p{S}]/u,A7=/[^\s\p{P}\p{S}]/u,jk=I(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,L3).getRegex(),K7=/(?!~)[\p{P}\p{S}]/u,Vk=/(?!~)[\s\p{P}\p{S}]/u,Xk=/(?:[^\s\p{P}\p{S}]|~)/u,_k=I(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",EC?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),P7=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ak=I(P7,"u").replace(/punct/g,H4).getRegex(),Kk=I(P7,"u").replace(/punct/g,K7).getRegex(),G7="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Pk=I(G7,"gu").replace(/notPunctSpace/g,A7).replace(/punctSpace/g,L3).replace(/punct/g,H4).getRegex(),Gk=I(G7,"gu").replace(/notPunctSpace/g,Xk).replace(/punctSpace/g,Vk).replace(/punct/g,K7).getRegex(),Uk=I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,A7).replace(/punctSpace/g,L3).replace(/punct/g,H4).getRegex(),Qk=I(/\\(punct)/,"gu").replace(/punct/g,H4).getRegex(),$k=I(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ok=I(T3).replace("(?:-->|$)","-->").getRegex(),Yk=I("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ok).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Z4=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ik=I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Z4).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),U7=I(/^!?\[(label)\]\[(ref)\]/).replace("label",Z4).replace("ref",b3).getRegex(),Q7=I(/^!?\[(ref)\](?:\[\])?/).replace("ref",b3).getRegex(),Fk=I("reflink|nolink(?!\\()","g").replace("reflink",U7).replace("nolink",Q7).getRegex(),B7=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,c3={_backpedal:O0,anyPunctuation:Qk,autolink:$k,blockSkip:_k,br:_7,code:qk,del:O0,emStrongLDelim:Ak,emStrongRDelimAst:Pk,emStrongRDelimUnd:Uk,escape:zk,link:ik,nolink:Q7,punctuation:jk,reflink:U7,reflinkSearch:Fk,tag:Yk,text:lk,url:O0},Nk={...c3,link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",Z4).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z4).getRegex()},v3={...c3,emStrongRDelimAst:Gk,emStrongLDelim:Kk,url:I(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",B7).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:I(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",B7).getRegex()},Wk={...v3,br:I(_7).replace("{2,}","*").getRegex(),text:I(v3.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},J4={normal:p3,gfm:wk,pedantic:gk},U0={normal:c3,gfm:v3,breaks:Wk,pedantic:Nk},Jk={"&":"&","<":"<",">":">",'"':""","'":"'"},w7=(y)=>Jk[y];function T1(y,x){if(x){if(B1.escapeTest.test(y))return y.replace(B1.escapeReplace,w7)}else if(B1.escapeTestNoEncode.test(y))return y.replace(B1.escapeReplaceNoEncode,w7);return y}function g7(y){try{y=encodeURI(y).replace(B1.percentDecode,"%")}catch{return null}return y}function z7(y,x){let h=y.replace(B1.findPipe,(B,w,g)=>{let z=!1,q=w;for(;--q>=0&&g[q]==="\\";)z=!z;return z?"|":" |"}),C=h.split(B1.splitPipe),k=0;if(C[0].trim()||C.shift(),C.length>0&&!C.at(-1)?.trim()&&C.pop(),x)if(C.length>x)C.splice(x);else for(;C.length<x;)C.push("");for(;k<C.length;k++)C[k]=C[k].trim().replace(B1.slashPipe,"|");return C}function Q0(y,x,h){let C=y.length;if(C===0)return"";let k=0;for(;k<C;){let B=y.charAt(C-k-1);if(B===x&&!h)k++;else if(B!==x&&h)k++;else break}return y.slice(0,C-k)}function Zk(y,x){if(y.indexOf(x[1])===-1)return-1;let h=0;for(let C=0;C<y.length;C++)if(y[C]==="\\")C++;else if(y[C]===x[0])h++;else if(y[C]===x[1]&&(h--,h<0))return C;return h>0?-2:-1}function q7(y,x,h,C,k){let B=x.href,w=x.title||null,g=y[1].replace(k.other.outputLinkReplace,"$1");C.state.inLink=!0;let z={type:y[0].charAt(0)==="!"?"image":"link",raw:h,href:B,title:w,text:g,tokens:C.inlineTokens(g)};return C.state.inLink=!1,z}function Rk(y,x,h){let C=y.match(h.other.indentCodeCompensation);if(C===null)return x;let k=C[1];return x.split(`
|
|
19
|
+
`).map((B)=>{let w=B.match(h.other.beginningSpace);if(w===null)return B;let[g]=w;return g.length>=k.length?B.slice(k.length):B}).join(`
|
|
20
|
+
`)}var R4=class{options;rules;lexer;constructor(y){this.options=y||K2}space(y){let x=this.rules.block.newline.exec(y);if(x&&x[0].length>0)return{type:"space",raw:x[0]}}code(y){let x=this.rules.block.code.exec(y);if(x){let h=x[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:x[0],codeBlockStyle:"indented",text:this.options.pedantic?h:Q0(h,`
|
|
21
|
+
`)}}}fences(y){let x=this.rules.block.fences.exec(y);if(x){let h=x[0],C=Rk(h,x[3]||"",this.rules);return{type:"code",raw:h,lang:x[2]?x[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):x[2],text:C}}}heading(y){let x=this.rules.block.heading.exec(y);if(x){let h=x[2].trim();if(this.rules.other.endingHash.test(h)){let C=Q0(h,"#");(this.options.pedantic||!C||this.rules.other.endingSpaceChar.test(C))&&(h=C.trim())}return{type:"heading",raw:x[0],depth:x[1].length,text:h,tokens:this.lexer.inline(h)}}}hr(y){let x=this.rules.block.hr.exec(y);if(x)return{type:"hr",raw:Q0(x[0],`
|
|
22
|
+
`)}}blockquote(y){let x=this.rules.block.blockquote.exec(y);if(x){let h=Q0(x[0],`
|
|
23
23
|
`).split(`
|
|
24
|
-
`),C="",
|
|
25
|
-
`),q
|
|
24
|
+
`),C="",k="",B=[];for(;h.length>0;){let w=!1,g=[],z;for(z=0;z<h.length;z++)if(this.rules.other.blockquoteStart.test(h[z]))g.push(h[z]),w=!0;else if(!w)g.push(h[z]);else break;h=h.slice(z);let q=g.join(`
|
|
25
|
+
`),j=q.replace(this.rules.other.blockquoteSetextReplace,`
|
|
26
26
|
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");C=C?`${C}
|
|
27
|
-
${
|
|
28
|
-
${
|
|
27
|
+
${q}`:q,k=k?`${k}
|
|
28
|
+
${j}`:j;let V=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(j,B,!0),this.lexer.state.top=V,h.length===0)break;let A=B.at(-1);if(A?.type==="code")break;if(A?.type==="blockquote"){let P=A,G=P.raw+`
|
|
29
29
|
`+h.join(`
|
|
30
|
-
`),
|
|
30
|
+
`),i=this.blockquote(G);B[B.length-1]=i,C=C.substring(0,C.length-P.raw.length)+i.raw,k=k.substring(0,k.length-P.text.length)+i.text;break}else if(A?.type==="list"){let P=A,G=P.raw+`
|
|
31
31
|
`+h.join(`
|
|
32
|
-
`),
|
|
33
|
-
`);continue}}return{type:"blockquote",raw:C,tokens:
|
|
34
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,(
|
|
35
|
-
`,1)[0],
|
|
36
|
-
`,y=y.substring(
|
|
37
|
-
`,1)[0],
|
|
38
|
-
`+
|
|
39
|
-
`+
|
|
40
|
-
`,y=y.substring(
|
|
41
|
-
`):[],
|
|
42
|
-
`?x[1].slice(0,-1):x[1];return{type:"paragraph",raw:x[0],text:h,tokens:this.lexer.inline(h)}}}text(y){let x=this.rules.block.text.exec(y);if(x)return{type:"text",raw:x[0],text:x[0],tokens:this.lexer.inline(x[0])}}escape(y){let x=this.rules.inline.escape.exec(y);if(x)return{type:"escape",raw:x[0],text:x[1]}}tag(y){let x=this.rules.inline.tag.exec(y);if(x)return!this.lexer.state.inLink&&this.rules.other.startATag.test(x[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(x[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(x[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(x[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:x[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:x[0]}}link(y){let x=this.rules.inline.link.exec(y);if(x){let h=x[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(h)){if(!this.rules.other.endAngleBracket.test(h))return;let
|
|
43
|
-
`),this.blockTokens(x,this.tokens);for(let h=0;h<this.inlineQueue.length;h++){let C=this.inlineQueue[h];this.inlineTokens(C.src,C.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(x,h=[],C=!1){for(this.options.pedantic&&(x=x.replace(
|
|
44
|
-
`:h.push(
|
|
32
|
+
`),i=this.list(G);B[B.length-1]=i,C=C.substring(0,C.length-A.raw.length)+i.raw,k=k.substring(0,k.length-P.raw.length)+i.raw,h=G.substring(B.at(-1).raw.length).split(`
|
|
33
|
+
`);continue}}return{type:"blockquote",raw:C,tokens:B,text:k}}}list(y){let x=this.rules.block.list.exec(y);if(x){let h=x[1].trim(),C=h.length>1,k={type:"list",raw:"",ordered:C,start:C?+h.slice(0,-1):"",loose:!1,items:[]};h=C?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=C?h:"[*+-]");let B=this.rules.other.listItemRegex(h),w=!1;for(;y;){let z=!1,q="",j="";if(!(x=B.exec(y))||this.rules.block.hr.test(y))break;q=x[0],y=y.substring(q.length);let V=x[2].split(`
|
|
34
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,(F)=>" ".repeat(3*F.length)),A=y.split(`
|
|
35
|
+
`,1)[0],P=!V.trim(),G=0;if(this.options.pedantic?(G=2,j=V.trimStart()):P?G=x[1].length+1:(G=x[2].search(this.rules.other.nonSpaceChar),G=G>4?1:G,j=V.slice(G),G+=x[1].length),P&&this.rules.other.blankLine.test(A)&&(q+=A+`
|
|
36
|
+
`,y=y.substring(A.length+1),z=!0),!z){let F=this.rules.other.nextBulletRegex(G),Z=this.rules.other.hrRegex(G),R=this.rules.other.fencesBeginRegex(G),c=this.rules.other.headingBeginRegex(G),C1=this.rules.other.htmlBeginRegex(G);for(;y;){let b=y.split(`
|
|
37
|
+
`,1)[0],W;if(A=b,this.options.pedantic?(A=A.replace(this.rules.other.listReplaceNesting," "),W=A):W=A.replace(this.rules.other.tabCharGlobal," "),R.test(A)||c.test(A)||C1.test(A)||F.test(A)||Z.test(A))break;if(W.search(this.rules.other.nonSpaceChar)>=G||!A.trim())j+=`
|
|
38
|
+
`+W.slice(G);else{if(P||V.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||R.test(V)||c.test(V)||Z.test(V))break;j+=`
|
|
39
|
+
`+A}!P&&!A.trim()&&(P=!0),q+=b+`
|
|
40
|
+
`,y=y.substring(b.length+1),V=W.slice(G)}}k.loose||(w?k.loose=!0:this.rules.other.doubleBlankLine.test(q)&&(w=!0));let i=null,N;this.options.gfm&&(i=this.rules.other.listIsTask.exec(j),i&&(N=i[0]!=="[ ] ",j=j.replace(this.rules.other.listReplaceTask,""))),k.items.push({type:"list_item",raw:q,task:!!i,checked:N,loose:!1,text:j,tokens:[]}),k.raw+=q}let g=k.items.at(-1);if(g)g.raw=g.raw.trimEnd(),g.text=g.text.trimEnd();else return;k.raw=k.raw.trimEnd();for(let z=0;z<k.items.length;z++)if(this.lexer.state.top=!1,k.items[z].tokens=this.lexer.blockTokens(k.items[z].text,[]),!k.loose){let q=k.items[z].tokens.filter((V)=>V.type==="space"),j=q.length>0&&q.some((V)=>this.rules.other.anyLine.test(V.raw));k.loose=j}if(k.loose)for(let z=0;z<k.items.length;z++)k.items[z].loose=!0;return k}}html(y){let x=this.rules.block.html.exec(y);if(x)return{type:"html",block:!0,raw:x[0],pre:x[1]==="pre"||x[1]==="script"||x[1]==="style",text:x[0]}}def(y){let x=this.rules.block.def.exec(y);if(x){let h=x[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),C=x[2]?x[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",k=x[3]?x[3].substring(1,x[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):x[3];return{type:"def",tag:h,raw:x[0],href:C,title:k}}}table(y){let x=this.rules.block.table.exec(y);if(!x||!this.rules.other.tableDelimiter.test(x[2]))return;let h=z7(x[1]),C=x[2].replace(this.rules.other.tableAlignChars,"").split("|"),k=x[3]?.trim()?x[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
41
|
+
`):[],B={type:"table",raw:x[0],header:[],align:[],rows:[]};if(h.length===C.length){for(let w of C)this.rules.other.tableAlignRight.test(w)?B.align.push("right"):this.rules.other.tableAlignCenter.test(w)?B.align.push("center"):this.rules.other.tableAlignLeft.test(w)?B.align.push("left"):B.align.push(null);for(let w=0;w<h.length;w++)B.header.push({text:h[w],tokens:this.lexer.inline(h[w]),header:!0,align:B.align[w]});for(let w of k)B.rows.push(z7(w,B.header.length).map((g,z)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:B.align[z]})));return B}}lheading(y){let x=this.rules.block.lheading.exec(y);if(x)return{type:"heading",raw:x[0],depth:x[2].charAt(0)==="="?1:2,text:x[1],tokens:this.lexer.inline(x[1])}}paragraph(y){let x=this.rules.block.paragraph.exec(y);if(x){let h=x[1].charAt(x[1].length-1)===`
|
|
42
|
+
`?x[1].slice(0,-1):x[1];return{type:"paragraph",raw:x[0],text:h,tokens:this.lexer.inline(h)}}}text(y){let x=this.rules.block.text.exec(y);if(x)return{type:"text",raw:x[0],text:x[0],tokens:this.lexer.inline(x[0])}}escape(y){let x=this.rules.inline.escape.exec(y);if(x)return{type:"escape",raw:x[0],text:x[1]}}tag(y){let x=this.rules.inline.tag.exec(y);if(x)return!this.lexer.state.inLink&&this.rules.other.startATag.test(x[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(x[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(x[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(x[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:x[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:x[0]}}link(y){let x=this.rules.inline.link.exec(y);if(x){let h=x[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(h)){if(!this.rules.other.endAngleBracket.test(h))return;let B=Q0(h.slice(0,-1),"\\");if((h.length-B.length)%2===0)return}else{let B=Zk(x[2],"()");if(B===-2)return;if(B>-1){let w=(x[0].indexOf("!")===0?5:4)+x[1].length+B;x[2]=x[2].substring(0,B),x[0]=x[0].substring(0,w).trim(),x[3]=""}}let C=x[2],k="";if(this.options.pedantic){let B=this.rules.other.pedanticHrefTitle.exec(C);B&&(C=B[1],k=B[3])}else k=x[3]?x[3].slice(1,-1):"";return C=C.trim(),this.rules.other.startAngleBracket.test(C)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(h)?C=C.slice(1):C=C.slice(1,-1)),q7(x,{href:C&&C.replace(this.rules.inline.anyPunctuation,"$1"),title:k&&k.replace(this.rules.inline.anyPunctuation,"$1")},x[0],this.lexer,this.rules)}}reflink(y,x){let h;if((h=this.rules.inline.reflink.exec(y))||(h=this.rules.inline.nolink.exec(y))){let C=(h[2]||h[1]).replace(this.rules.other.multipleSpaceGlobal," "),k=x[C.toLowerCase()];if(!k){let B=h[0].charAt(0);return{type:"text",raw:B,text:B}}return q7(h,k,h[0],this.lexer,this.rules)}}emStrong(y,x,h=""){let C=this.rules.inline.emStrongLDelim.exec(y);if(!C||C[3]&&h.match(this.rules.other.unicodeAlphaNumeric))return;if(!(C[1]||C[2])||!h||this.rules.inline.punctuation.exec(h)){let k=[...C[0]].length-1,B,w,g=k,z=0,q=C[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(q.lastIndex=0,x=x.slice(-1*y.length+k);(C=q.exec(x))!=null;){if(B=C[1]||C[2]||C[3]||C[4]||C[5]||C[6],!B)continue;if(w=[...B].length,C[3]||C[4]){g+=w;continue}else if((C[5]||C[6])&&k%3&&!((k+w)%3)){z+=w;continue}if(g-=w,g>0)continue;w=Math.min(w,w+g+z);let j=[...C[0]][0].length,V=y.slice(0,k+C.index+j+w);if(Math.min(k,w)%2){let P=V.slice(1,-1);return{type:"em",raw:V,text:P,tokens:this.lexer.inlineTokens(P)}}let A=V.slice(2,-2);return{type:"strong",raw:V,text:A,tokens:this.lexer.inlineTokens(A)}}}}codespan(y){let x=this.rules.inline.code.exec(y);if(x){let h=x[2].replace(this.rules.other.newLineCharGlobal," "),C=this.rules.other.nonSpaceChar.test(h),k=this.rules.other.startingSpaceChar.test(h)&&this.rules.other.endingSpaceChar.test(h);return C&&k&&(h=h.substring(1,h.length-1)),{type:"codespan",raw:x[0],text:h}}}br(y){let x=this.rules.inline.br.exec(y);if(x)return{type:"br",raw:x[0]}}del(y){let x=this.rules.inline.del.exec(y);if(x)return{type:"del",raw:x[0],text:x[2],tokens:this.lexer.inlineTokens(x[2])}}autolink(y){let x=this.rules.inline.autolink.exec(y);if(x){let h,C;return x[2]==="@"?(h=x[1],C="mailto:"+h):(h=x[1],C=h),{type:"link",raw:x[0],text:h,href:C,tokens:[{type:"text",raw:h,text:h}]}}}url(y){let x;if(x=this.rules.inline.url.exec(y)){let h,C;if(x[2]==="@")h=x[0],C="mailto:"+h;else{let k;do k=x[0],x[0]=this.rules.inline._backpedal.exec(x[0])?.[0]??"";while(k!==x[0]);h=x[0],x[1]==="www."?C="http://"+x[0]:C=x[0]}return{type:"link",raw:x[0],text:h,href:C,tokens:[{type:"text",raw:h,text:h}]}}}inlineText(y){let x=this.rules.inline.text.exec(y);if(x){let h=this.lexer.state.inRawBlock;return{type:"text",raw:x[0],text:x[0],escaped:h}}}},F1=class y{tokens;options;state;tokenizer;inlineQueue;constructor(x){this.tokens=[],this.tokens.links=Object.create(null),this.options=x||K2,this.options.tokenizer=this.options.tokenizer||new R4,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let h={other:B1,block:J4.normal,inline:U0.normal};this.options.pedantic?(h.block=J4.pedantic,h.inline=U0.pedantic):this.options.gfm&&(h.block=J4.gfm,this.options.breaks?h.inline=U0.breaks:h.inline=U0.gfm),this.tokenizer.rules=h}static get rules(){return{block:J4,inline:U0}}static lex(x,h){return new y(h).lex(x)}static lexInline(x,h){return new y(h).inlineTokens(x)}lex(x){x=x.replace(B1.carriageReturn,`
|
|
43
|
+
`),this.blockTokens(x,this.tokens);for(let h=0;h<this.inlineQueue.length;h++){let C=this.inlineQueue[h];this.inlineTokens(C.src,C.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(x,h=[],C=!1){for(this.options.pedantic&&(x=x.replace(B1.tabCharGlobal," ").replace(B1.spaceLine,""));x;){let k;if(this.options.extensions?.block?.some((w)=>(k=w.call({lexer:this},x,h))?(x=x.substring(k.raw.length),h.push(k),!0):!1))continue;if(k=this.tokenizer.space(x)){x=x.substring(k.raw.length);let w=h.at(-1);k.raw.length===1&&w!==void 0?w.raw+=`
|
|
44
|
+
`:h.push(k);continue}if(k=this.tokenizer.code(x)){x=x.substring(k.raw.length);let w=h.at(-1);w?.type==="paragraph"||w?.type==="text"?(w.raw+=(w.raw.endsWith(`
|
|
45
45
|
`)?"":`
|
|
46
|
-
`)+
|
|
47
|
-
`+
|
|
46
|
+
`)+k.raw,w.text+=`
|
|
47
|
+
`+k.text,this.inlineQueue.at(-1).src=w.text):h.push(k);continue}if(k=this.tokenizer.fences(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.heading(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.hr(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.blockquote(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.list(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.html(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.def(x)){x=x.substring(k.raw.length);let w=h.at(-1);w?.type==="paragraph"||w?.type==="text"?(w.raw+=(w.raw.endsWith(`
|
|
48
48
|
`)?"":`
|
|
49
|
-
`)+
|
|
50
|
-
`+
|
|
49
|
+
`)+k.raw,w.text+=`
|
|
50
|
+
`+k.raw,this.inlineQueue.at(-1).src=w.text):this.tokens.links[k.tag]||(this.tokens.links[k.tag]={href:k.href,title:k.title},h.push(k));continue}if(k=this.tokenizer.table(x)){x=x.substring(k.raw.length),h.push(k);continue}if(k=this.tokenizer.lheading(x)){x=x.substring(k.raw.length),h.push(k);continue}let B=x;if(this.options.extensions?.startBlock){let w=1/0,g=x.slice(1),z;this.options.extensions.startBlock.forEach((q)=>{z=q.call({lexer:this},g),typeof z=="number"&&z>=0&&(w=Math.min(w,z))}),w<1/0&&w>=0&&(B=x.substring(0,w+1))}if(this.state.top&&(k=this.tokenizer.paragraph(B))){let w=h.at(-1);C&&w?.type==="paragraph"?(w.raw+=(w.raw.endsWith(`
|
|
51
51
|
`)?"":`
|
|
52
|
-
`)+
|
|
53
|
-
`+
|
|
52
|
+
`)+k.raw,w.text+=`
|
|
53
|
+
`+k.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=w.text):h.push(k),C=B.length!==x.length,x=x.substring(k.raw.length);continue}if(k=this.tokenizer.text(x)){x=x.substring(k.raw.length);let w=h.at(-1);w?.type==="text"?(w.raw+=(w.raw.endsWith(`
|
|
54
54
|
`)?"":`
|
|
55
|
-
`)+
|
|
56
|
-
`+
|
|
57
|
-
`;return C?'<pre><code class="language-'+
|
|
58
|
-
`:"<pre><code>"+(h?
|
|
55
|
+
`)+k.raw,w.text+=`
|
|
56
|
+
`+k.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=w.text):h.push(k);continue}if(x){let w="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(w);break}else throw Error(w)}}return this.state.top=!0,h}inline(x,h=[]){return this.inlineQueue.push({src:x,tokens:h}),h}inlineTokens(x,h=[]){let C=x,k=null;if(this.tokens.links){let z=Object.keys(this.tokens.links);if(z.length>0)for(;(k=this.tokenizer.rules.inline.reflinkSearch.exec(C))!=null;)z.includes(k[0].slice(k[0].lastIndexOf("[")+1,-1))&&(C=C.slice(0,k.index)+"["+"a".repeat(k[0].length-2)+"]"+C.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(k=this.tokenizer.rules.inline.anyPunctuation.exec(C))!=null;)C=C.slice(0,k.index)+"++"+C.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let B;for(;(k=this.tokenizer.rules.inline.blockSkip.exec(C))!=null;)B=k[2]?k[2].length:0,C=C.slice(0,k.index+B)+"["+"a".repeat(k[0].length-B-2)+"]"+C.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);C=this.options.hooks?.emStrongMask?.call({lexer:this},C)??C;let w=!1,g="";for(;x;){w||(g=""),w=!1;let z;if(this.options.extensions?.inline?.some((j)=>(z=j.call({lexer:this},x,h))?(x=x.substring(z.raw.length),h.push(z),!0):!1))continue;if(z=this.tokenizer.escape(x)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.tag(x)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.link(x)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.reflink(x,this.tokens.links)){x=x.substring(z.raw.length);let j=h.at(-1);z.type==="text"&&j?.type==="text"?(j.raw+=z.raw,j.text+=z.text):h.push(z);continue}if(z=this.tokenizer.emStrong(x,C,g)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.codespan(x)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.br(x)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.del(x)){x=x.substring(z.raw.length),h.push(z);continue}if(z=this.tokenizer.autolink(x)){x=x.substring(z.raw.length),h.push(z);continue}if(!this.state.inLink&&(z=this.tokenizer.url(x))){x=x.substring(z.raw.length),h.push(z);continue}let q=x;if(this.options.extensions?.startInline){let j=1/0,V=x.slice(1),A;this.options.extensions.startInline.forEach((P)=>{A=P.call({lexer:this},V),typeof A=="number"&&A>=0&&(j=Math.min(j,A))}),j<1/0&&j>=0&&(q=x.substring(0,j+1))}if(z=this.tokenizer.inlineText(q)){x=x.substring(z.raw.length),z.raw.slice(-1)!=="_"&&(g=z.raw.slice(-1)),w=!0;let j=h.at(-1);j?.type==="text"?(j.raw+=z.raw,j.text+=z.text):h.push(z);continue}if(x){let j="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(j);break}else throw Error(j)}}return h}},T2=class{options;parser;constructor(y){this.options=y||K2}space(y){return""}code({text:y,lang:x,escaped:h}){let C=(x||"").match(B1.notSpaceStart)?.[0],k=y.replace(B1.endingNewline,"")+`
|
|
57
|
+
`;return C?'<pre><code class="language-'+T1(C)+'">'+(h?k:T1(k,!0))+`</code></pre>
|
|
58
|
+
`:"<pre><code>"+(h?k:T1(k,!0))+`</code></pre>
|
|
59
59
|
`}blockquote({tokens:y}){return`<blockquote>
|
|
60
60
|
${this.parser.parse(y)}</blockquote>
|
|
61
61
|
`}html({text:y}){return y}def(y){return""}heading({tokens:y,depth:x}){return`<h${x}>${this.parser.parseInline(y)}</h${x}>
|
|
62
62
|
`}hr(y){return`<hr>
|
|
63
|
-
`}list(y){let{ordered:x,start:h}=y,C="";for(let
|
|
64
|
-
`+C+"</"+
|
|
65
|
-
`}listitem(y){let x="";if(y.task){let h=this.checkbox({checked:!!y.checked});y.loose?y.tokens[0]?.type==="paragraph"?(y.tokens[0].text=h+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=h+" "+
|
|
63
|
+
`}list(y){let{ordered:x,start:h}=y,C="";for(let w=0;w<y.items.length;w++){let g=y.items[w];C+=this.listitem(g)}let k=x?"ol":"ul",B=x&&h!==1?' start="'+h+'"':"";return"<"+k+B+`>
|
|
64
|
+
`+C+"</"+k+`>
|
|
65
|
+
`}listitem(y){let x="";if(y.task){let h=this.checkbox({checked:!!y.checked});y.loose?y.tokens[0]?.type==="paragraph"?(y.tokens[0].text=h+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=h+" "+T1(y.tokens[0].tokens[0].text),y.tokens[0].tokens[0].escaped=!0)):y.tokens.unshift({type:"text",raw:h+" ",text:h+" ",escaped:!0}):x+=h+" "}return x+=this.parser.parse(y.tokens,!!y.loose),`<li>${x}</li>
|
|
66
66
|
`}checkbox({checked:y}){return"<input "+(y?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:y}){return`<p>${this.parser.parseInline(y)}</p>
|
|
67
|
-
`}table(y){let x="",h="";for(let
|
|
67
|
+
`}table(y){let x="",h="";for(let k=0;k<y.header.length;k++)h+=this.tablecell(y.header[k]);x+=this.tablerow({text:h});let C="";for(let k=0;k<y.rows.length;k++){let B=y.rows[k];h="";for(let w=0;w<B.length;w++)h+=this.tablecell(B[w]);C+=this.tablerow({text:h})}return C&&(C=`<tbody>${C}</tbody>`),`<table>
|
|
68
68
|
<thead>
|
|
69
69
|
`+x+`</thead>
|
|
70
70
|
`+C+`</table>
|
|
71
71
|
`}tablerow({text:y}){return`<tr>
|
|
72
72
|
${y}</tr>
|
|
73
73
|
`}tablecell(y){let x=this.parser.parseInline(y.tokens),h=y.header?"th":"td";return(y.align?`<${h} align="${y.align}">`:`<${h}>`)+x+`</${h}>
|
|
74
|
-
`}strong({tokens:y}){return`<strong>${this.parser.parseInline(y)}</strong>`}em({tokens:y}){return`<em>${this.parser.parseInline(y)}</em>`}codespan({text:y}){return`<code>${
|
|
75
|
-
`+this.renderer.text(g);h?C+=this.renderer.paragraph({type:"paragraph",raw:
|
|
76
|
-
Please report this to https://github.com/markedjs/marked.`,y){let C="<p>An error occurred:</p><pre>"+
|
|
74
|
+
`}strong({tokens:y}){return`<strong>${this.parser.parseInline(y)}</strong>`}em({tokens:y}){return`<em>${this.parser.parseInline(y)}</em>`}codespan({text:y}){return`<code>${T1(y,!0)}</code>`}br(y){return"<br>"}del({tokens:y}){return`<del>${this.parser.parseInline(y)}</del>`}link({href:y,title:x,tokens:h}){let C=this.parser.parseInline(h),k=g7(y);if(k===null)return C;y=k;let B='<a href="'+y+'"';return x&&(B+=' title="'+T1(x)+'"'),B+=">"+C+"</a>",B}image({href:y,title:x,text:h,tokens:C}){C&&(h=this.parser.parseInline(C,this.parser.textRenderer));let k=g7(y);if(k===null)return T1(h);y=k;let B=`<img src="${y}" alt="${h}"`;return x&&(B+=` title="${T1(x)}"`),B+=">",B}text(y){return"tokens"in y&&y.tokens?this.parser.parseInline(y.tokens):("escaped"in y)&&y.escaped?y.text:T1(y.text)}},d3=class{strong({text:y}){return y}em({text:y}){return y}codespan({text:y}){return y}del({text:y}){return y}html({text:y}){return y}text({text:y}){return y}link({text:y}){return""+y}image({text:y}){return""+y}br(){return""}},N1=class y{options;renderer;textRenderer;constructor(x){this.options=x||K2,this.options.renderer=this.options.renderer||new T2,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new d3}static parse(x,h){return new y(h).parse(x)}static parseInline(x,h){return new y(h).parseInline(x)}parse(x,h=!0){let C="";for(let k=0;k<x.length;k++){let B=x[k];if(this.options.extensions?.renderers?.[B.type]){let g=B,z=this.options.extensions.renderers[g.type].call({parser:this},g);if(z!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(g.type)){C+=z||"";continue}}let w=B;switch(w.type){case"space":{C+=this.renderer.space(w);continue}case"hr":{C+=this.renderer.hr(w);continue}case"heading":{C+=this.renderer.heading(w);continue}case"code":{C+=this.renderer.code(w);continue}case"table":{C+=this.renderer.table(w);continue}case"blockquote":{C+=this.renderer.blockquote(w);continue}case"list":{C+=this.renderer.list(w);continue}case"html":{C+=this.renderer.html(w);continue}case"def":{C+=this.renderer.def(w);continue}case"paragraph":{C+=this.renderer.paragraph(w);continue}case"text":{let g=w,z=this.renderer.text(g);for(;k+1<x.length&&x[k+1].type==="text";)g=x[++k],z+=`
|
|
75
|
+
`+this.renderer.text(g);h?C+=this.renderer.paragraph({type:"paragraph",raw:z,text:z,tokens:[{type:"text",raw:z,text:z,escaped:!0}]}):C+=z;continue}default:{let g='Token with "'+w.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw Error(g)}}}return C}parseInline(x,h=this.renderer){let C="";for(let k=0;k<x.length;k++){let B=x[k];if(this.options.extensions?.renderers?.[B.type]){let g=this.options.extensions.renderers[B.type].call({parser:this},B);if(g!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(B.type)){C+=g||"";continue}}let w=B;switch(w.type){case"escape":{C+=h.text(w);break}case"html":{C+=h.html(w);break}case"link":{C+=h.link(w);break}case"image":{C+=h.image(w);break}case"strong":{C+=h.strong(w);break}case"em":{C+=h.em(w);break}case"codespan":{C+=h.codespan(w);break}case"br":{C+=h.br(w);break}case"del":{C+=h.del(w);break}case"text":{C+=h.text(w);break}default:{let g='Token with "'+w.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw Error(g)}}}return C}},$0=class{options;block;constructor(y){this.options=y||K2}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(y){return y}postprocess(y){return y}processAllTokens(y){return y}emStrongMask(y){return y}provideLexer(){return this.block?F1.lex:F1.lexInline}provideParser(){return this.block?N1.parse:N1.parseInline}},v4=class{defaults=M3();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=N1;Renderer=T2;TextRenderer=d3;Lexer=F1;Tokenizer=R4;Hooks=$0;constructor(...y){this.use(...y)}walkTokens(y,x){let h=[];for(let C of y)switch(h=h.concat(x.call(this,C)),C.type){case"table":{let k=C;for(let B of k.header)h=h.concat(this.walkTokens(B.tokens,x));for(let B of k.rows)for(let w of B)h=h.concat(this.walkTokens(w.tokens,x));break}case"list":{let k=C;h=h.concat(this.walkTokens(k.items,x));break}default:{let k=C;this.defaults.extensions?.childTokens?.[k.type]?this.defaults.extensions.childTokens[k.type].forEach((B)=>{let w=k[B].flat(1/0);h=h.concat(this.walkTokens(w,x))}):k.tokens&&(h=h.concat(this.walkTokens(k.tokens,x)))}}return h}use(...y){let x=this.defaults.extensions||{renderers:{},childTokens:{}};return y.forEach((h)=>{let C={...h};if(C.async=this.defaults.async||C.async||!1,h.extensions&&(h.extensions.forEach((k)=>{if(!k.name)throw Error("extension name required");if("renderer"in k){let B=x.renderers[k.name];B?x.renderers[k.name]=function(...w){let g=k.renderer.apply(this,w);return g===!1&&(g=B.apply(this,w)),g}:x.renderers[k.name]=k.renderer}if("tokenizer"in k){if(!k.level||k.level!=="block"&&k.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let B=x[k.level];B?B.unshift(k.tokenizer):x[k.level]=[k.tokenizer],k.start&&(k.level==="block"?x.startBlock?x.startBlock.push(k.start):x.startBlock=[k.start]:k.level==="inline"&&(x.startInline?x.startInline.push(k.start):x.startInline=[k.start]))}"childTokens"in k&&k.childTokens&&(x.childTokens[k.name]=k.childTokens)}),C.extensions=x),h.renderer){let k=this.defaults.renderer||new T2(this.defaults);for(let B in h.renderer){if(!(B in k))throw Error(`renderer '${B}' does not exist`);if(["options","parser"].includes(B))continue;let w=B,g=h.renderer[w],z=k[w];k[w]=(...q)=>{let j=g.apply(k,q);return j===!1&&(j=z.apply(k,q)),j||""}}C.renderer=k}if(h.tokenizer){let k=this.defaults.tokenizer||new R4(this.defaults);for(let B in h.tokenizer){if(!(B in k))throw Error(`tokenizer '${B}' does not exist`);if(["options","rules","lexer"].includes(B))continue;let w=B,g=h.tokenizer[w],z=k[w];k[w]=(...q)=>{let j=g.apply(k,q);return j===!1&&(j=z.apply(k,q)),j}}C.tokenizer=k}if(h.hooks){let k=this.defaults.hooks||new $0;for(let B in h.hooks){if(!(B in k))throw Error(`hook '${B}' does not exist`);if(["options","block"].includes(B))continue;let w=B,g=h.hooks[w],z=k[w];$0.passThroughHooks.has(B)?k[w]=(q)=>{if(this.defaults.async&&$0.passThroughHooksRespectAsync.has(B))return(async()=>{let V=await g.call(k,q);return z.call(k,V)})();let j=g.call(k,q);return z.call(k,j)}:k[w]=(...q)=>{if(this.defaults.async)return(async()=>{let V=await g.apply(k,q);return V===!1&&(V=await z.apply(k,q)),V})();let j=g.apply(k,q);return j===!1&&(j=z.apply(k,q)),j}}C.hooks=k}if(h.walkTokens){let k=this.defaults.walkTokens,B=h.walkTokens;C.walkTokens=function(w){let g=[];return g.push(B.call(this,w)),k&&(g=g.concat(k.call(this,w))),g}}this.defaults={...this.defaults,...C}}),this}setOptions(y){return this.defaults={...this.defaults,...y},this}lexer(y,x){return F1.lex(y,x??this.defaults)}parser(y,x){return N1.parse(y,x??this.defaults)}parseMarkdown(y){return(x,h)=>{let C={...h},k={...this.defaults,...C},B=this.onError(!!k.silent,!!k.async);if(this.defaults.async===!0&&C.async===!1)return B(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof x>"u"||x===null)return B(Error("marked(): input parameter is undefined or null"));if(typeof x!="string")return B(Error("marked(): input parameter is of type "+Object.prototype.toString.call(x)+", string expected"));if(k.hooks&&(k.hooks.options=k,k.hooks.block=y),k.async)return(async()=>{let w=k.hooks?await k.hooks.preprocess(x):x,g=await(k.hooks?await k.hooks.provideLexer():y?F1.lex:F1.lexInline)(w,k),z=k.hooks?await k.hooks.processAllTokens(g):g;k.walkTokens&&await Promise.all(this.walkTokens(z,k.walkTokens));let q=await(k.hooks?await k.hooks.provideParser():y?N1.parse:N1.parseInline)(z,k);return k.hooks?await k.hooks.postprocess(q):q})().catch(B);try{k.hooks&&(x=k.hooks.preprocess(x));let w=(k.hooks?k.hooks.provideLexer():y?F1.lex:F1.lexInline)(x,k);k.hooks&&(w=k.hooks.processAllTokens(w)),k.walkTokens&&this.walkTokens(w,k.walkTokens);let g=(k.hooks?k.hooks.provideParser():y?N1.parse:N1.parseInline)(w,k);return k.hooks&&(g=k.hooks.postprocess(g)),g}catch(w){return B(w)}}}onError(y,x){return(h)=>{if(h.message+=`
|
|
76
|
+
Please report this to https://github.com/markedjs/marked.`,y){let C="<p>An error occurred:</p><pre>"+T1(h.message+"",!0)+"</pre>";return x?Promise.resolve(C):C}if(x)return Promise.reject(h);throw h}}},A2=new v4;function H(y,x){return A2.parse(y,x)}H.options=H.setOptions=function(y){return A2.setOptions(y),H.defaults=A2.defaults,l7(H.defaults),H};H.getDefaults=M3;H.defaults=K2;H.use=function(...y){return A2.use(...y),H.defaults=A2.defaults,l7(H.defaults),H};H.walkTokens=function(y,x){return A2.walkTokens(y,x)};H.parseInline=A2.parseInline;H.Parser=N1;H.parser=N1.parse;H.Renderer=T2;H.TextRenderer=d3;H.Lexer=F1;H.lexer=F1.lex;H.Tokenizer=R4;H.Hooks=$0;H.parse=H;var{options:qq,setOptions:lq,use:jq,walkTokens:Vq,parseInline:Xq}=H;var _q=N1.parse,Aq=F1.lex;var Dk=new T2,u3,r3=new v4;r3.use({renderer:{code(y){let x=String(y.lang||""),h=x.match(/^[a-z]+/)?.[0]??"",C=x.match(/#([A-Za-z0-9_-]+)/)?.[1]??"",k=x.match(/:([a-z]+)/)?.[1]??"",B=u3?.get(y.text);if(!C&&!k&&!B)return!1;let w=Dk.code({...y,lang:h}),g=[C&&`data-example-id="${C}"`,k&&`data-example-mode="${k}"`].filter(Boolean).join(" ");if(g)w=w.replace(/^<pre>/,`<pre ${g}>`);if(B){let z=JSON.stringify(B.js).replace(/</g,"\\u003c");w+=`<script type="application/tosi-transpiled" data-dialect="${B.dialect}">${z}</script>`}return w}}});function f3(y){return y.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Hk(y){return y.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}var vk=new v4,s3=new Map,p2=[];r3.use({hooks:{preprocess(y){return s3=new Map,p2=[],y},postprocess(y){if(p2.length===0)return y;let x=p2.map((h)=>{let C=vk.parseInline(s3.get(h)??""),k=f3(h);return`<li id="fn-${k}"><p>${C} <a href="#fnref-${k}" class="footnote-backref" aria-label="Back to reference">↩</a></p></li>`}).join(`
|
|
77
77
|
`);return`${y}
|
|
78
78
|
<section class="footnotes" role="doc-endnotes">
|
|
79
79
|
<hr />
|
|
@@ -81,7 +81,7 @@ Please report this to https://github.com/markedjs/marked.`,y){let C="<p>An error
|
|
|
81
81
|
${x}
|
|
82
82
|
</ol>
|
|
83
83
|
</section>
|
|
84
|
-
`}},extensions:[{name:"wikilink",level:"inline",start(y){return y.match(/\[\[/)?.index},tokenizer(y){let x=/^\[\[([^\]|]+?)(?:\|([^\]]+?))?\]\]/.exec(y);if(!x)return;return{type:"wikilink",raw:x[0],target:x[1].trim(),label:(x[2]??x[1]).trim()}},renderer(y){return`<a href="/${T3(y.target)}/" class="wikilink">${Yl(y.label)}</a>`}},{name:"footnoteDef",level:"block",start(y){return y.match(/^\[\^[^\]]+\]:/m)?.index},tokenizer(y){let x=/^\[\^([^\]]+)\]:[ \t]*([^\n]*)(?:\n|$)/.exec(y);if(!x)return;return d3.set(x[1].trim(),x[2].trim()),{type:"footnoteDef",raw:x[0]}},renderer(){return""}},{name:"footnoteRef",level:"inline",start(y){return y.match(/\[\^/)?.index},tokenizer(y){let x=/^\[\^([^\]]+)\]/.exec(y);if(!x)return;let h=x[1].trim();if(!M2.includes(h))M2.push(h);return{type:"footnoteRef",raw:x[0],id:h}},renderer(y){let x=M2.indexOf(y.id)+1,h=T3(y.id);return`<sup class="footnote-ref"><a href="#fn-${h}" id="fnref-${h}">${x}</a></sup>`}}]});function Q0(y,x={}){L3=x.bakes;try{return r3.parse(y)}finally{L3=void 0}}function U7(y,x){let h=y.headTitle?.trim();if(h)return h;let C=x?.trim()??"";if(!C)return y.title;let l=y.title.toLowerCase(),i=C.toLowerCase();if(l.includes(i)||i.includes(l))return y.title;return`${y.title} — ${C}`}var{div:K2,slot:G7,span:Jl,button:Zl}=G;class D4 extends F{static preferredTagName="tosi-tabs";static initAttributes={localized:!1};value=0;makeTab(y,x,h){let C=x.getAttribute("name"),l=x.querySelector('template[role="tab"]')?.content.cloneNode(!0)||(this.localized?Q1(C):Jl(C)),i=K2(l,{part:"tab",tabindex:0,role:"tab",ariaControls:h},x.hasAttribute("data-close")?Zl({title:"close",class:"close"},O.x()):{}),k=x.dataset.tooltip;if(k)i.dataset.tooltip=k;return i}static shadowStyleSpec={":host":{"--tosi-tabs-selected-color":"var(--xin-tabs-selected-color, var(--tosi-accent, currentColor))","--tosi-tabs-bar-color":"var(--xin-tabs-bar-color, #ccc)","--tosi-tabs-bar-height":"var(--xin-tabs-bar-height, 2px)",display:"flex",flexDirection:"column",position:"relative",overflow:"hidden",boxShadow:"none !important"},slot:{position:"relative",display:"block",flex:"1",overflow:"hidden",overflowY:"auto"},'slot[name="after-tabs"]':{flex:"0 0 auto"},"::slotted([hidden])":{display:"none !important"},":host::part(tabpanel)":{display:"flex",flexDirection:"column",overflowX:"auto"},":host::part(tabrow)":{display:"flex"},":host .tabs":{display:"flex",userSelect:"none",whiteSpace:"nowrap"},":host .tabs > div":{padding:`${z.spacing50} ${z.spacing}`,cursor:"default",display:"flex",alignItems:"baseline"},":host .tabs > [aria-selected]":{"--text-color":z.tosiTabsSelectedColor,color:z.textColor},":host .elastic":{flex:"1"},":host .border":{background:z.tosiTabsBarColor},":host .border > .selected":{content:" ",width:0,height:z.tosiTabsBarHeight,background:z.tosiTabsSelectedColor,transition:"ease-out 0.2s"},":host button.close":{border:0,background:"transparent",textAlign:"center",marginLeft:z.spacing50,padding:0},":host button.close > svg":{height:"12px"}};handleCloseTab=null;get onCloseTab(){return this.handleCloseTab}set onCloseTab(y){this.handleCloseTab=y}content=[K2({role:"tabpanel",part:"tabpanel"},K2({part:"tabrow"},K2({class:"tabs",part:"tabs"}),K2({class:"elastic"}),G7({name:"after-tabs"})),K2({class:"border"},K2({class:"selected",part:"selected"}))),G7()];addTabBody(y,x=!1){if(!y.hasAttribute("name"))throw console.error("element has no name attribute",y),Error("element has no name attribute");if(this.append(y),this.setupTabs(),x)this.value=this.bodies.length-1;this.queueRender()}removeTabBody(y){y.remove(),this.setupTabs(),this.queueRender()}keyTab=(y)=>{let{tabs:x}=this.parts,h=[...x.children].indexOf(y.target);switch(y.key){case"ArrowLeft":this.value=(h+Number(x.children.length)-1)%x.children.length,x.children[this.value].focus(),y.preventDefault();break;case"ArrowRight":this.value=(h+1)%x.children.length,x.children[this.value].focus(),y.preventDefault();break;case" ":this.pickTab(y),y.preventDefault();break;default:}};get bodies(){return[...this.children].filter((y)=>y.hasAttribute("name"))}pickTab=(y)=>{let{tabs:x}=this.parts,h=y.target,C=h.closest("button.close")!==null,l=h.closest(".tabs > div"),i=[...x.children].indexOf(l);if(C){let k=this.bodies[i];if(!this.handleCloseTab||this.handleCloseTab(k)!==!1)this.removeTabBody(this.bodies[i])}else if(i>-1)this.value=i};setupTabs=()=>{let{tabs:y}=this.parts,x=[...this.children].filter((h)=>!h.hasAttribute("slot")&&h.hasAttribute("name"));if(y.textContent="",this.value>=x.length)this.value=x.length-1;for(let h in x){let C=x[h],l=`${this.instanceId}-${h}`;C.id=l;let i=this.makeTab(this,C,l);y.append(i)}};connectedCallback(){super.connectedCallback();let{tabs:y}=this.parts;y.addEventListener("click",this.pickTab),y.addEventListener("keydown",this.keyTab),this.setupTabs(),M1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),M1.allInstances.delete(this)}localeChanged=()=>{this.queueRender()};handleResize(){this.queueRender()}render(){let{tabs:y,selected:x}=this.parts,h=this.bodies;for(let C=0;C<h.length;C++){let l=h[C],i=y.children[C],k=this.value===Number(C);if(i.toggleAttribute("aria-selected",k),l.toggleAttribute("hidden",!k),k)x.style.marginLeft=`${i.offsetLeft-y.offsetLeft}px`,x.style.width=`${i.offsetWidth}px`}}}var pl=D4,X0=D4.elementCreator(),vl=X0,Rl=X0;var{div:o3,button:Dl}=G,Hl={error:"red",warn:"orange",info:"royalblue",log:"gray",success:"green",progress:"royalblue"};class h2 extends F{static preferredTagName="tosi-notification";static singleton;static shadowStyleSpec={":host":{_notificationSpacing:8,_notificationWidth:360,_notificationPadding:`${z.notificationSpacing} ${z.notificationSpacing50} ${z.notificationSpacing} ${z.notificationSpacing200}`,_notificationBg:"#fafafa",_notificationAccentColor:"#aaa",_notificationTextColor:"#444",_notificationIconSize:z.notificationSpacing300,_notificationButtonSize:48,_notificationBorderWidth:"3px 0 0",_notificationBorderRadius:z.notificationSpacing50,position:"fixed",left:0,right:0,bottom:0,paddingBottom:z.notificationSpacing,width:z.notificationWidth,display:"flex",flexDirection:"column-reverse",margin:"0 auto",gap:z.notificationSpacing,maxHeight:"50vh",overflow:"hidden auto",boxShadow:"none !important",color:z.notificationTextColor},":host .note":{display:"grid",background:z.notificationBg,padding:z.notificationPadding,gridTemplateColumns:`${z.notificationIconSize} 1fr ${z.notificationButtonSize}`,gap:z.notificationSpacing,alignItems:"center",borderRadius:z.notificationBorderRadius,boxShadow:`0 2px 8px #0006, inset 0 0 0 2px ${z.notificationAccentColor}`,borderColor:z.notificationAccentColor,borderWidth:z.notificationBorderWidth,borderStyle:"solid",transition:"0.5s ease-in",transitionProperty:"margin, opacity",zIndex:1},":host .note button":{display:"flex",lineHeight:z.notificationButtonSize,padding:0,margin:0,height:z.notificationButtonSize,width:z.notificationButtonSize,background:"transparent",alignItems:"center",justifyContent:"center",boxShadow:"none",border:"none",position:"relative"},":host .note button:hover svg":{stroke:z.notificationAccentColor},":host .note button:active svg":{borderRadius:99,stroke:z.notificationBg,background:z.notificationAccentColor,padding:z.spacing50},":host .note svg":{height:z.notificationIconSize,width:z.notificationIconSize,pointerEvents:"none",color:z.notificationAccentColor},":host .message":{display:"flex",flexDirection:"column",alignItems:"center",gap:z.notificationSpacing},":host .note.closing":{opacity:0,zIndex:0}};static removeNote(y){y.classList.add("closing"),y.style.marginBottom=-y.offsetHeight+"px";let x=()=>{y.remove()};y.addEventListener("transitionend",x),setTimeout(x,1000)}static post(y){let{message:x,duration:h,type:C,close:l,progress:i,icon:k,color:g}=Object.assign({type:"info",duration:-1},typeof y==="string"?{message:y}:y);if(!this.singleton)this.singleton=n3();let w=this.singleton;document.body.append(w),w.style.zIndex=String(P2()+1);let B=g||Hl[C],q=i||C==="progress"?G.progress():{},j=()=>{if(l)l();h2.removeNote(U)},_=k instanceof SVGElement?k:k?O[k]():O.info(),K=C==="error"||C==="warn",U=o3({class:`note ${C}`,role:K?"alert":"status",ariaLive:K?"assertive":"polite",style:{_notificationAccentColor:B}},_,o3({class:"message"},o3(x),q),Dl({class:"close",title:"close",ariaLabel:"Close notification",apply(Q){Q.addEventListener("click",j)}},O.x()));if(w.shadowRoot.append(U),q instanceof HTMLProgressElement&&i instanceof Function){q.setAttribute("max",String(100)),q.value=i();let Q=setInterval(()=>{if(!w.shadowRoot.contains(U)){clearInterval(Q);return}let Y=i();if(q.value=Y,Y>=100)h2.removeNote(U)},1000)}if(h>0)setTimeout(()=>{h2.removeNote(U)},h*1000);return U.scrollIntoView(),j}content=null}var bl=h2,n3=h2.elementCreator(),Sl=n3;function f3(y){return h2.post(y)}var U2=(async()=>{}).constructor;function C2(y){return y.replace(/[^a-zA-Z0-9_$]/g,"")}function F7(y){return y.split(",").map((x)=>{let h=x.trim().match(/^(\w+)\s+as\s+(\w+)$/);return h?`${h[1]}: ${h[2]}`:x.trim()}).filter(Boolean).join(", ")}function Ml(y,x){let h=(C)=>/^(\.|\/|https?:)/.test(C)?C:x+C;return y.replace(/import\s+([^;'"]+?)\s+from\s+(['"])([^'"]+)\2[ \t]*;?/g,(C,l,i,k)=>{let g=`await import(${i}${h(k)}${i})`,w=l.trim(),B;if(B=w.match(/^\{([^}]*)\}$/))return`const { ${F7(B[1])} } = ${g}`;if(B=w.match(/^\*\s+as\s+(\w+)$/))return`const ${B[1]} = ${g}`;if(B=w.match(/^(\w+)$/))return`const ${B[1]} = (${g}).default`;if(B=w.match(/^(\w+)\s*,\s*\{([^}]*)\}$/))return`const { default: ${B[1]}, ${F7(B[2])} } = ${g}`;return C}).replace(/import\s+(['"])([^'"]+)\1[ \t]*;?/g,(C,l,i)=>`await import(${l}${h(i)}${l})`)}function Il(){return globalThis.__TOSI_IMPORT_RESOLVER?.prefix}function Y1(y,x,h=Il()){let C=y;for(let i of x){let k=C2(i),g=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");C=C.replace(new RegExp(`import\\s*\\{([^}]*)\\}\\s*from\\s*'${g}'`,"g"),(w,B)=>`const { ${B.replace(/\s+/g," ").trim()} } = ${k}`),C=C.replace(new RegExp(`import\\s*\\*\\s*as\\s+(\\w+)\\s+from\\s*'${g}'`,"g"),(w,B)=>`const ${B} = ${k}`),C=C.replace(new RegExp(`import\\s+(\\w+)\\s+from\\s*'${g}'`,"g"),(w,B)=>`const ${B} = ${k}`)}if(h)C=Ml(C,h);let l=C.match(/^\s*import\s+['"{*\w][^\n]*/m);if(l)throw Error(`live example: unsupported import \`${l[0].trim()}\` — imports `+`from the example context (${x.join(", ")}) are supported in { named }, * as ns, or default form`+(h?", and other packages resolve via the import-resolver.":" (enable importResolver to import other packages)."));return C}async function Q7(y,x,h){let C=Y1(y,Object.keys(x)),l=(await h(C,{transforms:["typescript"]})).code,i=Object.keys(x).map(C2),k=Object.values(x);await new U2(...i,l)(...k)}var u3="0.12.0";function a3(y){let x=globalThis.__TJS_LOCAL_BASE;return[...typeof x==="string"?[`${x}${y}`]:[],`https://cdn.jsdelivr.net/npm/tjs-lang@${u3}/dist/${y}`,`https://unpkg.com/tjs-lang@${u3}/dist/${y}`,`https://esm.sh/tjs-lang@${u3}/dist/${y}`]}async function m3(y){for(let x of y)try{let h=await import(x);if(h)return h}catch{}return null}async function cl(){try{let{tjs:x}=await import("tjs-lang/browser");if(typeof x==="function")return x}catch{}let y=await m3(a3("tjs-browser.js"));if(y&&typeof y.tjs==="function")return y.tjs;return null}var sl;async function Tl(){let y=[()=>import("tjs-lang/browser"),()=>m3(a3("tjs-browser.js"))];for(let x of y)try{let h=await x();if(h&&typeof h.extractTests==="function"&&typeof h.testUtils==="string")return{extractTests:h.extractTests,testUtils:h.testUtils}}catch{}return null}function X7(){return sl??=Tl()}async function dl(){try{let{fromTS:x}=await import("tjs-lang/browser/from-ts");if(typeof x==="function")return x}catch{}let y=await m3(a3("tjs-browser-from-ts.js"));if(y&&typeof y.fromTS==="function")return y.fromTS;return null}var Ll,rl,ol=256,$0=new Map,E3=(y,x)=>{if($0.size>=ol){let h=$0.keys().next().value;if(h!==void 0)$0.delete(h)}$0.set(y,x)},O7=!1,W7=!1;async function Y0(y="js"){if(y==="js")return(C)=>({code:C});let x=await(Ll??=cl());if(!x&&!O7)O7=!0,console.warn("tjs-lang not available — live examples run as raw JavaScript "+"(tjs/TypeScript examples will not transpile). Install with: npm install tjs-lang");let h=y==="ts"?await(rl??=dl()):null;if(y==="ts"&&!h&&!W7)W7=!0,console.warn("tjs-lang/browser/from-ts not available — `ts` examples run as raw JavaScript.");return(C)=>{let l=`${y}\x00${C}`,i=$0.get(l);if(i)return i;if(!x){let g={code:C};return E3(l,g),g}if(y==="ts")return(async()=>{let g=h?(await h(C,{emitTJS:!0})).code:C,w={code:x(g,{dialect:"tjs",runTests:!1}).code};return E3(l,w),w})();let k={code:x(C,{dialect:y,runTests:!1}).code};return E3(l,k),k}}var H4="live-example-payload";function $7(y,x,h){return h!==""?`${y}-${h}`:`${y}-${x}`}function t3(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("live-example: failed to write to localStorage",h)}}function nl(y){if(y===null)return null;try{return JSON.parse(y)}catch{return null}}function Y7(y,x,h,C,l,i){let k=new URLSearchParams({[y]:x});if(i?.sourceFile&&i.ordinal!=null)k.set("sf",i.sourceFile),k.set("ord",i.ordinal);let g=location.href.split("?")[0]+"?"+k.toString();t3(h,{remoteKey:C,sentAt:Date.now(),...l,original:i?.original}),window.open(g)}var fl=typeof BroadcastChannel<"u";class N0{storageKey;remoteKey;lastUpdate=0;interval;channel;listening=!1;onReceive;constructor(y,x,h){this.storageKey=y,this.remoteKey=x,this.onReceive=h}handlePayload=(y)=>{if(y.sentAt<=this.lastUpdate)return;if(y.remoteKey!==this.remoteKey)return;this.lastUpdate=y.sentAt,this.onReceive(y)};handleMessage=(y)=>{let x=y.data;if(x)this.handlePayload(x)};handlePoll=()=>{let y;try{y=localStorage.getItem(this.storageKey)}catch{return}let x=nl(y);if(x)this.handlePayload(x)};startListening(){if(this.listening)return;if(this.listening=!0,fl)this.channel=new BroadcastChannel(this.storageKey),this.channel.onmessage=this.handleMessage;this.interval=setInterval(this.handlePoll,500)}stopListening(){if(!this.listening)return;if(this.listening=!1,this.channel)this.channel.close(),this.channel=void 0;if(this.interval)clearInterval(this.interval),this.interval=void 0}send(y){let x={remoteKey:this.remoteKey,sentAt:Date.now(),...y};if(t3(this.storageKey,x),this.channel)this.channel.postMessage(x)}sendClose(){let y={remoteKey:this.remoteKey,sentAt:Date.now(),css:"",html:"",js:"",close:!0};if(t3(this.storageKey,y),this.channel)this.channel.postMessage(y)}}var N7="__tosiCaptureScope",{div:J7}=G;function ul(y,x){let h=y.customElements;if(!h)return;let C=(i)=>{if(!i||h.get(i))return;let k=customElements.get(i);if(k)try{h.define(i,k)}catch{}};for(let i of Object.values(x))if(i&&typeof i==="object"){for(let k of Object.values(i))if(typeof k==="function"&&"tagName"in k)C(k.tagName)}let l=y.document;if(l){let i=l.querySelectorAll("*");for(let k of i){let g=k.tagName.toLowerCase();if(g.includes("-"))C(g)}}}async function Z7(y,x){if(!x)return{code:y,extraContext:{}};let h;try{({scopeCaptureEpilogue:h}=await import("./index-0ps8jzdn.js"))}catch{return{code:y,extraContext:{}}}let C=h(y,N7);if(!C)return{code:y,extraContext:{}};return{code:y+C,extraContext:{[N7]:x}}}async function b4(y){let{html:x,css:h,js:C,context:l,transform:i,compiledJs:k,exampleElement:g,styleElement:w,widgetsElement:B,onError:q,onScope:j}=y,_=J7({class:"preview"});_.innerHTML=x,w.innerText=h;let K=g.querySelector(".preview");if(K)K.replaceWith(_);else g.insertBefore(_,B);try{let U=k??(await i(Y1(C,Object.keys(l)),{transforms:["typescript"]})).code,{code:Q,extraContext:Y}=await Z7(U,j),$={preview:_,...l,...Y},Z=Object.keys($).map(C2),p=Object.values($);await new U2(...Z,Q)(...p)}catch(U){if(console.error(U),_.append(J7({class:"preview-error"},String(U.message||U))),q)q(U);else window.alert(`Error: ${U}, the console may have more information…`)}return _}async function S4(y){let{html:x,css:h,js:C,context:l,transform:i,compiledJs:k,exampleElement:g,widgetsElement:w,onError:B,onScope:q}=y,j=g.querySelector("iframe.preview-iframe");if(!j){j=document.createElement("iframe"),j.className="preview-iframe",j.style.cssText="width: 100%; height: 100%; border: none;";let Q=g.querySelector(".preview");if(Q)Q.replaceWith(j);else g.insertBefore(j,w)}let _=j.contentDocument;if(!_)return console.error("Could not access iframe document"),null;let K=j.contentWindow;if(l.tosijs)K.tosijs=l.tosijs;if(l["tosijs-ui"])K.tosijsui=l["tosijs-ui"];_.open(),_.write(`<!DOCTYPE html>
|
|
84
|
+
`}},extensions:[{name:"wikilink",level:"inline",start(y){return y.match(/\[\[/)?.index},tokenizer(y){let x=/^\[\[([^\]|]+?)(?:\|([^\]]+?))?\]\]/.exec(y);if(!x)return;return{type:"wikilink",raw:x[0],target:x[1].trim(),label:(x[2]??x[1]).trim()}},renderer(y){return`<a href="/${f3(y.target)}/" class="wikilink">${Hk(y.label)}</a>`}},{name:"footnoteDef",level:"block",start(y){return y.match(/^\[\^[^\]]+\]:/m)?.index},tokenizer(y){let x=/^\[\^([^\]]+)\]:[ \t]*([^\n]*)(?:\n|$)/.exec(y);if(!x)return;return s3.set(x[1].trim(),x[2].trim()),{type:"footnoteDef",raw:x[0]}},renderer(){return""}},{name:"footnoteRef",level:"inline",start(y){return y.match(/\[\^/)?.index},tokenizer(y){let x=/^\[\^([^\]]+)\]/.exec(y);if(!x)return;let h=x[1].trim();if(!p2.includes(h))p2.push(h);return{type:"footnoteRef",raw:x[0],id:h}},renderer(y){let x=p2.indexOf(y.id)+1,h=f3(y.id);return`<sup class="footnote-ref"><a href="#fn-${h}" id="fnref-${h}">${x}</a></sup>`}}]});function i0(y,x={}){u3=x.bakes;try{return r3.parse(y)}finally{u3=void 0}}function $7(y,x){let h=y.headTitle?.trim();if(h)return h;let C=x?.trim()??"";if(!C)return y.title;let k=y.title.toLowerCase(),B=C.toLowerCase();if(k.includes(B)||B.includes(k))return y.title;return`${y.title} — ${C}`}var{div:P2,slot:O7,span:Mk,button:Sk}=U;class M4 extends ${static preferredTagName="tosi-tabs";static initAttributes={localized:!1};value=0;makeTab(y,x,h){let C=x.getAttribute("name"),k=x.querySelector('template[role="tab"]')?.content.cloneNode(!0)||(this.localized?i1(C):Mk(C)),B=P2(k,{part:"tab",tabindex:0,role:"tab",ariaControls:h},x.hasAttribute("data-close")?Sk({title:"close",class:"close"},Q.x()):{}),w=x.dataset.tooltip;if(w)B.dataset.tooltip=w;return B}static shadowStyleSpec={":host":{"--tosi-tabs-selected-color":"var(--xin-tabs-selected-color, var(--tosi-accent, currentColor))","--tosi-tabs-bar-color":"var(--xin-tabs-bar-color, #ccc)","--tosi-tabs-bar-height":"var(--xin-tabs-bar-height, 2px)",display:"flex",flexDirection:"column",position:"relative",overflow:"hidden",boxShadow:"none !important"},slot:{position:"relative",display:"block",flex:"1",overflow:"hidden",overflowY:"auto"},'slot[name="after-tabs"]':{flex:"0 0 auto"},"::slotted([hidden])":{display:"none !important"},":host::part(tabpanel)":{display:"flex",flexDirection:"column",overflowX:"auto"},":host::part(tabrow)":{display:"flex"},":host .tabs":{display:"flex",userSelect:"none",whiteSpace:"nowrap"},":host .tabs > div":{padding:`${l.spacing50} ${l.spacing}`,cursor:"default",display:"flex",alignItems:"baseline"},":host .tabs > [aria-selected]":{"--text-color":l.tosiTabsSelectedColor,color:l.textColor},":host .elastic":{flex:"1"},":host .border":{background:l.tosiTabsBarColor},":host .border > .selected":{content:" ",width:0,height:l.tosiTabsBarHeight,background:l.tosiTabsSelectedColor,transition:"ease-out 0.2s"},":host button.close":{border:0,background:"transparent",textAlign:"center",marginLeft:l.spacing50,padding:0},":host button.close > svg":{height:"12px"}};handleCloseTab=null;get onCloseTab(){return this.handleCloseTab}set onCloseTab(y){this.handleCloseTab=y}content=[P2({role:"tabpanel",part:"tabpanel"},P2({part:"tabrow"},P2({class:"tabs",part:"tabs"}),P2({class:"elastic"}),O7({name:"after-tabs"})),P2({class:"border"},P2({class:"selected",part:"selected"}))),O7()];addTabBody(y,x=!1){if(!y.hasAttribute("name"))throw console.error("element has no name attribute",y),Error("element has no name attribute");if(this.append(y),this.setupTabs(),x)this.value=this.bodies.length-1;this.queueRender()}removeTabBody(y){y.remove(),this.setupTabs(),this.queueRender()}keyTab=(y)=>{let{tabs:x}=this.parts,h=[...x.children].indexOf(y.target);switch(y.key){case"ArrowLeft":this.value=(h+Number(x.children.length)-1)%x.children.length,x.children[this.value].focus(),y.preventDefault();break;case"ArrowRight":this.value=(h+1)%x.children.length,x.children[this.value].focus(),y.preventDefault();break;case" ":this.pickTab(y),y.preventDefault();break;default:}};get bodies(){return[...this.children].filter((y)=>y.hasAttribute("name"))}pickTab=(y)=>{let{tabs:x}=this.parts,h=y.target,C=h.closest("button.close")!==null,k=h.closest(".tabs > div"),B=[...x.children].indexOf(k);if(C){let w=this.bodies[B];if(!this.handleCloseTab||this.handleCloseTab(w)!==!1)this.removeTabBody(this.bodies[B])}else if(B>-1)this.value=B};setupTabs=()=>{let{tabs:y}=this.parts,x=[...this.children].filter((h)=>!h.hasAttribute("slot")&&h.hasAttribute("name"));if(y.textContent="",this.value>=x.length)this.value=x.length-1;for(let h in x){let C=x[h],k=`${this.instanceId}-${h}`;C.id=k;let B=this.makeTab(this,C,k);y.append(B)}};connectedCallback(){super.connectedCallback();let{tabs:y}=this.parts;y.addEventListener("click",this.pickTab),y.addEventListener("keydown",this.keyTab),this.setupTabs(),b1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),b1.allInstances.delete(this)}localeChanged=()=>{this.queueRender()};handleResize(){this.queueRender()}render(){let{tabs:y,selected:x}=this.parts,h=this.bodies;for(let C=0;C<h.length;C++){let k=h[C],B=y.children[C],w=this.value===Number(C);if(B.toggleAttribute("aria-selected",w),k.toggleAttribute("hidden",!w),w)x.style.marginLeft=`${B.offsetLeft-y.offsetLeft}px`,x.style.width=`${B.offsetWidth}px`}}}var Ik=M4,F0=M4.elementCreator(),bk=F0,Tk=F0;var{button:pk,div:Lk,slot:ck}=U;class m3 extends ${static preferredTagName="tosi-pocket-bar";static initAttributes={icon:"",direction:"auto",open:!1};pinned=!1;get vertical(){return/^[ns]/.test(this.direction)}get resolvedIcon(){return this.icon||(this.vertical?"moreVertical":"moreHorizontal")}get floatPosition(){return this.direction==="auto"?"side":this.direction}reposition=()=>{if(!this.hydrated)return;A4(this.parts.bar,this.parts.handle,this.floatPosition,"remain","remain")};setOpen(y){if(this.open!==y)this.open=y;if(y)this.reposition()}handlePointerEnter=()=>this.setOpen(!0);handlePointerLeave=()=>{if(!this.pinned)this.setOpen(!1)};handleFocusIn=()=>this.setOpen(!0);handleFocusOut=()=>{requestAnimationFrame(()=>{if(!this.pinned&&!this.matches(":focus-within"))this.setOpen(!1)})};toggle=(y)=>{y?.preventDefault(),this.pinned=!this.pinned,this.setOpen(this.pinned)};handleOutsidePointer=(y)=>{if(!this.pinned)return;let x=y.composedPath();if(!x.includes(this)&&!x.includes(this.parts.bar))this.pinned=!1,this.setOpen(!1)};handleScrollResize=()=>{if(this.open)this.reposition()};content=()=>[pk({part:"handle",class:"no-drag",title:"toolbar","aria-label":"toolbar","aria-expanded":"false",onClick:this.toggle},w3({part:"handleIcon",icon:this.resolvedIcon})),Lk({part:"bar",role:"toolbar",style:{flexDirection:this.vertical?"column":"row"}},ck())];static shadowStyleSpec={":host":{display:"inline-flex",position:"relative",opacity:_.tosiPocketOpacity("0.75"),transition:"opacity 0.15s ease-out"},":host([open])":{opacity:"1"},':host [part="handle"]':{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:l.spacing50,border:"0",margin:"0",cursor:"pointer",color:_.tosiPocketHandleColor("inherit"),background:_.tosiPocketBg("color-mix(in srgb, var(--tosi-bg, #fff) 85%, transparent)"),backdropFilter:"blur(12px)",borderRadius:l.spacing,transition:"background 0.15s ease-out"},':host [part="bar"]':{position:"fixed",display:"flex",gap:l.spacing25,padding:l.spacing25,background:_.tosiPocketBg("color-mix(in srgb, var(--tosi-bg, #fff) 82%, transparent)"),backdropFilter:"blur(12px)",borderRadius:l.spacing,boxShadow:`0 ${l.spacing25} ${l.spacing} #0003`,opacity:"0",pointerEvents:"none",transform:"scale(0.9)",transition:"opacity 0.15s ease-out, transform 0.15s ease-out"},':host([open]) [part="bar"]':{opacity:"1",pointerEvents:"auto",transform:"scale(1)"},"::slotted(button), ::slotted(label)":{display:"inline-flex",alignItems:"center",gap:l.spacing25,padding:l.spacing50,margin:"0",border:"0",background:"transparent",color:"inherit",font:"inherit",cursor:"pointer",borderRadius:l.spacing25,transition:"background 0.15s ease-out, opacity 0.15s, filter 0.15s"},"::slotted(button:hover), ::slotted(label:hover)":{background:"color-mix(in srgb, currentColor 15%, transparent)"},'::slotted(label:has(input[type="checkbox"]:not(:checked)))':{opacity:"0.45",filter:"grayscale(1)"}};connectedCallback(){super.connectedCallback(),this.addEventListener("pointerenter",this.handlePointerEnter),this.addEventListener("pointerleave",this.handlePointerLeave),this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),document.addEventListener("pointerdown",this.handleOutsidePointer,!0),window.addEventListener("scroll",this.handleScrollResize,{passive:!0,capture:!0}),window.addEventListener("resize",this.handleScrollResize,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.handleOutsidePointer,!0),window.removeEventListener("scroll",this.handleScrollResize,!0),window.removeEventListener("resize",this.handleScrollResize)}render(){super.render(),this.parts.handleIcon.icon=this.resolvedIcon,this.parts.bar.style.flexDirection=this.vertical?"column":"row",this.parts.handle.setAttribute("aria-expanded",String(!!this.open)),this.reposition()}}var n3=m3.elementCreator();var{div:E3,button:dk}=U,fk={error:"red",warn:"orange",info:"royalblue",log:"gray",success:"green",progress:"royalblue"};class C2 extends ${static preferredTagName="tosi-notification";static singleton;static shadowStyleSpec={":host":{_notificationSpacing:8,_notificationWidth:360,_notificationPadding:`${l.notificationSpacing} ${l.notificationSpacing50} ${l.notificationSpacing} ${l.notificationSpacing200}`,_notificationBg:"#fafafa",_notificationAccentColor:"#aaa",_notificationTextColor:"#444",_notificationIconSize:l.notificationSpacing300,_notificationButtonSize:48,_notificationBorderWidth:"3px 0 0",_notificationBorderRadius:l.notificationSpacing50,position:"fixed",left:0,right:0,bottom:0,paddingBottom:l.notificationSpacing,width:l.notificationWidth,display:"flex",flexDirection:"column-reverse",margin:"0 auto",gap:l.notificationSpacing,maxHeight:"50vh",overflow:"hidden auto",boxShadow:"none !important",color:l.notificationTextColor},":host .note":{display:"grid",background:l.notificationBg,padding:l.notificationPadding,gridTemplateColumns:`${l.notificationIconSize} 1fr ${l.notificationButtonSize}`,gap:l.notificationSpacing,alignItems:"center",borderRadius:l.notificationBorderRadius,boxShadow:`0 2px 8px #0006, inset 0 0 0 2px ${l.notificationAccentColor}`,borderColor:l.notificationAccentColor,borderWidth:l.notificationBorderWidth,borderStyle:"solid",transition:"0.5s ease-in",transitionProperty:"margin, opacity",zIndex:1},":host .note button":{display:"flex",lineHeight:l.notificationButtonSize,padding:0,margin:0,height:l.notificationButtonSize,width:l.notificationButtonSize,background:"transparent",alignItems:"center",justifyContent:"center",boxShadow:"none",border:"none",position:"relative"},":host .note button:hover svg":{stroke:l.notificationAccentColor},":host .note button:active svg":{borderRadius:99,stroke:l.notificationBg,background:l.notificationAccentColor,padding:l.spacing50},":host .note svg":{height:l.notificationIconSize,width:l.notificationIconSize,pointerEvents:"none",color:l.notificationAccentColor},":host .message":{display:"flex",flexDirection:"column",alignItems:"center",gap:l.notificationSpacing},":host .note.closing":{opacity:0,zIndex:0}};static removeNote(y){y.classList.add("closing"),y.style.marginBottom=-y.offsetHeight+"px";let x=()=>{y.remove()};y.addEventListener("transitionend",x),setTimeout(x,1000)}static post(y){let{message:x,duration:h,type:C,close:k,progress:B,icon:w,color:g}=Object.assign({type:"info",duration:-1},typeof y==="string"?{message:y}:y);if(!this.singleton)this.singleton=o3();let z=this.singleton;document.body.append(z),z.style.zIndex=String(_2()+1);let q=g||fk[C],j=B||C==="progress"?U.progress():{},V=()=>{if(k)k();C2.removeNote(G)},A=w instanceof SVGElement?w:w?Q[w]():Q.info(),P=C==="error"||C==="warn",G=E3({class:`note ${C}`,role:P?"alert":"status",ariaLive:P?"assertive":"polite",style:{_notificationAccentColor:q}},A,E3({class:"message"},E3(x),j),dk({class:"close",title:"close",ariaLabel:"Close notification",apply(i){i.addEventListener("click",V)}},Q.x()));if(z.shadowRoot.append(G),j instanceof HTMLProgressElement&&B instanceof Function){j.setAttribute("max",String(100)),j.value=B();let i=setInterval(()=>{if(!z.shadowRoot.contains(G)){clearInterval(i);return}let N=B();if(j.value=N,N>=100)C2.removeNote(G)},1000)}if(h>0)setTimeout(()=>{C2.removeNote(G)},h*1000);return G.scrollIntoView(),V}content=null}var sk=C2,o3=C2.elementCreator(),uk=o3;function a3(y){return C2.post(y)}var G2=(async()=>{}).constructor;class N7 extends Error{statement;constructor(y,x){super(y);this.statement=x;this.name="UnsupportedImportError"}}function k2(y){return y.replace(/[^a-zA-Z0-9_$]/g,"")}function Y7(y){return y.split(",").map((x)=>{let h=x.trim().match(/^(\w+)\s+as\s+(\w+)$/);return h?`${h[1]}: ${h[2]}`:x.trim()}).filter(Boolean).join(", ")}function rk(y,x){let h=(C)=>/^(\.|\/|https?:)/.test(C)?C:x+C;return y.replace(/import\s+([^;'"]+?)\s+from\s+(['"])([^'"]+)\2[ \t]*;?/g,(C,k,B,w)=>{let g=`await import(${B}${h(w)}${B})`,z=k.trim(),q;if(q=z.match(/^\{([^}]*)\}$/))return`const { ${Y7(q[1])} } = ${g}`;if(q=z.match(/^\*\s+as\s+(\w+)$/))return`const ${q[1]} = ${g}`;if(q=z.match(/^(\w+)$/))return`const ${q[1]} = (${g}).default`;if(q=z.match(/^(\w+)\s*,\s*\{([^}]*)\}$/))return`const { default: ${q[1]}, ${Y7(q[2])} } = ${g}`;return C}).replace(/import\s+(['"])([^'"]+)\1[ \t]*;?/g,(C,k,B)=>`await import(${k}${h(B)}${k})`)}function mk(){return globalThis.__TOSI_IMPORT_RESOLVER?.prefix}function W1(y,x,h=mk()){let C=y;for(let B of x){let w=k2(B),g=B.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");C=C.replace(new RegExp(`import\\s*\\{([^}]*)\\}\\s*from\\s*'${g}'`,"g"),(z,q)=>`const { ${q.replace(/\s+/g," ").trim()} } = ${w}`),C=C.replace(new RegExp(`import\\s*\\*\\s*as\\s+(\\w+)\\s+from\\s*'${g}'`,"g"),(z,q)=>`const ${q} = ${w}`),C=C.replace(new RegExp(`import\\s+(\\w+)\\s+from\\s*'${g}'`,"g"),(z,q)=>`const ${q} = ${w}`)}if(h)C=rk(C,h);let k=C.match(/^\s*import\s+['"{*\w][^\n]*/m);if(k){let B=k[0].trim();throw new N7(`live example: unsupported import \`${B}\` — imports `+`from the example context (${x.join(", ")}) are supported in { named }, * as ns, or default form`+(h?", and other packages resolve via the import-resolver.":" (enable importResolver to import other packages)."),B)}return C}async function W7(y,x,h){let C=W1(y,Object.keys(x)),k=(await h(C,{transforms:["typescript"]})).code,B=Object.keys(x).map(k2),w=Object.values(x);await new G2(...B,k)(...w)}var t3="0.12.0";function y9(y){let x=globalThis.__TJS_LOCAL_BASE;return[...typeof x==="string"?[`${x}${y}`]:[],`https://cdn.jsdelivr.net/npm/tjs-lang@${t3}/dist/${y}`,`https://unpkg.com/tjs-lang@${t3}/dist/${y}`,`https://esm.sh/tjs-lang@${t3}/dist/${y}`]}async function x9(y){for(let x of y)try{let h=await import(x);if(h)return h}catch{}return null}async function nk(){try{let{tjs:x}=await import("tjs-lang/browser");if(typeof x==="function")return x}catch{}let y=await x9(y9("tjs-browser.js"));if(y&&typeof y.tjs==="function")return y.tjs;return null}var Ek;async function ok(){let y=[()=>import("tjs-lang/browser"),()=>x9(y9("tjs-browser.js"))];for(let x of y)try{let h=await x();if(h&&typeof h.extractTests==="function"&&typeof h.testUtils==="string")return{extractTests:h.extractTests,testUtils:h.testUtils}}catch{}return null}function J7(){return Ek??=ok()}async function ak(){try{let{fromTS:x}=await import("tjs-lang/browser/from-ts");if(typeof x==="function")return x}catch{}let y=await x9(y9("tjs-browser-from-ts.js"));if(y&&typeof y.fromTS==="function")return y.fromTS;return null}var tk,ek,yB=256,N0=new Map,e3=(y,x)=>{if(N0.size>=yB){let h=N0.keys().next().value;if(h!==void 0)N0.delete(h)}N0.set(y,x)},i7=!1,F7=!1;async function W0(y="js"){if(y==="js")return(C)=>({code:C});let x=await(tk??=nk());if(!x&&!i7)i7=!0,console.warn("tjs-lang not available — live examples run as raw JavaScript "+"(tjs/TypeScript examples will not transpile). Install with: npm install tjs-lang");let h=y==="ts"?await(ek??=ak()):null;if(y==="ts"&&!h&&!F7)F7=!0,console.warn("tjs-lang/browser/from-ts not available — `ts` examples run as raw JavaScript.");return(C)=>{let k=`${y}\x00${C}`,B=N0.get(k);if(B)return B;if(!x){let g={code:C};return e3(k,g),g}if(y==="ts")return(async()=>{let g=h?(await h(C,{emitTJS:!0})).code:C,z={code:x(g,{dialect:"tjs",runTests:!1}).code};return e3(k,z),z})();let w={code:x(C,{dialect:y,runTests:!1}).code};return e3(k,w),w}}var S4="live-example-payload";function Z7(y,x,h){return h!==""?`${y}-${h}`:`${y}-${x}`}function h9(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("live-example: failed to write to localStorage",h)}}function xB(y){if(y===null)return null;try{return JSON.parse(y)}catch{return null}}function R7(y,x,h,C,k,B){let w=new URLSearchParams({[y]:x});if(B?.sourceFile&&B.ordinal!=null)w.set("sf",B.sourceFile),w.set("ord",B.ordinal);let g=location.href.split("?")[0]+"?"+w.toString();h9(h,{remoteKey:C,sentAt:Date.now(),...k,original:B?.original}),window.open(g)}var hB=typeof BroadcastChannel<"u";class J0{storageKey;remoteKey;lastUpdate=0;interval;channel;listening=!1;onReceive;constructor(y,x,h){this.storageKey=y,this.remoteKey=x,this.onReceive=h}handlePayload=(y)=>{if(y.sentAt<=this.lastUpdate)return;if(y.remoteKey!==this.remoteKey)return;this.lastUpdate=y.sentAt,this.onReceive(y)};handleMessage=(y)=>{let x=y.data;if(x)this.handlePayload(x)};handlePoll=()=>{let y;try{y=localStorage.getItem(this.storageKey)}catch{return}let x=xB(y);if(x)this.handlePayload(x)};startListening(){if(this.listening)return;if(this.listening=!0,hB)this.channel=new BroadcastChannel(this.storageKey),this.channel.onmessage=this.handleMessage;this.interval=setInterval(this.handlePoll,500)}stopListening(){if(!this.listening)return;if(this.listening=!1,this.channel)this.channel.close(),this.channel=void 0;if(this.interval)clearInterval(this.interval),this.interval=void 0}send(y){let x={remoteKey:this.remoteKey,sentAt:Date.now(),...y};if(h9(this.storageKey,x),this.channel)this.channel.postMessage(x)}sendClose(){let y={remoteKey:this.remoteKey,sentAt:Date.now(),css:"",html:"",js:"",close:!0};if(h9(this.storageKey,y),this.channel)this.channel.postMessage(y)}}var D7="__tosiCaptureScope",{div:H7}=U;function CB(y,x){let h=y.customElements;if(!h)return;let C=(B)=>{if(!B||h.get(B))return;let w=customElements.get(B);if(w)try{h.define(B,w)}catch{}};for(let B of Object.values(x))if(B&&typeof B==="object"){for(let w of Object.values(B))if(typeof w==="function"&&"tagName"in w)C(w.tagName)}let k=y.document;if(k){let B=k.querySelectorAll("*");for(let w of B){let g=w.tagName.toLowerCase();if(g.includes("-"))C(g)}}}async function v7(y,x){if(!x)return{code:y,extraContext:{}};let h;try{({scopeCaptureEpilogue:h}=await import("./index-0ps8jzdn.js"))}catch{return{code:y,extraContext:{}}}let C=h(y,D7);if(!C)return{code:y,extraContext:{}};return{code:y+C,extraContext:{[D7]:x}}}async function I4(y){let{html:x,css:h,js:C,context:k,transform:B,compiledJs:w,exampleElement:g,styleElement:z,widgetsElement:q,onError:j,onScope:V}=y,A=H7({class:"preview"});A.innerHTML=x,z.innerText=h;let P=g.querySelector(".preview");if(P)P.replaceWith(A);else g.insertBefore(A,q);try{let G=w??(await B(W1(C,Object.keys(k)),{transforms:["typescript"]})).code,{code:i,extraContext:N}=await v7(G,V),F={preview:A,...k,...N},Z=Object.keys(F).map(k2),R=Object.values(F);await new G2(...Z,i)(...R)}catch(G){if(console.error(G),A.append(H7({class:"preview-error"},String(G.message||G))),j)j(G);else window.alert(`Error: ${G}, the console may have more information…`)}return A}async function b4(y){let{html:x,css:h,js:C,context:k,transform:B,compiledJs:w,exampleElement:g,widgetsElement:z,onError:q,onScope:j}=y,V=g.querySelector("iframe.preview-iframe");if(!V){V=document.createElement("iframe"),V.className="preview-iframe",V.style.cssText="width: 100%; height: 100%; border: none;";let i=g.querySelector(".preview");if(i)i.replaceWith(V);else g.insertBefore(V,z)}let A=V.contentDocument;if(!A)return console.error("Could not access iframe document"),null;let P=V.contentWindow;if(k.tosijs)P.tosijs=k.tosijs;if(k["tosijs-ui"])P.tosijsui=k["tosijs-ui"];A.open(),A.write(`<!DOCTYPE html>
|
|
85
85
|
<html>
|
|
86
86
|
<head>
|
|
87
87
|
<style>
|
|
@@ -93,24 +93,24 @@ ${x}
|
|
|
93
93
|
<body>
|
|
94
94
|
<div class="preview">${x}</div>
|
|
95
95
|
</body>
|
|
96
|
-
</html>`),
|
|
97
|
-
`)+1;h.push({lang:C[2]||"",indent:C[1],start:C.index,end:C.index+C[0].length,codeStart:
|
|
96
|
+
</html>`),A.close(),CB(P,k);let G=A.querySelector(".preview");if(!G)return console.error("Could not find preview element in iframe"),null;try{let i=w??(await B(W1(C,Object.keys(k)),{transforms:["typescript"]})).code,{code:N,extraContext:F}=await v7(i,j),Z={preview:G,...k,...F},R=P.eval("(async () => {}).constructor"),c=Object.keys(Z).map(k2),C1=Object.values(Z);await new R(...c,N)(...C1)}catch(i){console.error(i);let N=A.createElement("div");if(N.className="preview-error",N.textContent=String(i.message||i),G.append(N),q)q(i);else window.alert(`Error: ${i}, the console may have more information…`)}return G}function kB(y){let x=y?.nextElementSibling??null;while(x?.tagName==="SCRIPT"&&x.getAttribute("type")==="application/tosi-transpiled")x=x.nextElementSibling;return x}function BB(y){let x=y.nextElementSibling;if(x?.tagName!=="SCRIPT"||x.getAttribute("type")!=="application/tosi-transpiled")return;try{let h=JSON.parse(x.textContent||"");return typeof h==="string"?h:void 0}catch{return}}function T4(y,x,h,C,k){let B=[...y.querySelectorAll(".language-html,.language-js,.language-tjs,.language-ts,.language-css,.language-test")].filter((g)=>!g.closest(C)).map((g)=>({block:g.parentElement,language:g.classList[0].split("-").pop(),code:g.innerText,compiled:BB(g.parentElement),mode:g.parentElement.getAttribute("data-example-mode")||void 0})),w=0;for(let g=0;g<B.length;g+=1){let z=[B[g]];while(g<B.length-1&&kB(B[g].block)===B[g+1].block)z.push(B[g+1]),g+=1;let q=h({context:x});if(k!==void 0)q.setAttribute("data-source-file",k),q.setAttribute("data-example-ordinal",String(w));let j=z.map((P)=>P.mode).filter((P)=>!!P);if(j.length){let P=[...new Set(j)];if(P.length>1)console.error(`live example ${w+1}${k?` (${k})`:""}: contradictory modes [${P.join(", ")}] — using the first, "${j[0]}".`);q.setAttribute("mode",j[0])}let V=z.map((P)=>P.block.getAttribute("data-example-id")).find((P)=>!!P);q.id=V||`example-${w+1}`,w+=1,z[0].block.parentElement.insertBefore(q,z[0].block),z.forEach((P)=>{switch(P.language){case"js":case"tjs":case"ts":if(q.js=P.code,q.dialect=P.language,P.compiled!==void 0)q.compiledJs=P.compiled,q.compiledJsSource=P.code;break;case"html":q.html=P.code;break;case"css":q.css=P.code;break;case"test":q.test=P.code;break}P.block.remove()}),q.showDefaultTab(),q.snapshotAndRestoreLocalEdit()}}var wB=new Set(["js","tjs","ts"]),M7=new Set(["js","tjs","ts","html","css","test"]);function C9(y){let x=/^([ \t]*)```([\w-]*)[^\n]*\n([\s\S]*?)\n[ \t]*```/gm,h=[],C;while((C=x.exec(y))!==null){let k=C.index+C[0].indexOf(`
|
|
97
|
+
`)+1;h.push({lang:C[2]||"",indent:C[1],start:C.index,end:C.index+C[0].length,codeStart:k,codeEnd:k+C[3].length})}return h}function gB(y,x){if(!x)return y;return y.split(`
|
|
98
98
|
`).map((h)=>h?x+h:h).join(`
|
|
99
|
-
`)}function
|
|
99
|
+
`)}function zB(y,x){if(!x)return y;return y.split(`
|
|
100
100
|
`).map((h)=>h.startsWith(x)?h.slice(x.length):h).join(`
|
|
101
|
-
`)}function
|
|
102
|
-
`)){let h=x.trim();if(!h)continue;if(/^\w*Error[:\s]/.test(h))continue;let C=h.match(/[(@\s]([^()\s]+):(\d+):(\d+)\)?$/);if(!C)continue;let[,
|
|
103
|
-
`)[y-1]?.trim()||null}function
|
|
104
|
-
//# sourceURL=inline-test`;
|
|
101
|
+
`)}function k9(y,x){let h=[],C=null;for(let k=0;k<x.length;k+=1){let B=x[k];if(!M7.has(B.lang)){C=null;continue}let w=x[k-1];if(C!==null&&w!==void 0&&M7.has(w.lang)&&y.slice(w.end,B.start).trim()===""&&C)C.push(B);else C=[B],h.push(C)}return h}function S7(y,x,h){let C=k9(y,C9(y))[x];if(!C)return null;let k=(z)=>z.replace(/\s+$/,""),B=[],w=(z)=>z==="js"?C.find((q)=>wB.has(q.lang)):C.find((q)=>q.lang===z);for(let z of["js","html","css","test"]){let q=h[z];if(q===void 0)continue;let j=w(z);if(!j)continue;let V=y.slice(j.codeStart,j.codeEnd);if(k(zB(V,j.indent))===k(q))continue;B.push({start:j.codeStart,end:j.codeEnd,text:gB(q,j.indent)})}if(B.length===0)return null;B.sort((z,q)=>q.start-z.start);let g=y;for(let z of B)g=g.slice(0,z.start)+z.text+g.slice(z.end);return g}function I7(y,x){return`tosi-example-edit:${y}#${x}`}function b7(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("example-store: save failed",h)}}function T7(y){try{let x=localStorage.getItem(y);return x?JSON.parse(x):null}catch{return null}}function p7(y){try{localStorage.removeItem(y)}catch{}}function L7(y){try{return localStorage.getItem(y)!==null}catch{return!1}}var c7={":host":{"--tosi-example-height":"320px","--code-editors-bar-bg":"#777","--code-editors-bar-color":"#fff","--widget-bg":"#fff8","--widget-color":"#000",position:"relative",display:"flex",height:"var(--tosi-example-height)",background:"var(--background)",boxSizing:"border-box",borderRadius:l.spacing25,boxShadow:"inset 0 0 0 2px #8883",overflow:"hidden"},':host.-locally-edited > [part="example"] > [part="exampleWidgets"]':{outline:"2px solid var(--brand-color, #da1167)",outlineOffset:"1px",borderRadius:"4px"},":host.-maximize":{position:"fixed",left:"0",top:"0",height:"100vh",width:"100vw",margin:"0 !important"},".-maximize":{zIndex:101},":host.-vertical":{flexDirection:"column"},":host .layout-indicator":{transition:"0.5s ease-out",transform:"rotateZ(270deg)"},":host.-vertical .layout-indicator":{transform:"rotateZ(180deg)"},':host.-maximize > [part="example"] > [part="exampleWidgets"] .hide-if-maximized, :host:not(.-maximize) > [part="example"] > [part="exampleWidgets"] .show-if-maximized':{display:"none"},':host [part="example"]':{flex:"1 1 50%",height:"100%",position:"relative",overflowX:"auto"},":host .preview":{height:"100%",position:"relative",overflow:"hidden",boxSizing:"border-box",padding:l.spacing},":host .preview > :first-child":{marginTop:"0"},":host .preview-error":{padding:"8px 12px",margin:"8px",background:"#fee",color:"#900",borderRadius:"4px",fontSize:"13px",fontFamily:"system-ui, sans-serif",whiteSpace:"pre-wrap"},':host [part="editors"]':{flex:"1 1 200px",height:"100%",position:"relative"},':host [part="exampleWidgets"]':{position:"absolute",top:"5px",right:"5px",zIndex:"100",color:"var(--text-color)","--widget-color":"var(--brand-color)","--tosi-pocket-handle-color":"var(--widget-color)"},':host [part="exampleWidgets"] button':{"--text-color":"inherit"},':host [part="exampleWidgets"] .tests-toggle input':{display:"none"},':host [part="exampleWidgets"] .tests-toggle':{opacity:"calc(0.4 + 0.6 * var(--tests-enabled, 0))",filter:"grayscale(calc(1 - var(--tests-enabled, 0)))",transition:"opacity 0.2s, filter 0.2s"},":host .code-editors":{overflow:"hidden",background:"var(--code-bg, #fdfdfd)",position:"relative",top:"0",right:"0",flex:"1 1 50%",height:"100%",flexDirection:"column",zIndex:"10"},":host .code-editors:not([hidden])":{display:"flex"},":host .code-editors > h4":{padding:"5px",margin:"0",textAlign:"center",background:"var(--code-editors-bar-bg)",color:"var(--code-editors-bar-color)",cursor:"move"},":host button.transparent, :host .sizer":{width:"32px",height:"32px",lineHeight:"32px",textAlign:"center",padding:"0",margin:"0"},":host .sizer":{cursor:"nwse-resize"},"@keyframes test-pulse":{"0%, 100%":{opacity:"1"},"50%":{opacity:"0.4"}},':host.-test-running > [part="example"] > [part="exampleWidgets"]':{"--widget-color":"#fa0",animation:"test-pulse 0.75s ease-in-out infinite"},':host.-test-passed > [part="example"] > [part="exampleWidgets"]':{"--widget-color":"#0a0"},':host.-test-failed > [part="example"] > [part="exampleWidgets"]':{"--widget-color":"#f00"},':host [part="testResults"]':{position:"absolute",bottom:"54px",left:"5px",background:"var(--widget-bg)",borderRadius:"5px",padding:"8px",fontSize:"14px",margin:"0",maxWidth:"400px",maxHeight:"200px",overflow:"auto",zIndex:"100"},':host [part="testResults"][hidden]':{display:"none"},":host .test-pass":{color:"#0a0"},":host .test-fail":{color:"#f00"},":host .tjs-test-results":{padding:"8px 12px",fontSize:"14px",fontFamily:"var(--mono-font, monospace)",overflow:"auto",lineHeight:"1.6"},":host .tjs-test-summary":{fontWeight:"bold",marginBottom:"6px"},":host .tjs-test-empty":{opacity:"0.6"},":host .tjs-test-error":{opacity:"0.7"}};class B9 extends Error{constructor(y){super(y);this.name="AssertionError"}}var qB=/\/(index|module|iife|module\.debug|module\.safe)\.js$/;function lB(y){if(!y)return null;for(let x of y.split(`
|
|
102
|
+
`)){let h=x.trim();if(!h)continue;if(/^\w*Error[:\s]/.test(h))continue;let C=h.match(/[(@\s]([^()\s]+):(\d+):(\d+)\)?$/);if(!C)continue;let[,k,B,w]=C;if(qB.test(k))continue;return{url:k,line:Number(B),col:Number(w)}}return null}var p4=null;function jB(y){if(!p4||y<1)return null;return p4.split(`
|
|
103
|
+
`)[y-1]?.trim()||null}function d7(y,x){if(y===x)return!0;if(typeof y!==typeof x)return!1;if(y===null||x===null)return y===x;if(typeof y!=="object")return!1;let h=y,C=x;if(Array.isArray(h)!==Array.isArray(C))return!1;let k=Object.keys(h),B=Object.keys(C);if(k.length!==B.length)return!1;return k.every((w)=>d7(h[w],C[w]))}var VB=5000,XB={stringify(y){if(typeof y>"u")return"undefined";if(y===null)return"null";if(typeof Element<"u"&&y instanceof Element)return`<${y.tagName.toLowerCase()}>`;if(typeof Node<"u"&&y instanceof Node)return`[${y.nodeName}]`;try{return JSON.stringify(y)}catch{return String(y)}}},{stringify:p1}=XB;function f7(y,x=!1){let h=(k,B)=>{if(!(x?!k:k)){let g=new B9(x?`not: ${B}`:B),z=lB(g.stack);if(z){let q=jB(z.line),j=`line ${z.line}`;g.message=q?`${g.message} | ${q} (${j})`:`${g.message} (${j})`}throw g}};return{toBe(k){h(y===k,`Expected ${p1(y)} to be ${p1(k)}`)},toEqual(k){h(d7(y,k),`Expected ${p1(y)} to equal ${p1(k)}`)},toBeTruthy(){h(!!y,`Expected ${p1(y)} to be truthy`)},toBeFalsy(){h(!y,`Expected ${p1(y)} to be falsy`)},toBeNull(){h(y===null,`Expected ${p1(y)} to be null`)},toBeUndefined(){h(y===void 0,`Expected ${p1(y)} to be undefined`)},toBeDefined(){h(y!==void 0,`Expected ${p1(y)} to be defined`)},toContain(k){if(typeof y==="string")h(y.includes(k),`Expected "${y}" to contain "${k}"`);else if(Array.isArray(y))h(y.includes(k),`Expected array to contain ${p1(k)}`);else throw new B9("toContain requires string or array")},toHaveLength(k){let B=y.length;h(B===k,`Expected length ${B} to be ${k}`)},toMatch(k){h(k.test(y),`Expected "${y}" to match ${k}`)},toBeGreaterThan(k){h(y>k,`Expected ${y} to be greater than ${k}`)},toBeLessThan(k){h(y<k,`Expected ${y} to be less than ${k}`)},toBeInstanceOf(k){h(y instanceof k,`Expected value to be instance of ${k.name}`)},get not(){return f7(y,!x)}}}function w9(y){return f7(y)}function _B(y){return new Promise((x)=>setTimeout(x,y))}function AB(y,x,h=1000){return new Promise((C,k)=>{let B=Date.now(),w=()=>{let g=y.querySelector(x);if(g){C(g);return}if(Date.now()-B>=h){k(Error(`Timeout waiting for "${x}" after ${h}ms`));return}requestAnimationFrame(w)};w()})}function KB(y,x,h){return Promise.race([y,new Promise((C,k)=>setTimeout(()=>k(Error(`Test "${h}" timed out after ${x}ms`)),x))])}function g9(y,x=VB){let h="",C=[];return{pending:C,expect:w9,test(k,B){let w=h?`${h} > ${k}`:k;try{let g=B();if(g instanceof Promise){let z=KB(g,x,w).then(()=>{y.push({name:w,passed:!0})}).catch((q)=>{y.push({name:w,passed:!1,error:q.message})});C.push(z)}else y.push({name:w,passed:!0})}catch(g){y.push({name:w,passed:!1,error:g.message})}},describe(k,B){let w=h;h=h?`${h} > ${k}`:k,B(),h=w}}}async function L4(y,x,h,C){let k=[],B=g9(k),w={preview:x,...h,expect:B.expect,test:B.test,describe:B.describe,waitMs:_B,waitFor:(g,z)=>AB(x,g,z)};try{let g=W1(y,Object.keys(h)),z=(await C(g,{transforms:["typescript"]})).code,q=Object.keys(w).map((P)=>P.replace(/-/g,"")),j=Object.values(w),V=`${z}
|
|
104
|
+
//# sourceURL=inline-test`;p4=z,await new G2(...q,V)(...j)}catch(g){k.push({name:"Test execution",passed:!1,error:g.message})}if(B.pending.length>0)await Promise.all(B.pending);return p4=null,{passed:k.filter((g)=>g.passed).length,failed:k.filter((g)=>!g.passed).length,tests:k}}var{div:L1,tosiSlot:PB,style:GB,button:U2,pre:s7,span:z9,label:UB,input:QB}=U,l9="tosijs-ui-tests-enabled",r7=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function $B(){if(typeof localStorage>"u")return!1;let y=localStorage.getItem(l9);if(y!==null)return y==="true";return r7}var{testManager:A1}=t({testManager:{enabled:$B()}});function c4(){document.body.classList.toggle("tests-enabled",A1.enabled.value),document.body.style.setProperty("--tests-enabled",A1.enabled.value?"1":"0")}if(typeof document<"u")if(document.body)c4();else document.addEventListener("DOMContentLoaded",c4);function j9(){localStorage.setItem(l9,"true"),A1.enabled.value=!0,c4(),document.querySelectorAll("tosi-example").forEach((y)=>{y.refresh()})}function V9(){localStorage.setItem(l9,"false"),A1.enabled.value=!1,c4()}class B2 extends ${static preferredTagName="tosi-example";static lightStyleSpec=c7;static initAttributes={persistToDom:!1,iframe:!1,mode:""};get effectiveMode(){let y=this.mode;if(y==="iframe"||y==="ide"||y==="inline")return y;if(y)console.warn(`<tosi-example>: unknown mode "${y}" — running inline`);return this.iframe===!0?"iframe":"inline"}prefix="lx";storageKey=S4;context={};capturedScope={};uuid=crypto.randomUUID();remoteId="";remoteSync;undoInterval;testResults;pendingValues={};pendingShowDefaultTab=!1;beforeUnloadHandler;editorsBuilt=!1;static insertExamples(y,x={},h){T4(y,x,d4,B2.tagName,h)}get activeTab(){if(!this.editorsBuilt)return;let{editors:y}=this.parts;return[...y.children].find((x)=>x.getAttribute("hidden")===null)}getEditorValue(y){if(!this.editorsBuilt)return this.pendingValues[y]??"";return this.parts[y].value}setEditorValue(y,x){if(!this.editorsBuilt){this.pendingValues[y]=x;return}let h=this.parts[y];h.value=x}flushPendingValues(){for(let[y,x]of Object.entries(this.pendingValues)){let h=this.parts[y];if(h)h.value=x}if(this.pendingValues={},this.pendingShowDefaultTab)this.pendingShowDefaultTab=!1,this.showDefaultTab()}get css(){return this.getEditorValue("css")}set css(y){this.setEditorValue("css",y)}get html(){return this.getEditorValue("html")}set html(y){this.setEditorValue("html",y)}get js(){return this.getEditorValue("js")}set js(y){this.setEditorValue("js",y)}get test(){return this.getEditorValue("test")}set test(y){this.setEditorValue("test",y)}get remoteKey(){return Z7(this.prefix,this.uuid,this.remoteId)}get dialect(){return this.getAttribute("data-dialect")||"js"}set dialect(y){this.setAttribute("data-dialect",y)}compiledJs;compiledJsSource;jsOutEditor;tjsTestsView;productTabsReady=!1;lastGeneratedJs="";inlineTjsTestCount=0;lastTjsTests;async runInlineTjsTests(y){if(this.dialect==="js"){this.inlineTjsTestCount=0;return}let x=await J7();if(!x){this.inlineTjsTestCount=0;return}let h;try{h=x.extractTests(this.js)}catch{this.inlineTjsTestCount=0;return}if(this.inlineTjsTestCount=h.tests.length,h.tests.length===0){this.lastTjsTests=void 0,this.renderTjsTests();return}try{let k=`${(await y(W1(h.code,Object.keys(this.context)))).code}
|
|
105
105
|
${x.testUtils}
|
|
106
|
-
return ${h.testRunner}`,
|
|
107
|
-
// ${x.message}`}}ensureProductTabs(){if(this.productTabsReady||this.dialect==="js"||!this.hydrated||!this.editorsBuilt)return;this.productTabsReady=!0;let{editors:y}=this.parts;if(this.parts.js.setAttribute("name",this.dialect),this.parts.js.tjsAutocomplete={getLiveBindings:()=>this.liveBindings()},this.parts.js.mode=this.dialect,this.jsOutEditor=
|
|
108
|
-
`+h.trim()+"\n```\n":"";return y(this.dialect,this.js)+y("html",this.html)+y("css",this.css)+y("test",this.test)}copy=()=>{navigator.clipboard.writeText(this.exampleMarkdown())};downloadExample=()=>{let y=this.getAttribute("data-source-file")||"example",x=this.getAttribute("data-example-ordinal"),h=(y.split("/").pop()||"example").replace(/\.\w+$/,"")+(x!==null?`-example-${x}`:"")+".md",C=URL.createObjectURL(new Blob([this.exampleMarkdown()],{type:"text/markdown"})),
|
|
109
|
-
`);if(["js","html","css","test"].includes(h)){let
|
|
110
|
-
`);this.setEditorValue(h,i)}else{let l=["js","html","css","test"].find((i)=>x.matches(`.language-${i}`));if(l)this.setEditorValue(l,l==="html"?x.innerHTML:x.innerText)}}}showDefaultTab(){if(!this.hydrated||!this.editorsBuilt){this.pendingShowDefaultTab=!0;return}let{editors:y}=this.parts;if(this.js!=="")y.value=0;else if(this.html!=="")y.value=1;else if(this.css!=="")y.value=2;else if(this.test!=="")y.value=3}render(){if(super.render(),this.remoteId!==""){let y=localStorage.getItem(this.storageKey);if(y!==null){let x=JSON.parse(y);if(this.remoteKey!==x.remoteKey)return;if(this.css=x.css,this.html=x.html,this.js=x.js,x.test)this.test=x.test;this.ensureEditors(),this.parts.example.hidden=!0,this.parts.codeEditors.hidden=!1,this.classList.add("-maximize"),this.updateUndo()}}else this.refresh()}}var T4=l2.elementCreator(),i9=new URL(window.location.href).searchParams,T7=i9.get("lx");if(T7){document.title+=" [code editor]",document.body.textContent="";let y=T4({remoteId:T7}),x=i9.get("sf"),h=i9.get("ord");if(x&&h!==null)y.setAttribute("data-source-file",x),y.setAttribute("data-example-ordinal",h);document.body.append(y)}var{slot:L7}=G;class I2 extends F{static preferredTagName="tosi-sidenav";static initAttributes={minSize:800,navSize:200,compact:!1,contentVisible:!1};value="normal";content=[L7({name:"nav",part:"nav"}),L7({part:"content"})];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:`${P.navWidth("50%")} ${P.contentWidth("50%")}`,gridTemplateRows:"100%",position:"relative",margin:P.margin("0 0 0 -100%"),transition:P.sideNavTransition("0.25s ease-out")},":host slot":{position:"relative"},":host slot:not([name])":{display:"block"},':host slot[name="nav"]':{display:"block"}};handleResize=()=>{let{content:y}=this.parts,x=this.offsetParent;if(x===null)return;let h;if(this.compact=x.offsetWidth<this.minSize,[...this.childNodes].find((l)=>l instanceof Element?l.getAttribute("slot")!=="nav":!0)===void 0)h="compact/nav",this.style.setProperty("--nav-width","100%"),this.style.setProperty("--content-width","0%");else if(!this.compact)h="normal",y.classList.add("-tosi-sidenav-visible"),this.style.setProperty("--nav-width",`${this.navSize}px`),this.style.setProperty("--content-width",`calc(100% - ${this.navSize}px)`),this.style.setProperty("--margin","0");else if(y.classList.remove("-tosi-sidenav-visible"),this.style.setProperty("--nav-width","50%"),this.style.setProperty("--content-width","50%"),this.contentVisible)h="compact/content",this.style.setProperty("--margin","0 0 0 -100%");else h="compact/nav",this.style.setProperty("--margin","0 -100% 0 0");if(this.value!==h)this.value=h};observer;connectedCallback(){super.connectedCallback(),this.contentVisible=this.parts.content.childNodes.length===0,globalThis.addEventListener("resize",this.handleResize),this.observer=new MutationObserver(this.handleResize),this.observer.observe(this,{childList:!0}),this.style.setProperty("--side-nav-transition","0s"),setTimeout(()=>{this.style.removeProperty("--side-nav-transition")},250)}disconnectedCallback(){super.disconnectedCallback(),this.observer.disconnect()}render(){super.render(),this.handleResize()}}var qi=I2,Z0=I2.elementCreator(),ji=Z0,Vi=Z0;var{div:p0,span:v0,a:R0,header:Pi,button:B9,template:_i,input:Ai,h2:Ki,details:Ui,summary:Gi,ul:r7,li:o7}=G,c2={pass:P.testColorPass("#0a0"),fail:P.testColorFail("#c00"),running:P.testColorRunning("#fa0")},Fi={".view-source":{opacity:"0.9"},".view-source:hover":{opacity:"1"},"@keyframes test-pulse":{"0%, 100%":{opacity:"1"},"50%":{opacity:"0.7"}},"@keyframes test-appear":{from:{opacity:"0",transform:"scale(0.8)"},to:{opacity:"1",transform:"scale(1)"}},"@keyframes test-fade":{"0%, 20%":{opacity:"1",transform:"scale(1)"},"70%":{opacity:"1",transform:"scale(1.1)"},"100%":{opacity:"0",transform:"scale(0.9)",pointerEvents:"none"}},"body:not(.tests-enabled) .doc-link::after, body:not(.tests-enabled) .test-widget":{display:"none !important"},".doc-link.-test-passed::after, .doc-link.-test-failed::after":{content:"''",width:z.fontSize50,height:z.fontSize50,borderRadius:"50%",marginLeft:z.spacing50,display:"inline-block",verticalAlign:"middle"},".doc-link.-test-passed::after":{background:c2.pass},".doc-link.-test-failed::after":{background:c2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget":{_testBg:c2.running,position:"fixed",bottom:z.spacing,right:z.spacing,zIndex:"1000",background:z.testBg,color:"white",gap:z.spacing50},".test-widget[hidden]":{display:"none"},".test-widget.-running":{_testBg:c2.running,animation:"test-appear 0.3s ease-out, test-pulse 2s ease-in-out 0.3s infinite"},".test-widget.-passed":{_testBg:c2.pass,animation:"test-fade 3s ease-out forwards"},".test-widget.-failed":{_testBg:c2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget .count":{background:"white",color:z.testBg,borderRadius:"50%",width:z.lineHeight,height:z.lineHeight,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"},"@keyframes example-target-pulse":{from:{boxShadow:`0 0 0 3px ${P.accent("#007aff")}`},to:{boxShadow:"0 0 0 3px transparent"}},".example-target":{animation:"example-target-pulse 1.5s ease-out",borderRadius:z.roundedRadius}},Oi=0;function z9(y){let{docs:x,context:h={},projectName:C="",projectLinks:l={},navSize:i=200,minSize:k=600,routing:g="query",initialRoute:w,onRouteChange:B,navbarLinks:q,contentElement:j}=y,_=g==="memory";for(let V of x)V.testStatus=void 0;let K=g==="query"?{}:b2(x),U=(V)=>K[V]??V,Q=(V)=>{for(let A of x)if(U(A.filename)===V)return A.filename;return""},Y=(V)=>g==="query"?`?${V}`:J3(U(V)),$=()=>{if(_)return w?Q(w):"";return g==="path"?Z3(document.location.pathname,K):document.location.search!==""?document.location.search.substring(1).split("&")[0]:""},Z=(V)=>{let A=V.getAttribute("href")||"";if(A===""||A.startsWith("#"))return null;let W;try{W=new URL(A,document.location.href)}catch{return null}if(W.origin!==document.location.origin)return null;let H=(d)=>x.some((m)=>m.filename===d)?d:null,J=W.search.replace(/^\?/,"");if(J!==""&&!J.includes("=")&&!J.includes("&")){let d=H(decodeURIComponent(J));if(d)return d}if(!_&&g!=="query"){let d=H(Z3(W.pathname,K));if(d)return d}return null},p=$()||x[0]?.filename||"README.md",T=x.find((V)=>V.filename===p)||x[0],C1=`docBrowser${Oi++}`,N=t({[C1]:{docs:x,currentDoc:T,compact:!1}})[C1],I=()=>{},D={},v,A1=!1,u1=0,w5=0;if(!_)window.__docTestResults=new Promise((V)=>{v=V});let d9=(V)=>{let A=D[V],W=N.docs.find((H)=>H.filename===V);if(W)W.testStatus=A?A.passed?"passed":"failed":void 0;I()},Ry=()=>{if(w5>=u1&&v){let V={passed:0,failed:0,pages:D};for(let A of Object.values(D))V.passed+=A.totalPassed,V.failed+=A.totalFailed;if(v(V),v=void 0,L9&&!f2)fetch("/report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)}).catch(()=>{})}},L9=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1",Dy=(V)=>{let{results:A}=V.detail,W=String(N.currentDoc.filename);D[W]={passed:A.failed===0,tests:[...A.tests],totalPassed:A.passed,totalFailed:A.failed},d9(W)},B5=(V)=>{w5++,Ry(),V5()};r1.docLink={toDOM(V,A){V.setAttribute("href",Y(A)),V.dataset.filename=A}},r1.current={toDOM(V,A){V.classList.toggle("current",A===V.dataset.filename)}},r1.testStatus={toDOM(V,A){if(V.classList.remove("-test-passed","-test-failed"),A==="passed")V.classList.add("-test-passed");else if(A==="failed")V.classList.add("-test-failed")}};let Hy=l0(()=>{let V=z5.value.toLocaleLowerCase();N.docs.forEach((A)=>{A.hidden=!A.title.toLocaleLowerCase().includes(V)&&!A.text.toLocaleLowerCase().includes(V)}),O1(N.docs),I(!0)}),z5=Ai({slot:"nav",placeholder:"search",type:"search",style:{width:"calc(100% - 10px)",margin:"5px"},onInput:Hy});if(!_)window.addEventListener("popstate",()=>{if(s){if(L0()&&!window.confirm("Discard unsaved changes to the source?")){let V=Y(String(s.doc.filename));window.history.pushState({href:V},"",V);return}j5()}T0($())}),window.addEventListener("beforeunload",(V)=>{if(L0())V.preventDefault(),V.returnValue=""});let F2=null,o2=[B9({class:"iconic",style:{color:z.linkColor},title:"navigation",bind:{value:N.compact,binding:{toDOM(V,A){V.style.display=A?"":"none",V.nextSibling.style.display=A?"":"none"}}},onClick(){if(F2)F2.contentVisible=!F2.contentVisible}},O.menu()),v0({style:{flex:"0 0 10px"}})];if(C)o2.push(R0({href:"/",style:{display:"flex",alignItems:"center",borderBottom:"none"}},l.tosijs?O.tosiUi({style:{_xinIconSize:40,marginRight:10}}):v0(),Ki(C)));o2.push(v0({class:"elastic"}));let r9=(V)=>{let A=V.icon?O[V.icon]:void 0;return R0({class:A?"iconic":"",title:V.label,target:"_blank",href:V.href},A?A():V.label)};if(q)q.forEach((V)=>o2.push(r9(V)));else{let V=[[l.tosijs,"tosi","tosijs"],[l.discord,"discord","discord"],[l.blog,"blog","blog"],[l.github,"github","github"],[l.npm,"npm","npmjs"]];for(let[A,W,H]of V)if(A)o2.push(r9({href:A,label:H,icon:W}))}let k1=j||p0();k1.classList.add("doc-content"),Object.assign(k1.style,{display:"block",maxWidth:"var(--doc-content-max-width, 44em)",margin:"auto",padding:"0 1em",overflow:"hidden"});let o9=()=>{for(let V of k1.querySelectorAll("a")){let A=Z(V);if(A!==null)V.setAttribute("href",Y(A)),V.dataset.docLink=A}},by=()=>{if(_)return;let V=location.hash.replace(/^#/,"");if(!V)return;requestAnimationFrame(()=>{let A=null;try{A=k1.querySelector(`#${CSS.escape(V)}`)}catch{A=null}if(!A)return;A.scrollIntoView({block:"center",behavior:"smooth"}),A.classList.add("example-target"),setTimeout(()=>A&&A.classList.remove("example-target"),1600)})},n9=j!==void 0&&!_,f9=(V)=>{if(n9)n9=!1;else k1.innerHTML=Q0(V.text,{bakes:V.bakes?new Map(V.bakes):void 0});if(o9(),l2.insertExamples(k1,h,V.path||void 0),by(),g==="path")document.title=U7(V,C)},T0=(V)=>{let A=x.find((W)=>W.filename===V)||x[0];N.currentDoc=A,f9(A),I(!0)},d0=(V)=>{if(!sy())return;if(_)B?.(U(V));else{let A=Y(V);window.history.pushState({href:A},"",A)}T0(V)};k1.addEventListener("click",(V)=>{if(V.defaultPrevented||V.button!==0||V.metaKey||V.ctrlKey||V.shiftKey||V.altKey)return;let A=V.target.closest("a");if(!A||A.target==="_blank"||A.hasAttribute("download"))return;let W=Z(A);if(W===null)return;V.preventDefault(),d0(W)});let Sy=(V)=>V.endsWith(".md")?"markdown":V.endsWith(".css")?"css":V.endsWith(".ts")||V.endsWith(".tjs")?"typescript":"javascript",My=(V,A)=>{if(A.endsWith(".md"))return V;return(V.match(/\/\*#[\s\S]+?\*\//g)||[]).map((H)=>H.substring(3,H.length-2).trim()).join(`
|
|
106
|
+
return ${h.testRunner}`,B={preview:L1({class:"preview"}),...this.context},w=Object.keys(B).map(k2),g=Object.values(B),z=new G2(...w,k);this.lastTjsTests=await z(...g)}catch(C){this.lastTjsTests={passed:0,failed:1,results:[{description:"inline tests failed to run",passed:!1,error:String(C)}]}}this.renderTjsTests()}renderTjsTests(){let y=this.tjsTestsView;if(!y)return;let x=this.lastTjsTests;if(!x||x.results.length===0){y.replaceChildren(L1({class:"tjs-test-empty"},"No inline tjs tests."));return}y.replaceChildren(L1({class:"tjs-test-summary"},`${x.passed}/${x.results.length} passed`),...x.results.map((h)=>L1({class:h.passed?"test-pass":"test-fail"},`${h.passed?"✓":"✗"} ${h.description}`,h.error?z9({class:"tjs-test-error"},` — ${h.error}`):"")))}async computeGeneratedJs(y){if(this.dialect==="js")return"";try{return(await y(W1(this.js,Object.keys(this.context)))).code}catch(x){return`// transpile error:
|
|
107
|
+
// ${x.message}`}}ensureProductTabs(){if(this.productTabsReady||this.dialect==="js"||!this.hydrated||!this.editorsBuilt)return;this.productTabsReady=!0;let{editors:y}=this.parts;if(this.parts.js.setAttribute("name",this.dialect),this.parts.js.tjsAutocomplete={getLiveBindings:()=>this.liveBindings()},this.parts.js.mode=this.dialect,this.jsOutEditor=m1({name:"JS",mode:"javascript",disabled:!0}),y.append(this.jsOutEditor),this.inlineTjsTestCount>0)this.tjsTestsView=L1({name:"tjs tests",class:"tjs-test-results"}),y.append(this.tjsTestsView);y.setupTabs(),this.jsOutEditor.value=this.lastGeneratedJs,this.renderTjsTests()}captureScope=(y)=>{this.capturedScope=y};liveBindings(){let y={};for(let[h,C]of Object.entries(this.context))y[k2(h)]=C;let x=this.parts.example?.querySelector(".preview");if(x)y.preview=x;return Object.assign(y,this.capturedScope),y}updateUndo=()=>{if(this.editorsBuilt){let{activeTab:y}=this,{undo:x,redo:h}=this.parts;if(y instanceof r1)x.disabled=!y.canUndo(),h.disabled=!y.canRedo();else x.disabled=!0,h.disabled=!0}this.updateEditedIndicator(),this.updateTestResultsVisibility()};updateTestResultsVisibility(){let{testResults:y}=this.parts,x=this.testResults,h=this.editorsBuilt&&this.activeTab===this.parts.test,C=x&&x.failed>0;y.hidden=!x||x.tests.length===0||!h&&!C}undo=()=>{let{activeTab:y}=this;if(y instanceof r1)y.undo()};redo=()=>{let{activeTab:y}=this;if(y instanceof r1)y.redo()};get isMaximized(){return this.classList.contains("-maximize")}flipLayout=()=>{this.classList.toggle("-vertical")};saveToSource=async()=>{let y=this.getAttribute("data-source-file"),x=this.getAttribute("data-example-ordinal");if(!y||x===null){window.alert("No source mapping for this example.");return}let h;try{let k=await fetch(`/__docstore/source?file=${encodeURIComponent(y)}`);if(!k.ok)throw Error(String(k.status));h=await k.text()}catch{window.alert("Source endpoint unavailable — saving to source works in dev only.");return}let C=S7(h,Number(x),{js:this.js,html:this.html,css:this.css,test:this.test});if(C===null){let k=Number(x),B=k9(h,C9(h));if(k>=B.length)window.alert(`Couldn't locate this example in ${y}: it's example #${k+1} on the page, but a raw scan of the file finds only ${B.length} fenced example group(s). The page↔source ordinals `+"disagree — likely multiple docs in one file, or indented fences. "+"(File a report with the source structure.)");else window.alert("No changes to save.");return}try{let k=await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:y,content:C})});if(!k.ok)throw Error(String(k.status));window.alert(`Saved to ${y}`)}catch{window.alert("Save failed.")}};handleTestsToggle=(y)=>{if(y.target.checked)j9();else V9()};updateExampleWidgets=()=>{if(!this.hydrated)return;if(this.parts.testsCheckbox)this.parts.testsCheckbox.checked=A1.enabled.value};handleShortcuts=(y)=>{if(y.metaKey||y.ctrlKey){let x=!1;switch(y.key){case"s":case"r":this.doRefresh(),x=!0;break;case"/":this.flipLayout();break;case"c":if(y.shiftKey)this.copy(),x=!0;break}if(x)y.preventDefault(),y.stopPropagation()}};content=()=>[L1({part:"example"},GB({part:"style"}),s7({part:"testResults",hidden:!0}),n3({part:"exampleWidgets",icon:"code",direction:"w"},U2({title:"view/edit code",onClick:this.showCode},Q.edit2()),U2({title:"view/edit code in a new window",onClick:this.openEditorWindow},Q.edit()),U2({title:"toggle preview size",onClick:this.toggleMaximize},Q.maximize({class:"hide-if-maximized"}),Q.minimize({class:"show-if-maximized"})),UB({class:"tests-toggle",title:"run tests"},QB({type:"checkbox",part:"testsCheckbox",onChange:this.handleTestsToggle}),Q.check()))),L1({class:"code-editors",part:"codeEditors",onKeydown:this.handleShortcuts,hidden:!0}),PB({part:"sources",hidden:!0})];buildEditorPanel(){return F0({part:"editors",onChange:this.updateUndo},m1({name:"js",mode:"javascript",part:"js"}),m1({name:"html",mode:"html",part:"html"}),m1({name:"css",mode:"css",part:"css"}),m1({name:"DOM tests",mode:"javascript",part:"test"}),L1({slot:"after-tabs",class:"row"},U2({title:"undo",part:"undo",class:"transparent",onClick:this.undo},Q.cornerUpLeft()),U2({title:"redo",part:"redo",class:"transparent",onClick:this.redo},Q.cornerUpRight()),U2({title:"example menu — refresh, flip, undo, copy, save/revert edits",class:"transparent source-menu",onClick:this.sourceMenu},Q.moreVertical()),U2({title:"close code",class:"transparent",onClick:this.closeCode},Q.x())))}ensureEditors(){if(this.editorsBuilt||!this.hydrated)return;this.parts.codeEditors.append(this.buildEditorPanel()),this.editorsBuilt=!0,this.flushPendingValues(),this.ensureProductTabs(),this.showDefaultTab(),this.updateUndo()}connectedCallback(){super.connectedCallback();let{sources:y}=this.parts;this.initFromElements([...y.children]),this.remoteSync=new J0(this.storageKey,this.remoteKey,(h)=>{if(h.close){if(this.remoteId!=="")window.close();else this.classList.remove("-maximize"),this.parts.codeEditors.hidden=!0;return}if(this.css=h.css,this.html=h.html,this.js=h.js,h.test)this.test=h.test;if(this.remoteId!==""&&h.original&&!this.originalCode)this.originalCode={...h.original};this.refresh()}),this.remoteSync.startListening();let x=Math.random()*100;this.undoInterval=setInterval(()=>{if(!document.hidden)this.updateUndo()},250+x),this.beforeUnloadHandler=()=>this.remoteSync?.sendClose(),addEventListener("beforeunload",this.beforeUnloadHandler),this.updateExampleWidgets()}disconnectedCallback(){if(super.disconnectedCallback(),this.remoteSync?.sendClose(),this.remoteSync?.stopListening(),this.undoInterval)clearInterval(this.undoInterval),this.undoInterval=void 0;if(this.beforeUnloadHandler)removeEventListener("beforeunload",this.beforeUnloadHandler),this.beforeUnloadHandler=void 0}exampleMarkdown(){let y=(x,h)=>h!==""?"```"+x+`
|
|
108
|
+
`+h.trim()+"\n```\n":"";return y(this.dialect,this.js)+y("html",this.html)+y("css",this.css)+y("test",this.test)}copy=()=>{navigator.clipboard.writeText(this.exampleMarkdown())};downloadExample=()=>{let y=this.getAttribute("data-source-file")||"example",x=this.getAttribute("data-example-ordinal"),h=(y.split("/").pop()||"example").replace(/\.\w+$/,"")+(x!==null?`-example-${x}`:"")+".md",C=URL.createObjectURL(new Blob([this.exampleMarkdown()],{type:"text/markdown"})),k=document.createElement("a");k.href=C,k.download=h,k.click(),setTimeout(()=>URL.revokeObjectURL(C),1000)};originalCode=null;localEditKey(){let y=this.getAttribute("data-source-file"),x=this.getAttribute("data-example-ordinal");return y&&x!==null?I7(y,x):""}applyEdit(y){if(y.js!==void 0)this.js=y.js;if(y.html!==void 0)this.html=y.html;if(y.css!==void 0)this.css=y.css;if(y.test!==void 0)this.test=y.test;if(y.compiledJs!==void 0&&y.js!==void 0)this.compiledJs=y.compiledJs,this.compiledJsSource=y.js}hasLocalEdits(){if(!this.originalCode)return!1;let y=this.originalCode,x=(h)=>(h??"").replace(/\s+$/,"");return x(this.js)!==x(y.js)||x(this.html)!==x(y.html)||x(this.css)!==x(y.css)||x(this.test)!==x(y.test)}updateEditedIndicator(){this.classList.toggle("-locally-edited",this.hasLocalEdits())}canUndo(){let y=this.activeTab;return y instanceof r1&&y.canUndo()}canRedo(){let y=this.activeTab;return y instanceof r1&&y.canRedo()}saveLocalEdit=()=>{let y=this.localEditKey();if(!y){window.alert("This example has no source mapping to key a local save.");return}b7(y,{js:this.js,html:this.html,css:this.css,test:this.test,compiledJs:this.dialect!=="js"&&this.compiledJsSource===this.js?this.compiledJs:void 0}),this.updateEditedIndicator(),a3({type:"success",message:"Saved to this browser only — use “Save to source” to write the file."})};revertLocalEdit=()=>{let y=this.localEditKey();if(y)p7(y);if(this.originalCode)this.applyEdit(this.originalCode);if(this.viewingChanges)this.viewChanges();this.updateEditedIndicator(),this.refresh()};snapshotAndRestoreLocalEdit=()=>{this.originalCode={js:this.js,html:this.html,css:this.css,test:this.test};let y=this.localEditKey();if(!y||!L7(y))return;let x=T7(y);if(x)this.applyEdit(x),this.updateEditedIndicator(),this.refresh()};viewingChanges=!1;viewChanges=()=>{if(!this.hydrated)return;if(this.ensureEditors(),this.viewingChanges=!this.viewingChanges,this.viewingChanges)this.showCode();let y=this.originalCode??{};for(let x of["js","html","css","test"])this.parts[x].original=y[x]??"",this.parts[x].showDiff(this.viewingChanges)};doRefresh=()=>{if(this.remoteId!=="")this.refreshRemote();else this.refresh()};sourceMenu=(y)=>{let x=this.localEditKey(),h=()=>this.hasLocalEdits(),C=this.originalCode!=null;r({target:y.target.closest("button"),width:"auto",menuItems:[{icon:"refreshCw",caption:"Refresh",shortcut:"⌘R",action:this.doRefresh},{icon:"columns",caption:"Flip layout",shortcut:"⌘/",action:this.flipLayout},{icon:"cornerUpLeft",caption:"Undo",shortcut:"⌘Z",action:this.undo,enabled:()=>this.canUndo()},{icon:"cornerUpRight",caption:"Redo",shortcut:"⌘⇧Z",action:this.redo,enabled:()=>this.canRedo()},null,{icon:"copy",caption:"Copy as markdown",shortcut:"⌘⇧C",action:this.copy},{icon:"download",caption:"Download",action:this.downloadExample},null,...C?[this.viewingChanges?{icon:"edit",caption:"Back to editing",action:this.viewChanges}:{icon:"code",caption:"View changes",action:this.viewChanges,enabled:h}]:[],...x?[{icon:"save",caption:"Save changes (local)",action:this.saveLocalEdit,enabled:h}]:[],...x&&r7?[{icon:"upload",caption:"Save to source",action:()=>{this.saveToSource()},enabled:h}]:[],...C?[{icon:"rotateCcw",caption:"Revert to original",action:this.revertLocalEdit,enabled:h}]:[]]})};toggleMaximize=()=>{this.classList.toggle("-maximize")};showCode=()=>{this.ensureEditors(),this.classList.add("-maximize"),this.classList.toggle("-vertical",this.offsetHeight>this.offsetWidth),this.parts.codeEditors.hidden=!1,this.ensureProductTabs()};closeCode=()=>{if(this.remoteId!=="")this.remoteSync?.sendClose(),window.close();else this.remoteSync?.sendClose(),this.classList.remove("-maximize"),this.parts.codeEditors.hidden=!0};openEditorWindow=()=>{let{css:y,html:x,js:h,test:C}=this;R7(this.prefix,this.uuid,this.storageKey,this.remoteKey,{css:y,html:x,js:h,test:C},{sourceFile:this.getAttribute("data-source-file"),ordinal:this.getAttribute("data-example-ordinal"),original:this.originalCode??void 0}),this.classList.add("-maximize"),this.parts.codeEditors.hidden=!0};refreshRemote=()=>{this.remoteSync?.send({css:this.css,html:this.html,js:this.js,test:this.test})};updateSources=()=>{if(this.persistToDom){let{sources:y}=this.parts;y.innerText="";for(let x of["js","css","html","test"])if(this[x])y.append(s7({class:`language-${x}`,innerHTML:this[x]}))}};refresh=async()=>{if(this.remoteId!=="")return;let y=this.dialect!=="js"&&!A1.enabled.value&&this.compiledJs!==void 0&&this.compiledJsSource===this.js?this.compiledJs:void 0,x=y===void 0?await W0(this.dialect):void 0,{example:h,style:C,exampleWidgets:k}=this.parts;if(this.dialect!=="js"){if(this.lastGeneratedJs=y??await this.computeGeneratedJs(x),this.jsOutEditor)this.jsOutEditor.value=this.lastGeneratedJs;if(y===void 0)this.compiledJs=this.lastGeneratedJs,this.compiledJsSource=this.js,await this.runInlineTjsTests(x)}let B,w,g=(j)=>{w=j},z=this.dialect!=="js"&&this.editorsBuilt?this.captureScope:void 0,q=this.effectiveMode;if(q==="iframe"||q==="ide")B=await b4({html:this.html,css:this.css,js:this.js,context:this.context,transform:x,compiledJs:y,exampleElement:h,widgetsElement:k,onError:g,onScope:z});else B=await I4({html:this.html,css:this.css,js:this.js,context:this.context,transform:x,compiledJs:y,exampleElement:h,styleElement:C,widgetsElement:k,onError:g,onScope:z});if(this.persistToDom)this.updateSources();if((this.test||w)&&A1.enabled.value){await new Promise((V)=>requestAnimationFrame(V)),this.classList.add("-has-tests","-test-running"),this.classList.remove("-test-passed","-test-failed");let j=this.dialect==="js"?x:await W0("js");if(this.testResults=this.test&&B?await L4(this.test,B,this.context,j):{passed:0,failed:0,tests:[]},w)this.testResults.failed+=1,this.testResults.tests.unshift({name:"example loads without error",passed:!1,error:String(w)});this.classList.remove("-test-running"),this.displayTestResults()}else this.classList.remove("-has-tests","-test-running","-test-passed","-test-failed")};displayTestResults(){let{testResults:y,exampleWidgets:x}=this.parts,h=this.testResults;if(!h||h.tests.length===0){if(y.hidden=!0,this.classList.remove("-test-passed","-test-failed"),x)x.title="no tests";return}y.innerHTML="";let C=L1({style:{marginBottom:"8px",fontWeight:"bold"}},`${h.passed}/${h.tests.length} tests passed`);y.append(C);for(let k of h.tests){let B=k.passed?"✓":"✗",w=k.passed?"test-pass":"test-fail",g=L1({class:w},z9(B+" "),k.name,k.error?z9({style:{opacity:"0.7"}},` - ${k.error}`):"");y.append(g)}if(this.classList.toggle("-test-passed",h.failed===0),this.classList.toggle("-test-failed",h.failed>0),x)x.title=h.failed===0?`${h.passed} tests passed`:`${h.failed}/${h.tests.length} tests failed`;this.updateTestResultsVisibility(),this.dispatchEvent(new CustomEvent("testcomplete",{bubbles:!0,detail:{results:h,element:this}}))}initFromElements(y){for(let x of y){x.hidden=!0;let[h,...C]=x.innerHTML.split(`
|
|
109
|
+
`);if(["js","html","css","test"].includes(h)){let k=C.filter((w)=>w.trim()!=="").map((w)=>w.match(/^\s*/)[0].length).sort()[0],B=(k>0?C.map((w)=>w.substring(k)):C).join(`
|
|
110
|
+
`);this.setEditorValue(h,B)}else{let k=["js","html","css","test"].find((B)=>x.matches(`.language-${B}`));if(k)this.setEditorValue(k,k==="html"?x.innerHTML:x.innerText)}}}showDefaultTab(){if(!this.hydrated||!this.editorsBuilt){this.pendingShowDefaultTab=!0;return}let{editors:y}=this.parts;if(this.js!=="")y.value=0;else if(this.html!=="")y.value=1;else if(this.css!=="")y.value=2;else if(this.test!=="")y.value=3}render(){if(super.render(),this.updateExampleWidgets(),this.remoteId!==""){let y=localStorage.getItem(this.storageKey);if(y!==null){let x=JSON.parse(y);if(this.remoteKey!==x.remoteKey)return;if(this.css=x.css,this.html=x.html,this.js=x.js,x.test)this.test=x.test;this.ensureEditors(),this.parts.example.hidden=!0,this.parts.codeEditors.hidden=!1,this.classList.add("-maximize"),this.updateUndo()}}else this.refresh()}}var d4=B2.elementCreator(),q9=new URL(window.location.href).searchParams,u7=q9.get("lx");if(u7){document.title+=" [code editor]",document.body.textContent="";let y=d4({remoteId:u7}),x=q9.get("sf"),h=q9.get("ord");if(x&&h!==null)y.setAttribute("data-source-file",x),y.setAttribute("data-example-ordinal",h);document.body.append(y)}var{slot:m7}=U;class L2 extends ${static preferredTagName="tosi-sidenav";static initAttributes={minSize:800,navSize:200,compact:!1,contentVisible:!1};value="normal";content=[m7({name:"nav",part:"nav"}),m7({part:"content"})];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:`${_.navWidth("50%")} ${_.contentWidth("50%")}`,gridTemplateRows:"100%",position:"relative",margin:_.margin("0 0 0 -100%"),transition:_.sideNavTransition("0.25s ease-out")},":host slot":{position:"relative"},":host slot:not([name])":{display:"block"},':host slot[name="nav"]':{display:"block"}};handleResize=()=>{let{content:y}=this.parts,x=this.offsetParent;if(x===null)return;let h;if(this.compact=x.offsetWidth<this.minSize,[...this.childNodes].find((k)=>k instanceof Element?k.getAttribute("slot")!=="nav":!0)===void 0)h="compact/nav",this.style.setProperty("--nav-width","100%"),this.style.setProperty("--content-width","0%");else if(!this.compact)h="normal",y.classList.add("-tosi-sidenav-visible"),this.style.setProperty("--nav-width",`${this.navSize}px`),this.style.setProperty("--content-width",`calc(100% - ${this.navSize}px)`),this.style.setProperty("--margin","0");else if(y.classList.remove("-tosi-sidenav-visible"),this.style.setProperty("--nav-width","50%"),this.style.setProperty("--content-width","50%"),this.contentVisible)h="compact/content",this.style.setProperty("--margin","0 0 0 -100%");else h="compact/nav",this.style.setProperty("--margin","0 -100% 0 0");if(this.value!==h)this.value=h};observer;connectedCallback(){super.connectedCallback(),this.contentVisible=this.parts.content.childNodes.length===0,globalThis.addEventListener("resize",this.handleResize),this.observer=new MutationObserver(this.handleResize),this.observer.observe(this,{childList:!0}),this.style.setProperty("--side-nav-transition","0s"),setTimeout(()=>{this.style.removeProperty("--side-nav-transition")},250)}disconnectedCallback(){super.disconnectedCallback(),this.observer.disconnect()}render(){super.render(),this.handleResize()}}var OB=L2,Z0=L2.elementCreator(),YB=Z0,iB=Z0;var{div:R0,span:D0,a:H0,header:FB,button:X9,template:NB,input:WB,h2:JB,details:ZB,summary:RB,ul:n7,li:E7}=U,c2={pass:_.testColorPass("#0a0"),fail:_.testColorFail("#c00"),running:_.testColorRunning("#fa0")},DB={".view-source":{opacity:"0.9"},".view-source:hover":{opacity:"1"},"@keyframes test-pulse":{"0%, 100%":{opacity:"1"},"50%":{opacity:"0.7"}},"@keyframes test-appear":{from:{opacity:"0",transform:"scale(0.8)"},to:{opacity:"1",transform:"scale(1)"}},"@keyframes test-fade":{"0%, 20%":{opacity:"1",transform:"scale(1)"},"70%":{opacity:"1",transform:"scale(1.1)"},"100%":{opacity:"0",transform:"scale(0.9)",pointerEvents:"none"}},"body:not(.tests-enabled) .doc-link::after, body:not(.tests-enabled) .test-widget":{display:"none !important"},".doc-link.-test-passed::after, .doc-link.-test-failed::after":{content:"''",width:l.fontSize50,height:l.fontSize50,borderRadius:"50%",marginLeft:l.spacing50,display:"inline-block",verticalAlign:"middle"},".doc-link.-test-passed::after":{background:c2.pass},".doc-link.-test-failed::after":{background:c2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget":{_testBg:c2.running,position:"fixed",bottom:l.spacing,left:l.spacing,zIndex:"1000",background:l.testBg,color:"white",gap:l.spacing50},".test-widget[hidden]":{display:"none"},".test-widget.-running":{_testBg:c2.running,animation:"test-appear 0.3s ease-out, test-pulse 2s ease-in-out 0.3s infinite"},".test-widget.-passed":{_testBg:c2.pass,animation:"test-fade 3s ease-out forwards"},".test-widget.-failed":{_testBg:c2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget .count":{background:"white",color:l.testBg,borderRadius:"50%",width:l.lineHeight,height:l.lineHeight,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"},"@keyframes example-target-pulse":{from:{boxShadow:`0 0 0 3px ${_.accent("#007aff")}`},to:{boxShadow:"0 0 0 3px transparent"}},".example-target":{animation:"example-target-pulse 1.5s ease-out",borderRadius:l.roundedRadius}},HB=0;function _9(y){let{docs:x,context:h={},projectName:C="",projectLinks:k={},navSize:B=200,minSize:w=600,routing:g="query",initialRoute:z,onRouteChange:q,navbarLinks:j,contentElement:V}=y,A=g==="memory";for(let X of x)X.testStatus=void 0;let P=g==="query"?{}:b2(x),G=(X)=>P[X]??X,i=(X)=>{for(let K of x)if(G(K.filename)===X)return K.filename;return""},N=(X)=>g==="query"?`?${X}`:R3(G(X)),F=()=>{if(A)return z?i(z):"";return g==="path"?D3(document.location.pathname,P):document.location.search!==""?document.location.search.substring(1).split("&")[0]:""},Z=(X)=>{let K=X.getAttribute("href")||"";if(K===""||K.startsWith("#"))return null;let O;try{O=new URL(K,document.location.href)}catch{return null}if(O.origin!==document.location.origin)return null;let M=(d)=>x.some((a)=>a.filename===d)?d:null,J=O.search.replace(/^\?/,"");if(J!==""&&!J.includes("=")&&!J.includes("&")){let d=M(decodeURIComponent(J));if(d)return d}if(!A&&g!=="query"){let d=M(D3(O.pathname,P));if(d)return d}return null},R=F()||x[0]?.filename||"README.md",c=x.find((X)=>X.filename===R)||x[0],C1=`docBrowser${HB++}`,W=t({[C1]:{docs:x,currentDoc:c,compact:!1}})[C1],T=()=>{},v={},D,K1=!1,n1=0,q5=0;if(!A)window.__docTestResults=new Promise((X)=>{D=X});let r9=(X)=>{let K=v[X],O=W.docs.find((M)=>M.filename===X);if(O)O.testStatus=K?K.passed?"passed":"failed":void 0;T()},Iy=()=>{if(q5>=n1&&D){let X={passed:0,failed:0,pages:v};for(let K of Object.values(v))X.passed+=K.totalPassed,X.failed+=K.totalFailed;if(D(X),D=void 0,m9&&!E2)fetch("/report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)}).catch(()=>{})}},m9=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1",by=(X)=>{let{results:K}=X.detail,O=String(W.currentDoc.filename);v[O]={passed:K.failed===0,tests:[...K.tests],totalPassed:K.passed,totalFailed:K.failed},r9(O)},l5=(X)=>{q5++,Iy(),_5()};u1.docLink={toDOM(X,K){X.setAttribute("href",N(K)),X.dataset.filename=K}},u1.current={toDOM(X,K){X.classList.toggle("current",K===X.dataset.filename)}},u1.testStatus={toDOM(X,K){if(X.classList.remove("-test-passed","-test-failed"),K==="passed")X.classList.add("-test-passed");else if(K==="failed")X.classList.add("-test-failed")}};let Ty=B0(()=>{let X=j5.value.toLocaleLowerCase();W.docs.forEach((K)=>{K.hidden=!K.title.toLocaleLowerCase().includes(X)&&!K.text.toLocaleLowerCase().includes(X)}),$1(W.docs),T(!0)}),j5=WB({slot:"nav",placeholder:"search",type:"search",style:{width:"calc(100% - 10px)",margin:"5px"},onInput:Ty});if(!A)window.addEventListener("popstate",()=>{if(L){if(f0()&&!window.confirm("Discard unsaved changes to the source?")){let X=N(String(L.doc.filename));window.history.pushState({href:X},"",X);return}X5()}c0(F())}),window.addEventListener("beforeunload",(X)=>{if(f0())X.preventDefault(),X.returnValue=""});let $2=null,m2=[X9({class:"iconic",style:{color:l.linkColor},title:"navigation",bind:{value:W.compact,binding:{toDOM(X,K){X.style.display=K?"":"none",X.nextSibling.style.display=K?"":"none"}}},onClick(){if($2)$2.contentVisible=!$2.contentVisible}},Q.menu()),D0({style:{flex:"0 0 10px"}})];if(C)m2.push(H0({href:"/",style:{display:"flex",alignItems:"center",borderBottom:"none"}},k.tosijs?Q.tosiUi({style:{_xinIconSize:40,marginRight:10}}):D0(),JB(C)));m2.push(D0({class:"elastic"}));let n9=(X)=>{let K=X.icon?Q[X.icon]:void 0;return H0({class:K?"iconic":"",title:X.label,target:"_blank",href:X.href},K?K():X.label)};if(j)j.forEach((X)=>m2.push(n9(X)));else{let X=[[k.tosijs,"tosi","tosijs"],[k.discord,"discord","discord"],[k.blog,"blog","blog"],[k.github,"github","github"],[k.npm,"npm","npmjs"]];for(let[K,O,M]of X)if(K)m2.push(n9({href:K,label:M,icon:O}))}let w1=V||R0();w1.classList.add("doc-content"),Object.assign(w1.style,{display:"block",maxWidth:"var(--doc-content-max-width, 44em)",margin:"auto",padding:"0 1em",overflow:"hidden"});let E9=()=>{for(let X of w1.querySelectorAll("a")){let K=Z(X);if(K!==null)X.setAttribute("href",N(K)),X.dataset.docLink=K}},py=()=>{if(A)return;let X=location.hash.replace(/^#/,"");if(!X)return;requestAnimationFrame(()=>{let K=null;try{K=w1.querySelector(`#${CSS.escape(X)}`)}catch{K=null}if(!K)return;K.scrollIntoView({block:"center",behavior:"smooth"}),K.classList.add("example-target"),setTimeout(()=>K&&K.classList.remove("example-target"),1600)})},o9=V!==void 0&&!A,a9=(X)=>{if(o9)o9=!1;else w1.innerHTML=i0(X.text,{bakes:X.bakes?new Map(X.bakes):void 0});if(E9(),B2.insertExamples(w1,h,X.path||void 0),py(),g==="path")document.title=$7(X,C)},c0=(X)=>{let K=x.find((O)=>O.filename===X)||x[0];W.currentDoc=K,a9(K),T(!0)},d0=(X)=>{if(!sy())return;if(A)q?.(G(X));else{let K=N(X);window.history.pushState({href:K},"",K)}c0(X)};w1.addEventListener("click",(X)=>{if(X.defaultPrevented||X.button!==0||X.metaKey||X.ctrlKey||X.shiftKey||X.altKey)return;let K=X.target.closest("a");if(!K||K.target==="_blank"||K.hasAttribute("download"))return;let O=Z(K);if(O===null)return;X.preventDefault(),d0(O)});let Ly=(X)=>X.endsWith(".md")?"markdown":X.endsWith(".css")?"css":X.endsWith(".ts")||X.endsWith(".tjs")?"typescript":"javascript",cy=(X,K)=>{if(K.endsWith(".md"))return X;return(X.match(/\/\*#[\s\S]+?\*\//g)||[]).map((M)=>M.substring(3,M.length-2).trim()).join(`
|
|
111
111
|
|
|
112
|
-
`)},
|
|
113
|
-
`)}let
|
|
112
|
+
`)},dy=(X)=>{let K=k.github;if(!K||!X)return null;let O=K.match(/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return O?`https://raw.githubusercontent.com/${O[1]}/${O[2]}/main/${X}`:null},t9=async(X)=>{try{let O=await fetch(`/__docstore/source?file=${encodeURIComponent(X)}`),M=O.headers.get("content-type")||"";if(O.ok&&!/text\/html/i.test(M))return await O.text()}catch{}let K=dy(X);if(K)try{let O=await fetch(K);if(O.ok)return await O.text()}catch{}return null},fy=async(X,K)=>{try{return(await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:X,content:K})})).ok}catch{return!1}},V5=(X,K)=>{let O=URL.createObjectURL(new Blob([K],{type:"text/plain"}));H0({href:O,download:X}).click(),setTimeout(()=>URL.revokeObjectURL(O),1000)},L=null,f0=()=>L!==null&&L.editor.value!==L.original,X5=()=>{if(!L)return;L.editor.remove(),L=null,w1.style.display=""},sy=()=>{if(!L)return!0;if(f0()&&!window.confirm("Discard unsaved changes to the source?"))return!1;return X5(),!0},n2=(X)=>{if(!L)return;if(L.view=X,X==="preview")w1.innerHTML=i0(cy(L.editor.value,L.doc.path)),E9(),B2.insertExamples(w1,h,L.doc.path||void 0);else if(X==="diff")w1.replaceChildren(q0({original:L.original,modified:L.editor.value,style:{display:"block",width:"100%",height:"100%"}}));w1.style.display=X==="edit"?"none":"",L.editor.style.display=X==="edit"?"block":"none"},uy=()=>{if(!L)return;let X=String(W.currentDoc.filename);X5(),c0(X)},ry=async()=>{if(!L)return;let{doc:X,editor:K}=L;if(await fy(X.path,K.value))L.original=K.value,n2("preview");else V5(X.path.split("/").pop()||"source.txt",K.value)},my=async(X)=>{if(L)return;let K=await t9(X.path);if(K===null){window.alert(`Could not load source for ${X.path}`);return}let O=m1({mode:Ly(X.path)});O.style.cssText="display:block; width:100%; height:100%; border:none;",O.value=K,w1.parentElement.append(O),L={editor:O,doc:X,view:"edit",original:K},n2("edit")},ny=(X)=>{let K=x.find((J)=>String(J.filename)===String(W.currentDoc.filename));if(!K)return;let O=(J)=>J.split("/").pop()||J,M=L?[...L.view!=="edit"?[{caption:"Edit",icon:"edit",action:()=>n2("edit")}]:[],...L.view!=="preview"?[{caption:"Preview",icon:"eye",action:()=>n2("preview")}]:[],{caption:"View changes",icon:"code",action:()=>n2("diff"),enabled:()=>f0()},null,{caption:"Save to source",icon:"save",action:()=>void ry()},{caption:"Download",icon:"download",action:()=>V5(O(L.doc.path),L.editor.value)},null,{caption:"Close editor",icon:"x",action:uy}]:[{caption:"Edit page source",icon:"edit",action:()=>void my(K)},...k.github&&K.path&&K.path!=="README.md"?[{caption:"View on GitHub",icon:"github",action:()=>{window.open(`${k.github}/blob/main/${K.path}`,"_blank")}}]:[],{caption:"Download source",icon:"download",action:()=>void t9(K.path).then((J)=>{if(J!==null)V5(O(K.path),J)})}];r({target:X,position:"sw",menuItems:M})},e9={slot:"nav",class:"doc-nav",style:{display:"flex",flexDirection:"column",width:"100%",height:"calc(100% - 44px)",overflowY:"scroll"}},Ey=g!=="query"?(()=>{let X=W4(x,P),K=new Map,O=[],M=(u)=>{let n=[u.doc.filename];for(let o of u.children)n.push(...M(o));return n},J=(u)=>(n)=>{let o=n.target.closest("tosi-sidenav");if(o)o.contentVisible=!0;d0(String(u.filename)),n.preventDefault();let e=v[u.filename];if(e&&!e.passed)setTimeout(()=>{let D1=document.querySelector("tosi-example.-test-failed");if(D1)D1.scrollIntoView({behavior:"smooth",block:"center"})},100)},d=(u)=>{let n=H0({class:"doc-link",href:N(u.doc.filename),onClick:J(u.doc)},i1(u.doc.title));if(u.children.length===0){let D1=E7(n);return K.set(u.doc.filename,{li:D1,link:n}),D1}let o=ZB(RB(n),n7(...u.children.map(d))),e=E7(o);return O.push({li:e,el:o,link:n,filename:u.doc.filename,subtree:M(u)}),e},a=R0(e9,n7(...X.map(d))),m=(u,n)=>{if(!n)return!0;let o=x.find((e)=>e.filename===u);return!!o&&(String(o.title).toLocaleLowerCase().includes(n)||String(o.text).toLocaleLowerCase().includes(n))},j1=(u,n,o)=>{u.classList.toggle("current",n===o);let e=v[n];u.classList.toggle("-test-passed",!!e&&e.passed),u.classList.toggle("-test-failed",!!e&&!e.passed)};return T=(u=!1)=>{let n=W.currentDoc,o=n&&n.filename!=null?String(n.filename):"",e=j5.value.trim().toLocaleLowerCase();for(let[D1,{li:o2,link:A5}]of K)o2.style.display=m(D1,e)?"":"none",j1(A5,D1,o);for(let{li:D1,el:o2,link:A5,filename:C8,subtree:K5}of O){let k8=m(C8,e)||K5.some((B8)=>K.has(B8)&&K.get(B8).li.style.display!=="none");if(D1.style.display=k8?"":"none",j1(A5,C8,o),e)o2.open=k8;else if(u)o2.open=K5.includes(o);else if(K5.includes(o))o2.open=!0}},T(!0),a})():R0({...e9,bindList:{idPath:"filename",hiddenProp:"hidden",value:W.docs}},NB(H0({class:"doc-link",bindCurrent:`${C1}.currentDoc.filename`,bindDocLink:"^.filename",bindTestStatus:"^.testStatus",onClick(X){let K=j2(X.target),O=X.target.closest("tosi-sidenav");O.contentVisible=!0,d0(String(K.filename)),X.preventDefault()}},i1({bindText:"^.title"})))),O2=R0({style:{display:"flex",flexDirection:"column",maxWidth:"100vw",height:"100vh",overflow:"hidden"}},FB(...m2),Z0({name:"Documentation",navSize:B,minSize:w,style:{flex:"1 1 auto",overflow:"hidden"},onChange(X){if($2=X.target.closest(L2.tagName),$2)W.compact=$2.compact}},j5,Ey,R0({style:{position:"relative",overflowY:"scroll",height:"100%"}},X9({class:"view-source",style:{display:"flex",alignItems:"center",gap:"6px",position:"fixed",top:"calc(var(--xin-header-height, 60px) + 5px)",right:"5px",zIndex:"100",fontSize:"0.875em",color:"var(--brand-color, inherit)",background:"var(--background, white)",border:"none",borderRadius:"4px",padding:"3px 8px",boxShadow:"0 1px 4px #0003",cursor:"pointer",transition:"opacity 0.2s ease"},onClick(X){let K=X.target.closest(".view-source");if(K)ny(K)},bind:{value:W.currentDoc,binding(X,K){X.style.display=K.path?"flex":"none"}}},Q.code({style:{_xinIconSize:16}}),"Source"),w1)));a9(c),O1("test-indicators",DB);let g1=X9({class:"test-widget",hidden:!0,onClick:oy},D0({part:"label"},"Tests"),D0({class:"count",part:"count"},"0"));O2.appendChild(g1);let s0=!1;function y8(){s0=!0,g1.hidden=!1,g1.classList.remove("-passed","-failed"),g1.classList.add("-running"),x8()}function x8(){let X=g1.querySelector('[part="label"]'),K=g1.querySelector('[part="count"]'),O=Object.values(v).reduce((J,d)=>J+d.totalPassed,0),M=Object.values(v).reduce((J,d)=>J+d.totalFailed,0);if(X)if(s0)X.textContent="Running";else if(M>0)X.textContent="Failed";else if(O>0)X.textContent="Passed";else X.textContent="Tests";if(K)K.textContent=M>0?String(M):String(O)}function _5(){let X=Object.values(v).reduce((K,O)=>K+O.totalFailed,0);if(s0&&q5>=n1)if(s0=!1,g1.classList.remove("-running"),X>0)g1.classList.add("-failed"),g1.classList.remove("-passed"),g1.hidden=!1;else g1.classList.add("-passed"),g1.classList.remove("-failed"),g1.hidden=!1;x8()}function oy(){let X=Object.entries(v).filter(([,O])=>!O.passed),K=[];for(let[O,M]of X){let J=x.find((a)=>a.filename===O),d=M.tests.filter((a)=>!a.passed);for(let a of d)K.push({caption:`${J?.title||O}: ${a.name}`,action:()=>{if(W.docs.find((j1)=>String(j1.filename)===O))d0(O),setTimeout(()=>{let j1=document.querySelector("tosi-example.-test-failed");if(j1)j1.scrollIntoView({behavior:"smooth",block:"center"})},100)}})}if(K.length>0)K.push(null);K.push({icon:"copy",caption:"Copy test results to clipboard",action:()=>{let O=ay();navigator.clipboard.writeText(O)}}),r({target:g1,menuItems:K})}function ay(){let X=["# Test Results",""],K=0,O=0;for(let[M,J]of Object.entries(v)){let a=x.find((m)=>m.filename===M)?.title||M;if(K+=J.totalPassed,O+=J.totalFailed,J.tests.length>0){X.push(`## ${a}`),X.push("");for(let m of J.tests){let j1=m.passed?"✓":"✗",u=m.error?`- ${j1} ${m.name}: ${m.error}`:`- ${j1} ${m.name}`;X.push(u)}X.push("")}}return X.unshift(`**Summary: ${K} passed, ${O} failed**`,""),X.join(`
|
|
113
|
+
`)}let ty=new URLSearchParams(window.location.search),E2=!A&&ty.get("_testMode")==="1",u0=E2?F():null;if(O2.addEventListener("testcomplete",(X)=>{if(by(X),_5(),E2&&window.parent!==window&&u0){let{results:K}=X.detail;window.parent.postMessage({type:"tosi-test-results",filename:u0,results:K},"*")}}),E2&&u0){let X=()=>{let O=[...O2.querySelectorAll("tosi-example")].filter((J)=>J.classList.contains("-has-tests")),M=O.filter((J)=>J.classList.contains("-test-running"));if(O.length>0&&M.length===0)window.parent.postMessage({type:"tosi-tests-done",filename:u0},"*");else setTimeout(X,100)};setTimeout(X,500)}let ey=async()=>{if(K1)return;if(!A1.enabled.value)return;if(E2)return;K1=!0;let X=x.filter((J)=>J.text.includes("```test"));if(n1=X.length,n1>0)y8();if(n1===0){if(D)D({passed:0,failed:0,pages:{}}),D=void 0;return}let K=String(W.currentDoc.filename),O=document.createElement("iframe");O.style.cssText="position: fixed; left: -10000px; top: 0; width: 800px; height: 600px; opacity: 0; pointer-events: none;",document.body.appendChild(O);let M=(J)=>{if(J.data?.type!=="tosi-test-results")return;let{filename:d,results:a}=J.data;if(!v[d])v[d]={passed:!0,tests:[],totalPassed:0,totalFailed:0};let m=v[d];m.tests.push(...a.tests),m.totalPassed+=a.passed,m.totalFailed+=a.failed,m.passed=m.totalFailed===0,r9(d),_5()};window.addEventListener("message",M);for(let J of X){if(J.filename===K)continue;O.src=g==="path"?`${window.location.origin}${N(J.filename)}?_testMode=1`:`${window.location.origin}${window.location.pathname}?${J.filename}&_testMode=1`,await new Promise((d)=>{let a=Date.now()+30000,m=(j1)=>{if(j1.data?.type==="tosi-tests-done"&&j1.data.filename===J.filename)window.removeEventListener("message",m),d()};window.addEventListener("message",m),setTimeout(()=>{window.removeEventListener("message",m),d()},a-Date.now())}),l5(J.filename)}if(window.removeEventListener("message",M),O.remove(),X.some((J)=>J.filename===K))setTimeout(()=>l5(K),1000)},h8=()=>{if(!A1.enabled.value)return;if(m9)setTimeout(ey,1000);else if(c.text.includes("```test"))n1=1,y8(),setTimeout(()=>l5(c.filename),2000);else if(D)D({passed:0,failed:0,pages:{}}),D=void 0};if(!A)h8(),A1.enabled.observe(h8);if(A)O2.navigate=(X)=>c0(i(X)||X),Object.defineProperty(O2,"currentSlug",{get:()=>G(String(W.currentDoc.filename))});return O2}var vB=`/* doc-system book stylesheet */
|
|
114
114
|
html { font-size: 100%; }
|
|
115
115
|
body {
|
|
116
116
|
font-family: Georgia, 'Times New Roman', serif;
|
|
@@ -174,7 +174,7 @@ sup.footnote-ref a { text-decoration: none; }
|
|
|
174
174
|
.footnotes hr { border: none; border-top: 1px solid #ccc; margin: 1em 0; }
|
|
175
175
|
.footnote-backref { text-decoration: none; }
|
|
176
176
|
a.wikilink { text-decoration: none; border-bottom: 1px dotted currentColor; }
|
|
177
|
-
`,
|
|
177
|
+
`,MB=`
|
|
178
178
|
@page { margin: 18mm 16mm; }
|
|
179
179
|
.book-title { text-align: center; margin: 30vh 0 1em; }
|
|
180
180
|
.book-toc { page-break-after: always; }
|
|
@@ -183,32 +183,32 @@ a.wikilink { text-decoration: none; border-bottom: 1px dotted currentColor; }
|
|
|
183
183
|
.book-toc ol ol { padding-left: 1.2em; }
|
|
184
184
|
.book-toc a { color: inherit; }
|
|
185
185
|
.chapter { page-break-before: always; }
|
|
186
|
-
`;function
|
|
187
|
-
${
|
|
188
|
-
${
|
|
186
|
+
`;function A9(y){return y.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function f4(y){return y.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function SB(y){return y.replace(/<!--\{[\s\S]*?\}-->\s*/g,"")}function o7(y){let x=[];for(let h of y)x.push(h),x.push(...o7(h.children));return x}function a7(y){return y.map((x)=>`<li><a href="#${f4(x.doc.filename)}">${A9(x.doc.title)}</a>${x.children.length?`<ol>${a7(x.children)}</ol>`:""}</li>`).join("")}function t7(y,x){let h=y.filter((g)=>!g.hidden),C=b2(h),k=W4(h,C),B=x.css??`${vB}
|
|
187
|
+
${MB}`,w=o7(k).map((g)=>`<section class="chapter" id="${f4(g.doc.filename)}">
|
|
188
|
+
${i0(SB(g.doc.text))}
|
|
189
189
|
</section>`).join(`
|
|
190
190
|
`);return`<!DOCTYPE html>
|
|
191
191
|
<html lang="${x.lang??"en"}">
|
|
192
192
|
<head>
|
|
193
193
|
<meta charset="utf-8"/>
|
|
194
|
-
<title>${
|
|
195
|
-
<style>${
|
|
194
|
+
<title>${A9(x.title)}</title>
|
|
195
|
+
<style>${B}</style>
|
|
196
196
|
</head>
|
|
197
197
|
<body>
|
|
198
|
-
<h1 class="book-title">${
|
|
199
|
-
<nav class="book-toc"><h2>Contents</h2><ol>${
|
|
200
|
-
${
|
|
198
|
+
<h1 class="book-title">${A9(x.title)}</h1>
|
|
199
|
+
<nav class="book-toc"><h2>Contents</h2><ol>${a7(k)}</ol></nav>
|
|
200
|
+
${w}
|
|
201
201
|
${x.autoPrint?'<script>addEventListener("load",function(){setTimeout(function(){print()},300)})</script>':""}
|
|
202
202
|
</body>
|
|
203
|
-
</html>`}var E7=200,$i=600;function Yi(y={}){let x=X.fromCss(y.accent??"#EE257B");return{_textColor:y.text??"#222",_brandColor:x,_background:y.background??"#fafafa",_buttonBg:y.buttonBg??"#fdfdfd",_inputBg:y.inputBg??"#fdfdfd",_backgroundShaded:"#f5f5f5",_navBg:x.rotate(30).desaturate(0.5).brighten(0.9),_barColor:x.opacity(0.4),_focusColor:x.opacity(0.7),_placeholderColor:x.opacity(0.4),_brandTextColor:x.rotate(30).brighten(0.9),_insetBg:x.rotate(45).brighten(0.8),_codeBg:x.rotate(-15).desaturate(0.5).brighten(0.9),_linkColor:x.rotate(-30).darken(0.5),_shadowColor:"#0004",_menuBg:"#fafafa",_menuItemActiveColor:"#000",_menuItemIconActiveColor:"#000",_menuItemActiveBg:"#aaa",_menuItemHoverBg:"#eee",_menuItemColor:"#222",_menuSeparatorColor:"#2224",_menuShadow:"0 4px 8px #0004",_scrollThumbColor:"#0006",_scrollBarColor:"#0001",_inputBorderShadow:"inset 0 0 2px #0006"}}function a7(y={}){let x=Yi(y),h=X.fromCss(y.accent??"#EE257B");return{"@import":"https://fonts.googleapis.com/css2?family=Aleo:ital,wght@0,100..900;1,100..900&famiSpline+Sans+Mono:ital,wght@0,300..700;1,300..700&display=swap",":root":{_fontFamily:"'Aleo', sans-serif",_codeFontFamily:"'Spline Sans Mono', monospace",_fontSize:"16px",_codeFontSize:"14px",...x,_tosiAccent:z.brandColor,_tosiBg:z.background,_tosiText:z.textColor,_tosiBgInset:z.insetBg,_spacing:"10px",_lineHeight:"calc(var(--font-size) * 1.6)",_h1Scale:"2",_h2Scale:"1.5",_h3Scale:"1.25",_touchSize:"32px",_headerHeight:"calc( var(--line-height) * var(--h2-scale) + var(--spacing) * 2 )",_docContentMaxWidth:"44em"},".darkmode":{...i0(x),_shadowColor:h.opacity(0.5),_menuShadow:`0 0 0 2px ${h.opacity(0.75)}`,_menuSeparatorColor:h.opacity(0.5)},".high-contrast":{filter:"contrast(2)"},"*":{boxSizing:"border-box",scrollbarColor:`${z.scrollThumbColor} ${z.scrollBarColor}`,scrollbarWidth:"thin"},body:{fontFamily:z.fontFamily,fontSize:z.fontSize,margin:"0",lineHeight:z.lineHeight,background:z.background,_tosiTabsSelectedColor:z.brandColor,_tosiTabsBarColor:z.brandTextColor,_menuItemIconColor:z.brandColor,color:z.textColor},"tosi-doc-system":{display:"block"},"tosi-doc-system tosi-sidenav::part(nav)":{background:z.navBg},"tosi-doc-system:not(:defined)":{display:"block",position:"fixed",inset:`${z.headerHeight} 0 0 0`,overflow:"auto"},"tosi-doc-system:not(:defined)::before":{content:'""',position:"fixed",top:"0",left:"0",right:"0",height:z.headerHeight,background:z.brandColor},"tosi-doc-system:not(:defined) .doc-content":{display:"block",maxWidth:z.docContentMaxWidth,margin:"auto",padding:"0 1em",overflow:"hidden"},"tosi-doc-system:not(:defined) .doc-navbar":{display:"none"},"tosi-doc-system:not(:defined) pre:has(> code.language-test)":{display:"none"},"tosi-doc-system:not(:defined) .doc-nav":{display:"none"},[`@media (min-width: ${$i}px)`]:{"tosi-doc-system:not(:defined)":{left:`${E7}px`},"tosi-doc-system:not(:defined) .doc-nav":{display:"block",position:"fixed",left:"0",top:z.headerHeight,bottom:"0",width:`${E7}px`,overflow:"auto",background:z.navBg,padding:"0"},"tosi-doc-system:not(:defined) .doc-nav summary":{cursor:"pointer"}},".center":{display:"flex",alignItems:"center",justifyContent:"center"},"input, button, select, textarea":{fontFamily:z.fontFamily,fontSize:z.fontSize,color:"currentColor",background:z.inputBg},select:{WebkitAppearance:"none",appearance:"none"},header:{background:z.brandColor,color:z.brandTextColor,_textColor:z.brandTextColor,_linkColor:z.brandTextColor,display:"flex",alignItems:"center",padding:"0 var(--spacing)",lineHeight:"calc(var(--line-height) * var(--h1-scale))",height:z.headerHeight,whiteSpace:"nowrap"},h1:{color:z.brandColor,fontSize:"calc(var(--font-size) * var(--h1-scale))",lineHeight:"calc(var(--line-height) * var(--h1-scale))",fontWeight:"400",borderBottom:`4px solid ${z.barColor}`,margin:`${z.spacing} 0 ${z.spacing200}`,padding:0},"header h2":{color:z.brandTextColor,whiteSpace:"nowrap"},h2:{color:z.brandColor,fontSize:"calc(var(--font-size) * var(--h2-scale))",lineHeight:"calc(var(--line-height) * var(--h2-scale))",margin:"calc(var(--spacing) * var(--h2-scale)) 0"},h3:{fontSize:"calc(var(--font-size) * var(--h3-scale))",lineHeight:"calc(var(--line-height) * var(--h3-scale))",margin:"calc(var(--spacing) * var(--h3-scale)) 0"},"input[type=search]":{borderRadius:99},blockquote:{position:"relative",background:z.insetBg,margin:"0 48px 56px 0",borderRadius:z.spacing,padding:"var(--spacing) calc(var(--spacing) * 2)",filter:`drop-shadow(0px 1px 1px ${z.shadowColor})`},"blockquote > :first-child":{marginTop:"0"},"blockquote > :last-child":{marginBottom:"0"},"blockquote::before":{content:'" "',display:"block",width:1,height:1,border:"10px solid transparent",borderTopColor:z.insetBg,borderRightColor:z.insetBg,position:"absolute",bottom:-20,right:24},"blockquote::after":{content:'" "',width:48,height:48,display:"block",bottom:-48,right:-24,position:"absolute",background:g0(O.tosi(),void 0,void 0,2)},a:{textDecoration:"none",color:z.linkColor,opacity:"0.9",borderBottom:"1px solid var(--brand-color)"},"button, select, .clickable":{display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"ease-out 0.2s",_textColor:z.brandColor,color:z.textColor,textDecoration:"none",background:z.buttonBg,padding:"0 calc(var(--spacing) * 1.25)",border:"none",borderRadius:"calc(var(--spacing) * 0.5)"},"button, select, .clickable, input":{lineHeight:"calc(var(--line-height) + var(--spacing))"},"input, textarea":{border:"none",outline:"none",borderRadius:"calc(var(--spacing) * 0.5)",boxShadow:z.inputBorderShadow},input:{padding:"0 calc(var(--spacing) * 1.5)"},"::placeholder":{color:z.placeholderColor},img:{verticalAlign:"middle"},"button:hover, .clickable:hover":{boxShadow:"inset 0 0 0 2px var(--brand-color)"},"button:active, .clickable:active":{background:z.brandColor,color:z.brandTextColor},label:{display:"inline-flex",gap:"calc(var(--spacing) * 0.5)",alignItems:"center"},".elastic":{flex:"1 1 auto",overflow:"hidden",position:"relative"},"svg.tosi-icon, button svg":{fill:"currentColor",pointerEvents:"none"},"[aria-selected]":{background:"#08835820"},":disabled":{opacity:"0.5",filter:"saturate(0)",pointerEvents:"none"},pre:{background:z.codeBg,padding:z.spacing,borderRadius:"calc(var(--spacing) * 0.25)",overflow:"auto",fontSize:z.codeFontSize,lineHeight:"calc(var(--font-size) * 1.2)"},"pre, code":{fontFamily:z.codeFontFamily,_textColor:z.brandColor},".transparent, .iconic":{background:"none"},".iconic":{padding:"0",fontSize:"150%",height:"calc(var(--line-height) + var(--spacing))",lineHeight:"calc(var(--line-height) + var(--spacing))",width:"calc(var(--line-height) + var(--spacing))",textAlign:"center"},".transparent:hover, .iconic:hover":{background:"#0002",boxShadow:"none",color:z.textColor},".transparent:active, .iconic:active":{background:"#0004",boxShadow:"none",color:z.textColor},".current, summary:has(.current)":{background:z.background},".doc-link":{cursor:"pointer",borderBottom:"none",transition:"0.15s ease-out",marginLeft:"10px",padding:"calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5)"},".doc-link:not(.current):hover":{background:z.background},".doc-link:not(.current)":{opacity:"0.8",marginLeft:0},"tosi-example":{margin:"var(--spacing) 0"},"tosi-example [part=editors]":{background:z.insetBg},"[class*='icon-'], tosi-icon":{color:"currentcolor",pointerEvents:"none"},"[class*='icon-']":{verticalAlign:"middle"},table:{borderCollapse:"collapse"},thead:{background:z.brandColor,color:z.brandTextColor},tbody:{background:z.background},"tr:nth-child(2n)":{background:z.backgroundShaded},"th, td":{padding:"calc(var(--spacing) * 0.5) var(--spacing)"},".doc-nav ul, .doc-nav li":{listStyle:"none",margin:0,padding:0},".doc-nav li":{display:"flex",flexDirection:"column"},".doc-nav":{display:"flex",flexDirection:"column"},".doc-nav details > ul":{paddingLeft:z.spacing},".doc-nav summary":{cursor:"pointer",paddingLeft:"calc(var(--spacing) * 0.5)"},".doc-nav summary::marker":{color:z.brandColor},".doc-nav summary > .doc-link":{display:"inline-block",paddingLeft:"calc(var(--spacing) * 0.5)"},".doc-navbar":{listStyle:"none",display:"flex",flexWrap:"wrap",gap:z.spacing,margin:0,padding:z.spacing}}}var{form:Ni,slot:j9,tosiSlot:m7,label:Ji,input:Zi,span:pi}=G;function i2(y,x,h){if(h!==""&&h!==!1)y.setAttribute(x,h);else y.removeAttribute(x)}function vi(y){switch(y.type){case"checkbox":return y.checked;case"radio":{let x=y.parentElement?.querySelector(`input[type="radio"][name="${y.name}"]:checked`);return x?x.value:null}case"range":case"number":return Number(y.value);default:return Array.isArray(y.value)&&y.value.length===0?null:y.value}}function t7(y,x){if(!(y instanceof HTMLElement));else if(y instanceof HTMLInputElement)switch(y.type){case"checkbox":y.checked=x;break;case"radio":y.checked=x===y.value;break;default:y.value=String(x||"")}else if(x!=null||y.value!=null)y.value=String(x||"")}class L4 extends F{static preferredTagName="tosi-field";static lightStyleSpec={':host [part="field"]':{position:"relative",display:"flex",alignItems:"center",gap:P.prefixSuffixGap("8px")},':host [part="field"][prefix]::before':{content:"attr(prefix)"},':host [part="field"][suffix]::after':{content:"attr(suffix)"},':host [part="field"] > *, :host [part="input"] > *':{width:"100%"},":host textarea":{resize:"none"},':host input[type="checkbox"]':{width:"fit-content"},":host .hidden":{position:"absolute",pointerEvents:"none",opacity:0}};static initAttributes={caption:"",key:"",type:"",optional:!1,pattern:"",placeholder:"",min:"",max:"",step:"",fixedPrecision:-1,prefix:"",suffix:""};value=null;content=Ji(m7({part:"caption"}),pi({part:"field"},m7({part:"input",name:"input"}),Zi({part:"valueHolder"})));valueChanged=!1;handleChange=()=>{let{input:y,valueHolder:x}=this.parts,h=y.children[0]||x;if(h!==x)x.value=h.value;this.value=vi(h),this.valueChanged=!0;let C=this.closest("tosi-form");if(C&&this.key!=="")switch(this.type){case"checkbox":C.fields[this.key]=h.checked;break;case"number":case"range":if(this.fixedPrecision>-1)h.value=Number(h.value).toFixed(this.fixedPrecision),C.fields[this.key]=Number(h.value);else C.fields[this.key]=Number(h.value);break;default:C.fields[this.key]=h.value}};connectedCallback(){super.connectedCallback();let{input:y,valueHolder:x}=this.parts;x.addEventListener("change",this.handleChange),y.addEventListener("change",this.handleChange,!0)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{input:y,caption:x,valueHolder:h,field:C}=this.parts;if(x.textContent?.trim()==="")x.append(this.caption!==""?this.caption:this.key);if(this.type==="text"){y.textContent="";let l=G.textarea({value:this.value});if(this.placeholder)l.setAttribute("placeholder",this.placeholder);y.append(l)}else if(this.type==="color")y.textContent="",y.append(B3({value:this.value}));else if(y.children.length===0){if(i2(h,"placeholder",this.placeholder),i2(h,"type",this.type),i2(h,"pattern",this.pattern),i2(h,"min",this.min),i2(h,"max",this.max),this.step)i2(h,"step",this.step);else if(this.fixedPrecision>0&&this.type==="number")i2(h,"step",Math.pow(10,-this.fixedPrecision))}if(t7(h,this.value),t7(y.children[0],this.value),this.prefix)C.setAttribute("prefix",this.prefix);else C.removeAttribute("prefix");if(this.suffix)C.setAttribute("suffix",this.suffix);else C.removeAttribute("suffix");if(h.classList.toggle("hidden",y.children.length>0),y.children.length>0)h.setAttribute("tabindex","-1");else h.removeAttribute("tabindex");y.style.display=y.children.length===0?"none":"",i2(h,"required",!this.optional)}}class r4 extends F{static preferredTagName="tosi-form";context={};value={};get isValid(){return[...this.querySelectorAll("*")].filter((x)=>x.required!==void 0).find((x)=>!x.reportValidity())===void 0}static shadowStyleSpec={":host":{display:"flex",flexDirection:"column"},":host::part(header), :host::part(footer)":{display:"flex"},":host::part(content)":{display:"flex",flexDirection:"column",overflow:"hidden auto",height:"100%",width:"100%",position:"relative",boxSizing:"border-box"},":host form":{display:"flex",flex:"1 1 auto",position:"relative",overflow:"hidden"}};content=[j9({part:"header",name:"header"}),Ni({part:"form"},j9({part:"content"})),j9({part:"footer",name:"footer"})];getField=(y)=>{return this.querySelector(`tosi-field[key="${y}"]`)};get fields(){if(typeof this.value==="string")try{this.value=JSON.parse(this.value)}catch{console.log("<tosi-form> could not use its value, expects valid JSON"),this.value={}}let{getField:y}=this,x=this.dispatchEvent.bind(this);return new Proxy(this.value,{get(h,C){return h[C]},set(h,C,l){if(h[C]!==l){h[C]=l;let i=y(C);if(i)i.value=l;x(new Event("change"))}return!0}})}set fields(y){let x=[...this.querySelectorAll("tosi-field")];for(let h of x)h.value=y[h.key]}submit=()=>{this.parts.form.dispatchEvent(new Event("submit"))};handleSubmit=(y)=>{y.preventDefault(),y.stopPropagation(),this.syncFieldValues();let x=this.fields;this.submitCallback(x,this.isValid)};submitCallback=(y,x)=>{console.log("override submitCallback to handle this data",{value:y,isValid:x})};connectedCallback(){super.connectedCallback();let{form:y}=this.parts;y.addEventListener("submit",this.handleSubmit),this.addEventListener("change",this.handleElementChange,!0),this.initializeNamedElements()}handleElementChange=(y)=>{let x=y.target,h=x.getAttribute("name");if(h&&"value"in x)this.fields[h]=x.value};syncFieldValues(){let y=this.fields,x=this.querySelectorAll("[name], [key]");for(let h of x){let C=h.getAttribute("name")||h.getAttribute("key");if(!C)continue;if(y[C]===void 0){let l=h.value??h.getAttribute("value");if(l!=null)y[C]=l}}}initializeNamedElements(){let y=this.fields,x=this.querySelectorAll("[name], [key]");for(let h of x){let C=h.getAttribute("name")||h.getAttribute("key");if(!C)continue;if(y[C]!==void 0)h.value=y[C]}}}var Ri=L4,Di=r4,o4=L4.elementCreator(),n4=r4.elementCreator(),Hi=o4,bi=n4;var{h2:Si,code:Mi}=G,Ii=/^(#[0-9a-f]{3,8}|(?:rgb|hsl)a?\([^)]*\))$/i;class e7 extends F{static preferredTagName="tosi-css-var-editor";static initAttributes={elementSelector:"",targetSelector:""};content=()=>[Si({part:"title"},"CSS variables"),n4({part:"variables",changeCallback:this.update})];retryTimer;retries=0;loadVars=()=>{let{title:y,variables:x}=this.parts;if(x.textContent="",!this.elementSelector)return;y.textContent=`CSS variables for ${this.elementSelector}`;let h=document.querySelector(this.elementSelector);if(!h){if(this.retries++<40)this.retryTimer=setTimeout(this.loadVars,250);return}let C=h.shadowRoot?h.shadowRoot.querySelector("style"):document.querySelector(`style#${this.elementSelector}-component`);if(!C||!C.textContent)return;let l=getComputedStyle(h),i=[...new Set(C.textContent.match(/--[\w-]+/g)??[])];for(let k of i){let g=l.getPropertyValue(k).trim(),w=Ii.test(g)?"color":"string";if(w==="color")g=X.fromCss(g).html;x.append(o4(Mi(k),{key:k,value:g,type:w}))}};update=()=>{let y=this.targetSelector||this.elementSelector;if(!y)return;let x=[...document.querySelectorAll(y)],{value:h}=this.parts.variables;for(let C of x)for(let l of Object.keys(h))C.style.setProperty(l,h[l])};connectedCallback(){super.connectedCallback(),this.retries=0,this.loadVars(),this.parts.variables.addEventListener("change",this.update)}disconnectedCallback(){if(super.disconnectedCallback(),this.retryTimer)clearTimeout(this.retryTimer)}}var Ez=e7.elementCreator();var{button:ci,div:si}=G,yy="tosi-doc-system-prefs";class V9 extends F{static preferredTagName="tosi-doc-system";static initAttributes={docs:"/docs.json",config:"",localized:"",routing:"",route:"",accent:"",background:"",text:""};context;content=null;corpus;browser;appliedRoute="";suppressed=!1;nestingDepth(){let y=0,x=this.parentNode;while(x){if(x.nodeType===Node.ELEMENT_NODE&&x.tagName==="TOSI-DOC-SYSTEM")y++;x=x.parentNode||x.host||null}return y}prefs;stylesApplied=!1;applyStyles(){if(this.stylesApplied)return;if(this.stylesApplied=!0,!document.querySelector("link[data-tosi-doc-system]"))W1("tosi-doc-system",a7({accent:this.accent||void 0,background:this.background||void 0,text:this.text||void 0}))}applyThemePrefs=()=>{let y=this.prefs.theme.value,x=y==="dark"||y==="system"&&matchMedia("(prefers-color-scheme: dark)").matches,h=this.prefs.highContrast.value;document.body.classList.toggle("darkmode",x),document.body.classList.toggle("high-contrast",h),document.documentElement.classList.toggle("darkmode",x),document.documentElement.classList.toggle("high-contrast",h)};persistPrefs(){try{localStorage.setItem(yy,JSON.stringify({theme:this.prefs.theme.value,highContrast:this.prefs.highContrast.value,locale:this.prefs.locale.value}))}catch{}}initPrefs(){let y={};try{y=JSON.parse(localStorage.getItem(yy)||"{}")}catch{}this.prefs=t({prefs:{theme:y.theme||"system",highContrast:y.highContrast||!1,locale:y.locale||""}}).prefs,this.applyThemePrefs(),matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.applyThemePrefs),this.prefs.theme.observe(()=>{this.applyThemePrefs(),this.persistPrefs()}),this.prefs.highContrast.observe(()=>{this.applyThemePrefs(),this.persistPrefs()}),this.prefs.locale.observe(()=>this.persistPrefs())}async initLocale(){if(!this.localized)return;try{let y=await(await fetch(this.localized)).text();if(G3(y),this.prefs.locale.value)O4(this.prefs.locale.value)}catch(y){console.warn("<tosi-doc-system> could not load localization from",this.localized,y)}}settingsButton(){return ci({class:"iconic",style:{color:z.linkColor},title:"settings",onClick:(y)=>{let x=[],h="";try{h=JSON.parse(this.config||"{}").projectName||""}catch{}let C=h||document.title||"Documentation";x.push({caption:"Print as PDF",icon:"printer",action:()=>{let i=window.open("","_blank");if(!i){window.alert("Allow pop-ups to print the documentation as a book.");return}i.document.open(),i.document.write(u7(this.corpus,{title:C,autoPrint:!0})),i.document.close()}}),x.push({caption:"Download ePub",icon:"book",action:()=>{let i=document.createElement("a");i.href=`/${d4(C)}.epub`,i.download="",i.click()}}),x.push(null);let l=L.localeOptions.value||[];if(l.length>1)x.push({caption:"Language",icon:"globe",menuItems:l.map((i)=>({caption:i.caption,icon:i.icon,checked:()=>i.value===L.locale.value,action:()=>{this.prefs.locale.value=i.value,O4(i.value)}}))});x.push({caption:"Color Theme",icon:"rgb",menuItems:[{caption:"System",checked:()=>this.prefs.theme.value==="system",action:()=>this.prefs.theme.value="system"},{caption:"Dark",checked:()=>this.prefs.theme.value==="dark",action:()=>this.prefs.theme.value="dark"},{caption:"Light",checked:()=>this.prefs.theme.value==="light",action:()=>this.prefs.theme.value="light"},null,{caption:"High Contrast",checked:()=>this.prefs.highContrast.value,action:()=>this.prefs.highContrast.value=!this.prefs.highContrast.value}]}),n({target:y.target,localized:!0,menuItems:x})}},O.moreVertical())}parseLinks(y){let x=this.querySelector(y);if(!x)return[];return[...x.querySelectorAll("a")].map((h)=>({href:h.getAttribute("href")||"",label:(h.textContent||"").trim(),icon:h.dataset.icon||void 0}))}connectedCallback(){if(super.connectedCallback(),this.nestingDepth()>=2){this.suppressed=!0,this.replaceChildren(si({class:"doc-system-nested"},"\uD83D\uDCD6 nested doc-system preview (suppressed)"));return}if(this.applyStyles(),this.initPrefs(),this.initLocale(),this.corpus===void 0){let y=this.docs||"/docs.json";fetch(y).then((x)=>x.json()).then((x)=>{this.corpus=x;let h=e6(location.search,b2(x));if(h){if(h!==location.pathname){location.replace(h+location.hash);return}history.replaceState(null,"",h+location.hash)}this.queueRender()}).catch((x)=>console.error("<tosi-doc-system> could not load docs from",y,x))}}render(){if(super.render(),this.suppressed||this.corpus===void 0)return;if(this.browser!==void 0){let i=this.browser.navigate;if(i&&this.route&&this.route!==this.appliedRoute)this.appliedRoute=this.route,i(this.route);return}let y={};if(this.config)try{y=JSON.parse(this.config)}catch{console.warn("<tosi-doc-system> ignoring invalid config attribute")}let x=this.nestingDepth()>=1,h=x||this.routing==="memory"||this.routing==="internal",C=this.querySelector(".doc-content")||void 0,l=this.parseLinks(".doc-navbar");if(this.appliedRoute=this.route,this.browser=z9({docs:this.corpus,routing:h?"memory":"path",initialRoute:h?this.route||void 0:void 0,onRouteChange:h?(i)=>{this.appliedRoute=i,this.route=i}:void 0,context:this.context||{tosijs:globalThis.xinjs,"tosijs-ui":globalThis.xinjsui},projectName:y.projectName,projectLinks:y.projectLinks,navbarLinks:l.length?l:void 0,contentElement:C}),!x){let i=this.browser.querySelector("header");if(i)i.append(this.settingsButton())}this.replaceChildren(this.browser)}}var Ti=V9.elementCreator();function di(){if(typeof document>"u")return;let y=globalThis.__TOSI_IMPORT_RESOLVER;if(!y)return;import("./tjs-import-resolver-s4z0w296.js").then(({registerImportResolver:x})=>x(y)).catch((x)=>console.warn("import-resolver: registration failed",x))}di();var{div:J1,slot:Li}=G;class Z1 extends F{static preferredTagName="tosi-editable";static initAttributes={rotationSnap:0,positionSnap:0};static angleSize=15;static gridSize=8;static snapAngle=!1;static snapToGrid=!1;static shadowStyleSpec={":host":{"--handle-bg":"#fff4","--handle-color":"#2228","--handle-hover-bg":"#8ff8","--handle-hover-color":"#222","--handle-size":"20px","--handle-padding":"2px"},":host ::slotted(*)":{position:"absolute"},":host > :not(style,slot)":{boxSizing:"border-box",content:'" "',position:"absolute",display:"flex",height:z.handleSize,width:z.handleSize,padding:z.handlePadding,"--text-color":z.handleColor,background:z.handleBg},":host > .drag-size":{top:0,bottom:0,left:0,right:0,height:"auto",width:"auto",background:"transparent",cursor:"ew-resize"},':host > [part="rotate"]':{transform:`translateY(${z.handleSize_50})`},":host > [locked] > svg:first-child, :host > :not([locked]) > svg+svg":{display:"none"},":host .icon-unlock":{opacity:0.5},":host svg":{pointerEvents:"none"},":host > *:hover":{"--text-color":z.handleHoverColor,background:z.handleHoverBg}};static snappedCoords(y,x){let{gridSize:h}=Z1;return Z1.snapToGrid||y.shiftKey?x.map((C)=>Math.round(C/h)*h):x}static snappedAngle(y,x){let{angleSize:h}=Z1;return Z1.snapAngle||y.shiftKey?Math.round(x/h)*h:x}get locked(){let y=this.parentElement;if(y.style.inset)return{left:!0,top:!0,bottom:!0,right:!0};let x=y.style.right.match(/\d/)!==null,h=!x||y.style.left.match(/\d/)!==null,C=y.style.bottom.match(/\d/)!==null,l=!C||y.style.top.match(/\d/)!==null;return{left:h,top:l,bottom:C,right:x}}set locked(y){let{bottom:x,right:h}=y,{left:C,top:l}=y,i=this.parentElement,k=i.offsetLeft,g=i.offsetTop,w=i.offsetWidth,B=i.offsetHeight,q=i.offsetParent.offsetWidth-k-w,j=i.offsetParent.offsetHeight-g-B;if(Object.assign(i.style,{left:"",right:"",top:"",bottom:"",width:"",height:""}),!h)C=!0;if(!x)l=!0;if(C)i.style.left=k+"px";if(h)i.style.right=q+"px";if(C&&h)i.style.width="auto";else i.style.width=w+"px";if(l)i.style.top=g+"px";if(x)i.style.bottom=j+"px";if(l&&x)i.style.height="auto";else i.style.height=B+"px";this.queueRender()}get coords(){let{top:y,left:x,right:h,bottom:C}=this.parentElement.style;return{top:parseFloat(y),left:parseFloat(x),right:parseFloat(h),bottom:parseFloat(C)}}get left(){return this.parentElement.offsetLeft}get width(){return this.parentElement.offsetWidth}get right(){return this.parentElement.offsetParent.offsetWidth-(this.left+this.width)}get top(){return this.parentElement.offsetTop}get height(){return this.parentElement.offsetHeight}get bottom(){return this.parentElement.offsetParent.offsetHeight-(this.top+this.height)}triggerChange=()=>{this.parentElement.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};adjustPosition=(y)=>{let{locked:x}=this;this.locked=x;let h=this.parentElement,{top:C,left:l,bottom:i,right:k}=this.coords;P1(y,(g,w,B)=>{if([g,w]=Z1.snappedCoords(B,[g,w]),!isNaN(C))h.style.top=C+w+"px";if(!isNaN(i))h.style.bottom=i-w+"px";if(!isNaN(l))h.style.left=l+g+"px";if(!isNaN(k))h.style.right=k-g+"px";if(B.type==="mouseup")return this.triggerChange(),!0})};resize=(y)=>{let x=this.parentElement,{locked:h}=this;this.locked=Object.assign({left:!0,top:!0,right:!0,bottom:!0});let[C,l]=[this.right,this.bottom];P1(y,(i,k,g)=>{let w=C-i,B=l-k;if([w,B]=Z1.snappedCoords(g,[w,B]),x.style.right=w+"px",x.style.bottom=B+"px",g.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};adjustSize=(y)=>{let x=this.parentElement,{locked:h}=this,C=y.target.getAttribute("part");this.locked=Object.assign({left:!0,right:!0,top:!0,bottom:!0});let l=this[C];P1(y,(i,k,g)=>{let[w]=Z1.snappedCoords(g,[l+(["left","right"].includes(C)?i:k)*(["right","bottom"].includes(C)?-1:1)]);if(x.style[C]=w+"px",g.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};get rect(){return this.parentElement.getBoundingClientRect()}get center(){let y=this.parentElement.getBoundingClientRect();return{x:y.x+y.width*0.5,y:y.y+y.height*0.5}}get element(){return this.parentElement}adjustRotation=(y)=>{let{center:x}=this,{transformOrigin:h}=this.element.style;if(!h)this.element.style.transformOrigin="50% 50%";P1(y,(C,l,i)=>{let{clientX:k,clientY:g}=i,w=k-x.x,B=g-x.y,q=B>0?90:-90;if(w!==0)q=Math.atan2(B,w)*180/Math.PI;if(q=Z1.snappedAngle(i,q),q===0)this.element.style.transformOrigin="",this.element.style.transform="";else this.element.style.transform=`rotate(${q}deg)`;return this.triggerChange(),i.type==="mouseup"})};toggleLock=(y)=>{let{locked:x}=this,h=y.target.title.split(" ")[1];x[h]=!x[h],this.locked=x,this.queueRender(),y.stopPropagation(),y.preventDefault()};content=()=>[J1({part:"move",style:{top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},O.move()),J1({part:"left",title:"resize left",class:"drag-size",style:{left:"-6px",width:"8px"}}),J1({part:"right",title:"resize right",class:"drag-size",style:{left:"calc(100% - 2px)",width:"8px"}}),J1({part:"top",title:"resize top",class:"drag-size",style:{top:"-6px",height:"8px",cursor:"ns-resize"}}),J1({part:"bottom",title:"resize bottom",class:"drag-size",style:{top:"calc(100% - 2px)",height:"8px",cursor:"ns-resize"}}),J1({part:"resize",style:{top:"100%",left:"100%"}},O.resize()),J1({part:"rotate",style:{top:"50%",right:"0"}},O.refreshCw()),J1({part:"lockLeft",title:"lock left",style:{top:"50%",left:0,transform:"translate(-100%, -50%)"}},O.unlock(),O.lock()),J1({part:"lockRight",title:"lock right",style:{top:"50%",left:"100%",transform:"translate(0%, -50%)"}},O.unlock(),O.lock()),J1({part:"lockTop",title:"lock top",style:{top:0,left:"50%",transform:"translate(-50%, -100%)"}},O.unlock(),O.lock()),J1({part:"lockBottom",title:"lock bottom",style:{top:"100%",left:"50%",transform:"translate(-50%, 0%)"}},O.unlock(),O.lock()),Li()];connectedCallback(){super.connectedCallback();let{left:y,right:x,top:h,bottom:C,lockLeft:l,lockRight:i,lockTop:k,lockBottom:g,move:w,resize:B,rotate:q}=this.parts,j={passive:!0};[y,x,h,C].forEach((_)=>{_.addEventListener("mousedown",this.adjustSize,j),_.addEventListener("touchstart",this.adjustSize,j)}),[l,i,k,g].forEach((_)=>{_.addEventListener("click",this.toggleLock)}),B.addEventListener("mousedown",this.resize,j),w.addEventListener("mousedown",this.adjustPosition,j),q.addEventListener("mousedown",this.adjustRotation,j),B.addEventListener("touchstart",this.resize,j),w.addEventListener("touchstart",this.adjustPosition,j),q.addEventListener("touchstart",this.adjustRotation,j)}render(){if(super.render(),!this.parentElement)return;let{lockLeft:y,lockRight:x,lockTop:h,lockBottom:C}=this.parts,{left:l,right:i,top:k,bottom:g}=this.locked;y.toggleAttribute("locked",l),x.toggleAttribute("locked",i),h.toggleAttribute("locked",k),C.toggleAttribute("locked",g)}}var ri=Z1.elementCreator();var{div:oi,input:ni,button:P9,span:fi}=G,xy=(y)=>y,hy="null filter, everything matches",_9={contains:{caption:"contains",negative:"does not contain",makeTest:(y)=>{return y=y.toLocaleLowerCase(),(x)=>String(x).toLocaleLowerCase().includes(y)}},hasTags:{caption:"has tags",makeTest:(y)=>{let x=y.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&x.find((C)=>!h.includes(C))===void 0}},doesNotHaveTags:{caption:"does not have tags",makeTest:(y)=>{let x=y.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&x.find((C)=>h.includes(C))===void 0}},equals:{caption:"=",negative:"≠",makeTest:(y)=>{if(isNaN(Number(y)))return y=String(y).toLocaleLowerCase(),(h)=>String(h).toLocaleLowerCase()===y;let x=Number(y);return(h)=>Number(h)===x}},after:{caption:"is after",negative:"is before",makeTest:(y)=>{let x=new Date(y);return(h)=>new Date(h)>x}},greaterThan:{caption:">",negative:"≤",makeTest:(y)=>{if(!isNaN(Number(y))){let x=Number(y);return(h)=>Number(h)>x}return y=y.toLocaleLowerCase(),(x)=>String(x).toLocaleLowerCase()>y}},truthy:{caption:"is true/non-empty/non-zero",negative:"is false/empty/zero",needsValue:!1,makeTest:()=>(y)=>!!y},isTrue:{caption:"= true",needsValue:!1,makeTest:()=>(y)=>y===!0},isFalse:{caption:"= false",needsValue:!1,makeTest:()=>(y)=>y===!1}},ui={description:"anything",test:()=>!0};function Cy(y){return y.options[y.selectedIndex]?.caption||""}class A9 extends F{static preferredTagName="tosi-filter-part";static lightStyleSpec={":host":{display:"flex"},":host .tosi-icon:":{verticalAlign:"middle",pointerEvents:"none"},':host [part="haystack"], :host [part="condition"]':{flex:"1"},':host [part="needle"]':{flex:2},':host [hidden]+[part="padding"]':{display:"block",content:" ",flex:"1 1 auto"}};static initAttributes={haystack:"*",condition:"contains",needle:""};fields=[];filters=_9;content=()=>[F1({part:"haystack"}),F1({part:"condition"}),ni({part:"needle",type:"search"}),fi({part:"padding"}),P9({part:"remove",title:"delete"},O.trash())];filter=ui;get state(){let{haystack:y,needle:x,condition:h}=this.parts;return{haystack:y.value,needle:x.value,condition:h.value}}set state(y){Object.assign(this,y)}buildFilter=()=>{let{haystack:y,condition:x,needle:h}=this.parts,C=x.value.startsWith("~"),l=C?x.value.slice(1):x.value,i=this.filters[l];h.hidden=i.needsValue===!1;let k=i.needsValue===!1?i.makeTest(void 0):i.makeTest(h.value),g=y.value,w;if(g!=="*")w=C?(j)=>!k(j[g]):(j)=>k(j[g]);else w=C?(j)=>Object.values(j).find((_)=>!k(_))!==void 0:(j)=>Object.values(j).find((_)=>k(_))!==void 0;let B=i.needsValue!==!1?` "${h.value}"`:"",q=`${Cy(y)} ${Cy(x)}${B}`;this.filter={description:q,test:w},this.parentElement?.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{haystack:y,condition:x,needle:h,remove:C}=this.parts;y.addEventListener("change",this.buildFilter),x.addEventListener("change",this.buildFilter),h.addEventListener("input",this.buildFilter),y.value=this.haystack,x.value=this.condition,h.value=this.needle,C.addEventListener("click",()=>{let{parentElement:l}=this;this.remove(),l?.dispatchEvent(new Event("change"))})}render(){super.render();let{haystack:y,condition:x,needle:h}=this.parts;if(y.options=[{caption:"any field",value:"*"},...this.fields.map((C)=>C.prop)],x.options=Object.keys(this.filters).map((C)=>{let l=this.filters[C];return l.negative!==void 0?[{caption:l.caption,value:C},{caption:l.negative,value:"~"+C}]:{caption:l.caption,value:C}}).flat(),this.haystack!=="")y.value=this.haystack;if(this.condition!=="")x.value=this.condition;if(this.needle!=="")h.value=this.needle;this.buildFilter()}}var f4=A9.elementCreator();class K9 extends F{static preferredTagName="tosi-filter";static lightStyleSpec={":host":{height:"auto",display:"grid",gridTemplateColumns:"32px calc(100% - 64px) 32px",alignItems:"center"},':host [part="filterContainer"]':{display:"flex",flexDirection:"column",alignItems:"stretch",flex:"1 1 auto"},':host [part="haystack"]':{_fieldWidth:"100px"},':host [part="condition"]':{_fieldWidth:"60px"},':host [part="needle"]':{_fieldWidth:"80px"},':host [part="add"], :host [part="reset"]':{"--button-size":"var(--touch-size, 32px)",borderRadius:"999px",height:"var(--button-size)",lineHeight:"var(--button-size)",margin:"0",padding:"0",textAlign:"center",width:"var(--button-size)",flex:"0 0 var(--button-size)"}};_fields=[];get fields(){return this._fields}set fields(y){this._fields=y,this.queueRender()}get state(){let{filterContainer:y}=this.parts;return[...y.children].map((x)=>x.state)}set state(y){let{fields:x,filters:h}=this,{filterContainer:C}=this.parts;C.textContent="";for(let l of y)C.append(f4({fields:x,filters:h,...l}))}filter=xy;description=hy;addFilter=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;h.append(f4({fields:y,filters:x}))};content=()=>[P9({part:"add",title:"add filter condition",onClick:this.addFilter,class:"round"},O.plus()),oi({part:"filterContainer"}),P9({part:"reset",title:"reset filter",onClick:this.reset},O.x())];filters=_9;reset=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;this.description=hy,this.filter=xy,h.textContent="",h.append(f4({fields:y,filters:x})),this.dispatchEvent(new Event("change"))};buildFilter=()=>{let{filterContainer:y}=this.parts;if(y.children.length===0){this.reset();return}let x=[...y.children].map((C)=>C.filter),h=x.map((C)=>C.test);this.description=x.map((C)=>C.description).join(", "),this.filter=(C)=>C.filter((l)=>h.find((i)=>i(l)===!1)===void 0),this.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{filterContainer:y}=this.parts;y.addEventListener("change",this.buildFilter),this.reset()}render(){super.render()}}var Ei=K9.elementCreator();var{a:ai}=G;class U9 extends F{static preferredTagName="tosi-header";static shadowStyleSpec={":host":{display:"flex",alignItems:"center",padding:P.tosiHeaderPadding("12px 24px"),background:P.tosiHeaderBg("var(--tosi-accent, #EE257B)"),lineHeight:P.tosiHeaderLineHeight("32px"),gap:P.tosiHeaderGap("8px")},"::slotted(*)":{display:"inline-flex",alignItems:"center"}};content=({slot:y})=>[y()]}var mi=U9.elementCreator(),ly={tosijs:()=>O.tosi(),discord:()=>O.discord(),blog:()=>O.blog(),github:()=>O.github(),npm:()=>O.npm()};class G9 extends F{static preferredTagName="tosi-header-links";static lightStyleSpec={":host":{display:"inline-flex",alignItems:"center",gap:"4px"},":host a":{color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",padding:"4px",opacity:"0.8",cursor:"pointer"},":host a:hover":{opacity:"1"}};links={};content=null;render(){super.render();let y=[];for(let[x,h]of Object.entries(this.links)){if(!h||!ly[x])continue;y.push(ai({title:x,target:"_blank",href:h},ly[x]()))}this.replaceChildren(...y)}}var ti=G9.elementCreator();function iy(){return navigator.getGamepads().filter((x)=>x!==null).map((x)=>{let{id:h,axes:C,buttons:l}=x;return{id:h,axes:C,buttons:l.map((i,k)=>{let{pressed:g,value:w}=i;return{index:k,pressed:g,value:w}}).filter((i)=>i.pressed||i.value!==0).reduce((i,k)=>{return i[k.index]=k.value,i},{})}})}function ei(){let y=iy();return y.length===0?"no active gamepads":y.map(({id:x,axes:h,buttons:C})=>{let l=h.map((k)=>k.toFixed(2)).join(" "),i=Object.keys(C).map((k)=>`[${k}](${C[Number(k)].toFixed(2)})`).join(" ");return`${x}
|
|
204
|
-
${
|
|
205
|
-
${
|
|
206
|
-
`)}function
|
|
203
|
+
</html>`}var e7=200,IB=600;function bB(y={}){let x=Y.fromCss(y.accent??"#EE257B");return{_textColor:y.text??"#222",_brandColor:x,_background:y.background??"#fafafa",_buttonBg:y.buttonBg??"#fdfdfd",_inputBg:y.inputBg??"#fdfdfd",_backgroundShaded:"#f5f5f5",_navBg:x.rotate(30).desaturate(0.5).brighten(0.9),_barColor:x.opacity(0.4),_focusColor:x.opacity(0.7),_placeholderColor:x.opacity(0.4),_brandTextColor:x.rotate(30).brighten(0.9),_insetBg:x.rotate(45).brighten(0.8),_codeBg:y.codeBg??"#fdfdfd",_linkColor:x.rotate(-30).darken(0.5),_shadowColor:"#0004",_menuBg:"#fafafa",_menuItemActiveColor:"#000",_menuItemIconActiveColor:"#000",_menuItemActiveBg:"#aaa",_menuItemHoverBg:"#eee",_menuItemColor:"#222",_menuSeparatorColor:"#2224",_menuShadow:"0 4px 8px #0004",_scrollThumbColor:"#0006",_scrollBarColor:"#0001",_inputBorderShadow:"inset 0 0 2px #0006"}}function yy(y={}){let x=bB(y),h=Y.fromCss(y.accent??"#EE257B");return{"@import":"https://fonts.googleapis.com/css2?family=Aleo:ital,wght@0,100..900;1,100..900&famiSpline+Sans+Mono:ital,wght@0,300..700;1,300..700&display=swap",":root":{_fontFamily:"'Aleo', sans-serif",_codeFontFamily:"'Spline Sans Mono', monospace",_fontSize:"16px",_codeFontSize:"14px",...x,_tosiAccent:l.brandColor,_tosiBg:l.background,_tosiText:l.textColor,_tosiBgInset:l.insetBg,_spacing:"10px",_lineHeight:"calc(var(--font-size) * 1.6)",_h1Scale:"2",_h2Scale:"1.5",_h3Scale:"1.25",_touchSize:"32px",_headerHeight:"calc( var(--line-height) * var(--h2-scale) + var(--spacing) * 2 )",_docContentMaxWidth:"44em"},".darkmode":{...w0(x),_shadowColor:h.opacity(0.5),_menuShadow:`0 0 0 2px ${h.opacity(0.75)}`,_menuSeparatorColor:h.opacity(0.5)},".high-contrast":{filter:"contrast(2)"},"*":{boxSizing:"border-box",scrollbarColor:`${l.scrollThumbColor} ${l.scrollBarColor}`,scrollbarWidth:"thin"},body:{fontFamily:l.fontFamily,fontSize:l.fontSize,margin:"0",lineHeight:l.lineHeight,background:l.background,_tosiTabsSelectedColor:l.brandColor,_tosiTabsBarColor:l.brandTextColor,_menuItemIconColor:l.brandColor,color:l.textColor},"tosi-doc-system":{display:"block"},"tosi-doc-system tosi-sidenav::part(nav)":{background:l.navBg},"tosi-doc-system:not(:defined)":{display:"block",position:"fixed",inset:`${l.headerHeight} 0 0 0`,overflow:"auto"},"tosi-doc-system:not(:defined)::before":{content:'""',position:"fixed",top:"0",left:"0",right:"0",height:l.headerHeight,background:l.brandColor},"tosi-doc-system:not(:defined) .doc-content":{display:"block",maxWidth:l.docContentMaxWidth,margin:"auto",padding:"0 1em",overflow:"hidden"},"tosi-doc-system:not(:defined) .doc-navbar":{display:"none"},"tosi-doc-system:not(:defined) pre:has(> code.language-test)":{display:"none"},"tosi-doc-system:not(:defined) .doc-nav":{display:"none"},[`@media (min-width: ${IB}px)`]:{"tosi-doc-system:not(:defined)":{left:`${e7}px`},"tosi-doc-system:not(:defined) .doc-nav":{display:"block",position:"fixed",left:"0",top:l.headerHeight,bottom:"0",width:`${e7}px`,overflow:"auto",background:l.navBg,padding:"0"},"tosi-doc-system:not(:defined) .doc-nav summary":{cursor:"pointer"}},".center":{display:"flex",alignItems:"center",justifyContent:"center"},"input, button, select, textarea":{fontFamily:l.fontFamily,fontSize:l.fontSize,color:"currentColor",background:l.inputBg},select:{WebkitAppearance:"none",appearance:"none"},header:{background:l.brandColor,color:l.brandTextColor,_textColor:l.brandTextColor,_linkColor:l.brandTextColor,display:"flex",alignItems:"center",padding:"0 var(--spacing)",lineHeight:"calc(var(--line-height) * var(--h1-scale))",height:l.headerHeight,whiteSpace:"nowrap"},h1:{color:l.brandColor,fontSize:"calc(var(--font-size) * var(--h1-scale))",lineHeight:"calc(var(--line-height) * var(--h1-scale))",fontWeight:"400",borderBottom:`4px solid ${l.barColor}`,margin:`${l.spacing} 0 ${l.spacing200}`,padding:0},"header h2":{color:l.brandTextColor,whiteSpace:"nowrap"},h2:{color:l.brandColor,fontSize:"calc(var(--font-size) * var(--h2-scale))",lineHeight:"calc(var(--line-height) * var(--h2-scale))",margin:"calc(var(--spacing) * var(--h2-scale)) 0"},h3:{fontSize:"calc(var(--font-size) * var(--h3-scale))",lineHeight:"calc(var(--line-height) * var(--h3-scale))",margin:"calc(var(--spacing) * var(--h3-scale)) 0"},"input[type=search]":{borderRadius:99},blockquote:{position:"relative",background:l.insetBg,margin:"0 48px 56px 0",borderRadius:l.spacing,padding:"var(--spacing) calc(var(--spacing) * 2)",filter:`drop-shadow(0px 1px 1px ${l.shadowColor})`},"blockquote > :first-child":{marginTop:"0"},"blockquote > :last-child":{marginBottom:"0"},"blockquote::before":{content:'" "',display:"block",width:1,height:1,border:"10px solid transparent",borderTopColor:l.insetBg,borderRightColor:l.insetBg,position:"absolute",bottom:-20,right:24},"blockquote::after":{content:'" "',width:48,height:48,display:"block",bottom:-48,right:-24,position:"absolute",background:z0(Q.tosi(),void 0,void 0,2)},a:{textDecoration:"none",color:l.linkColor,opacity:"0.9",borderBottom:"1px solid var(--brand-color)"},"button, select, .clickable":{display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"ease-out 0.2s",_textColor:l.brandColor,color:l.textColor,textDecoration:"none",background:l.buttonBg,padding:"0 calc(var(--spacing) * 1.25)",border:"none",borderRadius:"calc(var(--spacing) * 0.5)"},"button, select, .clickable, input":{lineHeight:"calc(var(--line-height) + var(--spacing))"},"input, textarea":{border:"none",outline:"none",borderRadius:"calc(var(--spacing) * 0.5)",boxShadow:l.inputBorderShadow},input:{padding:"0 calc(var(--spacing) * 1.5)"},"::placeholder":{color:l.placeholderColor},img:{verticalAlign:"middle"},"button:hover, .clickable:hover":{boxShadow:"inset 0 0 0 2px var(--brand-color)"},"button:active, .clickable:active":{background:l.brandColor,color:l.brandTextColor},label:{display:"inline-flex",gap:"calc(var(--spacing) * 0.5)",alignItems:"center"},".elastic":{flex:"1 1 auto",overflow:"hidden",position:"relative"},"svg.tosi-icon, button svg":{fill:"currentColor",pointerEvents:"none"},"[aria-selected]":{background:"#08835820"},":disabled":{opacity:"0.5",filter:"saturate(0)",pointerEvents:"none"},pre:{background:l.codeBg,padding:l.spacing,borderRadius:"calc(var(--spacing) * 0.25)",overflow:"auto",fontSize:l.codeFontSize,lineHeight:"calc(var(--font-size) * 1.2)"},"pre, code":{fontFamily:l.codeFontFamily,_textColor:l.brandColor},".transparent, .iconic":{background:"none"},".iconic":{padding:"0",fontSize:"150%",height:"calc(var(--line-height) + var(--spacing))",lineHeight:"calc(var(--line-height) + var(--spacing))",width:"calc(var(--line-height) + var(--spacing))",textAlign:"center"},".transparent:hover, .iconic:hover":{background:"#0002",boxShadow:"none",color:l.textColor},".transparent:active, .iconic:active":{background:"#0004",boxShadow:"none",color:l.textColor},".current, summary:has(.current)":{background:l.background},".doc-link":{cursor:"pointer",borderBottom:"none",transition:"0.15s ease-out",marginLeft:"10px",padding:"calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5)"},".doc-link:not(.current):hover":{background:l.background},".doc-link:not(.current)":{opacity:"0.8",marginLeft:0},"tosi-example":{margin:"var(--spacing) 0"},"tosi-example [part=editors]":{background:l.insetBg},"[class*='icon-'], tosi-icon":{color:"currentcolor",pointerEvents:"none"},"[class*='icon-']":{verticalAlign:"middle"},table:{borderCollapse:"collapse"},thead:{background:l.brandColor,color:l.brandTextColor},tbody:{background:l.background},"tr:nth-child(2n)":{background:l.backgroundShaded},"th, td":{padding:"calc(var(--spacing) * 0.5) var(--spacing)"},".doc-nav ul, .doc-nav li":{listStyle:"none",margin:0,padding:0},".doc-nav li":{display:"flex",flexDirection:"column"},".doc-nav":{display:"flex",flexDirection:"column"},".doc-nav details > ul":{paddingLeft:l.spacing},".doc-nav details:not([open]) > ul":{display:"none"},".doc-nav summary":{cursor:"pointer",paddingLeft:"calc(var(--spacing) * 0.5)"},".doc-nav summary::marker":{color:l.brandColor},".doc-nav summary > .doc-link":{display:"inline-block",paddingLeft:"calc(var(--spacing) * 0.5)"},".doc-navbar":{listStyle:"none",display:"flex",flexWrap:"wrap",gap:l.spacing,margin:0,padding:l.spacing}}}var{form:TB,slot:K9,tosiSlot:xy,label:pB,input:LB,span:cB}=U;function w2(y,x,h){if(h!==""&&h!==!1)y.setAttribute(x,h);else y.removeAttribute(x)}function dB(y){switch(y.type){case"checkbox":return y.checked;case"radio":{let x=y.parentElement?.querySelector(`input[type="radio"][name="${y.name}"]:checked`);return x?x.value:null}case"range":case"number":return Number(y.value);default:return Array.isArray(y.value)&&y.value.length===0?null:y.value}}function hy(y,x){if(!(y instanceof HTMLElement));else if(y instanceof HTMLInputElement)switch(y.type){case"checkbox":if(y.checked!==Boolean(x))y.checked=x;break;case"radio":{let h=x===y.value;if(y.checked!==h)y.checked=h;break}default:{let h=String(x||"");if(y.value!==h)y.value=h}}else if(x!=null||y.value!=null){let h=String(x||"");if(y.value!==h)y.value=h}}class s4 extends ${static preferredTagName="tosi-field";static lightStyleSpec={':host [part="field"]':{position:"relative",display:"flex",alignItems:"center",gap:_.prefixSuffixGap("8px")},':host [part="field"][prefix]::before':{content:"attr(prefix)"},':host [part="field"][suffix]::after':{content:"attr(suffix)"},':host [part="field"] > *, :host [part="input"] > *':{width:"100%"},":host textarea":{resize:"none"},':host input[type="checkbox"]':{width:"fit-content"},":host .hidden":{position:"absolute",pointerEvents:"none",opacity:0}};static initAttributes={caption:"",key:"",type:"",optional:!1,pattern:"",placeholder:"",min:"",max:"",step:"",fixedPrecision:-1,prefix:"",suffix:""};value=null;content=pB(xy({part:"caption"}),cB({part:"field"},xy({part:"input",name:"input"}),LB({part:"valueHolder"})));handleChange=()=>{let{input:y,valueHolder:x}=this.parts,h=y.children[0]||x;if(h!==x)x.value=h.value;this.value=dB(h);let C=this.closest("tosi-form");if(C&&this.key!=="")switch(this.type){case"checkbox":C.fields[this.key]=h.checked;break;case"number":case"range":if(this.fixedPrecision>-1)h.value=Number(h.value).toFixed(this.fixedPrecision),C.fields[this.key]=Number(h.value);else C.fields[this.key]=Number(h.value);break;default:C.fields[this.key]=h.value}};connectedCallback(){super.connectedCallback();let{input:y,valueHolder:x}=this.parts;x.addEventListener("change",this.handleChange),y.addEventListener("change",this.handleChange,!0)}render(){let{input:y,caption:x,valueHolder:h,field:C}=this.parts;if(x.textContent?.trim()==="")x.append(this.caption!==""?this.caption:this.key);if(this.type==="text"){let k=y.children[0];if(!(k instanceof HTMLTextAreaElement))y.textContent="",k=U.textarea({value:this.value}),y.append(k);if(this.placeholder)k.setAttribute("placeholder",this.placeholder)}else if(this.type==="color"){if(!y.children[0]?.matches("tosi-color"))y.textContent="",y.append(j3({value:this.value}))}else if(y.children.length===0){if(w2(h,"placeholder",this.placeholder),w2(h,"type",this.type),w2(h,"pattern",this.pattern),w2(h,"min",this.min),w2(h,"max",this.max),this.step)w2(h,"step",this.step);else if(this.fixedPrecision>0&&this.type==="number")w2(h,"step",Math.pow(10,-this.fixedPrecision))}if(hy(h,this.value),hy(y.children[0],this.value),this.prefix)C.setAttribute("prefix",this.prefix);else C.removeAttribute("prefix");if(this.suffix)C.setAttribute("suffix",this.suffix);else C.removeAttribute("suffix");if(h.classList.toggle("hidden",y.children.length>0),y.children.length>0)h.setAttribute("tabindex","-1");else h.removeAttribute("tabindex");y.style.display=y.children.length===0?"none":"",w2(h,"required",!this.optional)}}class u4 extends ${static preferredTagName="tosi-form";context={};value={};get isValid(){return[...this.querySelectorAll("*")].filter((x)=>x.required!==void 0).find((x)=>!x.reportValidity())===void 0}static shadowStyleSpec={":host":{display:"flex",flexDirection:"column"},":host::part(header), :host::part(footer)":{display:"flex"},":host::part(content)":{display:"flex",flexDirection:"column",overflow:"hidden auto",height:"100%",width:"100%",position:"relative",boxSizing:"border-box"},":host form":{display:"flex",flex:"1 1 auto",position:"relative",overflow:"hidden"}};content=[K9({part:"header",name:"header"}),TB({part:"form"},K9({part:"content"})),K9({part:"footer",name:"footer"})];getField=(y)=>{return this.querySelector(`tosi-field[key="${y}"]`)};get fields(){if(typeof this.value==="string")try{this.value=JSON.parse(this.value)}catch{console.log("<tosi-form> could not use its value, expects valid JSON"),this.value={}}let{getField:y}=this,x=this.dispatchEvent.bind(this);return new Proxy(this.value,{get(h,C){return h[C]},set(h,C,k){if(h[C]!==k){h[C]=k;let B=y(C);if(B)B.value=k;x(new Event("change"))}return!0}})}set fields(y){let x=[...this.querySelectorAll("tosi-field")];for(let h of x)h.value=y[h.key]}submit=()=>{this.parts.form.dispatchEvent(new Event("submit"))};handleSubmit=(y)=>{y.preventDefault(),y.stopPropagation(),this.syncFieldValues();let x=this.fields;this.submitCallback(x,this.isValid)};submitCallback=(y,x)=>{console.log("override submitCallback to handle this data",{value:y,isValid:x})};connectedCallback(){super.connectedCallback();let{form:y}=this.parts;y.addEventListener("submit",this.handleSubmit),this.addEventListener("change",this.handleElementChange,!0),this.initializeNamedElements()}handleElementChange=(y)=>{let x=y.target,h=x.getAttribute("name");if(h&&"value"in x)this.fields[h]=x.value};syncFieldValues(){let y=this.fields,x=this.querySelectorAll("[name], [key]");for(let h of x){let C=h.getAttribute("name")||h.getAttribute("key");if(!C)continue;if(y[C]===void 0){let k=h.value??h.getAttribute("value");if(k!=null)y[C]=k}}}initializeNamedElements(){let y=this.fields,x=this.querySelectorAll("[name], [key]");for(let h of x){let C=h.getAttribute("name")||h.getAttribute("key");if(!C)continue;if(y[C]!==void 0)h.value=y[C]}}}var fB=s4,sB=u4,r4=s4.elementCreator(),m4=u4.elementCreator(),uB=r4,rB=m4;var{h2:mB,code:nB}=U,EB=/^(#[0-9a-f]{3,8}|(?:rgb|hsl)a?\([^)]*\))$/i;class Cy extends ${static preferredTagName="tosi-css-var-editor";static initAttributes={elementSelector:"",targetSelector:""};content=()=>[mB({part:"title"},"CSS variables"),m4({part:"variables",changeCallback:this.update})];retryTimer;retries=0;loadVars=()=>{let{title:y,variables:x}=this.parts;if(x.textContent="",!this.elementSelector)return;y.textContent=`CSS variables for ${this.elementSelector}`;let h=document.querySelector(this.elementSelector);if(!h){if(this.retries++<40)this.retryTimer=setTimeout(this.loadVars,250);return}let C=h.shadowRoot?h.shadowRoot.querySelector("style"):document.querySelector(`style#${this.elementSelector}-component`);if(!C||!C.textContent)return;let k=getComputedStyle(h),B=[...new Set(C.textContent.match(/--[\w-]+/g)??[])];for(let w of B){let g=k.getPropertyValue(w).trim(),z=EB.test(g)?"color":"string";if(z==="color")g=Y.fromCss(g).html;x.append(r4(nB(w),{key:w,value:g,type:z}))}};update=()=>{let y=this.targetSelector||this.elementSelector;if(!y)return;let x=[...document.querySelectorAll(y)],{value:h}=this.parts.variables;for(let C of x)for(let k of Object.keys(h))C.style.setProperty(k,h[k])};connectedCallback(){super.connectedCallback(),this.retries=0,this.loadVars(),this.parts.variables.addEventListener("change",this.update)}disconnectedCallback(){if(super.disconnectedCallback(),this.retryTimer)clearTimeout(this.retryTimer)}}var _j=Cy.elementCreator();var{button:oB,div:aB}=U,ky="tosi-doc-system-prefs";class P9 extends ${static preferredTagName="tosi-doc-system";static initAttributes={docs:"/docs.json",config:"",localized:"",routing:"",route:"",accent:"",background:"",text:""};context;content=null;corpus;browser;appliedRoute="";suppressed=!1;nestingDepth(){let y=0,x=this.parentNode;while(x){if(x.nodeType===Node.ELEMENT_NODE&&x.tagName==="TOSI-DOC-SYSTEM")y++;x=x.parentNode||x.host||null}return y}prefs;stylesApplied=!1;applyStyles(){if(this.stylesApplied)return;if(this.stylesApplied=!0,!document.querySelector("link[data-tosi-doc-system]"))O1("tosi-doc-system",yy({accent:this.accent||void 0,background:this.background||void 0,text:this.text||void 0}))}applyThemePrefs=()=>{let y=this.prefs.theme.value,x=y==="dark"||y==="system"&&matchMedia("(prefers-color-scheme: dark)").matches,h=this.prefs.highContrast.value;document.body.classList.toggle("darkmode",x),document.body.classList.toggle("high-contrast",h),document.documentElement.classList.toggle("darkmode",x),document.documentElement.classList.toggle("high-contrast",h)};persistPrefs(){try{localStorage.setItem(ky,JSON.stringify({theme:this.prefs.theme.value,highContrast:this.prefs.highContrast.value,locale:this.prefs.locale.value}))}catch{}}initPrefs(){let y={};try{y=JSON.parse(localStorage.getItem(ky)||"{}")}catch{}this.prefs=t({prefs:{theme:y.theme||"system",highContrast:y.highContrast||!1,locale:y.locale||""}}).prefs,this.applyThemePrefs(),matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.applyThemePrefs),this.prefs.theme.observe(()=>{this.applyThemePrefs(),this.persistPrefs()}),this.prefs.highContrast.observe(()=>{this.applyThemePrefs(),this.persistPrefs()}),this.prefs.locale.observe(()=>this.persistPrefs())}async initLocale(){if(!this.localized)return;try{let y=await(await fetch(this.localized)).text();if($3(y),this.prefs.locale.value)O4(this.prefs.locale.value)}catch(y){console.warn("<tosi-doc-system> could not load localization from",this.localized,y)}}settingsButton(){return oB({class:"iconic",style:{color:l.linkColor},title:"settings",onClick:(y)=>{let x=[],h="";try{h=JSON.parse(this.config||"{}").projectName||""}catch{}let C=h||document.title||"Documentation";x.push({caption:"Print as PDF",icon:"printer",action:()=>{let B=window.open("","_blank");if(!B){window.alert("Allow pop-ups to print the documentation as a book.");return}B.document.open(),B.document.write(t7(this.corpus,{title:C,autoPrint:!0})),B.document.close()}}),x.push({caption:"Download ePub",icon:"book",action:()=>{let B=document.createElement("a");B.href=`/${f4(C)}.epub`,B.download="",B.click()}}),x.push(null);let k=f.localeOptions.value||[];if(k.length>1)x.push({caption:"Language",icon:"globe",menuItems:k.map((B)=>({caption:B.caption,icon:B.icon,checked:()=>B.value===f.locale.value,action:()=>{this.prefs.locale.value=B.value,O4(B.value)}}))});x.push({caption:"Color Theme",icon:"rgb",menuItems:[{caption:"System",checked:()=>this.prefs.theme.value==="system",action:()=>this.prefs.theme.value="system"},{caption:"Dark",checked:()=>this.prefs.theme.value==="dark",action:()=>this.prefs.theme.value="dark"},{caption:"Light",checked:()=>this.prefs.theme.value==="light",action:()=>this.prefs.theme.value="light"},null,{caption:"High Contrast",checked:()=>this.prefs.highContrast.value,action:()=>this.prefs.highContrast.value=!this.prefs.highContrast.value}]}),r({target:y.target,localized:!0,menuItems:x})}},Q.moreVertical())}parseLinks(y){let x=this.querySelector(y);if(!x)return[];return[...x.querySelectorAll("a")].map((h)=>({href:h.getAttribute("href")||"",label:(h.textContent||"").trim(),icon:h.dataset.icon||void 0}))}connectedCallback(){if(super.connectedCallback(),this.nestingDepth()>=2){this.suppressed=!0,this.replaceChildren(aB({class:"doc-system-nested"},"\uD83D\uDCD6 nested doc-system preview (suppressed)"));return}if(this.applyStyles(),this.initPrefs(),this.initLocale(),this.corpus===void 0){let y=this.docs||"/docs.json";fetch(y).then((x)=>x.json()).then((x)=>{this.corpus=x;let h=h7(location.search,b2(x));if(h){if(h!==location.pathname){location.replace(h+location.hash);return}history.replaceState(null,"",h+location.hash)}this.queueRender()}).catch((x)=>console.error("<tosi-doc-system> could not load docs from",y,x))}}render(){if(super.render(),this.suppressed||this.corpus===void 0)return;if(this.browser!==void 0){let B=this.browser.navigate;if(B&&this.route&&this.route!==this.appliedRoute)this.appliedRoute=this.route,B(this.route);return}let y={};if(this.config)try{y=JSON.parse(this.config)}catch{console.warn("<tosi-doc-system> ignoring invalid config attribute")}let x=this.nestingDepth()>=1,h=x||this.routing==="memory"||this.routing==="internal",C=this.querySelector(".doc-content")||void 0,k=this.parseLinks(".doc-navbar");if(this.appliedRoute=this.route,this.browser=_9({docs:this.corpus,routing:h?"memory":"path",initialRoute:h?this.route||void 0:void 0,onRouteChange:h?(B)=>{this.appliedRoute=B,this.route=B}:void 0,context:this.context||{tosijs:globalThis.xinjs,"tosijs-ui":globalThis.xinjsui},projectName:y.projectName,projectLinks:y.projectLinks,navbarLinks:k.length?k:void 0,contentElement:C}),!x){let B=this.browser.querySelector("header");if(B)B.append(this.settingsButton())}this.replaceChildren(this.browser)}}var tB=P9.elementCreator();function eB(){if(typeof document>"u")return;let y=globalThis.__TOSI_IMPORT_RESOLVER;if(!y)return;import("./tjs-import-resolver-s4z0w296.js").then(({registerImportResolver:x})=>x(y)).catch((x)=>console.warn("import-resolver: registration failed",x))}eB();var{div:J1,slot:yw}=U;class Z1 extends ${static preferredTagName="tosi-editable";static initAttributes={rotationSnap:0,positionSnap:0};static angleSize=15;static gridSize=8;static snapAngle=!1;static snapToGrid=!1;static shadowStyleSpec={":host":{"--handle-bg":"#fff4","--handle-color":"#2228","--handle-hover-bg":"#8ff8","--handle-hover-color":"#222","--handle-size":"20px","--handle-padding":"2px"},":host ::slotted(*)":{position:"absolute"},":host > :not(style,slot)":{boxSizing:"border-box",content:'" "',position:"absolute",display:"flex",height:l.handleSize,width:l.handleSize,padding:l.handlePadding,"--text-color":l.handleColor,background:l.handleBg},":host > .drag-size":{top:0,bottom:0,left:0,right:0,height:"auto",width:"auto",background:"transparent",cursor:"ew-resize"},':host > [part="rotate"]':{transform:`translateY(${l.handleSize_50})`},":host > [locked] > svg:first-child, :host > :not([locked]) > svg+svg":{display:"none"},":host .icon-unlock":{opacity:0.5},":host svg":{pointerEvents:"none"},":host > *:hover":{"--text-color":l.handleHoverColor,background:l.handleHoverBg}};static snappedCoords(y,x){let{gridSize:h}=Z1;return Z1.snapToGrid||y.shiftKey?x.map((C)=>Math.round(C/h)*h):x}static snappedAngle(y,x){let{angleSize:h}=Z1;return Z1.snapAngle||y.shiftKey?Math.round(x/h)*h:x}get locked(){let y=this.parentElement;if(y.style.inset)return{left:!0,top:!0,bottom:!0,right:!0};let x=y.style.right.match(/\d/)!==null,h=!x||y.style.left.match(/\d/)!==null,C=y.style.bottom.match(/\d/)!==null,k=!C||y.style.top.match(/\d/)!==null;return{left:h,top:k,bottom:C,right:x}}set locked(y){let{bottom:x,right:h}=y,{left:C,top:k}=y,B=this.parentElement,w=B.offsetLeft,g=B.offsetTop,z=B.offsetWidth,q=B.offsetHeight,j=B.offsetParent.offsetWidth-w-z,V=B.offsetParent.offsetHeight-g-q;if(Object.assign(B.style,{left:"",right:"",top:"",bottom:"",width:"",height:""}),!h)C=!0;if(!x)k=!0;if(C)B.style.left=w+"px";if(h)B.style.right=j+"px";if(C&&h)B.style.width="auto";else B.style.width=z+"px";if(k)B.style.top=g+"px";if(x)B.style.bottom=V+"px";if(k&&x)B.style.height="auto";else B.style.height=q+"px";this.queueRender()}get coords(){let{top:y,left:x,right:h,bottom:C}=this.parentElement.style;return{top:parseFloat(y),left:parseFloat(x),right:parseFloat(h),bottom:parseFloat(C)}}get left(){return this.parentElement.offsetLeft}get width(){return this.parentElement.offsetWidth}get right(){return this.parentElement.offsetParent.offsetWidth-(this.left+this.width)}get top(){return this.parentElement.offsetTop}get height(){return this.parentElement.offsetHeight}get bottom(){return this.parentElement.offsetParent.offsetHeight-(this.top+this.height)}triggerChange=()=>{this.parentElement.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};adjustPosition=(y)=>{let{locked:x}=this;this.locked=x;let h=this.parentElement,{top:C,left:k,bottom:B,right:w}=this.coords;_1(y,(g,z,q)=>{if([g,z]=Z1.snappedCoords(q,[g,z]),!isNaN(C))h.style.top=C+z+"px";if(!isNaN(B))h.style.bottom=B-z+"px";if(!isNaN(k))h.style.left=k+g+"px";if(!isNaN(w))h.style.right=w-g+"px";if(q.type==="mouseup")return this.triggerChange(),!0})};resize=(y)=>{let x=this.parentElement,{locked:h}=this;this.locked=Object.assign({left:!0,top:!0,right:!0,bottom:!0});let[C,k]=[this.right,this.bottom];_1(y,(B,w,g)=>{let z=C-B,q=k-w;if([z,q]=Z1.snappedCoords(g,[z,q]),x.style.right=z+"px",x.style.bottom=q+"px",g.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};adjustSize=(y)=>{let x=this.parentElement,{locked:h}=this,C=y.target.getAttribute("part");this.locked=Object.assign({left:!0,right:!0,top:!0,bottom:!0});let k=this[C];_1(y,(B,w,g)=>{let[z]=Z1.snappedCoords(g,[k+(["left","right"].includes(C)?B:w)*(["right","bottom"].includes(C)?-1:1)]);if(x.style[C]=z+"px",g.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};get rect(){return this.parentElement.getBoundingClientRect()}get center(){let y=this.parentElement.getBoundingClientRect();return{x:y.x+y.width*0.5,y:y.y+y.height*0.5}}get element(){return this.parentElement}adjustRotation=(y)=>{let{center:x}=this,{transformOrigin:h}=this.element.style;if(!h)this.element.style.transformOrigin="50% 50%";_1(y,(C,k,B)=>{let{clientX:w,clientY:g}=B,z=w-x.x,q=g-x.y,j=q>0?90:-90;if(z!==0)j=Math.atan2(q,z)*180/Math.PI;if(j=Z1.snappedAngle(B,j),j===0)this.element.style.transformOrigin="",this.element.style.transform="";else this.element.style.transform=`rotate(${j}deg)`;return this.triggerChange(),B.type==="mouseup"})};toggleLock=(y)=>{let{locked:x}=this,h=y.target.title.split(" ")[1];x[h]=!x[h],this.locked=x,this.queueRender(),y.stopPropagation(),y.preventDefault()};content=()=>[J1({part:"move",style:{top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},Q.move()),J1({part:"left",title:"resize left",class:"drag-size",style:{left:"-6px",width:"8px"}}),J1({part:"right",title:"resize right",class:"drag-size",style:{left:"calc(100% - 2px)",width:"8px"}}),J1({part:"top",title:"resize top",class:"drag-size",style:{top:"-6px",height:"8px",cursor:"ns-resize"}}),J1({part:"bottom",title:"resize bottom",class:"drag-size",style:{top:"calc(100% - 2px)",height:"8px",cursor:"ns-resize"}}),J1({part:"resize",style:{top:"100%",left:"100%"}},Q.resize()),J1({part:"rotate",style:{top:"50%",right:"0"}},Q.refreshCw()),J1({part:"lockLeft",title:"lock left",style:{top:"50%",left:0,transform:"translate(-100%, -50%)"}},Q.unlock(),Q.lock()),J1({part:"lockRight",title:"lock right",style:{top:"50%",left:"100%",transform:"translate(0%, -50%)"}},Q.unlock(),Q.lock()),J1({part:"lockTop",title:"lock top",style:{top:0,left:"50%",transform:"translate(-50%, -100%)"}},Q.unlock(),Q.lock()),J1({part:"lockBottom",title:"lock bottom",style:{top:"100%",left:"50%",transform:"translate(-50%, 0%)"}},Q.unlock(),Q.lock()),yw()];connectedCallback(){super.connectedCallback();let{left:y,right:x,top:h,bottom:C,lockLeft:k,lockRight:B,lockTop:w,lockBottom:g,move:z,resize:q,rotate:j}=this.parts,V={passive:!0};[y,x,h,C].forEach((A)=>{A.addEventListener("mousedown",this.adjustSize,V),A.addEventListener("touchstart",this.adjustSize,V)}),[k,B,w,g].forEach((A)=>{A.addEventListener("click",this.toggleLock)}),q.addEventListener("mousedown",this.resize,V),z.addEventListener("mousedown",this.adjustPosition,V),j.addEventListener("mousedown",this.adjustRotation,V),q.addEventListener("touchstart",this.resize,V),z.addEventListener("touchstart",this.adjustPosition,V),j.addEventListener("touchstart",this.adjustRotation,V)}render(){if(super.render(),!this.parentElement)return;let{lockLeft:y,lockRight:x,lockTop:h,lockBottom:C}=this.parts,{left:k,right:B,top:w,bottom:g}=this.locked;y.toggleAttribute("locked",k),x.toggleAttribute("locked",B),h.toggleAttribute("locked",w),C.toggleAttribute("locked",g)}}var xw=Z1.elementCreator();var{div:hw,input:Cw,button:G9,span:kw}=U,By=(y)=>y,wy="null filter, everything matches",U9={contains:{caption:"contains",negative:"does not contain",makeTest:(y)=>{return y=y.toLocaleLowerCase(),(x)=>String(x).toLocaleLowerCase().includes(y)}},hasTags:{caption:"has tags",makeTest:(y)=>{let x=y.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&x.find((C)=>!h.includes(C))===void 0}},doesNotHaveTags:{caption:"does not have tags",makeTest:(y)=>{let x=y.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&x.find((C)=>h.includes(C))===void 0}},equals:{caption:"=",negative:"≠",makeTest:(y)=>{if(isNaN(Number(y)))return y=String(y).toLocaleLowerCase(),(h)=>String(h).toLocaleLowerCase()===y;let x=Number(y);return(h)=>Number(h)===x}},after:{caption:"is after",negative:"is before",makeTest:(y)=>{let x=new Date(y);return(h)=>new Date(h)>x}},greaterThan:{caption:">",negative:"≤",makeTest:(y)=>{if(!isNaN(Number(y))){let x=Number(y);return(h)=>Number(h)>x}return y=y.toLocaleLowerCase(),(x)=>String(x).toLocaleLowerCase()>y}},truthy:{caption:"is true/non-empty/non-zero",negative:"is false/empty/zero",needsValue:!1,makeTest:()=>(y)=>!!y},isTrue:{caption:"= true",needsValue:!1,makeTest:()=>(y)=>y===!0},isFalse:{caption:"= false",needsValue:!1,makeTest:()=>(y)=>y===!1}},Bw={description:"anything",test:()=>!0};function gy(y){return y.options[y.selectedIndex]?.caption||""}class Q9 extends ${static preferredTagName="tosi-filter-part";static lightStyleSpec={":host":{display:"flex"},":host .tosi-icon:":{verticalAlign:"middle",pointerEvents:"none"},':host [part="haystack"], :host [part="condition"]':{flex:"1"},':host [part="needle"]':{flex:2},':host [hidden]+[part="padding"]':{display:"block",content:" ",flex:"1 1 auto"}};static initAttributes={haystack:"*",condition:"contains",needle:""};fields=[];filters=U9;content=()=>[Q1({part:"haystack"}),Q1({part:"condition"}),Cw({part:"needle",type:"search"}),kw({part:"padding"}),G9({part:"remove",title:"delete"},Q.trash())];filter=Bw;get state(){let{haystack:y,needle:x,condition:h}=this.parts;return{haystack:y.value,needle:x.value,condition:h.value}}set state(y){Object.assign(this,y)}buildFilter=()=>{let{haystack:y,condition:x,needle:h}=this.parts,C=x.value.startsWith("~"),k=C?x.value.slice(1):x.value,B=this.filters[k];h.hidden=B.needsValue===!1;let w=B.needsValue===!1?B.makeTest(void 0):B.makeTest(h.value),g=y.value,z;if(g!=="*")z=C?(V)=>!w(V[g]):(V)=>w(V[g]);else z=C?(V)=>Object.values(V).find((A)=>!w(A))!==void 0:(V)=>Object.values(V).find((A)=>w(A))!==void 0;let q=B.needsValue!==!1?` "${h.value}"`:"",j=`${gy(y)} ${gy(x)}${q}`;this.filter={description:j,test:z},this.parentElement?.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{haystack:y,condition:x,needle:h,remove:C}=this.parts;y.addEventListener("change",this.buildFilter),x.addEventListener("change",this.buildFilter),h.addEventListener("input",this.buildFilter),y.value=this.haystack,x.value=this.condition,h.value=this.needle,C.addEventListener("click",()=>{let{parentElement:k}=this;this.remove(),k?.dispatchEvent(new Event("change"))})}render(){super.render();let{haystack:y,condition:x,needle:h}=this.parts;if(y.options=[{caption:"any field",value:"*"},...this.fields.map((C)=>C.prop)],x.options=Object.keys(this.filters).map((C)=>{let k=this.filters[C];return k.negative!==void 0?[{caption:k.caption,value:C},{caption:k.negative,value:"~"+C}]:{caption:k.caption,value:C}}).flat(),this.haystack!=="")y.value=this.haystack;if(this.condition!=="")x.value=this.condition;if(this.needle!=="")h.value=this.needle;this.buildFilter()}}var n4=Q9.elementCreator();class $9 extends ${static preferredTagName="tosi-filter";static lightStyleSpec={":host":{height:"auto",display:"grid",gridTemplateColumns:"32px calc(100% - 64px) 32px",alignItems:"center"},':host [part="filterContainer"]':{display:"flex",flexDirection:"column",alignItems:"stretch",flex:"1 1 auto"},':host [part="haystack"]':{_fieldWidth:"100px"},':host [part="condition"]':{_fieldWidth:"60px"},':host [part="needle"]':{_fieldWidth:"80px"},':host [part="add"], :host [part="reset"]':{"--button-size":"var(--touch-size, 32px)",borderRadius:"999px",height:"var(--button-size)",lineHeight:"var(--button-size)",margin:"0",padding:"0",textAlign:"center",width:"var(--button-size)",flex:"0 0 var(--button-size)"}};_fields=[];get fields(){return this._fields}set fields(y){this._fields=y,this.queueRender()}get state(){let{filterContainer:y}=this.parts;return[...y.children].map((x)=>x.state)}set state(y){let{fields:x,filters:h}=this,{filterContainer:C}=this.parts;C.textContent="";for(let k of y)C.append(n4({fields:x,filters:h,...k}))}filter=By;description=wy;addFilter=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;h.append(n4({fields:y,filters:x}))};content=()=>[G9({part:"add",title:"add filter condition",onClick:this.addFilter,class:"round"},Q.plus()),hw({part:"filterContainer"}),G9({part:"reset",title:"reset filter",onClick:this.reset},Q.x())];filters=U9;reset=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;this.description=wy,this.filter=By,h.textContent="",h.append(n4({fields:y,filters:x})),this.dispatchEvent(new Event("change"))};buildFilter=()=>{let{filterContainer:y}=this.parts;if(y.children.length===0){this.reset();return}let x=[...y.children].map((C)=>C.filter),h=x.map((C)=>C.test);this.description=x.map((C)=>C.description).join(", "),this.filter=(C)=>C.filter((k)=>h.find((B)=>B(k)===!1)===void 0),this.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{filterContainer:y}=this.parts;y.addEventListener("change",this.buildFilter),this.reset()}render(){super.render()}}var ww=$9.elementCreator();var{a:gw}=U;class O9 extends ${static preferredTagName="tosi-header";static shadowStyleSpec={":host":{display:"flex",alignItems:"center",padding:_.tosiHeaderPadding("12px 24px"),background:_.tosiHeaderBg("var(--tosi-accent, #EE257B)"),lineHeight:_.tosiHeaderLineHeight("32px"),gap:_.tosiHeaderGap("8px")},"::slotted(*)":{display:"inline-flex",alignItems:"center"}};content=({slot:y})=>[y()]}var zw=O9.elementCreator(),zy={tosijs:()=>Q.tosi(),discord:()=>Q.discord(),blog:()=>Q.blog(),github:()=>Q.github(),npm:()=>Q.npm()};class Y9 extends ${static preferredTagName="tosi-header-links";static lightStyleSpec={":host":{display:"inline-flex",alignItems:"center",gap:"4px"},":host a":{color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",padding:"4px",opacity:"0.8",cursor:"pointer"},":host a:hover":{opacity:"1"}};links={};content=null;render(){super.render();let y=[];for(let[x,h]of Object.entries(this.links)){if(!h||!zy[x])continue;y.push(gw({title:x,target:"_blank",href:h},zy[x]()))}this.replaceChildren(...y)}}var qw=Y9.elementCreator();function qy(){return navigator.getGamepads().filter((x)=>x!==null).map((x)=>{let{id:h,axes:C,buttons:k}=x;return{id:h,axes:C,buttons:k.map((B,w)=>{let{pressed:g,value:z}=B;return{index:w,pressed:g,value:z}}).filter((B)=>B.pressed||B.value!==0).reduce((B,w)=>{return B[w.index]=w.value,B},{})}})}function lw(){let y=qy();return y.length===0?"no active gamepads":y.map(({id:x,axes:h,buttons:C})=>{let k=h.map((w)=>w.toFixed(2)).join(" "),B=Object.keys(C).map((w)=>`[${w}](${C[Number(w)].toFixed(2)})`).join(" ");return`${x}
|
|
204
|
+
${k}
|
|
205
|
+
${B}`}).join(`
|
|
206
|
+
`)}function jw(y){let x={};return y.input.onControllerAddedObservable.add((h)=>{h.onMotionControllerInitObservable.add((C)=>{let k={};C.getComponentIds().forEach((w)=>{let g=C.getComponent(w);if(k[w]={pressed:g.pressed,touched:g.touched,value:g.value,axes:{x:g.axes.x,y:g.axes.y}},g.onButtonStateChangedObservable.add((z)=>{k[w].pressed=z.pressed,k[w].touched=z.touched,k[w].value=z.value}),g.onAxisValueChangedObservable)g.onAxisValueChangedObservable.add((z)=>{k[w].axes={x:z.x,y:z.y}})}),x[C.handedness]=k})}),x}function Vw(y){if(y===void 0||Object.keys(y).length===0)return"no xr inputs";return Object.keys(y).map((x)=>{let h=y[x],C=[];for(let[k,B]of Object.entries(h)){let w=[];if(B.pressed)w.push("P");if(B.touched)w.push("T");let g=B.value>0,z=B.axes.x!==0||B.axes.y!==0;if(w.length>0||g||z){let q=`${k}[${w.join("")}]`;if(g)q+=` v:${B.value.toFixed(2)}`;if(z)q+=` x:${B.axes.x.toFixed(2)} y:${B.axes.y.toFixed(2)}`;C.push(q)}}return`${x}
|
|
207
207
|
${C.join(`
|
|
208
208
|
`)||"(idle)"}`}).join(`
|
|
209
|
-
`)}var{slot:F9}=G;class O9 extends F{static preferredTagName="tosi-row";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[F9()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"row",gap:P.tosiRowGap("0"),alignItems:P.tosiRowAlign("stretch"),justifyContent:P.tosiRowJustify("flex-start")}};render(){if(super.render(),this.gap)this.style.setProperty("--tosi-row-gap",this.gap);else this.style.removeProperty("--tosi-row-gap");if(this.align)this.style.setProperty("--tosi-row-align",this.align);else this.style.removeProperty("--tosi-row-align");if(this.justify)this.style.setProperty("--tosi-row-justify",this.justify);else this.style.removeProperty("--tosi-row-justify");this.style.flexWrap=this.wrap?"wrap":""}}var hk=O9.elementCreator();class W9 extends F{static preferredTagName="tosi-column";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[F9()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"column",gap:P.tosiColumnGap("0"),alignItems:P.tosiColumnAlign("stretch"),justifyContent:P.tosiColumnJustify("flex-start")}};render(){if(super.render(),this.gap)this.style.setProperty("--tosi-column-gap",this.gap);else this.style.removeProperty("--tosi-column-gap");if(this.align)this.style.setProperty("--tosi-column-align",this.align);else this.style.removeProperty("--tosi-column-align");if(this.justify)this.style.setProperty("--tosi-column-justify",this.justify);else this.style.removeProperty("--tosi-column-justify");this.style.flexWrap=this.wrap?"wrap":""}}var Ck=W9.elementCreator();class Q9 extends F{static preferredTagName="tosi-grid";static initAttributes={columns:"",rows:"",gap:""};content=[F9()];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:P.tosiGridColumns("1fr"),gridTemplateRows:P.tosiGridRows("auto"),gap:P.tosiGridGap("0")}};render(){if(super.render(),this.columns)this.style.setProperty("--tosi-grid-columns",this.columns);else this.style.removeProperty("--tosi-grid-columns");if(this.rows)this.style.setProperty("--tosi-grid-rows",this.rows);else this.style.removeProperty("--tosi-grid-rows");if(this.gap)this.style.setProperty("--tosi-grid-gap",this.gap);else this.style.removeProperty("--tosi-grid-gap")}}var lk=Q9.elementCreator(),{span:ky}=G,ik=(...y)=>ky({style:{flex:"1 1 var(--tosi-space, 0.5em)"}},...y),X9=(...y)=>ky({style:{flex:"0 0 var(--tosi-space, 0.5em)"}},...y);var s1={accent:X.fromCss("#EE257B"),background:X.fromCss("#fafafa"),text:X.fromCss("#222222")},gy={_tosiSpacingXs:"4px",_tosiSpacingSm:"8px",_tosiSpacing:"12px",_tosiSpacingLg:"16px",_tosiSpacingXl:"24px",_tosiFontFamily:"system-ui, -apple-system, sans-serif",_tosiFontSize:"16px",_tosiLineHeight:"1.5",_tosiCodeFontFamily:"ui-monospace, monospace",_tosiCodeFontSize:"14px",_tosiTouchSize:"44px",_tosiBorderRadius:"4px",_tosiBorderRadiusLg:"8px",_tosiTransition:"0.15s ease-out"};function wy(y){let{accent:x,background:h,text:C}=y,l=y.accentText??x.contrasting(),i=y.backgroundInset??h.darken(0.03),k=y.border??C.opacity(0.15),g=y.shadow??C.opacity(0.1),w=y.focus??x.opacity(0.5);return{_tosiAccent:x,_tosiAccentLight:x.brighten(0.15),_tosiAccentDark:x.darken(0.15),_tosiAccentText:l,_tosiBg:h,_tosiBgInset:i,_tosiBgHover:h.darken(0.05),_tosiBgActive:h.darken(0.1),_tosiText:C,_tosiTextMuted:C.opacity(0.6),_tosiTextDisabled:C.opacity(0.4),_tosiBorder:k,_tosiBorderFocus:x,_tosiShadow:g,_tosiShadowColor:g,_tosiFocusRing:`0 0 0 2px ${w}`,_tosiInputBg:h,_tosiInputBorder:k,_tosiInputBorderFocus:x,_tosiButtonBg:h,_tosiButtonText:C,_tosiButtonBorder:k,_tosiButtonHoverBg:h.darken(0.05),_tosiButtonActiveBg:x,_tosiButtonActiveText:l}}function s2(y){return{":root":{...gy,...wy(y)}}}function u4(y){let h=s2(y)[":root"];return{":root":i0(h)}}function $9(y,x="tosi-theme"){W1(x,y)}var kk=s2(s1),gk=u4(s1),By={"--xin-icon-size":z.tosiIconSize,"--xin-icon-fill":z.tosiIconFill,"--xin-icon-stroke":z.tosiIconStroke,"--xin-tabs-bar-color":z.tosiTabsBarColor,"--xin-tabs-bar-height":z.tosiTabsBarHeight,"--xin-tabs-selected-color":z.tosiTabsSelectedColor,"--spacing":z.tosiSpacing,"--gap":z.tosiSpacingSm,"--touch-size":z.tosiTouchSize,"--background":z.tosiBg,"--text-color":z.tosiText,"--brand-color":z.tosiAccent,"--brand-text-color":z.tosiAccentText};function wk(y){return{":root":{...s2(y)[":root"],...By}}}function Bk(y,x){let h={};for(let[C,l]of Object.entries(x)){let i=`--tosi-${y}-${C.replace(/([A-Z])/g,"-$1").toLowerCase()}`;h[C]=`var(${i}, ${l})`}return h}var{div:T2,label:E4,input:a4,span:zk,button:zy}=G,{liveTheme:r}=t({liveTheme:{accent:String(s1.accent),background:String(s1.background),text:String(s1.text),dark:!1}}),m4=!1;function D0(){if(!m4)return;let y={accent:X.fromCss(r.accent.value),background:X.fromCss(r.background.value),text:X.fromCss(r.text.value)},x=r.dark.value?u4(y):s2(y);$9(x,"tosi-live-theme")}function qy(){if(m4)return;m4=!0,r.accent.observe(D0),r.background.observe(D0),r.text.observe(D0),r.dark.observe(D0),D0()}function qk(){m4=!1}class Y9 extends F{static preferredTagName="tosi-theme-editor";static shadowStyleSpec={":host":{display:"block",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"14px",lineHeight:"1.5",background:"#ffffff",color:"#222222",padding:"16px",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",maxWidth:"320px"},":host .field":{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},":host label":{flex:"1",fontWeight:"500"},':host input[type="color"]':{width:"48px",height:"32px",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",padding:"2px"},':host input[type="checkbox"]':{width:"18px",height:"18px",cursor:"pointer"},":host .preview":{marginTop:"12px",padding:"12px",borderRadius:"4px",transition:"all 0.15s ease-out"},":host .preview-button":{border:"none",padding:"6px 12px",borderRadius:"4px",cursor:"pointer",fontFamily:"inherit",fontSize:"13px"},":host .actions":{marginTop:"8px",display:"flex",gap:"8px"},":host .actions button":{flex:"1",padding:"6px 12px",border:"1px solid #ccc",borderRadius:"4px",background:"#f5f5f5",color:"#222",cursor:"pointer",fontFamily:"inherit",fontSize:"13px"},":host .actions button:hover":{background:"#e8e8e8"}};content=()=>[T2({class:"field"},E4("Accent"),a4({type:"color",part:"accent"})),T2({class:"field"},E4("Background"),a4({type:"color",part:"background"})),T2({class:"field"},E4("Text"),a4({type:"color",part:"text"})),T2({class:"field"},E4("Dark mode"),a4({type:"checkbox",part:"dark"})),T2({class:"preview",part:"preview",style:{background:"var(--tosi-bg, #fafafa)",color:"var(--tosi-text, #222)"}},zk("Preview "),zy({class:"preview-button",style:{background:"var(--tosi-accent, #EE257B)",color:"var(--tosi-accent-text, white)"}},"Button")),T2({class:"actions"},zy({part:"reset"},"Reset"))];connectedCallback(){super.connectedCallback(),qy();let y=()=>{this.parts.accent.value=r.accent.value,this.parts.background.value=r.background.value,this.parts.text.value=r.text.value,this.parts.dark.checked=r.dark.value};y(),r.accent.observe(y),r.background.observe(y),r.text.observe(y),r.dark.observe(y),this.parts.accent.addEventListener("input",()=>{r.accent.value=this.parts.accent.value}),this.parts.background.addEventListener("input",()=>{r.background.value=this.parts.background.value}),this.parts.text.addEventListener("input",()=>{r.text.value=this.parts.text.value}),this.parts.dark.addEventListener("change",()=>{r.dark.value=this.parts.dark.checked}),this.parts.reset.addEventListener("click",()=>{r.accent.value=String(s1.accent),r.background.value=String(s1.background),r.text.value=String(s1.text),r.dark.value=!1})}}var jk=Y9.elementCreator();var{div:Vk}=G;class G2 extends F{static preferredTagName="tosi-map";static formAssociated=!0;static initAttributes={coords:"65.01715565258993,25.48081004203459,12",token:"",mapStyle:"mapbox://styles/mapbox/streets-v12",name:""};value="";formDisabledCallback(y){}formResetCallback(){this.value="",this.coords="65.01715565258993,25.48081004203459,12"}content=Vk({style:{width:"100%",height:"100%"}});get map(){return this._map}static mapboxCSSAvailable;static mapboxAvailable;_map;_mapPending=!1;static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"400px",height:"400px",textAlign:"left"}};constructor(){super();if(G2.mapboxCSSAvailable===void 0)G2.mapboxCSSAvailable=B4("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.css").catch((y)=>{console.error("failed to load mapbox-gl.css",y)}),G2.mapboxAvailable=b1("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.js").catch((y)=>{console.error("failed to load mapbox-gl.js",y)})}connectedCallback(){if(super.connectedCallback(),!this.token)console.error("mapbox requires an access token which you can provide via the token attribute")}_lastCoords="";_lastStyle="";render(){if(super.render(),!this.token)return;if(this._map){if(this.coords!==this._lastCoords){let[x,h,C]=this.coords.split(",").map((l)=>Number(l));this._map.setCenter([h,x]),this._map.setZoom(C),this._lastCoords=this.coords}if(this.mapStyle!==this._lastStyle)this._map.setStyle(this.mapStyle),this._lastStyle=this.mapStyle;return}if(this._mapPending)return;this._mapPending=!0;let{div:y}=this.parts;G2.mapboxAvailable.then(({mapboxgl:x})=>{console.log("%cmapbox may complain about missing css -- don't panic!","background: orange; color: black; padding: 0 5px;");let[h,C,l]=this.coords.split(",").map((i)=>Number(i));x.accessToken=this.token,this._map=new x.Map({container:y,style:this.mapStyle,zoom:l,center:[C,h]}),this._lastCoords=this.coords,this._lastStyle=this.mapStyle,this._mapPending=!1,this._map.on("render",()=>this._map.resize()),this._map.on("moveend",()=>{let i=this._map.getCenter(),k=this._map.getZoom(),g=`${i.lat.toFixed(6)},${i.lng.toFixed(6)},${k.toFixed(1)}`;if(g!==this.value){if(this.internals)this.internals.setFormValue(g)}})}).catch((x)=>{this._mapPending=!1,console.error("tosi-map: mapbox failed to load",x)})}}var Pk=G2.elementCreator();function jy(y,x){if(x==null)x="";else if(typeof x!=="string")x=String(x);return x.replace(/\{\{([^}]+)\}\}/g,(h,C)=>{let l=l1[`${y}${C.startsWith("[")?C:"."+C}`];return l===void 0?h:jy(y,String(l))})}class t4 extends F{static preferredTagName="tosi-md";static initAttributes={src:"",elements:!1};context={};value="";content=null;options={};connectedCallback(){if(super.connectedCallback(),this.src!=="")(async()=>{let y=await fetch(this.src);this.value=await y.text()})();else if(this.value==="")if(this.elements)this.value=this.innerHTML;else this.value=this.textContent!=null?this.textContent:""}didRender=()=>{};render(){super.render(),l1[this.instanceId]=typeof this.context==="string"?JSON.parse(this.context):this.context;let y=jy(this.instanceId,this.value);if(this.elements){let x=y.split(`
|
|
210
|
-
`).reduce((h,C)=>{if(C.startsWith("<")||h.length===0)h.push(C);else{let
|
|
211
|
-
`+C;else h.push(C)}return h},[]);this.innerHTML=x.map((h)=>h.startsWith("<")&&h.endsWith(">")?h:R(h,this.options)).join("")}else this.innerHTML=R(y,this.options);this.didRender()}}var _k=t4,N9=t4.elementCreator(),Ak=N9,Kk=N9;var{div:J9,span:e4,button:Z9}=G,H0=86400000,Uk=[0,1,2,3,4,5,6],Gk=[1,2,3,4,5,6,7,8,9,10,11,12],p9=(y,x=2,h="0")=>String(y).padStart(x,h),b0=(y,x,h)=>new Date(`${y}-${p9(x)}-${p9(h)}`);class v9 extends F{static preferredTagName="tosi-month";static lightStyleSpec={":host":{display:"block"},":host [part=header]":{display:"flex",alignItems:"stretch",justifyContent:"stretch"},":host[disabled]":{pointerEvents:"none",opacity:P.disabledOpacity(0.6)},':host [part="month"], :host [part="year"]':{_fieldWidth:"4em",flex:"1"},":host [part=week], :host [part=days]":{display:"grid",gridTemplateColumns:"auto auto auto auto auto auto auto",justifyItems:"stretch"},":host .today":{background:P.monthTodayBackground("transparent"),boxShadow:P.monthTodayShadow("none"),backdropFilter:P.monthTodayBackdropFilter("brightness(0.9)"),fontWeight:P.monthTodayFontWeight("800")},":host .day, :host .date":{padding:5,display:"flex",justifyContent:"center",userSelect:"none"},":host .day":{color:P.monthDayColor("hotpink"),background:P.monthDayBackground("white"),fontWeight:P.monthDayFontWeight("800")},":host .date":{cursor:"default"},":host .weekend":{background:P.monthWeekendBackground("#eee")},":host .date:not(.in-month)":{opacity:0.5},":host .date.checked":{color:P.monthDateCheckedColor("white"),background:P.monthDateCheckedBackground("hotpink")},":host:not([range]) .date.checked":{borderRadius:P.monthDateCheckedBorderRadius("10px")},":host .range-start":{borderTopLeftRadius:P.monthDateCheckedBorderRadius("10px"),borderBottomLeftRadius:P.monthDateCheckedBorderRadius("10px")},":host .range-end":{borderTopRightRadius:P.monthDateCheckedBorderRadius("10px"),borderBottomRightRadius:P.monthDateCheckedBorderRadius("10px")}};static formAssociated=!0;static initAttributes={month:NaN,year:NaN,weekStart:0,minDate:b0(new Date().getFullYear()-100,1,1).toISOString().split("T")[0],maxDate:b0(new Date().getFullYear()+10,12,31).toISOString().split("T")[0],selectable:!1,multiple:!1,range:!1,disabled:!1,readonly:!1,required:!1,name:""};selectedDays=[];value="";formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value="",this.selectedDays=[]}get endDay(){return 1-this.weekStart}get months(){return Gk.map((y)=>({caption:b0(2025,y,1).toString().split(" ")[1],value:String(y)}))}get years(){let y=Number(this.minDate.split("-")[0]),x=Number(this.maxDate.split("-")[0]),h=[];for(let C=y;C<=x;C++)h.push(String(C));return h}monthChanged=(y,x)=>{};gotoMonth(y,x){if(this.month!==x||this.year!==y)this.month=x,this.year=y,this.monthChanged(y,x)}setMonth=()=>{this.gotoMonth(Number(this.parts.year.value),Number(this.parts.month.value))};get to(){return this.selectedDays[1]||""}set to(y){this.selectedDays[1]=y,this.selectedDays.splice(2)}get from(){return this.selectedDays[0]||""}set from(y){this.selectedDays[0]=y,this.selectedDays.splice(2)}clickDate=(y)=>{let x=y.target.getAttribute("title");this.selectDate(x)};keyDate=(y)=>{let x=!1;switch(y.code){case"Space":{let h=y.target.getAttribute("title");this.selectDate(h),x=!0;break}case"Tab":break;default:console.log(y)}if(x)y.preventDefault(),y.stopPropagation()};#y="";selectDate=(y)=>{if(this.#y=y,this.range){if(!this.to)this.selectedDays=[y,y];else if(this.from===y&&this.to===y)this.selectedDays=[];else if(this.from===y)this.from=this.to;else if(this.to===y)this.to=this.from;else if(y<this.from)this.from=y;else if(y>this.to)this.to=y;else this.to=y;this.value=`${this.from},${this.to}`}else if(this.multiple){if(this.selectedDays.includes(y))this.selectedDays.splice(this.selectedDays.indexOf(y),1);else this.selectedDays.push(y),this.selectedDays.sort();this.value=this.selectedDays.join(",")}else if(this.selectable)if(this.selectedDays.includes(y))this.value="",this.selectedDays=[];else this.value=y,this.selectedDays=[y]};nextMonth=()=>{if(this.month<12)this.gotoMonth(this.year,this.month+1);else this.gotoMonth(this.year+1,1)};previousMonth=()=>{if(this.month>1)this.gotoMonth(this.year,this.month-1);else this.gotoMonth(this.year-1,12)};checkDay=(y)=>{if(!this.range)return this.selectedDays.includes(y);else if(this.range)return this.from&&y>=this.from&&y<=this.to;return!1};dateMenuItem=(y,x="")=>{return y=y.split("T")[0],{caption:x||y,enabled:()=>!y.startsWith(`${this.year}-${p9(this.month)}-`),action:()=>{this.gotoDate(y)}}};jumpMenu=()=>{n({target:this.parts.jump,menuItems:[this.dateMenuItem(new Date().toISOString(),"This Month"),...this.selectedDays.length===0?[]:[null],...this.selectedDays.map((y)=>this.dateMenuItem(y))]})};content=()=>[J9({part:"header"},Z9({part:"previous",onClick:this.previousMonth},O.chevronLeft()),e4({style:{flex:"1"}}),Z9({part:"jump",onClick:this.jumpMenu},O.calendar()),F1({part:"month",options:this.months,onChange:this.setMonth}),F1({part:"year",options:[this.year],onChange:this.setMonth}),e4({style:{flex:"1"}}),Z9({part:"next",onClick:this.nextMonth},O.chevronRight())),J9({part:"week"}),J9({part:"days"})];gotoDate(y){let x=new Date(y);this.gotoMonth(x.getFullYear(),x.getMonth()+1)}connectedCallback(){super.connectedCallback();let y=new Date(this.value.split(",").pop()||Date.now());if(isNaN(this.month))this.month=y.getMonth()+1;if(isNaN(this.year))this.year=y.getFullYear()}days=[];render(){super.render();let{week:y,days:x,jump:h,month:C,year:l,previous:i,next:k}=this.parts;this.selectedDays=this.value?this.value.split(","):[];let g=b0(this.year,this.month,1),w=new Date(g.valueOf()-(7+g.getDay()-this.weekStart)%7*H0),B=this.month===12?1:this.month+1,q=new Date(b0(this.year+(this.month===12?1:0),B,1).valueOf()-H0),j=new Date(q.valueOf()+(this.weekStart*2+5+this.endDay-q.getDay())%7*H0),_=Uk.map(($)=>new Date(w.valueOf()+$*H0).toString().split(" ")[0]);this.days=[];let K=new Date().toISOString().split("T")[0];for(let $=w.valueOf();$<=j.valueOf();$+=H0){let Z=new Date($),p=Z.toISOString().split("T")[0];this.days.push({date:Z,selected:!1,inMonth:Z.getMonth()+1===this.month,isToday:p===K,isWeekend:Z.getDay()%6===0,inRange:!!(this.from&&p>=this.from&&p<=this.to)})}C.value=String(this.month),l.value=String(this.year),C.disabled=l.disabled=h.disabled=i.disabled=k.disabled=this.disabled||this.readonly,l.options=this.years,y.textContent="",y.append(..._.map(($)=>e4({class:"day"},$))),x.textContent="";let U=null,{to:Q,from:Y}=this;x.append(...this.days.map(($)=>{let Z=["date"];if($.inMonth)Z.push("in-month");if($.isToday)Z.push("today");let p=$.date.toISOString().split("T")[0];if(this.checkDay(p))Z.push("checked");if(Z.push($.isWeekend?"weekend":"weekday"),this.range){if(Q===p)Z.push("range-end");if(Y===p)Z.push("range-start")}let T=e4({class:Z.join(" "),title:p,onClick:this.clickDate,onKeydown:this.keyDate,tabindex:"0"},$.date.getDate());if(p===this.#y)U=T;return T})),U?.focus()}}var Fk=v9.elementCreator();var Vy=async(y,x="SHA-1")=>{let C=new TextEncoder().encode(y),l=await crypto.subtle.digest(x,C);return Array.from(new Uint8Array(l)).map((g)=>g.toString(16).padStart(2,"0")).join("")},Py=async(y)=>{let x=await Vy(y),h=await fetch(`https://weakpass.com/api/v1/search/${x}`);if(h.ok){let C=await h.json();console.log("password found in weakpass database",C)}return h.status!==404},{span:R9,tosiSlot:Ok}=G;class y5 extends F{static preferredTagName="tosi-password-strength";static lightStyleSpec={":host":{display:"inline-flex",flexDirection:"column",gap:z.spacing50,position:"relative"},":host tosi-slot":{display:"flex"},':host [part="meter"]':{display:"block",position:"relative",height:P.meterHeight("24px"),background:P.indicatorBg("white"),borderRadius:P.meterRadius("4px"),boxShadow:P.meterShadow(`inset 0 0 0 2px ${z.indicatorColor}`)},':host [part="level"]':{height:P.levelHeight("20px"),content:'" "',display:"inline-block",width:0,transition:"0.15s ease-out",background:z.indicatorColor,margin:P.levelMargin("2px"),borderRadius:P.levelRadius("2px")},':host [part="description"]':{position:"absolute",inset:"0",color:z.descriptionColor,height:P.meterHeight("24px"),lineHeight:P.meterHeight("24px"),textAlign:"center"}};static initAttributes={minLength:8,goodLength:12,indicatorColors:"#f00,#f40,#f80,#ef0,#8f0,#0a2"};descriptionColors="#000,#000,#000,#000,#000,#fff";issues={tooShort:!0,short:!0,noUpper:!0,noLower:!0,noNumber:!0,noSpecial:!0};issueDescriptions={tooShort:"too short",short:"short",noUpper:"no upper case",noLower:"no lower case",noNumber:"no digits",noSpecial:"no unusual characters"};value=0;strengthDescriptions=["unacceptable","very weak","weak","moderate","strong","very strong"];strength(y){return this.issues={tooShort:y.length<this.minLength,short:y.length<this.goodLength,noUpper:!y.match(/[A-Z]/),noLower:!y.match(/[a-z]/),noNumber:!y.match(/[0-9]/),noSpecial:!y.match(/[^a-zA-Z0-9]/)},this.issues.tooShort?0:Object.values(this.issues).filter((x)=>!x).length-1}async isBreached(){let y=this.querySelector("input")?.value;if(!y||typeof y!=="string")return!0;return await Py(y)}updateIndicator=(y)=>{let{level:x,description:h}=this.parts,C=this.indicatorColors.split(","),l=this.descriptionColors.split(","),i=this.strength(y);if(this.value!==i)this.value=i,this.dispatchEvent(new Event("change"));x.style.width=`${(i+1)*16.67}%`,this.style.setProperty("--indicator-color",C[i]),this.style.setProperty("--description-color",l[i]),h.textContent=this.strengthDescriptions[i]};update=(y)=>{let x=y.target.closest("input");this.updateIndicator(x?.value||"")};content=()=>[Ok({onInput:this.update}),R9({part:"meter"},R9({part:"level"}),R9({part:"description"}))];render(){super.render();let y=this.querySelector("input");this.updateIndicator(y?.value)}}var Wk=y5,_y=y5.elementCreator(),Qk=_y;var{span:D9}=G;class x5 extends F{static preferredTagName="tosi-rating";static formAssociated=!0;static initAttributes={max:5,min:1,icon:"star",step:1,ratingStroke:"#e81",ratingFill:"#f91",emptyStroke:"#ccc",emptyFill:"#ccc",readonly:!1,iconSize:24,hollow:!1,required:!1,name:""};value="";formDisabledCallback(y){this.readonly=y}formResetCallback(){this.value=""}static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"fit-content"},":host::part(container)":{position:"relative",display:"inline-block"},":host::part(empty), :host::part(filled)":{height:"100%",whiteSpace:"nowrap",overflow:"hidden"},":host::part(empty)":{pointerEvents:"none"},":host::part(filled)":{position:"absolute",left:0,transition:"width 0.15s ease-out"},":host svg":{transform:"scale(0.9)",pointerEvents:"all !important",transition:"0.25s ease-in-out"},":host svg:hover":{transform:"scale(1)"},":host svg:active":{transform:"scale(1.1)"}};content=()=>D9({part:"container"},D9({part:"empty"}),D9({part:"filled"}));displayValue(y){let{empty:x,filled:h}=this.parts,l=Math.round((typeof y==="string"?0:y||0)/this.step)*this.step;h.style.width=l/this.max*x.offsetWidth+"px"}update=(y)=>{if(this.readonly)return;let{empty:x}=this.parts,h=y instanceof MouseEvent?y.pageX-x.getBoundingClientRect().x:0,C=Math.min(Math.max(this.min,Math.round(h/x.offsetWidth*this.max/this.step+this.step*0.5)*this.step),this.max);if(y.type==="click")this.value=C;else if(y.type==="mousemove")this.displayValue(C);else this.displayValue(this.value||0)};handleKey=(y)=>{let x=this.value===""?NaN:Number(this.value);if(isNaN(x))x=Math.round((this.min+this.max)*0.5*this.step)*this.step;let h=!1;switch(y.key){case"ArrowUp":case"ArrowRight":x+=this.step,h=!0;break;case"ArrowDown":case"ArrowLeft":x-=this.step,h=!0;break}if(this.value=Math.max(Math.min(x,this.max),this.min),h)y.stopPropagation(),y.preventDefault()};connectedCallback(){super.connectedCallback();let{container:y}=this.parts;y.tabIndex=0,y.addEventListener("mousemove",this.update,!0),y.addEventListener("mouseleave",this.update),y.addEventListener("blur",this.update),y.addEventListener("click",this.update),y.addEventListener("keydown",this.handleKey)}_renderedIcon="";render(){super.render();let y=this.iconSize+"px";if(this.style.setProperty("--tosi-icon-size",y),this.readonly)this.role="image";else this.role="slider";this.ariaLabel=`rating ${this.value} out of ${this.max}`,this.ariaValueMax=String(this.max),this.ariaValueMin=String(this.min),this.ariaValueNow=this.value===""?String(-1):String(this.value);let{empty:x,filled:h}=this.parts;if(x.style.setProperty("--tosi-icon-fill",this.hollow?"none":this.emptyFill),x.style.setProperty("--tosi-icon-stroke",this.emptyStroke),h.style.setProperty("--tosi-icon-fill",this.ratingFill),h.style.setProperty("--tosi-icon-stroke",this.ratingStroke),this._renderedIcon!==this.icon){this._renderedIcon=this.icon;for(let C=0;C<this.max;C++)x.append(O[this.icon]()),h.append(O[this.icon]())}this.displayValue(this.value)}}var Xk=x5,Ay=x5.elementCreator(),$k=B1((...y)=>Ay(...y),"xinRating is deprecated, use tosiRating instead (tag is now <tosi-rating>)");var{tosiSlot:Ky,div:Yk,button:Nk}=G,Jk=[{caption:"Title",tagType:"H1"},{caption:"Heading",tagType:"H2"},{caption:"Subheading",tagType:"H3"},{caption:"Minor heading",tagType:"H4"},{caption:"Body",tagType:"P"},{caption:"Code Block",tagType:"PRE"}];function H9(y=Jk){return F1({title:"paragraph style",slot:"toolbar",class:"block-style",options:y.map(({caption:x,tagType:h})=>({caption:x,value:`formatBlock,${h}`}))})}var S0=()=>X9({slot:"toolbar"});function p1(y,x,h){return Nk({slot:"toolbar",dataCommand:x,title:y},h)}var Zk=()=>[p1("left-justify","justifyLeft",O.alignLeft()),p1("center","justifyCenter",O.alignCenter()),p1("right-justify","justifyRight",O.alignRight()),S0(),p1("bullet list","insertUnorderedList",O.listBullet()),p1("numbered list","insertOrderedList",O.listNumber()),S0(),p1("indent","indent",O.indent()),p1("indent","outdent",O.outdent())],Uy=()=>[p1("bold","bold",O.fontBold()),p1("italic","italic",O.fontItalic()),p1("underline","underline",O.fontUnderline())],pk=()=>[H9(),S0(),...Uy()],Gy=()=>[H9(),S0(),...Zk(),S0(),...Uy()];class h5 extends F{static preferredTagName="tosi-rich-text";static lightStyleSpec={":host":{display:"flex",flexDirection:"column",height:"100%"},':host [part="toolbar"]':{padding:4,display:"flex",gap:"0px",flex:"0 0 auto",flexWrap:"wrap"},':host [part="toolbar"] > button':{_xinIconSize:18}};static formAssociated=!0;static initAttributes={widgets:"default",name:"",required:!1};isInitialized=!1;savedValue="";formDisabledCallback(y){if(this.isInitialized)this.parts.doc.contentEditable=y?"false":"true"}formResetCallback(){this.value=""}_value="";get value(){return this.isInitialized?this.parts.doc.innerHTML:this._value}set value(y){let x=this._value;if(this._value=y,this.isInitialized){if(this.parts.doc.innerHTML!==y)this.parts.doc.innerHTML=y}if(x!==y&&this.internals)this.internals.setFormValue(y)}blockElement(y){let{doc:x}=this.parts;while(y.parentElement!==null&&y.parentElement!==x)y=y.parentElement;return y.parentElement===x?y:void 0}get selectedBlocks(){let{doc:y}=this.parts,x=window.getSelection();if(x===null)return[];let h=[];for(let C=0;C<x.rangeCount;C++){let l=x.getRangeAt(C);if(!y.contains(l.commonAncestorContainer))continue;let i=this.blockElement(l.startContainer),k=this.blockElement(l.endContainer);h.push(i);while(i!==k&&i!==null)i=i.nextElementSibling,h.push(i)}return h}get selectedText(){let y=window.getSelection();if(y===null)return"";return this.selectedBlocks.length?y.toString():""}selectionChange=()=>{};_updatingBlockStyle=!1;handleSelectChange=(y)=>{if(this._updatingBlockStyle)return;let h=y.target?.closest(S1.tagName);if(h==null)return;this.doCommand(h.value)};handleButtonClick=(y)=>{let h=y.target?.closest("button");if(h==null)return;this.doCommand(h.dataset.command)};content=[Ky({name:"toolbar",part:"toolbar",onClick:this.handleButtonClick,onChange:this.handleSelectChange}),Yk({part:"doc",contenteditable:!0,style:{flex:"1 1 auto",outline:"none"}}),Ky({part:"content"})];doCommand(y){if(y===void 0)return;let x=y.split(",");console.log("execCommand",x[0],!1,...x.slice(1)),document.execCommand(x[0],!1,...x.slice(1))}updateBlockStyle(){let y=this.parts.toolbar.querySelector(".block-style");if(y===null)return;let x=this.selectedBlocks.map((h)=>h.tagName);x=[...new Set(x)],this._updatingBlockStyle=!0,y.value=x.length===1?`formatBlock,${x[0]}`:"",this._updatingBlockStyle=!1}hasContent(){return(this.parts.doc.textContent||"").trim().length>0}handleInput=()=>{if(this.internals)this.internals.setFormValue(this.parts.doc.innerHTML),this.updateValidity()};updateValidity(){if(this.internals)if(this.required&&!this.hasContent())this.internals.setValidity({valueMissing:!0},"Please enter some content",this.parts.doc);else this.internals.setValidity({})}connectedCallback(){super.connectedCallback();let{doc:y,content:x}=this.parts;if(x.innerHTML!==""&&y.innerHTML==="")y.innerHTML=x.innerHTML,x.innerHTML="";this.isInitialized=!0,x.style.display="none",y.addEventListener("input",this.handleInput),this.updateValidity(),document.addEventListener("selectionchange",(h)=>{this.updateBlockStyle(),this.selectionChange(h,this)})}render(){let{toolbar:y}=this.parts;if(super.render(),y.children.length===0)switch(this.widgets){case"minimal":y.append(...pk());break;case"default":y.append(...Gy());break}}}var vk=h5,Fy=h5.elementCreator(),Rk=B1((...y)=>Fy(...y),"richText is deprecated, use tosiRichText instead (tag is now <tosi-rich-text>)");var{router:M0}=t({router:{path:"",hash:"",pattern:""}}),b9={};function Dk(){return{...b9}}var C5=[],S9=!1,l5=new Set;function Hk(y){let x=[];if(y==="")return{regex:/^\/?$/,paramNames:x};let h=y.split("/").map((l)=>{if(l.startsWith(":"))return x.push(l.slice(1)),"([^/]+)";return l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});return{regex:new RegExp("^/?"+h.join("/")+"/?$"),paramNames:x}}function bk(y){let x=y.split("?")[0].split("#")[0];for(let C of C5){if(C.fallback)continue;let l=x.match(C.regex);if(l){let i={};return C.paramNames.forEach((k,g)=>{i[k]=decodeURIComponent(l[g+1])}),{route:C,params:i}}}let h=C5.find((C)=>C.fallback);if(h)return{route:h,params:{}};return null}function I0(){let y=S9?window.location.hash.replace(/^#\/?/,""):window.location.pathname;M0.path.value=y,M0.hash.value=window.location.hash;let x=bk(y);if(x){b9=x.params,M0.pattern.value=x.route.regex.source;let h=new Map;for(let C of x.route.targets)h.set(C.view??"default",C);for(let C of l5){let l=C.name||"default",i=h.get(l);if(i)C.replaceChildren(i.component(x.params));else C.replaceChildren()}}else{b9={},M0.pattern.value="";for(let h of l5)h.replaceChildren()}}var Oy=!1;function Wy(){if(Oy)return;Oy=!0,window.addEventListener("popstate",I0),window.addEventListener("hashchange",I0)}function Sk(y,x={}){S9=x.hashRouting??!1,C5=y.map((h)=>{let{regex:C,paramNames:l}=Hk(h.pattern);return{regex:C,paramNames:l,targets:h.targets,fallback:h.fallback??!1}}),Wy(),I0()}function Mk(y){if(Wy(),S9)window.location.hash="#/"+y.replace(/^\//,"");else window.history.pushState({},"","/"+y.replace(/^\//,""));I0()}class M9 extends F{static preferredTagName="tosi-route-view";static initAttributes={name:"default"};content=null;connectedCallback(){if(super.connectedCallback(),l5.add(this),C5.length>0)I0()}disconnectedCallback(){super.disconnectedCallback(),l5.delete(this)}}var Ik=M9.elementCreator();var{div:ck,slot:sk,label:Tk,span:dk,input:Qy}=G;class d2 extends F{static preferredTagName="tosi-segmented";static formAssociated=!0;static initAttributes={direction:"row",other:"",multiple:!1,name:"",placeholder:"Please specify…",localized:!1,required:!1};_choices=[];get choices(){return this._choices}set choices(y){if(typeof y==="string")this._choices=d2.parseChoicesString(y);else this._choices=y;this.queueRender()}static parseChoicesString(y){return y.split(",").filter((x)=>x.trim()!=="").map((x)=>{let[h,C]=x.split("=").map((g)=>g.trim()),[l,i]=(C||h).split(":").map((g)=>g.trim()),k=i?O[i]():"";return{value:h,icon:k,caption:l}})}value="";formDisabledCallback(y){}formResetCallback(){this.value=""}get values(){return(this.value||"").split(",").map((y)=>y.trim()).filter((y)=>y!=="")}content=()=>[sk(),ck({part:"options"},Qy({part:"custom",hidden:!0}))];static shadowStyleSpec={":host":{display:"inline-flex",gap:P.segmentedOptionGap("8px"),alignItems:P.segmentedAlignItems("center")},":host, :host::part(options)":{flexDirection:P.segmentedDirection("row")},":host label":{display:"inline-grid",alignItems:"center",gap:P.segmentedOptionGap("8px"),gridTemplateColumns:P.segmentedOptionGridColumns("0px 24px 1fr"),padding:P.segmentedOptionPadding("4px 12px"),font:P.segmentedOptionFont("16px")},":host label:focus":{outline:"none",boxShadow:P.segmentedFocusShadow(`inset 0 0 0 2px ${P.segmentedOptionCurrentBackground("#44a")}`),borderRadius:P.segmentedOptionsBorderRadius("8px")},":host label.current":{color:P.segmentedOptionCurrentColor("#eee"),background:P.segmentedOptionCurrentBackground("#44a")},":host label.current:focus":{boxShadow:P.segmentedCurrentFocusShadow(`inset 0 0 0 2px ${P.segmentedOptionCurrentColor("#eee")}`)},":host svg":{height:P.segmentOptionIconSize("16px"),stroke:P.segmentedOptionIconColor("currentColor")},":host label.no-icon":{gap:0,gridTemplateColumns:P.segmentedOptionGridColumns("0px 1fr")},':host input[type="radio"], :host input[type="checkbox"]':{visibility:P.segmentedInputVisibility("hidden")},":host::part(options)":{display:"flex",borderRadius:P.segmentedOptionsBorderRadius("8px"),background:P.segmentedOptionsBackground("#fff"),color:P.segmentedOptionColor("#222"),overflow:"hidden",alignItems:P.segmentedOptionAlignItems("stretch")},":host::part(custom)":{padding:P.segmentedOptionPadding("4px 12px"),color:P.segmentedOptionCurrentColor("#eee"),background:P.segmentedOptionCurrentBackground("#44a"),font:P.segmentedOptionFont("16px"),border:"0",outline:"none"},":host::part(custom)::placeholder":{color:P.segmentedOptionCurrentColor("#eee"),opacity:P.segmentedPlaceholderOpacity(0.75)}};syncCurrent(){let{options:y}=this.parts;y.querySelectorAll("label").forEach((x)=>{let h=x.querySelector("input");x.classList.toggle("current",Boolean(h&&h.checked))})}valueChanged=!1;handleChange=()=>{let{options:y,custom:x}=this.parts;if(this.multiple){let h=[...y.querySelectorAll("input:checked")];this.value=h.map((C)=>C.value).join(",")}else{let h=y.querySelector("input:checked");if(!h)this.value="";else if(h.value)x.setAttribute("hidden",""),this.value=h.value;else x.removeAttribute("hidden"),x.focus(),x.select(),this.value=x.value}this.syncCurrent(),this.valueChanged=!0};handleKey=(y)=>{let x=!1;switch(y.code){case"Space":if(y.target instanceof HTMLLabelElement)y.target.click(),x=!0;break;case"Tab":if(!(y.target instanceof HTMLLabelElement))y.target.closest("label").focus();break;case"ArrowLeft":case"ArrowUp":{let h=y.target.closest("label");if(h.previousElementSibling instanceof HTMLLabelElement)h.previousElementSibling.focus()}x=!0;break;case"ArrowRight":case"ArrowDown":{let h=y.target.closest("label");if(h.nextElementSibling instanceof HTMLLabelElement)h.nextElementSibling.focus()}x=!0;break}if(x)y.preventDefault(),y.stopPropagation()};connectedCallback(){super.connectedCallback();let y=this.getAttribute("choices");if(y&&this._choices.length===0)this._choices=d2.parseChoicesString(y);let{options:x}=this.parts;if(this.name==="")this.name=this.instanceId;if(x.addEventListener("change",this.handleChange),x.addEventListener("keydown",this.handleKey),this.other&&this.multiple)console.warn(this,"is set to [other] and [multiple]; [other] will be ignored"),this.other=""}get _choicesWithOther(){let y=[...this.choices];if(this.other&&!this.multiple){let[x,h]=this.other.split(":");y.push({value:"",caption:x,icon:h})}return y}get isOtherValue(){return Boolean(this.value===""||this.value&&!this._choicesWithOther.find((y)=>y.value===this.value))}render(){if(super.render(),this.valueChanged){this.valueChanged=!1;return}let{options:y,custom:x}=this.parts;y.textContent="";let h=this.multiple?"checkbox":"radio",{values:C,isOtherValue:l}=this;if(y.append(...this._choicesWithOther.map((i)=>{return Tk({tabindex:0},Qy({type:h,name:this.name,value:i.value,checked:C.includes(i.value)||i.value===""&&l,tabIndex:-1}),i.icon||{class:"no-icon"},this.localized?Q1(i.caption):dk(i.caption))})),this.other&&!this.multiple)x.hidden=!l,x.value=l?this.value:"",x.placeholder=this.placeholder,y.append(x);this.syncCurrent()}}var Lk=d2,Xy=d2.elementCreator(),rk=B1((...y)=>Xy(...y),"xinSegmented is deprecated, use tosiSegmented instead (tag is now <tosi-segmented>)");var{slot:$y}=G;class I9 extends F{static preferredTagName="tosi-sizebreak";static initAttributes={minWidth:0,minHeight:0};value="normal";content=[$y({part:"normal"}),$y({part:"small",name:"small"})];static shadowStyleSpec={":host":{display:"inline-block",position:"relative"}};handleResize=()=>{let{normal:y,small:x}=this.parts,h=this.offsetParent;if(!(h instanceof HTMLElement))return;else if(h.offsetWidth<this.minWidth||h.offsetHeight<this.minHeight)y.hidden=!0,x.hidden=!1,this.value="small";else y.hidden=!1,x.hidden=!0,this.value="normal"};connectedCallback(){super.connectedCallback(),globalThis.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),globalThis.removeEventListener("resize",this.handleResize)}}var ok=I9.elementCreator();class i5 extends F{static preferredTagName="tosi-sizer";target=null;static shadowStyleSpec={":host":{_resizeIconFill:"#222",display:"block",position:"absolute",bottom:-7,right:-7,padding:14,width:44,height:44,opacity:0.25,transition:"opacity 0.25s ease-out"},":host(:hover)":{opacity:0.5},":host svg":{width:16,height:16,stroke:z.resizeIconFill}};content=O.resize();get minSize(){let{minWidth:y,minHeight:x}=getComputedStyle(this.target);return{width:parseFloat(y)||32,height:parseFloat(x)||32}}resizeTarget=(y)=>{let{target:x}=this;if(!x)return;let{offsetWidth:h,offsetHeight:C}=x;x.style.left=x.offsetLeft+"px",x.style.top=x.offsetTop+"px",x.style.bottom="",x.style.right="";let{minSize:l}=this;P1(y,(i,k,g)=>{if(x.style.width=Math.max(l.width,h+i)+"px",x.style.height=Math.max(l.height,C+k)+"px",g.type==="mouseup")return!0},"nwse-resize")};connectedCallback(){if(super.connectedCallback(),!this.target)this.target=this.parentElement;let y={passive:!0};this.addEventListener("mousedown",this.resizeTarget,y),this.addEventListener("touchstart",this.resizeTarget,y)}}var nk=i5,Yy=i5.elementCreator(),fk=Yy;var{div:uk,input:Ek,span:ak,button:c9}=G,Ny=(y)=>y.split(/(?<!\\),/).map((x)=>x.trim().replace(/\\,/g,",")),mk=(y)=>y.map((x)=>x.replace(/,/g,"\\,")).join(",");class c0 extends F{static preferredTagName="tosi-tag";static lightStyleSpec={":host":{"--tag-close-button-color":"#000c","--tag-close-button-bg":"#fffc","--tag-button-opacity":"0.5","--tag-button-hover-opacity":"0.75","--tag-bg":P.brandColor("blue"),"--tag-text-color":P.brandTextColor("white"),display:"inline-flex",borderRadius:P.tagRoundedRadius(z.spacing50),color:z.tagTextColor,background:z.tagBg,padding:`0 ${z.spacing75} 0 ${z.spacing75}`,height:`calc(${z.lineHeight} + ${z.spacing50})`,lineHeight:`calc(${z.lineHeight} + ${z.spacing50})`},':host > [part="caption"]':{position:"relative",whiteSpace:"nowrap",overflow:"hidden",flex:"1 1 auto",fontSize:P.fontSize("16px"),color:z.tagTextColor,textOverflow:"ellipsis"},':host [part="remove"]':{boxShadow:"none",margin:`0 ${z.spacing_50} 0 ${z.spacing25}`,padding:0,display:"inline-flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:z.spacing150,width:z.spacing150,color:z.tagCloseButtonColor,background:z.tagCloseButtonBg,borderRadius:P.tagCloseButtonRadius("99px"),opacity:z.tagButtonOpacity},':host [part="remove"]:hover':{background:z.tagCloseButtonBg,opacity:z.tagButtonHoverOpacity}};static initAttributes={caption:"",removeable:!1};removeCallback=()=>{this.remove()};content=()=>[ak({part:"caption"},this.caption),c9(O.x(),{type:"button",part:"remove",hidden:!this.removeable,ariaLabel:`Remove ${this.caption}`,onClick:this.removeCallback})]}var tk=c0,s9=c0.elementCreator(),ek=B1((...y)=>s9(...y),"xinTag is deprecated, use tosiTag instead (tag is now <tosi-tag>)");class L2 extends F{static preferredTagName="tosi-tag-list";static lightStyleSpec={":host":{"--tag-list-bg":"#f8f8f8","--touch-size":"44px","--spacing":"16px",display:"grid",gridTemplateColumns:"auto",alignItems:"center",background:z.tagListBg,gap:z.spacing25,borderRadius:P.taglistRoundedRadius(z.spacing50),overflow:"hidden"},":host[editable]":{gridTemplateColumns:`0px auto ${z.touchSize}`},":host[editable][text-entry]":{gridTemplateColumns:`0px 2fr 1fr ${z.touchSize}`},':host [part="tagContainer"]':{display:"flex",content:'" "',alignItems:"center",background:z.inputBg,borderRadius:P.tagContainerRadius(z.spacing50),boxShadow:z.borderShadow,flexWrap:"nowrap",overflow:"auto hidden",gap:z.spacing25,minHeight:`calc(${z.lineHeight} + ${z.spacing})`,padding:z.spacing25},':host [part="tagMenu"]':{width:z.touchSize,height:z.touchSize,lineHeight:z.touchSize,textAlign:"center",padding:0,margin:0},":host [hidden]":{display:"none !important"},':host button[part="tagMenu"]':{background:z.brandColor,color:z.brandTextColor}};static formAssociated=!0;static initAttributes={name:"",textEntry:!1,editable:!1,placeholder:"enter tags",disabled:!1,required:!1};value="";get tags(){return Ny(this.value).filter((y)=>y!=="")}set tags(y){this.value=mk(y)}_availableTags=[];get availableTags(){return this._availableTags}set availableTags(y){if(typeof y==="string")this._availableTags=L2.parseAvailableTagsString(y);else this._availableTags=y;this.queueRender()}static parseAvailableTagsString(y){return Ny(y).map((x)=>x===""?null:x)}connectedCallback(){super.connectedCallback();let y=this.getAttribute("available-tags");if(y&&this._availableTags.length===0)this._availableTags=L2.parseAvailableTagsString(y)}formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value=""}addTag=(y)=>{let x=y.trim();if(x===""||this.tags.includes(x))return;this.tags=[...this.tags,x],this.queueRender(!0)};toggleTag=(y)=>{if(this.tags.includes(y))this.tags=this.tags.filter((x)=>x!==y),this.queueRender(!0);else this.addTag(y)};enterTag=(y)=>{let{tagInput:x}=this.parts;switch(y.key){case",":{let h=x.value.split(",")[0];this.addTag(h)}break;case"Enter":{let h=x.value.split(",")[0];this.addTag(h)}y.stopPropagation(),y.preventDefault();break;default:}};popSelectMenu=()=>{let{toggleTag:y}=this,{tagMenu:x}=this.parts,h=[...this.availableTags],C=this.tags.filter((i)=>!h.includes(i));if(C.length)h.push(null,...C);let l=h.map((i)=>{if(i===""||i===null)return null;else if(typeof i==="object")return{checked:()=>this.tags.includes(i.value),caption:i.caption,action(){y(i.value)}};else return{checked:()=>this.tags.includes(i),caption:i,action(){y(i)}}});n({target:x,width:"auto",menuItems:l})};content=()=>[c9({type:"button",style:{visibility:"hidden"},tabindex:-1}),uk({part:"tagContainer",class:"row",role:"list",ariaLabel:"Selected tags"}),Ek({part:"tagInput",class:"elastic",ariaLabel:"Enter new tag",onKeydown:this.enterTag}),c9({type:"button",title:"add tag",ariaLabel:"Select tags from list",ariaHaspopup:"listbox",part:"tagMenu",onClick:this.popSelectMenu},O.chevronDown())];removeTag=(y)=>{if(this.editable&&!this.disabled){let x=y.target.closest(c0.tagName);this.tags=this.tags.filter((h)=>h!==x.caption),x.remove(),this.queueRender(!0)}y.stopPropagation(),y.preventDefault()};render(){super.render();let{tagContainer:y,tagMenu:x,tagInput:h}=this.parts;if(x.disabled=this.disabled,h.value="",h.setAttribute("placeholder",this.placeholder),this.editable&&!this.disabled)x.toggleAttribute("hidden",!1),h.toggleAttribute("hidden",!this.textEntry);else x.toggleAttribute("hidden",!0),h.toggleAttribute("hidden",!0);y.textContent="";for(let C of this.tags)y.append(s9({caption:C,removeable:this.editable&&!this.disabled,removeCallback:this.removeTag}))}}var yg=L2,Jy=L2.elementCreator(),xg=B1((...y)=>Jy(...y),"xinTagList is deprecated, use tosiTagList instead (tag is now <tosi-tag-list>)");var Zy="1.7.2";var{span:hg}=G,s0=null,k5=null,g5=null,T1="tosi-tooltip",Cg={[`.${T1}`]:{pointerEvents:"none",padding:P.tosiTooltipPadding("4px 10px"),borderRadius:P.tosiTooltipRadius("6px"),background:P.tosiTooltipBg("#333"),color:P.tosiTooltipColor("#fff"),fontSize:P.tosiTooltipFontSize("13px"),lineHeight:"1.4",maxWidth:P.tosiTooltipMaxWidth("280px"),whiteSpace:"pre-line",boxShadow:"0 2px 8px #0003",position:"relative"},[`.${T1} p`]:{margin:"0"},[`.${T1} code`]:{background:"#fff2",padding:"0 4px",borderRadius:"3px",fontSize:"0.9em"},[`.${T1} a`]:{color:"inherit"},[`.${T1}::before`]:{content:'""',position:"absolute",width:"8px",height:"8px",background:"inherit",transform:"rotate(45deg)"},[`.${T1}.tt-s::before`]:{top:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${T1}.tt-n::before`]:{bottom:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${T1}.tt-e::before`]:{left:"-4px",top:"var(--tosi-tooltip-arrow)"},[`.${T1}.tt-w::before`]:{right:"-4px",top:"var(--tosi-tooltip-arrow)"}},py=!1;function vy(){if(py)return;py=!0,W1("tosi-tooltip",Cg)}function r2(){if(k5!==null)clearTimeout(k5),k5=null;if(s0!==null)s0.remove(),s0=null;g5=null}function lg(y){if(y.startsWith("s"))return"tt-s";if(y.startsWith("n"))return"tt-n";if(y.startsWith("e"))return"tt-e";if(y.startsWith("w"))return"tt-w";return"tt-s"}function ig(y,x,h){let C=x.getBoundingClientRect(),l=y.getBoundingClientRect(),i=C.left+C.width*0.5,k=C.top+C.height*0.5,g;if(h.startsWith("s")||h.startsWith("n"))g=Math.max(8,Math.min(l.width-8,i-l.left))-4;else g=Math.max(8,Math.min(l.height-8,k-l.top))-4;y.style.setProperty("--tosi-tooltip-arrow",g+"px")}function kg(y,x){if(x)y=c(y);let h=hg({class:T1});return h.innerHTML=R.parseInline(y),h}function gg(y,x,h){vy(),r2(),g5=y;let{top:C,left:l,width:i}=y.getBoundingClientRect(),k=l+i*0.5,g=window.innerHeight,w=window.innerWidth,B=(C>g*0.5?"n":"s")+(k>w*0.5?"w":"e"),q=kg(x,h);q.classList.add(lg(B)),s0=q0({content:q,target:y,position:B,remainOnScroll:"remove",remainOnResize:"remove"}),requestAnimationFrame(()=>{if(s0&&g5)ig(q,y,B)})}function wg(y){for(let x of y.composedPath())if(x instanceof HTMLElement&&x.dataset.tooltip)return x;return null}function Bg(y={}){vy();let{convertTitles:x=!0,delay:h=250,localize:C=!1}=y;document.addEventListener("pointermove",(l)=>{if(x){for(let g of l.composedPath())if(g instanceof HTMLElement&&g.title&&!g.dataset.tooltip){g.dataset.tooltip=g.title,g.removeAttribute("title");break}}let i=wg(l);if(i===g5)return;if(r2(),!i)return;let k=i.dataset.tooltip||null;if(!k)return;k5=setTimeout(()=>gg(i,k,C),h)}),document.addEventListener("pointerleave",r2),document.addEventListener("pointerdown",r2),document.addEventListener("keydown",r2),window.addEventListener("scroll",r2,!0)}Object.assign(globalThis,{xinjs:k0,xinjsui:T9});
|
|
209
|
+
`)}var{slot:i9}=U;class F9 extends ${static preferredTagName="tosi-row";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[i9()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"row",gap:_.tosiRowGap("0"),alignItems:_.tosiRowAlign("stretch"),justifyContent:_.tosiRowJustify("flex-start")}};render(){if(super.render(),this.gap)this.style.setProperty("--tosi-row-gap",this.gap);else this.style.removeProperty("--tosi-row-gap");if(this.align)this.style.setProperty("--tosi-row-align",this.align);else this.style.removeProperty("--tosi-row-align");if(this.justify)this.style.setProperty("--tosi-row-justify",this.justify);else this.style.removeProperty("--tosi-row-justify");this.style.flexWrap=this.wrap?"wrap":""}}var Xw=F9.elementCreator();class N9 extends ${static preferredTagName="tosi-column";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[i9()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"column",gap:_.tosiColumnGap("0"),alignItems:_.tosiColumnAlign("stretch"),justifyContent:_.tosiColumnJustify("flex-start")}};render(){if(super.render(),this.gap)this.style.setProperty("--tosi-column-gap",this.gap);else this.style.removeProperty("--tosi-column-gap");if(this.align)this.style.setProperty("--tosi-column-align",this.align);else this.style.removeProperty("--tosi-column-align");if(this.justify)this.style.setProperty("--tosi-column-justify",this.justify);else this.style.removeProperty("--tosi-column-justify");this.style.flexWrap=this.wrap?"wrap":""}}var _w=N9.elementCreator();class W9 extends ${static preferredTagName="tosi-grid";static initAttributes={columns:"",rows:"",gap:""};content=[i9()];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:_.tosiGridColumns("1fr"),gridTemplateRows:_.tosiGridRows("auto"),gap:_.tosiGridGap("0")}};render(){if(super.render(),this.columns)this.style.setProperty("--tosi-grid-columns",this.columns);else this.style.removeProperty("--tosi-grid-columns");if(this.rows)this.style.setProperty("--tosi-grid-rows",this.rows);else this.style.removeProperty("--tosi-grid-rows");if(this.gap)this.style.setProperty("--tosi-grid-gap",this.gap);else this.style.removeProperty("--tosi-grid-gap")}}var Aw=W9.elementCreator(),{span:ly}=U,Kw=(...y)=>ly({style:{flex:"1 1 var(--tosi-space, 0.5em)"}},...y),J9=(...y)=>ly({style:{flex:"0 0 var(--tosi-space, 0.5em)"}},...y);var c1={accent:Y.fromCss("#EE257B"),background:Y.fromCss("#fafafa"),text:Y.fromCss("#222222")},jy={_tosiSpacingXs:"4px",_tosiSpacingSm:"8px",_tosiSpacing:"12px",_tosiSpacingLg:"16px",_tosiSpacingXl:"24px",_tosiFontFamily:"system-ui, -apple-system, sans-serif",_tosiFontSize:"16px",_tosiLineHeight:"1.5",_tosiCodeFontFamily:"ui-monospace, monospace",_tosiCodeFontSize:"14px",_tosiTouchSize:"44px",_tosiBorderRadius:"4px",_tosiBorderRadiusLg:"8px",_tosiTransition:"0.15s ease-out"};function Vy(y){let{accent:x,background:h,text:C}=y,k=y.accentText??x.contrasting(),B=y.backgroundInset??h.darken(0.03),w=y.border??C.opacity(0.15),g=y.shadow??C.opacity(0.1),z=y.focus??x.opacity(0.5);return{_tosiAccent:x,_tosiAccentLight:x.brighten(0.15),_tosiAccentDark:x.darken(0.15),_tosiAccentText:k,_tosiBg:h,_tosiBgInset:B,_tosiBgHover:h.darken(0.05),_tosiBgActive:h.darken(0.1),_tosiText:C,_tosiTextMuted:C.opacity(0.6),_tosiTextDisabled:C.opacity(0.4),_tosiBorder:w,_tosiBorderFocus:x,_tosiShadow:g,_tosiShadowColor:g,_tosiFocusRing:`0 0 0 2px ${z}`,_tosiInputBg:h,_tosiInputBorder:w,_tosiInputBorderFocus:x,_tosiButtonBg:h,_tosiButtonText:C,_tosiButtonBorder:w,_tosiButtonHoverBg:h.darken(0.05),_tosiButtonActiveBg:x,_tosiButtonActiveText:k}}function d2(y){return{":root":{...jy,...Vy(y)}}}function E4(y){let h=d2(y)[":root"];return{":root":w0(h)}}function Z9(y,x="tosi-theme"){O1(x,y)}var Pw=d2(c1),Gw=E4(c1),Xy={"--xin-icon-size":l.tosiIconSize,"--xin-icon-fill":l.tosiIconFill,"--xin-icon-stroke":l.tosiIconStroke,"--xin-tabs-bar-color":l.tosiTabsBarColor,"--xin-tabs-bar-height":l.tosiTabsBarHeight,"--xin-tabs-selected-color":l.tosiTabsSelectedColor,"--spacing":l.tosiSpacing,"--gap":l.tosiSpacingSm,"--touch-size":l.tosiTouchSize,"--background":l.tosiBg,"--text-color":l.tosiText,"--brand-color":l.tosiAccent,"--brand-text-color":l.tosiAccentText};function Uw(y){return{":root":{...d2(y)[":root"],...Xy}}}function Qw(y,x){let h={};for(let[C,k]of Object.entries(x)){let B=`--tosi-${y}-${C.replace(/([A-Z])/g,"-$1").toLowerCase()}`;h[C]=`var(${B}, ${k})`}return h}var{div:f2,label:o4,input:a4,span:$w,button:_y}=U,{liveTheme:s}=t({liveTheme:{accent:String(c1.accent),background:String(c1.background),text:String(c1.text),dark:!1}}),t4=!1;function v0(){if(!t4)return;let y={accent:Y.fromCss(s.accent.value),background:Y.fromCss(s.background.value),text:Y.fromCss(s.text.value)},x=s.dark.value?E4(y):d2(y);Z9(x,"tosi-live-theme")}function Ay(){if(t4)return;t4=!0,s.accent.observe(v0),s.background.observe(v0),s.text.observe(v0),s.dark.observe(v0),v0()}function Ow(){t4=!1}class R9 extends ${static preferredTagName="tosi-theme-editor";static shadowStyleSpec={":host":{display:"block",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"14px",lineHeight:"1.5",background:"#ffffff",color:"#222222",padding:"16px",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",maxWidth:"320px"},":host .field":{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},":host label":{flex:"1",fontWeight:"500"},':host input[type="color"]':{width:"48px",height:"32px",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",padding:"2px"},':host input[type="checkbox"]':{width:"18px",height:"18px",cursor:"pointer"},":host .preview":{marginTop:"12px",padding:"12px",borderRadius:"4px",transition:"all 0.15s ease-out"},":host .preview-button":{border:"none",padding:"6px 12px",borderRadius:"4px",cursor:"pointer",fontFamily:"inherit",fontSize:"13px"},":host .actions":{marginTop:"8px",display:"flex",gap:"8px"},":host .actions button":{flex:"1",padding:"6px 12px",border:"1px solid #ccc",borderRadius:"4px",background:"#f5f5f5",color:"#222",cursor:"pointer",fontFamily:"inherit",fontSize:"13px"},":host .actions button:hover":{background:"#e8e8e8"}};content=()=>[f2({class:"field"},o4("Accent"),a4({type:"color",part:"accent"})),f2({class:"field"},o4("Background"),a4({type:"color",part:"background"})),f2({class:"field"},o4("Text"),a4({type:"color",part:"text"})),f2({class:"field"},o4("Dark mode"),a4({type:"checkbox",part:"dark"})),f2({class:"preview",part:"preview",style:{background:"var(--tosi-bg, #fafafa)",color:"var(--tosi-text, #222)"}},$w("Preview "),_y({class:"preview-button",style:{background:"var(--tosi-accent, #EE257B)",color:"var(--tosi-accent-text, white)"}},"Button")),f2({class:"actions"},_y({part:"reset"},"Reset"))];connectedCallback(){super.connectedCallback(),Ay();let y=()=>{this.parts.accent.value=s.accent.value,this.parts.background.value=s.background.value,this.parts.text.value=s.text.value,this.parts.dark.checked=s.dark.value};y(),s.accent.observe(y),s.background.observe(y),s.text.observe(y),s.dark.observe(y),this.parts.accent.addEventListener("input",()=>{s.accent.value=this.parts.accent.value}),this.parts.background.addEventListener("input",()=>{s.background.value=this.parts.background.value}),this.parts.text.addEventListener("input",()=>{s.text.value=this.parts.text.value}),this.parts.dark.addEventListener("change",()=>{s.dark.value=this.parts.dark.checked}),this.parts.reset.addEventListener("click",()=>{s.accent.value=String(c1.accent),s.background.value=String(c1.background),s.text.value=String(c1.text),s.dark.value=!1})}}var Yw=R9.elementCreator();var{div:iw}=U;class Q2 extends ${static preferredTagName="tosi-map";static formAssociated=!0;static initAttributes={coords:"65.01715565258993,25.48081004203459,12",token:"",mapStyle:"mapbox://styles/mapbox/streets-v12",name:""};value="";formDisabledCallback(y){}formResetCallback(){this.value="",this.coords="65.01715565258993,25.48081004203459,12"}content=iw({style:{width:"100%",height:"100%"}});get map(){return this._map}static mapboxCSSAvailable;static mapboxAvailable;_map;_mapPending=!1;static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"400px",height:"400px",textAlign:"left"}};constructor(){super();if(Q2.mapboxCSSAvailable===void 0)Q2.mapboxCSSAvailable=q4("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.css").catch((y)=>{console.error("failed to load mapbox-gl.css",y)}),Q2.mapboxAvailable=S1("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.js").catch((y)=>{console.error("failed to load mapbox-gl.js",y)})}connectedCallback(){if(super.connectedCallback(),!this.token)console.error("mapbox requires an access token which you can provide via the token attribute")}_lastCoords="";_lastStyle="";render(){if(super.render(),!this.token)return;if(this._map){if(this.coords!==this._lastCoords){let[x,h,C]=this.coords.split(",").map((k)=>Number(k));this._map.setCenter([h,x]),this._map.setZoom(C),this._lastCoords=this.coords}if(this.mapStyle!==this._lastStyle)this._map.setStyle(this.mapStyle),this._lastStyle=this.mapStyle;return}if(this._mapPending)return;this._mapPending=!0;let{div:y}=this.parts;Q2.mapboxAvailable.then(({mapboxgl:x})=>{console.log("%cmapbox may complain about missing css -- don't panic!","background: orange; color: black; padding: 0 5px;");let[h,C,k]=this.coords.split(",").map((B)=>Number(B));x.accessToken=this.token,this._map=new x.Map({container:y,style:this.mapStyle,zoom:k,center:[C,h]}),this._lastCoords=this.coords,this._lastStyle=this.mapStyle,this._mapPending=!1,this._map.on("render",()=>this._map.resize()),this._map.on("moveend",()=>{let B=this._map.getCenter(),w=this._map.getZoom(),g=`${B.lat.toFixed(6)},${B.lng.toFixed(6)},${w.toFixed(1)}`;if(g!==this.value){if(this.internals)this.internals.setFormValue(g)}})}).catch((x)=>{this._mapPending=!1,console.error("tosi-map: mapbox failed to load",x)})}}var Fw=Q2.elementCreator();function Ky(y,x){if(x==null)x="";else if(typeof x!=="string")x=String(x);return x.replace(/\{\{([^}]+)\}\}/g,(h,C)=>{let k=k1[`${y}${C.startsWith("[")?C:"."+C}`];return k===void 0?h:Ky(y,String(k))})}class e4 extends ${static preferredTagName="tosi-md";static initAttributes={src:"",elements:!1};context={};value="";content=null;options={};connectedCallback(){if(super.connectedCallback(),this.src!=="")(async()=>{let y=await fetch(this.src);this.value=await y.text()})();else if(this.value==="")if(this.elements)this.value=this.innerHTML;else this.value=this.textContent!=null?this.textContent:""}didRender=()=>{};render(){super.render(),k1[this.instanceId]=typeof this.context==="string"?JSON.parse(this.context):this.context;let y=Ky(this.instanceId,this.value);if(this.elements){let x=y.split(`
|
|
210
|
+
`).reduce((h,C)=>{if(C.startsWith("<")||h.length===0)h.push(C);else{let k=h[h.length-1];if(!k.startsWith("<")||!k.endsWith(">"))h[h.length-1]+=`
|
|
211
|
+
`+C;else h.push(C)}return h},[]);this.innerHTML=x.map((h)=>h.startsWith("<")&&h.endsWith(">")?h:H(h,this.options)).join("")}else this.innerHTML=H(y,this.options);this.didRender()}}var Nw=e4,D9=e4.elementCreator(),Ww=D9,Jw=D9;var{div:H9,span:y5,button:v9}=U,M0=86400000,Zw=[0,1,2,3,4,5,6],Rw=[1,2,3,4,5,6,7,8,9,10,11,12],M9=(y,x=2,h="0")=>String(y).padStart(x,h),S0=(y,x,h)=>new Date(`${y}-${M9(x)}-${M9(h)}`);class S9 extends ${static preferredTagName="tosi-month";static lightStyleSpec={":host":{display:"block"},":host [part=header]":{display:"flex",alignItems:"stretch",justifyContent:"stretch"},":host[disabled]":{pointerEvents:"none",opacity:_.disabledOpacity(0.6)},':host [part="month"], :host [part="year"]':{_fieldWidth:"4em",flex:"1"},":host [part=week], :host [part=days]":{display:"grid",gridTemplateColumns:"auto auto auto auto auto auto auto",justifyItems:"stretch"},":host .today":{background:_.monthTodayBackground("transparent"),boxShadow:_.monthTodayShadow("none"),backdropFilter:_.monthTodayBackdropFilter("brightness(0.9)"),fontWeight:_.monthTodayFontWeight("800")},":host .day, :host .date":{padding:5,display:"flex",justifyContent:"center",userSelect:"none"},":host .day":{color:_.monthDayColor("hotpink"),background:_.monthDayBackground("white"),fontWeight:_.monthDayFontWeight("800")},":host .date":{cursor:"default"},":host .weekend":{background:_.monthWeekendBackground("#eee")},":host .date:not(.in-month)":{opacity:0.5},":host .date.checked":{color:_.monthDateCheckedColor("white"),background:_.monthDateCheckedBackground("hotpink")},":host:not([range]) .date.checked":{borderRadius:_.monthDateCheckedBorderRadius("10px")},":host .range-start":{borderTopLeftRadius:_.monthDateCheckedBorderRadius("10px"),borderBottomLeftRadius:_.monthDateCheckedBorderRadius("10px")},":host .range-end":{borderTopRightRadius:_.monthDateCheckedBorderRadius("10px"),borderBottomRightRadius:_.monthDateCheckedBorderRadius("10px")}};static formAssociated=!0;static initAttributes={month:NaN,year:NaN,weekStart:0,minDate:S0(new Date().getFullYear()-100,1,1).toISOString().split("T")[0],maxDate:S0(new Date().getFullYear()+10,12,31).toISOString().split("T")[0],selectable:!1,multiple:!1,range:!1,disabled:!1,readonly:!1,required:!1,name:""};selectedDays=[];value="";formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value="",this.selectedDays=[]}get endDay(){return 1-this.weekStart}get months(){return Rw.map((y)=>({caption:S0(2025,y,1).toString().split(" ")[1],value:String(y)}))}get years(){let y=Number(this.minDate.split("-")[0]),x=Number(this.maxDate.split("-")[0]),h=[];for(let C=y;C<=x;C++)h.push(String(C));return h}monthChanged=(y,x)=>{};gotoMonth(y,x){if(this.month!==x||this.year!==y)this.month=x,this.year=y,this.monthChanged(y,x)}setMonth=()=>{this.gotoMonth(Number(this.parts.year.value),Number(this.parts.month.value))};get to(){return this.selectedDays[1]||""}set to(y){this.selectedDays[1]=y,this.selectedDays.splice(2)}get from(){return this.selectedDays[0]||""}set from(y){this.selectedDays[0]=y,this.selectedDays.splice(2)}clickDate=(y)=>{let x=y.target.getAttribute("title");this.selectDate(x)};keyDate=(y)=>{let x=!1;switch(y.code){case"Space":{let h=y.target.getAttribute("title");this.selectDate(h),x=!0;break}case"Tab":break;default:console.log(y)}if(x)y.preventDefault(),y.stopPropagation()};#y="";selectDate=(y)=>{if(this.#y=y,this.range){if(!this.to)this.selectedDays=[y,y];else if(this.from===y&&this.to===y)this.selectedDays=[];else if(this.from===y)this.from=this.to;else if(this.to===y)this.to=this.from;else if(y<this.from)this.from=y;else if(y>this.to)this.to=y;else this.to=y;this.value=`${this.from},${this.to}`}else if(this.multiple){if(this.selectedDays.includes(y))this.selectedDays.splice(this.selectedDays.indexOf(y),1);else this.selectedDays.push(y),this.selectedDays.sort();this.value=this.selectedDays.join(",")}else if(this.selectable)if(this.selectedDays.includes(y))this.value="",this.selectedDays=[];else this.value=y,this.selectedDays=[y]};nextMonth=()=>{if(this.month<12)this.gotoMonth(this.year,this.month+1);else this.gotoMonth(this.year+1,1)};previousMonth=()=>{if(this.month>1)this.gotoMonth(this.year,this.month-1);else this.gotoMonth(this.year-1,12)};checkDay=(y)=>{if(!this.range)return this.selectedDays.includes(y);else if(this.range)return this.from&&y>=this.from&&y<=this.to;return!1};dateMenuItem=(y,x="")=>{return y=y.split("T")[0],{caption:x||y,enabled:()=>!y.startsWith(`${this.year}-${M9(this.month)}-`),action:()=>{this.gotoDate(y)}}};jumpMenu=()=>{r({target:this.parts.jump,menuItems:[this.dateMenuItem(new Date().toISOString(),"This Month"),...this.selectedDays.length===0?[]:[null],...this.selectedDays.map((y)=>this.dateMenuItem(y))]})};content=()=>[H9({part:"header"},v9({part:"previous",onClick:this.previousMonth},Q.chevronLeft()),y5({style:{flex:"1"}}),v9({part:"jump",onClick:this.jumpMenu},Q.calendar()),Q1({part:"month",options:this.months,onChange:this.setMonth}),Q1({part:"year",options:[this.year],onChange:this.setMonth}),y5({style:{flex:"1"}}),v9({part:"next",onClick:this.nextMonth},Q.chevronRight())),H9({part:"week"}),H9({part:"days"})];gotoDate(y){let x=new Date(y);this.gotoMonth(x.getFullYear(),x.getMonth()+1)}connectedCallback(){super.connectedCallback();let y=new Date(this.value.split(",").pop()||Date.now());if(isNaN(this.month))this.month=y.getMonth()+1;if(isNaN(this.year))this.year=y.getFullYear()}days=[];render(){super.render();let{week:y,days:x,jump:h,month:C,year:k,previous:B,next:w}=this.parts;this.selectedDays=this.value?this.value.split(","):[];let g=S0(this.year,this.month,1),z=new Date(g.valueOf()-(7+g.getDay()-this.weekStart)%7*M0),q=this.month===12?1:this.month+1,j=new Date(S0(this.year+(this.month===12?1:0),q,1).valueOf()-M0),V=new Date(j.valueOf()+(this.weekStart*2+5+this.endDay-j.getDay())%7*M0),A=Zw.map((F)=>new Date(z.valueOf()+F*M0).toString().split(" ")[0]);this.days=[];let P=new Date().toISOString().split("T")[0];for(let F=z.valueOf();F<=V.valueOf();F+=M0){let Z=new Date(F),R=Z.toISOString().split("T")[0];this.days.push({date:Z,selected:!1,inMonth:Z.getMonth()+1===this.month,isToday:R===P,isWeekend:Z.getDay()%6===0,inRange:!!(this.from&&R>=this.from&&R<=this.to)})}C.value=String(this.month),k.value=String(this.year),C.disabled=k.disabled=h.disabled=B.disabled=w.disabled=this.disabled||this.readonly,k.options=this.years,y.textContent="",y.append(...A.map((F)=>y5({class:"day"},F))),x.textContent="";let G=null,{to:i,from:N}=this;x.append(...this.days.map((F)=>{let Z=["date"];if(F.inMonth)Z.push("in-month");if(F.isToday)Z.push("today");let R=F.date.toISOString().split("T")[0];if(this.checkDay(R))Z.push("checked");if(Z.push(F.isWeekend?"weekend":"weekday"),this.range){if(i===R)Z.push("range-end");if(N===R)Z.push("range-start")}let c=y5({class:Z.join(" "),title:R,onClick:this.clickDate,onKeydown:this.keyDate,tabindex:"0"},F.date.getDate());if(R===this.#y)G=c;return c})),G?.focus()}}var Dw=S9.elementCreator();var Py=async(y,x="SHA-1")=>{let C=new TextEncoder().encode(y),k=await crypto.subtle.digest(x,C);return Array.from(new Uint8Array(k)).map((g)=>g.toString(16).padStart(2,"0")).join("")},Gy=async(y)=>{let x=await Py(y),h=await fetch(`https://weakpass.com/api/v1/search/${x}`);if(h.ok){let C=await h.json();console.log("password found in weakpass database",C)}return h.status!==404},{span:I9,tosiSlot:Hw}=U;class x5 extends ${static preferredTagName="tosi-password-strength";static lightStyleSpec={":host":{display:"inline-flex",flexDirection:"column",gap:l.spacing50,position:"relative"},":host tosi-slot":{display:"flex"},':host [part="meter"]':{display:"block",position:"relative",height:_.meterHeight("24px"),background:_.indicatorBg("white"),borderRadius:_.meterRadius("4px"),boxShadow:_.meterShadow(`inset 0 0 0 2px ${l.indicatorColor}`)},':host [part="level"]':{height:_.levelHeight("20px"),content:'" "',display:"inline-block",width:0,transition:"0.15s ease-out",background:l.indicatorColor,margin:_.levelMargin("2px"),borderRadius:_.levelRadius("2px")},':host [part="description"]':{position:"absolute",inset:"0",color:l.descriptionColor,height:_.meterHeight("24px"),lineHeight:_.meterHeight("24px"),textAlign:"center"}};static initAttributes={minLength:8,goodLength:12,indicatorColors:"#f00,#f40,#f80,#ef0,#8f0,#0a2"};descriptionColors="#000,#000,#000,#000,#000,#fff";issues={tooShort:!0,short:!0,noUpper:!0,noLower:!0,noNumber:!0,noSpecial:!0};issueDescriptions={tooShort:"too short",short:"short",noUpper:"no upper case",noLower:"no lower case",noNumber:"no digits",noSpecial:"no unusual characters"};value=0;strengthDescriptions=["unacceptable","very weak","weak","moderate","strong","very strong"];strength(y){return this.issues={tooShort:y.length<this.minLength,short:y.length<this.goodLength,noUpper:!y.match(/[A-Z]/),noLower:!y.match(/[a-z]/),noNumber:!y.match(/[0-9]/),noSpecial:!y.match(/[^a-zA-Z0-9]/)},this.issues.tooShort?0:Object.values(this.issues).filter((x)=>!x).length-1}async isBreached(){let y=this.querySelector("input")?.value;if(!y||typeof y!=="string")return!0;return await Gy(y)}updateIndicator=(y)=>{let{level:x,description:h}=this.parts,C=this.indicatorColors.split(","),k=this.descriptionColors.split(","),B=this.strength(y);if(this.value!==B)this.value=B,this.dispatchEvent(new Event("change"));x.style.width=`${(B+1)*16.67}%`,this.style.setProperty("--indicator-color",C[B]),this.style.setProperty("--description-color",k[B]),h.textContent=this.strengthDescriptions[B]};update=(y)=>{let x=y.target.closest("input");this.updateIndicator(x?.value||"")};content=()=>[Hw({onInput:this.update}),I9({part:"meter"},I9({part:"level"}),I9({part:"description"}))];render(){super.render();let y=this.querySelector("input");this.updateIndicator(y?.value)}}var vw=x5,Uy=x5.elementCreator(),Mw=Uy;var{span:b9}=U;class h5 extends ${static preferredTagName="tosi-rating";static formAssociated=!0;static initAttributes={max:5,min:1,icon:"star",step:1,ratingStroke:"#e81",ratingFill:"#f91",emptyStroke:"#ccc",emptyFill:"#ccc",readonly:!1,iconSize:24,hollow:!1,required:!1,name:""};value="";formDisabledCallback(y){this.readonly=y}formResetCallback(){this.value=""}static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"fit-content"},":host::part(container)":{position:"relative",display:"inline-block"},":host::part(empty), :host::part(filled)":{height:"100%",whiteSpace:"nowrap",overflow:"hidden"},":host::part(empty)":{pointerEvents:"none"},":host::part(filled)":{position:"absolute",left:0,transition:"width 0.15s ease-out"},":host svg":{transform:"scale(0.9)",pointerEvents:"all !important",transition:"0.25s ease-in-out"},":host svg:hover":{transform:"scale(1)"},":host svg:active":{transform:"scale(1.1)"}};content=()=>b9({part:"container"},b9({part:"empty"}),b9({part:"filled"}));displayValue(y){let{empty:x,filled:h}=this.parts,k=Math.round((typeof y==="string"?0:y||0)/this.step)*this.step;h.style.width=k/this.max*x.offsetWidth+"px"}update=(y)=>{if(this.readonly)return;let{empty:x}=this.parts,h=y instanceof MouseEvent?y.pageX-x.getBoundingClientRect().x:0,C=Math.min(Math.max(this.min,Math.round(h/x.offsetWidth*this.max/this.step+this.step*0.5)*this.step),this.max);if(y.type==="click")this.value=C;else if(y.type==="mousemove")this.displayValue(C);else this.displayValue(this.value||0)};handleKey=(y)=>{let x=this.value===""?NaN:Number(this.value);if(isNaN(x))x=Math.round((this.min+this.max)*0.5*this.step)*this.step;let h=!1;switch(y.key){case"ArrowUp":case"ArrowRight":x+=this.step,h=!0;break;case"ArrowDown":case"ArrowLeft":x-=this.step,h=!0;break}if(this.value=Math.max(Math.min(x,this.max),this.min),h)y.stopPropagation(),y.preventDefault()};connectedCallback(){super.connectedCallback();let{container:y}=this.parts;y.tabIndex=0,y.addEventListener("mousemove",this.update,!0),y.addEventListener("mouseleave",this.update),y.addEventListener("blur",this.update),y.addEventListener("click",this.update),y.addEventListener("keydown",this.handleKey)}_renderedIcon="";render(){super.render();let y=this.iconSize+"px";if(this.style.setProperty("--tosi-icon-size",y),this.readonly)this.role="image";else this.role="slider";this.ariaLabel=`rating ${this.value} out of ${this.max}`,this.ariaValueMax=String(this.max),this.ariaValueMin=String(this.min),this.ariaValueNow=this.value===""?String(-1):String(this.value);let{empty:x,filled:h}=this.parts;if(x.style.setProperty("--tosi-icon-fill",this.hollow?"none":this.emptyFill),x.style.setProperty("--tosi-icon-stroke",this.emptyStroke),h.style.setProperty("--tosi-icon-fill",this.ratingFill),h.style.setProperty("--tosi-icon-stroke",this.ratingStroke),this._renderedIcon!==this.icon){this._renderedIcon=this.icon;for(let C=0;C<this.max;C++)x.append(Q[this.icon]()),h.append(Q[this.icon]())}this.displayValue(this.value)}}var Sw=h5,Qy=h5.elementCreator(),Iw=l1((...y)=>Qy(...y),"xinRating is deprecated, use tosiRating instead (tag is now <tosi-rating>)");var{tosiSlot:$y,div:bw,button:Tw}=U,pw=[{caption:"Title",tagType:"H1"},{caption:"Heading",tagType:"H2"},{caption:"Subheading",tagType:"H3"},{caption:"Minor heading",tagType:"H4"},{caption:"Body",tagType:"P"},{caption:"Code Block",tagType:"PRE"}];function T9(y=pw){return Q1({title:"paragraph style",slot:"toolbar",class:"block-style",options:y.map(({caption:x,tagType:h})=>({caption:x,value:`formatBlock,${h}`}))})}var I0=()=>J9({slot:"toolbar"});function R1(y,x,h){return Tw({slot:"toolbar",dataCommand:x,title:y},h)}var Lw=()=>[R1("left-justify","justifyLeft",Q.alignLeft()),R1("center","justifyCenter",Q.alignCenter()),R1("right-justify","justifyRight",Q.alignRight()),I0(),R1("bullet list","insertUnorderedList",Q.listBullet()),R1("numbered list","insertOrderedList",Q.listNumber()),I0(),R1("indent","indent",Q.indent()),R1("indent","outdent",Q.outdent())],Oy=()=>[R1("bold","bold",Q.fontBold()),R1("italic","italic",Q.fontItalic()),R1("underline","underline",Q.fontUnderline())],cw=()=>[T9(),I0(),...Oy()],Yy=()=>[T9(),I0(),...Lw(),I0(),...Oy()];class C5 extends ${static preferredTagName="tosi-rich-text";static lightStyleSpec={":host":{display:"flex",flexDirection:"column",height:"100%"},':host [part="toolbar"]':{padding:4,display:"flex",gap:"0px",flex:"0 0 auto",flexWrap:"wrap"},':host [part="toolbar"] > button':{_xinIconSize:18}};static formAssociated=!0;static initAttributes={widgets:"default",name:"",required:!1};isInitialized=!1;savedValue="";formDisabledCallback(y){if(this.isInitialized)this.parts.doc.contentEditable=y?"false":"true"}formResetCallback(){this.value=""}_value="";get value(){return this.isInitialized?this.parts.doc.innerHTML:this._value}set value(y){let x=this._value;if(this._value=y,this.isInitialized){if(this.parts.doc.innerHTML!==y)this.parts.doc.innerHTML=y}if(x!==y&&this.internals)this.internals.setFormValue(y)}blockElement(y){let{doc:x}=this.parts;while(y.parentElement!==null&&y.parentElement!==x)y=y.parentElement;return y.parentElement===x?y:void 0}get selectedBlocks(){let{doc:y}=this.parts,x=window.getSelection();if(x===null)return[];let h=[];for(let C=0;C<x.rangeCount;C++){let k=x.getRangeAt(C);if(!y.contains(k.commonAncestorContainer))continue;let B=this.blockElement(k.startContainer),w=this.blockElement(k.endContainer);h.push(B);while(B!==w&&B!==null)B=B.nextElementSibling,h.push(B)}return h}get selectedText(){let y=window.getSelection();if(y===null)return"";return this.selectedBlocks.length?y.toString():""}selectionChange=()=>{};_updatingBlockStyle=!1;handleSelectChange=(y)=>{if(this._updatingBlockStyle)return;let h=y.target?.closest(I1.tagName);if(h==null)return;this.doCommand(h.value)};handleButtonClick=(y)=>{let h=y.target?.closest("button");if(h==null)return;this.doCommand(h.dataset.command)};content=[$y({name:"toolbar",part:"toolbar",onClick:this.handleButtonClick,onChange:this.handleSelectChange}),bw({part:"doc",contenteditable:!0,style:{flex:"1 1 auto",outline:"none"}}),$y({part:"content"})];doCommand(y){if(y===void 0)return;let x=y.split(",");console.log("execCommand",x[0],!1,...x.slice(1)),document.execCommand(x[0],!1,...x.slice(1))}updateBlockStyle(){let y=this.parts.toolbar.querySelector(".block-style");if(y===null)return;let x=this.selectedBlocks.map((h)=>h.tagName);x=[...new Set(x)],this._updatingBlockStyle=!0,y.value=x.length===1?`formatBlock,${x[0]}`:"",this._updatingBlockStyle=!1}hasContent(){return(this.parts.doc.textContent||"").trim().length>0}handleInput=()=>{if(this.internals)this.internals.setFormValue(this.parts.doc.innerHTML),this.updateValidity()};updateValidity(){if(this.internals)if(this.required&&!this.hasContent())this.internals.setValidity({valueMissing:!0},"Please enter some content",this.parts.doc);else this.internals.setValidity({})}connectedCallback(){super.connectedCallback();let{doc:y,content:x}=this.parts;if(x.innerHTML!==""&&y.innerHTML==="")y.innerHTML=x.innerHTML,x.innerHTML="";this.isInitialized=!0,x.style.display="none",y.addEventListener("input",this.handleInput),this.updateValidity(),document.addEventListener("selectionchange",(h)=>{this.updateBlockStyle(),this.selectionChange(h,this)})}render(){let{toolbar:y}=this.parts;if(super.render(),y.children.length===0)switch(this.widgets){case"minimal":y.append(...cw());break;case"default":y.append(...Yy());break}}}var dw=C5,iy=C5.elementCreator(),fw=l1((...y)=>iy(...y),"richText is deprecated, use tosiRichText instead (tag is now <tosi-rich-text>)");var{router:b0}=t({router:{path:"",hash:"",pattern:""}}),p9={};function sw(){return{...p9}}var k5=[],L9=!1,B5=new Set;function uw(y){let x=[];if(y==="")return{regex:/^\/?$/,paramNames:x};let h=y.split("/").map((k)=>{if(k.startsWith(":"))return x.push(k.slice(1)),"([^/]+)";return k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});return{regex:new RegExp("^/?"+h.join("/")+"/?$"),paramNames:x}}function rw(y){let x=y.split("?")[0].split("#")[0];for(let C of k5){if(C.fallback)continue;let k=x.match(C.regex);if(k){let B={};return C.paramNames.forEach((w,g)=>{B[w]=decodeURIComponent(k[g+1])}),{route:C,params:B}}}let h=k5.find((C)=>C.fallback);if(h)return{route:h,params:{}};return null}function T0(){let y=L9?window.location.hash.replace(/^#\/?/,""):window.location.pathname;b0.path.value=y,b0.hash.value=window.location.hash;let x=rw(y);if(x){p9=x.params,b0.pattern.value=x.route.regex.source;let h=new Map;for(let C of x.route.targets)h.set(C.view??"default",C);for(let C of B5){let k=C.name||"default",B=h.get(k);if(B)C.replaceChildren(B.component(x.params));else C.replaceChildren()}}else{p9={},b0.pattern.value="";for(let h of B5)h.replaceChildren()}}var Fy=!1;function Ny(){if(Fy)return;Fy=!0,window.addEventListener("popstate",T0),window.addEventListener("hashchange",T0)}function mw(y,x={}){L9=x.hashRouting??!1,k5=y.map((h)=>{let{regex:C,paramNames:k}=uw(h.pattern);return{regex:C,paramNames:k,targets:h.targets,fallback:h.fallback??!1}}),Ny(),T0()}function nw(y){if(Ny(),L9)window.location.hash="#/"+y.replace(/^\//,"");else window.history.pushState({},"","/"+y.replace(/^\//,""));T0()}class c9 extends ${static preferredTagName="tosi-route-view";static initAttributes={name:"default"};content=null;connectedCallback(){if(super.connectedCallback(),B5.add(this),k5.length>0)T0()}disconnectedCallback(){super.disconnectedCallback(),B5.delete(this)}}var Ew=c9.elementCreator();var{div:ow,slot:aw,label:tw,span:ew,input:Wy}=U;class s2 extends ${static preferredTagName="tosi-segmented";static formAssociated=!0;static initAttributes={direction:"row",other:"",multiple:!1,name:"",placeholder:"Please specify…",localized:!1,required:!1};_choices=[];get choices(){return this._choices}set choices(y){if(typeof y==="string")this._choices=s2.parseChoicesString(y);else this._choices=y;this.queueRender()}static parseChoicesString(y){return y.split(",").filter((x)=>x.trim()!=="").map((x)=>{let[h,C]=x.split("=").map((g)=>g.trim()),[k,B]=(C||h).split(":").map((g)=>g.trim()),w=B?Q[B]():"";return{value:h,icon:w,caption:k}})}value="";formDisabledCallback(y){}formResetCallback(){this.value=""}get values(){return(this.value||"").split(",").map((y)=>y.trim()).filter((y)=>y!=="")}content=()=>[aw(),ow({part:"options"},Wy({part:"custom",hidden:!0}))];static shadowStyleSpec={":host":{display:"inline-flex",gap:_.segmentedOptionGap("8px"),alignItems:_.segmentedAlignItems("center")},":host, :host::part(options)":{flexDirection:_.segmentedDirection("row")},":host label":{display:"inline-grid",alignItems:"center",gap:_.segmentedOptionGap("8px"),gridTemplateColumns:_.segmentedOptionGridColumns("0px 24px 1fr"),padding:_.segmentedOptionPadding("4px 12px"),font:_.segmentedOptionFont("16px")},":host label:focus":{outline:"none",boxShadow:_.segmentedFocusShadow(`inset 0 0 0 2px ${_.segmentedOptionCurrentBackground("#44a")}`),borderRadius:_.segmentedOptionsBorderRadius("8px")},":host label.current":{color:_.segmentedOptionCurrentColor("#eee"),background:_.segmentedOptionCurrentBackground("#44a")},":host label.current:focus":{boxShadow:_.segmentedCurrentFocusShadow(`inset 0 0 0 2px ${_.segmentedOptionCurrentColor("#eee")}`)},":host svg":{height:_.segmentOptionIconSize("16px"),stroke:_.segmentedOptionIconColor("currentColor")},":host label.no-icon":{gap:0,gridTemplateColumns:_.segmentedOptionGridColumns("0px 1fr")},':host input[type="radio"], :host input[type="checkbox"]':{visibility:_.segmentedInputVisibility("hidden")},":host::part(options)":{display:"flex",borderRadius:_.segmentedOptionsBorderRadius("8px"),background:_.segmentedOptionsBackground("#fff"),color:_.segmentedOptionColor("#222"),overflow:"hidden",alignItems:_.segmentedOptionAlignItems("stretch")},":host::part(custom)":{padding:_.segmentedOptionPadding("4px 12px"),color:_.segmentedOptionCurrentColor("#eee"),background:_.segmentedOptionCurrentBackground("#44a"),font:_.segmentedOptionFont("16px"),border:"0",outline:"none"},":host::part(custom)::placeholder":{color:_.segmentedOptionCurrentColor("#eee"),opacity:_.segmentedPlaceholderOpacity(0.75)}};syncCurrent(){let{options:y}=this.parts,{values:x,isOtherValue:h}=this;y.querySelectorAll("label").forEach((C)=>{let k=C.querySelector("input")?.value??"";C.classList.toggle("current",x.includes(k)||k===""&&h)})}handleChange=()=>{let{options:y,custom:x}=this.parts;if(this.multiple){let h=[...y.querySelectorAll("input:checked")];this.value=h.map((C)=>C.value).join(",")}else{let h=y.querySelector("input:checked");if(!h)this.value="";else if(h.value)x.setAttribute("hidden",""),this.value=h.value;else x.removeAttribute("hidden"),x.focus(),x.select(),this.value=x.value}this.syncCurrent()};handleKey=(y)=>{let x=!1;switch(y.code){case"Space":if(y.target instanceof HTMLLabelElement)y.target.click(),x=!0;break;case"Tab":if(!(y.target instanceof HTMLLabelElement))y.target.closest("label").focus();break;case"ArrowLeft":case"ArrowUp":{let h=y.target.closest("label");if(h.previousElementSibling instanceof HTMLLabelElement)h.previousElementSibling.focus()}x=!0;break;case"ArrowRight":case"ArrowDown":{let h=y.target.closest("label");if(h.nextElementSibling instanceof HTMLLabelElement)h.nextElementSibling.focus()}x=!0;break}if(x)y.preventDefault(),y.stopPropagation()};connectedCallback(){super.connectedCallback();let y=this.getAttribute("choices");if(y&&this._choices.length===0)this._choices=s2.parseChoicesString(y);let{options:x}=this.parts;if(this.name==="")this.name=this.instanceId;if(x.addEventListener("change",this.handleChange),x.addEventListener("keydown",this.handleKey),this.other&&this.multiple)console.warn(this,"is set to [other] and [multiple]; [other] will be ignored"),this.other=""}get _choicesWithOther(){let y=[...this.choices];if(this.other&&!this.multiple){let[x,h]=this.other.split(":");y.push({value:"",caption:x,icon:h})}return y}get isOtherValue(){return Boolean(this.value===""||this.value&&!this._choicesWithOther.find((y)=>y.value===this.value))}render(){super.render();let{options:y,custom:x}=this.parts,h=this.multiple?"checkbox":"radio",{values:C,isOtherValue:k}=this,B=this._choicesWithOther,w=(q)=>C.includes(q)||q===""&&k,g=[...y.querySelectorAll("label")];if(g.length===B.length&&g.every((q,j)=>q.querySelector("input")?.value===B[j].value))g.forEach((q)=>{let j=q.querySelector("input");if(j&&j.checked!==w(j.value))j.checked=w(j.value)});else y.textContent="",y.append(...B.map((q)=>tw({tabindex:0},Wy({type:h,name:this.name,value:q.value,checked:w(q.value),tabIndex:-1}),q.icon||{class:"no-icon"},this.localized?i1(q.caption):ew(q.caption))));if(this.other&&!this.multiple){x.hidden=!k;let q=k?this.value:"";if(x.value!==q)x.value=q;if(x.placeholder=this.placeholder,x.parentElement!==y)y.append(x)}this.syncCurrent()}}var yg=s2,Jy=s2.elementCreator(),xg=l1((...y)=>Jy(...y),"xinSegmented is deprecated, use tosiSegmented instead (tag is now <tosi-segmented>)");var{slot:Zy}=U;class d9 extends ${static preferredTagName="tosi-sizebreak";static initAttributes={minWidth:0,minHeight:0};value="normal";content=[Zy({part:"normal"}),Zy({part:"small",name:"small"})];static shadowStyleSpec={":host":{display:"inline-block",position:"relative"}};handleResize=()=>{let{normal:y,small:x}=this.parts,h=this.offsetParent;if(!(h instanceof HTMLElement))return;else if(h.offsetWidth<this.minWidth||h.offsetHeight<this.minHeight)y.hidden=!0,x.hidden=!1,this.value="small";else y.hidden=!1,x.hidden=!0,this.value="normal"};connectedCallback(){super.connectedCallback(),globalThis.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),globalThis.removeEventListener("resize",this.handleResize)}}var hg=d9.elementCreator();class w5 extends ${static preferredTagName="tosi-sizer";target=null;static shadowStyleSpec={":host":{_resizeIconFill:"#222",display:"block",position:"absolute",bottom:-7,right:-7,padding:14,width:44,height:44,opacity:0.25,transition:"opacity 0.25s ease-out"},":host(:hover)":{opacity:0.5},":host svg":{width:16,height:16,stroke:l.resizeIconFill}};content=Q.resize();get minSize(){let{minWidth:y,minHeight:x}=getComputedStyle(this.target);return{width:parseFloat(y)||32,height:parseFloat(x)||32}}resizeTarget=(y)=>{let{target:x}=this;if(!x)return;let{offsetWidth:h,offsetHeight:C}=x;x.style.left=x.offsetLeft+"px",x.style.top=x.offsetTop+"px",x.style.bottom="",x.style.right="";let{minSize:k}=this;_1(y,(B,w,g)=>{if(x.style.width=Math.max(k.width,h+B)+"px",x.style.height=Math.max(k.height,C+w)+"px",g.type==="mouseup")return!0},"nwse-resize")};connectedCallback(){if(super.connectedCallback(),!this.target)this.target=this.parentElement;let y={passive:!0};this.addEventListener("mousedown",this.resizeTarget,y),this.addEventListener("touchstart",this.resizeTarget,y)}}var Cg=w5,Ry=w5.elementCreator(),kg=Ry;var{div:Bg,input:wg,span:gg,button:f9}=U,Dy=(y)=>y.split(/(?<!\\),/).map((x)=>x.trim().replace(/\\,/g,",")),zg=(y)=>y.map((x)=>x.replace(/,/g,"\\,")).join(",");class p0 extends ${static preferredTagName="tosi-tag";static lightStyleSpec={":host":{"--tag-close-button-color":"#000c","--tag-close-button-bg":"#fffc","--tag-button-opacity":"0.5","--tag-button-hover-opacity":"0.75","--tag-bg":_.brandColor("blue"),"--tag-text-color":_.brandTextColor("white"),display:"inline-flex",borderRadius:_.tagRoundedRadius(l.spacing50),color:l.tagTextColor,background:l.tagBg,padding:`0 ${l.spacing75} 0 ${l.spacing75}`,height:`calc(${l.lineHeight} + ${l.spacing50})`,lineHeight:`calc(${l.lineHeight} + ${l.spacing50})`},':host > [part="caption"]':{position:"relative",whiteSpace:"nowrap",overflow:"hidden",flex:"1 1 auto",fontSize:_.fontSize("16px"),color:l.tagTextColor,textOverflow:"ellipsis"},':host [part="remove"]':{boxShadow:"none",margin:`0 ${l.spacing_50} 0 ${l.spacing25}`,padding:0,display:"inline-flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:l.spacing150,width:l.spacing150,color:l.tagCloseButtonColor,background:l.tagCloseButtonBg,borderRadius:_.tagCloseButtonRadius("99px"),opacity:l.tagButtonOpacity},':host [part="remove"]:hover':{background:l.tagCloseButtonBg,opacity:l.tagButtonHoverOpacity}};static initAttributes={caption:"",removeable:!1};removeCallback=()=>{this.remove()};content=()=>[gg({part:"caption"},this.caption),f9(Q.x(),{type:"button",part:"remove",hidden:!this.removeable,ariaLabel:`Remove ${this.caption}`,onClick:this.removeCallback})]}var qg=p0,s9=p0.elementCreator(),lg=l1((...y)=>s9(...y),"xinTag is deprecated, use tosiTag instead (tag is now <tosi-tag>)");class u2 extends ${static preferredTagName="tosi-tag-list";static lightStyleSpec={":host":{"--tag-list-bg":"#f8f8f8","--touch-size":"44px","--spacing":"16px",display:"grid",gridTemplateColumns:"auto",alignItems:"center",background:l.tagListBg,gap:l.spacing25,borderRadius:_.taglistRoundedRadius(l.spacing50),overflow:"hidden"},":host[editable]":{gridTemplateColumns:`0px auto ${l.touchSize}`},":host[editable][text-entry]":{gridTemplateColumns:`0px 2fr 1fr ${l.touchSize}`},':host [part="tagContainer"]':{display:"flex",content:'" "',alignItems:"center",background:l.inputBg,borderRadius:_.tagContainerRadius(l.spacing50),boxShadow:l.borderShadow,flexWrap:"nowrap",overflow:"auto hidden",gap:l.spacing25,minHeight:`calc(${l.lineHeight} + ${l.spacing})`,padding:l.spacing25},':host [part="tagMenu"]':{width:l.touchSize,height:l.touchSize,lineHeight:l.touchSize,textAlign:"center",padding:0,margin:0},":host [hidden]":{display:"none !important"},':host button[part="tagMenu"]':{background:l.brandColor,color:l.brandTextColor}};static formAssociated=!0;static initAttributes={name:"",textEntry:!1,editable:!1,placeholder:"enter tags",disabled:!1,required:!1};value="";get tags(){return Dy(this.value).filter((y)=>y!=="")}set tags(y){this.value=zg(y)}_availableTags=[];get availableTags(){return this._availableTags}set availableTags(y){if(typeof y==="string")this._availableTags=u2.parseAvailableTagsString(y);else this._availableTags=y;this.queueRender()}static parseAvailableTagsString(y){return Dy(y).map((x)=>x===""?null:x)}connectedCallback(){super.connectedCallback();let y=this.getAttribute("available-tags");if(y&&this._availableTags.length===0)this._availableTags=u2.parseAvailableTagsString(y)}formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value=""}addTag=(y)=>{let x=y.trim();if(x===""||this.tags.includes(x))return;this.tags=[...this.tags,x],this.queueRender(!0)};toggleTag=(y)=>{if(this.tags.includes(y))this.tags=this.tags.filter((x)=>x!==y),this.queueRender(!0);else this.addTag(y)};enterTag=(y)=>{let{tagInput:x}=this.parts;switch(y.key){case",":{let h=x.value.split(",")[0];this.addTag(h)}break;case"Enter":{let h=x.value.split(",")[0];this.addTag(h)}y.stopPropagation(),y.preventDefault();break;default:}};popSelectMenu=()=>{let{toggleTag:y}=this,{tagMenu:x}=this.parts,h=[...this.availableTags],C=this.tags.filter((B)=>!h.includes(B));if(C.length)h.push(null,...C);let k=h.map((B)=>{if(B===""||B===null)return null;else if(typeof B==="object")return{checked:()=>this.tags.includes(B.value),caption:B.caption,action(){y(B.value)}};else return{checked:()=>this.tags.includes(B),caption:B,action(){y(B)}}});r({target:x,width:"auto",menuItems:k})};content=()=>[f9({type:"button",style:{visibility:"hidden"},tabindex:-1}),Bg({part:"tagContainer",class:"row",role:"list",ariaLabel:"Selected tags"}),wg({part:"tagInput",class:"elastic",ariaLabel:"Enter new tag",onKeydown:this.enterTag}),f9({type:"button",title:"add tag",ariaLabel:"Select tags from list",ariaHaspopup:"listbox",part:"tagMenu",onClick:this.popSelectMenu},Q.chevronDown())];removeTag=(y)=>{if(this.editable&&!this.disabled){let x=y.target.closest(p0.tagName);this.tags=this.tags.filter((h)=>h!==x.caption),x.remove(),this.queueRender(!0)}y.stopPropagation(),y.preventDefault()};render(){super.render();let{tagContainer:y,tagMenu:x,tagInput:h}=this.parts;if(x.disabled=this.disabled,h.value="",h.setAttribute("placeholder",this.placeholder),this.editable&&!this.disabled)x.toggleAttribute("hidden",!1),h.toggleAttribute("hidden",!this.textEntry);else x.toggleAttribute("hidden",!0),h.toggleAttribute("hidden",!0);y.textContent="";for(let C of this.tags)y.append(s9({caption:C,removeable:this.editable&&!this.disabled,removeCallback:this.removeTag}))}}var jg=u2,Hy=u2.elementCreator(),Vg=l1((...y)=>Hy(...y),"xinTagList is deprecated, use tosiTagList instead (tag is now <tosi-tag-list>)");var vy="1.7.3";var{span:Xg}=U,L0=null,g5=null,z5=null,d1="tosi-tooltip",_g={[`.${d1}`]:{pointerEvents:"none",padding:_.tosiTooltipPadding("4px 10px"),borderRadius:_.tosiTooltipRadius("6px"),background:_.tosiTooltipBg("#333"),color:_.tosiTooltipColor("#fff"),fontSize:_.tosiTooltipFontSize("13px"),lineHeight:"1.4",maxWidth:_.tosiTooltipMaxWidth("280px"),whiteSpace:"pre-line",boxShadow:"0 2px 8px #0003",position:"relative"},[`.${d1} p`]:{margin:"0"},[`.${d1} code`]:{background:"#fff2",padding:"0 4px",borderRadius:"3px",fontSize:"0.9em"},[`.${d1} a`]:{color:"inherit"},[`.${d1}::before`]:{content:'""',position:"absolute",width:"8px",height:"8px",background:"inherit",transform:"rotate(45deg)"},[`.${d1}.tt-s::before`]:{top:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${d1}.tt-n::before`]:{bottom:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${d1}.tt-e::before`]:{left:"-4px",top:"var(--tosi-tooltip-arrow)"},[`.${d1}.tt-w::before`]:{right:"-4px",top:"var(--tosi-tooltip-arrow)"}},My=!1;function Sy(){if(My)return;My=!0,O1("tosi-tooltip",_g)}function r2(){if(g5!==null)clearTimeout(g5),g5=null;if(L0!==null)L0.remove(),L0=null;z5=null}function Ag(y){if(y.startsWith("s"))return"tt-s";if(y.startsWith("n"))return"tt-n";if(y.startsWith("e"))return"tt-e";if(y.startsWith("w"))return"tt-w";return"tt-s"}function Kg(y,x,h){let C=x.getBoundingClientRect(),k=y.getBoundingClientRect(),B=C.left+C.width*0.5,w=C.top+C.height*0.5,g;if(h.startsWith("s")||h.startsWith("n"))g=Math.max(8,Math.min(k.width-8,B-k.left))-4;else g=Math.max(8,Math.min(k.height-8,w-k.top))-4;y.style.setProperty("--tosi-tooltip-arrow",g+"px")}function Pg(y,x){if(x)y=p(y);let h=Xg({class:d1});return h.innerHTML=H.parseInline(y),h}function Gg(y,x,h){Sy(),r2(),z5=y;let{top:C,left:k,width:B}=y.getBoundingClientRect(),w=k+B*0.5,g=window.innerHeight,z=window.innerWidth,q=(C>g*0.5?"n":"s")+(w>z*0.5?"w":"e"),j=Pg(x,h);j.classList.add(Ag(q)),L0=V0({content:j,target:y,position:q,remainOnScroll:"remove",remainOnResize:"remove"}),requestAnimationFrame(()=>{if(L0&&z5)Kg(j,y,q)})}function Ug(y){for(let x of y.composedPath())if(x instanceof HTMLElement&&x.dataset.tooltip)return x;return null}function Qg(y={}){Sy();let{convertTitles:x=!0,delay:h=250,localize:C=!1}=y;document.addEventListener("pointermove",(k)=>{if(x){for(let g of k.composedPath())if(g instanceof HTMLElement&&g.title&&!g.dataset.tooltip){g.dataset.tooltip=g.title,g.removeAttribute("title");break}}let B=Ug(k);if(B===z5)return;if(r2(),!B)return;let w=B.dataset.tooltip||null;if(!w)return;g5=setTimeout(()=>Gg(B,w,C),h)}),document.addEventListener("pointerleave",r2),document.addEventListener("pointerdown",r2),document.addEventListener("keydown",r2),window.addEventListener("scroll",r2,!0)}Object.assign(globalThis,{xinjs:g0,xinjsui:u9});
|
|
212
212
|
|
|
213
|
-
//# debugId=
|
|
213
|
+
//# debugId=DF35CE7BAC8E534864756E2164756E21
|
|
214
214
|
//# sourceMappingURL=hydrate.js.map
|