tosijs-ui 1.7.0 → 1.7.2

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dist/babylon-3d.d.ts +1 -1
  3. package/dist/babylon-3d.js +1 -1
  4. package/dist/code-editor-cm.js +5 -1
  5. package/dist/code-editor.d.ts +1 -1
  6. package/dist/code-editor.js +1 -1
  7. package/dist/data-table.d.ts +3 -1
  8. package/dist/data-table.js +97 -5
  9. package/dist/doc-browser.js +6 -1
  10. package/dist/doc-system/doc-system-styles.js +11 -0
  11. package/dist/doc-system/site/dev-server.d.ts +11 -0
  12. package/dist/doc-system/site/dev-server.js +26 -3
  13. package/dist/doc-system/site/generate-site.d.ts +18 -0
  14. package/dist/doc-system/site/generate-site.js +42 -10
  15. package/dist/doc-system/site/site-config.d.ts +10 -3
  16. package/dist/hydrate/{ajs-language-h1x0ydap.js → ajs-language-qm5w38ae.js} +3 -3
  17. package/dist/hydrate/{ajs-language-h1x0ydap.js.map → ajs-language-qm5w38ae.js.map} +1 -1
  18. package/dist/hydrate/{code-editor-cm-2hgj9002.js → code-editor-cm-95n31m4f.js} +8 -8
  19. package/dist/hydrate/{code-editor-cm-2hgj9002.js.map → code-editor-cm-95n31m4f.js.map} +3 -3
  20. package/dist/hydrate/hydrate.js +78 -78
  21. package/dist/hydrate/hydrate.js.map +20 -19
  22. package/dist/hydrate/{index-nsmyq9mv.js → index-0ps8jzdn.js} +3 -3
  23. package/dist/hydrate/{index-nsmyq9mv.js.map → index-0ps8jzdn.js.map} +1 -1
  24. package/dist/hydrate/{index-iife-64z9yngn.js → index-iife-415dypjp.js} +3 -3
  25. package/dist/hydrate/{index-iife-64z9yngn.js.map → index-iife-415dypjp.js.map} +1 -1
  26. package/dist/hydrate/index-iife-kwhe0yt8.js +27 -0
  27. package/dist/hydrate/{index-iife-5wzyvyzm.js.map → index-iife-kwhe0yt8.js.map} +2 -2
  28. package/dist/hydrate/{index-iife-x2h4f6fc.js → index-iife-ype8sch3.js} +3 -3
  29. package/dist/hydrate/{index-iife-x2h4f6fc.js.map → index-iife-ype8sch3.js.map} +1 -1
  30. package/dist/hydrate/{tjs-import-resolver-akt3k27z.js → tjs-import-resolver-s4z0w296.js} +2 -2
  31. package/dist/iife.js +70 -70
  32. package/dist/iife.js.map +21 -20
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.js +1 -1
  35. package/dist/live-example/component.d.ts +8 -1
  36. package/dist/live-example/component.js +8 -0
  37. package/dist/live-example/styles.d.ts +8 -1
  38. package/dist/live-example/styles.js +17 -1
  39. package/dist/live-theme.js +98 -0
  40. package/dist/side-nav.d.ts +1 -1
  41. package/dist/side-nav.js +4 -4
  42. package/dist/size-break.d.ts +1 -1
  43. package/dist/size-break.js +3 -3
  44. package/dist/tab-selector.d.ts +11 -2
  45. package/dist/tab-selector.js +19 -6
  46. package/dist/tsconfig.tsbuildinfo +1 -1
  47. package/dist/value-renderer.d.ts +26 -0
  48. package/dist/value-renderer.js +209 -0
  49. package/dist/version.d.ts +1 -1
  50. package/dist/version.js +1 -1
  51. package/llms.txt +3 -3
  52. package/package.json +1 -1
  53. package/dist/bp-loader.d.ts +0 -1
  54. package/dist/bp-loader.js +0 -26
  55. package/dist/hydrate/index-iife-5wzyvyzm.js +0 -27
  56. /package/dist/hydrate/{tjs-import-resolver-akt3k27z.js.map → tjs-import-resolver-s4z0w296.js.map} +0 -0
@@ -1,79 +1,79 @@
1
- import{Ra as S5,Sa as V2}from"./index-iife-64z9yngn.js";var S9={};S5(S9,{xrControllersText:()=>Si,xrControllers:()=>si,xinTagList:()=>Lk,xinTag:()=>dk,xinTabs:()=>GC,xinTable:()=>Gl,xinSizer:()=>bk,xinSidenav:()=>mC,xinSelect:()=>Lh,xinSegmented:()=>Rk,xinRating:()=>Vk,xinPasswordStrength:()=>qk,xinNotification:()=>gk,xinMenu:()=>Vl,xinMd:()=>yk,xinLocalized:()=>uh,xinForm:()=>Ui,xinFloat:()=>Sh,xinField:()=>Ki,xinCarousel:()=>Hh,wrapIcon:()=>h3,version:()=>Wy,updateLocalized:()=>B3,trackDrag:()=>P1,tosijs:()=>k0,tosiThemeEditor:()=>ai,tosiTagList:()=>Oy,tosiTag:()=>s9,tosiTabs:()=>X0,tosiTable:()=>F3,tosiSizer:()=>Gy,tosiSidenav:()=>J0,tosiSelect:()=>G1,tosiSegmented:()=>Ky,tosiRow:()=>Ii,tosiRouteView:()=>Yk,tosiRichText:()=>Vy,tosiRating:()=>By,tosiPasswordStrength:()=>wy,tosiNotification:()=>p9,tosiMonth:()=>lk,tosiMenu:()=>T6,tosiMd:()=>W9,tosiLocalized:()=>Q1,tosiLocalePicker:()=>$6,tosiHeaderLinks:()=>bi,tosiHeader:()=>Hi,tosiGrid:()=>di,tosiForm:()=>o4,tosiFloat:()=>z0,tosiField:()=>r4,tosiDocSystem:()=>Xi,tosiDiff:()=>w0,tosiDialog:()=>X4,tosiColumn:()=>Mi,tosiCarousel:()=>w6,testManager:()=>_1,tabSelector:()=>UC,svgIcon:()=>ph,svg2DataUrl:()=>g0,styleSheet:()=>B4,spacer:()=>G9,sizeBreak:()=>Dk,sideNav:()=>aC,setLocale:()=>A4,scriptTag:()=>b1,runTests:()=>S4,router:()=>s0,richTextWidgets:()=>jy,richText:()=>Fk,rewriteImports:()=>Y1,resolveMenuItems:()=>F1,resolveIcon:()=>e1,removeLastMenu:()=>x1,postNotification:()=>wk,positionFloat:()=>U6,popMenu:()=>o,popFloat:()=>q0,popDropMenu:()=>d6,parseShortcut:()=>U4,navigate:()=>$k,modifierKeys:()=>fh,menu:()=>I6,matchShortcut:()=>q3,markdownViewer:()=>ei,mapBox:()=>Ei,makeSorter:()=>P4,localize:()=>I,localePicker:()=>nh,loadTransform:()=>Y0,liveTheme:()=>L,liveExample:()=>M4,legacyAliases:()=>hy,keystroke:()=>ah,keycode:()=>N6,isBreached:()=>gy,insertExamples:()=>c4,initTooltips:()=>Ek,initLocalization:()=>z3,icons:()=>O,iconRules:()=>x3,i18n:()=>n,getRouterParams:()=>Ok,gamepadText:()=>ci,gamepadState:()=>t7,findShortcutAction:()=>U3,findHighestZ:()=>P2,filterPart:()=>n4,filterForDrop:()=>_0,filterForClick:()=>_3,filterBuilder:()=>Ri,expect:()=>E3,executeInline:()=>H4,executeInIframe:()=>b4,executeCode:()=>A7,enableTests:()=>h9,enableLiveTheme:()=>Cy,elastic:()=>Ti,editableRect:()=>Ni,dragAndDrop:()=>O4,displayShortcut:()=>G4,disableTests:()=>l9,disableLiveTheme:()=>fi,digest:()=>ky,diffLines:()=>q6,defineRoutes:()=>Xk,defineIcons:()=>Wh,defaultColors:()=>M1,dataTable:()=>Ul,createThemeWithLegacy:()=>oi,createTheme:()=>M2,createTestContext:()=>t3,createSubMenu:()=>A3,createMenuItem:()=>S6,createMenuAction:()=>c6,createDropMenuItem:()=>s6,createDocBrowser:()=>i9,createDarkTheme:()=>u4,createColorVariables:()=>xy,componentVars:()=>ni,commandButton:()=>v1,colorInput:()=>w3,codeEditor:()=>n1,canonicalShortcut:()=>Eh,bringToFront:()=>x2,bodymovinPlayer:()=>Zh,blockStyle:()=>Z9,baseVariables:()=>yy,baseTheme:()=>Li,baseDarkTheme:()=>ri,b3d:()=>vh,availableFilters:()=>z9,applyTheme:()=>F9,applyLocalized:()=>V0,abTest:()=>Oh,XinWord:()=>Gk,XinTagList:()=>Tk,XinTag:()=>Mk,XinSizer:()=>Hk,XinSelect:()=>Th,XinSegmented:()=>Zk,XinRating:()=>jk,XinPasswordStrength:()=>zk,XinNotification:()=>kk,XinMenu:()=>Pl,XinLocalized:()=>_4,XinForm:()=>Ai,XinFloat:()=>sh,XinField:()=>_i,XinCarousel:()=>Dh,TosiThemeEditor:()=>O9,TosiTagList:()=>L2,TosiTag:()=>I0,TosiTabs:()=>R4,TosiTable:()=>Q4,TosiSizer:()=>C5,TosiSidenav:()=>S2,TosiSelect:()=>c1,TosiSegmented:()=>T2,TosiRow:()=>A9,TosiRouteView:()=>H9,TosiRating:()=>y5,TosiPasswordStrength:()=>e4,TosiNotification:()=>i2,TosiMonth:()=>Y9,TosiMenu:()=>W4,TosiMd:()=>E4,TosiLocalized:()=>s1,TosiLocalePicker:()=>K4,TosiHeaderLinks:()=>P9,TosiHeader:()=>V9,TosiGrid:()=>U9,TosiForm:()=>L4,TosiFloat:()=>u1,TosiField:()=>T4,TosiDocSystem:()=>w9,TosiDiff:()=>k3,TosiDialog:()=>$3,TosiColumn:()=>K9,TosiCarousel:()=>q4,TabSelector:()=>KC,SvgIcon:()=>l3,SizeBreak:()=>b9,SideNav:()=>fC,STORAGE_KEY:()=>D4,RichText:()=>x5,RemoteSyncManager:()=>N0,MarkdownViewer:()=>ti,MapBox:()=>G2,LocalePicker:()=>oh,LiveExample:()=>l2,FilterPart:()=>q9,FilterBuilder:()=>j9,EditableRect:()=>J1,DataTable:()=>Kl,CodeEditor:()=>o1,BodymovinPlayer:()=>J2,B3d:()=>C3,AbTest:()=>p2});var k0={};S5(k0,{xinValue:()=>Ey,xinSlot:()=>Ex,xinProxy:()=>h6,xinPath:()=>my,xin:()=>C1,warnDeprecated:()=>j1,version:()=>x6,vars:()=>z,varDefault:()=>P,validateAgainstConstraints:()=>E8,updates:()=>d5,unobserve:()=>x0,touchElement:()=>u5,touch:()=>O1,tosiValue:()=>H,tosiUnique:()=>Ph,tosiSlot:()=>mx,tosiSetValue:()=>ay,tosiPath:()=>V1,tosiLoader:()=>Uh,tosiBlueprint:()=>Kh,tosiAccessor:()=>fy,tosi:()=>t,throttle:()=>X2,sync:()=>jh,svgElements:()=>C4,share:()=>Bh,settings:()=>m0,scrollListItemIntoView:()=>Tx,onThemePreferencesChange:()=>Yx,onStylesheetChange:()=>Ox,on:()=>N2,observe:()=>o5,mathML:()=>n8,makeComponent:()=>m5,invertLuminance:()=>i0,initVars:()=>$x,hotReload:()=>tx,getThemePreferences:()=>L8,getListItem:()=>q2,getListInstance:()=>n5,getListBinding:()=>Y2,getCssVar:()=>S8,elements:()=>G,deprecated:()=>B1,deleteListItem:()=>Mx,debounce:()=>C0,css:()=>$2,boxedProxy:()=>a5,boxed:()=>U1,blueprintLoader:()=>Fh,blueprint:()=>Gh,bindings:()=>r1,bindParts:()=>vx,bind:()=>T1,TOSI_ACCESSOR:()=>M5,TAKE_DESCRIPTOR:()=>x4,StyleSheet:()=>W1,MoreMath:()=>Ux,Component:()=>F,Color:()=>X,BlueprintLoader:()=>E5,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 l=new Set;x.set(y,l);for(let C of y)l.add(D1(C,x));return l}if(y instanceof Map){let l=new Map;x.set(y,l);for(let[C,i]of y)l.set(D1(C,x),D1(i,x));return l}if(Array.isArray(y)){let l=[];x.set(y,l);for(let C of y)l.push(D1(C,x));return l}let h={};x.set(y,h);for(let l in y)h[l]=D1(y[l],x);return h}var I5="-xin-data",B2=`.${I5}`,N8="-xin-event",e9=`.${N8}`,H1=Symbol.for("xin-path"),z2=Symbol.for("xin-value"),Ly="xinObserve",ry="xinBind",oy="xinOn",M5=Symbol.for("tosi-accessor"),x4=Symbol.for("tosi-take"),a0=Symbol("list-binding"),Q2=Symbol("list-instance"),Q5=new Map;function ny(y,x){let h=Q5.get(y);if(h===void 0)h=new Set,Q5.set(y,h);h.add(x)}function uy(y){return Q5.get(y)}var y8=new Set;function j1(y,x){if(!y8.has(y))console.warn(x),y8.add(y)}function B1(y,x){let h=!1;return(...l)=>{if(!h)console.warn(x),h=!0;return y(...l)}}var V1=(y)=>{return y&&y[H1]||void 0};function H(y){if(typeof y==="object"&&y!==null){let x=y[z2];return x!==void 0?x:y}return y}function fy(y){return y!=null?y[M5]:void 0}function ay(y,x){if(V1(y)===void 0)throw Error("tosiSetValue requires a xin or boxed proxy");y[z2]=x}var my=B1(V1,"xinPath is deprecated. Use tosiPath instead."),Ey=B1(H,"xinValue is deprecated. Use tosiValue instead."),t2=new WeakMap,L1=new WeakMap,e2=(y)=>{let x=y.cloneNode();if(x instanceof Element){let l=L1.get(y),C=t2.get(y);if(l!=null)L1.set(x,D1(l));if(C!=null)t2.set(x,D1(C))}let h=x instanceof HTMLTemplateElement?x.content:x;for(let l of Array.from(y instanceof HTMLTemplateElement?y.content.childNodes:y.childNodes))if(l instanceof Element||l instanceof DocumentFragment)h.appendChild(e2(l));else h.appendChild(l.cloneNode());return x},m0={debug:!1,perf:!1},ty=(y)=>{try{return JSON.stringify(y)}catch(x){return"{has circular references}"}},p8=(...y)=>Error(y.map(ty).join(" ")),ey=()=>new Date(parseInt("1000000000",36)+Date.now()).valueOf().toString(36).slice(1),yx=0,xx=()=>(parseInt("10000",36)+ ++yx).toString(36).slice(-5),J8=()=>ey()+xx(),X5=Symbol("delete"),v8=Symbol("new-object"),_5=Symbol("automatic-index");function Z8(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 l=y.slice(0,h);if(y=y.slice(h),l!=="")x.push(l.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 R8(y,x){if(w2.get(y)===void 0)w2.set(y,{});let h={};if(w2.get(y)[x]=h,x==="_auto_")y.forEach((l,C)=>{if(l[_5]===void 0)l[_5]=J8();h[l[_5]+""]=C});else y.forEach((l,C)=>{h[y1(l,x)+""]=C});return h}function hx(y,x){if(w2.get(y)===void 0||w2.get(y)[x]===void 0)return R8(y,x);else return w2.get(y)[x]}function lx(y,x,h){h=h+"";let l=hx(y,x)[h];if(l===void 0||y1(y[l],x)+""!==h)l=R8(y,x)[h];return l}function Cx(y,x,h){if(y[x]===void 0&&h!==void 0)y[x]=h;return y[x]}function D8(y,x,h,l){let C=x!==""?lx(y,x,h):h;if(l===X5){if(C!==void 0)y.splice(C,1),w2.delete(y);return Symbol("deleted")}else if(l===v8){if(x===""&&y[C]===void 0)y[C]={}}else if(l!==void 0)if(C!==void 0)y[C]=l;else if(x!==""&&y1(l,x)+""===h+"")y.push(l),C=y.length-1;else throw Error(`byIdPath insert failed at [${x}=${h}]`);return y[C]}function x8(y){if(!Array.isArray(y))throw p8("setByPath failed: expected array, found",y)}function h8(y){if(y==null||!(y instanceof Object))throw p8("setByPath failed: expected Object, found",y)}function y1(y,x){let h=Z8(x),l=y,C,i,k,g;for(C=0,i=h.length;l!==void 0&&C<i;C++){let w=h[C];if(Array.isArray(w))for(k=0,g=w.length;l!==void 0&&k<g;k++){let B=w[k];l=l[B]}else if(l.length===0){if(l=l[Number(w.slice(1))],w[0]!=="=")return}else if(w.includes("=")){let[B,...q]=w.split("=");l=D8(l,B,q.join("="))}else k=parseInt(w,10),l=l[k]}return l}function h4(y,x,h){let l=y;if(x==="")throw Error("setByPath cannot be used to set the root object");let C=Z8(x);while(l!=null&&C.length>0){let i=C.shift();if(typeof i==="string"){let k=i.indexOf("=");if(k>-1){if(k===0)h8(l);else x8(l);let g=i.slice(0,k),w=i.slice(k+1);if(l=D8(l,g,w,C.length>0?v8:h),C.length===0)return!0}else{x8(l);let g=parseInt(i,10);if(C.length>0)l=l[g];else{if(h!==X5){if(l[g]===h)return!1;l[g]=h}else l.splice(g,1);return!0}}}else if(Array.isArray(i)&&i.length>0){h8(l);while(i.length>0){let k=i.shift();if(i.length>0||C.length>0)l=Cx(l,k,i.length>0?{}:[]);else{if(h!==X5){if(l[k]===h)return!1;l[k]=h}else{if(!Object.prototype.hasOwnProperty.call(l,k))return!1;delete l[k]}return!0}}}else throw Error(`setByPath failed, bad path ${x}`)}throw Error(`setByPath(${y}, ${x}, ${h}) failed`)}var w1={},$5=null,ix=(y)=>{$5=y},l4=()=>{if($5===null)throw Error("xin proxy not initialized");return $5},Y5=null,N5=null,kx=(y,x)=>{Y5=y,N5=x},gx=()=>{if(Y5===null)throw Error("bind not initialized");return Y5},wx=()=>{if(N5===null)throw Error("on not initialized");return N5},l8=Symbol("observer should be removed"),E0=[],W2=[],p5=!1,J5,v5;function Bx(y,x,h,l){let C=uy(y);if(C===void 0)return[];let i=[];for(let k of C){let g=y1(h,k);if(g!==void 0)i.push(`${y}[${k}=${g}]${l}`)}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 H8{description;test;callback;constructor(y,x){let h=typeof x==="string"?`"${x}"`:`function ${x.name}`,l;if(typeof y==="string")this.test=(C)=>typeof C==="string"&&C!==""&&(y0(C,y)||y0(y,C)),l=`test = "${y}"`;else if(y instanceof RegExp)this.test=y.test.bind(y),l=`test = "${y.toString()}"`;else if(y instanceof Function)this.test=y,l=`test = function ${y.name}`;else throw Error("expect listener test to be a string, RegExp, or test function");if(this.description=`${l}, ${h}`,typeof x==="function")this.callback=x;else throw Error("expect callback to be a path or function");E0.push(this)}}var d5=async()=>{if(J5===void 0)return;await J5},zx=()=>{if(m0.perf)console.time("xin async update");let y=Array.from(W2);W2.length=0,p5=!1;let x=v5;v5=void 0;try{for(let h of y)E0.filter((l)=>{let C;try{C=l.test(h)}catch(i){return console.error(`Listener ${l.description} threw "${i}" at "${h}"`),!1}if(C===l8)return x0(l),!1;return C}).forEach((l)=>{let C;try{C=l.callback(h)}catch(i){console.error(`Listener ${l.description} threw "${i}" handling "${h}"`)}if(C===l8)x0(l)})}finally{if(typeof x==="function")x();if(m0.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(p5===!1)J5=new Promise((l)=>{v5=l}),p5=setTimeout(zx);if(W2.find((l)=>y0(l,x))==null)W2.push(x);let h=x.match(/^(.+)\[(\d+)\](.*)$/);if(h!==null){let[,l,C,i]=h,k=parseInt(C,10),g=y1(w1,`${l}[${k}]`);if(g!=null){let w=Bx(l,k,g,i);for(let B of w)if(W2.find((q)=>y0(q,B))==null)W2.push(B)}}},l0=(y,x)=>{return new H8(y,x)},x0=(y)=>{let x=E0.indexOf(y);if(x>-1)E0.splice(x,1);else throw Error("unobserve failed, listener not found")},b8=(y,x,{bubbles:h=!1,composed:l=!1}={})=>{let C=new Event(x,{bubbles:h,composed:l});y.dispatchEvent(C)},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"),qx=(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()}},jx=(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)}`},Vx=(y)=>{let x=y.match(/^(\d\d):(\d\d)(?::(\d\d)(?:\.(\d+))?)?$/);if(x==null)return NaN;let[,h,l,C,i]=x;return(Number(h)*60+Number(l))*60000+Number(C??0)*1000+Number(i??0)},Px=(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 l=y;if(x==null||x==="")l.value="";else if(x instanceof Date||typeof x==="number"){let C=x instanceof Date?x:new Date(x);if(h==="week")try{l.valueAsDate=C}catch(i){}else l.value=qx(h,C)}else l.value=String(x);break}case"time":{let l=y;if(x==null||x==="")l.value="";else if(typeof x==="number")l.value=jx(x);else if(x instanceof Date)l.value=`${q1(x.getHours())}:${q1(x.getMinutes())}:${q1(x.getSeconds())}`;else l.value=String(x);break}case"multi-select":for(let l of Array.from(y.querySelectorAll("option")))l.selected=Array.isArray(x)?x.map(String).includes(l.value):x!=null?!!x[l.value]:!1;break;default:y.value=x==null?"":x}},_x=(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=Vx(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:C8}=globalThis,Z5=C8!=null?new C8((y)=>{for(let x of y){let h=x.target;b8(h,"resize")}}):{observe(){},unobserve(){}},i8=(y,x,h=!0)=>{if(y!=null&&x!=null)if(typeof x==="string")y.textContent=x;else if(Array.isArray(x))x.forEach((l)=>{y.append(l instanceof Node&&h?e2(l):l)});else if(x instanceof Node)y.append(h?e2(x):x);else throw Error("expect text content or document node")},C0=(y,x=250)=>{let h;return function(...l){if(h!==void 0)clearTimeout(h);h=setTimeout(()=>{y.apply(this,l)},x)}},X2=(y,x=250)=>{let h,l=Date.now()-x;return function(...C){clearTimeout(h);let i=Date.now()-l;if(i>=x)l=Date.now(),y.apply(this,C);else h=setTimeout(()=>{l=Date.now(),y.apply(this,C)},x-i)}},r1={value:{toDOM:Px,fromDOM(y){return _x(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 Ax=180/Math.PI,Kx=Math.PI/180;function R1(y,x,h){return h<y?NaN:x<y?y:x>h?h:x}function m1(y,x,h,l=!0){if(l)h=R1(0,h,1);return h*(x-y)+y}var Ux={RADIANS_TO_DEGREES:Ax,DEGREES_TO_RADIANS:Kx,clamp:R1,lerp:m1};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 I8={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"},Gx=(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 M8{h;s;l;constructor(y,x,h){y/=255,x/=255,h/=255;let l=Math.max(y,x,h),C=l-Math.min(y,x,h),i=C!==0?l===y?(x-h)/C:l===x?2+(h-y)/C:4+(y-x)/C:0;this.h=60*i<0?60*i+360:60*i,this.s=C!==0?l<=0.5?C/(2*l-C):C/(2-(2*l-C)):0,this.l=(2*l-C)/2}}var E1=globalThis.document!==void 0?globalThis.document.createElement("span"):void 0;if(E1)E1.style.display="none";class X{r;g;b;a;static fromVar(y,x=document.body){return X.fromCss(S8(y,x))}static fromCss(y){let x=I8[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 l=y;if(E1 instanceof HTMLSpanElement)E1.style.color="black",E1.style.color=y,document.body.appendChild(E1),l=getComputedStyle(E1).color,E1.remove();let[C,i,k,g]=l.match(/[\d.]+/g)||["0","0","0","0"],w=l.startsWith("color(srgb")?255:1;return new X(Number(C)*w,Number(i)*w,Number(k)*w,g==null?1:Number(g))}static fromHsl(y,x,h,l=1){let C,i,k;if(x===0)C=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;C=w(q,B,j+0.3333333333333333),i=w(q,B,j),k=w(q,B,j-0.3333333333333333)}let g=new X(C*255,i*255,k*255,l);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,l=1){this.r=R1(0,y,255),this.g=R1(0,x,255),this.b=R1(0,h,255),this.a=R1(0,l,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:l}=this;return`rgba(${y.toFixed(0)},${x.toFixed(0)},${h.toFixed(0)},${l.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 M8(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 Gx(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}=this._hsl,C=R1(0,l+y*(1-l),1);return X.fromHsl(x,h,C,this.a)}darken(y){let{h:x,s:h,l}=this._hsl,C=R1(0,l*(1-y),1);return X.fromHsl(x,h,C,this.a)}saturate(y){let{h:x,s:h,l}=this._hsl,C=R1(0,h+y*(1-h),1);return X.fromHsl(x,C,l,this.a)}desaturate(y){let{h:x,s:h,l}=this._hsl,C=R1(0,h*(1-y),1);return X.fromHsl(x,C,l,this.a)}rotate(y){let{h:x,s:h,l}=this._hsl,C=(x+360+y)%360;return X.fromHsl(C,h,l,this.a)}opacity(y){let{h:x,s:h,l}=this._hsl;return X.fromHsl(x,h,l,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(m1(this.r,y.r,x),m1(this.g,y.g,x),m1(this.b,y.b,x),m1(this.a,y.a,x))}static blendHue(y,x,h){let l=(x-y+720)%360;if(l<180)return y+h*l;else return y-(360-l)*h}mix(y,x){let h=this._hsl,l=y._hsl;return X.fromHsl(h.s===0?l.h:l.s===0?h.h:X.blendHue(h.h,l.h,x),m1(h.s,l.s,x),m1(h.l,l.l,x),m1(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,l){if(!X.computedColors.has(y))X.computedColors.set(y,{varName:x,scale:h,method:l}),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:l,scale:C,method:i}]of X.computedColors)try{let k=X.fromVar(l),g;switch(i){case"b":g=C>0?k.brighten(C):k.darken(-C);break;case"s":g=C>0?k.saturate(C):k.desaturate(-C);break;case"h":g=k.rotate(C*100);break;case"o":g=k.opacity(C);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 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 {
2
2
  ${y.join(`
3
3
  `)}
4
- }`;if(X.computedColorStylesheet===null)X.computedColorStylesheet=document.createElement("style"),X.computedColorStylesheet.id="tosijs-computed-colors",document.head.append(X.computedColorStylesheet);X.computedColorStylesheet.textContent=x}}var t0=new Set,k8=!1;function Fx(){if(!k8)k8=!0,t0.add(()=>X.queueRecompute())}function Ox(y){return t0.add(y),()=>t0.delete(y)}function Wx(){Fx();for(let y of t0)y()}function W1(y,x){let h=H(x),l=G.style($2(h));l.id=y,document.head.append(l);let C=V1(x);if(C!==void 0)o5(C,()=>{l.textContent=$2(H(x)),Wx()});return l}var Qx=/^(animation-iteration-count|column-count|flex(-grow|-shrink)?|font-weight|line-height|opacity|order|orphans|scale|tab-size|widows|z-index|zoom)$/,d8=(y,x)=>{if(typeof x==="number"&&!Qx.test(y.replace(/^_+/,"")))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)}},Xx=(y,x,h)=>{if(h===void 0)return"";if(h instanceof X)h=h.html;let l=d8(x,h);return`${y} ${l.prop}: ${l.value};`},T8=(y,x,h="")=>{let l=K1(y);if(typeof x==="object"&&!(x instanceof X)){let C=Object.keys(x).map((i)=>T8(i,x[i],`${h} `)).join(`
4
+ }`;if(X.computedColorStylesheet===null)X.computedColorStylesheet=document.createElement("style"),X.computedColorStylesheet.id="tosijs-computed-colors",document.head.append(X.computedColorStylesheet);X.computedColorStylesheet.textContent=x}}var t0=new Set,B8=!1;function Nx(){if(!B8)B8=!0,t0.add(()=>X.queueRecompute())}function Jx(y){return t0.add(y),()=>t0.delete(y)}function Zx(){Nx();for(let y of t0)y()}function W1(y,x){let h=b(x),C=G.style($2(h));C.id=y,document.head.append(C);let l=V1(x);if(l!==void 0)n5(l,()=>{C.textContent=$2(b(x)),Zx()});return C}var px=/^(animation-iteration-count|column-count|flex(-grow|-shrink)?|font-weight|line-height|opacity|order|orphans|scale|tab-size|widows|z-index|zoom)$/,r8=(y,x)=>{if(typeof x==="number"&&!px.test(y.replace(/^_+/,"")))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)}},vx=(y,x,h)=>{if(h===void 0)return"";if(h instanceof X)h=h.html;let C=r8(x,h);return`${y} ${C.prop}: ${C.value};`},o8=(y,x,h="")=>{let C=K1(y);if(typeof x==="object"&&!(x instanceof X)){let l=Object.keys(x).map((i)=>o8(i,x[i],`${h} `)).join(`
5
5
  `);return`${h} ${y} {
6
- ${C}
7
- ${h} }`}else return Xx(h,l,x)},$2=(y,x="")=>{return Object.keys(y).map((h)=>{let l=y[h];if(typeof l==="string"){if(h==="@import")return`@import url('${l}');`;throw Error("top-level string value only allowed for `@import`")}let C=Object.keys(l).map((i)=>T8(i,l[i])).join(`
6
+ ${l}
7
+ ${h} }`}else return vx(h,C,x)},$2=(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 l=Object.keys(C).map((i)=>o8(i,C[i])).join(`
8
8
  `);return`${x}${h} {
9
- ${C}
9
+ ${l}
10
10
  }`}).join(`
11
11
 
12
- `)},$x=(y)=>{j1("initVars","initVars is deprecated. Just use _ and __ prefixes instead.");let x={};for(let h of Object.keys(y)){let l=y[h],C=K1(h);x[`--${C}`]=typeof l==="number"&&l!==0?String(l)+"px":l}return x},i0=(y)=>{let x={};for(let h of Object.keys(y)){let l=y[h];if(l instanceof X)x[h]=l.inverseLuminance;else if(typeof l==="string"&&(l.match(/^(#[0-9a-fA-F]{3}|rgba?\(|hsla?\()/)!=null||I8[l.trim().toLowerCase()]!==void 0))x[h]=X.fromCss(l).inverseLuminance}return x},P=new Proxy({},{get(y,x){if(y[x]===void 0){let h="--"+K1(x);y[x]=(l)=>`var(${h}, ${l})`}return y[x]}}),z=new Proxy({},{get(y,x){if(x==="default")return P;if(y[x]==null){x=K1(x);let[,h,,l,C,i]=x.match(/^([-\w]*?)((_)?(\d+)(\w?))?$/)||["",x],k=`--${h}`;if(C!=null){let g=l==null?Number(C)/100:-Number(C)/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 L8(){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 Yx(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(L8()),l=x.map((C)=>matchMedia(C));for(let C of l)C.addEventListener("change",h);return()=>{for(let C of l)C.removeEventListener("change",h)}}var Nx="http://www.w3.org/1998/Math/MathML",px="http://www.w3.org/2000/svg",n0={},r8=(y,x,h)=>{let l=d8(K1(x),h);if(l.prop.startsWith("--"))y.style.setProperty(l.prop,l.value);else y.style[x]=l.value},Jx=(y)=>{return{toDOM(x,h){r8(x,y,h)}}},g8=new WeakMap,o8=(y,x,h)=>{if(x==="style")if(typeof h==="object")for(let l of Object.keys(h))if(V1(h[l]))T1(y,h[l],Jx(l));else r8(y,l,h[l]);else y.setAttribute("style",h);else{let l=K1(x),C=y.constructor.observedAttributes;if(C?.includes(x)||C?.includes(l))if(typeof h==="boolean")h?y.setAttribute(l,""):y.removeAttribute(l);else y.setAttribute(l,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(l==="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=g8.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);g8.set(y,k)}else if(y[l]!==void 0)y[l]=h;else if(typeof h==="boolean")h?y.setAttribute(l,""):y.removeAttribute(l);else y.setAttribute(l,h)}},A5={},w8=(y)=>{if(!A5[y])A5[y]={toDOM(x,h){o8(x,y,h)}};return A5[y]},T5=(y,x,h)=>{if(x==="apply")h(y);else if(x.match(/^on[A-Z]/)!=null){let l=x.substring(2).toLowerCase();N2(y,l,h)}else if(x==="bind"){let l=typeof h.binding==="string"?r1[h.binding]:h.binding;if(l!==void 0&&h.value!==void 0)T1(y,h.value,l instanceof Function?{toDOM:l}:l);else throw Error("bad binding")}else if(x.match(/^bind[A-Z]/)!=null){let l=x.substring(4,5).toLowerCase()+x.substring(5);if(l!=="value"){let i=l==="text"?"textContent":l==="enabled"?"disabled (with .tosi.take(v => !v))":l==="disabled"?"disabled":l==="list"?".tosi.listBinding()":null;if(i)j1(`bind${l}`,`bind${x.substring(4)} is deprecated. Use { ${i}: ... } instead.`)}let C=r1[l];if(C!==void 0)T1(y,h,C);else throw Error(`${x} is not allowed, bindings.${l} is not defined`)}else if(h!=null&&typeof h==="object"&&h[x4])T1(y,h,w8(x));else if(V1(h))T1(y,h,w8(x));else o8(y,x,h)},L5=(y,...x)=>{if(n0[y]===void 0){let[C,i]=y.split("|");if(i===void 0)n0[y]=globalThis.document.createElement(C);else n0[y]=globalThis.document.createElementNS(i,C)}let h=n0[y].cloneNode(),l={};for(let C of x)if(C instanceof Element||C instanceof DocumentFragment||typeof C==="string"||typeof C==="number")if(h instanceof HTMLTemplateElement)h.content.append(C);else h.append(C);else if(V1(C))h.append(G.span({bindText:C}));else Object.assign(l,C);for(let C of Object.keys(l)){let i=l[C];T5(h,C,i)}return h},r5=(...y)=>{let x=globalThis.document.createDocumentFragment();for(let h of y)x.append(h);return x},G=new Proxy({fragment:r5},{get(y,x){if(x=x.replace(/[A-Z]/g,(h)=>`-${h.toLocaleLowerCase()}`),y[x]===void 0)y[x]=(...h)=>L5(x,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),C4=new Proxy({fragment:r5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>L5(`${x}|${px}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),n8=new Proxy({fragment:r5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>L5(`${x}|${Nx}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),B8=new WeakSet;function vx(y,x,h="part"){let l=`[data-${h}]`;for(let C of Array.from(y.querySelectorAll(l))){if(B8.has(C))continue;let i=C.getAttribute(`data-${h}`);if(i==null)continue;let k=x[i];if(k==null)continue;B8.add(C);for(let g of Object.keys(k))T5(C,g,k[g])}}var Zx=["sort","splice","copyWithin","fill","pop","push","reverse","shift","unshift"],Rx=!0,Dx=/^\.?([^.[\](),])+(\.[^.[\](),]+|\[\d+\]|\[[^=[\](),]*=[^[\]()]+\])*$/,Hx=(y)=>Dx.test(y),a1=(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 K5(y,x){if(y!==null&&(typeof y==="object"||typeof y==="function"))return y;return new Proxy(e0,t1(x,!0))}var u8=()=>new Proxy({},t1("^",!0)),U5=(y)=>{let x=y(u8())?.path;if(!x?.startsWith("^."))throw Error("selector must return a property of the item");return x.substring(2)},G5=(y,x,h)=>{for(let l=0;l<y.length;l++)if(`${y1(y[l],x)}`===`${h}`)return l;return-1},bx=(y,x)=>({listFind(h,l){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 C=U5(h),i=G5(x,C,l);return i!==-1?U1[y][i]:void 0},listUpdate(h,l){let C=U5(h),i=y1(l,C),k=G5(x,C,i);if(k!==-1){let g=U1[y][k];for(let w of Object.keys(l))g[w]=l[w];return g}return U1[y].push(l),U1[y][x.length-1]},listRemove(h,l){let C=U5(h),i=G5(x,C,l);if(i===-1)return!1;return U1[y].splice(i,1),!0}}),z8=!1;function cx(){if(!z8)console.warn("xinValue, tosiValue, xinPath, tosiPath, etc. are deprecated. Use .tosi.value, .tosi.path, .tosi.observe(), etc. instead."),z8=!0}var q8=(y)=>{return y===e0},sx=(y,x)=>({get(h,l){switch(l){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(C)=>{let i=l0(y,C);return()=>x0(i)};case"bind":return(C,i,k)=>{gx()(C,y,i,k)};case"on":{let C=x===e0?y1(w1,y):x.valueOf?x.valueOf():x;return(i,k)=>wx()(i,k,C)}case"binding":return(C)=>({bind:{value:y,binding:C}});case"listBinding":return(C=({span:k})=>k({bindText:"^"}),i={})=>{let k=i.virtual?.itemsPerRow??1,g=[];for(let w=0;w<k;w++)g.push(C(G,u8(),w));return[{bindList:{value:y,...i}},G.template(...g)]};case"listFind":case"listUpdate":case"listRemove":return bx(y,Array.isArray(x)?x:[])[l];case"take":return(...C)=>{let i=C[C.length-1],k=C.slice(0,-1).map((g)=>typeof g==="string"?g:g[H1]);return{[x4]:!0,paths:[y,...k],transform:i}}}return},set(h,l,C){if(l==="value"){if(C=H(C),H(C1[y])!==C&&h4(w1,y,C))O1(y);return!0}return!1}}),a2=(y,x)=>new Proxy(x,sx(y,x)),j8=new Set(["path","value","touch","observe","bind","on","binding","listBinding","listFind","listUpdate","listRemove","take"]),V8=new Map([[H1,"path"],["xinPath","path"],["tosiPath","path"],[z2,"value"],["xinValue","value"],["tosiValue","value"],[Ly,"observe"],["xinObserve","observe"],["tosiObserve","observe"],[oy,"on"],["xinOn","on"],["tosiOn","on"],[ry,"bind"],["xinBind","bind"],["tosiBind","bind"],["tosiBinding","binding"],["tosiListBinding","listBinding"]]),t1=(y,x)=>({get(h,l){if((l==="tosi"||l===M5)&&x)return a2(y,h);if(q8(h)){let w=()=>y1(w1,y);switch(l){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(j8.has(l))return a2(y,h)[l];let B=V8.get(l);if(B!==void 0)return cx(),a2(y,h)[B];let q=w();if(q!=null){let j=Object(q);if(l in j){let _=j[l];return typeof _==="function"?_.bind(j):_}}return}if(x&&(l==="valueOf"||l==="toJSON"))return()=>h.valueOf?h.valueOf():h;if(x&&!(l in h)&&j8.has(l))return a2(y,h)[l];let C=V8.get(l);if(C!==void 0)return a2(y,h)[C];if(typeof l==="symbol")return h[l];let i=Object.getOwnPropertyDescriptor(h,l);if(i&&!i.configurable&&!i.writable&&"value"in i)return i.value;let k=l,g=k.match(/^([^.[]+)\.(.+)$/)??k.match(/^([^\]]+)(\[.+)/)??k.match(/^(\[[^\]]+\])\.(.+)$/)??k.match(/^(\[[^\]]+\])\[(.+)$/);if(g!==null){let[,w,B]=g,q=a1(y,w),j=H(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=H(w);let B=a1(y,k);return new Proxy(w instanceof Function?w.bind(h):w,t1(B,x))}else return x?K5(w,a1(y,k)):w}else if(Array.isArray(h)){let w=h[k];return typeof w==="function"?(...B)=>{let q=B.map((_)=>H(_)),j=w.apply(h,q);if(Zx.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(a1(y,String(_)),x))}}return j}:typeof w==="object"?new Proxy(H(w),t1(a1(y,k),x)):x?K5(w,a1(y,k)):w}else{let w=h[k];if(w!==null&&typeof w==="object")w=H(w);return x?K5(w,a1(y,k)):w}},set(h,l,C){if(C=H(C),typeof l==="symbol"&&l!==z2)return h[l]=C,!0;if(C!==null&&typeof C==="object")if(Array.isArray(C))for(let k=0;k<C.length;k++)C[k]=H(C[k]);else for(let k of Object.keys(C))C[k]=H(C[k]);let i=l===z2||l==="xinValue"||l==="tosiValue"||l==="value"&&(q8(h)||x&&!("value"in h))?y:a1(y,l);if(Rx&&!Hx(i))throw Error(`setting invalid path ${i}`);if(H(C1[i])!==C&&h4(w1,i,C))O1(i);return!0}}),o5=(y,x)=>{let h=typeof x==="function"?x:C1[x];if(typeof h!=="function")throw Error(`observe expects a function or path to a function, ${x} is neither`);return l0(y,h)},C1=new Proxy(w1,t1("",!1));ix(C1);var U1=new Proxy(w1,t1("",!0)),Sx=16,Ix=100;function P8(y,x){let h=Array.from(y.querySelectorAll(B2));if(y.matches(B2))h.unshift(y);for(let l of h){let C=L1.get(l);for(let i of C){if(i.path.startsWith("^"))i.path=`${x}${i.path.substring(1)}`;if(i.binding.toDOM!=null)i.binding.toDOM(l,C1[i.path],i.options)}}}var _8=!1;class f8{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)ny(g,h.idPath)}let l=h.virtual?.itemsPerRow??1,C=Array.from(y.children).find((g)=>g instanceof HTMLTemplateElement),i=null;if(C!=null){let g=l;if(C.content.children.length<1||C.content.children.length!==g)throw Error(`ListBinding expects a template with exactly ${g} child element(s)`);this.templates=Array.from(C.content.children).map((w)=>e2(w)),i=C.nextElementSibling,C.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(l>1){this.boundElement.classList.add("tosi-virtual-grid");let g=this.boundElement.style;if(g!=null)g.setProperty("--tosi-columns",String(l)),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",l>1?"grid":"list");if(this.boundElement[a0]=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(Z5.observe(this.boundElement),this._update=X2(()=>{this.update(this.array,!0)},Sx),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((l)=>l[y]!==!0);if(x!==void 0)h=h.filter((l)=>l[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,l=x.length-1,C=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,J=Math.max(0,j-K+1),v=$*J,d=Math.floor(v);if(y.rowChunkSize)d-=d%y.rowChunkSize;return h=d*q,l=h+U-1,C=B,i=Math.max(0,Q-B-w),{items:x,firstItem:h,lastItem:l,topBuffer:C,bottomBuffer:i,interpolation:{t:$,position:v,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,l=h+K-1,C=U*y.height,i=Math.max((j-_)*y.height-C,0)}}return{items:x,firstItem:h,lastItem:l,topBuffer:C,bottomBuffer:i}}needle;filter=X2((y)=>{if(this.needle!==y)this.needle=y,this.update(this.array)},Ix);update(y,x){if(y==null)y=[];if(this.array=y,!x)this._filteredCache=void 0;let{hiddenProp:h,visibleProp:l}=this.options,C=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&&l===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 c=g;c<=w;c++){let N=i.items[c];if(N!==void 0)$.add(String(N[Q]))}}let J=new Set;for(let c of Array.from(this.boundElement.children)){if(c===this.listTop||c===this.listBottom)continue;let N=c[Q2];if(N==null)continue;else if(N===!0)c.remove(),_++;else{if(J.has(N))continue;let s;if(Q!=null)s=!$.has(String(N[Q]));else{let D=i.items.indexOf(N);s=D<g||D>w}if(s){J.add(N);let D=this.itemToElement.get(N);if(D!=null)for(let Z of D)Z.remove();else c.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 v=[],d=Q!=null?new Set:null;for(let c=g;c<=w;c++){let N=i.items[c];if(N===void 0)continue;if(d!=null&&Q!=null){let D=String(N[Q]);if(d.has(D)){if(!_8)_8=!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 d.add(D)}let s=this.itemToElement.get(H(N));if(s==null&&Q!=null){let D=String(N[Q]);if(s=this.idToElement.get(D),s!=null){let Z=H(N);this.itemToElement.set(Z,s);for(let A1 of s)A1[Q2]=Z}}if(s==null){U++;let D=H(N);if(s=this.templates.map((Z)=>e2(Z)),typeof N==="object")this.itemToElement.set(D,s);for(let Z of s)Z[Q2]=typeof N==="object"?D:!0;for(let Z of s)if(this.listBottom!=null)this.boundElement.insertBefore(Z,this.listBottom);else this.boundElement.append(Z);if(Q!=null){let Z=N[Q],A1=`${C}[${Q}=${Z}]`;for(let f1 of s)P8(f1,A1);this.idToElement.set(String(Z),s)}else{let Z=`${C}[${c}]`;for(let A1 of s)P8(A1,Z)}}if(this.options.virtual!=null){let D=String(c+1);if(Y>1)for(let Z=0;Z<s.length;Z++){let A1=s[Z];A1.setAttribute("role","gridcell"),A1.setAttribute("aria-rowindex",D),A1.setAttribute("aria-colindex",String(Z+1))}else for(let Z of s)Z.setAttribute("role","listitem"),Z.setAttribute("aria-rowindex",D)}v.push(...s)}let l1=this.listTop;for(let c of v){if(c.previousElementSibling!==l1)if(K++,l1?.nextElementSibling!=null)this.boundElement.insertBefore(c,l1.nextElementSibling);else if(this.listBottom!=null)this.boundElement.insertBefore(c,this.listBottom);else this.boundElement.append(c);l1=c}if(i.interpolation!=null)this._updateInterpolatedBuffers(i);if(m0.perf)console.log(C,"updated",{removed:_,created:U,moved:K})}_updateInterpolatedBuffers(y){let{t:x,position:h,scrollTop:l,viewportHeight:C,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=l,B=l+C-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 l=y[a0];if(x&&l===void 0)l=new f8(y,x,h),y[a0]=l;return l},n5=(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=n5(y);return x?x.item:void 0},Mx=(y)=>{let x=n5(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 l=h.array.indexOf(x.item);if(l>-1)return h.array.splice(l,1),!0;return!1},dx={start:"start",middle:"center",end:"end",nearest:"nearest"},Tx=(y,x,h={})=>{let l=Y2(y);if(l==null)return console.error("scrollListItemIntoView failed, element has no list binding",y),!1;let{position:C="middle",behavior:i="smooth"}=h,k=l.filteredArray(),g=H(x)??x,w=k.indexOf(g);if(w===-1)return console.error("scrollListItemIntoView failed, item not found in list",x),!1;let{virtual:B}=l.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),J=K*_,v=Math.max(0,J-Q),d=Math.max(1,K-$+1),l1=j/d;switch(C){case"start":Y=l1*v;break;case"end":Y=Math.max(0,(j-$+1)/d*v);break;case"nearest":{let c=U?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop,N=v>0?c/v:0,s=Math.floor(N*d);if(j<s)Y=l1*v;else if(j>=s+$)Y=Math.max(0,(j-$+1)/d*v);else return!0;break}default:{let c=j-Math.floor($/2);Y=Math.max(0,c)/d*v}}}else{let $=j*B.height;switch(C){case"start":Y=$;break;case"end":Y=$-Q+B.height;break;case"nearest":{let J=U?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop;if($<J)Y=$;else if($+B.height>J+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=l.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:dx[C]??"center",behavior:i})}return!0},{document:h0,MutationObserver:A8}=globalThis,u5=(y,x)=>{let h=L1.get(y);if(h==null)return;for(let l of h){let{binding:C,options:i}=l,{path:k}=l,{toDOM:g}=C;if(g!=null){if(k.startsWith("^")){let w=q2(y);if(w!=null&&w[H1]!=null)k=l.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,l4()[k],i)}}};if(A8!=null)new A8((y)=>{y.forEach((x)=>{Array.from(x.addedNodes).forEach((h)=>{if(h instanceof Element)Array.from(h.querySelectorAll(B2)).forEach((l)=>u5(l))})})}).observe(h0.body,{subtree:!0,childList:!0});l0(()=>!0,(y)=>{let x=Array.from(h0.querySelectorAll(B2));for(let h of x)u5(h,y)});var a8=(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 l=y.getRootNode();y=typeof ShadowRoot<"u"&&l instanceof ShadowRoot?l.host:null}return null},m8=(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},K8=(y)=>{let x=y4(a8(y),B2);while(x!=null){let h=L1.get(x);for(let l of h??[]){let{binding:C,path:i}=l,{fromDOM:k}=C;if(k!=null){let g;try{g=k(x,l.options)}catch(w){throw console.error("Cannot get value from",x,"via",l),Error("Cannot obtain value fromDOM")}if(g!=null){let w=l4(),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=m8(x,B2)}};if(globalThis.document!=null)h0.body.addEventListener("change",K8,!0),h0.body.addEventListener("input",K8,!0);function Lx(y,x,h,l){let{paths:C,transform:i}=x,{toDOM:k}=h;if(k==null)return y;let g=null,w={toDOM(q,j,_){let K=l4(),U=C.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(I5);let B=L1.get(y);if(B==null)B=[],L1.set(y,B);for(let q of C)B.push({path:q,binding:w,options:l});if(!C[0].startsWith("^"))O1(C[0]);return y}var U8=!1,rx=(y,x)=>{if(U8)return;if(typeof ShadowRoot<"u"&&y.getRootNode!=null&&y.getRootNode()instanceof ShadowRoot)U8=!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 T1(y,x,h,l){if(y instanceof DocumentFragment)throw Error("bind cannot bind to a DocumentFragment");if(rx(y,"bind()"),x!=null&&typeof x==="object"&&x[x4])return Lx(y,x,h,l);let C;if(typeof x==="object"&&x[H1]===void 0&&l===void 0){let{value:g}=x;C=typeof g==="string"?g:g[H1],l={...x},delete l.value}else C=typeof x==="string"?x:x[H1];if(C==null)throw Error("bind requires a path or object with xin Proxy");let{toDOM:i}=h;y.classList?.add(I5);let k=L1.get(y);if(k==null)k=[],L1.set(y,k);if(k.push({path:C,binding:h,options:l}),i!=null&&!C.startsWith("^"))O1(C);if(l?.filter&&l?.needle)T1(y,l.needle,{toDOM(g,w){g[a0]?.filter(w)}});return y}var G8=new Set,ox=(y)=>{let x=y4(a8(y),e9),h=!1,l=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}}}),C=new Set;while(!h&&x!=null){let i=t2.get(x)?.[y.type]??C;for(let k of i){if(typeof k==="function")k(l);else{let g=l4()[k];if(typeof g==="function")g(l);else throw Error(`no event handler found at path ${k}`)}if(h)continue}x=m8(x,e9)}};function N2(y,x,h){let l=t2.get(y);if(y.classList.add(N8),l==null)l={},t2.set(y,l);if(!l[x])l[x]=new Set;if(l[x].add(h),!G8.has(x))G8.add(x),h0.body.addEventListener(x,ox,!0);return()=>{l[x].delete(h)}}kx(T1,N2);function E8(y,x){if(!y.internals)return;let h={},l="";if(y.hasAttribute("required")&&x==="")h.valueMissing=!0,l="Please fill out this field.";let C=y.getAttribute("minlength");if(C&&x.length<parseInt(C,10))h.tooShort=!0,l=`Please use at least ${C} characters.`;let i=y.getAttribute("maxlength");if(i&&x.length>parseInt(i,10))h.tooLong=!0,l=`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,l="Please match the requested format."}catch{}if(Object.keys(h).length>0)y.internals.setValidity(h,l,y);else y.internals.setValidity({})}var nx=0;function F5(){return`custom-elt${(nx++).toString(36)}`}var F8=0,O8=new Set,W8=new Set,Q8=Symbol("tosiDrainWrapped"),X8=new WeakSet,O5=null;function ux(){if(O5===null)O5=new MutationObserver((y)=>{let x=new Set;for(let h of y)if(h.type==="attributes"&&h.target instanceof F){let l=h.target,C=s8(h.attributeName);if(l._legacyTrackedAttrs?.has(C))x.add(l)}for(let h of x)h.queueRender(!1)});return O5}var E2={};function fx(y,x){let h=E2[y],l=$2(x).replace(/:host\(([^)]+)\)/g,`${y}$1`).replace(/:host\b/g,y);E2[y]=h?h+`
13
- `+l:l}function ax(y){if(E2[y])document.head.append(G.style({id:y+"-component"},E2[y]));delete E2[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=F5();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=F5();while(customElements.get(h)!==void 0)h=F5();x._tagName=h;let l=y.styleSpec??x.lightStyleSpec;if(l!==void 0)fx(h,l);let C=y.extends??x.extends,i=C?{extends:C}:void 0,k=this.prototype;if(k!=null&&!Object.prototype.hasOwnProperty.call(k,Q8)){let g=k.connectedCallback;k.connectedCallback=function(){if(this._drainPendingAttrOps(),g)g.call(this)},Object.defineProperty(k,Q8,{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 l of y)this._legacyTrackedAttrs.add(l);ux().observe(this,{attributes:!0});let x={},h={};y.forEach((l)=>{x[l]=D1(this[l]);let C=K1(l);Object.defineProperty(this,l,{enumerable:!1,get(){if(typeof x[l]==="boolean")return this.hasAttribute(C);else if(this.hasAttribute(C))return typeof x[l]==="number"?parseFloat(this.getAttribute(C)):this.getAttribute(C);else if(h[l]!==void 0)return h[l];else return x[l]},set(i){if(typeof x[l]==="boolean"){if(i!==this[l]){if(i)this.setAttribute(C,"");else this.removeAttribute(C);this.queueRender()}}else if(typeof x[l]==="number"){if(i!==parseFloat(this[l]))this.setAttribute(C,i),this.queueRender()}else if(typeof i==="object"||`${i}`!==`${this[l]}`){if(i===null||i===void 0||typeof i==="object")this.removeAttribute(C);else this.setAttribute(C,i);this.queueRender(),h[l]=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 l=y.querySelector(`[part="${h}"]`);if(l==null)l=y.querySelector(`[data-ref="${h}"]`);if(l==null)l=y.querySelector(h);if(l==null)throw Error(`elementRef "${h}" does not exist!`);l.removeAttribute("data-ref"),x[h]=l}return x[h]}});return this._parts}attributeChangedCallback(y,x,h){let l=s8(y);if(h===null&&this._attrValues?.has(l))this._attrValues.delete(l);if(!this._legacyTrackedAttrs?.has(l))this.queueRender(!1)}constructor(){super();if(F8+=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()}-${F8}`,this._value=D1(this.defaultValue),this._warnOnHandlerCollisions()}_warnOnHandlerCollisions(){let y=this.constructor;if(X8.has(y))return;X8.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 l=this.tagName.toLowerCase();if(x.delete("onResize")&&this.handleResize===void 0)console.warn(`<${l}> 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 C=Array.from(x,(i)=>`'${i}'`).join(", ");console.warn(`<${l}> defines ${C}. 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 l=HTMLElement.prototype;this.setAttribute=(C,i)=>{if(x.has(C))h.push(["set",C,String(i)]);else l.setAttribute.call(this,C,i)},this.removeAttribute=(C)=>{if(x.has(C))h.push(["remove",C]);else l.removeAttribute.call(this,C)},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),l=y[x];if(x==="value"){console.warn(`${this.tagName}: 'value' cannot be an attribute. Use the Component value property instead.`);continue}if(typeof l==="object"&&l!==null){console.warn(`${this.tagName}: initAttributes.${x} is an object. Use a regular property instead.`);continue}if(l===!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 C=this,i=!1;while(C){let k=Object.getOwnPropertyDescriptor(C,x);if(k){if(!k.configurable||k.get||k.set){i=!0;break}break}C=Object.getPrototypeOf(C)}if(i)continue;this._installAttrAccessor(x,h,l)}}_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:(l)=>{if(typeof h==="boolean"){if(l!==this[y]){if(l)this.setAttribute(x,"");else this.removeAttribute(x);this.queueRender(),this._attrValues.set(y,!!l)}}else if(typeof h==="number"){if(l!==parseFloat(this[y]))this.setAttribute(x,l),this.queueRender(),this._attrValues.set(y,l)}else if(typeof l==="object"||`${l}`!==`${this[y]}`){if(l===null||l===void 0||typeof l==="object")this.removeAttribute(x);else this.setAttribute(x,l);this.queueRender(),this._attrValues.set(y,l)}}}),this._installedAttrAccessors.add(y)}_recoverShadowedAttrAccessors(){let y=this._installedAttrAccessors,x=this.constructor.initAttributes;if(y==null||x==null)return;let h=[];for(let l of y){let C=Object.getOwnPropertyDescriptor(this,l);if(C==null||C.get!=null||C.set!=null)continue;let i=C.value;delete this[l],this._installAttrAccessor(l,K1(l),x[l]),this[l]=i,h.push(l)}if(h.length>0&&!W8.has(this.tagName)){W8.add(this.tagName);let l=h.map((C)=>`'${C}'`).join(", ");console.warn(`<${this.tagName.toLowerCase()}> declares instance field(s) ${l} 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(),ax(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(Z5.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(){Z5.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(b8(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))T5(this,k,i[k])}let h=this.constructor,l=h.shadowStyleSpec??h.styleSpec;if(h.styleSpec&&!h.shadowStyleSpec)j1("static-styleSpec","static styleSpec is deprecated. Use static shadowStyleSpec instead.");let{styleNode:C}=h;if(l)C=h.styleNode=G.style($2(l)),delete h.styleNode;if(this.styleNode)console.warn(this,"styleNode is deprecated, use static shadowStyleSpec instead"),C=this.styleNode;if(C){let i=this.attachShadow({mode:"open"});if(i.appendChild(C.cloneNode(!0)),i8(i,x,y),!O8.has(this.tagName)&&i.querySelector(B2)!=null)O8.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);i8(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);E8(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 mx=i4.elementCreator();class t8 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 Ex=t8.elementCreator(),tx=(y=()=>!0)=>{let x=localStorage.getItem("xin-state");if(x!=null){let l=JSON.parse(x);for(let C of Object.keys(l).filter(y))C1[C]=l[C]}let h=C0(()=>{let l={},C=H(C1);for(let i of Object.keys(C).filter(y))l[i]=C[i];localStorage.setItem("xin-state",JSON.stringify(l)),console.log("xin state saved to localStorage")},500);o5((l)=>{let C=l.split(/[.[]/)[0];return y(C)},h)},ex="tosijs-share",yh="tosijs-share",m2="shared",xh=1,R5=new Set,D5=new Set,H5=new Set,b5=new Set,W5=new Map,g2=null,c5="",u0=null,hh=null;function $8(){if(u0!=null)return Promise.resolve(u0);return new Promise((y,x)=>{let h=indexedDB.open(yh,xh);h.onupgradeneeded=()=>{h.result.createObjectStore(m2)},h.onsuccess=()=>{u0=h.result,y(u0)},h.onerror=()=>x(h.error)})}var lh={async get(y){let x=await $8();return new Promise((h,l)=>{let C=x.transaction(m2,"readonly").objectStore(m2).get(y);C.onsuccess=()=>h(C.result),C.onerror=()=>l(C.error)})},async set(y,x){let h=await $8();return new Promise((l,C)=>{let i=h.transaction(m2,"readwrite");i.objectStore(m2).put(x,y),i.oncomplete=()=>l(),i.onerror=()=>C(i.error)})}};function e8(){return hh??lh}function Ch(y){return y!=null&&y.type==="tosijs-share"&&typeof y.path==="string"}function f5(y){for(let x of R5)if(y===x||y.startsWith(x+"."))return x;return}function ih(y){for(let x of D5)if(y===x||y.startsWith(x+"."))return!0;return!1}function y6(y,x){let h=f5(y);if(h!==void 0&&H5.has(h))b5.add(h);D5.add(y),h4(w1,y,x),O1(y),d5().then(()=>{D5.delete(y)})}function kh(){if(g2!=null)return g2;return c5=crypto.randomUUID(),g2=new BroadcastChannel(ex),g2.onmessage=(y)=>{let x=y.data;if(!Ch(x))return;if(x.origin===c5)return;if(f5(x.path)===void 0)return;y6(x.path,x.value)},g2}function gh(y,x){if(g2==null)return;let h={type:"tosijs-share",path:y,value:x,origin:c5};g2.postMessage(h)}function wh(y){if(!W5.has(y))W5.set(y,C0(()=>{let x=y1(w1,y);e8().set(y,x)},500));W5.get(y)()}async function Bh(...y){if(typeof BroadcastChannel>"u")return{restored:[]};kh();let x=[],h=e8();for(let l of y){let C=typeof l==="string"?l:V1(l);if(C===void 0)throw Error("share() requires boxed proxies or string paths. Got a non-proxy value.");if(R5.has(C))continue;R5.add(C),H5.add(C);let i=await h.get(C),k=b5.has(C);if(H5.delete(C),b5.delete(C),i!==void 0&&!k)y6(C,i),x.push(l);else if(i===void 0){let g=y1(w1,C);await h.set(C,g)}l0((g)=>g===C||g.startsWith(C+"."),(g)=>{if(ih(g))return;let w=f5(g);if(w===void 0)return;let B=y1(w1,g);gh(g,B),wh(w)})}return{restored:x}}var s5=new Set;function Y8(y,x){for(let h of y)if(x===h||x.startsWith(h+"."))return h;return}function zh(y){for(let x of s5)if(y===x||y.startsWith(x+"."))return!0;return!1}function qh(y,x){s5.add(y),h4(w1,y,x),O1(y),d5().then(()=>{s5.delete(y)})}async function jh(y,x,...h){let l=new Set,C=[],i=[],k=x.throttleInterval??100;await y.connect();let g=X2(()=>{if(C.length===0)return;let w=C.splice(0);try{y.send(w)}catch(B){C.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(Y8(l,B.path)===void 0)continue;qh(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.");l.add(B);let q=l0((j)=>j===B||j.startsWith(B+"."),(j)=>{if(zh(j))return;if(Y8(l,j)===void 0)return;let _=y1(w1,j);C.push({path:j,value:_}),g()});i.push(q)}return{disconnect(){for(let w of i)x0(w);i.length=0,l.clear(),C.length=0,y.disconnect()}}}var x6="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 Vh=new FinalizationRegistry((y)=>{y()});function Ph(y,x){let h=J8();U1[h]=y;let l=U1[h],C=()=>{delete C1[h]};if(x)Vh.register(x,C);return[l,C]}function h6(y,x=!1){if(x)return j1("xinProxy-boxed","xinProxy(..., true) is deprecated; use tosi(...) instead"),a5(y);return Object.keys(y).forEach((h)=>{C1[h]=y[h]}),C1}var _h={};async function m5(y,x){let h=await x(y,{Color:X,Component:F,elements:G,svgElements:C4,mathML:n8,varDefault:P,vars:z,xin:C1,boxed:U1,xinProxy:h6,boxedProxy:a5,tosi:t,makeComponent:m5,bind:T1,on:N2,version:x6}),{type:l}=h;l.preferredTagName=y;let C=h.lightStyleSpec??h.styleSpec;if(C)l.lightStyleSpec=C;let i={type:l,creator:l.elementCreator()};return _h[y]=i,i}var k4={":host":{display:"none"}},f0={},Ah=(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,l=`${y}.${h}:${x}`;if(!this.loaded){if(f0[l]===void 0)f0[l]=Ah(x).then((C)=>{let i=C[h];return m5(y,i)});else console.log(`using cached ${y} with signature ${l}`);try{this.loaded=await f0[l]}catch(C){throw delete f0[l],C}this.blueprintLoaded(this.loaded)}return this.loaded}}var Kh=g4.elementCreator();class E5 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 l=x[h];if(l.status==="rejected")console.error(`<tosi-loader> failed to load blueprint from "${y[h].src}":`,l.reason)}this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var Uh=E5.elementCreator();class l6 extends g4{static preferredTagName="xin-blueprint";static lightStyleSpec=k4;constructor(){super();j1("xin-blueprint","<xin-blueprint> is deprecated. Use <tosi-blueprint> instead.")}}var Gh=l6.elementCreator();class C6 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 l=x[h];if(l.status==="rejected")console.error(`<xin-loader> failed to load blueprint from "${y[h].src}":`,l.reason)}this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var Fh=C6.elementCreator();var t5={};class p2 extends F{static preferredTagName="tosi-ab";static set conditions(y){Object.assign(t5,y);for(let x of[...p2.instances])x.queueRender()}static initAttributes={condition:"",not:!1};static instances=new Set;connectedCallback(){super.connectedCallback(),p2.instances.add(this)}disconnectedCallback(){super.disconnectedCallback(),p2.instances.delete(this)}render(){if(this.condition!==""&&(this.not?t5[this.condition]!==!0:t5[this.condition]===!0))this.toggleAttribute("hidden",!1);else this.toggleAttribute("hidden",!0)}}var Oh=p2.elementCreator();var w4={};function b1(y,x){if(w4[y]===void 0){if(x!==void 0){let l=globalThis[x];w4[y]=Promise.resolve({[x]:l})}let h=G.script({src:y});document.head.append(h),w4[y]=new Promise((l)=>{h.onload=()=>l(globalThis)})}return w4[y]}var e5={};function B4(y){if(e5[y]===void 0){let x=G.link({rel:"stylesheet",type:"text/css",href:y});document.head.append(x),e5[y]=new Promise((h)=>{x.onload=h})}return e5[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 Wh=(y)=>{Object.assign(j2,y)},g0=(y,x,h,l)=>{let C=y instanceof SVGElement?[y]:Array.from(y.querySelectorAll("svg"));if(C.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=C[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(l!==void 0)w.setAttribute("stroke-width",String(l))}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)})`},Qh=(y)=>/\d$/.test(y)?y+"_":y,x3=[{prefix:/^spin(_?\d+)/,apply(y,x,h){let l=x[1].replace("_","-"),C=360/Math.abs(parseFloat(l)),i=l.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:C*1000,iterations:1/0,direction:i})}return h3(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`}],Xh=0;function i6(y,x){let h=G.div();h.innerHTML=y;let l=h.querySelector("svg"),C=l.querySelectorAll("[id]");if(C.length>0){let g=new Map;for(let q of C){let j=q.id,_=`tosi_svg_id_${++Xh}`;g.set(j,_),q.id=_}let w=l.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)l.innerHTML=B}let i=new Set(l.classList);i.add("tosi-icon");let k=C4.svg({class:Array.from(i).join(" "),viewBox:l.getAttribute("viewBox")},...x,...l.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 h3(y,x,...h){let l=G.span({class:"tosi-icon-composite",dataIcon:y,style:{display:"inline-flex",position:"relative",pointerEvents:"none"}},...h);for(let C of x)if(C&&typeof C==="object"&&!("nodeType"in C)){let i=C;if(i.style&&typeof i.style==="object")Object.assign(l.style,i.style);if(i.class)l.classList.add(...String(i.class).split(" "))}return l}function $h(y){let x=j2;if(x[y])return!0;let h=y3(y);return h!=null&&!!x[h.baseName]}function k6(y,x){for(let h of x3){let l,C;if(h.prefix instanceof RegExp){let k=new RegExp(h.prefix.source+"(.+)$"),g=y.match(k);if(!g)continue;l=g[g.length-1],l=l[0].toLowerCase()+l.slice(1),C=g}else{if(!y.startsWith(h.prefix)||y.length<=h.prefix.length)continue;l=y[h.prefix.length].toLowerCase()+y.slice(h.prefix.length+1),C=h.prefix}if(!$h(l))continue;let i=h.apply(Qh(l),C,x);if(typeof i==="string")return e1(i,x);if(i)return i}return null}var Yh=10,Nh=/(?:(?<=[a-zA-Z_])(?:_?\d+[osxyr]|[01]f|\d+W)|_[a-zA-Z0-9]+[FS])+$/;function y3(y){let x=y.match(Nh);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(!x3.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 C={},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")C.fill=j;else C.stroke=j}else if(w==="W")C.strokeWidth=g.slice(0,-1);else{let B=parseInt(g.replace("_","-"));switch(w){case"o":C.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)C.transform=k.join(" "),C.transformOrigin="50% 50%";return{baseName:h,style:C}}function e1(y,x){if(y.endsWith("_"))y=y.slice(0,-1);let h=j2,l=y;for(let k=0;k<Yh;k++){let g=h[l];if(!g)break;if(g.startsWith("<"))return i6(g,x);l=g}if(l!==y){let k=k6(l,x);if(k)return k;let g=y3(l);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 h3(y,x,g,...w)}let C=k6(y,x);if(C)return C;let i=y3(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 i6(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 ph=l3.elementCreator();var g6=()=>{};function Jh(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((C)=>C+C).join("");if(h.length===6)h+="ff";let l=parseInt(h,16);if(Number.isNaN(l)||h.length!==8)return new y.Color4(0,0,0,1);return new y.Color4((l>>>24&255)/255,(l>>>16&255)/255,(l>>>8&255)/255,(l&255)/255)}class C3 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=g6;update=g6;_update=()=>{if(this.scene){if(this.update!==void 0)this.update(this,this.BABYLON);if(this.scene.activeCamera!==void 0)this.scene.render()}};onResize(){if(this.engine)this.engine.resize()}loadScene=async(y,x,h)=>{let{BABYLON:l}=await b1("https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js","BABYLON");l.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:l,jsonUrl:C,data:i,size:k}=y;if(k)h.idealWidth=k,h.renderAtIdealSize=!0;let g;if(l)g=await h.parseFromSnippetAsync(l);else if(C)g=await h.parseFromURLAsync(C);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?Jh(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 l=this.src.lastIndexOf("/");await this.loadScene(this.src.slice(0,l+1)||"/",this.src.slice(l+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 l=new x.HemisphericLight("hemi",new x.Vector3(0,1,0),this.scene);l.intensity=0.6}if(this.heroLight){let l=new x.DirectionalLight("hero",new x.Vector3(-1,-2,1),this.scene);l.intensity=0.8}this.engine.runRenderLoop(this._update)})}}var vh=C3.elementCreator();class J2 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(J2.bodymovinAvailable===void 0)J2.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(),J2.bodymovinAvailable.then(this.load).catch((y)=>{console.error(y)})}}var Zh=J2.elementCreator();var{button:i3,slot:Rh,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:l}=this.parts;if(this.lastPage<=0)l.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,l.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((l,C)=>{l.classList.toggle("current",Math.floor(C/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:l}=this.parts;if(x===-1){x=l.scrollLeft,h=Date.now(),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)});return}let C=(Date.now()-h)/1000;if(C>=this.snapDuration||Math.abs(l.scrollLeft-y)<2)l.scrollLeft=y,this.animationFrame=null;else l.scrollLeft=x+this.easing(C/this.snapDuration)*(y-x),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)})}content=()=>[z4({part:"pager"},i3({title:"previous slide",part:"back"},O.chevronLeft()),z4({title:"slides",role:"group",part:"scroller"},z4({part:"grid"},Rh())),i3({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:l}=this.parts;y.addEventListener("click",this.back),x.addEventListener("click",this.forward),h.addEventListener("scroll",this.indicateCurrent),l.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:l}=this,{progress:C,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+"%",C.textContent="",C.append(...h.map((w,B)=>i3({title:`item ${B+1}`,class:"dot"}))),this.indicateCurrent(),C.style.display=y&&l>0?"":"none",i.hidden=k.hidden=!(x&&l>0)}}var Dh=q4,w6=q4.elementCreator(),Hh=w6;var{div:B6,span:z6}=G;function q6(y,x){let h=y.split(`
14
- `),l=x.split(`
15
- `),C=h.length,i=l.length,k=Array.from({length:C+1},()=>Array(i+1).fill(0));for(let q=C-1;q>=0;q-=1)for(let j=i-1;j>=0;j-=1)k[q][j]=h[q]===l[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<C&&B<i)if(h[w]===l[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:l[B]}),B+=1;while(w<C)g.push({op:"remove",text:h[w]}),w+=1;while(B<i)g.push({op:"add",text:l[B]}),B+=1;return g}var bh={context:" ",add:"+",remove:"-"};class k3 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=()=>[B6({part:"body"})];render(){super.render();let y=q6(this.original,this.modified);this.parts.body.replaceChildren(...y.map((x)=>B6({class:`diff-line diff-${x.op}`},z6({class:"marker"},bh[x.op]),z6({class:"text"},x.text===""?" ":x.text))))}}var w0=k3.elementCreator();var{div:j6}=G,V6=new Set,B0=(y,x)=>{if(V6.has(y))return;V6.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.`)},P6=!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(!P6)P6=!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=()=>[j6({part:"host"}),j6({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"}};onResize(){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-2hgj9002.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:(l)=>this.dispatchEvent(new CustomEvent("change",{detail:{value:l}}))});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-2hgj9002.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:g3}=G,_6=X.fromCss("#8888");class A6 extends F{static preferredTagName="tosi-color";value=_6.rgba;color=_6;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=[g3({title:"base color",type:"color",part:"rgb"}),g3({type:"range",title:"opacity",part:"alpha",min:0,max:1,step:0.05}),g3({title:"css color spec",part:"css"})];valueChanged=!1;update=(y)=>{let{rgb:x,alpha:h,css:l}=this.parts;if(y.type==="input")this.color=X.fromCss(x.value),this.color.a=Number(h.value),l.value=this.color.html;else this.color=X.fromCss(l.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 w3=A6.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:C,clientY:i}=y;y2.style.cursor=h,x2(y2),document.body.append(y2);let k=(g)=>{let w=g.clientX-C,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 C=y.changedTouches[0],i=C.identifier,k=C.clientX,g=C.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)};var{slot:ch}=G;class u1 extends F{static preferredTagName="tosi-float";static floats=new Set;static initAttributes={drag:!1,remainOnResize:"remove",remainOnScroll:"remain"};content=ch();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,l=this.offsetTop;P1(y,(C,i,k)=>{if(this.style.left=`${h+C}px`,this.style.top=`${l+i}px`,this.style.right="auto",this.style.bottom="auto",k.type==="mouseup")return!0})}};connectedCallback(){super.connectedCallback(),Ih(),u1.floats.add(this);let y={passive:!0};this.addEventListener("touchstart",this.reposition,y),this.addEventListener("mousedown",this.reposition,y),x2(this)}disconnectedCallback(){super.disconnectedCallback(),u1.floats.delete(this)}}var sh=u1,z0=u1.elementCreator(),Sh=z0,K6=!1;function Ih(){if(K6)return;K6=!0,window.addEventListener("resize",()=>{Array.from(u1.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(u1.tagName))return;Array.from(u1.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:l,remainOnScroll:C,remainOnResize:i,draggable:k}=y,g=Array.isArray(x)?z0(...x):z0(x);if(U6(g,h,l,C,i,k),y.class)g.setAttribute("class",y.class);return document.body.append(g),g},U6=(y,x,h,l,C,i=!1)=>{{let{position:U}=getComputedStyle(y);if(U!=="fixed")y.style.position="fixed";if(C)y.remainOnResize=C;if(l)y.remainOnScroll=l;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})`)};function P4(y,x=!0){return(h,l)=>{let C=y(h),i=y(l);for(let k in C)if(C[k]!==i[k])return(Array.isArray(x)?x[k]!==!1:x)?C[k]>i[k]?1:-1:C[k]>i[k]?-1:1;return 0}}var{button:Mh,span:G6,input:dh}=G,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 c1 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=c1.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[l,C]=h.split("=").map((g)=>g.trim());if(!C)return{value:l,caption:l};let[i,k]=C.split(":").map((g)=>g.trim());return{value:l,caption:i||l,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,l,C,i,k,g;if(typeof y==="string")C=i=y;else({icon:l,caption:C,value:i,tooltip:k,properties:g}=y);if(this.localized)C=I(C);let{options:w}=y;if(w)return{icon:l,caption:C,tooltip:k,properties:g,checked:()=>F6(w,h()),menuItems:w.map(this.buildOptionMenuItem)};return{icon:l,caption:C,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 l=F1(h.menuItems);return h.menuItems=l.filter(x),l.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(),x1(0),this.popOptions()});popOptions=(y)=>{if(y&&y.type==="click")this.filter="";this.poppedOptions=this.optionsMenu,this.isExpanded=!0,this.updateAriaExpanded(),o({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=()=>[Mh({type:"button",part:"button",onClick:this.popOptions},G6(),dh({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 l of h)if(typeof l==="string")y.push({caption:l,value:l});else if(l?.value)y.push(l);else if(l?.options)x(l.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=c1.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,l=this.findOption(),C=G6();if(y.value=this.localized?I(l.caption):l.caption,l.icon)if(l.icon instanceof HTMLElement)C=l.icon.cloneNode(!0);else C=O[l.icon]();h.replaceWith(C),y.setAttribute("placeholder",this.localized?I(this.placeholder):this.placeholder),y.style.pointerEvents=this.editable?"":"none",y.readOnly=!this.editable}}var Th=c1,G1=c1.elementCreator(),Lh=B1((...y)=>G1(...y),"xinSelect is deprecated, use tosiSelect instead (tag is now <tosi-select>)");var{span:W6}=G,{i18n:n}=t({i18n:{locale:window.navigator.language,locales:[window.navigator.language],languages:[window.navigator.language],emoji:[""],stringMap:{},localeOptions:[{icon:W6(),caption:window.navigator.language,value:window.navigator.language}]}});r1.localeOptions={toDOM(y,x){if(y instanceof c1)y.options=x}};var A4=(y)=>{if(n.locales.value.includes(y))n.locale.value=y;else console.error(`language ${y} is not available`)},B3=()=>{let y=Array.from(s1.allInstances);for(let x of y)x.localeChanged();X6()};n.locale.observe(B3);var j0="data-tosi-localized";function V0(y){let x=y.getAttribute(j0);if(!x)return;let h;try{h=JSON.parse(x)}catch(l){console.warn(`[data-tosi-localized] invalid JSON: ${x}`,l);return}if(!h||typeof h!=="object")return;for(let[l,C]of Object.entries(h)){if(typeof C!=="string")continue;y.setAttribute(l,I(C))}}function*Q6(y){for(let x of Array.from(y.querySelectorAll(`[${j0}]`)))yield x;for(let x of Array.from(y.querySelectorAll("*"))){let h=x.shadowRoot;if(h)yield*Q6(h)}}function X6(){if(typeof document>"u")return;for(let y of Q6(document))V0(y)}var O6=null;if(typeof document<"u"&&typeof MutationObserver<"u"){let y=()=>{if(!document.body){queueMicrotask(y);return}O6=new MutationObserver((x)=>{for(let h of x){if(h.type==="attributes"&&h.target instanceof Element){V0(h.target);continue}for(let l of Array.from(h.addedNodes)){if(!(l instanceof Element))continue;if(l.hasAttribute(j0))V0(l);for(let C of Array.from(l.querySelectorAll(`[${j0}]`)))V0(C)}}}),O6.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[j0]}),X6()};y()}var rh=P4((y)=>[y.caption.toLocaleLowerCase()]);function z3(y){let[x,,h,l,...C]=y.split(`
16
- `).map((i)=>i.split("\t"));if(x&&h&&l&&C){if(n.locales.value=x,n.languages.value=h,n.emoji.value=l,n.stringMap.value=C.reduce((i,k)=>{return i[k[0].toLocaleLowerCase()]=k,i},{}),n.localeOptions.value=x.map((i,k)=>({icon:W6({title:x[k]},l[k]),caption:h[k],value:i})).sort(rh),!n.locales.value.includes(n.locale.value)){let i=n.locale.value.substring(0,2);n.locale.value=n.locales.value.find((k)=>k.substring(0,2)===i)||n.locales.value[0]}B3()}}function I(y){if(y.endsWith("…"))return I(y.substring(0,y.length-1))+"…";let x=n.locales.value.indexOf(n.locale.value);if(x>-1){let h=H(n.stringMap),l=y.toLocaleLowerCase(),C=h[l],i=C&&C[x];if((!i||i==='"')&&l.includes("#")){let k=h[l.substring(0,l.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 K4 extends F{static preferredTagName="tosi-locale-picker";static initAttributes={hideCaption:!1};content=()=>{return G1({part:"select",showIcon:!0,title:I("Language"),bindValue:n.locale,bindLocaleOptions:n.localeOptions})};render(){super.render(),this.parts.select.toggleAttribute("hide-caption",this.hideCaption)}}var oh=K4,$6=K4.elementCreator(),nh=$6;class s1 extends F{static preferredTagName="tosi-localized";static lightStyleSpec={":host":{pointerEvents:"none"}};static allInstances=new Set;static initAttributes={refString:""};contents=()=>G.tosiSlot();connectedCallback(){super.connectedCallback(),s1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),s1.allInstances.delete(this)}localeChanged(){if(!this.refString)this.refString=this.textContent||"";this.textContent=this.refString?I(this.refString):""}render(){super.render(),this.localeChanged()}}var _4=s1,Q1=s1.elementCreator(),uh=Q1;var Y6=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||""),fh=Y6?{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},ah=(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("-")},mh=[[/\^|ctrl-?/i,"ctrlKey"],[/⌘|meta-?/i,"metaKey"],[/⌥|⎇|alt-?|option-?/i,"altKey"],[/⇧|shift-?/i,"shiftKey"]],U4=(y)=>{let x=y.trim(),h={ctrlKey:!1,metaKey:!1,altKey:!1,shiftKey:!1,key:""};for(let[l,C]of mh)if(l.test(x))h[C]=!0,x=x.replace(l,"");return x=x.replace(/^-+/,""),h.key=x.toLowerCase(),h},q3=(y,x)=>{let h=U4(x);return y.key.toLowerCase()===h.key&&y.metaKey===h.metaKey&&y.ctrlKey===h.ctrlKey&&y.altKey===h.altKey&&y.shiftKey===h.shiftKey},Eh=(y)=>{let x=U4(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("-")},G4=(y)=>{let x=U4(y);if(Y6){let l=[];if(x.ctrlKey)l.push("⌃");if(x.altKey)l.push("⌥");if(x.shiftKey)l.push("⇧");if(x.metaKey)l.push("⌘");return l.push(x.key.toUpperCase()),l.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 O4={};S5(O4,{stringToTypes:()=>Z2,isTypeAllowed:()=>R2,init:()=>P3,draggedElement:()=>hl});var th=()=>!!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[l,C]=h.split("/"),[i,k]=x.split("/");if((l==="*"||l===i)&&(C==="*"||C===k))return!0}else if(h===x)return!0},F4=(y)=>{for(let x of[...document.querySelectorAll(`.${y}`)])x.classList.remove(y)},v6=()=>{if(v2)v2.disconnect(),v2=null;j3=[],F4("drag-over"),F4("drag-source"),F4("drag-target")},Z2=(y,x=";")=>{return(y||"").split(x).map((h)=>h.trim()).filter((h)=>h!=="")},j3=[],v2=null,V3=(y)=>{if(!y)y=[];j3=y;let x=[...document.querySelectorAll("[data-drop]")];for(let h of x){let l=Z2(h.dataset.drop);if(y.find((C)=>R2(l,C)))h.classList.add("drag-target");else h.classList.remove("drag-target")}if(!v2)v2=new MutationObserver(()=>V3(j3)),v2.observe(document.body,{childList:!0,subtree:!0})};function eh(y){let x=y.target?.closest('[draggable="true"],a[href]');if(!x)return;x.classList.add("drag-source");let h=x.matches('[draggable="true"]')?Z2(x.dataset.drag||"text/html"):Z2(x.dataset.drag||"url");for(let l of h){let C=x.dataset.dragContent||(l==="text/html"?x.innerHTML:x.textContent);y.dataTransfer?.setData(l,C||"")}V3(y.dataTransfer?.types),y.stopPropagation()}function p6(y){if(!th())V3(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 yl(){F4("drag-over")}function xl(y){let x=y.target.closest(".drag-target");if(x){let h=(x.dataset?.drop||"").split(";");for(let l of h)if(R2(y.dataTransfer?.types,l))if(l==="text/html")x.innerHTML=y.dataTransfer?.getData(l)||"";else x.textContent=y.dataTransfer?.getData(l)||""}v6()}var hl=()=>document.querySelector(".drag-source"),J6=!1,P3=()=>{if(J6)return;document.body.addEventListener("dragstart",eh),document.body.addEventListener("dragenter",p6),document.body.addEventListener("dragover",p6),document.body.addEventListener("drop",xl),document.body.addEventListener("dragleave",yl),document.body.addEventListener("dragend",v6),window.addEventListener("dragover",(y)=>y.preventDefault()),window.addEventListener("drop",(y)=>y.preventDefault()),J6=!0};var F1=(y)=>typeof y==="function"?y():y,{div:Z6,button:A0,span:a,a:ll,tosiSlot:Cl}=G,b6=(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 l=[];for(let C of y){if(C===null){l.push(C);continue}if(typeof C==="function"){l.push(C);continue}let{acceptsDrop:i}=C;if(!i){if(!h)l.push({...C,enabled:()=>!1});continue}if(!x.some((w)=>R2(i,w))){if(!h)l.push({...C,enabled:()=>!1});continue}let g=C;if(g.menuItems){let w=_0(F1(g.menuItems),x,!0);if(w.length>0||g.dropAction){let B=h?w:_0(F1(g.menuItems),x,!1);l.push({...g,menuItems:B})}else if(!h)l.push({...g,enabled:()=>!1})}else l.push(C)}return b6(l)},_3=(y,x=!1)=>{let h=[];for(let l of y){if(l===null){h.push(l);continue}if(typeof l==="function"){h.push(l);continue}let{action:C,menuItems:i}=l;if(C||i)if(i){let k=_3(F1(i),!0);if(k.length>0){let g=x?k:_3(F1(i),!1);h.push({...l,menuItems:g})}else if(!x)h.push({...l,enabled:()=>!1})}else h.push(l);else if(!x)h.push({...l,enabled:()=>!1})}return b6(h)},il={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`)},kl={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"},gl={color:P.menuItemColor("#222")},wl={boxShadow:"none !important",background:P.menuItemHoverBg("#eee")},R6={boxShadow:"none !important",background:P.menuItemActiveBg("#aaa"),color:P.menuItemActiveColor("#000")},Bl={background:`${P.menuDropOverBg("#2196F3")} !important`,color:`${P.menuDropOverColor("#fff")} !important`},zl={color:`${P.menuDropOverColor("#fff")} !important`},ql={stroke:`${P.menuDropOverColor("#fff")} !important`},D6={boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${P.menuDropOverBg("#2196F3")} 50%, transparent) !important`},jl={".xin-menu, .tosi-menu":il,".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":kl,".xin-menu-item, .xin-menu-item > span, .tosi-menu-item, .tosi-menu-item > span":gl,".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":wl,".xin-menu-item.drag-target:hover, .tosi-menu-item.drag-target:hover":D6,".xin-menu-item:active, .tosi-menu-item:active":R6,".xin-menu-item:active svg, .tosi-menu-item:active svg":{stroke:P.menuItemIconActiveColor("#000")},".xin-menu-item-highlight, .tosi-menu-item-highlight":R6,".xin-menu-item-highlight svg, .tosi-menu-item-highlight svg":{stroke:P.menuItemIconActiveColor("#000")},".xin-drop-over, .tosi-drop-over":Bl,".xin-drop-over > span, .tosi-drop-over > span":zl,".xin-drop-over svg, .tosi-drop-over svg":ql,".drag-target":D6},H6=!1;function K3(){if(H6)return;H6=!0,W1("xin-menu-helper",jl),document.addEventListener("mousedown",(y)=>{if(h1.length===0)return;let x=y.composedPath();if(!h1.find((h)=>x.includes(h.target)||x.includes(h.menu)))x1(0)}),document.body.addEventListener("keydown",(y)=>{if(y.key==="Escape")x1(0)})}var c6=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,l=y?.icon||h||a(" ");if(typeof l==="string")l=O[l]();let C=x.role==="listbox"?"option":"menuitem",i,k=y.properties||{};if(typeof y?.action==="string")i=ll(k,{role:C,href:y.action},l,x.localized?a(I(y.caption)):a(y.caption),a({class:"tosi-menu-shortcut"},y.shortcut?G4(y.shortcut):" "));else i=A0(k,{role:C,onClick:y.action},l,x.localized?a(I(y.caption)):a(y.caption),a({class:"tosi-menu-shortcut"},y.shortcut?G4(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},s6=(y,x)=>{let h=y?.icon||a(" ");if(typeof h==="string")h=O[h]();let l=y.properties||{},C=A0(l,{onDragenter(i){H2(),C.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&&C.contains(k))return;C.classList.remove("xin-drop-over","tosi-drop-over")},onDrop(i){if(i.preventDefault(),i.stopPropagation(),C.classList.remove("xin-drop-over","tosi-drop-over"),y.dropAction&&i.dataTransfer)y.dropAction(i.dataTransfer);x1(0)}},h,x.localized?a(I(y.caption)):a(y.caption),a(" "));if(C.classList.add("xin-menu-item","tosi-menu-item"),y.tooltip)C.dataset.tooltip=y.tooltip;if(y.dropAction&&y.acceptsDrop)C.dataset.drop=y.acceptsDrop.join(";");if(y?.enabled&&!y.enabled())C.setAttribute("disabled",""),C.setAttribute("aria-disabled","true");return C},A3=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,l=y?.icon||h||a(" ");if(typeof l==="string")l=O[l]();let C=null,i=!1,k=y.properties||{},g=A0(k,{disabled:!(!y.enabled||y.enabled()),onClick(w){if(x._dropMode)return;o(Object.assign({},x,{menuItems:F1(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(x1((x.submenuDepth||0)+1),i=!1,C)clearTimeout(C);C=null;return}if(C)clearTimeout(C);C=setTimeout(()=>{i=!0;let q=F1(y.menuItems),j=x._dataTypes?_0(q,x._dataTypes,x.hideDisabled):q;if(j.length>0)o(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&&h1.some((q)=>q.menu.contains(B)||q.target.contains(B)))return;if(g.classList.remove("xin-drop-over","tosi-drop-over"),C)clearTimeout(C),C=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);x1(0)}},l,x.localized?a(I(y.caption)):a(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},S6=(y,x)=>{if(y===null)return a({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&&F1(h.menuItems).length>0)return A3(h,x);else if(y.dropAction)return s6(y,x);else{let C=y?.icon||a(" ");if(typeof C==="string")C=O[C]();return A0({class:"xin-menu-item tosi-menu-item",disabled:!0},C,x.localized?a(I(y.caption)):a(y.caption),a(" "))}}else{let h=y?.action?c6(y,x):A3(y,x);if(x.showChecked&&y.checked&&y.checked())requestAnimationFrame(()=>{h.scrollIntoView({block:"center"})});return h}},I6=(y)=>{let{target:x,width:h,menuItems:l,role:C="menu"}=y,i=l.find((w)=>w!=null&&typeof w!=="function"&&(w.icon||w.checked)),k=y.submenuDepth||0,g=Z6({class:i?"xin-menu tosi-menu xin-menu-with-icons tosi-menu-with-icons":"xin-menu tosi-menu",role:C,onClick(){if(!y._dropMode)x1(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&&h1.some((q)=>q.menu.contains(B)||q.target.contains(B)))return;M6(k)}},Z6({style:{minWidth:x.offsetWidth+"px",width:typeof h==="number"?`${h}px`:h},onMousedown(w){w.preventDefault(),w.stopPropagation()}},...l.map((w)=>S6(w,y))));return g},D2,h1=[],P0=null,H2=()=>{if(P0)clearTimeout(P0),P0=null},M6=(y)=>{H2(),P0=setTimeout(()=>{P0=null,x1(y)},500)},x1=(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=h1.splice(y);for(let h of x)if(h.menu.remove(),h.onClose)h.onClose();return D2=x[0],y>0?h1[y-1]:void 0},o=(y)=>{K3(),y=Object.assign({submenuDepth:0},y);let{target:x,position:h,submenuDepth:l}=y;if(D2&&!document.body.contains(D2?.menu))D2=void 0;if(h1.length&&!document.body.contains(h1[0].menu))h1.splice(0);if(y._dropMode){if(h1.length>l&&h1[l]?.target===x)return;x1(l)}else{if(l===0&&D2?.target===x)return;let k=x1(l);if(D2?.target===x)return;if(k&&k.target===x){x1();return}}if(!y.menuItems?.length)return;let C=I6(y),i=q0({content:C,target:x,position:h});i.remainOnScroll=y._dropMode?"remain":"remove",h1.push({target:x,menu:i,onClose:y.onClose})},d6=(y)=>{K3();let{dataTypes:x,...h}=y,l=_0(y.menuItems,x,y.hideDisabled);if(!l.length)return;o({...h,menuItems:l,_dropMode:!0,_dataTypes:x})};function U3(y,x,h=[]){for(let l of y){if(!l)continue;if(typeof l==="function")continue;let{shortcut:C}=l,{menuItems:i}=l;if(C){if(q3(x,C)){let k=l;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=U3(F1(i),x,[...h,l]);if(k)return k}}return}class W4 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=Z2(this.acceptsDrop);return[...y.dataTransfer?.types||[]].some((l)=>x.some((C)=>R2([C],l)))}showMenu=(y)=>{if(y.type==="click"||y.code==="Space")o({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)d6({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&&h1.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"),M6(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);x1(0)};content=()=>A0({tabindex:0,part:"trigger",onClick:this.showMenu},Cl());handleShortcut=async(y)=>{let x=U3(this.menuItems,y);if(!x)return;y.preventDefault(),y.stopImmediatePropagation();let{action:h,path:l}=x;if(this.isConnected&&document.body.contains(this))await this.animateShortcut(l,h);if(h.action instanceof Function)h.action()};findMenuItemByCaption(y,x){for(let h of y.querySelectorAll(".xin-menu-item")){let l=h.children[1];if(l&&l.textContent===x)return h}return null}async animateShortcut(y,x){x1(0),o({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),await new Promise((l)=>setTimeout(l,80));for(let l=0;l<y.length;l++){let C=l+1,i=h1[l]?.menu;if(!i)break;let k=this.findMenuItemByCaption(i,y[l].caption);if(!k)break;o({target:k,width:this.menuWidth,localized:this.localized,menuItems:F1(y[l].menuItems),submenuDepth:C,position:"side"}),await new Promise((g)=>setTimeout(g,80))}let h=h1[h1.length-1]?.menu;if(h){let l=this.findMenuItemByCaption(h,x.caption);if(l)l.classList.add("xin-menu-item-highlight","tosi-menu-item-highlight")}await new Promise((l)=>setTimeout(l,300)),x1(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(),K3(),document.addEventListener("keydown",this.handleShortcut,!0),this.acceptsDrop)this.dataset.drop=this.acceptsDrop}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleShortcut)}}var T6=W4.elementCreator(),Vl=T6,Pl=W4;function _l(y,x,h){let l=y.find((C)=>C[x]!==void 0&&C[x]!==null);if(l!==void 0){let C=l[x];switch(typeof C){case"string":if(C.match(/^\d+(\.\d+)?$/))return 6*h;else if(C.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:G3,button:Al}=G,L6=(y)=>y;class Q4 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=H(y);for(let h of[this._tbodyTop,this._scrollArea,this._tbodyBottom]){if(!h)continue;let l=Y2(h);if(!l)continue;let C=l.itemToElement.get(x);if(C&&C.length>0){let i=C[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:l}=H(y);if(this._array!==x||this._columns!==h||this._filter!==l)this.queueRender();this._array=x||[],this._columns=h||null,this._filter=l||L6}rowData={visible:[],pinnedTopData:[],pinnedBottomData:[]};_array=[];_columns=null;_filter=L6;_sort;_pinnedTopRows;_pinnedBottomRows;get pinnedTopRows(){return this._pinnedTopRows}set pinnedTopRows(y){this._pinnedTopRows=y?H(y):void 0,this.queueRender()}get pinnedBottomRows(){return this._pinnedBottomRows}set pinnedBottomRows(y){this._pinnedBottomRows=y?H(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=H(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,l)=>h[x]>l[x]?1:-1:(h,l)=>h[x]>l[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=_l(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((C)=>C.visible!==!1),x=y.filter((C)=>C.pinned==="left"),h=y.filter((C)=>!C.pinned),l=y.filter((C)=>C.pinned==="right");return[...x,...h,...l]}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,l=-1;for(let k=0;k<y.length;k++){if(y[k].pinned!=="left")break;x[k].left=h+"px",h+=y[k].width,l=k}if(l>=0)x[l].edgeClass="col-edge-right";let C=0,i=y.length;for(let k=y.length-1;k>=0;k--){if(y[k].pinned!=="right")break;x[k].right=C+"px",C+=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 l=h.length-1,C=x==="top"?"row-edge-bottom":"row-edge-top";h.forEach((k,g)=>{k.classList.remove(C);let w=x==="top"?g+1:l-g;k.style[x]=`calc(var(--tosi-table-row-height) * ${w})`}),(x==="top"?h[l]:h[0]).classList.add(C)}cellStyle(y,x,h){let l={justifyContent:y.align||"left",...h};if(x.left!=null)l.left=x.left;if(x.right!=null)l.right=x.right;return l}applyGridCellAttrs(y,x,h,l){y.setAttribute("aria-colindex",String(x+1)),y.tabIndex=-1,y.classList.add(...this.cellClasses("td",h).split(" ")),Object.assign(y.style,l)}buildCell(y,x,h,l){let C=this.cellStyle(y,h);if(y.dataCell!==void 0){let i=y.dataCell(y);return this.applyGridCellAttrs(i,x,h,C),i}return G3({class:this.cellClasses("td",h),role:"gridcell",tabindex:-1,ariaColindex:String(x+1),style:C,bindText:l[y.prop]})}buildRow(y,x,h,l="tr"){let C=x.map((g,w)=>this.buildCell(g,w,h[w],y)),i=this.selectBinding,k={class:l};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,...C)}buildHeaderCell(y,x,h){let{popColumnMenu:l}=this,C="none",i;switch(y.sort){case"ascending":i=O.sortAscending(),C="descending";break;case"descending":C="ascending",i=O.sortDescending();break}let k=!(this.nosort&&this.nohide)?Al({class:"menu-trigger",onClick(w){l(w.target,y),w.stopPropagation()}},i||O.moreVertical()):{},g=y.headerCell!==void 0?y.headerCell(y):G3({class:this.cellClasses("th",h),role:"columnheader",tabindex:-1,ariaSort:C,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]){P3();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((l,C)=>this.buildHeaderCell(l,C,x[C]));return K0({class:"thead",role:"rowgroup"},K0({class:"tr",role:"row"},...h))}buildPinnedBody(y,x,h,l){let C=H(y);if(!C||C.length===0)return null;let i=l==="pinned-top"?"pinnedTopRows":"pinnedBottomRows",k=this.rowClasses(l),g=y.listBinding((w,B)=>this.buildRow(B,x,h,k),{});return K0({class:`tbody tbody-${l}`,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:l,clientWidth:C,scrollWidth:i}=this._scrollArea,k=this.visibleColumns,g=i-C-l,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-l-g;else q=w-l;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),l=y.touches!==void 0,C=l?y.touches[0].identifier:void 0;P1(y,(i,k,g)=>{if((l?[...g.touches].find((q)=>q.identifier===C):!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 l=y,C=window.getSelection();if(C!==null)C.removeAllRanges();let i=this.visibleRows;if(this.multiple&&l.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&&l.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,l=this.visibleRows,C=this.effectivePinnedBottomData,i;if(y<h.length)i=h[y];else if(y<h.length+l.length)i=l[y-h.length];else if(y<h.length+l.length+C.length)i=C[y-h.length-l.length];else return null;return this.cellsFor(i)?.[x]??null}_pendingFocus=null;onScrollEnd=()=>{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 l=this.effectivePinnedTopData,C=y-l.length;if(C>=0&&C<this.visibleRows.length)this._scrollArea.scrollTop=C*this.rowHeight}}handleKeyNav=(y)=>{let x=y.target,h=x.closest(".td")||x.closest(".th");if(!h)return;let l=parseInt(h.getAttribute("aria-colindex")||"",10);if(isNaN(l))return;let C=l-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),J=$===-1?g.indexOf(Y):-1,v=$===-1&&J===-1?w.indexOf(Y):-1;if($!==-1)_=$;else if(J!==-1)_=k.length+J;else if(v!==-1)_=k.length+g.length+v;else return}let K=_,U=C;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,C-1);break;case"ArrowRight":U=q?i-1:Math.min(i-1,C+1);break;case"Tab":if(y.shiftKey)if(C>0)U=C-1;else if(_>0)K=_-1,U=i-1;else return;else if(C<i-1)U=C+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!==C)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((C)=>C.width+"px").join(" "),h=y.reduce((C,i)=>C+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 l=this.computeStickyInfo(y);for(let C of this.querySelectorAll(".col-pinned")){let i=parseInt(C.getAttribute("aria-colindex")||"",10)-1;if(!isNaN(i)&&l[i]){let k=l[i];if(k.left!=null)C.style.left=k.left;if(k.right!=null)C.style.right=k.right}}}sortByColumn=(y,x="auto")=>{for(let h of this.columns.filter((l)=>H(l.sort)!==!1))if(H(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,l=this.columns.filter((g)=>g.visible===!1),C=this.queueRender.bind(this),i=[];if(!this.nosort&&x.sort!==!1)i.push({caption:this.localized?`${I("Sort")} ${I("Ascending")}`:"Sort Ascending",icon:"sortAscending",action(){h(x)}},{caption:this.localized?`${I("Sort")} ${I("Descending")}`:"Sort Descending",icon:"sortDescending",action(){h(x,"descending")}});if(!this.nohide){if(i.length)i.push(null);i.push({caption:this.localized?`${I("Hide")} ${I("Column")}`:"Hide Column",icon:"eyeOff",enabled:()=>x.visible!==!0,action(){x.visible=!1,C()}},{caption:this.localized?`${I("Show")} ${I("Column")}`:"Show Column",icon:"eye",enabled:()=>l.length>0,menuItems:l.map((g)=>{return{caption:g.name||g.prop,action(){delete g.visible,C()}}})})}if(i.length)i.push(null);let k=x.pinned==="left"?"pin":x.pinned==="right"?"pin0f":"pin50o";i.push({caption:this.localized?I("Pin"):"Pin",icon:k,menuItems:[{caption:this.localized?I("Left"):"Left",icon:"pin",enabled:()=>x.pinned!=="left",action(){x.pinned="left",C()}},{caption:this.localized?I("Right"):"Right",icon:"pin0f",enabled:()=>x.pinned!=="right",action(){x.pinned="right",C()}},{caption:this.localized?I("Unpin"):"Unpin",icon:"unPin",enabled:()=>!!x.pinned,action(){delete x.pinned,C()}}]}),o({target:y,localized:this.localized,menuItems:i})};get captionSpan(){return this.localized?Q1:G3}get visibleRows(){return H(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,l=this.visibleColumns[h],C=this.columns.indexOf(this.draggedColumn),i=this.columns.indexOf(l);this.draggedColumn.pinned=l.pinned,this.columns.splice(C,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,l=Math.min(h.length,this.maxVisibleRows),C=this.filter(h.slice(0,l)),{sort:i}=this;if(i)C.sort(i);this.rowData.pinnedTopData=y,this.rowData.pinnedBottomData=x,this.rowData.visible=C;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.onScrollEnd),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 Kl=Q4,F3=Q4.elementCreator(),Ul=F3,Gl=F3;var{dialog:Fl,button:O3,header:Ol,footer:Wl,tosiSlot:W3,h3:Q3,p:X3,label:Ql,input:Xl,div:$l}=G;class $3 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 l=X4({removeOnClose:!0,closeOnBackgroundClick:!0,dialogWillClose(){h()}},Q3({slot:"header"},x),y.includes(`
17
- `)?G.pre({style:{whiteSpace:"pre-wrap",margin:0}},y):X3(y));document.body.append(l),l.showModal()})}static async confirm(y,x="Confirm"){return new Promise((h)=>{let l=X4({removeOnClose:!0,dialogWillClose(C){h(C==="confirm")}},Q3({slot:"header"},x),X3(y),O3({slot:"footer",onClick(){l.close()}},"Cancel"));document.body.append(l),l.showModal()})}static async prompt(y,x="Prompt",h=""){return new Promise((l)=>{let C=Xl({value:h}),i=X4({removeOnClose:!0,dialogWillClose(k){l(k==="confirm"?C.value:null)},initialFocus(){C.focus()}},Q3({slot:"header"},x),X3(Ql({style:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:5}},$l(y),C)),O3({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=()=>Fl({part:"dialog"},Ol(W3({name:"header"})),W3(),Wl(W3({name:"footer"}),O3({part:"ok",onClick:this.ok},"OK")))}var X4=$3.elementCreator();var Yl=/^readme\.md$/i;function r6(y){if(Yl.test(y))return"";return y.replace(/\.[^.]+$/,"")}function b2(y){let x={};for(let l of y){let C=r6(l.filename);x[C]=(x[C]||0)+1}let h={};for(let l of y){let C=r6(l.filename);h[l.filename]=C!==""&&x[C]>1?l.filename.replace(/\./g,"-"):C}return h}function Y3(y){return y===""?"/":`/${y}/`}function n6(y,x){let h=y.replace(/^\?/,"");if(!h||h.includes("=")||h.includes("&"))return null;let l=decodeURIComponent(h),C=x[l];if(C===void 0)return null;return Y3(C)}function Nl(y){return y.replace(/^\/+/,"").replace(/\/+$/,"").replace(/\/index\.html$/i,"")}function N3(y,x){let h=Nl(y);for(let[l,C]of Object.entries(x))if(C===h)return l;return""}function o6(y){return y.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function p3(y,x,h){if(!y)return"";for(let C of x)if(C.filename===y)return C.filename;for(let C of x)if(h[C.filename]===y)return C.filename;let l=o6(y);for(let C of x)if(h[C.filename]===l)return C.filename;for(let C of x)if(C.title&&o6(C.title)===l)return C.filename;return""}function u6(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 pl(y,x){let h=u6(y),l=u6(x);return h>l?1:l>h?-1:0}function $4(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 l=new Map;for(let k of y){let g=k.parent?p3(k.parent,y,x):"";if(g&&(g===k.filename||!h.has(g)||Jl(k.filename,g,y,x)))g="";l.set(k.filename,g)}let C=[];for(let k of y){let g=l.get(k.filename)||"",w=h.get(k.filename);if(g)h.get(g).children.push(w);else C.push(w)}let i=(k,g)=>{k.sort((w,B)=>pl(w.doc,B.doc));for(let w of k)w.depth=g,i(w.children,g+1)};return i(C,0),C}function Jl(y,x,h,l){let C=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=C.get(i);i=g?.parent?p3(g.parent,h,l):""}return!1}function v3(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var A2=v3();function y7(y){A2=y}var O0={exec:()=>null};function b(y,x=""){let h=typeof y=="string"?y:y.source,l={replace:(C,i)=>{let k=typeof i=="string"?i:i.source;return k=k.replace(i1.caret,"$1"),h=h.replace(C,k),l},getRegex:()=>new RegExp(h,x)};return l}var vl=(()=>{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")},Zl=/^(?:[ \t]*(?:\n|$))+/,Rl=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Dl=/^ {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+|$)/,Hl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Z3=/(?:[*+-]|\d{1,9}[.)])/,x7=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,h7=b(x7).replace(/bull/g,Z3).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(),bl=b(x7).replace(/bull/g,Z3).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(),R3=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,cl=/^[^\n]+/,D3=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sl=b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",D3).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Sl=b(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Z3).getRegex(),J4="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",H3=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Il=b("^ {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",H3).replace("tag",J4).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),l7=b(R3).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",J4).getRegex(),Ml=b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",l7).getRegex(),b3={blockquote:Ml,code:Rl,def:sl,fences:Dl,heading:Hl,hr:W0,html:Il,lheading:h7,list:Sl,newline:Zl,paragraph:l7,table:O0,text:cl},f6=b("^ *([^\\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",J4).getRegex(),dl={...b3,lheading:bl,table:f6,paragraph:b(R3).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",f6).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",J4).getRegex()},Tl={...b3,html:b(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",H3).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:b(R3).replace("hr",W0).replace("heading",` *#{1,6} *[^
18
- ]`).replace("lheading",h7).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ll=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,rl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,C7=/^( {2,}|\\)\n(?!\s*$)/,ol=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,v4=/[\p{P}\p{S}]/u,c3=/[\s\p{P}\p{S}]/u,i7=/[^\s\p{P}\p{S}]/u,nl=b(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,c3).getRegex(),k7=/(?!~)[\p{P}\p{S}]/u,ul=/(?!~)[\s\p{P}\p{S}]/u,fl=/(?:[^\s\p{P}\p{S}]|~)/u,al=b(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",vl?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),g7=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ml=b(g7,"u").replace(/punct/g,v4).getRegex(),El=b(g7,"u").replace(/punct/g,k7).getRegex(),w7="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",tl=b(w7,"gu").replace(/notPunctSpace/g,i7).replace(/punctSpace/g,c3).replace(/punct/g,v4).getRegex(),el=b(w7,"gu").replace(/notPunctSpace/g,fl).replace(/punctSpace/g,ul).replace(/punct/g,k7).getRegex(),yC=b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,i7).replace(/punctSpace/g,c3).replace(/punct/g,v4).getRegex(),xC=b(/\\(punct)/,"gu").replace(/punct/g,v4).getRegex(),hC=b(/^<(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(),lC=b(H3).replace("(?:-->|$)","-->").getRegex(),CC=b("^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",lC).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),N4=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,iC=b(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",N4).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),B7=b(/^!?\[(label)\]\[(ref)\]/).replace("label",N4).replace("ref",D3).getRegex(),z7=b(/^!?\[(ref)\](?:\[\])?/).replace("ref",D3).getRegex(),kC=b("reflink|nolink(?!\\()","g").replace("reflink",B7).replace("nolink",z7).getRegex(),a6=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,s3={_backpedal:O0,anyPunctuation:xC,autolink:hC,blockSkip:al,br:C7,code:rl,del:O0,emStrongLDelim:ml,emStrongRDelimAst:tl,emStrongRDelimUnd:yC,escape:Ll,link:iC,nolink:z7,punctuation:nl,reflink:B7,reflinkSearch:kC,tag:CC,text:ol,url:O0},gC={...s3,link:b(/^!?\[(label)\]\((.*?)\)/).replace("label",N4).getRegex(),reflink:b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",N4).getRegex()},J3={...s3,emStrongRDelimAst:el,emStrongLDelim:El,url:b(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",a6).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:b(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",a6).getRegex()},wC={...J3,br:b(C7).replace("{2,}","*").getRegex(),text:b(J3.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Y4={normal:b3,gfm:dl,pedantic:Tl},U0={normal:s3,gfm:J3,breaks:wC,pedantic:gC},BC={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},m6=(y)=>BC[y];function S1(y,x){if(x){if(i1.escapeTest.test(y))return y.replace(i1.escapeReplace,m6)}else if(i1.escapeTestNoEncode.test(y))return y.replace(i1.escapeReplaceNoEncode,m6);return y}function E6(y){try{y=encodeURI(y).replace(i1.percentDecode,"%")}catch{return null}return y}function t6(y,x){let h=y.replace(i1.findPipe,(i,k,g)=>{let w=!1,B=k;for(;--B>=0&&g[B]==="\\";)w=!w;return w?"|":" |"}),l=h.split(i1.splitPipe),C=0;if(l[0].trim()||l.shift(),l.length>0&&!l.at(-1)?.trim()&&l.pop(),x)if(l.length>x)l.splice(x);else for(;l.length<x;)l.push("");for(;C<l.length;C++)l[C]=l[C].trim().replace(i1.slashPipe,"|");return l}function G0(y,x,h){let l=y.length;if(l===0)return"";let C=0;for(;C<l;){let i=y.charAt(l-C-1);if(i===x&&!h)C++;else if(i!==x&&h)C++;else break}return y.slice(0,l-C)}function zC(y,x){if(y.indexOf(x[1])===-1)return-1;let h=0;for(let l=0;l<y.length;l++)if(y[l]==="\\")l++;else if(y[l]===x[0])h++;else if(y[l]===x[1]&&(h--,h<0))return l;return h>0?-2:-1}function e6(y,x,h,l,C){let i=x.href,k=x.title||null,g=y[1].replace(C.other.outputLinkReplace,"$1");l.state.inLink=!0;let w={type:y[0].charAt(0)==="!"?"image":"link",raw:h,href:i,title:k,text:g,tokens:l.inlineTokens(g)};return l.state.inLink=!1,w}function qC(y,x,h){let l=y.match(h.other.indentCodeCompensation);if(l===null)return x;let C=l[1];return x.split(`
19
- `).map((i)=>{let k=i.match(h.other.beginningSpace);if(k===null)return i;let[g]=k;return g.length>=C.length?i.slice(C.length):i}).join(`
20
- `)}var p4=class{options;rules;lexer;constructor(y){this.options=y||A2}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:G0(h,`
21
- `)}}}fences(y){let x=this.rules.block.fences.exec(y);if(x){let h=x[0],l=qC(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:l}}}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 l=G0(h,"#");(this.options.pedantic||!l||this.rules.other.endingSpaceChar.test(l))&&(h=l.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:G0(x[0],`
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(`
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",B7).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Cl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,q7=/^( {2,}|\\)\n(?!\s*$)/,ll=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,v4=/[\p{P}\p{S}]/u,I3=/[\s\p{P}\p{S}]/u,j7=/[^\s\p{P}\p{S}]/u,il=S(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,I3).getRegex(),V7=/(?!~)[\p{P}\p{S}]/u,kl=/(?!~)[\s\p{P}\p{S}]/u,gl=/(?:[^\s\p{P}\p{S}]|~)/u,wl=S(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",LC?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),P7=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Bl=S(P7,"u").replace(/punct/g,v4).getRegex(),zl=S(P7,"u").replace(/punct/g,V7).getRegex(),_7="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ql=S(_7,"gu").replace(/notPunctSpace/g,j7).replace(/punctSpace/g,I3).replace(/punct/g,v4).getRegex(),jl=S(_7,"gu").replace(/notPunctSpace/g,gl).replace(/punctSpace/g,kl).replace(/punct/g,V7).getRegex(),Vl=S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,j7).replace(/punctSpace/g,I3).replace(/punct/g,v4).getRegex(),Pl=S(/\\(punct)/,"gu").replace(/punct/g,v4).getRegex(),_l=S(/^<(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(),Al=S(S3).replace("(?:-->|$)","-->").getRegex(),Kl=S("^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",Al).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),J4=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ul=S(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",J4).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),A7=S(/^!?\[(label)\]\[(ref)\]/).replace("label",J4).replace("ref",b3).getRegex(),K7=S(/^!?\[(ref)\](?:\[\])?/).replace("ref",b3).getRegex(),Gl=S("reflink|nolink(?!\\()","g").replace("reflink",A7).replace("nolink",K7).getRegex(),h7=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,c3={_backpedal:O0,anyPunctuation:Pl,autolink:_l,blockSkip:wl,br:q7,code:Cl,del:O0,emStrongLDelim:Bl,emStrongRDelimAst:ql,emStrongRDelimUnd:Vl,escape:hl,link:Ul,nolink:K7,punctuation:il,reflink:A7,reflinkSearch:Gl,tag:Kl,text:ll,url:O0},Fl={...c3,link:S(/^!?\[(label)\]\((.*?)\)/).replace("label",J4).getRegex(),reflink:S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",J4).getRegex()},v3={...c3,emStrongRDelimAst:jl,emStrongLDelim:zl,url:S(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",h7).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:S(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",h7).getRegex()},Ol={...v3,br:S(q7).replace("{2,}","*").getRegex(),text:S(v3.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},N4={normal:M3,gfm:yl,pedantic:xl},U0={normal:c3,gfm:v3,breaks:Ol,pedantic:Fl},Wl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},C7=(y)=>Wl[y];function I1(y,x){if(x){if(i1.escapeTest.test(y))return y.replace(i1.escapeReplace,C7)}else if(i1.escapeTestNoEncode.test(y))return y.replace(i1.escapeReplaceNoEncode,C7);return y}function l7(y){try{y=encodeURI(y).replace(i1.percentDecode,"%")}catch{return null}return y}function i7(y,x){let h=y.replace(i1.findPipe,(i,k,g)=>{let w=!1,B=k;for(;--B>=0&&g[B]==="\\";)w=!w;return w?"|":" |"}),C=h.split(i1.splitPipe),l=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(;l<C.length;l++)C[l]=C[l].trim().replace(i1.slashPipe,"|");return C}function G0(y,x,h){let C=y.length;if(C===0)return"";let l=0;for(;l<C;){let i=y.charAt(C-l-1);if(i===x&&!h)l++;else if(i!==x&&h)l++;else break}return y.slice(0,C-l)}function Ql(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 k7(y,x,h,C,l){let i=x.href,k=x.title||null,g=y[1].replace(l.other.outputLinkReplace,"$1");C.state.inLink=!0;let w={type:y[0].charAt(0)==="!"?"image":"link",raw:h,href:i,title:k,text:g,tokens:C.inlineTokens(g)};return C.state.inLink=!1,w}function Xl(y,x,h){let C=y.match(h.other.indentCodeCompensation);if(C===null)return x;let l=C[1];return x.split(`
19
+ `).map((i)=>{let k=i.match(h.other.beginningSpace);if(k===null)return i;let[g]=k;return g.length>=l.length?i.slice(l.length):i}).join(`
20
+ `)}var Z4=class{options;rules;lexer;constructor(y){this.options=y||A2}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:G0(h,`
21
+ `)}}}fences(y){let x=this.rules.block.fences.exec(y);if(x){let h=x[0],C=Xl(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=G0(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:G0(x[0],`
22
22
  `)}}blockquote(y){let x=this.rules.block.blockquote.exec(y);if(x){let h=G0(x[0],`
23
23
  `).split(`
24
- `),l="",C="",i=[];for(;h.length>0;){let k=!1,g=[],w;for(w=0;w<h.length;w++)if(this.rules.other.blockquoteStart.test(h[w]))g.push(h[w]),k=!0;else if(!k)g.push(h[w]);else break;h=h.slice(w);let B=g.join(`
24
+ `),C="",l="",i=[];for(;h.length>0;){let k=!1,g=[],w;for(w=0;w<h.length;w++)if(this.rules.other.blockquoteStart.test(h[w]))g.push(h[w]),k=!0;else if(!k)g.push(h[w]);else break;h=h.slice(w);let B=g.join(`
25
25
  `),q=B.replace(this.rules.other.blockquoteSetextReplace,`
26
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");l=l?`${l}
27
- ${B}`:B,C=C?`${C}
26
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");C=C?`${C}
27
+ ${B}`:B,l=l?`${l}
28
28
  ${q}`:q;let j=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(q,i,!0),this.lexer.state.top=j,h.length===0)break;let _=i.at(-1);if(_?.type==="code")break;if(_?.type==="blockquote"){let K=_,U=K.raw+`
29
29
  `+h.join(`
30
- `),Q=this.blockquote(U);i[i.length-1]=Q,l=l.substring(0,l.length-K.raw.length)+Q.raw,C=C.substring(0,C.length-K.text.length)+Q.text;break}else if(_?.type==="list"){let K=_,U=K.raw+`
30
+ `),Q=this.blockquote(U);i[i.length-1]=Q,C=C.substring(0,C.length-K.raw.length)+Q.raw,l=l.substring(0,l.length-K.text.length)+Q.text;break}else if(_?.type==="list"){let K=_,U=K.raw+`
31
31
  `+h.join(`
32
- `),Q=this.list(U);i[i.length-1]=Q,l=l.substring(0,l.length-_.raw.length)+Q.raw,C=C.substring(0,C.length-K.raw.length)+Q.raw,h=U.substring(i.at(-1).raw.length).split(`
33
- `);continue}}return{type:"blockquote",raw:l,tokens:i,text:C}}}list(y){let x=this.rules.block.list.exec(y);if(x){let h=x[1].trim(),l=h.length>1,C={type:"list",raw:"",ordered:l,start:l?+h.slice(0,-1):"",loose:!1,items:[]};h=l?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=l?h:"[*+-]");let i=this.rules.other.listItemRegex(h),k=!1;for(;y;){let w=!1,B="",q="";if(!(x=i.exec(y))||this.rules.block.hr.test(y))break;B=x[0],y=y.substring(B.length);let j=x[2].split(`
32
+ `),Q=this.list(U);i[i.length-1]=Q,C=C.substring(0,C.length-_.raw.length)+Q.raw,l=l.substring(0,l.length-K.raw.length)+Q.raw,h=U.substring(i.at(-1).raw.length).split(`
33
+ `);continue}}return{type:"blockquote",raw:C,tokens:i,text:l}}}list(y){let x=this.rules.block.list.exec(y);if(x){let h=x[1].trim(),C=h.length>1,l={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 i=this.rules.other.listItemRegex(h),k=!1;for(;y;){let w=!1,B="",q="";if(!(x=i.exec(y))||this.rules.block.hr.test(y))break;B=x[0],y=y.substring(B.length);let j=x[2].split(`
34
34
  `,1)[0].replace(this.rules.other.listReplaceTabs,($)=>" ".repeat(3*$.length)),_=y.split(`
35
35
  `,1)[0],K=!j.trim(),U=0;if(this.options.pedantic?(U=2,q=j.trimStart()):K?U=x[1].length+1:(U=x[2].search(this.rules.other.nonSpaceChar),U=U>4?1:U,q=j.slice(U),U+=x[1].length),K&&this.rules.other.blankLine.test(_)&&(B+=_+`
36
- `,y=y.substring(_.length+1),w=!0),!w){let $=this.rules.other.nextBulletRegex(U),J=this.rules.other.hrRegex(U),v=this.rules.other.fencesBeginRegex(U),d=this.rules.other.headingBeginRegex(U),l1=this.rules.other.htmlBeginRegex(U);for(;y;){let c=y.split(`
37
- `,1)[0],N;if(_=c,this.options.pedantic?(_=_.replace(this.rules.other.listReplaceNesting," "),N=_):N=_.replace(this.rules.other.tabCharGlobal," "),v.test(_)||d.test(_)||l1.test(_)||$.test(_)||J.test(_))break;if(N.search(this.rules.other.nonSpaceChar)>=U||!_.trim())q+=`
38
- `+N.slice(U);else{if(K||j.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(j)||d.test(j)||J.test(j))break;q+=`
39
- `+_}!K&&!_.trim()&&(K=!0),B+=c+`
40
- `,y=y.substring(c.length+1),j=N.slice(U)}}C.loose||(k?C.loose=!0:this.rules.other.doubleBlankLine.test(B)&&(k=!0));let Q=null,Y;this.options.gfm&&(Q=this.rules.other.listIsTask.exec(q),Q&&(Y=Q[0]!=="[ ] ",q=q.replace(this.rules.other.listReplaceTask,""))),C.items.push({type:"list_item",raw:B,task:!!Q,checked:Y,loose:!1,text:q,tokens:[]}),C.raw+=B}let g=C.items.at(-1);if(g)g.raw=g.raw.trimEnd(),g.text=g.text.trimEnd();else return;C.raw=C.raw.trimEnd();for(let w=0;w<C.items.length;w++)if(this.lexer.state.top=!1,C.items[w].tokens=this.lexer.blockTokens(C.items[w].text,[]),!C.loose){let B=C.items[w].tokens.filter((j)=>j.type==="space"),q=B.length>0&&B.some((j)=>this.rules.other.anyLine.test(j.raw));C.loose=q}if(C.loose)for(let w=0;w<C.items.length;w++)C.items[w].loose=!0;return C}}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," "),l=x[2]?x[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",C=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:l,title:C}}}table(y){let x=this.rules.block.table.exec(y);if(!x||!this.rules.other.tableDelimiter.test(x[2]))return;let h=t6(x[1]),l=x[2].replace(this.rules.other.tableAlignChars,"").split("|"),C=x[3]?.trim()?x[3].replace(this.rules.other.tableRowBlankLine,"").split(`
41
- `):[],i={type:"table",raw:x[0],header:[],align:[],rows:[]};if(h.length===l.length){for(let k of l)this.rules.other.tableAlignRight.test(k)?i.align.push("right"):this.rules.other.tableAlignCenter.test(k)?i.align.push("center"):this.rules.other.tableAlignLeft.test(k)?i.align.push("left"):i.align.push(null);for(let k=0;k<h.length;k++)i.header.push({text:h[k],tokens:this.lexer.inline(h[k]),header:!0,align:i.align[k]});for(let k of C)i.rows.push(t6(k,i.header.length).map((g,w)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:i.align[w]})));return i}}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 i=G0(h.slice(0,-1),"\\");if((h.length-i.length)%2===0)return}else{let i=zC(x[2],"()");if(i===-2)return;if(i>-1){let k=(x[0].indexOf("!")===0?5:4)+x[1].length+i;x[2]=x[2].substring(0,i),x[0]=x[0].substring(0,k).trim(),x[3]=""}}let l=x[2],C="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(l);i&&(l=i[1],C=i[3])}else C=x[3]?x[3].slice(1,-1):"";return l=l.trim(),this.rules.other.startAngleBracket.test(l)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(h)?l=l.slice(1):l=l.slice(1,-1)),e6(x,{href:l&&l.replace(this.rules.inline.anyPunctuation,"$1"),title:C&&C.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 l=(h[2]||h[1]).replace(this.rules.other.multipleSpaceGlobal," "),C=x[l.toLowerCase()];if(!C){let i=h[0].charAt(0);return{type:"text",raw:i,text:i}}return e6(h,C,h[0],this.lexer,this.rules)}}emStrong(y,x,h=""){let l=this.rules.inline.emStrongLDelim.exec(y);if(!l||l[3]&&h.match(this.rules.other.unicodeAlphaNumeric))return;if(!(l[1]||l[2])||!h||this.rules.inline.punctuation.exec(h)){let C=[...l[0]].length-1,i,k,g=C,w=0,B=l[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(B.lastIndex=0,x=x.slice(-1*y.length+C);(l=B.exec(x))!=null;){if(i=l[1]||l[2]||l[3]||l[4]||l[5]||l[6],!i)continue;if(k=[...i].length,l[3]||l[4]){g+=k;continue}else if((l[5]||l[6])&&C%3&&!((C+k)%3)){w+=k;continue}if(g-=k,g>0)continue;k=Math.min(k,k+g+w);let q=[...l[0]][0].length,j=y.slice(0,C+l.index+q+k);if(Math.min(C,k)%2){let K=j.slice(1,-1);return{type:"em",raw:j,text:K,tokens:this.lexer.inlineTokens(K)}}let _=j.slice(2,-2);return{type:"strong",raw:j,text:_,tokens:this.lexer.inlineTokens(_)}}}}codespan(y){let x=this.rules.inline.code.exec(y);if(x){let h=x[2].replace(this.rules.other.newLineCharGlobal," "),l=this.rules.other.nonSpaceChar.test(h),C=this.rules.other.startingSpaceChar.test(h)&&this.rules.other.endingSpaceChar.test(h);return l&&C&&(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,l;return x[2]==="@"?(h=x[1],l="mailto:"+h):(h=x[1],l=h),{type:"link",raw:x[0],text:h,href:l,tokens:[{type:"text",raw:h,text:h}]}}}url(y){let x;if(x=this.rules.inline.url.exec(y)){let h,l;if(x[2]==="@")h=x[0],l="mailto:"+h;else{let C;do C=x[0],x[0]=this.rules.inline._backpedal.exec(x[0])?.[0]??"";while(C!==x[0]);h=x[0],x[1]==="www."?l="http://"+x[0]:l=x[0]}return{type:"link",raw:x[0],text:h,href:l,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}}}},X1=class y{tokens;options;state;tokenizer;inlineQueue;constructor(x){this.tokens=[],this.tokens.links=Object.create(null),this.options=x||A2,this.options.tokenizer=this.options.tokenizer||new p4,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:i1,block:Y4.normal,inline:U0.normal};this.options.pedantic?(h.block=Y4.pedantic,h.inline=U0.pedantic):this.options.gfm&&(h.block=Y4.gfm,this.options.breaks?h.inline=U0.breaks:h.inline=U0.gfm),this.tokenizer.rules=h}static get rules(){return{block:Y4,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(i1.carriageReturn,`
43
- `),this.blockTokens(x,this.tokens);for(let h=0;h<this.inlineQueue.length;h++){let l=this.inlineQueue[h];this.inlineTokens(l.src,l.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(x,h=[],l=!1){for(this.options.pedantic&&(x=x.replace(i1.tabCharGlobal," ").replace(i1.spaceLine,""));x;){let C;if(this.options.extensions?.block?.some((k)=>(C=k.call({lexer:this},x,h))?(x=x.substring(C.raw.length),h.push(C),!0):!1))continue;if(C=this.tokenizer.space(x)){x=x.substring(C.raw.length);let k=h.at(-1);C.raw.length===1&&k!==void 0?k.raw+=`
44
- `:h.push(C);continue}if(C=this.tokenizer.code(x)){x=x.substring(C.raw.length);let k=h.at(-1);k?.type==="paragraph"||k?.type==="text"?(k.raw+=(k.raw.endsWith(`
36
+ `,y=y.substring(_.length+1),w=!0),!w){let $=this.rules.other.nextBulletRegex(U),Z=this.rules.other.hrRegex(U),p=this.rules.other.fencesBeginRegex(U),T=this.rules.other.headingBeginRegex(U),C1=this.rules.other.htmlBeginRegex(U);for(;y;){let M=y.split(`
37
+ `,1)[0],N;if(_=M,this.options.pedantic?(_=_.replace(this.rules.other.listReplaceNesting," "),N=_):N=_.replace(this.rules.other.tabCharGlobal," "),p.test(_)||T.test(_)||C1.test(_)||$.test(_)||Z.test(_))break;if(N.search(this.rules.other.nonSpaceChar)>=U||!_.trim())q+=`
38
+ `+N.slice(U);else{if(K||j.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||p.test(j)||T.test(j)||Z.test(j))break;q+=`
39
+ `+_}!K&&!_.trim()&&(K=!0),B+=M+`
40
+ `,y=y.substring(M.length+1),j=N.slice(U)}}l.loose||(k?l.loose=!0:this.rules.other.doubleBlankLine.test(B)&&(k=!0));let Q=null,Y;this.options.gfm&&(Q=this.rules.other.listIsTask.exec(q),Q&&(Y=Q[0]!=="[ ] ",q=q.replace(this.rules.other.listReplaceTask,""))),l.items.push({type:"list_item",raw:B,task:!!Q,checked:Y,loose:!1,text:q,tokens:[]}),l.raw+=B}let g=l.items.at(-1);if(g)g.raw=g.raw.trimEnd(),g.text=g.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let w=0;w<l.items.length;w++)if(this.lexer.state.top=!1,l.items[w].tokens=this.lexer.blockTokens(l.items[w].text,[]),!l.loose){let B=l.items[w].tokens.filter((j)=>j.type==="space"),q=B.length>0&&B.some((j)=>this.rules.other.anyLine.test(j.raw));l.loose=q}if(l.loose)for(let w=0;w<l.items.length;w++)l.items[w].loose=!0;return l}}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"):"",l=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:l}}}table(y){let x=this.rules.block.table.exec(y);if(!x||!this.rules.other.tableDelimiter.test(x[2]))return;let h=i7(x[1]),C=x[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=x[3]?.trim()?x[3].replace(this.rules.other.tableRowBlankLine,"").split(`
41
+ `):[],i={type:"table",raw:x[0],header:[],align:[],rows:[]};if(h.length===C.length){for(let k of C)this.rules.other.tableAlignRight.test(k)?i.align.push("right"):this.rules.other.tableAlignCenter.test(k)?i.align.push("center"):this.rules.other.tableAlignLeft.test(k)?i.align.push("left"):i.align.push(null);for(let k=0;k<h.length;k++)i.header.push({text:h[k],tokens:this.lexer.inline(h[k]),header:!0,align:i.align[k]});for(let k of l)i.rows.push(i7(k,i.header.length).map((g,w)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:i.align[w]})));return i}}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 i=G0(h.slice(0,-1),"\\");if((h.length-i.length)%2===0)return}else{let i=Ql(x[2],"()");if(i===-2)return;if(i>-1){let k=(x[0].indexOf("!")===0?5:4)+x[1].length+i;x[2]=x[2].substring(0,i),x[0]=x[0].substring(0,k).trim(),x[3]=""}}let C=x[2],l="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(C);i&&(C=i[1],l=i[3])}else l=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)),k7(x,{href:C&&C.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.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," "),l=x[C.toLowerCase()];if(!l){let i=h[0].charAt(0);return{type:"text",raw:i,text:i}}return k7(h,l,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 l=[...C[0]].length-1,i,k,g=l,w=0,B=C[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(B.lastIndex=0,x=x.slice(-1*y.length+l);(C=B.exec(x))!=null;){if(i=C[1]||C[2]||C[3]||C[4]||C[5]||C[6],!i)continue;if(k=[...i].length,C[3]||C[4]){g+=k;continue}else if((C[5]||C[6])&&l%3&&!((l+k)%3)){w+=k;continue}if(g-=k,g>0)continue;k=Math.min(k,k+g+w);let q=[...C[0]][0].length,j=y.slice(0,l+C.index+q+k);if(Math.min(l,k)%2){let K=j.slice(1,-1);return{type:"em",raw:j,text:K,tokens:this.lexer.inlineTokens(K)}}let _=j.slice(2,-2);return{type:"strong",raw:j,text:_,tokens:this.lexer.inlineTokens(_)}}}}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),l=this.rules.other.startingSpaceChar.test(h)&&this.rules.other.endingSpaceChar.test(h);return C&&l&&(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 l;do l=x[0],x[0]=this.rules.inline._backpedal.exec(x[0])?.[0]??"";while(l!==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}}}},X1=class y{tokens;options;state;tokenizer;inlineQueue;constructor(x){this.tokens=[],this.tokens.links=Object.create(null),this.options=x||A2,this.options.tokenizer=this.options.tokenizer||new Z4,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:i1,block:N4.normal,inline:U0.normal};this.options.pedantic?(h.block=N4.pedantic,h.inline=U0.pedantic):this.options.gfm&&(h.block=N4.gfm,this.options.breaks?h.inline=U0.breaks:h.inline=U0.gfm),this.tokenizer.rules=h}static get rules(){return{block:N4,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(i1.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(i1.tabCharGlobal," ").replace(i1.spaceLine,""));x;){let l;if(this.options.extensions?.block?.some((k)=>(l=k.call({lexer:this},x,h))?(x=x.substring(l.raw.length),h.push(l),!0):!1))continue;if(l=this.tokenizer.space(x)){x=x.substring(l.raw.length);let k=h.at(-1);l.raw.length===1&&k!==void 0?k.raw+=`
44
+ `:h.push(l);continue}if(l=this.tokenizer.code(x)){x=x.substring(l.raw.length);let k=h.at(-1);k?.type==="paragraph"||k?.type==="text"?(k.raw+=(k.raw.endsWith(`
45
45
  `)?"":`
46
- `)+C.raw,k.text+=`
47
- `+C.text,this.inlineQueue.at(-1).src=k.text):h.push(C);continue}if(C=this.tokenizer.fences(x)){x=x.substring(C.raw.length),h.push(C);continue}if(C=this.tokenizer.heading(x)){x=x.substring(C.raw.length),h.push(C);continue}if(C=this.tokenizer.hr(x)){x=x.substring(C.raw.length),h.push(C);continue}if(C=this.tokenizer.blockquote(x)){x=x.substring(C.raw.length),h.push(C);continue}if(C=this.tokenizer.list(x)){x=x.substring(C.raw.length),h.push(C);continue}if(C=this.tokenizer.html(x)){x=x.substring(C.raw.length),h.push(C);continue}if(C=this.tokenizer.def(x)){x=x.substring(C.raw.length);let k=h.at(-1);k?.type==="paragraph"||k?.type==="text"?(k.raw+=(k.raw.endsWith(`
46
+ `)+l.raw,k.text+=`
47
+ `+l.text,this.inlineQueue.at(-1).src=k.text):h.push(l);continue}if(l=this.tokenizer.fences(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.heading(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.hr(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.blockquote(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.list(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.html(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.def(x)){x=x.substring(l.raw.length);let k=h.at(-1);k?.type==="paragraph"||k?.type==="text"?(k.raw+=(k.raw.endsWith(`
48
48
  `)?"":`
49
- `)+C.raw,k.text+=`
50
- `+C.raw,this.inlineQueue.at(-1).src=k.text):this.tokens.links[C.tag]||(this.tokens.links[C.tag]={href:C.href,title:C.title},h.push(C));continue}if(C=this.tokenizer.table(x)){x=x.substring(C.raw.length),h.push(C);continue}if(C=this.tokenizer.lheading(x)){x=x.substring(C.raw.length),h.push(C);continue}let i=x;if(this.options.extensions?.startBlock){let k=1/0,g=x.slice(1),w;this.options.extensions.startBlock.forEach((B)=>{w=B.call({lexer:this},g),typeof w=="number"&&w>=0&&(k=Math.min(k,w))}),k<1/0&&k>=0&&(i=x.substring(0,k+1))}if(this.state.top&&(C=this.tokenizer.paragraph(i))){let k=h.at(-1);l&&k?.type==="paragraph"?(k.raw+=(k.raw.endsWith(`
49
+ `)+l.raw,k.text+=`
50
+ `+l.raw,this.inlineQueue.at(-1).src=k.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},h.push(l));continue}if(l=this.tokenizer.table(x)){x=x.substring(l.raw.length),h.push(l);continue}if(l=this.tokenizer.lheading(x)){x=x.substring(l.raw.length),h.push(l);continue}let i=x;if(this.options.extensions?.startBlock){let k=1/0,g=x.slice(1),w;this.options.extensions.startBlock.forEach((B)=>{w=B.call({lexer:this},g),typeof w=="number"&&w>=0&&(k=Math.min(k,w))}),k<1/0&&k>=0&&(i=x.substring(0,k+1))}if(this.state.top&&(l=this.tokenizer.paragraph(i))){let k=h.at(-1);C&&k?.type==="paragraph"?(k.raw+=(k.raw.endsWith(`
51
51
  `)?"":`
52
- `)+C.raw,k.text+=`
53
- `+C.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):h.push(C),l=i.length!==x.length,x=x.substring(C.raw.length);continue}if(C=this.tokenizer.text(x)){x=x.substring(C.raw.length);let k=h.at(-1);k?.type==="text"?(k.raw+=(k.raw.endsWith(`
52
+ `)+l.raw,k.text+=`
53
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):h.push(l),C=i.length!==x.length,x=x.substring(l.raw.length);continue}if(l=this.tokenizer.text(x)){x=x.substring(l.raw.length);let k=h.at(-1);k?.type==="text"?(k.raw+=(k.raw.endsWith(`
54
54
  `)?"":`
55
- `)+C.raw,k.text+=`
56
- `+C.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):h.push(C);continue}if(x){let k="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw Error(k)}}return this.state.top=!0,h}inline(x,h=[]){return this.inlineQueue.push({src:x,tokens:h}),h}inlineTokens(x,h=[]){let l=x,C=null;if(this.tokens.links){let w=Object.keys(this.tokens.links);if(w.length>0)for(;(C=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)w.includes(C[0].slice(C[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,C.index)+"["+"a".repeat(C[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(C=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,C.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(C=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)i=C[2]?C[2].length:0,l=l.slice(0,C.index+i)+"["+"a".repeat(C[0].length-i-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);l=this.options.hooks?.emStrongMask?.call({lexer:this},l)??l;let k=!1,g="";for(;x;){k||(g=""),k=!1;let w;if(this.options.extensions?.inline?.some((q)=>(w=q.call({lexer:this},x,h))?(x=x.substring(w.raw.length),h.push(w),!0):!1))continue;if(w=this.tokenizer.escape(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.tag(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.link(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.reflink(x,this.tokens.links)){x=x.substring(w.raw.length);let q=h.at(-1);w.type==="text"&&q?.type==="text"?(q.raw+=w.raw,q.text+=w.text):h.push(w);continue}if(w=this.tokenizer.emStrong(x,l,g)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.codespan(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.br(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.del(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.autolink(x)){x=x.substring(w.raw.length),h.push(w);continue}if(!this.state.inLink&&(w=this.tokenizer.url(x))){x=x.substring(w.raw.length),h.push(w);continue}let B=x;if(this.options.extensions?.startInline){let q=1/0,j=x.slice(1),_;this.options.extensions.startInline.forEach((K)=>{_=K.call({lexer:this},j),typeof _=="number"&&_>=0&&(q=Math.min(q,_))}),q<1/0&&q>=0&&(B=x.substring(0,q+1))}if(w=this.tokenizer.inlineText(B)){x=x.substring(w.raw.length),w.raw.slice(-1)!=="_"&&(g=w.raw.slice(-1)),k=!0;let q=h.at(-1);q?.type==="text"?(q.raw+=w.raw,q.text+=w.text):h.push(w);continue}if(x){let q="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(q);break}else throw Error(q)}}return h}},c2=class{options;parser;constructor(y){this.options=y||A2}space(y){return""}code({text:y,lang:x,escaped:h}){let l=(x||"").match(i1.notSpaceStart)?.[0],C=y.replace(i1.endingNewline,"")+`
57
- `;return l?'<pre><code class="language-'+S1(l)+'">'+(h?C:S1(C,!0))+`</code></pre>
58
- `:"<pre><code>"+(h?C:S1(C,!0))+`</code></pre>
55
+ `)+l.raw,k.text+=`
56
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):h.push(l);continue}if(x){let k="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw Error(k)}}return this.state.top=!0,h}inline(x,h=[]){return this.inlineQueue.push({src:x,tokens:h}),h}inlineTokens(x,h=[]){let C=x,l=null;if(this.tokens.links){let w=Object.keys(this.tokens.links);if(w.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(C))!=null;)w.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(C=C.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+C.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(C))!=null;)C=C.slice(0,l.index)+"++"+C.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(l=this.tokenizer.rules.inline.blockSkip.exec(C))!=null;)i=l[2]?l[2].length:0,C=C.slice(0,l.index+i)+"["+"a".repeat(l[0].length-i-2)+"]"+C.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);C=this.options.hooks?.emStrongMask?.call({lexer:this},C)??C;let k=!1,g="";for(;x;){k||(g=""),k=!1;let w;if(this.options.extensions?.inline?.some((q)=>(w=q.call({lexer:this},x,h))?(x=x.substring(w.raw.length),h.push(w),!0):!1))continue;if(w=this.tokenizer.escape(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.tag(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.link(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.reflink(x,this.tokens.links)){x=x.substring(w.raw.length);let q=h.at(-1);w.type==="text"&&q?.type==="text"?(q.raw+=w.raw,q.text+=w.text):h.push(w);continue}if(w=this.tokenizer.emStrong(x,C,g)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.codespan(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.br(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.del(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.autolink(x)){x=x.substring(w.raw.length),h.push(w);continue}if(!this.state.inLink&&(w=this.tokenizer.url(x))){x=x.substring(w.raw.length),h.push(w);continue}let B=x;if(this.options.extensions?.startInline){let q=1/0,j=x.slice(1),_;this.options.extensions.startInline.forEach((K)=>{_=K.call({lexer:this},j),typeof _=="number"&&_>=0&&(q=Math.min(q,_))}),q<1/0&&q>=0&&(B=x.substring(0,q+1))}if(w=this.tokenizer.inlineText(B)){x=x.substring(w.raw.length),w.raw.slice(-1)!=="_"&&(g=w.raw.slice(-1)),k=!0;let q=h.at(-1);q?.type==="text"?(q.raw+=w.raw,q.text+=w.text):h.push(w);continue}if(x){let q="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(q);break}else throw Error(q)}}return h}},S2=class{options;parser;constructor(y){this.options=y||A2}space(y){return""}code({text:y,lang:x,escaped:h}){let C=(x||"").match(i1.notSpaceStart)?.[0],l=y.replace(i1.endingNewline,"")+`
57
+ `;return C?'<pre><code class="language-'+I1(C)+'">'+(h?l:I1(l,!0))+`</code></pre>
58
+ `:"<pre><code>"+(h?l:I1(l,!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,l="";for(let k=0;k<y.items.length;k++){let g=y.items[k];l+=this.listitem(g)}let C=x?"ol":"ul",i=x&&h!==1?' start="'+h+'"':"";return"<"+C+i+`>
64
- `+l+"</"+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+" "+S1(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>
63
+ `}list(y){let{ordered:x,start:h}=y,C="";for(let k=0;k<y.items.length;k++){let g=y.items[k];C+=this.listitem(g)}let l=x?"ol":"ul",i=x&&h!==1?' start="'+h+'"':"";return"<"+l+i+`>
64
+ `+C+"</"+l+`>
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+" "+I1(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 C=0;C<y.header.length;C++)h+=this.tablecell(y.header[C]);x+=this.tablerow({text:h});let l="";for(let C=0;C<y.rows.length;C++){let i=y.rows[C];h="";for(let k=0;k<i.length;k++)h+=this.tablecell(i[k]);l+=this.tablerow({text:h})}return l&&(l=`<tbody>${l}</tbody>`),`<table>
67
+ `}table(y){let x="",h="";for(let l=0;l<y.header.length;l++)h+=this.tablecell(y.header[l]);x+=this.tablerow({text:h});let C="";for(let l=0;l<y.rows.length;l++){let i=y.rows[l];h="";for(let k=0;k<i.length;k++)h+=this.tablecell(i[k]);C+=this.tablerow({text:h})}return C&&(C=`<tbody>${C}</tbody>`),`<table>
68
68
  <thead>
69
69
  `+x+`</thead>
70
- `+l+`</table>
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>${S1(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 l=this.parser.parseInline(h),C=E6(y);if(C===null)return l;y=C;let i='<a href="'+y+'"';return x&&(i+=' title="'+S1(x)+'"'),i+=">"+l+"</a>",i}image({href:y,title:x,text:h,tokens:l}){l&&(h=this.parser.parseInline(l,this.parser.textRenderer));let C=E6(y);if(C===null)return S1(h);y=C;let i=`<img src="${y}" alt="${h}"`;return x&&(i+=` title="${S1(x)}"`),i+=">",i}text(y){return"tokens"in y&&y.tokens?this.parser.parseInline(y.tokens):("escaped"in y)&&y.escaped?y.text:S1(y.text)}},S3=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""}},$1=class y{options;renderer;textRenderer;constructor(x){this.options=x||A2,this.options.renderer=this.options.renderer||new c2,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new S3}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 l="";for(let C=0;C<x.length;C++){let i=x[C];if(this.options.extensions?.renderers?.[i.type]){let g=i,w=this.options.extensions.renderers[g.type].call({parser:this},g);if(w!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(g.type)){l+=w||"";continue}}let k=i;switch(k.type){case"space":{l+=this.renderer.space(k);continue}case"hr":{l+=this.renderer.hr(k);continue}case"heading":{l+=this.renderer.heading(k);continue}case"code":{l+=this.renderer.code(k);continue}case"table":{l+=this.renderer.table(k);continue}case"blockquote":{l+=this.renderer.blockquote(k);continue}case"list":{l+=this.renderer.list(k);continue}case"html":{l+=this.renderer.html(k);continue}case"def":{l+=this.renderer.def(k);continue}case"paragraph":{l+=this.renderer.paragraph(k);continue}case"text":{let g=k,w=this.renderer.text(g);for(;C+1<x.length&&x[C+1].type==="text";)g=x[++C],w+=`
75
- `+this.renderer.text(g);h?l+=this.renderer.paragraph({type:"paragraph",raw:w,text:w,tokens:[{type:"text",raw:w,text:w,escaped:!0}]}):l+=w;continue}default:{let g='Token with "'+k.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw Error(g)}}}return l}parseInline(x,h=this.renderer){let l="";for(let C=0;C<x.length;C++){let i=x[C];if(this.options.extensions?.renderers?.[i.type]){let g=this.options.extensions.renderers[i.type].call({parser:this},i);if(g!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){l+=g||"";continue}}let k=i;switch(k.type){case"escape":{l+=h.text(k);break}case"html":{l+=h.html(k);break}case"link":{l+=h.link(k);break}case"image":{l+=h.image(k);break}case"strong":{l+=h.strong(k);break}case"em":{l+=h.em(k);break}case"codespan":{l+=h.codespan(k);break}case"br":{l+=h.br(k);break}case"del":{l+=h.del(k);break}case"text":{l+=h.text(k);break}default:{let g='Token with "'+k.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw Error(g)}}}return l}},F0=class{options;block;constructor(y){this.options=y||A2}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?X1.lex:X1.lexInline}provideParser(){return this.block?$1.parse:$1.parseInline}},Z4=class{defaults=v3();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=$1;Renderer=c2;TextRenderer=S3;Lexer=X1;Tokenizer=p4;Hooks=F0;constructor(...y){this.use(...y)}walkTokens(y,x){let h=[];for(let l of y)switch(h=h.concat(x.call(this,l)),l.type){case"table":{let C=l;for(let i of C.header)h=h.concat(this.walkTokens(i.tokens,x));for(let i of C.rows)for(let k of i)h=h.concat(this.walkTokens(k.tokens,x));break}case"list":{let C=l;h=h.concat(this.walkTokens(C.items,x));break}default:{let C=l;this.defaults.extensions?.childTokens?.[C.type]?this.defaults.extensions.childTokens[C.type].forEach((i)=>{let k=C[i].flat(1/0);h=h.concat(this.walkTokens(k,x))}):C.tokens&&(h=h.concat(this.walkTokens(C.tokens,x)))}}return h}use(...y){let x=this.defaults.extensions||{renderers:{},childTokens:{}};return y.forEach((h)=>{let l={...h};if(l.async=this.defaults.async||l.async||!1,h.extensions&&(h.extensions.forEach((C)=>{if(!C.name)throw Error("extension name required");if("renderer"in C){let i=x.renderers[C.name];i?x.renderers[C.name]=function(...k){let g=C.renderer.apply(this,k);return g===!1&&(g=i.apply(this,k)),g}:x.renderers[C.name]=C.renderer}if("tokenizer"in C){if(!C.level||C.level!=="block"&&C.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let i=x[C.level];i?i.unshift(C.tokenizer):x[C.level]=[C.tokenizer],C.start&&(C.level==="block"?x.startBlock?x.startBlock.push(C.start):x.startBlock=[C.start]:C.level==="inline"&&(x.startInline?x.startInline.push(C.start):x.startInline=[C.start]))}"childTokens"in C&&C.childTokens&&(x.childTokens[C.name]=C.childTokens)}),l.extensions=x),h.renderer){let C=this.defaults.renderer||new c2(this.defaults);for(let i in h.renderer){if(!(i in C))throw Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let k=i,g=h.renderer[k],w=C[k];C[k]=(...B)=>{let q=g.apply(C,B);return q===!1&&(q=w.apply(C,B)),q||""}}l.renderer=C}if(h.tokenizer){let C=this.defaults.tokenizer||new p4(this.defaults);for(let i in h.tokenizer){if(!(i in C))throw Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let k=i,g=h.tokenizer[k],w=C[k];C[k]=(...B)=>{let q=g.apply(C,B);return q===!1&&(q=w.apply(C,B)),q}}l.tokenizer=C}if(h.hooks){let C=this.defaults.hooks||new F0;for(let i in h.hooks){if(!(i in C))throw Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let k=i,g=h.hooks[k],w=C[k];F0.passThroughHooks.has(i)?C[k]=(B)=>{if(this.defaults.async&&F0.passThroughHooksRespectAsync.has(i))return(async()=>{let j=await g.call(C,B);return w.call(C,j)})();let q=g.call(C,B);return w.call(C,q)}:C[k]=(...B)=>{if(this.defaults.async)return(async()=>{let j=await g.apply(C,B);return j===!1&&(j=await w.apply(C,B)),j})();let q=g.apply(C,B);return q===!1&&(q=w.apply(C,B)),q}}l.hooks=C}if(h.walkTokens){let C=this.defaults.walkTokens,i=h.walkTokens;l.walkTokens=function(k){let g=[];return g.push(i.call(this,k)),C&&(g=g.concat(C.call(this,k))),g}}this.defaults={...this.defaults,...l}}),this}setOptions(y){return this.defaults={...this.defaults,...y},this}lexer(y,x){return X1.lex(y,x??this.defaults)}parser(y,x){return $1.parse(y,x??this.defaults)}parseMarkdown(y){return(x,h)=>{let l={...h},C={...this.defaults,...l},i=this.onError(!!C.silent,!!C.async);if(this.defaults.async===!0&&l.async===!1)return i(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 i(Error("marked(): input parameter is undefined or null"));if(typeof x!="string")return i(Error("marked(): input parameter is of type "+Object.prototype.toString.call(x)+", string expected"));if(C.hooks&&(C.hooks.options=C,C.hooks.block=y),C.async)return(async()=>{let k=C.hooks?await C.hooks.preprocess(x):x,g=await(C.hooks?await C.hooks.provideLexer():y?X1.lex:X1.lexInline)(k,C),w=C.hooks?await C.hooks.processAllTokens(g):g;C.walkTokens&&await Promise.all(this.walkTokens(w,C.walkTokens));let B=await(C.hooks?await C.hooks.provideParser():y?$1.parse:$1.parseInline)(w,C);return C.hooks?await C.hooks.postprocess(B):B})().catch(i);try{C.hooks&&(x=C.hooks.preprocess(x));let k=(C.hooks?C.hooks.provideLexer():y?X1.lex:X1.lexInline)(x,C);C.hooks&&(k=C.hooks.processAllTokens(k)),C.walkTokens&&this.walkTokens(k,C.walkTokens);let g=(C.hooks?C.hooks.provideParser():y?$1.parse:$1.parseInline)(k,C);return C.hooks&&(g=C.hooks.postprocess(g)),g}catch(k){return i(k)}}}onError(y,x){return(h)=>{if(h.message+=`
76
- Please report this to https://github.com/markedjs/marked.`,y){let l="<p>An error occurred:</p><pre>"+S1(h.message+"",!0)+"</pre>";return x?Promise.resolve(l):l}if(x)return Promise.reject(h);throw h}}},_2=new Z4;function R(y,x){return _2.parse(y,x)}R.options=R.setOptions=function(y){return _2.setOptions(y),R.defaults=_2.defaults,y7(R.defaults),R};R.getDefaults=v3;R.defaults=A2;R.use=function(...y){return _2.use(...y),R.defaults=_2.defaults,y7(R.defaults),R};R.walkTokens=function(y,x){return _2.walkTokens(y,x)};R.parseInline=_2.parseInline;R.Parser=$1;R.parser=$1.parse;R.Renderer=c2;R.TextRenderer=S3;R.Lexer=X1;R.lexer=X1.lex;R.Tokenizer=p4;R.Hooks=F0;R.parse=R;var{options:bw,setOptions:cw,use:sw,walkTokens:Sw,parseInline:Iw}=R;var Mw=$1.parse,dw=X1.lex;var jC=new c2,d3,T3=new Z4;T3.use({renderer:{code(y){let x=String(y.lang||""),h=x.match(/^[a-z]+/)?.[0]??"",l=x.match(/#([A-Za-z0-9_-]+)/)?.[1]??"",C=x.match(/:([a-z]+)/)?.[1]??"",i=d3?.get(y.text);if(!l&&!C&&!i)return!1;let k=jC.code({...y,lang:h}),g=[l&&`data-example-id="${l}"`,C&&`data-example-mode="${C}"`].filter(Boolean).join(" ");if(g)k=k.replace(/^<pre>/,`<pre ${g}>`);if(i){let w=JSON.stringify(i.js).replace(/</g,"\\u003c");k+=`<script type="application/tosi-transpiled" data-dialect="${i.dialect}">${w}</script>`}return k}}});function I3(y){return y.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function VC(y){return y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var PC=new Z4,M3=new Map,s2=[];T3.use({hooks:{preprocess(y){return M3=new Map,s2=[],y},postprocess(y){if(s2.length===0)return y;let x=s2.map((h)=>{let l=PC.parseInline(M3.get(h)??""),C=I3(h);return`<li id="fn-${C}"><p>${l} <a href="#fnref-${C}" class="footnote-backref" aria-label="Back to reference">↩</a></p></li>`}).join(`
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>${I1(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),l=l7(y);if(l===null)return C;y=l;let i='<a href="'+y+'"';return x&&(i+=' title="'+I1(x)+'"'),i+=">"+C+"</a>",i}image({href:y,title:x,text:h,tokens:C}){C&&(h=this.parser.parseInline(C,this.parser.textRenderer));let l=l7(y);if(l===null)return I1(h);y=l;let i=`<img src="${y}" alt="${h}"`;return x&&(i+=` title="${I1(x)}"`),i+=">",i}text(y){return"tokens"in y&&y.tokens?this.parser.parseInline(y.tokens):("escaped"in y)&&y.escaped?y.text:I1(y.text)}},s3=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""}},$1=class y{options;renderer;textRenderer;constructor(x){this.options=x||A2,this.options.renderer=this.options.renderer||new S2,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new s3}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 l=0;l<x.length;l++){let i=x[l];if(this.options.extensions?.renderers?.[i.type]){let g=i,w=this.options.extensions.renderers[g.type].call({parser:this},g);if(w!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(g.type)){C+=w||"";continue}}let k=i;switch(k.type){case"space":{C+=this.renderer.space(k);continue}case"hr":{C+=this.renderer.hr(k);continue}case"heading":{C+=this.renderer.heading(k);continue}case"code":{C+=this.renderer.code(k);continue}case"table":{C+=this.renderer.table(k);continue}case"blockquote":{C+=this.renderer.blockquote(k);continue}case"list":{C+=this.renderer.list(k);continue}case"html":{C+=this.renderer.html(k);continue}case"def":{C+=this.renderer.def(k);continue}case"paragraph":{C+=this.renderer.paragraph(k);continue}case"text":{let g=k,w=this.renderer.text(g);for(;l+1<x.length&&x[l+1].type==="text";)g=x[++l],w+=`
75
+ `+this.renderer.text(g);h?C+=this.renderer.paragraph({type:"paragraph",raw:w,text:w,tokens:[{type:"text",raw:w,text:w,escaped:!0}]}):C+=w;continue}default:{let g='Token with "'+k.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 l=0;l<x.length;l++){let i=x[l];if(this.options.extensions?.renderers?.[i.type]){let g=this.options.extensions.renderers[i.type].call({parser:this},i);if(g!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){C+=g||"";continue}}let k=i;switch(k.type){case"escape":{C+=h.text(k);break}case"html":{C+=h.html(k);break}case"link":{C+=h.link(k);break}case"image":{C+=h.image(k);break}case"strong":{C+=h.strong(k);break}case"em":{C+=h.em(k);break}case"codespan":{C+=h.codespan(k);break}case"br":{C+=h.br(k);break}case"del":{C+=h.del(k);break}case"text":{C+=h.text(k);break}default:{let g='Token with "'+k.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw Error(g)}}}return C}},F0=class{options;block;constructor(y){this.options=y||A2}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?X1.lex:X1.lexInline}provideParser(){return this.block?$1.parse:$1.parseInline}},R4=class{defaults=R3();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=$1;Renderer=S2;TextRenderer=s3;Lexer=X1;Tokenizer=Z4;Hooks=F0;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 l=C;for(let i of l.header)h=h.concat(this.walkTokens(i.tokens,x));for(let i of l.rows)for(let k of i)h=h.concat(this.walkTokens(k.tokens,x));break}case"list":{let l=C;h=h.concat(this.walkTokens(l.items,x));break}default:{let l=C;this.defaults.extensions?.childTokens?.[l.type]?this.defaults.extensions.childTokens[l.type].forEach((i)=>{let k=l[i].flat(1/0);h=h.concat(this.walkTokens(k,x))}):l.tokens&&(h=h.concat(this.walkTokens(l.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((l)=>{if(!l.name)throw Error("extension name required");if("renderer"in l){let i=x.renderers[l.name];i?x.renderers[l.name]=function(...k){let g=l.renderer.apply(this,k);return g===!1&&(g=i.apply(this,k)),g}:x.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let i=x[l.level];i?i.unshift(l.tokenizer):x[l.level]=[l.tokenizer],l.start&&(l.level==="block"?x.startBlock?x.startBlock.push(l.start):x.startBlock=[l.start]:l.level==="inline"&&(x.startInline?x.startInline.push(l.start):x.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(x.childTokens[l.name]=l.childTokens)}),C.extensions=x),h.renderer){let l=this.defaults.renderer||new S2(this.defaults);for(let i in h.renderer){if(!(i in l))throw Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let k=i,g=h.renderer[k],w=l[k];l[k]=(...B)=>{let q=g.apply(l,B);return q===!1&&(q=w.apply(l,B)),q||""}}C.renderer=l}if(h.tokenizer){let l=this.defaults.tokenizer||new Z4(this.defaults);for(let i in h.tokenizer){if(!(i in l))throw Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let k=i,g=h.tokenizer[k],w=l[k];l[k]=(...B)=>{let q=g.apply(l,B);return q===!1&&(q=w.apply(l,B)),q}}C.tokenizer=l}if(h.hooks){let l=this.defaults.hooks||new F0;for(let i in h.hooks){if(!(i in l))throw Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let k=i,g=h.hooks[k],w=l[k];F0.passThroughHooks.has(i)?l[k]=(B)=>{if(this.defaults.async&&F0.passThroughHooksRespectAsync.has(i))return(async()=>{let j=await g.call(l,B);return w.call(l,j)})();let q=g.call(l,B);return w.call(l,q)}:l[k]=(...B)=>{if(this.defaults.async)return(async()=>{let j=await g.apply(l,B);return j===!1&&(j=await w.apply(l,B)),j})();let q=g.apply(l,B);return q===!1&&(q=w.apply(l,B)),q}}C.hooks=l}if(h.walkTokens){let l=this.defaults.walkTokens,i=h.walkTokens;C.walkTokens=function(k){let g=[];return g.push(i.call(this,k)),l&&(g=g.concat(l.call(this,k))),g}}this.defaults={...this.defaults,...C}}),this}setOptions(y){return this.defaults={...this.defaults,...y},this}lexer(y,x){return X1.lex(y,x??this.defaults)}parser(y,x){return $1.parse(y,x??this.defaults)}parseMarkdown(y){return(x,h)=>{let C={...h},l={...this.defaults,...C},i=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&C.async===!1)return i(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 i(Error("marked(): input parameter is undefined or null"));if(typeof x!="string")return i(Error("marked(): input parameter is of type "+Object.prototype.toString.call(x)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=y),l.async)return(async()=>{let k=l.hooks?await l.hooks.preprocess(x):x,g=await(l.hooks?await l.hooks.provideLexer():y?X1.lex:X1.lexInline)(k,l),w=l.hooks?await l.hooks.processAllTokens(g):g;l.walkTokens&&await Promise.all(this.walkTokens(w,l.walkTokens));let B=await(l.hooks?await l.hooks.provideParser():y?$1.parse:$1.parseInline)(w,l);return l.hooks?await l.hooks.postprocess(B):B})().catch(i);try{l.hooks&&(x=l.hooks.preprocess(x));let k=(l.hooks?l.hooks.provideLexer():y?X1.lex:X1.lexInline)(x,l);l.hooks&&(k=l.hooks.processAllTokens(k)),l.walkTokens&&this.walkTokens(k,l.walkTokens);let g=(l.hooks?l.hooks.provideParser():y?$1.parse:$1.parseInline)(k,l);return l.hooks&&(g=l.hooks.postprocess(g)),g}catch(k){return i(k)}}}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>"+I1(h.message+"",!0)+"</pre>";return x?Promise.resolve(C):C}if(x)return Promise.reject(h);throw h}}},_2=new R4;function R(y,x){return _2.parse(y,x)}R.options=R.setOptions=function(y){return _2.setOptions(y),R.defaults=_2.defaults,g7(R.defaults),R};R.getDefaults=R3;R.defaults=A2;R.use=function(...y){return _2.use(...y),R.defaults=_2.defaults,g7(R.defaults),R};R.walkTokens=function(y,x){return _2.walkTokens(y,x)};R.parseInline=_2.parseInline;R.Parser=$1;R.parser=$1.parse;R.Renderer=S2;R.TextRenderer=s3;R.Lexer=X1;R.lexer=X1.lex;R.Tokenizer=Z4;R.Hooks=F0;R.parse=R;var{options:ew,setOptions:yB,use:xB,walkTokens:hB,parseInline:CB}=R;var lB=$1.parse,iB=X1.lex;var $l=new S2,L3,r3=new R4;r3.use({renderer:{code(y){let x=String(y.lang||""),h=x.match(/^[a-z]+/)?.[0]??"",C=x.match(/#([A-Za-z0-9_-]+)/)?.[1]??"",l=x.match(/:([a-z]+)/)?.[1]??"",i=L3?.get(y.text);if(!C&&!l&&!i)return!1;let k=$l.code({...y,lang:h}),g=[C&&`data-example-id="${C}"`,l&&`data-example-mode="${l}"`].filter(Boolean).join(" ");if(g)k=k.replace(/^<pre>/,`<pre ${g}>`);if(i){let w=JSON.stringify(i.js).replace(/</g,"\\u003c");k+=`<script type="application/tosi-transpiled" data-dialect="${i.dialect}">${w}</script>`}return k}}});function T3(y){return y.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Yl(y){return y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Nl=new R4,d3=new Map,M2=[];r3.use({hooks:{preprocess(y){return d3=new Map,M2=[],y},postprocess(y){if(M2.length===0)return y;let x=M2.map((h)=>{let C=Nl.parseInline(d3.get(h)??""),l=T3(h);return`<li id="fn-${l}"><p>${C} <a href="#fnref-${l}" 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 l="<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="/${I3(y.target)}/" class="wikilink">${VC(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 M3.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(!s2.includes(h))s2.push(h);return{type:"footnoteRef",raw:x[0],id:h}},renderer(y){let x=s2.indexOf(y.id)+1,h=I3(y.id);return`<sup class="footnote-ref"><a href="#fn-${h}" id="fnref-${h}">${x}</a></sup>`}}]});function Q0(y,x={}){d3=x.bakes;try{return T3.parse(y)}finally{d3=void 0}}function q7(y,x){let h=y.headTitle?.trim();if(h)return h;let l=x?.trim()??"";if(!l)return y.title;let C=y.title.toLowerCase(),i=l.toLowerCase();if(C.includes(i)||i.includes(C))return y.title;return`${y.title} — ${l}`}var{div:K2,slot:j7,span:_C,button:AC}=G;class R4 extends F{static preferredTagName="tosi-tabs";static initAttributes={localized:!1};value=0;makeTab(y,x,h){let l=x.getAttribute("name"),C=x.querySelector('template[role="tab"]')?.content.cloneNode(!0)||(this.localized?Q1(l):_C(l)),i=K2(C,{part:"tab",tabindex:0,role:"tab",ariaControls:h},x.hasAttribute("data-close")?AC({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"}};onCloseTab=null;content=[K2({role:"tabpanel",part:"tabpanel"},K2({part:"tabrow"},K2({class:"tabs",part:"tabs"}),K2({class:"elastic"}),j7({name:"after-tabs"})),K2({class:"border"},K2({class:"selected",part:"selected"}))),j7()];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,l=h.closest("button.close")!==null,C=h.closest(".tabs > div"),i=[...x.children].indexOf(C);if(l){let k=this.bodies[i];if(!this.onCloseTab||this.onCloseTab(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 l=x[h],C=`${this.instanceId}-${h}`;l.id=C;let i=this.makeTab(this,l,C);y.append(i)}};connectedCallback(){super.connectedCallback();let{tabs:y}=this.parts;y.addEventListener("click",this.pickTab),y.addEventListener("keydown",this.keyTab),this.setupTabs(),s1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),s1.allInstances.delete(this)}localeChanged=()=>{this.queueRender()};onResize(){this.queueRender()}render(){let{tabs:y,selected:x}=this.parts,h=this.bodies;for(let l=0;l<h.length;l++){let C=h[l],i=y.children[l],k=this.value===Number(l);if(i.toggleAttribute("aria-selected",k),C.toggleAttribute("hidden",!k),k)x.style.marginLeft=`${i.offsetLeft-y.offsetLeft}px`,x.style.width=`${i.offsetWidth}px`}}}var KC=R4,X0=R4.elementCreator(),UC=X0,GC=X0;var U2=(async()=>{}).constructor;function h2(y){return y.replace(/[^a-zA-Z0-9_$]/g,"")}function V7(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 FC(y,x){let h=(l)=>/^(\.|\/|https?:)/.test(l)?l:x+l;return y.replace(/import\s+([^;'"]+?)\s+from\s+(['"])([^'"]+)\2[ \t]*;?/g,(l,C,i,k)=>{let g=`await import(${i}${h(k)}${i})`,w=C.trim(),B;if(B=w.match(/^\{([^}]*)\}$/))return`const { ${V7(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]}, ${V7(B[2])} } = ${g}`;return l}).replace(/import\s+(['"])([^'"]+)\1[ \t]*;?/g,(l,C,i)=>`await import(${C}${h(i)}${C})`)}function OC(){return globalThis.__TOSI_IMPORT_RESOLVER?.prefix}function Y1(y,x,h=OC()){let l=y;for(let i of x){let k=h2(i),g=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");l=l.replace(new RegExp(`import\\s*\\{([^}]*)\\}\\s*from\\s*'${g}'`,"g"),(w,B)=>`const { ${B.replace(/\s+/g," ").trim()} } = ${k}`),l=l.replace(new RegExp(`import\\s*\\*\\s*as\\s+(\\w+)\\s+from\\s*'${g}'`,"g"),(w,B)=>`const ${B} = ${k}`),l=l.replace(new RegExp(`import\\s+(\\w+)\\s+from\\s*'${g}'`,"g"),(w,B)=>`const ${B} = ${k}`)}if(h)l=FC(l,h);let C=l.match(/^\s*import\s+['"{*\w][^\n]*/m);if(C)throw Error(`live example: unsupported import \`${C[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 l}async function A7(y,x,h){let l=Y1(y,Object.keys(x)),C=(await h(l,{transforms:["typescript"]})).code,i=Object.keys(x).map(h2),k=Object.values(x);await new U2(...i,C)(...k)}var L3="0.12.0";function o3(y){let x=globalThis.__TJS_LOCAL_BASE;return[...typeof x==="string"?[`${x}${y}`]:[],`https://cdn.jsdelivr.net/npm/tjs-lang@${L3}/dist/${y}`,`https://unpkg.com/tjs-lang@${L3}/dist/${y}`,`https://esm.sh/tjs-lang@${L3}/dist/${y}`]}async function n3(y){for(let x of y)try{let h=await import(x);if(h)return h}catch{}return null}async function WC(){try{let{tjs:x}=await import("tjs-lang/browser");if(typeof x==="function")return x}catch{}let y=await n3(o3("tjs-browser.js"));if(y&&typeof y.tjs==="function")return y.tjs;return null}var QC;async function XC(){let y=[()=>import("tjs-lang/browser"),()=>n3(o3("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 K7(){return QC??=XC()}async function $C(){try{let{fromTS:x}=await import("tjs-lang/browser/from-ts");if(typeof x==="function")return x}catch{}let y=await n3(o3("tjs-browser-from-ts.js"));if(y&&typeof y.fromTS==="function")return y.fromTS;return null}var YC,NC,pC=256,$0=new Map,r3=(y,x)=>{if($0.size>=pC){let h=$0.keys().next().value;if(h!==void 0)$0.delete(h)}$0.set(y,x)},P7=!1,_7=!1;async function Y0(y="js"){if(y==="js")return(l)=>({code:l});let x=await(YC??=WC());if(!x&&!P7)P7=!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(NC??=$C()):null;if(y==="ts"&&!h&&!_7)_7=!0,console.warn("tjs-lang/browser/from-ts not available — `ts` examples run as raw JavaScript.");return(l)=>{let C=`${y}\x00${l}`,i=$0.get(C);if(i)return i;if(!x){let g={code:l};return r3(C,g),g}if(y==="ts")return(async()=>{let g=h?(await h(l,{emitTJS:!0})).code:l,w={code:x(g,{dialect:"tjs",runTests:!1}).code};return r3(C,w),w})();let k={code:x(l,{dialect:y,runTests:!1}).code};return r3(C,k),k}}var D4="live-example-payload";function U7(y,x,h){return h!==""?`${y}-${h}`:`${y}-${x}`}function u3(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("live-example: failed to write to localStorage",h)}}function JC(y){if(y===null)return null;try{return JSON.parse(y)}catch{return null}}function G7(y,x,h,l,C,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();u3(h,{remoteKey:l,sentAt:Date.now(),...C,original:i?.original}),window.open(g)}var vC=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=JC(y);if(x)this.handlePayload(x)};startListening(){if(this.listening)return;if(this.listening=!0,vC)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(u3(this.storageKey,x),this.channel)this.channel.postMessage(x)}sendClose(){let y={remoteKey:this.remoteKey,sentAt:Date.now(),css:"",html:"",js:"",close:!0};if(u3(this.storageKey,y),this.channel)this.channel.postMessage(y)}}var F7="__tosiCaptureScope",{div:O7}=G;function ZC(y,x){let h=y.customElements;if(!h)return;let l=(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)l(k.tagName)}let C=y.document;if(C){let i=C.querySelectorAll("*");for(let k of i){let g=k.tagName.toLowerCase();if(g.includes("-"))l(g)}}}async function W7(y,x){if(!x)return{code:y,extraContext:{}};let h;try{({scopeCaptureEpilogue:h}=await import("./index-nsmyq9mv.js"))}catch{return{code:y,extraContext:{}}}let l=h(y,F7);if(!l)return{code:y,extraContext:{}};return{code:y+l,extraContext:{[F7]:x}}}async function H4(y){let{html:x,css:h,js:l,context:C,transform:i,compiledJs:k,exampleElement:g,styleElement:w,widgetsElement:B,onError:q,onScope:j}=y,_=O7({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(l,Object.keys(C)),{transforms:["typescript"]})).code,{code:Q,extraContext:Y}=await W7(U,j),$={preview:_,...C,...Y},J=Object.keys($).map(h2),v=Object.values($);await new U2(...J,Q)(...v)}catch(U){if(console.error(U),_.append(O7({class:"preview-error"},String(U.message||U))),q)q(U);else window.alert(`Error: ${U}, the console may have more information…`)}return _}async function b4(y){let{html:x,css:h,js:l,context:C,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(C.tosijs)K.tosijs=C.tosijs;if(C["tosijs-ui"])K.tosijsui=C["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="/${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>
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>`),_.close(),ZC(K,C);let U=_.querySelector(".preview");if(!U)return console.error("Could not find preview element in iframe"),null;try{let Q=k??(await i(Y1(l,Object.keys(C)),{transforms:["typescript"]})).code,{code:Y,extraContext:$}=await W7(Q,q),J={preview:U,...C,...$},v=K.eval("(async () => {}).constructor"),d=Object.keys(J).map(h2),l1=Object.values(J);await new v(...d,Y)(...l1)}catch(Q){console.error(Q);let Y=_.createElement("div");if(Y.className="preview-error",Y.textContent=String(Q.message||Q),U.append(Y),B)B(Q);else window.alert(`Error: ${Q}, the console may have more information…`)}return U}function RC(y){let x=y?.nextElementSibling??null;while(x?.tagName==="SCRIPT"&&x.getAttribute("type")==="application/tosi-transpiled")x=x.nextElementSibling;return x}function DC(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 c4(y,x,h,l,C){let i=[...y.querySelectorAll(".language-html,.language-js,.language-tjs,.language-ts,.language-css,.language-test")].filter((g)=>!g.closest(l)).map((g)=>({block:g.parentElement,language:g.classList[0].split("-").pop(),code:g.innerText,compiled:DC(g.parentElement),mode:g.parentElement.getAttribute("data-example-mode")||void 0})),k=0;for(let g=0;g<i.length;g+=1){let w=[i[g]];while(g<i.length-1&&RC(i[g].block)===i[g+1].block)w.push(i[g+1]),g+=1;let B=h({context:x});if(C!==void 0)B.setAttribute("data-source-file",C),B.setAttribute("data-example-ordinal",String(k));let q=w.map((K)=>K.mode).filter((K)=>!!K);if(q.length){let K=[...new Set(q)];if(K.length>1)console.error(`live example ${k+1}${C?` (${C})`:""}: contradictory modes [${K.join(", ")}] — using the first, "${q[0]}".`);B.setAttribute("mode",q[0])}let j=w.map((K)=>K.block.getAttribute("data-example-id")).find((K)=>!!K);B.id=j||`example-${k+1}`,k+=1,w[0].block.parentElement.insertBefore(B,w[0].block),w.forEach((K)=>{switch(K.language){case"js":case"tjs":case"ts":if(B.js=K.code,B.dialect=K.language,K.compiled!==void 0)B.compiledJs=K.compiled,B.compiledJsSource=K.code;break;case"html":B.html=K.code;break;case"css":B.css=K.code;break;case"test":B.test=K.code;break}K.block.remove()}),B.showDefaultTab(),B.snapshotAndRestoreLocalEdit()}}var HC=new Set(["js","tjs","ts"]),Q7=new Set(["js","tjs","ts","html","css","test"]);function f3(y){let x=/^([ \t]*)```([\w-]*)[^\n]*\n([\s\S]*?)\n[ \t]*```/gm,h=[],l;while((l=x.exec(y))!==null){let C=l.index+l[0].indexOf(`
97
- `)+1;h.push({lang:l[2]||"",indent:l[1],start:l.index,end:l.index+l[0].length,codeStart:C,codeEnd:C+l[3].length})}return h}function bC(y,x){if(!x)return y;return y.split(`
96
+ </html>`),_.close(),ul(K,l);let U=_.querySelector(".preview");if(!U)return console.error("Could not find preview element in iframe"),null;try{let Q=k??(await i(Y1(C,Object.keys(l)),{transforms:["typescript"]})).code,{code:Y,extraContext:$}=await Z7(Q,q),Z={preview:U,...l,...$},p=K.eval("(async () => {}).constructor"),T=Object.keys(Z).map(C2),C1=Object.values(Z);await new p(...T,Y)(...C1)}catch(Q){console.error(Q);let Y=_.createElement("div");if(Y.className="preview-error",Y.textContent=String(Q.message||Q),U.append(Y),B)B(Q);else window.alert(`Error: ${Q}, the console may have more information…`)}return U}function El(y){let x=y?.nextElementSibling??null;while(x?.tagName==="SCRIPT"&&x.getAttribute("type")==="application/tosi-transpiled")x=x.nextElementSibling;return x}function al(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 M4(y,x,h,C,l){let i=[...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:al(g.parentElement),mode:g.parentElement.getAttribute("data-example-mode")||void 0})),k=0;for(let g=0;g<i.length;g+=1){let w=[i[g]];while(g<i.length-1&&El(i[g].block)===i[g+1].block)w.push(i[g+1]),g+=1;let B=h({context:x});if(l!==void 0)B.setAttribute("data-source-file",l),B.setAttribute("data-example-ordinal",String(k));let q=w.map((K)=>K.mode).filter((K)=>!!K);if(q.length){let K=[...new Set(q)];if(K.length>1)console.error(`live example ${k+1}${l?` (${l})`:""}: contradictory modes [${K.join(", ")}] — using the first, "${q[0]}".`);B.setAttribute("mode",q[0])}let j=w.map((K)=>K.block.getAttribute("data-example-id")).find((K)=>!!K);B.id=j||`example-${k+1}`,k+=1,w[0].block.parentElement.insertBefore(B,w[0].block),w.forEach((K)=>{switch(K.language){case"js":case"tjs":case"ts":if(B.js=K.code,B.dialect=K.language,K.compiled!==void 0)B.compiledJs=K.compiled,B.compiledJsSource=K.code;break;case"html":B.html=K.code;break;case"css":B.css=K.code;break;case"test":B.test=K.code;break}K.block.remove()}),B.showDefaultTab(),B.snapshotAndRestoreLocalEdit()}}var ml=new Set(["js","tjs","ts"]),p7=new Set(["js","tjs","ts","html","css","test"]);function e3(y){let x=/^([ \t]*)```([\w-]*)[^\n]*\n([\s\S]*?)\n[ \t]*```/gm,h=[],C;while((C=x.exec(y))!==null){let l=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:l,codeEnd:l+C[3].length})}return h}function tl(y,x){if(!x)return y;return y.split(`
98
98
  `).map((h)=>h?x+h:h).join(`
99
- `)}function cC(y,x){if(!x)return y;return y.split(`
99
+ `)}function el(y,x){if(!x)return y;return y.split(`
100
100
  `).map((h)=>h.startsWith(x)?h.slice(x.length):h).join(`
101
- `)}function a3(y,x){let h=[],l=null;for(let C=0;C<x.length;C+=1){let i=x[C];if(!Q7.has(i.lang)){l=null;continue}let k=x[C-1];if(l!==null&&k!==void 0&&Q7.has(k.lang)&&y.slice(k.end,i.start).trim()===""&&l)l.push(i);else l=[i],h.push(l)}return h}function X7(y,x,h){let l=a3(y,f3(y))[x];if(!l)return null;let C=(w)=>w.replace(/\s+$/,""),i=[],k=(w)=>w==="js"?l.find((B)=>HC.has(B.lang)):l.find((B)=>B.lang===w);for(let w of["js","html","css","test"]){let B=h[w];if(B===void 0)continue;let q=k(w);if(!q)continue;let j=y.slice(q.codeStart,q.codeEnd);if(C(cC(j,q.indent))===C(B))continue;i.push({start:q.codeStart,end:q.codeEnd,text:bC(B,q.indent)})}if(i.length===0)return null;i.sort((w,B)=>B.start-w.start);let g=y;for(let w of i)g=g.slice(0,w.start)+w.text+g.slice(w.end);return g}function $7(y,x){return`tosi-example-edit:${y}#${x}`}function Y7(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("example-store: save failed",h)}}function N7(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 J7(y){try{return localStorage.getItem(y)!==null}catch{return!1}}var v7={":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"},':host.-locally-edited [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 .hide-if-maximized, :host:not(.-maximize) .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",boxShadow:"inset 0 0 0 2px #8883"},":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",left:"5px",bottom:"5px","--widget-color":"var(--brand-color)",borderRadius:"5px",width:"44px",height:"44px",lineHeight:"44px",zIndex:"100"},':host [part="exampleWidgets"] svg':{stroke:"var(--widget-color)"},":host .code-editors":{overflow:"hidden",background:"white",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"},':host [part="testIndicator"]':{position:"absolute",top:"8px",right:"8px",width:"12px",height:"12px",borderRadius:"50%",background:"#888",zIndex:"100",display:"none"},':host.-has-tests [part="testIndicator"]':{display:"block",opacity:"var(--tests-enabled, 1)"},':host.-test-running [part="testIndicator"]':{background:"#fa0",animation:"test-pulse 0.5s ease-in-out infinite"},':host.-test-passed [part="testIndicator"]':{background:"#0a0",animation:"test-fade 2s ease-out forwards"},':host.-test-failed [part="testIndicator"]':{background:"#c00",animation:"test-pulse 1s ease-in-out infinite"},"@keyframes test-pulse":{"0%, 100%":{opacity:"1"},"50%":{opacity:"0.4"}},"@keyframes test-fade":{"0%":{opacity:"1"},"50%":{opacity:"1"},"100%":{opacity:"0"}},':host.-test-passed [part="exampleWidgets"]':{"--widget-color":"#0a0"},':host.-test-failed [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 m3 extends Error{constructor(y){super(y);this.name="AssertionError"}}var sC=/\/(index|module|iife|module\.debug|module\.safe)\.js$/;function SC(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 l=h.match(/[(@\s]([^()\s]+):(\d+):(\d+)\)?$/);if(!l)continue;let[,C,i,k]=l;if(sC.test(C))continue;return{url:C,line:Number(i),col:Number(k)}}return null}var s4=null;function IC(y){if(!s4||y<1)return null;return s4.split(`
103
- `)[y-1]?.trim()||null}function Z7(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,l=x;if(Array.isArray(h)!==Array.isArray(l))return!1;let C=Object.keys(h),i=Object.keys(l);if(C.length!==i.length)return!1;return C.every((k)=>Z7(h[k],l[k]))}var MC=5000,dC={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:I1}=dC;function R7(y,x=!1){let h=(C,i)=>{if(!(x?!C:C)){let g=new m3(x?`not: ${i}`:i),w=SC(g.stack);if(w){let B=IC(w.line),q=`line ${w.line}`;g.message=B?`${g.message} | ${B} (${q})`:`${g.message} (${q})`}throw g}};return{toBe(C){h(y===C,`Expected ${I1(y)} to be ${I1(C)}`)},toEqual(C){h(Z7(y,C),`Expected ${I1(y)} to equal ${I1(C)}`)},toBeTruthy(){h(!!y,`Expected ${I1(y)} to be truthy`)},toBeFalsy(){h(!y,`Expected ${I1(y)} to be falsy`)},toBeNull(){h(y===null,`Expected ${I1(y)} to be null`)},toBeUndefined(){h(y===void 0,`Expected ${I1(y)} to be undefined`)},toBeDefined(){h(y!==void 0,`Expected ${I1(y)} to be defined`)},toContain(C){if(typeof y==="string")h(y.includes(C),`Expected "${y}" to contain "${C}"`);else if(Array.isArray(y))h(y.includes(C),`Expected array to contain ${I1(C)}`);else throw new m3("toContain requires string or array")},toHaveLength(C){let i=y.length;h(i===C,`Expected length ${i} to be ${C}`)},toMatch(C){h(C.test(y),`Expected "${y}" to match ${C}`)},toBeGreaterThan(C){h(y>C,`Expected ${y} to be greater than ${C}`)},toBeLessThan(C){h(y<C,`Expected ${y} to be less than ${C}`)},toBeInstanceOf(C){h(y instanceof C,`Expected value to be instance of ${C.name}`)},get not(){return R7(y,!x)}}}function E3(y){return R7(y)}function TC(y){return new Promise((x)=>setTimeout(x,y))}function LC(y,x,h=1000){return new Promise((l,C)=>{let i=Date.now(),k=()=>{let g=y.querySelector(x);if(g){l(g);return}if(Date.now()-i>=h){C(Error(`Timeout waiting for "${x}" after ${h}ms`));return}requestAnimationFrame(k)};k()})}function rC(y,x,h){return Promise.race([y,new Promise((l,C)=>setTimeout(()=>C(Error(`Test "${h}" timed out after ${x}ms`)),x))])}function t3(y,x=MC){let h="",l=[];return{pending:l,expect:E3,test(C,i){let k=h?`${h} > ${C}`:C;try{let g=i();if(g instanceof Promise){let w=rC(g,x,k).then(()=>{y.push({name:k,passed:!0})}).catch((B)=>{y.push({name:k,passed:!1,error:B.message})});l.push(w)}else y.push({name:k,passed:!0})}catch(g){y.push({name:k,passed:!1,error:g.message})}},describe(C,i){let k=h;h=h?`${h} > ${C}`:C,i(),h=k}}}async function S4(y,x,h,l){let C=[],i=t3(C),k={preview:x,...h,expect:i.expect,test:i.test,describe:i.describe,waitMs:TC,waitFor:(g,w)=>LC(x,g,w)};try{let g=Y1(y,Object.keys(h)),w=(await l(g,{transforms:["typescript"]})).code,B=Object.keys(k).map((K)=>K.replace(/-/g,"")),q=Object.values(k),j=`${w}
104
- //# sourceURL=inline-test`;s4=w,await new U2(...B,j)(...q)}catch(g){C.push({name:"Test execution",passed:!1,error:g.message})}if(i.pending.length>0)await Promise.all(i.pending);return s4=null,{passed:C.filter((g)=>g.passed).length,failed:C.filter((g)=>!g.passed).length,tests:C}}var{div:N1,tosiSlot:oC,style:nC,button:p0,pre:D7,span:e3}=G,x9="tosijs-ui-tests-enabled",b7=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function uC(){if(typeof localStorage>"u")return!1;let y=localStorage.getItem(x9);if(y!==null)return y==="true";return b7}var{testManager:_1}=t({testManager:{enabled:uC()}});function I4(){document.body.classList.toggle("tests-enabled",_1.enabled.value),document.body.style.setProperty("--tests-enabled",_1.enabled.value?"1":"0")}if(typeof document<"u")if(document.body)I4();else document.addEventListener("DOMContentLoaded",I4);function h9(){localStorage.setItem(x9,"true"),_1.enabled.value=!0,I4(),document.querySelectorAll("tosi-example").forEach((y)=>{y.refresh()})}function l9(){localStorage.setItem(x9,"false"),_1.enabled.value=!1,I4()}class l2 extends F{static preferredTagName="tosi-example";static lightStyleSpec=v7;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?"iframe":"inline"}prefix="lx";storageKey=D4;context={};capturedScope={};uuid=crypto.randomUUID();remoteId="";remoteSync;undoInterval;testResults;pendingValues={};pendingShowDefaultTab=!1;beforeUnloadHandler;editorsBuilt=!1;static insertExamples(y,x={},h){c4(y,x,M4,l2.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 U7(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 K7();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 C=`${(await y(Y1(h.code,Object.keys(this.context)))).code}
101
+ `)}function y9(y,x){let h=[],C=null;for(let l=0;l<x.length;l+=1){let i=x[l];if(!p7.has(i.lang)){C=null;continue}let k=x[l-1];if(C!==null&&k!==void 0&&p7.has(k.lang)&&y.slice(k.end,i.start).trim()===""&&C)C.push(i);else C=[i],h.push(C)}return h}function v7(y,x,h){let C=y9(y,e3(y))[x];if(!C)return null;let l=(w)=>w.replace(/\s+$/,""),i=[],k=(w)=>w==="js"?C.find((B)=>ml.has(B.lang)):C.find((B)=>B.lang===w);for(let w of["js","html","css","test"]){let B=h[w];if(B===void 0)continue;let q=k(w);if(!q)continue;let j=y.slice(q.codeStart,q.codeEnd);if(l(el(j,q.indent))===l(B))continue;i.push({start:q.codeStart,end:q.codeEnd,text:tl(B,q.indent)})}if(i.length===0)return null;i.sort((w,B)=>B.start-w.start);let g=y;for(let w of i)g=g.slice(0,w.start)+w.text+g.slice(w.end);return g}function R7(y,x){return`tosi-example-edit:${y}#${x}`}function D7(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("example-store: save failed",h)}}function H7(y){try{let x=localStorage.getItem(y);return x?JSON.parse(x):null}catch{return null}}function b7(y){try{localStorage.removeItem(y)}catch{}}function S7(y){try{return localStorage.getItem(y)!==null}catch{return!1}}var M7={":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:z.spacing25,boxShadow:"inset 0 0 0 2px #8883",overflow:"hidden"},':host.-locally-edited [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 .hide-if-maximized, :host:not(.-maximize) .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:z.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",left:"5px",bottom:"5px","--widget-color":"var(--brand-color)",borderRadius:"5px",width:"44px",height:"44px",lineHeight:"44px",zIndex:"100"},':host [part="exampleWidgets"] svg':{stroke:"var(--widget-color)"},":host .code-editors":{overflow:"hidden",background:"white",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"},':host [part="testIndicator"]':{position:"absolute",top:"8px",right:"8px",width:"12px",height:"12px",borderRadius:"50%",background:"#888",zIndex:"100",display:"none"},':host.-has-tests [part="testIndicator"]':{display:"block",opacity:"var(--tests-enabled, 1)"},':host.-test-running [part="testIndicator"]':{background:"#fa0",animation:"test-pulse 0.5s ease-in-out infinite"},':host.-test-passed [part="testIndicator"]':{background:"#0a0",animation:"test-fade 2s ease-out forwards"},':host.-test-failed [part="testIndicator"]':{background:"#c00",animation:"test-pulse 1s ease-in-out infinite"},"@keyframes test-pulse":{"0%, 100%":{opacity:"1"},"50%":{opacity:"0.4"}},"@keyframes test-fade":{"0%":{opacity:"1"},"50%":{opacity:"1"},"100%":{opacity:"0"}},':host.-test-passed [part="exampleWidgets"]':{"--widget-color":"#0a0"},':host.-test-failed [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 x9 extends Error{constructor(y){super(y);this.name="AssertionError"}}var yi=/\/(index|module|iife|module\.debug|module\.safe)\.js$/;function xi(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[,l,i,k]=C;if(yi.test(l))continue;return{url:l,line:Number(i),col:Number(k)}}return null}var I4=null;function hi(y){if(!I4||y<1)return null;return I4.split(`
103
+ `)[y-1]?.trim()||null}function I7(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 l=Object.keys(h),i=Object.keys(C);if(l.length!==i.length)return!1;return l.every((k)=>I7(h[k],C[k]))}var Ci=5000,li={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:c1}=li;function c7(y,x=!1){let h=(l,i)=>{if(!(x?!l:l)){let g=new x9(x?`not: ${i}`:i),w=xi(g.stack);if(w){let B=hi(w.line),q=`line ${w.line}`;g.message=B?`${g.message} | ${B} (${q})`:`${g.message} (${q})`}throw g}};return{toBe(l){h(y===l,`Expected ${c1(y)} to be ${c1(l)}`)},toEqual(l){h(I7(y,l),`Expected ${c1(y)} to equal ${c1(l)}`)},toBeTruthy(){h(!!y,`Expected ${c1(y)} to be truthy`)},toBeFalsy(){h(!y,`Expected ${c1(y)} to be falsy`)},toBeNull(){h(y===null,`Expected ${c1(y)} to be null`)},toBeUndefined(){h(y===void 0,`Expected ${c1(y)} to be undefined`)},toBeDefined(){h(y!==void 0,`Expected ${c1(y)} to be defined`)},toContain(l){if(typeof y==="string")h(y.includes(l),`Expected "${y}" to contain "${l}"`);else if(Array.isArray(y))h(y.includes(l),`Expected array to contain ${c1(l)}`);else throw new x9("toContain requires string or array")},toHaveLength(l){let i=y.length;h(i===l,`Expected length ${i} to be ${l}`)},toMatch(l){h(l.test(y),`Expected "${y}" to match ${l}`)},toBeGreaterThan(l){h(y>l,`Expected ${y} to be greater than ${l}`)},toBeLessThan(l){h(y<l,`Expected ${y} to be less than ${l}`)},toBeInstanceOf(l){h(y instanceof l,`Expected value to be instance of ${l.name}`)},get not(){return c7(y,!x)}}}function h9(y){return c7(y)}function ii(y){return new Promise((x)=>setTimeout(x,y))}function ki(y,x,h=1000){return new Promise((C,l)=>{let i=Date.now(),k=()=>{let g=y.querySelector(x);if(g){C(g);return}if(Date.now()-i>=h){l(Error(`Timeout waiting for "${x}" after ${h}ms`));return}requestAnimationFrame(k)};k()})}function gi(y,x,h){return Promise.race([y,new Promise((C,l)=>setTimeout(()=>l(Error(`Test "${h}" timed out after ${x}ms`)),x))])}function C9(y,x=Ci){let h="",C=[];return{pending:C,expect:h9,test(l,i){let k=h?`${h} > ${l}`:l;try{let g=i();if(g instanceof Promise){let w=gi(g,x,k).then(()=>{y.push({name:k,passed:!0})}).catch((B)=>{y.push({name:k,passed:!1,error:B.message})});C.push(w)}else y.push({name:k,passed:!0})}catch(g){y.push({name:k,passed:!1,error:g.message})}},describe(l,i){let k=h;h=h?`${h} > ${l}`:l,i(),h=k}}}async function c4(y,x,h,C){let l=[],i=C9(l),k={preview:x,...h,expect:i.expect,test:i.test,describe:i.describe,waitMs:ii,waitFor:(g,w)=>ki(x,g,w)};try{let g=Y1(y,Object.keys(h)),w=(await C(g,{transforms:["typescript"]})).code,B=Object.keys(k).map((K)=>K.replace(/-/g,"")),q=Object.values(k),j=`${w}
104
+ //# sourceURL=inline-test`;I4=w,await new U2(...B,j)(...q)}catch(g){l.push({name:"Test execution",passed:!1,error:g.message})}if(i.pending.length>0)await Promise.all(i.pending);return I4=null,{passed:l.filter((g)=>g.passed).length,failed:l.filter((g)=>!g.passed).length,tests:l}}var{div:N1,tosiSlot:wi,style:Bi,button:J0,pre:s7,span:l9}=G,k9="tosijs-ui-tests-enabled",d7=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function zi(){if(typeof localStorage>"u")return!1;let y=localStorage.getItem(k9);if(y!==null)return y==="true";return d7}var{testManager:_1}=t({testManager:{enabled:zi()}});function s4(){document.body.classList.toggle("tests-enabled",_1.enabled.value),document.body.style.setProperty("--tests-enabled",_1.enabled.value?"1":"0")}if(typeof document<"u")if(document.body)s4();else document.addEventListener("DOMContentLoaded",s4);function g9(){localStorage.setItem(k9,"true"),_1.enabled.value=!0,s4(),document.querySelectorAll("tosi-example").forEach((y)=>{y.refresh()})}function w9(){localStorage.setItem(k9,"false"),_1.enabled.value=!1,s4()}class l2 extends F{static preferredTagName="tosi-example";static lightStyleSpec=M7;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?"iframe":"inline"}prefix="lx";storageKey=H4;context={};capturedScope={};uuid=crypto.randomUUID();remoteId="";remoteSync;undoInterval;testResults;pendingValues={};pendingShowDefaultTab=!1;beforeUnloadHandler;editorsBuilt=!1;static insertExamples(y,x={},h){M4(y,x,T4,l2.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 $7(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 X7();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 l=`${(await y(Y1(h.code,Object.keys(this.context)))).code}
105
105
  ${x.testUtils}
106
- return ${h.testRunner}`,i={preview:N1({class:"preview"}),...this.context},k=Object.keys(i).map(h2),g=Object.values(i),w=new U2(...k,C);this.lastTjsTests=await w(...g)}catch(l){this.lastTjsTests={passed:0,failed:1,results:[{description:"inline tests failed to run",passed:!1,error:String(l)}]}}this.renderTjsTests()}renderTjsTests(){let y=this.tjsTestsView;if(!y)return;let x=this.lastTjsTests;if(!x||x.results.length===0){y.replaceChildren(N1({class:"tjs-test-empty"},"No inline tjs tests."));return}y.replaceChildren(N1({class:"tjs-test-summary"},`${x.passed}/${x.results.length} passed`),...x.results.map((h)=>N1({class:h.passed?"test-pass":"test-fail"},`${h.passed?"✓":"✗"} ${h.description}`,h.error?e3({class:"tjs-test-error"},` — ${h.error}`):"")))}async computeGeneratedJs(y){if(this.dialect==="js")return"";try{return(await y(Y1(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=n1({name:"JS",mode:"javascript",disabled:!0}),y.append(this.jsOutEditor),this.inlineTjsTestCount>0)this.tjsTestsView=N1({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,l]of Object.entries(this.context))y[h2(h)]=l;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 o1)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,l=x&&x.failed>0;y.hidden=!x||x.tests.length===0||!h&&!l}undo=()=>{let{activeTab:y}=this;if(y instanceof o1)y.undo()};redo=()=>{let{activeTab:y}=this;if(y instanceof o1)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 C=await fetch(`/__docstore/source?file=${encodeURIComponent(y)}`);if(!C.ok)throw Error(String(C.status));h=await C.text()}catch{window.alert("Source endpoint unavailable — saving to source works in dev only.");return}let l=X7(h,Number(x),{js:this.js,html:this.html,css:this.css,test:this.test});if(l===null){let C=Number(x),i=a3(h,f3(h));if(C>=i.length)window.alert(`Couldn't locate this example in ${y}: it's example #${C+1} on the page, but a raw scan of the file finds only ${i.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 C=await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:y,content:l})});if(!C.ok)throw Error(String(C.status));window.alert(`Saved to ${y}`)}catch{window.alert("Save failed.")}};exampleMenu=()=>{let y=_1.enabled.value;o({target:this.parts.exampleWidgets,width:"auto",menuItems:[{icon:"edit2",caption:"view/edit code",action:this.showCode},{icon:"edit",caption:"view/edit code in a new window",action:this.openEditorWindow},null,{icon:this.isMaximized?"minimize":"maximize",caption:this.isMaximized?"restore preview":"maximize preview",action:this.toggleMaximize},null,{icon:y?"check":"",caption:"Run tests",action:()=>{if(y)l9();else h9()}}]})};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=()=>[N1({part:"example"},nC({part:"style"}),N1({part:"testIndicator",title:"test status"}),D7({part:"testResults",hidden:!0}),p0({title:"example menu",part:"exampleWidgets",onClick:this.exampleMenu},O.code())),N1({class:"code-editors",part:"codeEditors",onKeydown:this.handleShortcuts,hidden:!0}),oC({part:"sources",hidden:!0})];buildEditorPanel(){return X0({part:"editors",onChange:this.updateUndo},n1({name:"js",mode:"javascript",part:"js"}),n1({name:"html",mode:"html",part:"html"}),n1({name:"css",mode:"css",part:"css"}),n1({name:"DOM tests",mode:"javascript",part:"test"}),N1({slot:"after-tabs",class:"row"},p0({title:"undo",part:"undo",class:"transparent",onClick:this.undo},O.cornerUpLeft()),p0({title:"redo",part:"redo",class:"transparent",onClick:this.redo},O.cornerUpRight()),p0({title:"example menu — refresh, flip, undo, copy, save/revert edits",class:"transparent source-menu",onClick:this.sourceMenu},O.moreVertical()),p0({title:"close code",class:"transparent",onClick:this.closeCode},O.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 N0(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)}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",l=URL.createObjectURL(new Blob([this.exampleMarkdown()],{type:"text/markdown"})),C=document.createElement("a");C.href=l,C.download=h,C.click(),setTimeout(()=>URL.revokeObjectURL(l),1000)};originalCode=null;localEditKey(){let y=this.getAttribute("data-source-file"),x=this.getAttribute("data-example-ordinal");return y&&x!==null?$7(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 o1&&y.canUndo()}canRedo(){let y=this.activeTab;return y instanceof o1&&y.canRedo()}saveLocalEdit=()=>{let y=this.localEditKey();if(!y){window.alert("This example has no source mapping to key a local save.");return}Y7(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()};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||!J7(y))return;let x=N7(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(),l=this.originalCode!=null;o({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,...l?[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&&b7?[{icon:"upload",caption:"Save to source",action:()=>{this.saveToSource()},enabled:h}]:[],...l?[{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:l}=this;G7(this.prefix,this.uuid,this.storageKey,this.remoteKey,{css:y,html:x,js:h,test:l},{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(D7({class:`language-${x}`,innerHTML:this[x]}))}};refresh=async()=>{if(this.remoteId!=="")return;let y=this.dialect!=="js"&&!_1.enabled.value&&this.compiledJs!==void 0&&this.compiledJsSource===this.js?this.compiledJs:void 0,x=y===void 0?await Y0(this.dialect):void 0,{example:h,style:l,exampleWidgets:C}=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 i,k,g=(q)=>{k=q},w=this.dialect!=="js"&&this.editorsBuilt?this.captureScope:void 0,B=this.effectiveMode;if(B==="iframe"||B==="ide")i=await b4({html:this.html,css:this.css,js:this.js,context:this.context,transform:x,compiledJs:y,exampleElement:h,widgetsElement:C,onError:g,onScope:w});else i=await H4({html:this.html,css:this.css,js:this.js,context:this.context,transform:x,compiledJs:y,exampleElement:h,styleElement:l,widgetsElement:C,onError:g,onScope:w});if(this.persistToDom)this.updateSources();if((this.test||k)&&_1.enabled.value){await new Promise((j)=>requestAnimationFrame(j)),this.classList.add("-has-tests","-test-running"),this.classList.remove("-test-passed","-test-failed");let q=this.dialect==="js"?x:await Y0("js");if(this.testResults=this.test&&i?await S4(this.test,i,this.context,q):{passed:0,failed:0,tests:[]},k)this.testResults.failed+=1,this.testResults.tests.unshift({name:"example loads without error",passed:!1,error:String(k)});this.classList.remove("-test-running"),this.displayTestResults()}else this.classList.remove("-has-tests","-test-running","-test-passed","-test-failed")};displayTestResults(){let{testResults:y,testIndicator:x}=this.parts,h=this.testResults;if(!h||h.tests.length===0){y.hidden=!0,this.classList.remove("-test-passed","-test-failed"),x.title="no tests";return}y.innerHTML="";let l=N1({style:{marginBottom:"8px",fontWeight:"bold"}},`${h.passed}/${h.tests.length} tests passed`);y.append(l);for(let C of h.tests){let i=C.passed?"✓":"✗",k=C.passed?"test-pass":"test-fail",g=N1({class:k},e3(i+" "),C.name,C.error?e3({style:{opacity:"0.7"}},` - ${C.error}`):"");y.append(g)}this.classList.toggle("-test-passed",h.failed===0),this.classList.toggle("-test-failed",h.failed>0),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,...l]=x.innerHTML.split(`
109
- `);if(["js","html","css","test"].includes(h)){let C=l.filter((k)=>k.trim()!=="").map((k)=>k.match(/^\s*/)[0].length).sort()[0],i=(C>0?l.map((k)=>k.substring(C)):l).join(`
110
- `);this.setEditorValue(h,i)}else{let C=["js","html","css","test"].find((i)=>x.matches(`.language-${i}`));if(C)this.setEditorValue(C,C==="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 M4=l2.elementCreator(),y9=new URL(window.location.href).searchParams,H7=y9.get("lx");if(H7){document.title+=" [code editor]",document.body.textContent="";let y=M4({remoteId:H7}),x=y9.get("sf"),h=y9.get("ord");if(x&&h!==null)y.setAttribute("data-source-file",x),y.setAttribute("data-example-ordinal",h);document.body.append(y)}var{slot:c7}=G;class S2 extends F{static preferredTagName="tosi-sidenav";static initAttributes={minSize:800,navSize:200,compact:!1,contentVisible:!1};value="normal";content=[c7({name:"nav",part:"nav"}),c7({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"}};onResize=()=>{let{content:y}=this.parts,x=this.offsetParent;if(x===null)return;let h;if(this.compact=x.offsetWidth<this.minSize,[...this.childNodes].find((C)=>C instanceof Element?C.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.onResize),this.observer=new MutationObserver(this.onResize),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.onResize()}}var fC=S2,J0=S2.elementCreator(),aC=J0,mC=J0;var{div:v0,span:Z0,a:R0,header:EC,button:C9,template:tC,input:eC,h2:yi,details:xi,summary:hi,ul:s7,li:S7}=G,I2={pass:P.testColorPass("#0a0"),fail:P.testColorFail("#c00"),running:P.testColorRunning("#fa0")},li={".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:I2.pass},".doc-link.-test-failed::after":{background:I2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget":{_testBg:I2.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:I2.running,animation:"test-appear 0.3s ease-out, test-pulse 2s ease-in-out 0.3s infinite"},".test-widget.-passed":{_testBg:I2.pass,animation:"test-fade 3s ease-out forwards"},".test-widget.-failed":{_testBg:I2.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}},Ci=0;function i9(y){let{docs:x,context:h={},projectName:l="",projectLinks:C={},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}`:Y3(U(V)),$=()=>{if(_)return w?Q(w):"";return g==="path"?N3(document.location.pathname,K):document.location.search!==""?document.location.search.substring(1).split("&")[0]:""},J=(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 S=(T)=>x.some((E)=>E.filename===T)?T:null,p=W.search.replace(/^\?/,"");if(p!==""&&!p.includes("=")&&!p.includes("&")){let T=S(decodeURIComponent(p));if(T)return T}if(!_&&g!=="query"){let T=S(N3(W.pathname,K));if(T)return T}return null},v=$()||x[0]?.filename||"README.md",d=x.find((V)=>V.filename===v)||x[0],l1=`docBrowser${Ci++}`,N=t({[l1]:{docs:x,currentDoc:d,compact:!1}})[l1],s=()=>{},D={},Z,A1=!1,f1=0,g5=0;if(!_)window.__docTestResults=new Promise((V)=>{Z=V});let I9=(V)=>{let A=D[V],W=N.docs.find((S)=>S.filename===V);if(W)W.testStatus=A?A.passed?"passed":"failed":void 0;s()},$y=()=>{if(g5>=f1&&Z){let V={passed:0,failed:0,pages:D};for(let A of Object.values(D))V.passed+=A.totalPassed,V.failed+=A.totalFailed;if(Z(V),Z=void 0,M9&&!u2)fetch("/report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)}).catch(()=>{})}},M9=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1",Yy=(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},I9(W)},w5=(V)=>{g5++,$y(),j5()};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 Ny=C0(()=>{let V=B5.value.toLocaleLowerCase();N.docs.forEach((A)=>{A.hidden=!A.title.toLocaleLowerCase().includes(V)&&!A.text.toLocaleLowerCase().includes(V)}),O1(N.docs),s(!0)}),B5=eC({slot:"nav",placeholder:"search",type:"search",style:{width:"calc(100% - 10px)",margin:"5px"},onInput:Ny});if(!_)window.addEventListener("popstate",()=>{if(M){if(L0()&&!window.confirm("Discard unsaved changes to the source?")){let V=Y(String(M.doc.filename));window.history.pushState({href:V},"",V);return}q5()}d0($())}),window.addEventListener("beforeunload",(V)=>{if(L0())V.preventDefault(),V.returnValue=""});let F2=null,o2=[C9({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()),Z0({style:{flex:"0 0 10px"}})];if(l)o2.push(R0({href:"/",style:{display:"flex",alignItems:"center",borderBottom:"none"}},C.tosijs?O.tosiUi({style:{_xinIconSize:40,marginRight:10}}):Z0(),yi(l)));o2.push(Z0({class:"elastic"}));let d9=(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(d9(V)));else{let V=[[C.tosijs,"tosi","tosijs"],[C.discord,"discord","discord"],[C.blog,"blog","blog"],[C.github,"github","github"],[C.npm,"npm","npmjs"]];for(let[A,W,S]of V)if(A)o2.push(d9({href:A,label:S,icon:W}))}let k1=j||v0();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 T9=()=>{for(let V of k1.querySelectorAll("a")){let A=J(V);if(A!==null)V.setAttribute("href",Y(A)),V.dataset.docLink=A}},py=()=>{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)})},L9=j!==void 0&&!_,r9=(V)=>{if(L9)L9=!1;else k1.innerHTML=Q0(V.text,{bakes:V.bakes?new Map(V.bakes):void 0});if(T9(),l2.insertExamples(k1,h,V.path||void 0),py(),g==="path")document.title=q7(V,l)},d0=(V)=>{let A=x.find((W)=>W.filename===V)||x[0];N.currentDoc=A,r9(A),s(!0)},T0=(V)=>{if(!Dy())return;if(_)B?.(U(V));else{let A=Y(V);window.history.pushState({href:A},"",A)}d0(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=J(A);if(W===null)return;V.preventDefault(),T0(W)});let Jy=(V)=>V.endsWith(".md")?"markdown":V.endsWith(".css")?"css":V.endsWith(".ts")||V.endsWith(".tjs")?"typescript":"javascript",vy=(V,A)=>{if(A.endsWith(".md"))return V;return(V.match(/\/\*#[\s\S]+?\*\//g)||[]).map((S)=>S.substring(3,S.length-2).trim()).join(`
106
+ return ${h.testRunner}`,i={preview:N1({class:"preview"}),...this.context},k=Object.keys(i).map(C2),g=Object.values(i),w=new U2(...k,l);this.lastTjsTests=await w(...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(N1({class:"tjs-test-empty"},"No inline tjs tests."));return}y.replaceChildren(N1({class:"tjs-test-summary"},`${x.passed}/${x.results.length} passed`),...x.results.map((h)=>N1({class:h.passed?"test-pass":"test-fail"},`${h.passed?"✓":"✗"} ${h.description}`,h.error?l9({class:"tjs-test-error"},` — ${h.error}`):"")))}async computeGeneratedJs(y){if(this.dialect==="js")return"";try{return(await y(Y1(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=n1({name:"JS",mode:"javascript",disabled:!0}),y.append(this.jsOutEditor),this.inlineTjsTestCount>0)this.tjsTestsView=N1({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[C2(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 o1)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 o1)y.undo()};redo=()=>{let{activeTab:y}=this;if(y instanceof o1)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 l=await fetch(`/__docstore/source?file=${encodeURIComponent(y)}`);if(!l.ok)throw Error(String(l.status));h=await l.text()}catch{window.alert("Source endpoint unavailable — saving to source works in dev only.");return}let C=v7(h,Number(x),{js:this.js,html:this.html,css:this.css,test:this.test});if(C===null){let l=Number(x),i=y9(h,e3(h));if(l>=i.length)window.alert(`Couldn't locate this example in ${y}: it's example #${l+1} on the page, but a raw scan of the file finds only ${i.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 l=await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:y,content:C})});if(!l.ok)throw Error(String(l.status));window.alert(`Saved to ${y}`)}catch{window.alert("Save failed.")}};exampleMenu=()=>{let y=_1.enabled.value;n({target:this.parts.exampleWidgets,width:"auto",menuItems:[{icon:"edit2",caption:"view/edit code",action:this.showCode},{icon:"edit",caption:"view/edit code in a new window",action:this.openEditorWindow},null,{icon:this.isMaximized?"minimize":"maximize",caption:this.isMaximized?"restore preview":"maximize preview",action:this.toggleMaximize},null,{icon:y?"check":"",caption:"Run tests",action:()=>{if(y)w9();else g9()}}]})};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=()=>[N1({part:"example"},Bi({part:"style"}),N1({part:"testIndicator",title:"test status"}),s7({part:"testResults",hidden:!0}),J0({title:"example menu",part:"exampleWidgets",onClick:this.exampleMenu},O.code())),N1({class:"code-editors",part:"codeEditors",onKeydown:this.handleShortcuts,hidden:!0}),wi({part:"sources",hidden:!0})];buildEditorPanel(){return X0({part:"editors",onChange:this.updateUndo},n1({name:"js",mode:"javascript",part:"js"}),n1({name:"html",mode:"html",part:"html"}),n1({name:"css",mode:"css",part:"css"}),n1({name:"DOM tests",mode:"javascript",part:"test"}),N1({slot:"after-tabs",class:"row"},J0({title:"undo",part:"undo",class:"transparent",onClick:this.undo},O.cornerUpLeft()),J0({title:"redo",part:"redo",class:"transparent",onClick:this.redo},O.cornerUpRight()),J0({title:"example menu — refresh, flip, undo, copy, save/revert edits",class:"transparent source-menu",onClick:this.sourceMenu},O.moreVertical()),J0({title:"close code",class:"transparent",onClick:this.closeCode},O.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 N0(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)}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"})),l=document.createElement("a");l.href=C,l.download=h,l.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?R7(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 o1&&y.canUndo()}canRedo(){let y=this.activeTab;return y instanceof o1&&y.canRedo()}saveLocalEdit=()=>{let y=this.localEditKey();if(!y){window.alert("This example has no source mapping to key a local save.");return}D7(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(),f3({type:"success",message:"Saved to this browser only — use “Save to source” to write the file."})};revertLocalEdit=()=>{let y=this.localEditKey();if(y)b7(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||!S7(y))return;let x=H7(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;n({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&&d7?[{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;Y7(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"&&!_1.enabled.value&&this.compiledJs!==void 0&&this.compiledJsSource===this.js?this.compiledJs:void 0,x=y===void 0?await Y0(this.dialect):void 0,{example:h,style:C,exampleWidgets:l}=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 i,k,g=(q)=>{k=q},w=this.dialect!=="js"&&this.editorsBuilt?this.captureScope:void 0,B=this.effectiveMode;if(B==="iframe"||B==="ide")i=await S4({html:this.html,css:this.css,js:this.js,context:this.context,transform:x,compiledJs:y,exampleElement:h,widgetsElement:l,onError:g,onScope:w});else i=await b4({html:this.html,css:this.css,js:this.js,context:this.context,transform:x,compiledJs:y,exampleElement:h,styleElement:C,widgetsElement:l,onError:g,onScope:w});if(this.persistToDom)this.updateSources();if((this.test||k)&&_1.enabled.value){await new Promise((j)=>requestAnimationFrame(j)),this.classList.add("-has-tests","-test-running"),this.classList.remove("-test-passed","-test-failed");let q=this.dialect==="js"?x:await Y0("js");if(this.testResults=this.test&&i?await c4(this.test,i,this.context,q):{passed:0,failed:0,tests:[]},k)this.testResults.failed+=1,this.testResults.tests.unshift({name:"example loads without error",passed:!1,error:String(k)});this.classList.remove("-test-running"),this.displayTestResults()}else this.classList.remove("-has-tests","-test-running","-test-passed","-test-failed")};displayTestResults(){let{testResults:y,testIndicator:x}=this.parts,h=this.testResults;if(!h||h.tests.length===0){y.hidden=!0,this.classList.remove("-test-passed","-test-failed"),x.title="no tests";return}y.innerHTML="";let C=N1({style:{marginBottom:"8px",fontWeight:"bold"}},`${h.passed}/${h.tests.length} tests passed`);y.append(C);for(let l of h.tests){let i=l.passed?"✓":"✗",k=l.passed?"test-pass":"test-fail",g=N1({class:k},l9(i+" "),l.name,l.error?l9({style:{opacity:"0.7"}},` - ${l.error}`):"");y.append(g)}this.classList.toggle("-test-passed",h.failed===0),this.classList.toggle("-test-failed",h.failed>0),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 l=C.filter((k)=>k.trim()!=="").map((k)=>k.match(/^\s*/)[0].length).sort()[0],i=(l>0?C.map((k)=>k.substring(l)):C).join(`
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(`
111
111
 
112
- `)},Zy=(V)=>{let A=C.github;if(!A||!V)return null;let W=A.match(/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return W?`https://raw.githubusercontent.com/${W[1]}/${W[2]}/main/${V}`:null},o9=async(V)=>{try{let W=await fetch(`/__docstore/source?file=${encodeURIComponent(V)}`);if(W.ok)return await W.text()}catch{}let A=Zy(V);if(A)try{let W=await fetch(A);if(W.ok)return await W.text()}catch{}return null},Ry=async(V,A)=>{try{return(await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:V,content:A})})).ok}catch{return!1}},z5=(V,A)=>{let W=URL.createObjectURL(new Blob([A],{type:"text/plain"}));R0({href:W,download:V}).click(),setTimeout(()=>URL.revokeObjectURL(W),1000)},M=null,L0=()=>M!==null&&M.editor.value!==M.original,q5=()=>{if(!M)return;M.editor.remove(),M=null,k1.style.display=""},Dy=()=>{if(!M)return!0;if(L0()&&!window.confirm("Discard unsaved changes to the source?"))return!1;return q5(),!0},n2=(V)=>{if(!M)return;if(M.view=V,V==="preview")k1.innerHTML=Q0(vy(M.editor.value,M.doc.path)),T9(),l2.insertExamples(k1,h,M.doc.path||void 0);else if(V==="diff")k1.replaceChildren(w0({original:M.original,modified:M.editor.value,style:{display:"block",width:"100%",height:"100%"}}));k1.style.display=V==="edit"?"none":"",M.editor.style.display=V==="edit"?"block":"none"},Hy=()=>{if(!M)return;let V=String(N.currentDoc.filename);q5(),d0(V)},by=async()=>{if(!M)return;let{doc:V,editor:A}=M;if(await Ry(V.path,A.value))M.original=A.value,n2("preview");else z5(V.path.split("/").pop()||"source.txt",A.value)},cy=async(V)=>{if(M)return;let A=await o9(V.path);if(A===null){window.alert(`Could not load source for ${V.path}`);return}let W=n1({mode:Jy(V.path)});W.style.cssText="display:block; width:100%; height:100%; border:none;",W.value=A,k1.parentElement.append(W),M={editor:W,doc:V,view:"edit",original:A},n2("edit")},sy=(V)=>{let A=x.find((p)=>String(p.filename)===String(N.currentDoc.filename));if(!A)return;let W=(p)=>p.split("/").pop()||p,S=M?[...M.view!=="edit"?[{caption:"Edit",icon:"edit",action:()=>n2("edit")}]:[],...M.view!=="preview"?[{caption:"Preview",icon:"eye",action:()=>n2("preview")}]:[],{caption:"View changes",icon:"code",action:()=>n2("diff"),enabled:()=>L0()},null,{caption:"Save to source",icon:"save",action:()=>void by()},{caption:"Download",icon:"download",action:()=>z5(W(M.doc.path),M.editor.value)},null,{caption:"Close editor",icon:"x",action:Hy}]:[{caption:"Edit page source",icon:"edit",action:()=>void cy(A)},...C.github&&A.path&&A.path!=="README.md"?[{caption:"View on GitHub",icon:"github",action:()=>{window.open(`${C.github}/blob/main/${A.path}`,"_blank")}}]:[],{caption:"Download source",icon:"download",action:()=>void o9(A.path).then((p)=>{if(p!==null)z5(W(A.path),p)})}];o({target:V,position:"sw",menuItems:S})},n9={slot:"nav",class:"doc-nav",style:{display:"flex",flexDirection:"column",width:"100%",height:"calc(100% - 44px)",overflowY:"scroll"}},Sy=g!=="query"?(()=>{let V=$4(x,K),A=new Map,W=[],S=(r)=>{let f=[r.doc.filename];for(let m of r.children)f.push(...S(m));return f},p=(r)=>(f)=>{let m=f.target.closest("tosi-sidenav");if(m)m.contentVisible=!0;T0(String(r.filename)),f.preventDefault();let e=D[r.filename];if(e&&!e.passed)setTimeout(()=>{let Z1=document.querySelector("tosi-example.-test-failed");if(Z1)Z1.scrollIntoView({behavior:"smooth",block:"center"})},100)},T=(r)=>{let f=R0({class:"doc-link",href:Y(r.doc.filename),onClick:p(r.doc)},Q1(r.doc.title));if(r.children.length===0){let Z1=S7(f);return A.set(r.doc.filename,{li:Z1,link:f}),Z1}let m=xi(hi(f),s7(...r.children.map(T))),e=S7(m);return W.push({li:e,el:m,link:f,filename:r.doc.filename,subtree:S(r)}),e},E=v0(n9,s7(...V.map(T))),u=(r,f)=>{if(!f)return!0;let m=x.find((e)=>e.filename===r);return!!m&&(String(m.title).toLocaleLowerCase().includes(f)||String(m.text).toLocaleLowerCase().includes(f))},z1=(r,f,m)=>{r.classList.toggle("current",f===m);let e=D[f];r.classList.toggle("-test-passed",!!e&&e.passed),r.classList.toggle("-test-failed",!!e&&!e.passed)};return s=(r=!1)=>{let f=N.currentDoc,m=f&&f.filename!=null?String(f.filename):"",e=B5.value.trim().toLocaleLowerCase();for(let[Z1,{li:f2,link:V5}]of A)f2.style.display=u(Z1,e)?"":"none",z1(V5,Z1,m);for(let{li:Z1,el:f2,link:V5,filename:m9,subtree:P5}of W){let E9=u(m9,e)||P5.some((t9)=>A.has(t9)&&A.get(t9).li.style.display!=="none");if(Z1.style.display=E9?"":"none",z1(V5,m9,m),e)f2.open=E9;else if(r)f2.open=P5.includes(m);else if(P5.includes(m))f2.open=!0}},s(!0),E})():v0({...n9,bindList:{idPath:"filename",hiddenProp:"hidden",value:N.docs}},tC(R0({class:"doc-link",bindCurrent:`${l1}.currentDoc.filename`,bindDocLink:"^.filename",bindTestStatus:"^.testStatus",onClick(V){let A=q2(V.target),W=V.target.closest("tosi-sidenav");W.contentVisible=!0,T0(String(A.filename)),V.preventDefault()}},Q1({bindText:"^.title"})))),O2=v0({style:{display:"flex",flexDirection:"column",maxWidth:"100vw",height:"100vh",overflow:"hidden"}},EC(...o2),J0({name:"Documentation",navSize:i,minSize:k,style:{flex:"1 1 auto",overflow:"hidden"},onChange(V){if(F2=V.target.closest(S2.tagName),F2)N.compact=F2.compact}},B5,Sy,v0({style:{position:"relative",overflowY:"scroll",height:"100%"}},C9({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(V){let A=V.target.closest(".view-source");if(A)sy(A)},bind:{value:N.currentDoc,binding(V,A){V.style.display=A.path?"flex":"none"}}},O.code({style:{_xinIconSize:16}}),"Source"),k1)));r9(d),W1("test-indicators",li);let g1=C9({class:"test-widget",hidden:!0,onClick:Iy},Z0({part:"label"},"Tests"),Z0({class:"count",part:"count"},"0"));O2.appendChild(g1);let r0=!1;function u9(){r0=!0,g1.hidden=!1,g1.classList.remove("-passed","-failed"),g1.classList.add("-running"),f9()}function f9(){let V=g1.querySelector('[part="label"]'),A=g1.querySelector('[part="count"]'),W=Object.values(D).reduce((p,T)=>p+T.totalPassed,0),S=Object.values(D).reduce((p,T)=>p+T.totalFailed,0);if(V)if(r0)V.textContent="Running";else if(S>0)V.textContent="Failed";else if(W>0)V.textContent="Passed";else V.textContent="Tests";if(A)A.textContent=S>0?String(S):String(W)}function j5(){let V=Object.values(D).reduce((A,W)=>A+W.totalFailed,0);if(r0&&g5>=f1)if(r0=!1,g1.classList.remove("-running"),V>0)g1.classList.add("-failed"),g1.classList.remove("-passed"),g1.hidden=!1;else g1.classList.add("-passed"),g1.classList.remove("-failed"),g1.hidden=!1;f9()}function Iy(){let V=Object.entries(D).filter(([,W])=>!W.passed),A=[];for(let[W,S]of V){let p=x.find((E)=>E.filename===W),T=S.tests.filter((E)=>!E.passed);for(let E of T)A.push({caption:`${p?.title||W}: ${E.name}`,action:()=>{if(N.docs.find((z1)=>String(z1.filename)===W))T0(W),setTimeout(()=>{let z1=document.querySelector("tosi-example.-test-failed");if(z1)z1.scrollIntoView({behavior:"smooth",block:"center"})},100)}})}if(A.length>0)A.push(null);A.push({icon:"copy",caption:"Copy test results to clipboard",action:()=>{let W=My();navigator.clipboard.writeText(W)}}),o({target:g1,menuItems:A})}function My(){let V=["# Test Results",""],A=0,W=0;for(let[S,p]of Object.entries(D)){let E=x.find((u)=>u.filename===S)?.title||S;if(A+=p.totalPassed,W+=p.totalFailed,p.tests.length>0){V.push(`## ${E}`),V.push("");for(let u of p.tests){let z1=u.passed?"✓":"✗",r=u.error?`- ${z1} ${u.name}: ${u.error}`:`- ${z1} ${u.name}`;V.push(r)}V.push("")}}return V.unshift(`**Summary: ${A} passed, ${W} failed**`,""),V.join(`
113
- `)}let dy=new URLSearchParams(window.location.search),u2=!_&&dy.get("_testMode")==="1",o0=u2?$():null;if(O2.addEventListener("testcomplete",(V)=>{if(Yy(V),j5(),u2&&window.parent!==window&&o0){let{results:A}=V.detail;window.parent.postMessage({type:"tosi-test-results",filename:o0,results:A},"*")}}),u2&&o0){let V=()=>{let W=[...O2.querySelectorAll("tosi-example")].filter((p)=>p.classList.contains("-has-tests")),S=W.filter((p)=>p.classList.contains("-test-running"));if(W.length>0&&S.length===0)window.parent.postMessage({type:"tosi-tests-done",filename:o0},"*");else setTimeout(V,100)};setTimeout(V,500)}let Ty=async()=>{if(A1)return;if(!_1.enabled.value)return;if(u2)return;A1=!0;let V=x.filter((p)=>p.text.includes("```test"));if(f1=V.length,f1>0)u9();if(f1===0){if(Z)Z({passed:0,failed:0,pages:{}}),Z=void 0;return}let A=String(N.currentDoc.filename),W=document.createElement("iframe");W.style.cssText="position: fixed; left: -10000px; top: 0; width: 800px; height: 600px; opacity: 0; pointer-events: none;",document.body.appendChild(W);let S=(p)=>{if(p.data?.type!=="tosi-test-results")return;let{filename:T,results:E}=p.data;if(!D[T])D[T]={passed:!0,tests:[],totalPassed:0,totalFailed:0};let u=D[T];u.tests.push(...E.tests),u.totalPassed+=E.passed,u.totalFailed+=E.failed,u.passed=u.totalFailed===0,I9(T),j5()};window.addEventListener("message",S);for(let p of V){if(p.filename===A)continue;W.src=g==="path"?`${window.location.origin}${Y(p.filename)}?_testMode=1`:`${window.location.origin}${window.location.pathname}?${p.filename}&_testMode=1`,await new Promise((T)=>{let E=Date.now()+30000,u=(z1)=>{if(z1.data?.type==="tosi-tests-done"&&z1.data.filename===p.filename)window.removeEventListener("message",u),T()};window.addEventListener("message",u),setTimeout(()=>{window.removeEventListener("message",u),T()},E-Date.now())}),w5(p.filename)}if(window.removeEventListener("message",S),W.remove(),V.some((p)=>p.filename===A))setTimeout(()=>w5(A),1000)},a9=()=>{if(!_1.enabled.value)return;if(M9)setTimeout(Ty,1000);else if(d.text.includes("```test"))f1=1,u9(),setTimeout(()=>w5(d.filename),2000);else if(Z)Z({passed:0,failed:0,pages:{}}),Z=void 0};if(!_)a9(),_1.enabled.observe(a9);if(_)O2.navigate=(V)=>d0(Q(V)||V),Object.defineProperty(O2,"currentSlug",{get:()=>U(String(N.currentDoc.filename))});return O2}var ii=`/* doc-system book stylesheet */
112
+ `)},Iy=(V)=>{let A=l.github;if(!A||!V)return null;let W=A.match(/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return W?`https://raw.githubusercontent.com/${W[1]}/${W[2]}/main/${V}`:null},u9=async(V)=>{try{let W=await fetch(`/__docstore/source?file=${encodeURIComponent(V)}`),H=W.headers.get("content-type")||"";if(W.ok&&!/text\/html/i.test(H))return await W.text()}catch{}let A=Iy(V);if(A)try{let W=await fetch(A);if(W.ok)return await W.text()}catch{}return null},cy=async(V,A)=>{try{return(await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:V,content:A})})).ok}catch{return!1}},q5=(V,A)=>{let W=URL.createObjectURL(new Blob([A],{type:"text/plain"}));R0({href:W,download:V}).click(),setTimeout(()=>URL.revokeObjectURL(W),1000)},s=null,L0=()=>s!==null&&s.editor.value!==s.original,j5=()=>{if(!s)return;s.editor.remove(),s=null,k1.style.display=""},sy=()=>{if(!s)return!0;if(L0()&&!window.confirm("Discard unsaved changes to the source?"))return!1;return j5(),!0},n2=(V)=>{if(!s)return;if(s.view=V,V==="preview")k1.innerHTML=Q0(My(s.editor.value,s.doc.path)),o9(),l2.insertExamples(k1,h,s.doc.path||void 0);else if(V==="diff")k1.replaceChildren(w0({original:s.original,modified:s.editor.value,style:{display:"block",width:"100%",height:"100%"}}));k1.style.display=V==="edit"?"none":"",s.editor.style.display=V==="edit"?"block":"none"},Ty=()=>{if(!s)return;let V=String(N.currentDoc.filename);j5(),T0(V)},dy=async()=>{if(!s)return;let{doc:V,editor:A}=s;if(await cy(V.path,A.value))s.original=A.value,n2("preview");else q5(V.path.split("/").pop()||"source.txt",A.value)},Ly=async(V)=>{if(s)return;let A=await u9(V.path);if(A===null){window.alert(`Could not load source for ${V.path}`);return}let W=n1({mode:Sy(V.path)});W.style.cssText="display:block; width:100%; height:100%; border:none;",W.value=A,k1.parentElement.append(W),s={editor:W,doc:V,view:"edit",original:A},n2("edit")},ry=(V)=>{let A=x.find((J)=>String(J.filename)===String(N.currentDoc.filename));if(!A)return;let W=(J)=>J.split("/").pop()||J,H=s?[...s.view!=="edit"?[{caption:"Edit",icon:"edit",action:()=>n2("edit")}]:[],...s.view!=="preview"?[{caption:"Preview",icon:"eye",action:()=>n2("preview")}]:[],{caption:"View changes",icon:"code",action:()=>n2("diff"),enabled:()=>L0()},null,{caption:"Save to source",icon:"save",action:()=>void dy()},{caption:"Download",icon:"download",action:()=>q5(W(s.doc.path),s.editor.value)},null,{caption:"Close editor",icon:"x",action:Ty}]:[{caption:"Edit page source",icon:"edit",action:()=>void Ly(A)},...l.github&&A.path&&A.path!=="README.md"?[{caption:"View on GitHub",icon:"github",action:()=>{window.open(`${l.github}/blob/main/${A.path}`,"_blank")}}]:[],{caption:"Download source",icon:"download",action:()=>void u9(A.path).then((J)=>{if(J!==null)q5(W(A.path),J)})}];n({target:V,position:"sw",menuItems:H})},E9={slot:"nav",class:"doc-nav",style:{display:"flex",flexDirection:"column",width:"100%",height:"calc(100% - 44px)",overflowY:"scroll"}},oy=g!=="query"?(()=>{let V=Y4(x,K),A=new Map,W=[],H=(o)=>{let u=[o.doc.filename];for(let a of o.children)u.push(...H(a));return u},J=(o)=>(u)=>{let a=u.target.closest("tosi-sidenav");if(a)a.contentVisible=!0;d0(String(o.filename)),u.preventDefault();let e=D[o.filename];if(e&&!e.passed)setTimeout(()=>{let v1=document.querySelector("tosi-example.-test-failed");if(v1)v1.scrollIntoView({behavior:"smooth",block:"center"})},100)},d=(o)=>{let u=R0({class:"doc-link",href:Y(o.doc.filename),onClick:J(o.doc)},Q1(o.doc.title));if(o.children.length===0){let v1=o7(u);return A.set(o.doc.filename,{li:v1,link:u}),v1}let a=Ui(Gi(u),r7(...o.children.map(d))),e=o7(a);return W.push({li:e,el:a,link:u,filename:o.doc.filename,subtree:H(o)}),e},m=p0(E9,r7(...V.map(d))),f=(o,u)=>{if(!u)return!0;let a=x.find((e)=>e.filename===o);return!!a&&(String(a.title).toLocaleLowerCase().includes(u)||String(a.text).toLocaleLowerCase().includes(u))},z1=(o,u,a)=>{o.classList.toggle("current",u===a);let e=D[u];o.classList.toggle("-test-passed",!!e&&e.passed),o.classList.toggle("-test-failed",!!e&&!e.passed)};return I=(o=!1)=>{let u=N.currentDoc,a=u&&u.filename!=null?String(u.filename):"",e=z5.value.trim().toLocaleLowerCase();for(let[v1,{li:u2,link:P5}]of A)u2.style.display=f(v1,e)?"":"none",z1(P5,v1,a);for(let{li:v1,el:u2,link:P5,filename:e9,subtree:_5}of W){let y8=f(e9,e)||_5.some((x8)=>A.has(x8)&&A.get(x8).li.style.display!=="none");if(v1.style.display=y8?"":"none",z1(P5,e9,a),e)u2.open=y8;else if(o)u2.open=_5.includes(a);else if(_5.includes(a))u2.open=!0}},I(!0),m})():p0({...E9,bindList:{idPath:"filename",hiddenProp:"hidden",value:N.docs}},_i(R0({class:"doc-link",bindCurrent:`${C1}.currentDoc.filename`,bindDocLink:"^.filename",bindTestStatus:"^.testStatus",onClick(V){let A=q2(V.target),W=V.target.closest("tosi-sidenav");W.contentVisible=!0,d0(String(A.filename)),V.preventDefault()}},Q1({bindText:"^.title"})))),O2=p0({style:{display:"flex",flexDirection:"column",maxWidth:"100vw",height:"100vh",overflow:"hidden"}},Pi(...o2),Z0({name:"Documentation",navSize:i,minSize:k,style:{flex:"1 1 auto",overflow:"hidden"},onChange(V){if(F2=V.target.closest(I2.tagName),F2)N.compact=F2.compact}},z5,oy,p0({style:{position:"relative",overflowY:"scroll",height:"100%"}},B9({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(V){let A=V.target.closest(".view-source");if(A)ry(A)},bind:{value:N.currentDoc,binding(V,A){V.style.display=A.path?"flex":"none"}}},O.code({style:{_xinIconSize:16}}),"Source"),k1)));f9(T),W1("test-indicators",Fi);let g1=B9({class:"test-widget",hidden:!0,onClick:ny},v0({part:"label"},"Tests"),v0({class:"count",part:"count"},"0"));O2.appendChild(g1);let r0=!1;function a9(){r0=!0,g1.hidden=!1,g1.classList.remove("-passed","-failed"),g1.classList.add("-running"),m9()}function m9(){let V=g1.querySelector('[part="label"]'),A=g1.querySelector('[part="count"]'),W=Object.values(D).reduce((J,d)=>J+d.totalPassed,0),H=Object.values(D).reduce((J,d)=>J+d.totalFailed,0);if(V)if(r0)V.textContent="Running";else if(H>0)V.textContent="Failed";else if(W>0)V.textContent="Passed";else V.textContent="Tests";if(A)A.textContent=H>0?String(H):String(W)}function V5(){let V=Object.values(D).reduce((A,W)=>A+W.totalFailed,0);if(r0&&w5>=u1)if(r0=!1,g1.classList.remove("-running"),V>0)g1.classList.add("-failed"),g1.classList.remove("-passed"),g1.hidden=!1;else g1.classList.add("-passed"),g1.classList.remove("-failed"),g1.hidden=!1;m9()}function ny(){let V=Object.entries(D).filter(([,W])=>!W.passed),A=[];for(let[W,H]of V){let J=x.find((m)=>m.filename===W),d=H.tests.filter((m)=>!m.passed);for(let m of d)A.push({caption:`${J?.title||W}: ${m.name}`,action:()=>{if(N.docs.find((z1)=>String(z1.filename)===W))d0(W),setTimeout(()=>{let z1=document.querySelector("tosi-example.-test-failed");if(z1)z1.scrollIntoView({behavior:"smooth",block:"center"})},100)}})}if(A.length>0)A.push(null);A.push({icon:"copy",caption:"Copy test results to clipboard",action:()=>{let W=fy();navigator.clipboard.writeText(W)}}),n({target:g1,menuItems:A})}function fy(){let V=["# Test Results",""],A=0,W=0;for(let[H,J]of Object.entries(D)){let m=x.find((f)=>f.filename===H)?.title||H;if(A+=J.totalPassed,W+=J.totalFailed,J.tests.length>0){V.push(`## ${m}`),V.push("");for(let f of J.tests){let z1=f.passed?"✓":"✗",o=f.error?`- ${z1} ${f.name}: ${f.error}`:`- ${z1} ${f.name}`;V.push(o)}V.push("")}}return V.unshift(`**Summary: ${A} passed, ${W} failed**`,""),V.join(`
113
+ `)}let uy=new URLSearchParams(window.location.search),f2=!_&&uy.get("_testMode")==="1",o0=f2?$():null;if(O2.addEventListener("testcomplete",(V)=>{if(Dy(V),V5(),f2&&window.parent!==window&&o0){let{results:A}=V.detail;window.parent.postMessage({type:"tosi-test-results",filename:o0,results:A},"*")}}),f2&&o0){let V=()=>{let W=[...O2.querySelectorAll("tosi-example")].filter((J)=>J.classList.contains("-has-tests")),H=W.filter((J)=>J.classList.contains("-test-running"));if(W.length>0&&H.length===0)window.parent.postMessage({type:"tosi-tests-done",filename:o0},"*");else setTimeout(V,100)};setTimeout(V,500)}let Ey=async()=>{if(A1)return;if(!_1.enabled.value)return;if(f2)return;A1=!0;let V=x.filter((J)=>J.text.includes("```test"));if(u1=V.length,u1>0)a9();if(u1===0){if(v)v({passed:0,failed:0,pages:{}}),v=void 0;return}let A=String(N.currentDoc.filename),W=document.createElement("iframe");W.style.cssText="position: fixed; left: -10000px; top: 0; width: 800px; height: 600px; opacity: 0; pointer-events: none;",document.body.appendChild(W);let H=(J)=>{if(J.data?.type!=="tosi-test-results")return;let{filename:d,results:m}=J.data;if(!D[d])D[d]={passed:!0,tests:[],totalPassed:0,totalFailed:0};let f=D[d];f.tests.push(...m.tests),f.totalPassed+=m.passed,f.totalFailed+=m.failed,f.passed=f.totalFailed===0,d9(d),V5()};window.addEventListener("message",H);for(let J of V){if(J.filename===A)continue;W.src=g==="path"?`${window.location.origin}${Y(J.filename)}?_testMode=1`:`${window.location.origin}${window.location.pathname}?${J.filename}&_testMode=1`,await new Promise((d)=>{let m=Date.now()+30000,f=(z1)=>{if(z1.data?.type==="tosi-tests-done"&&z1.data.filename===J.filename)window.removeEventListener("message",f),d()};window.addEventListener("message",f),setTimeout(()=>{window.removeEventListener("message",f),d()},m-Date.now())}),B5(J.filename)}if(window.removeEventListener("message",H),W.remove(),V.some((J)=>J.filename===A))setTimeout(()=>B5(A),1000)},t9=()=>{if(!_1.enabled.value)return;if(L9)setTimeout(Ey,1000);else if(T.text.includes("```test"))u1=1,a9(),setTimeout(()=>B5(T.filename),2000);else if(v)v({passed:0,failed:0,pages:{}}),v=void 0};if(!_)t9(),_1.enabled.observe(t9);if(_)O2.navigate=(V)=>T0(Q(V)||V),Object.defineProperty(O2,"currentSlug",{get:()=>U(String(N.currentDoc.filename))});return O2}var Wi=`/* 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
- `,ki=`
177
+ `,Qi=`
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 k9(y){return y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function d4(y){return y.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function gi(y){return y.replace(/<!--\{[\s\S]*?\}-->\s*/g,"")}function I7(y){let x=[];for(let h of y)x.push(h),x.push(...I7(h.children));return x}function M7(y){return y.map((x)=>`<li><a href="#${d4(x.doc.filename)}">${k9(x.doc.title)}</a>${x.children.length?`<ol>${M7(x.children)}</ol>`:""}</li>`).join("")}function d7(y,x){let h=y.filter((g)=>!g.hidden),l=b2(h),C=$4(h,l),i=x.css??`${ii}
187
- ${ki}`,k=I7(C).map((g)=>`<section class="chapter" id="${d4(g.doc.filename)}">
188
- ${Q0(gi(g.doc.text))}
186
+ `;function q9(y){return y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function d4(y){return y.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Xi(y){return y.replace(/<!--\{[\s\S]*?\}-->\s*/g,"")}function n7(y){let x=[];for(let h of y)x.push(h),x.push(...n7(h.children));return x}function f7(y){return y.map((x)=>`<li><a href="#${d4(x.doc.filename)}">${q9(x.doc.title)}</a>${x.children.length?`<ol>${f7(x.children)}</ol>`:""}</li>`).join("")}function u7(y,x){let h=y.filter((g)=>!g.hidden),C=b2(h),l=Y4(h,C),i=x.css??`${Wi}
187
+ ${Qi}`,k=n7(l).map((g)=>`<section class="chapter" id="${d4(g.doc.filename)}">
188
+ ${Q0(Xi(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>${k9(x.title)}</title>
194
+ <title>${q9(x.title)}</title>
195
195
  <style>${i}</style>
196
196
  </head>
197
197
  <body>
198
- <h1 class="book-title">${k9(x.title)}</h1>
199
- <nav class="book-toc"><h2>Contents</h2><ol>${M7(C)}</ol></nav>
198
+ <h1 class="book-title">${q9(x.title)}</h1>
199
+ <nav class="book-toc"><h2>Contents</h2><ol>${f7(l)}</ol></nav>
200
200
  ${k}
201
201
  ${x.autoPrint?'<script>addEventListener("load",function(){setTimeout(function(){print()},300)})</script>':""}
202
202
  </body>
203
- </html>`}var T7=200,wi=600;function Bi(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 L7(y={}){let x=Bi(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,_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: ${wi}px)`]:{"tosi-doc-system:not(:defined)":{left:`${T7}px`},"tosi-doc-system:not(:defined) .doc-nav":{display:"block",position:"fixed",left:"0",top:z.headerHeight,bottom:"0",width:`${T7}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:zi,slot:g9,tosiSlot:r7,label:qi,input:ji,span:Vi}=G;function C2(y,x,h){if(h!==""&&h!==!1)y.setAttribute(x,h);else y.removeAttribute(x)}function Pi(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 o7(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 T4 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=qi(r7({part:"caption"}),Vi({part:"field"},r7({part:"input",name:"input"}),ji({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=Pi(h),this.valueChanged=!0;let l=this.closest("tosi-form");if(l&&this.key!=="")switch(this.type){case"checkbox":l.fields[this.key]=h.checked;break;case"number":case"range":if(this.fixedPrecision>-1)h.value=Number(h.value).toFixed(this.fixedPrecision),l.fields[this.key]=Number(h.value);else l.fields[this.key]=Number(h.value);break;default:l.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:l}=this.parts;if(x.textContent?.trim()==="")x.append(this.caption!==""?this.caption:this.key);if(this.type==="text"){y.textContent="";let C=G.textarea({value:this.value});if(this.placeholder)C.setAttribute("placeholder",this.placeholder);y.append(C)}else if(this.type==="color")y.textContent="",y.append(w3({value:this.value}));else if(y.children.length===0){if(C2(h,"placeholder",this.placeholder),C2(h,"type",this.type),C2(h,"pattern",this.pattern),C2(h,"min",this.min),C2(h,"max",this.max),this.step)C2(h,"step",this.step);else if(this.fixedPrecision>0&&this.type==="number")C2(h,"step",Math.pow(10,-this.fixedPrecision))}if(o7(h,this.value),o7(y.children[0],this.value),this.prefix)l.setAttribute("prefix",this.prefix);else l.removeAttribute("prefix");if(this.suffix)l.setAttribute("suffix",this.suffix);else l.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":"",C2(h,"required",!this.optional)}}class L4 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=[g9({part:"header",name:"header"}),zi({part:"form"},g9({part:"content"})),g9({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,l){return h[l]},set(h,l,C){if(h[l]!==C){h[l]=C;let i=y(l);if(i)i.value=C;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 l=h.getAttribute("name")||h.getAttribute("key");if(!l)continue;if(y[l]===void 0){let C=h.value??h.getAttribute("value");if(C!=null)y[l]=C}}}initializeNamedElements(){let y=this.fields,x=this.querySelectorAll("[name], [key]");for(let h of x){let l=h.getAttribute("name")||h.getAttribute("key");if(!l)continue;if(y[l]!==void 0)h.value=y[l]}}}var _i=T4,Ai=L4,r4=T4.elementCreator(),o4=L4.elementCreator(),Ki=r4,Ui=o4;var{h2:Gi,code:Fi}=G,Oi=/^(#[0-9a-f]{3,8}|(?:rgb|hsl)a?\([^)]*\))$/i;class n7 extends F{static preferredTagName="tosi-css-var-editor";static initAttributes={elementSelector:"",targetSelector:""};content=()=>[Gi({part:"title"},"CSS variables"),o4({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 l=h.shadowRoot?h.shadowRoot.querySelector("style"):document.querySelector(`style#${this.elementSelector}-component`);if(!l||!l.textContent)return;let C=getComputedStyle(h),i=[...new Set(l.textContent.match(/--[\w-]+/g)??[])];for(let k of i){let g=C.getPropertyValue(k).trim(),w=Oi.test(g)?"color":"string";if(w==="color")g=X.fromCss(g).html;x.append(r4(Fi(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 l of x)for(let C of Object.keys(h))l.style.setProperty(C,h[C])};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 $z=n7.elementCreator();var{button:Wi,div:Qi}=G,u7="tosi-doc-system-prefs";class w9 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",L7({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(u7,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(u7)||"{}")}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(z3(y),this.prefs.locale.value)A4(this.prefs.locale.value)}catch(y){console.warn("<tosi-doc-system> could not load localization from",this.localized,y)}}settingsButton(){return Wi({class:"iconic",style:{color:z.linkColor},title:"settings",onClick:(y)=>{let x=[],h="";try{h=JSON.parse(this.config||"{}").projectName||""}catch{}let l=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(d7(this.corpus,{title:l,autoPrint:!0})),i.document.close()}}),x.push({caption:"Download ePub",icon:"book",action:()=>{let i=document.createElement("a");i.href=`/${d4(l)}.epub`,i.download="",i.click()}}),x.push(null);let C=n.localeOptions.value||[];if(C.length>1)x.push({caption:"Language",icon:"globe",menuItems:C.map((i)=>({caption:i.caption,icon:i.icon,checked:()=>i.value===n.locale.value,action:()=>{this.prefs.locale.value=i.value,A4(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}]}),o({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(Qi({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=n6(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",l=this.querySelector(".doc-content")||void 0,C=this.parseLinks(".doc-navbar");if(this.appliedRoute=this.route,this.browser=i9({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:C.length?C:void 0,contentElement:l}),!x){let i=this.browser.querySelector("header");if(i)i.append(this.settingsButton())}this.replaceChildren(this.browser)}}var Xi=w9.elementCreator();function $i(){if(typeof document>"u")return;let y=globalThis.__TOSI_IMPORT_RESOLVER;if(!y)return;import("./tjs-import-resolver-akt3k27z.js").then(({registerImportResolver:x})=>x(y)).catch((x)=>console.warn("import-resolver: registration failed",x))}$i();var{div:p1,slot:Yi}=G;class J1 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}=J1;return J1.snapToGrid||y.shiftKey?x.map((l)=>Math.round(l/h)*h):x}static snappedAngle(y,x){let{angleSize:h}=J1;return J1.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,l=y.style.bottom.match(/\d/)!==null,C=!l||y.style.top.match(/\d/)!==null;return{left:h,top:C,bottom:l,right:x}}set locked(y){let{bottom:x,right:h}=y,{left:l,top:C}=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)l=!0;if(!x)C=!0;if(l)i.style.left=k+"px";if(h)i.style.right=q+"px";if(l&&h)i.style.width="auto";else i.style.width=w+"px";if(C)i.style.top=g+"px";if(x)i.style.bottom=j+"px";if(C&&x)i.style.height="auto";else i.style.height=B+"px";this.queueRender()}get coords(){let{top:y,left:x,right:h,bottom:l}=this.parentElement.style;return{top:parseFloat(y),left:parseFloat(x),right:parseFloat(h),bottom:parseFloat(l)}}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:l,left:C,bottom:i,right:k}=this.coords;P1(y,(g,w,B)=>{if([g,w]=J1.snappedCoords(B,[g,w]),!isNaN(l))h.style.top=l+w+"px";if(!isNaN(i))h.style.bottom=i-w+"px";if(!isNaN(C))h.style.left=C+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[l,C]=[this.right,this.bottom];P1(y,(i,k,g)=>{let w=l-i,B=C-k;if([w,B]=J1.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,l=y.target.getAttribute("part");this.locked=Object.assign({left:!0,right:!0,top:!0,bottom:!0});let C=this[l];P1(y,(i,k,g)=>{let[w]=J1.snappedCoords(g,[C+(["left","right"].includes(l)?i:k)*(["right","bottom"].includes(l)?-1:1)]);if(x.style[l]=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,(l,C,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=J1.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=()=>[p1({part:"move",style:{top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},O.move()),p1({part:"left",title:"resize left",class:"drag-size",style:{left:"-6px",width:"8px"}}),p1({part:"right",title:"resize right",class:"drag-size",style:{left:"calc(100% - 2px)",width:"8px"}}),p1({part:"top",title:"resize top",class:"drag-size",style:{top:"-6px",height:"8px",cursor:"ns-resize"}}),p1({part:"bottom",title:"resize bottom",class:"drag-size",style:{top:"calc(100% - 2px)",height:"8px",cursor:"ns-resize"}}),p1({part:"resize",style:{top:"100%",left:"100%"}},O.resize()),p1({part:"rotate",style:{top:"50%",right:"0"}},O.refreshCw()),p1({part:"lockLeft",title:"lock left",style:{top:"50%",left:0,transform:"translate(-100%, -50%)"}},O.unlock(),O.lock()),p1({part:"lockRight",title:"lock right",style:{top:"50%",left:"100%",transform:"translate(0%, -50%)"}},O.unlock(),O.lock()),p1({part:"lockTop",title:"lock top",style:{top:0,left:"50%",transform:"translate(-50%, -100%)"}},O.unlock(),O.lock()),p1({part:"lockBottom",title:"lock bottom",style:{top:"100%",left:"50%",transform:"translate(-50%, 0%)"}},O.unlock(),O.lock()),Yi()];connectedCallback(){super.connectedCallback();let{left:y,right:x,top:h,bottom:l,lockLeft:C,lockRight:i,lockTop:k,lockBottom:g,move:w,resize:B,rotate:q}=this.parts,j={passive:!0};[y,x,h,l].forEach((_)=>{_.addEventListener("mousedown",this.adjustSize,j),_.addEventListener("touchstart",this.adjustSize,j)}),[C,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:l}=this.parts,{left:C,right:i,top:k,bottom:g}=this.locked;y.toggleAttribute("locked",C),x.toggleAttribute("locked",i),h.toggleAttribute("locked",k),l.toggleAttribute("locked",g)}}var Ni=J1.elementCreator();var{div:pi,input:Ji,button:B9,span:vi}=G,f7=(y)=>y,a7="null filter, everything matches",z9={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((l)=>!h.includes(l))===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((l)=>h.includes(l))===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}},Zi={description:"anything",test:()=>!0};function m7(y){return y.options[y.selectedIndex]?.caption||""}class q9 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=z9;content=()=>[G1({part:"haystack"}),G1({part:"condition"}),Ji({part:"needle",type:"search"}),vi({part:"padding"}),B9({part:"remove",title:"delete"},O.trash())];filter=Zi;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,l=x.value.startsWith("~"),C=l?x.value.slice(1):x.value,i=this.filters[C];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=l?(j)=>!k(j[g]):(j)=>k(j[g]);else w=l?(j)=>Object.values(j).find((_)=>!k(_))!==void 0:(j)=>Object.values(j).find((_)=>k(_))!==void 0;let B=i.needsValue!==!1?` "${h.value}"`:"",q=`${m7(y)} ${m7(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:l}=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,l.addEventListener("click",()=>{let{parentElement:C}=this;this.remove(),C?.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((l)=>l.prop)],x.options=Object.keys(this.filters).map((l)=>{let C=this.filters[l];return C.negative!==void 0?[{caption:C.caption,value:l},{caption:C.negative,value:"~"+l}]:{caption:C.caption,value:l}}).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 j9 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:l}=this.parts;l.textContent="";for(let C of y)l.append(n4({fields:x,filters:h,...C}))}filter=f7;description=a7;addFilter=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;h.append(n4({fields:y,filters:x}))};content=()=>[B9({part:"add",title:"add filter condition",onClick:this.addFilter,class:"round"},O.plus()),pi({part:"filterContainer"}),B9({part:"reset",title:"reset filter",onClick:this.reset},O.x())];filters=z9;reset=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;this.description=a7,this.filter=f7,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((l)=>l.filter),h=x.map((l)=>l.test);this.description=x.map((l)=>l.description).join(", "),this.filter=(l)=>l.filter((C)=>h.find((i)=>i(C)===!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 Ri=j9.elementCreator();var{a:Di}=G;class V9 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 Hi=V9.elementCreator(),E7={tosijs:()=>O.tosi(),discord:()=>O.discord(),blog:()=>O.blog(),github:()=>O.github(),npm:()=>O.npm()};class P9 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||!E7[x])continue;y.push(Di({title:x,target:"_blank",href:h},E7[x]()))}this.replaceChildren(...y)}}var bi=P9.elementCreator();function t7(){return navigator.getGamepads().filter((x)=>x!==null).map((x)=>{let{id:h,axes:l,buttons:C}=x;return{id:h,axes:l,buttons:C.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 ci(){let y=t7();return y.length===0?"no active gamepads":y.map(({id:x,axes:h,buttons:l})=>{let C=h.map((k)=>k.toFixed(2)).join(" "),i=Object.keys(l).map((k)=>`[${k}](${l[Number(k)].toFixed(2)})`).join(" ");return`${x}
204
- ${C}
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
+ ${l}
205
205
  ${i}`}).join(`
206
- `)}function si(y){let x={};return y.input.onControllerAddedObservable.add((h)=>{h.onMotionControllerInitObservable.add((l)=>{let C={};l.getComponentIds().forEach((k)=>{let g=l.getComponent(k);if(C[k]={pressed:g.pressed,touched:g.touched,value:g.value,axes:{x:g.axes.x,y:g.axes.y}},g.onButtonStateChangedObservable.add((w)=>{C[k].pressed=w.pressed,C[k].touched=w.touched,C[k].value=w.value}),g.onAxisValueChangedObservable)g.onAxisValueChangedObservable.add((w)=>{C[k].axes={x:w.x,y:w.y}})}),x[l.handedness]=C})}),x}function Si(y){if(y===void 0||Object.keys(y).length===0)return"no xr inputs";return Object.keys(y).map((x)=>{let h=y[x],l=[];for(let[C,i]of Object.entries(h)){let k=[];if(i.pressed)k.push("P");if(i.touched)k.push("T");let g=i.value>0,w=i.axes.x!==0||i.axes.y!==0;if(k.length>0||g||w){let B=`${C}[${k.join("")}]`;if(g)B+=` v:${i.value.toFixed(2)}`;if(w)B+=` x:${i.axes.x.toFixed(2)} y:${i.axes.y.toFixed(2)}`;l.push(B)}}return`${x}
207
- ${l.join(`
206
+ `)}function yk(y){let x={};return y.input.onControllerAddedObservable.add((h)=>{h.onMotionControllerInitObservable.add((C)=>{let l={};C.getComponentIds().forEach((k)=>{let g=C.getComponent(k);if(l[k]={pressed:g.pressed,touched:g.touched,value:g.value,axes:{x:g.axes.x,y:g.axes.y}},g.onButtonStateChangedObservable.add((w)=>{l[k].pressed=w.pressed,l[k].touched=w.touched,l[k].value=w.value}),g.onAxisValueChangedObservable)g.onAxisValueChangedObservable.add((w)=>{l[k].axes={x:w.x,y:w.y}})}),x[C.handedness]=l})}),x}function xk(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[l,i]of Object.entries(h)){let k=[];if(i.pressed)k.push("P");if(i.touched)k.push("T");let g=i.value>0,w=i.axes.x!==0||i.axes.y!==0;if(k.length>0||g||w){let B=`${l}[${k.join("")}]`;if(g)B+=` v:${i.value.toFixed(2)}`;if(w)B+=` x:${i.axes.x.toFixed(2)} y:${i.axes.y.toFixed(2)}`;C.push(B)}}return`${x}
207
+ ${C.join(`
208
208
  `)||"(idle)"}`}).join(`
209
- `)}var{slot:_9}=G;class A9 extends F{static preferredTagName="tosi-row";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[_9()];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 Ii=A9.elementCreator();class K9 extends F{static preferredTagName="tosi-column";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[_9()];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 Mi=K9.elementCreator();class U9 extends F{static preferredTagName="tosi-grid";static initAttributes={columns:"",rows:"",gap:""};content=[_9()];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 di=U9.elementCreator(),{span:e7}=G,Ti=(...y)=>e7({style:{flex:"1 1 var(--tosi-space, 0.5em)"}},...y),G9=(...y)=>e7({style:{flex:"0 0 var(--tosi-space, 0.5em)"}},...y);var M1={accent:X.fromCss("#EE257B"),background:X.fromCss("#fafafa"),text:X.fromCss("#222222")},yy={_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 xy(y){let{accent:x,background:h,text:l}=y,C=y.accentText??x.contrasting(),i=y.backgroundInset??h.darken(0.03),k=y.border??l.opacity(0.15),g=y.shadow??l.opacity(0.1),w=y.focus??x.opacity(0.5);return{_tosiAccent:x,_tosiAccentLight:x.brighten(0.15),_tosiAccentDark:x.darken(0.15),_tosiAccentText:C,_tosiBg:h,_tosiBgInset:i,_tosiBgHover:h.darken(0.05),_tosiBgActive:h.darken(0.1),_tosiText:l,_tosiTextMuted:l.opacity(0.6),_tosiTextDisabled:l.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:l,_tosiButtonBorder:k,_tosiButtonHoverBg:h.darken(0.05),_tosiButtonActiveBg:x,_tosiButtonActiveText:C}}function M2(y){return{":root":{...yy,...xy(y)}}}function u4(y){let h=M2(y)[":root"];return{":root":i0(h)}}function F9(y,x="tosi-theme"){W1(x,y)}var Li=M2(M1),ri=u4(M1),hy={"--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 oi(y){return{":root":{...M2(y)[":root"],...hy}}}function ni(y,x){let h={};for(let[l,C]of Object.entries(x)){let i=`--tosi-${y}-${l.replace(/([A-Z])/g,"-$1").toLowerCase()}`;h[l]=`var(${i}, ${C})`}return h}var{div:d2,label:f4,input:a4,span:ui,button:ly}=G,{liveTheme:L}=t({liveTheme:{accent:String(M1.accent),background:String(M1.background),text:String(M1.text),dark:!1}}),m4=!1;function D0(){if(!m4)return;let y={accent:X.fromCss(L.accent.value),background:X.fromCss(L.background.value),text:X.fromCss(L.text.value)},x=L.dark.value?u4(y):M2(y);F9(x,"tosi-live-theme")}function Cy(){if(m4)return;m4=!0,L.accent.observe(D0),L.background.observe(D0),L.text.observe(D0),L.dark.observe(D0),D0()}function fi(){m4=!1}class O9 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=()=>[d2({class:"field"},f4("Accent"),a4({type:"color",part:"accent"})),d2({class:"field"},f4("Background"),a4({type:"color",part:"background"})),d2({class:"field"},f4("Text"),a4({type:"color",part:"text"})),d2({class:"field"},f4("Dark mode"),a4({type:"checkbox",part:"dark"})),d2({class:"preview",part:"preview",style:{background:"var(--tosi-bg, #fafafa)",color:"var(--tosi-text, #222)"}},ui("Preview "),ly({class:"preview-button",style:{background:"var(--tosi-accent, #EE257B)",color:"var(--tosi-accent-text, white)"}},"Button")),d2({class:"actions"},ly({part:"reset"},"Reset"))];connectedCallback(){super.connectedCallback(),Cy();let y=()=>{this.parts.accent.value=L.accent.value,this.parts.background.value=L.background.value,this.parts.text.value=L.text.value,this.parts.dark.checked=L.dark.value};y(),L.accent.observe(y),L.background.observe(y),L.text.observe(y),L.dark.observe(y),this.parts.accent.addEventListener("input",()=>{L.accent.value=this.parts.accent.value}),this.parts.background.addEventListener("input",()=>{L.background.value=this.parts.background.value}),this.parts.text.addEventListener("input",()=>{L.text.value=this.parts.text.value}),this.parts.dark.addEventListener("change",()=>{L.dark.value=this.parts.dark.checked}),this.parts.reset.addEventListener("click",()=>{L.accent.value=String(M1.accent),L.background.value=String(M1.background),L.text.value=String(M1.text),L.dark.value=!1})}}var ai=O9.elementCreator();var{div:mi}=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=mi({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,l]=this.coords.split(",").map((C)=>Number(C));this._map.setCenter([h,x]),this._map.setZoom(l),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,l,C]=this.coords.split(",").map((i)=>Number(i));x.accessToken=this.token,this._map=new x.Map({container:y,style:this.mapStyle,zoom:C,center:[l,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 Ei=G2.elementCreator();function iy(y,x){if(x==null)x="";else if(typeof x!=="string")x=String(x);return x.replace(/\{\{([^}]+)\}\}/g,(h,l)=>{let C=C1[`${y}${l.startsWith("[")?l:"."+l}`];return C===void 0?h:iy(y,String(C))})}class E4 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(),C1[this.instanceId]=typeof this.context==="string"?JSON.parse(this.context):this.context;let y=iy(this.instanceId,this.value);if(this.elements){let x=y.split(`
210
- `).reduce((h,l)=>{if(l.startsWith("<")||h.length===0)h.push(l);else{let C=h[h.length-1];if(!C.startsWith("<")||!C.endsWith(">"))h[h.length-1]+=`
211
- `+l;else h.push(l)}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 ti=E4,W9=E4.elementCreator(),ei=W9,yk=W9;var{div:Q9,span:t4,button:X9}=G,H0=86400000,xk=[0,1,2,3,4,5,6],hk=[1,2,3,4,5,6,7,8,9,10,11,12],$9=(y,x=2,h="0")=>String(y).padStart(x,h),b0=(y,x,h)=>new Date(`${y}-${$9(x)}-${$9(h)}`);class Y9 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 hk.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 l=y;l<=x;l++)h.push(String(l));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}-${$9(this.month)}-`),action:()=>{this.gotoDate(y)}}};jumpMenu=()=>{o({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=()=>[Q9({part:"header"},X9({part:"previous",onClick:this.previousMonth},O.chevronLeft()),t4({style:{flex:"1"}}),X9({part:"jump",onClick:this.jumpMenu},O.calendar()),G1({part:"month",options:this.months,onChange:this.setMonth}),G1({part:"year",options:[this.year],onChange:this.setMonth}),t4({style:{flex:"1"}}),X9({part:"next",onClick:this.nextMonth},O.chevronRight())),Q9({part:"week"}),Q9({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:l,year:C,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),_=xk.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 J=new Date($),v=J.toISOString().split("T")[0];this.days.push({date:J,selected:!1,inMonth:J.getMonth()+1===this.month,isToday:v===K,isWeekend:J.getDay()%6===0,inRange:!!(this.from&&v>=this.from&&v<=this.to)})}l.value=String(this.month),C.value=String(this.year),l.disabled=C.disabled=h.disabled=i.disabled=k.disabled=this.disabled||this.readonly,C.options=this.years,y.textContent="",y.append(..._.map(($)=>t4({class:"day"},$))),x.textContent="";let U=null,{to:Q,from:Y}=this;x.append(...this.days.map(($)=>{let J=["date"];if($.inMonth)J.push("in-month");if($.isToday)J.push("today");let v=$.date.toISOString().split("T")[0];if(this.checkDay(v))J.push("checked");if(J.push($.isWeekend?"weekend":"weekday"),this.range){if(Q===v)J.push("range-end");if(Y===v)J.push("range-start")}let d=t4({class:J.join(" "),title:v,onClick:this.clickDate,onKeydown:this.keyDate,tabindex:"0"},$.date.getDate());if(v===this.#y)U=d;return d})),U?.focus()}}var lk=Y9.elementCreator();var{div:N9,button:Ck}=G,ik={error:"red",warn:"orange",info:"royalblue",log:"gray",success:"green",progress:"royalblue"};class i2 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:l,close:C,progress:i,icon:k,color:g}=Object.assign({type:"info",duration:-1},typeof y==="string"?{message:y}:y);if(!this.singleton)this.singleton=p9();let w=this.singleton;document.body.append(w),w.style.zIndex=String(P2()+1);let B=g||ik[l],q=i||l==="progress"?G.progress():{},j=()=>{if(C)C();i2.removeNote(U)},_=k instanceof SVGElement?k:k?O[k]():O.info(),K=l==="error"||l==="warn",U=N9({class:`note ${l}`,role:K?"alert":"status",ariaLive:K?"assertive":"polite",style:{_notificationAccentColor:B}},_,N9({class:"message"},N9(x),q),Ck({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)i2.removeNote(U)},1000)}if(h>0)setTimeout(()=>{i2.removeNote(U)},h*1000);return U.scrollIntoView(),j}content=null}var kk=i2,p9=i2.elementCreator(),gk=p9;function wk(y){return i2.post(y)}var ky=async(y,x="SHA-1")=>{let l=new TextEncoder().encode(y),C=await crypto.subtle.digest(x,l);return Array.from(new Uint8Array(C)).map((g)=>g.toString(16).padStart(2,"0")).join("")},gy=async(y)=>{let x=await ky(y),h=await fetch(`https://weakpass.com/api/v1/search/${x}`);if(h.ok){let l=await h.json();console.log("password found in weakpass database",l)}return h.status!==404},{span:J9,tosiSlot:Bk}=G;class e4 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 gy(y)}updateIndicator=(y)=>{let{level:x,description:h}=this.parts,l=this.indicatorColors.split(","),C=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",l[i]),this.style.setProperty("--description-color",C[i]),h.textContent=this.strengthDescriptions[i]};update=(y)=>{let x=y.target.closest("input");this.updateIndicator(x?.value||"")};content=()=>[Bk({onInput:this.update}),J9({part:"meter"},J9({part:"level"}),J9({part:"description"}))];render(){super.render();let y=this.querySelector("input");this.updateIndicator(y?.value)}}var zk=e4,wy=e4.elementCreator(),qk=wy;var{span:v9}=G;class y5 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=()=>v9({part:"container"},v9({part:"empty"}),v9({part:"filled"}));displayValue(y){let{empty:x,filled:h}=this.parts,C=Math.round((typeof y==="string"?0:y||0)/this.step)*this.step;h.style.width=C/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,l=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=l;else if(y.type==="mousemove")this.displayValue(l);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 l=0;l<this.max;l++)x.append(O[this.icon]()),h.append(O[this.icon]())}this.displayValue(this.value)}}var jk=y5,By=y5.elementCreator(),Vk=B1((...y)=>By(...y),"xinRating is deprecated, use tosiRating instead (tag is now <tosi-rating>)");var{tosiSlot:zy,div:Pk,button:_k}=G,Ak=[{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 Z9(y=Ak){return G1({title:"paragraph style",slot:"toolbar",class:"block-style",options:y.map(({caption:x,tagType:h})=>({caption:x,value:`formatBlock,${h}`}))})}var c0=()=>G9({slot:"toolbar"});function v1(y,x,h){return _k({slot:"toolbar",dataCommand:x,title:y},h)}var Kk=()=>[v1("left-justify","justifyLeft",O.alignLeft()),v1("center","justifyCenter",O.alignCenter()),v1("right-justify","justifyRight",O.alignRight()),c0(),v1("bullet list","insertUnorderedList",O.listBullet()),v1("numbered list","insertOrderedList",O.listNumber()),c0(),v1("indent","indent",O.indent()),v1("indent","outdent",O.outdent())],qy=()=>[v1("bold","bold",O.fontBold()),v1("italic","italic",O.fontItalic()),v1("underline","underline",O.fontUnderline())],Uk=()=>[Z9(),c0(),...qy()],jy=()=>[Z9(),c0(),...Kk(),c0(),...qy()];class x5 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 l=0;l<x.rangeCount;l++){let C=x.getRangeAt(l);if(!y.contains(C.commonAncestorContainer))continue;let i=this.blockElement(C.startContainer),k=this.blockElement(C.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(c1.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=[zy({name:"toolbar",part:"toolbar",onClick:this.handleButtonClick,onChange:this.handleSelectChange}),Pk({part:"doc",contenteditable:!0,style:{flex:"1 1 auto",outline:"none"}}),zy({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(...Uk());break;case"default":y.append(...jy());break}}}var Gk=x5,Vy=x5.elementCreator(),Fk=B1((...y)=>Vy(...y),"richText is deprecated, use tosiRichText instead (tag is now <tosi-rich-text>)");var{router:s0}=t({router:{path:"",hash:"",pattern:""}}),R9={};function Ok(){return{...R9}}var h5=[],D9=!1,l5=new Set;function Wk(y){let x=[];if(y==="")return{regex:/^\/?$/,paramNames:x};let h=y.split("/").map((C)=>{if(C.startsWith(":"))return x.push(C.slice(1)),"([^/]+)";return C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});return{regex:new RegExp("^/?"+h.join("/")+"/?$"),paramNames:x}}function Qk(y){let x=y.split("?")[0].split("#")[0];for(let l of h5){if(l.fallback)continue;let C=x.match(l.regex);if(C){let i={};return l.paramNames.forEach((k,g)=>{i[k]=decodeURIComponent(C[g+1])}),{route:l,params:i}}}let h=h5.find((l)=>l.fallback);if(h)return{route:h,params:{}};return null}function S0(){let y=D9?window.location.hash.replace(/^#\/?/,""):window.location.pathname;s0.path.value=y,s0.hash.value=window.location.hash;let x=Qk(y);if(x){R9=x.params,s0.pattern.value=x.route.regex.source;let h=new Map;for(let l of x.route.targets)h.set(l.view??"default",l);for(let l of l5){let C=l.name||"default",i=h.get(C);if(i)l.replaceChildren(i.component(x.params));else l.replaceChildren()}}else{R9={},s0.pattern.value="";for(let h of l5)h.replaceChildren()}}var Py=!1;function _y(){if(Py)return;Py=!0,window.addEventListener("popstate",S0),window.addEventListener("hashchange",S0)}function Xk(y,x={}){D9=x.hashRouting??!1,h5=y.map((h)=>{let{regex:l,paramNames:C}=Wk(h.pattern);return{regex:l,paramNames:C,targets:h.targets,fallback:h.fallback??!1}}),_y(),S0()}function $k(y){if(_y(),D9)window.location.hash="#/"+y.replace(/^\//,"");else window.history.pushState({},"","/"+y.replace(/^\//,""));S0()}class H9 extends F{static preferredTagName="tosi-route-view";static initAttributes={name:"default"};content=null;connectedCallback(){if(super.connectedCallback(),l5.add(this),h5.length>0)S0()}disconnectedCallback(){super.disconnectedCallback(),l5.delete(this)}}var Yk=H9.elementCreator();var{div:Nk,slot:pk,label:Jk,span:vk,input:Ay}=G;class T2 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=T2.parseChoicesString(y);else this._choices=y;this.queueRender()}static parseChoicesString(y){return y.split(",").filter((x)=>x.trim()!=="").map((x)=>{let[h,l]=x.split("=").map((g)=>g.trim()),[C,i]=(l||h).split(":").map((g)=>g.trim()),k=i?O[i]():"";return{value:h,icon:k,caption:C}})}value="";formDisabledCallback(y){}formResetCallback(){this.value=""}get values(){return(this.value||"").split(",").map((y)=>y.trim()).filter((y)=>y!=="")}content=()=>[pk(),Nk({part:"options"},Ay({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((l)=>l.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=T2.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:l,isOtherValue:C}=this;if(y.append(...this._choicesWithOther.map((i)=>{return Jk({tabindex:0},Ay({type:h,name:this.name,value:i.value,checked:l.includes(i.value)||i.value===""&&C,tabIndex:-1}),i.icon||{class:"no-icon"},this.localized?Q1(i.caption):vk(i.caption))})),this.other&&!this.multiple)x.hidden=!C,x.value=C?this.value:"",x.placeholder=this.placeholder,y.append(x);this.syncCurrent()}}var Zk=T2,Ky=T2.elementCreator(),Rk=B1((...y)=>Ky(...y),"xinSegmented is deprecated, use tosiSegmented instead (tag is now <tosi-segmented>)");var{slot:Uy}=G;class b9 extends F{static preferredTagName="tosi-sizebreak";static initAttributes={minWidth:0,minHeight:0};value="normal";content=[Uy({part:"normal"}),Uy({part:"small",name:"small"})];static shadowStyleSpec={":host":{display:"inline-block",position:"relative"}};onResize=()=>{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.onResize)}disconnectedCallback(){super.disconnectedCallback(),globalThis.removeEventListener("resize",this.onResize)}}var Dk=b9.elementCreator();class C5 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:l}=x;x.style.left=x.offsetLeft+"px",x.style.top=x.offsetTop+"px",x.style.bottom="",x.style.right="";let{minSize:C}=this;P1(y,(i,k,g)=>{if(x.style.width=Math.max(C.width,h+i)+"px",x.style.height=Math.max(C.height,l+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 Hk=C5,Gy=C5.elementCreator(),bk=Gy;var{div:ck,input:sk,span:Sk,button:c9}=G,Fy=(y)=>y.split(/(?<!\\),/).map((x)=>x.trim().replace(/\\,/g,",")),Ik=(y)=>y.map((x)=>x.replace(/,/g,"\\,")).join(",");class I0 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=()=>[Sk({part:"caption"},this.caption),c9(O.x(),{type:"button",part:"remove",hidden:!this.removeable,ariaLabel:`Remove ${this.caption}`,onClick:this.removeCallback})]}var Mk=I0,s9=I0.elementCreator(),dk=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 Fy(this.value).filter((y)=>y!=="")}set tags(y){this.value=Ik(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 Fy(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],l=this.tags.filter((i)=>!h.includes(i));if(l.length)h.push(null,...l);let C=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)}}});o({target:x,width:"auto",menuItems:C})};content=()=>[c9({type:"button",style:{visibility:"hidden"},tabindex:-1}),ck({part:"tagContainer",class:"row",role:"list",ariaLabel:"Selected tags"}),sk({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(I0.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 l of this.tags)y.append(s9({caption:l,removeable:this.editable&&!this.disabled,removeCallback:this.removeTag}))}}var Tk=L2,Oy=L2.elementCreator(),Lk=B1((...y)=>Oy(...y),"xinTagList is deprecated, use tosiTagList instead (tag is now <tosi-tag-list>)");var Wy="1.7.0";var{span:rk}=G,M0=null,i5=null,k5=null,d1="tosi-tooltip",ok={[`.${d1}`]:{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"},[`.${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)"}},Qy=!1;function Xy(){if(Qy)return;Qy=!0,W1("tosi-tooltip",ok)}function r2(){if(i5!==null)clearTimeout(i5),i5=null;if(M0!==null)M0.remove(),M0=null;k5=null}function nk(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 uk(y,x,h){let l=x.getBoundingClientRect(),C=y.getBoundingClientRect(),i=l.left+l.width*0.5,k=l.top+l.height*0.5,g;if(h.startsWith("s")||h.startsWith("n"))g=Math.max(8,Math.min(C.width-8,i-C.left))-4;else g=Math.max(8,Math.min(C.height-8,k-C.top))-4;y.style.setProperty("--tosi-tooltip-arrow",g+"px")}function fk(y,x){if(x)y=I(y);let h=rk({class:d1});return h.innerHTML=R.parseInline(y),h}function ak(y,x,h){Xy(),r2(),k5=y;let{top:l,left:C,width:i}=y.getBoundingClientRect(),k=C+i*0.5,g=window.innerHeight,w=window.innerWidth,B=(l>g*0.5?"n":"s")+(k>w*0.5?"w":"e"),q=fk(x,h);q.classList.add(nk(B)),M0=q0({content:q,target:y,position:B,remainOnScroll:"remove",remainOnResize:"remove"}),requestAnimationFrame(()=>{if(M0&&k5)uk(q,y,B)})}function mk(y){for(let x of y.composedPath())if(x instanceof HTMLElement&&x.dataset.tooltip)return x;return null}function Ek(y={}){Xy();let{convertTitles:x=!0,delay:h=250,localize:l=!1}=y;document.addEventListener("pointermove",(C)=>{if(x){for(let g of C.composedPath())if(g instanceof HTMLElement&&g.title&&!g.dataset.tooltip){g.dataset.tooltip=g.title,g.removeAttribute("title");break}}let i=mk(C);if(i===k5)return;if(r2(),!i)return;let k=i.dataset.tooltip||null;if(!k)return;i5=setTimeout(()=>ak(i,k,l),h)}),document.addEventListener("pointerleave",r2),document.addEventListener("pointerdown",r2),document.addEventListener("keydown",r2),window.addEventListener("scroll",r2,!0)}Object.assign(globalThis,{xinjs:k0,xinjsui:S9});
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 l=h[h.length-1];if(!l.startsWith("<")||!l.endsWith(">"))h[h.length-1]+=`
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});
212
212
 
213
- //# debugId=7F583EE9A5C8D3BE64756E2164756E21
213
+ //# debugId=B45ED9C1C0F6AEAD64756E2164756E21
214
214
  //# sourceMappingURL=hydrate.js.map