tosijs-ui 1.4.11 → 1.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/iife.js CHANGED
@@ -1,43 +1,43 @@
1
- (()=>{var y9=Object.defineProperty;var s9=(l)=>l;function x9(l,i){this[l]=s9.bind(null,i)}var B4=(l,i)=>{for(var o in i)y9(l,o,{get:i[o],enumerable:!0,configurable:!0,set:x9.bind(i,o)})};var h9=((l)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(l,{get:(i,o)=>(typeof require<"u"?require:i)[o]}):l)(function(l){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+l+'" is not supported')});var w3={};B4(w3,{xrControllersText:()=>yo,xrControllers:()=>oo,xinTagList:()=>sy,xinTag:()=>oy,xinTabs:()=>d7,xinTable:()=>p8,xinSizer:()=>Mo,xinSidenav:()=>U7,xinSelect:()=>Y6,xinSegmented:()=>eo,xinRating:()=>Uo,xinPasswordStrength:()=>Po,xinNotification:()=>Ao,xinMenu:()=>c8,xinMd:()=>h7,xinLocalized:()=>u6,xinForm:()=>M7,xinFloat:()=>R6,xinField:()=>L7,xinCarousel:()=>F6,version:()=>mi,updateLocalized:()=>c5,trackDrag:()=>M,tosijs:()=>G2,tosiThemeEditor:()=>po,tosiTagList:()=>Mi,tosiTag:()=>p3,tosiTabs:()=>u2,tosiTable:()=>t5,tosiSizer:()=>Li,tosiSidenav:()=>m2,tosiSelect:()=>h1,tosiSegmented:()=>ei,tosiRow:()=>so,tosiRouteView:()=>$o,tosiRichText:()=>Ii,tosiRating:()=>Ji,tosiPasswordStrength:()=>Ri,tosiNotification:()=>x3,tosiMonth:()=>vo,tosiMenu:()=>$l,tosiMd:()=>f2,tosiLocalized:()=>f1,tosiLocalePicker:()=>Ol,tosiHeaderLinks:()=>lo,tosiHeader:()=>E7,tosiGrid:()=>ho,tosiForm:()=>Pi,tosiFloat:()=>R2,tosiField:()=>Vi,tosiDialog:()=>G0,tosiColumn:()=>xo,tosiCarousel:()=>vl,testManager:()=>r1,tabSelector:()=>C7,svgIcon:()=>U6,svg2DataUrl:()=>i5,styleSheet:()=>q0,spacer:()=>M5,sizeBreak:()=>uo,sideNav:()=>O7,setLocale:()=>I6,scriptTag:()=>x1,runTests:()=>M0,router:()=>s0,richTextWidgets:()=>Yi,richText:()=>Qo,rewriteImports:()=>H1,resolveMenuItems:()=>c1,removeLastMenu:()=>Y,postNotification:()=>qo,positionFloat:()=>ql,popMenu:()=>G,popFloat:()=>J2,popDropMenu:()=>Hl,parseShortcut:()=>N0,navigate:()=>Ho,modifierKeys:()=>L6,menu:()=>Rl,matchShortcut:()=>r5,markdownViewer:()=>x7,mapBox:()=>to,makeSorter:()=>O0,localize:()=>K,localePicker:()=>e6,loadTransform:()=>D0,liveTheme:()=>b,liveExample:()=>E0,legacyAliases:()=>Fi,keystroke:()=>M6,keycode:()=>Xl,isBreached:()=>Zi,insertExamples:()=>L0,initTooltips:()=>dy,initLocalization:()=>D6,icons:()=>t,i18n:()=>Q,getRouterParams:()=>Go,gamepadText:()=>io,gamepadState:()=>Ui,findShortcutAction:()=>p5,findHighestZ:()=>l2,filterPart:()=>l4,filterForDrop:()=>$2,filterForClick:()=>g5,filterBuilder:()=>$7,expect:()=>F5,executeInline:()=>e0,executeInIframe:()=>u0,executeCode:()=>ni,enableTests:()=>G5,enableLiveTheme:()=>Qi,elastic:()=>Ni,editableRect:()=>G7,dragAndDrop:()=>F0,displayShortcut:()=>K0,disableTests:()=>Z5,disableLiveTheme:()=>ko,digest:()=>Gi,defineRoutes:()=>Jo,defineIcons:()=>O6,defaultColors:()=>q1,dataTable:()=>k8,createThemeWithLegacy:()=>no,createTheme:()=>q2,createTestContext:()=>W5,createSubMenu:()=>k5,createMenuItem:()=>Zl,createMenuAction:()=>Ql,createDropMenuItem:()=>Gl,createDocBrowser:()=>W7,createDarkTheme:()=>y4,createColorVariables:()=>bi,componentVars:()=>Co,commandButton:()=>p1,colorInput:()=>h5,codeEditor:()=>p2,canonicalShortcut:()=>E6,bringToFront:()=>J1,bodymovinPlayer:()=>N6,blockStyle:()=>r3,baseVariables:()=>Ki,baseTheme:()=>co,baseDarkTheme:()=>ro,b3d:()=>X6,availableFilters:()=>H5,applyTheme:()=>m5,abTest:()=>P6,XinWord:()=>Wo,XinTagList:()=>yy,XinTag:()=>iy,XinSizer:()=>Lo,XinSelect:()=>$6,XinSegmented:()=>To,XinRating:()=>Oo,XinPasswordStrength:()=>Vo,XinNotification:()=>jo,XinMenu:()=>r8,XinLocalized:()=>U0,XinForm:()=>u7,XinFloat:()=>Z6,XinField:()=>e7,XinCarousel:()=>b6,TosiThemeEditor:()=>E5,TosiTagList:()=>P2,TosiTag:()=>h0,TosiTabs:()=>S0,TosiTable:()=>Q0,TosiSizer:()=>k4,TosiSidenav:()=>x2,TosiSelect:()=>v1,TosiSegmented:()=>V2,TosiRow:()=>e5,TosiRouteView:()=>d3,TosiRating:()=>n4,TosiPasswordStrength:()=>r4,TosiNotification:()=>S1,TosiMonth:()=>y3,TosiMenu:()=>W0,TosiMd:()=>I0,TosiLocalized:()=>z1,TosiLocalePicker:()=>X0,TosiHeaderLinks:()=>D5,TosiHeader:()=>S5,TosiGrid:()=>L5,TosiForm:()=>o4,TosiFloat:()=>X1,TosiField:()=>i4,TosiDialog:()=>f5,TosiColumn:()=>u5,TosiCarousel:()=>V0,TabSelector:()=>n7,SvgIcon:()=>o5,SizeBreak:()=>g3,SideNav:()=>P7,STORAGE_KEY:()=>T0,RichText:()=>C4,RemoteSyncManager:()=>M2,MarkdownViewer:()=>s7,MapBox:()=>h2,LocalePicker:()=>T6,LiveExample:()=>$1,FilterPart:()=>$5,FilterBuilder:()=>Y5,EditableRect:()=>k1,DataTable:()=>g8,CodeEditor:()=>E1,BodymovinPlayer:()=>k2,B3d:()=>y5,AbTest:()=>g2});var G2={};B4(G2,{xinValue:()=>d9,xinSlot:()=>o6,xinProxy:()=>wl,xinPath:()=>C9,xin:()=>$,warnDeprecated:()=>y1,version:()=>pl,vars:()=>d,varDefault:()=>g,validateAgainstConstraints:()=>Cl,updates:()=>$4,unobserve:()=>Q1,touchElement:()=>u4,touch:()=>n1,tosiValue:()=>W,tosiUnique:()=>z6,tosiSlot:()=>i6,tosiSetValue:()=>n9,tosiPath:()=>L,tosiLoader:()=>q6,tosiBlueprint:()=>A6,tosi:()=>S,throttle:()=>n2,sync:()=>B6,svgElements:()=>B0,share:()=>w6,settings:()=>p0,scrollListItemIntoView:()=>u9,onThemePreferencesChange:()=>W9,onStylesheetChange:()=>X9,on:()=>d2,observe:()=>T4,mathML:()=>cl,makeComponent:()=>M4,invertLuminance:()=>Y4,initVars:()=>F9,hotReload:()=>y6,getThemePreferences:()=>sl,getListItem:()=>U1,getListInstance:()=>e4,getListBinding:()=>v0,getCssVar:()=>ll,elements:()=>w,deprecated:()=>u,deleteListItem:()=>T9,debounce:()=>Q2,css:()=>C2,boxedProxy:()=>L4,boxed:()=>o1,blueprintLoader:()=>V6,blueprint:()=>_6,bindings:()=>P1,bindParts:()=>J9,bind:()=>Z1,StyleSheet:()=>O1,MoreMath:()=>P9,Component:()=>a,Color:()=>f,BlueprintLoader:()=>m4,Blueprint:()=>j0});function L1(l){if(l==null||typeof l!=="object")return l;if(l instanceof Set)return new Set(l);else if(Array.isArray(l))return l.map(L1);let i={};for(let o in l){let y=l[o];if(l!=null&&typeof l==="object")i[o]=L1(y);else i[o]=y}return i}var $3="-xin-data",r2=`.${$3}`,Y3="-xin-event",z3=`.${Y3}`,B1=Symbol.for("xin-path"),M1=Symbol.for("xin-value"),f3="xinObserve",j3="xinBind",A3="xinOn",k0=Symbol("list-binding"),K2=Symbol("list-instance"),O4=new Map;function c9(l,i){let o=O4.get(l);if(o===void 0)o=new Set,O4.set(l,o);o.add(i)}function r9(l){return O4.get(l)}var q3=new Set;function y1(l,i){if(!q3.has(l))console.warn(i),q3.add(l)}function u(l,i){let o=!1;return(...y)=>{if(!o)console.warn(i),o=!0;return l(...y)}}var L=(l)=>{return l&&l[B1]||void 0};function W(l){if(typeof l==="object"&&l!==null){let i=l[M1];return i!==void 0?i:l}return l}function n9(l,i){if(L(l)===void 0)throw Error("tosiSetValue requires a xin or boxed proxy");l[M1]=i}var C9=u(L,"xinPath is deprecated. Use tosiPath instead."),d9=u(W,"xinValue is deprecated. Use tosiValue instead."),b2=new WeakMap,m1=new WeakMap,F2=(l)=>{let i=l.cloneNode();if(i instanceof Element){let o=m1.get(l),y=b2.get(l);if(o!=null)m1.set(i,L1(o));if(y!=null)b2.set(i,L1(y))}for(let o of Array.from(l instanceof HTMLTemplateElement?l.content.childNodes:l.childNodes))if(o instanceof Element||o instanceof DocumentFragment)i.appendChild(F2(o));else i.appendChild(o.cloneNode());return i},p0={debug:!1,perf:!1},g9=(l)=>{try{return JSON.stringify(l)}catch(i){return"{has circular references}"}},I3=(...l)=>Error(l.map(g9).join(" ")),k9=()=>new Date(parseInt("1000000000",36)+Date.now()).valueOf().toString(36).slice(1),p9=0,w9=()=>(parseInt("10000",36)+ ++p9).toString(36).slice(-5),S3=()=>k9()+w9(),U4=Symbol("delete"),D3=Symbol("new-object"),v4=Symbol("automatic-index");function T3(l){if(l==="")return[];if(Array.isArray(l))return l;else{let i=[];while(l.length>0){let o=l.search(/\[[^\]]+\]/);if(o===-1){i.push(l.split("."));break}else{let y=l.slice(0,o);if(l=l.slice(o),y!=="")i.push(y.split("."));if(o=l.indexOf("]")+1,i.push(l.slice(1,o-1)),l.slice(o,o+1)===".")o+=1;l=l.slice(o)}}return i}}var V1=new WeakMap;function e3(l,i){if(V1.get(l)===void 0)V1.set(l,{});if(V1.get(l)[i]===void 0)V1.get(l)[i]={};let o=V1.get(l)[i];if(i==="_auto_")l.forEach((y,s)=>{if(y[v4]===void 0)y[v4]=S3();o[y[v4]+""]=s});else l.forEach((y,s)=>{o[e(y,i)+""]=s});return o}function t9(l,i){if(V1.get(l)===void 0||V1.get(l)[i]===void 0)return e3(l,i);else return V1.get(l)[i]}function a9(l,i,o){o=o+"";let y=t9(l,i)[o];if(y===void 0||e(l[y],i)+""!==o)y=e3(l,i)[o];return y}function B9(l,i,o){if(l[i]===void 0&&o!==void 0)l[i]=o;return l[i]}function u3(l,i,o,y){let s=i!==""?a9(l,i,o):o;if(y===U4)return l.splice(s,1),V1.delete(l),Symbol("deleted");else if(y===D3){if(i===""&&l[s]===void 0)l[s]={}}else if(y!==void 0)if(s!==void 0)l[s]=y;else if(i!==""&&e(y,i)+""===o+"")l.push(y),s=l.length-1;else throw Error(`byIdPath insert failed at [${i}=${o}]`);return l[s]}function _3(l){if(!Array.isArray(l))throw I3("setByPath failed: expected array, found",l)}function V3(l){if(l==null||!(l instanceof Object))throw I3("setByPath failed: expected Object, found",l)}function e(l,i){let o=T3(i),y=l,s,x,h,c;for(s=0,x=o.length;y!==void 0&&s<x;s++){let r=o[s];if(Array.isArray(r))for(h=0,c=r.length;y!==void 0&&h<c;h++){let n=r[h];y=y[n]}else if(y.length===0){if(y=y[Number(r.slice(1))],r[0]!=="=")return}else if(r.includes("=")){let[n,...C]=r.split("=");y=u3(y,n,C.join("="))}else h=parseInt(r,10),y=y[h]}return y}function a0(l,i,o){let y=l;if(i==="")throw Error("setByPath cannot be used to set the root object");let s=T3(i);while(y!=null&&s.length>0){let x=s.shift();if(typeof x==="string"){let h=x.indexOf("=");if(h>-1){if(h===0)V3(y);else _3(y);let c=x.slice(0,h),r=x.slice(h+1);if(y=u3(y,c,r,s.length>0?D3:o),s.length===0)return!0}else{_3(y);let c=parseInt(x,10);if(s.length>0)y=y[c];else{if(o!==U4){if(y[c]===o)return!1;y[c]=o}else y.splice(c,1);return!0}}}else if(Array.isArray(x)&&x.length>0){V3(y);while(x.length>0){let h=x.shift();if(x.length>0||s.length>0)y=B9(y,h,x.length>0?{}:[]);else{if(o!==U4){if(y[h]===o)return!1;y[h]=o}else{if(!Object.prototype.hasOwnProperty.call(y,h))return!1;delete y[h]}return!0}}}else throw Error(`setByPath failed, bad path ${i}`)}throw Error(`setByPath(${l}, ${i}, ${o}) failed`)}var s1={},X4=null,v9=(l)=>{X4=l},H4=()=>{if(X4===null)throw Error("xin proxy not initialized");return X4},N4=null,K4=null,z9=(l,i)=>{N4=l,K4=i},n0=()=>{if(N4===null)throw Error("bind not initialized");return N4},C0=()=>{if(K4===null)throw Error("on not initialized");return K4},P3=Symbol("observer should be removed"),w0=[],c2=[],b4=!1,F4,W4;function f9(l,i,o,y){let s=r9(l);if(s===void 0)return[];let x=[];for(let h of s){let c=e(o,h);if(c!==void 0)x.push(`${l}[${h}=${c}]${y}`)}return x}class L3{description;test;callback;constructor(l,i){let o=typeof i==="string"?`"${i}"`:`function ${i.name}`,y;if(typeof l==="string")this.test=(s)=>typeof s==="string"&&s!==""&&(l.startsWith(s)||s.startsWith(l)),y=`test = "${l}"`;else if(l instanceof RegExp)this.test=l.test.bind(l),y=`test = "${l.toString()}"`;else if(l instanceof Function)this.test=l,y=`test = function ${l.name}`;else throw Error("expect listener test to be a string, RegExp, or test function");if(this.description=`${y}, ${o}`,typeof i==="function")this.callback=i;else throw Error("expect callback to be a path or function");w0.push(this)}}var $4=async()=>{if(F4===void 0)return;await F4},j9=()=>{if(p0.perf)console.time("xin async update");let l=Array.from(c2);c2.length=0,b4=!1;for(let i of l)w0.filter((o)=>{let y;try{y=o.test(i)}catch(s){throw Error(`Listener ${o.description} threw "${s}" at "${i}"`)}if(y===P3)return Q1(o),!1;return y}).forEach((o)=>{let y;try{y=o.callback(i)}catch(s){console.error(`Listener ${o.description} threw "${s}" handling "${i}"`)}if(y===P3)Q1(o)});if(typeof W4==="function")W4();if(p0.perf)console.timeEnd("xin async update")},n1=(l)=>{let i=typeof l==="string"?l:L(l);if(i===void 0)throw console.error("touch was called on an invalid target",l),Error("touch was called on an invalid target");if(b4===!1)F4=new Promise((y)=>{W4=y}),b4=setTimeout(j9);if(c2.find((y)=>i.startsWith(y))==null)c2.push(i);let o=i.match(/^(.+)\[(\d+)\](.*)$/);if(o!==null){let[,y,s,x]=o,h=parseInt(s,10),c=e(s1,`${y}[${h}]`);if(c!=null){let r=f9(y,h,c,x);for(let n of r)if(c2.find((C)=>n.startsWith(C))==null)c2.push(n)}}},W1=(l,i)=>{return new L3(l,i)},Q1=(l)=>{let i=w0.indexOf(l);if(i>-1)w0.splice(i,1);else throw Error("unobserve failed, listener not found")},M3=(l,i)=>{let o=new Event(i);l.dispatchEvent(o)},m3=(l)=>{if(l instanceof HTMLInputElement)return l.type;else if(l instanceof HTMLSelectElement&&l.hasAttribute("multiple"))return"multi-select";else return"other"},A9=(l,i)=>{switch(m3(l)){case"radio":l.checked=l.value===i;break;case"checkbox":l.checked=!!i;break;case"date":l.valueAsDate=new Date(i);break;case"multi-select":for(let o of Array.from(l.querySelectorAll("option")))o.selected=i[o.value];break;default:l.value=i}},q9=(l)=>{switch(m3(l)){case"radio":{let i=l.parentElement?.querySelector(`[name="${l.name}"]:checked`);return i!=null?i.value:null}case"checkbox":return l.checked;case"date":return l.valueAsDate?.toISOString();case"multi-select":return Array.from(l.querySelectorAll("option")).reduce((i,o)=>{return i[o.value]=o.selected,i},{});default:return l.value}},{ResizeObserver:O3}=globalThis,Q4=O3!=null?new O3((l)=>{for(let i of l){let o=i.target;M3(o,"resize")}}):{observe(){},unobserve(){}},U3=(l,i,o=!0)=>{if(l!=null&&i!=null)if(typeof i==="string")l.textContent=i;else if(Array.isArray(i))i.forEach((y)=>{l.append(y instanceof Node&&o?F2(y):y)});else if(i instanceof Node)l.append(o?F2(i):i);else throw Error("expect text content or document node")},Q2=(l,i=250)=>{let o;return(...y)=>{if(o!==void 0)clearTimeout(o);o=setTimeout(()=>{l(...y)},i)}},n2=(l,i=250)=>{let o,y=Date.now()-i,s=!1;return(...x)=>{if(clearTimeout(o),o=setTimeout(()=>{l(...x),y=Date.now()},i),!s&&Date.now()-y>=i){s=!0;try{l(...x),y=Date.now()}finally{s=!1}}}},P1={value:{toDOM:A9,fromDOM(l){return q9(l)}},text:{toDOM(l,i){l.textContent=i}},enabled:{toDOM(l,i){l.disabled=!i}},disabled:{toDOM(l,i){l.disabled=Boolean(i)}},list:{toDOM(l,i,o){v0(l,i,o).update(i)}}};function a1(l){return l.replace(/[A-Z]/g,(i)=>{return`-${i.toLocaleLowerCase()}`})}function E3(l){return l.replace(/-([a-z])/g,(i,o)=>{return o.toLocaleUpperCase()})}var _9=180/Math.PI,V9=Math.PI/180;function t1(l,i,o){return o<l?NaN:i<l?l:i>o?o:i}function b1(l,i,o,y=!0){if(y)o=t1(0,o,1);return o*(i-l)+l}var P9={RADIANS_TO_DEGREES:_9,DEGREES_TO_RADIANS:V9,clamp:t1,lerp:b1};function ll(l,i=document.body){let o=getComputedStyle(i);if(l.endsWith(")")&&l.startsWith("var("))l=l.slice(4,-1);return o.getPropertyValue(l).trim()}var O9=(l,i,o)=>{return(0.299*l+0.587*i+0.114*o)/255},T1=(l)=>("00"+Math.round(Number(l)).toString(16)).slice(-2);class il{h;s;l;constructor(l,i,o){l/=255,i/=255,o/=255;let y=Math.max(l,i,o),s=y-Math.min(l,i,o),x=s!==0?y===l?(i-o)/s:y===i?2+(o-l)/s:4+(l-i)/s:0;this.h=60*x<0?60*x+360:60*x,this.s=s!==0?y<=0.5?s/(2*y-s):s/(2-(2*y-s)):0,this.l=(2*y-s)/2}}var F1=globalThis.document!==void 0?globalThis.document.createElement("span"):void 0;if(F1)F1.style.display="none";class f{r;g;b;a;static fromVar(l,i=document.body){return f.fromCss(ll(l,i))}static fromCss(l){let i=l.match(/^#([0-9a-fA-F]+)$/);if(i){let r=i[1];if(r.length===3)return new f(parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16));if(r.length===4)return new f(parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)/255);if(r.length===6)return new f(parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16));if(r.length===8)return new f(parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),parseInt(r.slice(6,8),16)/255)}let o=l;if(F1 instanceof HTMLSpanElement)F1.style.color="black",F1.style.color=l,document.body.appendChild(F1),o=getComputedStyle(F1).color,F1.remove();let[y,s,x,h]=o.match(/[\d.]+/g)||["0","0","0","0"],c=o.startsWith("color(srgb")?255:1;return new f(Number(y)*c,Number(s)*c,Number(x)*c,h==null?1:Number(h))}static fromHsl(l,i,o,y=1){let s,x,h;if(i===0)s=x=h=o;else{let r=(p,z,B)=>{if(B<0)B+=1;if(B>1)B-=1;if(B<0.16666666666666666)return p+(z-p)*6*B;if(B<0.5)return z;if(B<0.6666666666666666)return p+(z-p)*(0.6666666666666666-B)*6;return p},n=o<0.5?o*(1+i):o+i-o*i,C=2*o-n,k=(l%360+360)%360/360;s=r(C,n,k+0.3333333333333333),x=r(C,n,k),h=r(C,n,k-0.3333333333333333)}let c=new f(s*255,x*255,h*255,y);return c.hslCached={h:(l%360+360)%360,s:i,l:o},c}static black=new f(0,0,0);static white=new f(255,255,255);constructor(l,i,o,y=1){this.r=t1(0,l,255),this.g=t1(0,i,255),this.b=t1(0,o,255),this.a=t1(0,y,1)}get inverse(){return new f(255-this.r,255-this.g,255-this.b,this.a)}get inverseLuminance(){let{h:l,s:i,l:o}=this._hsl;return f.fromHsl(l,i,1-o,this.a)}get opaque(){return this.a===1?this:new f(this.r,this.g,this.b,1)}contrasting(l=1){return this.opaque.blend(this.brightness>0.5?f.black:f.white,l)}get rgb(){let{r:l,g:i,b:o}=this;return`rgb(${l.toFixed(0)},${i.toFixed(0)},${o.toFixed(0)})`}get rgba(){let{r:l,g:i,b:o,a:y}=this;return`rgba(${l.toFixed(0)},${i.toFixed(0)},${o.toFixed(0)},${y.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 il(this.r,this.g,this.b);return this.hslCached}get hsl(){let{h:l,s:i,l:o}=this._hsl;return`hsl(${l.toFixed(0)}deg ${(i*100).toFixed(0)}% ${(o*100).toFixed(0)}%)`}get hsla(){let{h:l,s:i,l:o}=this._hsl;return`hsl(${l.toFixed(0)}deg ${(i*100).toFixed(0)}% ${(o*100).toFixed(0)}% / ${(this.a*100).toFixed(0)}%)`}get mono(){let l=this.brightness*255;return new f(l,l,l)}get brightness(){return O9(this.r,this.g,this.b)}get html(){return this.toString()}toString(){return this.a===1?"#"+T1(this.r)+T1(this.g)+T1(this.b):"#"+T1(this.r)+T1(this.g)+T1(this.b)+T1(Math.floor(255*this.a))}brighten(l){let{h:i,s:o,l:y}=this._hsl,s=t1(0,y+l*(1-y),1);return f.fromHsl(i,o,s,this.a)}darken(l){let{h:i,s:o,l:y}=this._hsl,s=t1(0,y*(1-l),1);return f.fromHsl(i,o,s,this.a)}saturate(l){let{h:i,s:o,l:y}=this._hsl,s=t1(0,o+l*(1-o),1);return f.fromHsl(i,s,y,this.a)}desaturate(l){let{h:i,s:o,l:y}=this._hsl,s=t1(0,o*(1-l),1);return f.fromHsl(i,s,y,this.a)}rotate(l){let{h:i,s:o,l:y}=this._hsl,s=(i+360+l)%360;return f.fromHsl(s,o,y,this.a)}opacity(l){let{h:i,s:o,l:y}=this._hsl;return f.fromHsl(i,o,y,l)}swatch(){return console.log(`%c %c ${this.html}, ${this.rgba}`,`background-color: ${this.html}`,"background-color: transparent"),this}blend(l,i){return new f(b1(this.r,l.r,i),b1(this.g,l.g,i),b1(this.b,l.b,i),b1(this.a,l.a,i))}static blendHue(l,i,o){let y=(i-l+720)%360;if(y<180)return l+o*y;else return l-(360-y)*o}mix(l,i){let o=this._hsl,y=l._hsl;return f.fromHsl(o.s===0?y.h:y.s===0?o.h:f.blendHue(o.h,y.h,i),b1(o.s,y.s,i),b1(o.l,y.l,i),b1(this.a,l.a,i))}colorMix(l,i){return f.fromCss(`color-mix(in hsl, ${this.html}, ${l.html} ${(i*100).toFixed(0)}%)`)}static computedColorStylesheet=null;static computedColors=new Map;static recomputeQueued=!1;static registerComputedColor(l,i,o,y){if(!f.computedColors.has(l))f.computedColors.set(l,{varName:i,scale:o,method:y}),f.queueRecompute()}static queueRecompute(){if(f.recomputeQueued)return;f.recomputeQueued=!0,queueMicrotask(()=>{f.recomputeQueued=!1,f.recomputeColors()})}static recomputeColors(){if(f.computedColors.size===0)return;let l=[];for(let[o,{varName:y,scale:s,method:x}]of f.computedColors)try{let h=f.fromVar(y),c;switch(x){case"b":c=s>0?h.brighten(s):h.darken(-s);break;case"s":c=s>0?h.saturate(s):h.desaturate(-s);break;case"h":c=h.rotate(s*100);break;case"o":c=h.opacity(s);break;default:continue}l.push(` ${o}: ${c.rgba};`)}catch(h){}if(l.length===0)return;let i=`:root {
1
+ (()=>{var x9=Object.defineProperty;var h9=(l)=>l;function c9(l,i){this[l]=h9.bind(null,i)}var B4=(l,i)=>{for(var o in i)x9(l,o,{get:i[o],enumerable:!0,configurable:!0,set:c9.bind(i,o)})};var r9=((l)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(l,{get:(i,o)=>(typeof require<"u"?require:i)[o]}):l)(function(l){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+l+'" is not supported')});var w3={};B4(w3,{xrControllersText:()=>ko,xrControllers:()=>go,xinTagList:()=>ky,xinTag:()=>dy,xinTabs:()=>z7,xinTable:()=>A8,xinSizer:()=>hy,xinSidenav:()=>Z7,xinSelect:()=>S6,xinSegmented:()=>yy,xinRating:()=>Zo,xinPasswordStrength:()=>Qo,xinNotification:()=>Ko,xinMenu:()=>t8,xinMd:()=>w7,xinLocalized:()=>M6,xinForm:()=>ho,xinFloat:()=>$6,xinField:()=>xo,xinCarousel:()=>Q6,version:()=>l9,updateLocalized:()=>c5,trackDrag:()=>M,tosijs:()=>G2,tosiThemeEditor:()=>Ao,tosiTagList:()=>Ei,tosiTag:()=>p3,tosiTabs:()=>e2,tosiTable:()=>t5,tosiSizer:()=>mi,tosiSidenav:()=>m2,tosiSelect:()=>h1,tosiSegmented:()=>Li,tosiRow:()=>po,tosiRouteView:()=>Mo,tosiRichText:()=>Di,tosiRating:()=>Hi,tosiPasswordStrength:()=>$i,tosiNotification:()=>x3,tosiMonth:()=>Oo,tosiMenu:()=>Il,tosiMd:()=>f2,tosiLocalized:()=>f1,tosiLocalePicker:()=>Ol,tosiHeaderLinks:()=>no,tosiHeader:()=>ro,tosiGrid:()=>to,tosiForm:()=>Ui,tosiFloat:()=>R2,tosiField:()=>Oi,tosiDialog:()=>G0,tosiColumn:()=>wo,tosiCarousel:()=>vl,testManager:()=>r1,tabSelector:()=>v7,svgIcon:()=>N6,svg2DataUrl:()=>i5,styleSheet:()=>q0,spacer:()=>M5,sizeBreak:()=>sy,sideNav:()=>G7,setLocale:()=>D6,scriptTag:()=>x1,runTests:()=>M0,router:()=>s0,richTextWidgets:()=>Si,richText:()=>So,rewriteImports:()=>$1,resolveMenuItems:()=>c1,removeLastMenu:()=>Y,postNotification:()=>bo,positionFloat:()=>ql,popMenu:()=>G,popFloat:()=>J2,popDropMenu:()=>Yl,parseShortcut:()=>N0,navigate:()=>Lo,modifierKeys:()=>m6,menu:()=>$l,matchShortcut:()=>r5,markdownViewer:()=>p7,mapBox:()=>_o,makeSorter:()=>O0,localize:()=>K,localePicker:()=>L6,loadTransform:()=>D0,liveTheme:()=>b,liveExample:()=>E0,legacyAliases:()=>Qi,keystroke:()=>E6,keycode:()=>Xl,isBreached:()=>Ji,insertExamples:()=>L0,initTooltips:()=>zy,initLocalization:()=>u6,icons:()=>t,i18n:()=>Q,getRouterParams:()=>Do,gamepadText:()=>Co,gamepadState:()=>Ni,findShortcutAction:()=>p5,findHighestZ:()=>l2,filterPart:()=>l4,filterForDrop:()=>H2,filterForClick:()=>g5,filterBuilder:()=>M7,expect:()=>F5,executeInline:()=>u0,executeInIframe:()=>e0,executeCode:()=>di,enableTests:()=>G5,enableLiveTheme:()=>Zi,elastic:()=>bi,editableRect:()=>D7,dragAndDrop:()=>F0,displayShortcut:()=>K0,disableTests:()=>Z5,disableLiveTheme:()=>jo,digest:()=>Ri,defineRoutes:()=>eo,defineIcons:()=>X6,defaultColors:()=>q1,dataTable:()=>j8,createThemeWithLegacy:()=>vo,createTheme:()=>q2,createTestContext:()=>W5,createSubMenu:()=>k5,createMenuItem:()=>Jl,createMenuAction:()=>Zl,createDropMenuItem:()=>Rl,createDocBrowser:()=>I7,createDarkTheme:()=>y4,createColorVariables:()=>Wi,componentVars:()=>zo,commandButton:()=>p1,colorInput:()=>h5,codeEditor:()=>p2,canonicalShortcut:()=>i8,bringToFront:()=>J1,bodymovinPlayer:()=>b6,blockStyle:()=>r3,baseVariables:()=>Fi,baseTheme:()=>ao,baseDarkTheme:()=>Bo,b3d:()=>K6,availableFilters:()=>$5,applyTheme:()=>m5,abTest:()=>U6,XinWord:()=>Io,XinTagList:()=>gy,XinTag:()=>Cy,XinSizer:()=>xy,XinSelect:()=>I6,XinSegmented:()=>oy,XinRating:()=>Go,XinPasswordStrength:()=>Wo,XinNotification:()=>No,XinMenu:()=>a8,XinLocalized:()=>U0,XinForm:()=>so,XinFloat:()=>J6,XinField:()=>yo,XinCarousel:()=>W6,TosiThemeEditor:()=>E5,TosiTagList:()=>P2,TosiTag:()=>h0,TosiTabs:()=>S0,TosiTable:()=>Q0,TosiSizer:()=>k4,TosiSidenav:()=>x2,TosiSelect:()=>v1,TosiSegmented:()=>V2,TosiRow:()=>u5,TosiRouteView:()=>d3,TosiRating:()=>n4,TosiPasswordStrength:()=>r4,TosiNotification:()=>S1,TosiMonth:()=>y3,TosiMenu:()=>W0,TosiMd:()=>I0,TosiLocalized:()=>z1,TosiLocalePicker:()=>X0,TosiHeaderLinks:()=>D5,TosiHeader:()=>S5,TosiGrid:()=>L5,TosiForm:()=>o4,TosiFloat:()=>X1,TosiField:()=>i4,TosiDialog:()=>f5,TosiColumn:()=>e5,TosiCarousel:()=>V0,TabSelector:()=>B7,SvgIcon:()=>o5,SizeBreak:()=>g3,SideNav:()=>Q7,STORAGE_KEY:()=>T0,RichText:()=>C4,RemoteSyncManager:()=>M2,MarkdownViewer:()=>k7,MapBox:()=>h2,LocalePicker:()=>e6,LiveExample:()=>H1,FilterPart:()=>H5,FilterBuilder:()=>Y5,EditableRect:()=>k1,DataTable:()=>f8,CodeEditor:()=>E1,BodymovinPlayer:()=>k2,B3d:()=>y5,AbTest:()=>g2});var G2={};B4(G2,{xinValue:()=>k9,xinSlot:()=>s6,xinProxy:()=>wl,xinPath:()=>g9,xin:()=>H,warnDeprecated:()=>y1,version:()=>pl,vars:()=>d,varDefault:()=>k,validateAgainstConstraints:()=>Cl,updates:()=>H4,unobserve:()=>Q1,touchElement:()=>e4,touch:()=>n1,tosiValue:()=>W,tosiUnique:()=>j6,tosiSlot:()=>y6,tosiSetValue:()=>d9,tosiPath:()=>L,tosiLoader:()=>V6,tosiBlueprint:()=>_6,tosi:()=>S,throttle:()=>n2,sync:()=>z6,svgElements:()=>B0,share:()=>a6,settings:()=>p0,scrollListItemIntoView:()=>M9,onThemePreferencesChange:()=>G9,onStylesheetChange:()=>K9,on:()=>d2,observe:()=>T4,mathML:()=>cl,makeComponent:()=>M4,invertLuminance:()=>Y4,initVars:()=>Q9,hotReload:()=>x6,getThemePreferences:()=>sl,getListItem:()=>U1,getListInstance:()=>u4,getListBinding:()=>v0,getCssVar:()=>ll,elements:()=>w,deprecated:()=>e,deleteListItem:()=>e9,debounce:()=>Q2,css:()=>C2,boxedProxy:()=>L4,boxed:()=>o1,blueprintLoader:()=>O6,blueprint:()=>P6,bindings:()=>P1,bindParts:()=>H9,bind:()=>Z1,StyleSheet:()=>O1,MoreMath:()=>U9,Component:()=>a,Color:()=>f,BlueprintLoader:()=>m4,Blueprint:()=>j0});function L1(l){if(l==null||typeof l!=="object")return l;if(l instanceof Set)return new Set(l);else if(Array.isArray(l))return l.map(L1);let i={};for(let o in l){let y=l[o];if(l!=null&&typeof l==="object")i[o]=L1(y);else i[o]=y}return i}var H3="-xin-data",r2=`.${H3}`,Y3="-xin-event",z3=`.${Y3}`,B1=Symbol.for("xin-path"),M1=Symbol.for("xin-value"),f3="xinObserve",j3="xinBind",A3="xinOn",k0=Symbol("list-binding"),K2=Symbol("list-instance"),O4=new Map;function n9(l,i){let o=O4.get(l);if(o===void 0)o=new Set,O4.set(l,o);o.add(i)}function C9(l){return O4.get(l)}var q3=new Set;function y1(l,i){if(!q3.has(l))console.warn(i),q3.add(l)}function e(l,i){let o=!1;return(...y)=>{if(!o)console.warn(i),o=!0;return l(...y)}}var L=(l)=>{return l&&l[B1]||void 0};function W(l){if(typeof l==="object"&&l!==null){let i=l[M1];return i!==void 0?i:l}return l}function d9(l,i){if(L(l)===void 0)throw Error("tosiSetValue requires a xin or boxed proxy");l[M1]=i}var g9=e(L,"xinPath is deprecated. Use tosiPath instead."),k9=e(W,"xinValue is deprecated. Use tosiValue instead."),b2=new WeakMap,m1=new WeakMap,F2=(l)=>{let i=l.cloneNode();if(i instanceof Element){let o=m1.get(l),y=b2.get(l);if(o!=null)m1.set(i,L1(o));if(y!=null)b2.set(i,L1(y))}for(let o of Array.from(l instanceof HTMLTemplateElement?l.content.childNodes:l.childNodes))if(o instanceof Element||o instanceof DocumentFragment)i.appendChild(F2(o));else i.appendChild(o.cloneNode());return i},p0={debug:!1,perf:!1},p9=(l)=>{try{return JSON.stringify(l)}catch(i){return"{has circular references}"}},I3=(...l)=>Error(l.map(p9).join(" ")),w9=()=>new Date(parseInt("1000000000",36)+Date.now()).valueOf().toString(36).slice(1),t9=0,a9=()=>(parseInt("10000",36)+ ++t9).toString(36).slice(-5),S3=()=>w9()+a9(),U4=Symbol("delete"),D3=Symbol("new-object"),v4=Symbol("automatic-index");function T3(l){if(l==="")return[];if(Array.isArray(l))return l;else{let i=[];while(l.length>0){let o=l.search(/\[[^\]]+\]/);if(o===-1){i.push(l.split("."));break}else{let y=l.slice(0,o);if(l=l.slice(o),y!=="")i.push(y.split("."));if(o=l.indexOf("]")+1,i.push(l.slice(1,o-1)),l.slice(o,o+1)===".")o+=1;l=l.slice(o)}}return i}}var V1=new WeakMap;function u3(l,i){if(V1.get(l)===void 0)V1.set(l,{});if(V1.get(l)[i]===void 0)V1.get(l)[i]={};let o=V1.get(l)[i];if(i==="_auto_")l.forEach((y,s)=>{if(y[v4]===void 0)y[v4]=S3();o[y[v4]+""]=s});else l.forEach((y,s)=>{o[u(y,i)+""]=s});return o}function B9(l,i){if(V1.get(l)===void 0||V1.get(l)[i]===void 0)return u3(l,i);else return V1.get(l)[i]}function v9(l,i,o){o=o+"";let y=B9(l,i)[o];if(y===void 0||u(l[y],i)+""!==o)y=u3(l,i)[o];return y}function z9(l,i,o){if(l[i]===void 0&&o!==void 0)l[i]=o;return l[i]}function e3(l,i,o,y){let s=i!==""?v9(l,i,o):o;if(y===U4)return l.splice(s,1),V1.delete(l),Symbol("deleted");else if(y===D3){if(i===""&&l[s]===void 0)l[s]={}}else if(y!==void 0)if(s!==void 0)l[s]=y;else if(i!==""&&u(y,i)+""===o+"")l.push(y),s=l.length-1;else throw Error(`byIdPath insert failed at [${i}=${o}]`);return l[s]}function _3(l){if(!Array.isArray(l))throw I3("setByPath failed: expected array, found",l)}function V3(l){if(l==null||!(l instanceof Object))throw I3("setByPath failed: expected Object, found",l)}function u(l,i){let o=T3(i),y=l,s,x,h,c;for(s=0,x=o.length;y!==void 0&&s<x;s++){let r=o[s];if(Array.isArray(r))for(h=0,c=r.length;y!==void 0&&h<c;h++){let n=r[h];y=y[n]}else if(y.length===0){if(y=y[Number(r.slice(1))],r[0]!=="=")return}else if(r.includes("=")){let[n,...C]=r.split("=");y=e3(y,n,C.join("="))}else h=parseInt(r,10),y=y[h]}return y}function a0(l,i,o){let y=l;if(i==="")throw Error("setByPath cannot be used to set the root object");let s=T3(i);while(y!=null&&s.length>0){let x=s.shift();if(typeof x==="string"){let h=x.indexOf("=");if(h>-1){if(h===0)V3(y);else _3(y);let c=x.slice(0,h),r=x.slice(h+1);if(y=e3(y,c,r,s.length>0?D3:o),s.length===0)return!0}else{_3(y);let c=parseInt(x,10);if(s.length>0)y=y[c];else{if(o!==U4){if(y[c]===o)return!1;y[c]=o}else y.splice(c,1);return!0}}}else if(Array.isArray(x)&&x.length>0){V3(y);while(x.length>0){let h=x.shift();if(x.length>0||s.length>0)y=z9(y,h,x.length>0?{}:[]);else{if(o!==U4){if(y[h]===o)return!1;y[h]=o}else{if(!Object.prototype.hasOwnProperty.call(y,h))return!1;delete y[h]}return!0}}}else throw Error(`setByPath failed, bad path ${i}`)}throw Error(`setByPath(${l}, ${i}, ${o}) failed`)}var s1={},X4=null,f9=(l)=>{X4=l},$4=()=>{if(X4===null)throw Error("xin proxy not initialized");return X4},N4=null,K4=null,j9=(l,i)=>{N4=l,K4=i},n0=()=>{if(N4===null)throw Error("bind not initialized");return N4},C0=()=>{if(K4===null)throw Error("on not initialized");return K4},P3=Symbol("observer should be removed"),w0=[],c2=[],b4=!1,F4,W4;function A9(l,i,o,y){let s=C9(l);if(s===void 0)return[];let x=[];for(let h of s){let c=u(o,h);if(c!==void 0)x.push(`${l}[${h}=${c}]${y}`)}return x}class L3{description;test;callback;constructor(l,i){let o=typeof i==="string"?`"${i}"`:`function ${i.name}`,y;if(typeof l==="string")this.test=(s)=>typeof s==="string"&&s!==""&&(l.startsWith(s)||s.startsWith(l)),y=`test = "${l}"`;else if(l instanceof RegExp)this.test=l.test.bind(l),y=`test = "${l.toString()}"`;else if(l instanceof Function)this.test=l,y=`test = function ${l.name}`;else throw Error("expect listener test to be a string, RegExp, or test function");if(this.description=`${y}, ${o}`,typeof i==="function")this.callback=i;else throw Error("expect callback to be a path or function");w0.push(this)}}var H4=async()=>{if(F4===void 0)return;await F4},q9=()=>{if(p0.perf)console.time("xin async update");let l=Array.from(c2);c2.length=0,b4=!1;for(let i of l)w0.filter((o)=>{let y;try{y=o.test(i)}catch(s){throw Error(`Listener ${o.description} threw "${s}" at "${i}"`)}if(y===P3)return Q1(o),!1;return y}).forEach((o)=>{let y;try{y=o.callback(i)}catch(s){console.error(`Listener ${o.description} threw "${s}" handling "${i}"`)}if(y===P3)Q1(o)});if(typeof W4==="function")W4();if(p0.perf)console.timeEnd("xin async update")},n1=(l)=>{let i=typeof l==="string"?l:L(l);if(i===void 0)throw console.error("touch was called on an invalid target",l),Error("touch was called on an invalid target");if(b4===!1)F4=new Promise((y)=>{W4=y}),b4=setTimeout(q9);if(c2.find((y)=>i.startsWith(y))==null)c2.push(i);let o=i.match(/^(.+)\[(\d+)\](.*)$/);if(o!==null){let[,y,s,x]=o,h=parseInt(s,10),c=u(s1,`${y}[${h}]`);if(c!=null){let r=A9(y,h,c,x);for(let n of r)if(c2.find((C)=>n.startsWith(C))==null)c2.push(n)}}},W1=(l,i)=>{return new L3(l,i)},Q1=(l)=>{let i=w0.indexOf(l);if(i>-1)w0.splice(i,1);else throw Error("unobserve failed, listener not found")},M3=(l,i)=>{let o=new Event(i);l.dispatchEvent(o)},m3=(l)=>{if(l instanceof HTMLInputElement)return l.type;else if(l instanceof HTMLSelectElement&&l.hasAttribute("multiple"))return"multi-select";else return"other"},_9=(l,i)=>{switch(m3(l)){case"radio":l.checked=l.value===i;break;case"checkbox":l.checked=!!i;break;case"date":l.valueAsDate=new Date(i);break;case"multi-select":for(let o of Array.from(l.querySelectorAll("option")))o.selected=i[o.value];break;default:l.value=i}},V9=(l)=>{switch(m3(l)){case"radio":{let i=l.parentElement?.querySelector(`[name="${l.name}"]:checked`);return i!=null?i.value:null}case"checkbox":return l.checked;case"date":return l.valueAsDate?.toISOString();case"multi-select":return Array.from(l.querySelectorAll("option")).reduce((i,o)=>{return i[o.value]=o.selected,i},{});default:return l.value}},{ResizeObserver:O3}=globalThis,Q4=O3!=null?new O3((l)=>{for(let i of l){let o=i.target;M3(o,"resize")}}):{observe(){},unobserve(){}},U3=(l,i,o=!0)=>{if(l!=null&&i!=null)if(typeof i==="string")l.textContent=i;else if(Array.isArray(i))i.forEach((y)=>{l.append(y instanceof Node&&o?F2(y):y)});else if(i instanceof Node)l.append(o?F2(i):i);else throw Error("expect text content or document node")},Q2=(l,i=250)=>{let o;return(...y)=>{if(o!==void 0)clearTimeout(o);o=setTimeout(()=>{l(...y)},i)}},n2=(l,i=250)=>{let o,y=Date.now()-i,s=!1;return(...x)=>{if(clearTimeout(o),o=setTimeout(()=>{l(...x),y=Date.now()},i),!s&&Date.now()-y>=i){s=!0;try{l(...x),y=Date.now()}finally{s=!1}}}},P1={value:{toDOM:_9,fromDOM(l){return V9(l)}},text:{toDOM(l,i){l.textContent=i}},enabled:{toDOM(l,i){l.disabled=!i}},disabled:{toDOM(l,i){l.disabled=Boolean(i)}},list:{toDOM(l,i,o){v0(l,i,o).update(i)}}};function a1(l){return l.replace(/[A-Z]/g,(i)=>{return`-${i.toLocaleLowerCase()}`})}function E3(l){return l.replace(/-([a-z])/g,(i,o)=>{return o.toLocaleUpperCase()})}var P9=180/Math.PI,O9=Math.PI/180;function t1(l,i,o){return o<l?NaN:i<l?l:i>o?o:i}function b1(l,i,o,y=!0){if(y)o=t1(0,o,1);return o*(i-l)+l}var U9={RADIANS_TO_DEGREES:P9,DEGREES_TO_RADIANS:O9,clamp:t1,lerp:b1};function ll(l,i=document.body){let o=getComputedStyle(i);if(l.endsWith(")")&&l.startsWith("var("))l=l.slice(4,-1);return o.getPropertyValue(l).trim()}var X9=(l,i,o)=>{return(0.299*l+0.587*i+0.114*o)/255},T1=(l)=>("00"+Math.round(Number(l)).toString(16)).slice(-2);class il{h;s;l;constructor(l,i,o){l/=255,i/=255,o/=255;let y=Math.max(l,i,o),s=y-Math.min(l,i,o),x=s!==0?y===l?(i-o)/s:y===i?2+(o-l)/s:4+(l-i)/s:0;this.h=60*x<0?60*x+360:60*x,this.s=s!==0?y<=0.5?s/(2*y-s):s/(2-(2*y-s)):0,this.l=(2*y-s)/2}}var F1=globalThis.document!==void 0?globalThis.document.createElement("span"):void 0;if(F1)F1.style.display="none";class f{r;g;b;a;static fromVar(l,i=document.body){return f.fromCss(ll(l,i))}static fromCss(l){let i=l.match(/^#([0-9a-fA-F]+)$/);if(i){let r=i[1];if(r.length===3)return new f(parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16));if(r.length===4)return new f(parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)/255);if(r.length===6)return new f(parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16));if(r.length===8)return new f(parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),parseInt(r.slice(6,8),16)/255)}let o=l;if(F1 instanceof HTMLSpanElement)F1.style.color="black",F1.style.color=l,document.body.appendChild(F1),o=getComputedStyle(F1).color,F1.remove();let[y,s,x,h]=o.match(/[\d.]+/g)||["0","0","0","0"],c=o.startsWith("color(srgb")?255:1;return new f(Number(y)*c,Number(s)*c,Number(x)*c,h==null?1:Number(h))}static fromHsl(l,i,o,y=1){let s,x,h;if(i===0)s=x=h=o;else{let r=(p,z,B)=>{if(B<0)B+=1;if(B>1)B-=1;if(B<0.16666666666666666)return p+(z-p)*6*B;if(B<0.5)return z;if(B<0.6666666666666666)return p+(z-p)*(0.6666666666666666-B)*6;return p},n=o<0.5?o*(1+i):o+i-o*i,C=2*o-n,g=(l%360+360)%360/360;s=r(C,n,g+0.3333333333333333),x=r(C,n,g),h=r(C,n,g-0.3333333333333333)}let c=new f(s*255,x*255,h*255,y);return c.hslCached={h:(l%360+360)%360,s:i,l:o},c}static black=new f(0,0,0);static white=new f(255,255,255);constructor(l,i,o,y=1){this.r=t1(0,l,255),this.g=t1(0,i,255),this.b=t1(0,o,255),this.a=t1(0,y,1)}get inverse(){return new f(255-this.r,255-this.g,255-this.b,this.a)}get inverseLuminance(){let{h:l,s:i,l:o}=this._hsl;return f.fromHsl(l,i,1-o,this.a)}get opaque(){return this.a===1?this:new f(this.r,this.g,this.b,1)}contrasting(l=1){return this.opaque.blend(this.brightness>0.5?f.black:f.white,l)}get rgb(){let{r:l,g:i,b:o}=this;return`rgb(${l.toFixed(0)},${i.toFixed(0)},${o.toFixed(0)})`}get rgba(){let{r:l,g:i,b:o,a:y}=this;return`rgba(${l.toFixed(0)},${i.toFixed(0)},${o.toFixed(0)},${y.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 il(this.r,this.g,this.b);return this.hslCached}get hsl(){let{h:l,s:i,l:o}=this._hsl;return`hsl(${l.toFixed(0)}deg ${(i*100).toFixed(0)}% ${(o*100).toFixed(0)}%)`}get hsla(){let{h:l,s:i,l:o}=this._hsl;return`hsl(${l.toFixed(0)}deg ${(i*100).toFixed(0)}% ${(o*100).toFixed(0)}% / ${(this.a*100).toFixed(0)}%)`}get mono(){let l=this.brightness*255;return new f(l,l,l)}get brightness(){return X9(this.r,this.g,this.b)}get html(){return this.toString()}toString(){return this.a===1?"#"+T1(this.r)+T1(this.g)+T1(this.b):"#"+T1(this.r)+T1(this.g)+T1(this.b)+T1(Math.floor(255*this.a))}brighten(l){let{h:i,s:o,l:y}=this._hsl,s=t1(0,y+l*(1-y),1);return f.fromHsl(i,o,s,this.a)}darken(l){let{h:i,s:o,l:y}=this._hsl,s=t1(0,y*(1-l),1);return f.fromHsl(i,o,s,this.a)}saturate(l){let{h:i,s:o,l:y}=this._hsl,s=t1(0,o+l*(1-o),1);return f.fromHsl(i,s,y,this.a)}desaturate(l){let{h:i,s:o,l:y}=this._hsl,s=t1(0,o*(1-l),1);return f.fromHsl(i,s,y,this.a)}rotate(l){let{h:i,s:o,l:y}=this._hsl,s=(i+360+l)%360;return f.fromHsl(s,o,y,this.a)}opacity(l){let{h:i,s:o,l:y}=this._hsl;return f.fromHsl(i,o,y,l)}swatch(){return console.log(`%c %c ${this.html}, ${this.rgba}`,`background-color: ${this.html}`,"background-color: transparent"),this}blend(l,i){return new f(b1(this.r,l.r,i),b1(this.g,l.g,i),b1(this.b,l.b,i),b1(this.a,l.a,i))}static blendHue(l,i,o){let y=(i-l+720)%360;if(y<180)return l+o*y;else return l-(360-y)*o}mix(l,i){let o=this._hsl,y=l._hsl;return f.fromHsl(o.s===0?y.h:y.s===0?o.h:f.blendHue(o.h,y.h,i),b1(o.s,y.s,i),b1(o.l,y.l,i),b1(this.a,l.a,i))}colorMix(l,i){return f.fromCss(`color-mix(in hsl, ${this.html}, ${l.html} ${(i*100).toFixed(0)}%)`)}static computedColorStylesheet=null;static computedColors=new Map;static recomputeQueued=!1;static registerComputedColor(l,i,o,y){if(!f.computedColors.has(l))f.computedColors.set(l,{varName:i,scale:o,method:y}),f.queueRecompute()}static queueRecompute(){if(f.recomputeQueued)return;f.recomputeQueued=!0,queueMicrotask(()=>{f.recomputeQueued=!1,f.recomputeColors()})}static recomputeColors(){if(f.computedColors.size===0)return;let l=[];for(let[o,{varName:y,scale:s,method:x}]of f.computedColors)try{let h=f.fromVar(y),c;switch(x){case"b":c=s>0?h.brighten(s):h.darken(-s);break;case"s":c=s>0?h.saturate(s):h.desaturate(-s);break;case"h":c=h.rotate(s*100);break;case"o":c=h.opacity(s);break;default:continue}l.push(` ${o}: ${c.rgba};`)}catch(h){}if(l.length===0)return;let i=`:root {
2
2
  ${l.join(`
3
3
  `)}
4
- }`;if(f.computedColorStylesheet===null)f.computedColorStylesheet=document.createElement("style"),f.computedColorStylesheet.id="tosijs-computed-colors",document.head.append(f.computedColorStylesheet);f.computedColorStylesheet.textContent=i}}var t0=new Set,X3=!1;function U9(){if(!X3)X3=!0,t0.add(()=>f.queueRecompute())}function X9(l){return t0.add(l),()=>t0.delete(l)}function N9(){U9();for(let l of t0)l()}function O1(l,i){let o=W(i),y=w.style(C2(o));y.id=l,document.head.append(y);let s=L(i);if(s!==void 0)T4(s,()=>{y.textContent=C2(W(i)),N9()})}var K9=/^(animation-iteration-count|column-count|flex(-grow|-shrink)?|font-weight|line-height|opacity|order|orphans|scale|tab-size|widows|z-index|zoom)$/,ol=(l,i)=>{if(typeof i==="number"&&!K9.test(l))i=`${i}px`;if(l.startsWith("_"))if(l.startsWith("__"))l="--"+l.substring(2),i=`var(${l}-default, ${i})`;else l="--"+l.substring(1);return{prop:l,value:String(i)}},b9=(l,i,o)=>{if(o===void 0)return"";if(o instanceof f)o=o.html;let y=ol(i,o);return`${l} ${y.prop}: ${y.value};`},yl=(l,i,o="")=>{let y=a1(l);if(typeof i==="object"&&!(i instanceof f)){let s=Object.keys(i).map((x)=>yl(x,i[x],`${o} `)).join(`
4
+ }`;if(f.computedColorStylesheet===null)f.computedColorStylesheet=document.createElement("style"),f.computedColorStylesheet.id="tosijs-computed-colors",document.head.append(f.computedColorStylesheet);f.computedColorStylesheet.textContent=i}}var t0=new Set,X3=!1;function N9(){if(!X3)X3=!0,t0.add(()=>f.queueRecompute())}function K9(l){return t0.add(l),()=>t0.delete(l)}function b9(){N9();for(let l of t0)l()}function O1(l,i){let o=W(i),y=w.style(C2(o));y.id=l,document.head.append(y);let s=L(i);if(s!==void 0)T4(s,()=>{y.textContent=C2(W(i)),b9()})}var F9=/^(animation-iteration-count|column-count|flex(-grow|-shrink)?|font-weight|line-height|opacity|order|orphans|scale|tab-size|widows|z-index|zoom)$/,ol=(l,i)=>{if(typeof i==="number"&&!F9.test(l))i=`${i}px`;if(l.startsWith("_"))if(l.startsWith("__"))l="--"+l.substring(2),i=`var(${l}-default, ${i})`;else l="--"+l.substring(1);return{prop:l,value:String(i)}},W9=(l,i,o)=>{if(o===void 0)return"";if(o instanceof f)o=o.html;let y=ol(i,o);return`${l} ${y.prop}: ${y.value};`},yl=(l,i,o="")=>{let y=a1(l);if(typeof i==="object"&&!(i instanceof f)){let s=Object.keys(i).map((x)=>yl(x,i[x],`${o} `)).join(`
5
5
  `);return`${o} ${l} {
6
6
  ${s}
7
- ${o} }`}else return b9(o,y,i)},C2=(l,i="")=>{return Object.keys(l).map((o)=>{let y=l[o];if(typeof y==="string"){if(o==="@import")return`@import url('${y}');`;throw Error("top-level string value only allowed for `@import`")}let s=Object.keys(y).map((x)=>yl(x,y[x])).join(`
7
+ ${o} }`}else return W9(o,y,i)},C2=(l,i="")=>{return Object.keys(l).map((o)=>{let y=l[o];if(typeof y==="string"){if(o==="@import")return`@import url('${y}');`;throw Error("top-level string value only allowed for `@import`")}let s=Object.keys(y).map((x)=>yl(x,y[x])).join(`
8
8
  `);return`${i}${o} {
9
9
  ${s}
10
10
  }`}).join(`
11
11
 
12
- `)},F9=(l)=>{y1("initVars","initVars is deprecated. Just use _ and __ prefixes instead.");let i={};for(let o of Object.keys(l)){let y=l[o],s=a1(o);i[`--${s}`]=typeof y==="number"&&y!==0?String(y)+"px":y}return i},Y4=(l)=>{let i={};for(let o of Object.keys(l)){let y=l[o];if(y instanceof f)i[o]=y.inverseLuminance;else if(typeof y==="string"&&y.match(/^(#[0-9a-fA-F]{3}|rgba?\(|hsla?\()/))i[o]=f.fromCss(y).inverseLuminance}return i},g=new Proxy({},{get(l,i){if(l[i]===void 0){let o="--"+a1(i);l[i]=(y)=>`var(${o}, ${y})`}return l[i]}}),d=new Proxy({},{get(l,i){if(i==="default")return g;if(l[i]==null){i=a1(i);let[,o,,y,s,x]=i.match(/^([-\w]*?)((_)?(\d+)(\w?))?$/)||["",i],h=`--${o}`;if(s!=null){let c=y==null?Number(s)/100:-Number(s)/100;switch(x){case"b":case"s":case"h":case"o":{let r=`--${i}`;f.registerComputedColor(r,h,c,x),l[i]=`var(${r})`}break;case"":l[i]=`calc(var(${h}) * ${c})`;break;default:throw console.error(x),Error(`Unrecognized method ${x} for css variable ${h}`)}}else l[i]=`var(${h})`}return l[i]}});function sl(){let l=(i)=>typeof matchMedia<"u"&&matchMedia(i).matches;return{colorScheme:l("(prefers-color-scheme: dark)")?"dark":"light",contrast:l("(prefers-contrast: more)")?"more":l("(prefers-contrast: less)")?"less":l("(prefers-contrast: custom)")?"custom":"no-preference",reducedMotion:l("(prefers-reduced-motion: reduce)"),reducedTransparency:l("(prefers-reduced-transparency: reduce)"),forcedColors:l("(forced-colors: active)")}}function W9(l){if(typeof matchMedia>"u")return()=>{};let i=["(prefers-color-scheme: dark)","(prefers-contrast: more)","(prefers-contrast: less)","(prefers-contrast: custom)","(prefers-reduced-motion: reduce)","(prefers-reduced-transparency: reduce)","(forced-colors: active)"],o=()=>l(sl()),y=i.map((s)=>matchMedia(s));for(let s of y)s.addEventListener("change",o);return()=>{for(let s of y)s.removeEventListener("change",o)}}var Q9="http://www.w3.org/1998/Math/MathML",G9="http://www.w3.org/2000/svg",d0={},xl=(l,i,o)=>{let y=ol(a1(i),o);if(y.prop.startsWith("--"))l.style.setProperty(y.prop,y.value);else l.style[i]=y.value},Z9=(l)=>{return{toDOM(i,o){xl(i,l,o)}}},hl=(l,i,o)=>{if(i==="style")if(typeof o==="object")for(let y of Object.keys(o))if(L(o[y]))Z1(l,o[y],Z9(y));else xl(l,y,o[y]);else l.setAttribute("style",o);else{let y=a1(i),s=l.constructor.observedAttributes;if(s?.includes(i)||s?.includes(y))if(typeof o==="boolean")o?l.setAttribute(y,""):l.removeAttribute(y);else l.setAttribute(y,o);else if(l[i]!==void 0){let{MathMLElement:x}=globalThis;if(l instanceof SVGElement||x!==void 0&&l instanceof x)l.setAttribute(i,o);else l[i]=o}else if(y==="class")o.split(" ").forEach((x)=>{l.classList.add(x)});else if(l[y]!==void 0)l[y]=o;else if(typeof o==="boolean")o?l.setAttribute(y,""):l.removeAttribute(y);else l.setAttribute(y,o)}},z4={},R9=(l)=>{if(!z4[l])z4[l]={toDOM(i,o){hl(i,l,o)}};return z4[l]},I4=(l,i,o)=>{if(i==="apply")o(l);else if(i.match(/^on[A-Z]/)!=null){let y=i.substring(2).toLowerCase();d2(l,y,o)}else if(i==="bind")if((typeof o.binding==="string"?P1[o.binding]:o.binding)!==void 0&&o.value!==void 0)Z1(l,o.value,o.binding instanceof Function?{toDOM:o.binding}:o.binding);else throw Error("bad binding");else if(i.match(/^bind[A-Z]/)!=null){let y=i.substring(4,5).toLowerCase()+i.substring(5),s=P1[y];if(s!==void 0)Z1(l,o,s);else throw Error(`${i} is not allowed, bindings.${y} is not defined`)}else if(L(o))Z1(l,o,R9(i));else hl(l,i,o)},S4=(l,...i)=>{if(d0[l]===void 0){let[s,x]=l.split("|");if(x===void 0)d0[l]=globalThis.document.createElement(s);else d0[l]=globalThis.document.createElementNS(x,s)}let o=d0[l].cloneNode(),y={};for(let s of i)if(s instanceof Element||s instanceof DocumentFragment||typeof s==="string"||typeof s==="number")if(o instanceof HTMLTemplateElement)o.content.append(s);else o.append(s);else if(L(s))o.append(w.span({bindText:s}));else Object.assign(y,s);for(let s of Object.keys(y)){let x=y[s];I4(o,s,x)}return o},D4=(...l)=>{let i=globalThis.document.createDocumentFragment();for(let o of l)i.append(o);return i},w=new Proxy({fragment:D4},{get(l,i){if(i=i.replace(/[A-Z]/g,(o)=>`-${o.toLocaleLowerCase()}`),l[i]===void 0)l[i]=(...o)=>S4(i,...o);return l[i]},set(){throw Error("You may not add new properties to elements")}}),B0=new Proxy({fragment:D4},{get(l,i){if(l[i]===void 0)l[i]=(...o)=>S4(`${i}|${G9}`,...o);return l[i]},set(){throw Error("You may not add new properties to elements")}}),cl=new Proxy({fragment:D4},{get(l,i){if(l[i]===void 0)l[i]=(...o)=>S4(`${i}|${Q9}`,...o);return l[i]},set(){throw Error("You may not add new properties to elements")}}),N3=new WeakSet;function J9(l,i,o="part"){let y=`[data-${o}]`;for(let s of Array.from(l.querySelectorAll(y))){if(N3.has(s))continue;let x=s.getAttribute(`data-${o}`);if(x==null)continue;let h=i[x];if(h==null)continue;N3.add(s);for(let c of Object.keys(h))I4(s,c,h[c])}}var H9=["sort","splice","copyWithin","fill","pop","push","reverse","shift","unshift"],$9=!0,Y9=/^\.?([^.[\](),])+(\.[^.[\](),]+|\[\d+\]|\[[^=[\](),]*=[^[\]()]+\])*$/,I9=(l)=>Y9.test(l),K1=(l="",i="")=>{if(l==="")return i;else if(i.match(/^\d+$/)!==null||i.includes("="))return`${l}[${i}]`;else return`${l}.${i}`},rl={};function f4(l,i){if(l!==null&&(typeof l==="object"||typeof l==="function"))return l;return new Proxy(rl,G1(i,!0))}var U2=()=>new Proxy({},G1("^",!0)),j4=(l)=>{let i=l(U2())?.path;if(!i?.startsWith("^."))throw Error("selector must return a property of the item");return i.substring(2)},A4=(l,i,o)=>{for(let y=0;y<l.length;y++)if(`${e(l[y],i)}`===`${o}`)return y;return-1},K3=(l,i)=>({listFind(o,y){if(o instanceof Element){let h=o;while(h&&!h[K2]&&h.parentElement)h=h.parentElement;let c=h?.[K2];if(c==null)return;let r=i.indexOf(c);return r!==-1?o1[l][r]:void 0}let s=j4(o),x=A4(i,s,y);return x!==-1?o1[l][x]:void 0},listUpdate(o,y){let s=j4(o),x=e(y,s),h=A4(i,s,x);if(h!==-1){let c=o1[l][h];for(let r of Object.keys(y))c[r]=y[r];return c}return o1[l].push(y),o1[l][i.length-1]},listRemove(o,y){let s=j4(o),x=A4(i,s,y);if(x===-1)return!1;return o1[l].splice(x,1),!0}}),b3=!1;function e1(){if(!b3)console.warn("xinValue, tosiValue, xinPath, tosiPath, etc. are deprecated. Use value, path, observe, bind, on, binding, listBinding instead."),b3=!0}var F3=(l)=>{return l===rl},G1=(l,i)=>({get(o,y){if(F3(o)){let c=()=>e(s1,l);switch(y){case"path":return l;case"value":return c();case"valueOf":case"toJSON":return()=>c();case Symbol.toPrimitive:return(n)=>{let C=c();if(n==="number")return Number(C);if(n==="string")return String(C);return C};case"toString":return()=>String(c());case"touch":return()=>n1(l);case"observe":return(n)=>{let C=W1(l,n);return()=>Q1(C)};case"on":return(n,C)=>C0()(n,C,c());case"bind":return(n,C,k)=>{n0()(n,l,C,k)};case"binding":return(n)=>({bind:{value:l,binding:n}});case"listBinding":return(n=({span:k})=>k({bindText:"^"}),C={})=>[{bindList:{value:l,...C}},w.template(n(w,U2()))];case"listFind":case"listUpdate":case"listRemove":return K3(l,o)[y];case M1:case"xinValue":case"tosiValue":return e1(),c();case B1:case"xinPath":case"tosiPath":return e1(),l;case f3:case"tosiObserve":return e1(),(n)=>{let C=W1(l,n);return()=>Q1(C)};case A3:case"tosiOn":return e1(),(n,C)=>C0()(n,C,c());case j3:case"tosiBind":return e1(),(n,C,k)=>{n0()(n,l,C,k)};case"tosiBinding":return e1(),(n)=>({bind:{value:l,binding:n}});case"tosiListBinding":return e1(),(n=({span:k})=>k({bindText:"^"}),C={})=>[{bindList:{value:l,...C}},w.template(n(w,U2()))]}let r=c();if(r!=null){let n=Object(r);if(y in n){let C=n[y];return typeof C==="function"?C.bind(n):C}}return}if(i&&!(y in o))switch(y){case"path":return l;case"value":return o.valueOf?o.valueOf():o;case"valueOf":case"toJSON":return()=>o.valueOf?o.valueOf():o;case"touch":return()=>n1(l);case"observe":return(c)=>{let r=W1(l,c);return()=>Q1(r)};case"on":return(c,r)=>C0()(c,r,W(o));case"bind":return(c,r,n)=>{n0()(c,l,r,n)};case"binding":return(c)=>({bind:{value:l,binding:c}});case"listBinding":return(c=({span:n})=>n({bindText:"^"}),r={})=>[{bindList:{value:l,...r}},w.template(c(w,U2()))];case"listFind":case"listUpdate":case"listRemove":return K3(l,o)[y]}switch(y){case B1:case"xinPath":case"tosiPath":return l;case M1:case"xinValue":case"tosiValue":return o.valueOf?o.valueOf():o;case f3:case"xinObserve":case"tosiObserve":return(c)=>{let r=W1(l,c);return()=>Q1(r)};case A3:case"xinOn":case"tosiOn":return(c,r)=>C0()(c,r,W(o));case j3:case"xinBind":case"tosiBind":return(c,r,n)=>{n0()(c,l,r,n)};case"tosiBinding":return(c)=>({bind:{value:l,binding:c}});case"tosiListBinding":return(c=({span:n})=>n({bindText:"^"}),r={})=>[{bindList:{value:l,...r}},w.template(c(w,U2()))]}if(typeof y==="symbol")return o[y];let s=Object.getOwnPropertyDescriptor(o,y);if(s&&!s.configurable&&!s.writable&&"value"in s)return s.value;let x=y,h=x.match(/^([^.[]+)\.(.+)$/)??x.match(/^([^\]]+)(\[.+)/)??x.match(/^(\[[^\]]+\])\.(.+)$/)??x.match(/^(\[[^\]]+\])\[(.+)$/);if(h!==null){let[,c,r]=h,n=K1(l,c),C=e(o,c);return C!==null&&typeof C==="object"?new Proxy(C,G1(n,i))[r]:C}if(x.startsWith("[")&&x.endsWith("]"))x=x.substring(1,x.length-1);if(!Array.isArray(o)&&o[x]!==void 0||Array.isArray(o)&&x.includes("=")){let c;if(x.includes("=")){let[r,n]=x.split("=");c=o.find((C)=>`${e(C,r)}`===n)}else c=o[x];if(c instanceof Object){let r=K1(l,x);return new Proxy(c instanceof Function?c.bind(o):c,G1(r,i))}else return i?f4(c,K1(l,x)):c}else if(Array.isArray(o)){let c=o[x];return typeof c==="function"?(...r)=>{let n=r.map((k)=>W(k)),C=c.apply(o,n);if(H9.includes(x))n1(l);if(C!=null&&typeof C==="object"){if(x==="find"||x==="findLast"||x==="at"){let k=o.indexOf(C);if(k!==-1)return new Proxy(C,G1(K1(l,String(k)),i))}}return C}:typeof c==="object"?new Proxy(c,G1(K1(l,x),i)):i?f4(c,K1(l,x)):c}else return i?f4(o[x],K1(l,x)):o[x]},set(o,y,s){s=W(s);let x=y===M1||y==="xinValue"||y==="tosiValue"||y==="value"&&(F3(o)||i)?l:K1(l,y);if($9&&!I9(x))throw Error(`setting invalid path ${x}`);if(W($[x])!==s&&a0(s1,x,s))n1(x);return!0}}),T4=(l,i)=>{let o=typeof i==="function"?i:$[i];if(typeof o!=="function")throw Error(`observe expects a function or path to a function, ${i} is neither`);return W1(l,o)},$=new Proxy(s1,G1("",!1));v9($);var o1=new Proxy(s1,G1("",!0)),S9=16,D9=100;function W3(l,i){let o=Array.from(l.querySelectorAll(r2));if(l.matches(r2))o.unshift(l);for(let y of o){let s=m1.get(y);for(let x of s){if(x.path.startsWith("^"))x.path=`${i}${x.path.substring(1)}`;if(x.binding.toDOM!=null)x.binding.toDOM(y,$[x.path])}}}class nl{boundElement;listTop;listBottom;isNamespaced;template;options;itemToElement;array=[];_filteredCache;_update;_previousSlice;static filterBoundObservers=new WeakMap;constructor(l,i,o={}){if(this.boundElement=l,this.itemToElement=new WeakMap,o.idPath!=null){let s=L(i);if(s!=null)c9(s,o.idPath)}if(l.children.length!==1)throw Error("ListBinding expects an element with exactly one child element");if(l.children[0]instanceof HTMLTemplateElement){let s=l.children[0];if(s.content.children.length!==1)throw Error("ListBinding expects a template with exactly one child element");this.template=F2(s.content.children[0])}else this.template=l.children[0],this.template.remove();this.options=o;let y=l.namespaceURI;if(this.isNamespaced=y==="http://www.w3.org/2000/svg"||y==="http://www.w3.org/1998/Math/MathML",this.isNamespaced)this.listTop=null,this.listBottom=null;else 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.boundElement.append(this.listTop),this.boundElement.append(this.listBottom);if(this.boundElement[k0]=this,this.isNamespaced&&o.virtual!=null)console.warn("ListBinding: virtual scrolling is not supported in SVG/MathML containers, ignoring virtual option");if(!this.isNamespaced&&o.virtual!=null)if(Q4.observe(this.boundElement),this._update=n2(()=>{this.update(this.array,!0)},S9),this.boundElement.addEventListener("resize",this._update),o.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:l,visibleProp:i}=this.options,o=this.array;if(l!==void 0)o=o.filter((y)=>y[l]!==!0);if(i!==void 0)o=o.filter((y)=>y[i]===!0);if(this.options.filter&&this.needle!==void 0)o=this.options.filter(o,this.needle);return this._filteredCache=o,o}visibleSlice(){let{virtual:l}=this.options,i=this.filteredArray(),o=0,y=i.length-1,s=0,x=0;if(l!=null&&this.boundElement instanceof HTMLElement){let h=this.boundElement.offsetWidth,c=l.scrollContainer==="window",r,n;if(c){r=window.innerHeight;let p=this.boundElement.getBoundingClientRect();n=Math.max(0,-p.top)}else r=this.boundElement.offsetHeight,n=this.boundElement.scrollTop;let C=l.width!=null?Math.max(1,Math.floor(h/l.width)):l.visibleColumns??1,k=Math.ceil(i.length/C);if(l.minHeight!=null){let p=l.minHeight,z=Math.ceil(r/p)+(l.rowChunkSize||1),B=C*z,j=k*p,V=Math.max(0,j-r),P=V>0?Math.min(1,Math.max(0,n/V)):0,q=Math.max(0,k-z+1),_=P*q,N=Math.floor(_);if(l.rowChunkSize)N-=N%l.rowChunkSize;return o=N*C,y=o+B-1,s=n,x=Math.max(0,j-n-r),{items:i,firstItem:o,lastItem:y,topBuffer:s,bottomBuffer:x,interpolation:{t:P,position:_,scrollTop:n,viewportHeight:r,totalScrollHeight:j,rowHeight:l.height}}}else{let p=Math.ceil(r/l.height)+(l.rowChunkSize||1),z=C*p,B=Math.floor(n/l.height);if(B>k-p+1)B=Math.max(0,k-p+1);if(l.rowChunkSize)B-=B%l.rowChunkSize;o=B*C,y=o+z-1,s=B*l.height,x=Math.max((k-p)*l.height-s,0)}}return{items:i,firstItem:o,lastItem:y,topBuffer:s,bottomBuffer:x}}needle;filter=n2((l)=>{if(this.needle!==l)this.needle=l,this.update(this.array)},D9);update(l,i){if(l==null)l=[];if(this.array=l,!i)this._filteredCache=void 0;let{hiddenProp:o,visibleProp:y}=this.options,s=L(l),x=this.visibleSlice();this.boundElement.classList.toggle("-xin-empty-list",x.items.length===0);let h=this._previousSlice,{firstItem:c,lastItem:r,topBuffer:n,bottomBuffer:C}=x,k=o===void 0&&y===void 0&&i===!0&&h!=null&&c===h.firstItem&&r===h.lastItem;if(k&&x.interpolation==null&&n===h.topBuffer&&C===h.bottomBuffer)return;if(k&&x.interpolation!=null){this._updateInterpolatedBuffers(x);return}this._previousSlice=x;let p=0,z=0,B=0;for(let q of Array.from(this.boundElement.children)){if(q===this.listTop||q===this.listBottom)continue;let _=q[K2];if(_==null)q.remove();else{let N=x.items.indexOf(_);if(N<c||N>r)q.remove(),this.itemToElement.delete(_),p++}}if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(n)+"px",this.listBottom.style.height=String(C)+"px";let j=[],{idPath:V}=this.options;for(let q=c;q<=r;q++){let _=x.items[q];if(_===void 0)continue;let N=this.itemToElement.get(W(_));if(N==null){if(B++,N=F2(this.template),typeof _==="object")this.itemToElement.set(W(_),N),N[K2]=W(_);if(this.listBottom!=null)this.boundElement.insertBefore(N,this.listBottom);else this.boundElement.append(N);if(V!=null){let m=_[V],H=`${s}[${V}=${m}]`;W3(N,H)}else{let m=`${s}[${q}]`;W3(N,m)}}j.push(N)}let P=null;for(let q of j){if(q.previousElementSibling!==P)if(z++,P?.nextElementSibling!=null)this.boundElement.insertBefore(q,P.nextElementSibling);else if(this.listBottom!=null)this.boundElement.insertBefore(q,this.listBottom);else this.boundElement.append(q);P=q}if(x.interpolation!=null)this._updateInterpolatedBuffers(x);if(p0.perf)console.log(s,"updated",{removed:p,created:B,moved:z})}_updateInterpolatedBuffers(l){let{t:i,position:o,scrollTop:y,viewportHeight:s,totalScrollHeight:x,rowHeight:h}=l.interpolation,c=0;for(let k of Array.from(this.boundElement.children)){if(k===this.listTop||k===this.listBottom)continue;c+=k.offsetHeight||h}let r=y,n=y+s-c,C=Math.max(0,i*n+(1-i)*r-o%1*h);if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(C)+"px",this.listBottom.style.height=String(Math.max(0,x-C-c))+"px"}}var v0=(l,i,o)=>{let y=l[k0];if(i&&y===void 0)y=new nl(l,i,o),l[k0]=y;return y},e4=(l)=>{let i;while(!(i=l[K2])&&l&&l.parentElement)l=l.parentElement;return i?{element:l,item:i}:void 0},U1=(l)=>{let i=e4(l);return i?i.item:void 0},T9=(l)=>{let i=e4(l);if(!i)return console.error("deleteListItem failed, element is not part of a list instance",l),!1;let o=v0(i.element.parentElement);if(!o.options.idPath)return console.error("deleteListItem failed, list binding has no idPath",l.parentElement,o),!1;let y=o.array.indexOf(i.item);if(y>-1)return o.array.splice(y,1),!0;return!1},e9={start:"start",middle:"center",end:"end",nearest:"nearest"},u9=(l,i,o={})=>{let y=v0(l);if(y==null)return console.error("scrollListItemIntoView failed, element has no list binding",l),!1;let{position:s="middle"}=o,x=y.filteredArray(),h=W(i)??i,c=x.indexOf(h);if(c===-1)return console.error("scrollListItemIntoView failed, item not found in list",i),!1;let{virtual:r}=y.options;if(r!=null&&l instanceof HTMLElement){let n=r.width!=null?Math.max(1,Math.floor(l.offsetWidth/r.width)):r.visibleColumns??1,C=Math.floor(c/n),k=r.minHeight??r.height,p=Math.ceil(x.length/n),z=r.scrollContainer==="window",B=z?window.innerHeight:l.offsetHeight,j;if(r.minHeight!=null){let V=Math.ceil(B/k)+(r.rowChunkSize||1),P=p*k,q=Math.max(0,P-B),_=Math.max(1,p-V+1),N=C/_;switch(s){case"start":j=N*q;break;case"end":j=Math.max(0,(C-V+1)/_*q);break;case"nearest":{let m=z?Math.max(0,-l.getBoundingClientRect().top):l.scrollTop,H=q>0?m/q:0,E=Math.floor(H*_);if(C<E)j=N*q;else if(C>=E+V)j=Math.max(0,(C-V+1)/_*q);else return!0;break}default:{let m=C-Math.floor(V/2);j=Math.max(0,m)/_*q}}}else{let V=C*r.height;switch(s){case"start":j=V;break;case"end":j=V-B+r.height;break;case"nearest":{let P=z?Math.max(0,-l.getBoundingClientRect().top):l.scrollTop;if(V<P)j=V;else if(V+r.height>P+B)j=V-B+r.height;else return!0;break}default:j=V-(B-r.height)/2}}if(j=Math.max(0,j),z){let V=l.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:V+j,behavior:"smooth"})}else l.scrollTo({top:j,behavior:"smooth"})}else{let n=y.itemToElement.get(h);if(n==null)return console.error("scrollListItemIntoView failed, no DOM element found for item",i),!1;n.scrollIntoView({block:e9[s]??"center",behavior:"smooth"})}return!0},{document:W2,MutationObserver:Q3}=globalThis,u4=(l,i)=>{let o=m1.get(l);if(o==null)return;for(let y of o){let{binding:s,options:x}=y,{path:h}=y,{toDOM:c}=s;if(c!=null){if(h.startsWith("^")){let r=U1(l);if(r!=null&&r[B1]!=null)h=y.path=`${r[B1]}${h.substring(1)}`;else{if(l instanceof HTMLElement)console.warn(`Unresolved relative binding "${h}" —`,l,"is not part of a list. If this is a list template, wrap it in a <template>.");continue}}if(i==null||h.startsWith(i))c(l,H4()[h],x)}}};if(Q3!=null)new Q3((l)=>{l.forEach((i)=>{Array.from(i.addedNodes).forEach((o)=>{if(o instanceof Element)Array.from(o.querySelectorAll(r2)).forEach((y)=>u4(y))})})}).observe(W2.body,{subtree:!0,childList:!0});W1(()=>!0,(l)=>{let i=Array.from(W2.querySelectorAll(r2));for(let o of i)u4(o,l)});var G3=(l)=>{let i=l.target?.closest(r2);while(i!=null){let o=m1.get(i);for(let y of o){let{binding:s,path:x}=y,{fromDOM:h}=s;if(h!=null){let c;try{c=h(i,y.options)}catch(r){throw console.error("Cannot get value from",i,"via",y),Error("Cannot obtain value fromDOM")}if(c!=null){let r=H4(),n=r[x];if(n==null)r[x]=c;else{let C=n[B1]!=null?n[M1]:n,k=c[B1]!=null?c[M1]:c;if(C!==k)r[x]=k}}}}i=i.parentElement.closest(r2)}};if(globalThis.document!=null)W2.body.addEventListener("change",G3,!0),W2.body.addEventListener("input",G3,!0);function Z1(l,i,o,y){if(l instanceof DocumentFragment)throw Error("bind cannot bind to a DocumentFragment");let s;if(typeof i==="object"&&i[B1]===void 0&&y===void 0){let{value:c}=i;s=typeof c==="string"?c:c[B1],y=i,delete y.value}else s=typeof i==="string"?i:i[B1];if(s==null)throw Error("bind requires a path or object with xin Proxy");let{toDOM:x}=o;l.classList?.add($3);let h=m1.get(l);if(h==null)h=[],m1.set(l,h);if(h.push({path:s,binding:o,options:y}),x!=null&&!s.startsWith("^"))n1(s);if(y?.filter&&y?.needle)Z1(l,y.needle,{toDOM(c,r){console.log({needle:r}),c[k0]?.filter(r)}});return l}var Z3=new Set,L9=(l)=>{let i=l?.target?.closest(z3),o=!1,y=new Proxy(l,{get(x,h){if(h==="stopPropagation")return()=>{l.stopPropagation(),o=!0};else{let c=x[h];return typeof c==="function"?c.bind(x):c}}}),s=new Set;while(!o&&i!=null){let x=b2.get(i)[l.type]||s;for(let h of x){if(typeof h==="function")h(y);else{let c=H4()[h];if(typeof c==="function")c(y);else throw Error(`no event handler found at path ${h}`)}if(o)continue}i=i.parentElement!=null?i.parentElement.closest(z3):null}};function d2(l,i,o){let y=b2.get(l);if(l.classList.add(Y3),y==null)y={},b2.set(l,y);if(!y[i])y[i]=new Set;if(y[i].add(o),!Z3.has(i))Z3.add(i),W2.body.addEventListener(i,L9,!0);return()=>{y[i].delete(o)}}z9(Z1,d2);function Cl(l,i){if(!l.internals)return;let o={},y="";if(l.hasAttribute("required")&&i==="")o.valueMissing=!0,y="Please fill out this field.";let s=l.getAttribute("minlength");if(s&&i.length<parseInt(s,10))o.tooShort=!0,y=`Please use at least ${s} characters.`;let x=l.getAttribute("maxlength");if(x&&i.length>parseInt(x,10))o.tooLong=!0,y=`Please use no more than ${x} characters.`;let h=l.getAttribute("pattern");if(h&&i!=="")try{if(!new RegExp(`^(?:${h})$`).test(i))o.patternMismatch=!0,y="Please match the requested format."}catch{}if(Object.keys(o).length>0)l.internals.setValidity(o,y,l);else l.internals.setValidity({})}var M9=0;function q4(){return`custom-elt${(M9++).toString(36)}`}var R3=0,_4=null;function m9(){if(_4===null)_4=new MutationObserver((l)=>{let i=new Set;for(let o of l)if(o.type==="attributes"&&o.target instanceof a){let y=o.target,s=E3(o.attributeName);if(y._legacyTrackedAttrs?.has(s))i.add(y)}for(let o of i)o.queueRender(!1)});return _4}var N2={};function E9(l,i){let o=N2[l],y=C2(i).replace(/:host\(([^)]+)\)/g,`${l}$1`).replace(/:host\b/g,l);N2[l]=o?o+`
13
- `+y:y}function l6(l){if(N2[l])document.head.append(w.style({id:l+"-component"},N2[l]));delete N2[l]}class a extends HTMLElement{static elements=w;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(l){if(this.internals)if(l)this.internals.setValidity({customError:!0},l);else this.internals.setValidity({})}setValidity(l,i,o){this.internals?.setValidity(l,i,o)}setFormValue(l,i){this.internals?.setFormValue(l,i)}static get observedAttributes(){let l=this.initAttributes;if(l)return["hidden",...Object.keys(l).map(a1)];return["hidden"]}instanceId;styleNode;static styleSpec;static styleNode;content=w.slot();isSlotted;static _tagName=null;static get tagName(){return this._tagName}_legacyTrackedAttrs;_attrValues;_valueChanged=!1;static StyleNode(l){return console.warn("StyleNode is deprecated, use static shadowStyleSpec instead"),w.style(C2(l))}static elementCreator(l={}){let i=this;if(!Object.prototype.hasOwnProperty.call(i,"_elementCreator")){if(l.tag!==void 0)y1("elementCreator-tag","Passing tag to elementCreator() is deprecated. Use static preferredTagName instead.");if(l.styleSpec!==void 0)y1("elementCreator-styleSpec","Passing styleSpec to elementCreator() is deprecated. Use static lightStyleSpec instead.");if(l.extends!==void 0)y1("elementCreator-extends","Passing extends to elementCreator() is deprecated. Use static extends instead.");let o=l.tag??i.preferredTagName;if(o==null)if(typeof i.name==="string"&&i.name!==""){if(o=a1(i.name),o.startsWith("-"))o=o.slice(1)}else o=q4();if(customElements.get(o)!=null)console.warn(`${o} is already defined`);if(o.match(/\w+(-\w+)+/)==null)console.warn(`${o} is not a legal tag for a custom-element`),o=q4();while(customElements.get(o)!==void 0)o=q4();i._tagName=o;let y=l.styleSpec??i.lightStyleSpec;if(y!==void 0)E9(o,y);let s=l.extends??i.extends,x=s?{extends:s}:void 0;window.customElements.define(o,this,x),i._elementCreator=w[o]}return i._elementCreator}initAttributes(...l){if(y1("initAttributes","initAttributes() is deprecated. Use static initAttributes = { ... } instead."),!this._legacyTrackedAttrs)this._legacyTrackedAttrs=new Set;for(let y of l)this._legacyTrackedAttrs.add(y);m9().observe(this,{attributes:!0});let i={},o={};l.forEach((y)=>{i[y]=L1(this[y]);let s=a1(y);Object.defineProperty(this,y,{enumerable:!1,get(){if(typeof i[y]==="boolean")return this.hasAttribute(s);else if(this.hasAttribute(s))return typeof i[y]==="number"?parseFloat(this.getAttribute(s)):this.getAttribute(s);else if(o[y]!==void 0)return o[y];else return i[y]},set(x){if(typeof i[y]==="boolean"){if(x!==this[y]){if(x)this.setAttribute(s,"");else this.removeAttribute(s);this.queueRender()}}else if(typeof i[y]==="number"){if(x!==parseFloat(this[y]))this.setAttribute(s,x),this.queueRender()}else if(typeof x==="object"||`${x}`!==`${this[y]}`){if(x===null||x===void 0||typeof x==="object")this.removeAttribute(s);else this.setAttribute(s,x);this.queueRender(),o[y]=x}}})})}initValue(){let l=Object.getOwnPropertyDescriptor(this,"value");if(l===void 0||l.get!==void 0||l.set!==void 0)return;let i=this.hasAttribute("value")?this.getAttribute("value"):L1(this.value);delete this.value,Object.defineProperty(this,"value",{enumerable:!1,get(){return i},set(o){if(i!==o)i=o,this._valueChanged=!0,this.queueRender(!0)}})}_parts;get parts(){let l=this.shadowRoot!=null?this.shadowRoot:this;if(this._parts==null)this._parts=new Proxy({},{get(i,o){if(i[o]===void 0){let y=l.querySelector(`[part="${o}"]`);if(y==null)y=l.querySelector(o);if(y==null)throw Error(`elementRef "${o}" does not exist!`);y.removeAttribute("data-ref"),i[o]=y}return i[o]}});return this._parts}attributeChangedCallback(l,i,o){let y=E3(l);if(!this._legacyTrackedAttrs?.has(y))this.queueRender(!1)}constructor(){super();if(R3+=1,this.constructor.formAssociated&&typeof this.attachInternals==="function"&&!this.internals)this.internals=this.attachInternals();let l=this.constructor.initAttributes;if(l)this._setupAttributeAccessors(l);this.instanceId=`${this.tagName.toLocaleLowerCase()}-${R3}`,this._value=L1(this.defaultValue)}_setupAttributeAccessors(l){if(!this._attrValues)this._attrValues=new Map;for(let i of Object.keys(l)){let o=a1(i),y=l[i];if(i==="value"){console.warn(`${this.tagName}: 'value' cannot be an attribute. Use the Component value property instead.`);continue}if(typeof y==="object"&&y!==null){console.warn(`${this.tagName}: initAttributes.${i} is an object. Use a regular property instead.`);continue}let s=this,x=!1;while(s){let h=Object.getOwnPropertyDescriptor(s,i);if(h){if(!h.configurable||h.get||h.set){x=!0;break}break}s=Object.getPrototypeOf(s)}if(x)continue;Object.defineProperty(this,i,{enumerable:!1,get:()=>{if(typeof y==="boolean")return this.hasAttribute(o);else if(this.hasAttribute(o))return typeof y==="number"?parseFloat(this.getAttribute(o)):this.getAttribute(o);else if(this._attrValues.has(i))return this._attrValues.get(i);else return y},set:(h)=>{if(typeof y==="boolean"){if(h!==this[i]){if(h)this.setAttribute(o,"");else this.removeAttribute(o);this.queueRender()}}else if(typeof y==="number"){if(h!==parseFloat(this[i]))this.setAttribute(o,h),this.queueRender()}else if(typeof h==="object"||`${h}`!==`${this[i]}`){if(h===null||h===void 0||typeof h==="object")this.removeAttribute(o);else this.setAttribute(o,h);this.queueRender(),this._attrValues.set(i,h)}}})}}connectedCallback(){if(l6(this.constructor.tagName),this.hydrate(),this.role!=null)this.setAttribute("role",this.role);if(this.constructor.formAssociated&&!this.hasAttribute("tabindex"))this.setAttribute("tabindex","0");if(this.onResize!==void 0){if(Q4.observe(this),this._onResize==null)this._onResize=this.onResize.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(){Q4.unobserve(this)}formResetCallback(){if(this.value!==void 0)this.value=this.defaultValue??""}formDisabledCallback(l){if(l)this.setAttribute("disabled","");else this.removeAttribute("disabled")}formStateRestoreCallback(l){if(this.value!==void 0&&typeof l==="string")this.value=l}_changeQueued=!1;_renderQueued=!1;queueRender(l=!1){if(!this._hydrated)return;if(!this._changeQueued)this._changeQueued=l;if(!this._renderQueued)this._renderQueued=!0,requestAnimationFrame(()=>{if(this._changeQueued){if(M3(this,"change"),this.internals&&this.value!==void 0)this.internals.setFormValue(this.value)}this._changeQueued=!1,this._renderQueued=!1,this.render()})}_hydrated=!1;hydrate(){if(!this._hydrated){this.initValue();let l=typeof this.content!=="function",i=typeof this.content==="function"?this.content(w):this.content;if(Array.isArray(i)){let x={};i=i.filter((h)=>{if(h instanceof Node||typeof h==="string"||typeof h==="number"||L(h))return!0;return Object.assign(x,h),!1});for(let h of Object.keys(x))I4(this,h,x[h])}let o=this.constructor,y=o.shadowStyleSpec??o.styleSpec;if(o.styleSpec&&!o.shadowStyleSpec)y1("static-styleSpec","static styleSpec is deprecated. Use static shadowStyleSpec instead.");let{styleNode:s}=o;if(y)s=o.styleNode=w.style(C2(y)),delete o.styleNode;if(this.styleNode)console.warn(this,"styleNode is deprecated, use static shadowStyleSpec instead"),s=this.styleNode;if(s){let x=this.attachShadow({mode:"open"});x.appendChild(s.cloneNode(!0)),U3(x,i,l)}else if(i!==null){let x=Array.from(this.childNodes);U3(this,i,l),this.isSlotted=this.querySelector("slot,tosi-slot,xin-slot")!==void 0;let h=Array.from(this.querySelectorAll("slot"));if(h.length>0)h.forEach(z0.replaceSlot);if(x.length>0){let c={"":this};Array.from(this.querySelectorAll("tosi-slot,xin-slot")).forEach((r)=>{c[r.name]=r}),x.forEach((r)=>{let n=c[""],C=r instanceof Element?c[r.slot]:n;(C!==void 0?C:n).append(r)})}}this._hydrated=!0}}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 l=typeof this.value==="string"?this.value:String(this.value);Cl(this,l)}}class z0 extends a{static preferredTagName="tosi-slot";static initAttributes={name:""};content=null;static replaceSlot(l){let i=document.createElement("tosi-slot");if(l.name!=="")i.setAttribute("name",l.name);l.replaceWith(i)}}var i6=z0.elementCreator();class dl extends a{static preferredTagName="xin-slot";static initAttributes={name:""};content=null;constructor(){super();y1("xin-slot","<xin-slot> is deprecated. Use <tosi-slot> instead.")}static replaceSlot=z0.replaceSlot}var o6=dl.elementCreator(),y6=(l=()=>!0)=>{let i=localStorage.getItem("xin-state");if(i!=null){let y=JSON.parse(i);for(let s of Object.keys(y).filter(l))if($[s]!==void 0)Object.assign($[s],y[s]);else $[s]=y[s]}let o=Q2(()=>{let y={},s=W($);for(let x of Object.keys(s).filter(l))y[x]=s[x];localStorage.setItem("xin-state",JSON.stringify(y)),console.log("xin state saved to localStorage")},500);T4(l,o)},s6="tosijs-share",x6="tosijs-share",X2="shared",h6=1,G4=new Set,Z4=new Set,V4=new Map,u1=null,R4="",g0=null,c6=null;function J3(){if(g0!=null)return Promise.resolve(g0);return new Promise((l,i)=>{let o=indexedDB.open(x6,h6);o.onupgradeneeded=()=>{o.result.createObjectStore(X2)},o.onsuccess=()=>{g0=o.result,l(g0)},o.onerror=()=>i(o.error)})}var r6={async get(l){let i=await J3();return new Promise((o,y)=>{let s=i.transaction(X2,"readonly").objectStore(X2).get(l);s.onsuccess=()=>o(s.result),s.onerror=()=>y(s.error)})},async set(l,i){let o=await J3();return new Promise((y,s)=>{let x=o.transaction(X2,"readwrite");x.objectStore(X2).put(i,l),x.oncomplete=()=>y(),x.onerror=()=>s(x.error)})}};function gl(){return c6??r6}function n6(l){return l!=null&&l.type==="tosijs-share"&&typeof l.path==="string"}function kl(l){for(let i of G4)if(l===i||l.startsWith(i+"."))return i;return}function C6(l){for(let i of Z4)if(l===i||l.startsWith(i+"."))return!0;return!1}function d6(l,i){Z4.add(l),a0(s1,l,i),n1(l),$4().then(()=>{Z4.delete(l)})}function g6(){if(u1!=null)return u1;return R4=crypto.randomUUID(),u1=new BroadcastChannel(s6),u1.onmessage=(l)=>{let i=l.data;if(!n6(i))return;if(i.origin===R4)return;if(kl(i.path)===void 0)return;d6(i.path,i.value)},u1}function k6(l,i){if(u1==null)return;let o={type:"tosijs-share",path:l,value:i,origin:R4};u1.postMessage(o)}function p6(l){if(!V4.has(l))V4.set(l,Q2(()=>{let i=e(s1,l);gl().set(l,i)},500));V4.get(l)()}async function w6(...l){if(typeof BroadcastChannel>"u")return{restored:[]};g6();let i=[],o=gl();for(let y of l){let s=typeof y==="string"?y:L(y);if(s===void 0)throw Error("share() requires boxed proxies or string paths. Got a non-proxy value.");if(G4.has(s))continue;G4.add(s);let x=await o.get(s);if(x!==void 0)a0(s1,s,x),n1(s),i.push(y);else{let h=e(s1,s);await o.set(s,h)}W1((h)=>h===s||h.startsWith(s+"."),(h)=>{if(C6(h))return;let c=kl(h);if(c===void 0)return;let r=e(s1,h);k6(h,r),p6(c)})}return{restored:i}}var J4=new Set;function H3(l,i){for(let o of l)if(i===o||i.startsWith(o+"."))return o;return}function t6(l){for(let i of J4)if(l===i||l.startsWith(i+"."))return!0;return!1}function a6(l,i){J4.add(l),a0(s1,l,i),n1(l),$4().then(()=>{J4.delete(l)})}async function B6(l,i,...o){let y=new Set,s=[],x=[],h=i.throttleInterval??100;await l.connect();let c=n2(()=>{if(s.length===0)return;let r=s.splice(0);l.send(r)},h);l.onReceive((r)=>{for(let n of r){if(H3(y,n.path)===void 0)continue;a6(n.path,n.value)}});for(let r of o){let n=typeof r==="string"?r:L(r);if(n===void 0)throw Error("sync() requires boxed proxies or string paths. Got a non-proxy value.");y.add(n);let C=W1((k)=>k===n||k.startsWith(n+"."),(k)=>{if(t6(k))return;if(H3(y,k)===void 0)return;let p=e(s1,k);s.push({path:k,value:p}),c()});x.push(C)}return{disconnect(){for(let r of x)Q1(r);x.length=0,y.clear(),s.length=0,l.disconnect()}}}var pl="1.5.5";function S(l){return Object.assign(o1,l),o1}function L4(l){return y1("boxedProxy","boxedProxy is deprecated, please use tosi() instead"),S(l)}var v6=new FinalizationRegistry((l)=>{l()});function z6(l,i){let o=S3();o1[o]=l;let y=o1[o],s=()=>{delete $[o]};if(i)v6.register(i,s);return[y,s]}function wl(l,i=!1){if(i)return y1("xinProxy-boxed","xinProxy(..., true) is deprecated; use tosi(...) instead"),L4(l);return Object.keys(l).forEach((o)=>{$[o]=l[o]}),$}var f6={};async function M4(l,i){let o=await i(l,{Color:f,Component:a,elements:w,svgElements:B0,mathML:cl,varDefault:g,vars:d,xin:$,boxed:o1,xinProxy:wl,boxedProxy:L4,tosi:S,makeComponent:M4,bind:Z1,on:d2,version:pl}),{type:y}=o;y.preferredTagName=l;let s=o.lightStyleSpec??o.styleSpec;if(s)y.lightStyleSpec=s;let x={type:y,creator:y.elementCreator()};return f6[l]=x,x}var f0={":host":{display:"none"}},P4={},j6=(l)=>import(l);class j0 extends a{static preferredTagName="tosi-blueprint";static lightStyleSpec=f0;static initAttributes={tag:"anon-elt",src:"",property:"default"};loaded;blueprintLoaded=(l)=>{};async packaged(){let{tag:l,src:i,property:o}=this,y=`${l}.${o}:${i}`;if(!this.loaded){if(P4[y]===void 0)P4[y]=j6(i).then((s)=>{let x=s[o];return M4(l,x)});else console.log(`using cached ${l} with signature ${y}`);this.loaded=await P4[y],this.blueprintLoaded(this.loaded)}return this.loaded}}var A6=j0.elementCreator();class m4 extends a{static preferredTagName="tosi-loader";static lightStyleSpec=f0;allLoaded=()=>{};async load(){let l=Array.from(this.querySelectorAll("tosi-blueprint, xin-blueprint")).filter((i)=>i.src).map((i)=>i.packaged());await Promise.all(l),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var q6=m4.elementCreator();class tl extends j0{static preferredTagName="xin-blueprint";static lightStyleSpec=f0;constructor(){super();y1("xin-blueprint","<xin-blueprint> is deprecated. Use <tosi-blueprint> instead.")}}var _6=tl.elementCreator();class al extends a{static preferredTagName="xin-loader";static lightStyleSpec=f0;allLoaded=()=>{};constructor(){super();y1("xin-loader","<xin-loader> is deprecated. Use <tosi-loader> instead.")}async load(){let l=Array.from(this.querySelectorAll("xin-blueprint")).filter((i)=>i.src).map((i)=>i.packaged());await Promise.all(l),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var V6=al.elementCreator();var E4={};class g2 extends a{static preferredTagName="tosi-ab";static set conditions(l){Object.assign(E4,l);for(let i of[...g2.instances])i.queueRender()}static initAttributes={condition:"",not:!1};static instances=new Set;connectedCallback(){super.connectedCallback(),g2.instances.add(this)}disconnectedCallback(){super.disconnectedCallback(),g2.instances.delete(this)}render(){if(this.condition!==""&&(this.not?E4[this.condition]!==!0:E4[this.condition]===!0))this.toggleAttribute("hidden",!1);else this.toggleAttribute("hidden",!0)}}var P6=g2.elementCreator();var A0={};function x1(l,i){if(A0[l]===void 0){if(i!==void 0){let y=globalThis[i];A0[l]=Promise.resolve({[i]:y})}let o=w.script({src:l});document.head.append(o),A0[l]=new Promise((y)=>{o.onload=()=>y(globalThis)})}return A0[l]}var l5={};function q0(l){if(l5[l]===void 0){let i=w.link({rel:"stylesheet",type:"text/css",href:l});document.head.append(i),l5[l]=new Promise((o)=>{i.onload=o})}return l5[l]}var Z2={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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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>',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>',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>',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>',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>',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>',arrowUpCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="16 12 12 8 8 12"></polyline><line x1="12" y1="16" x2="12" y2="8"></line></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>',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>',arrowDown:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"></line><polyline points="19 12 12 19 5 12"></polyline></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>',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>',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>',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>',chevronsDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',circle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle></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>',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>',cornerLeftUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="14 9 9 4 4 9"></polyline><path d="M20 20h-7a4 4 0 0 1-4-4V4"></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>',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>',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>',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>',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>',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>',arrowUpLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="17" y1="17" x2="7" y2="7"></line><polyline points="7 17 7 7 17 7"></polyline></svg>',chevronDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',toggleLeft:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="8" cy="12" r="3"></circle></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>',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>',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>',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>',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>',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>',chevronUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="18 15 12 9 6 15"></polyline></svg>',arrowDownLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="17" y1="7" x2="7" y2="17"></line><polyline points="17 17 7 17 7 7"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',chevronRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 18 15 12 9 6"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',arrowLeftCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 8 8 12 12 16"></polyline><line x1="16" y1="12" x2="8" y2="12"></line></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>',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>',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>',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>',settings:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.6.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.6.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.6.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.6.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></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>',thumbsDown:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',check:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></svg>',rotateCcw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path></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>',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>',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>',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>',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>',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>',cornerUpLeft:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 14 4 9 9 4"></polyline><path d="M20 20v-7a4 4 0 0 0-4-4H4"></path></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>',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.01" y2="8"></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>',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>',refreshCcw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="1 4 1 10 7 10"></polyline><polyline points="23 20 23 14 17 14"></polyline><path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"></path></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',navigation:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="3 11 22 2 13 21 11 13 3 11"></polygon></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',square:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect></svg>',play:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21 5 3"></polygon></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>',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>',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>',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>',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>',facebook:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M464 0h-416c-26 0-48 22-48 48v416c0 26 22 48 48 48h208v-224h-64v-64h64v-32c0-53 43-96 96-96h64v64h-64c-18 0-32 14-32 32v32h96l-16 64h-80v224h144c26 0 48-22 48-48v-416c0-26-22-48-48-48z"></path></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',cornerLeftDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="14 15 9 20 4 15"></polyline><path d="M20 4h-7a4 4 0 0 0-4 4v12"></path></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>',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>',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>',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>',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>',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>',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>',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>',chevronsUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="17 11 12 6 7 11"></polyline><polyline points="17 18 12 13 7 18"></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>',twitch:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path></svg>',youtube:'<svg class="filled" version="1" viewBox="0 0 512 512"><g></g><path d="M507 154c0 0-5-35-20-51-20-20-41-21-51-22-72-5-179-5-179-5h-0c0 0-108 0-179 5-10 1-32 1-51 22-15 16-20 51-20 51s-5 41-5 83v39c0 41 5 83 5 83s5 35 20 51c20 20 45 20 57 22 41 4 174 5 174 5s108-0 179-5c10-1 32-1 51-22 15-16 20-51 20-51s5-41 5-83v-39c-0-41-5-83-5-83zM203 322v-144l138 72-138 72z"></path></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>',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>',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>',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>',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>',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>',skipBack:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="19 20 9 12 19 4 19 20"></polygon><line x1="5" y1="19" x2="5" y2="5"></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',arrowUp:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="19" x2="12" y2="5"></line><polyline points="5 12 12 5 19 12"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',chevronsLeft:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="11 17 6 12 11 7"></polyline><polyline points="18 17 13 12 18 7"></polyline></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>',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>',arrowLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></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>',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>',arrowDownRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="7" y1="7" x2="17" y2="17"></line><polyline points="17 7 17 17 7 17"></polyline></svg>',framer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></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>',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>',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>',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>',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>',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>',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>',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>',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>',arrowDownCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="8 12 12 16 16 12"></polyline><line x1="12" y1="8" x2="12" y2="16"></line></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',cornerDownLeft:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 10 4 15 9 20"></polyline><path d="M20 4v7a4 4 0 0 1-4 4H4"></path></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>',minus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line></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>',navigation2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 19 21 12 17 5 21 12 2"></polygon></svg>',chevronLeft:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6"></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>',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>',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>',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>',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>',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>',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>',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>',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> '};var O6=(l)=>{Object.assign(Z2,l)},i5=(l,i,o,y)=>{l.setAttribute("xmlns","http://www.w3.org/2000/svg");for(let h of[...l.querySelectorAll("path, polygon, line, circle, rect, ellipse, polyline")]){if(i!==void 0)h.setAttribute("fill",i);if(o!==void 0)h.setAttribute("stroke",o);if(y!==void 0)h.setAttribute("stroke-width",String(y))}let s=l.querySelectorAll("[style]");l.removeAttribute("style");for(let h of[...s]){let{fill:c,stroke:r,strokeWidth:n,strokeLinecap:C,strokeLinejoin:k}=h.style;if(c)h.setAttribute("fill",f.fromCss(c).html);if(r)h.setAttribute("stroke",f.fromCss(r).html);if(n)h.setAttribute("strokeWidth",n);if(C)h.setAttribute("strokeLinecap",C);if(k)h.setAttribute("strokeLinejoin",k);h.removeAttribute("style")}return`url(data:image/svg+xml;charset=UTF-8,${encodeURIComponent(l.outerHTML)})`},t=new Proxy(Z2,{get(l,i){let o=Z2[i];if(i&&!o)console.warn(`icon ${i} does not exist`);if(!o)o=Z2.square;return(...y)=>{let s=w.div();s.innerHTML=o;let x=s.querySelector("svg"),h=new Set(x.classList);h.add("tosi-icon");let c=B0.svg({class:Array.from(h).join(" "),viewBox:x.getAttribute("viewBox")},...y,...x.children);if(c.style.strokeWidth=g.tosiIconStrokeWidth("2px"),h.has("filled"))c.style.stroke="none",c.style.fill="currentColor";else if(h.has("stroked"))c.style.stroke=g.tosiIconStroke("currentColor"),c.style.fill="none";else c.style.stroke=g.tosiIconStroke("currentColor"),c.style.fill=g.tosiIconFill("currentColor");return c.style.height=g.tosiIconSize("16px"),c}}});class o5 extends a{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",stroke:"currentColor",strokeWidth:g.tosiIconStrokeWidth("2px"),strokeLinejoin:g.tosiIconStrokeLinejoin("round"),strokeLinecap:g.tosiIconStrokeLinecap("round"),fill:g.tosiIconFill("none")},":host, :host svg":{height:g.tosiIconSize("16px")}};static initAttributes={icon:"",size:0,fill:"",stroke:"",strokeWidth:1};render(){super.render(),this.textContent="";let l={};if(this.size)l.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)l.stroke=this.stroke,l.strokeWidth=this.strokeWidth;if(this.fill)l.fill=this.fill;this.append(t[this.icon]({style:l}))}}var U6=o5.elementCreator();var Bl=()=>{};class y5 extends a{static preferredTagName="tosi-3d";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:i5(t.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=w.canvas({part:"canvas"});constructor(){super();this.babylonReady=(async()=>{let{BABYLON:l}=await x1("https://cdn.babylonjs.com/babylon.js","BABYLON");return l})()}scene;engine;sceneCreated=Bl;update=Bl;_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(l,i,o)=>{let{BABYLON:y}=await x1("https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js","BABYLON");y.SceneLoader.Append(l,i,this.scene,o)};loadUI=async(l)=>{let{BABYLON:i}=await x1("https://cdn.babylonjs.com/gui/babylon.gui.min.js","BABYLON"),o=i.GUI.AdvancedDynamicTexture.CreateFullscreenUI("GUI",!0,this.scene),{snippetId:y,jsonUrl:s,data:x,size:h}=l;if(h)o.idealWidth=h,o.renderAtIdealSize=!0;let c;if(y)c=await o.parseFromSnippetAsync(y);else if(s)c=await o.parseFromURLAsync(s);else if(x)c=o.parseContent(x);else return null;let r=o.getChildren()[0],n=r.children.reduce((C,k)=>{return C[k.name]=k,C},{});return{advancedTexture:o,gui:c,root:r,widgets:n}};connectedCallback(){super.connectedCallback();let{canvas:l}=this.parts;this.babylonReady.then(async(i)=>{if(this.BABYLON=i,this.engine=new i.Engine(l,!0),this.scene=new i.Scene(this.engine),this.sceneCreated)await this.sceneCreated(this,i);if(this.scene.activeCamera===void 0)new i.ArcRotateCamera("default-camera",-Math.PI/2,Math.PI/2.5,3,new i.Vector3(0,0,0)).attachControl(this.parts.canvas,!0);this.engine.runRenderLoop(this._update)})}}var X6=y5.elementCreator();class k2 extends a{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(k2.bodymovinAvailable===void 0)k2.bodymovinAvailable=x1("https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js","bodymovin")}doneLoading=()=>{this._loading=!1};load=({bodymovin:l})=>{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 i=this.shadowRoot;if(i!==null)i.querySelector("svg")?.remove()}this.animation=l.loadAnimation(this.config),this.animation.addEventListener("DOMLoaded",this.doneLoading)};render(){super.render(),k2.bodymovinAvailable.then(this.load).catch((l)=>{console.error(l)})}}var N6=k2.elementCreator();var{button:s5,slot:K6,div:_0}=w;class V0 extends a{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(l){let{scroller:i,back:o,forward:y}=this.parts;if(this.lastPage<=0)y.disabled=o.disabled=!0,l=0;else l=Math.max(0,Math.min(this.lastPage,l)),l=isNaN(l)?0:l;if(this._page!==l)this._page=isNaN(l)?0:l,this.animateScroll(this._page*i.offsetWidth),o.disabled=this.page<=0&&!this.loop,y.disabled=this.page>=this.lastPage&&!this.loop}get visibleItems(){return[...this.children].filter((l)=>getComputedStyle(l).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:d.carouselDotSize,_carouselProgressPadding:12,_carouselDotTransition:"0.125s ease-in-out",display:"flex",flexDirection:"column",position:"relative"},":host:focus":{outline:"none",boxShadow:"none"},":host svg":{height:d.carouselIconSize},":host button":{outline:"none",border:"none",boxShadow:"none",background:"transparent",color:d.carouselButtonColor,padding:0},":host::part(back), :host::part(forward)":{position:"absolute",top:0,bottom:0,width:d.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:d.carouselButtonHoverColor},":host button:active":{color:d.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:d.carouselButtonColor,borderRadius:d.carouselDotSize,height:d.carouselDotSize,width:d.carouselDotSize,transition:d.carouselDotTransition},":host .dot:not(.current):hover":{background:d.carouselButtonHoverColor,height:d.carouselDotSize150,width:d.carouselDotSize150,margin:d.carouselDotSize_25},":host .dot:not(.current):active":{background:d.carouselButtonActiveColor},":host .dot.current":{background:d.carouselDotCurrentColor},":host::part(progress)":{display:"flex",gap:d.carouselDotSpacing,justifyContent:"center",padding:d.carouselProgressPadding}};easing=(l)=>{return Math.sin(l*Math.PI*0.5)};indicateCurrent=()=>{let{scroller:l,progress:i}=this.parts,o=l.scrollLeft/l.offsetWidth;[...i.children].forEach((y,s)=>{y.classList.toggle("current",Math.floor(s/this.maxVisibleItems-o)===0)}),this.lastAutoAdvance=Date.now(),clearTimeout(this.snapTimer),this.snapTimer=setTimeout(this.snapPosition,this.snapDelay*1000)};snapPosition=()=>{let{scroller:l}=this.parts,i=Math.round(l.scrollLeft/l.offsetWidth);if(i!==this.page)this.page=i>this.page?Math.ceil(i):Math.floor(i);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=(l)=>{let{progress:i}=this.parts,o=[...i.children].indexOf(l.target);if(o>-1)this.page=Math.floor(o/this.maxVisibleItems)};snapTimer;animationFrame;animateScroll(l,i=-1,o=0){cancelAnimationFrame(this.animationFrame);let{scroller:y}=this.parts;if(i===-1){i=y.scrollLeft,o=Date.now(),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(l,i,o)});return}let s=(Date.now()-o)/1000;if(s>=this.snapDuration||Math.abs(y.scrollLeft-l)<2)y.scrollLeft=l,this.animationFrame=null;else y.scrollLeft=i+this.easing(s/this.snapDuration)*(l-i),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(l,i,o)})}content=()=>[_0({part:"pager"},s5({title:"previous slide",part:"back"},t.chevronLeft()),_0({title:"slides",role:"group",part:"scroller"},_0({part:"grid"},K6())),s5({title:"next slide",part:"forward"},t.chevronRight())),_0({title:"choose slide to display",role:"group",part:"progress"})];connectedCallback(){super.connectedCallback(),this.ariaRoleDescription="carousel",this.ariaOrientation="horizontal",this.ariaReadOnly="true";let{back:l,forward:i,scroller:o,progress:y}=this.parts;l.addEventListener("click",this.back),i.addEventListener("click",this.forward),o.addEventListener("scroll",this.indicateCurrent),y.addEventListener("click",this.handleDotClick),this.lastAutoAdvance=Date.now(),this.interval=setInterval(this.autoAdvance,100)}disconnectedCallback(){clearInterval(this.interval)}render(){super.render();let{dots:l,arrows:i,visibleItems:o,lastPage:y}=this,{progress:s,back:x,forward:h,grid:c}=this.parts;o.forEach((r)=>{r.role="group"}),c.style.gridTemplateColumns=`${100/this.maxVisibleItems/(1+this.lastPage)}% `.repeat(o.length).trim(),c.style.width=(1+this.lastPage)*100+"%",s.textContent="",s.append(...o.map((r,n)=>s5({title:`item ${n+1}`,class:"dot"}))),this.indicateCurrent(),s.style.display=l&&y>0?"":"none",x.hidden=h.hidden=!(i&&y>0)}}var b6=V0,vl=V0.elementCreator(),F6=vl;var zl="https://cdnjs.cloudflare.com/ajax/libs/ace/1.23.2/",fl="ace/theme/tomorrow",W6=async()=>{let{ace:l}=await x1(`${zl}ace.min.js`);return l},Q6=async(l,i="html",o={},y=fl)=>{let s=await W6();s.config.set("basePath",zl);let x=s.edit(l,{mode:`ace/mode/${i}`,tabSize:2,useSoftTabs:!0,useWorker:!1,...o});return x.setTheme(y),{ace:s,editor:x}};class E1 extends a{static preferredTagName="tosi-code";source="";get value(){return this.editor===void 0?this.source:this.editor.getValue()}set value(l){if(this.editor===void 0)this.source=l;else this.editor.setValue(l),this.editor.clearSelection(),this.editor.session.getUndoManager().reset()}static initAttributes={mode:"javascript",theme:fl,disabled:!1};role="code editor";_ace;_editor;_editorPromise;options={};get ace(){return this._ace}get editor(){return this._editor}static shadowStyleSpec={":host":{display:"block",position:"relative",width:"100%",height:"100%"}};onResize(){if(this.editor!==void 0)this.editor.resize(!0)}connectedCallback(){if(super.connectedCallback(),this.source==="")this.value=this.textContent!==null?this.textContent.trim():"";if(this._editorPromise===void 0)this._editorPromise=Q6(this,this.mode,this.options,this.theme),this._editorPromise.then(({ace:l,editor:i})=>{this._ace=l,this._editor=i,i.setValue(this.source,1),i.clearSelection(),i.session.getUndoManager().reset()})}render(){if(super.render(),this._editorPromise!==void 0)this._editorPromise.then(({editor:l})=>l.setReadOnly(this.disabled))}}var p2=E1.elementCreator();var{input:x5}=w,jl=f.fromCss("#8888");class Al extends a{static preferredTagName="tosi-color";value=jl.rgba;color=jl;static shadowStyleSpec={":host":{_gap:8,_swatchSize:32,_cssWidth:72,_alphaWidth:72,display:"inline-flex",gap:d.gap,alignItems:"center"},':host input[type="color"]':{border:0,width:d.swatchSize,height:d.swatchSize,background:"transparent"},":host::part(alpha)":{width:d.alphaWidth},":host::part(css)":{width:d.cssWidth,fontFamily:"monospace"}};content=[x5({title:"base color",type:"color",part:"rgb"}),x5({type:"range",title:"opacity",part:"alpha",min:0,max:1,step:0.05}),x5({title:"css color spec",part:"css"})];valueChanged=!1;update=(l)=>{let{rgb:i,alpha:o,css:y}=this.parts;if(l.type==="input")this.color=f.fromCss(i.value),this.color.a=Number(o.value),y.value=this.color.html;else this.color=f.fromCss(y.value),i.value=this.color.html.substring(0,7),o.value=String(this.color.a);i.style.opacity=String(this.color.a),this.value=this.color.rgba,this.valueChanged=!0};connectedCallback(){super.connectedCallback();let{rgb:l,alpha:i,css:o}=this.parts;l.addEventListener("input",this.update),i.addEventListener("input",this.update),o.addEventListener("change",this.update)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{rgb:l,alpha:i,css:o}=this.parts;this.color=f.fromCss(this.value),l.value=this.color.html.substring(0,7),l.style.opacity=String(this.color.a),i.value=String(this.color.a),o.value=this.color.html}}var h5=Al.elementCreator();var R1=w.div({style:{content:" ",position:"fixed",top:0,left:0,right:0,bottom:0}}),P0={passive:!0},M=(l,i,o="move")=>{if(!l.type.startsWith("touch")){let{clientX:s,clientY:x}=l;R1.style.cursor=o,J1(R1),document.body.append(R1);let h=(c)=>{let r=c.clientX-s,n=c.clientY-x;if(i(r,n,c)===!0)R1.removeEventListener("mousemove",h),R1.removeEventListener("mouseup",h),R1.remove()};R1.addEventListener("mousemove",h,P0),R1.addEventListener("mouseup",h,P0)}else if(l instanceof TouchEvent){let s=l.changedTouches[0],x=s.identifier,h=s.clientX,c=s.clientY,r=l.target,n=0,C=0,k=(p)=>{let z=[...p.touches].find((B)=>B.identifier===x);if(z!==void 0)n=z.clientX-h,C=z.clientY-c;if(p.type==="touchmove")p.stopPropagation(),p.preventDefault();if(i(n,C,p)===!0||z===void 0)r.removeEventListener("touchmove",k),r.removeEventListener("touchend",k),r.removeEventListener("touchcancel",k)};r.addEventListener("touchmove",k),r.addEventListener("touchend",k,P0),r.addEventListener("touchcancel",k,P0)}},l2=(l="body *")=>[...document.querySelectorAll(l)].map((i)=>parseFloat(getComputedStyle(i).zIndex)).reduce((i,o)=>isNaN(i)||Number(i)<o?o:Number(i),0),J1=(l,i="body *")=>{l.style.zIndex=String(l2(i)+1)};var{slot:G6}=w;class X1 extends a{static preferredTagName="tosi-float";static floats=new Set;static initAttributes={drag:!1,remainOnResize:"remove",remainOnScroll:"remain"};content=G6();static shadowStyleSpec={":host":{position:"fixed"}};reposition=(l)=>{if(l instanceof MouseEvent&&l.button!==0)return;if(l.target?.closest(".no-drag"))return;if(this.drag){J1(this);let o=this.offsetLeft,y=this.offsetTop;M(l,(s,x,h)=>{if(this.style.left=`${o+s}px`,this.style.top=`${y+x}px`,this.style.right="auto",this.style.bottom="auto",h.type==="mouseup")return!0})}};connectedCallback(){super.connectedCallback(),X1.floats.add(this);let l={passive:!0};this.addEventListener("touchstart",this.reposition,l),this.addEventListener("mousedown",this.reposition,l),J1(this)}disconnectedCallback(){super.disconnectedCallback(),X1.floats.delete(this)}}var Z6=X1,R2=X1.elementCreator(),R6=R2;window.addEventListener("resize",()=>{Array.from(X1.floats).forEach((l)=>{if(l.remainOnResize==="hide")l.hidden=!0;else if(l.remainOnResize==="remove")l.remove()})},{passive:!0});document.addEventListener("scroll",(l)=>{if(l.target instanceof HTMLElement&&l.target.closest(X1.tagName))return;Array.from(X1.floats).forEach((i)=>{if(i.remainOnScroll==="hide")i.hidden=!0;else if(i.remainOnScroll==="remove")i.remove()})},{passive:!0,capture:!0});var J2=(l)=>{let{content:i,target:o,position:y,remainOnScroll:s,remainOnResize:x,draggable:h}=l,c=Array.isArray(i)?R2(...i):R2(i);if(ql(c,o,y,s,x,h),l.class)c.setAttribute("class",l.class);return document.body.append(c),c},ql=(l,i,o,y,s,x=!1)=>{{let{position:B}=getComputedStyle(l);if(B!=="fixed")l.style.position="fixed";if(s)l.remainOnResize=s;if(y)l.remainOnScroll=y;J1(l)}l.drag=x;let{left:h,top:c,width:r,height:n}=i.getBoundingClientRect(),C=h+r*0.5,k=c+n*0.5,p=window.innerWidth,z=window.innerHeight;if(o==="side")o=(C<p*0.5?"e":"w")+(k<z*0.5?"s":"n");else if(o==="auto"||o===void 0)o=(k<z*0.5?"s":"n")+(C<p*0.5?"e":"w");if(l.style.top=l.style.left=l.style.right=l.style.bottom=l.style.transform="",o.length===2){let[B,j]=o;switch(B){case"n":l.style.bottom=(z-c).toFixed(2)+"px";break;case"e":l.style.left=(h+r).toFixed(2)+"px";break;case"s":l.style.top=(c+n).toFixed(2)+"px";break;case"w":l.style.right=(p-h).toFixed(2)+"px";break}switch(j){case"n":l.style.bottom=(z-c-n).toFixed(2)+"px";break;case"e":l.style.left=h.toFixed(2)+"px";break;case"s":l.style.top=c.toFixed(2)+"px";break;case"w":l.style.right=(p-h-r).toFixed(2)+"px";break}l.style.transform=""}else if(o==="n")l.style.bottom=(z-c).toFixed(2)+"px",l.style.left=C.toFixed(2)+"px",l.style.transform="translateX(-50%)";else if(o==="s")l.style.top=(c+n).toFixed(2)+"px",l.style.left=C.toFixed(2)+"px",l.style.transform="translateX(-50%)";else if(o==="e")l.style.left=(h+r).toFixed(2)+"px",l.style.top=k.toFixed(2)+"px",l.style.transform="translateY(-50%)";else if(o==="w")l.style.right=(p-h).toFixed(2)+"px",l.style.top=k.toFixed(2)+"px",l.style.transform="translateY(-50%)";l.style.setProperty("--max-height",`calc(100vh - ${l.style.top||l.style.bottom})`),l.style.setProperty("--max-width",`calc(100vw - ${l.style.left||l.style.right})`)};function O0(l,i=!0){return(o,y)=>{let s=l(o),x=l(y);for(let h in s)if(s[h]!==x[h])return(Array.isArray(i)?i[h]!==!1:i)?s[h]>x[h]?1:-1:s[h]>x[h]?-1:1;return 0}}var{button:J6,span:_l,input:H6}=w,Vl=(l,i)=>{return!!l.find((o)=>{if(o===null||i==null)return!1;else if(Array.isArray(o))return Vl(o,i);else if(o.value===i||o===i)return!0})};class v1 extends a{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:d.tosiSelectGap,textAlign:"left",height:d.tosiSelectTouchSize,padding:d.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:d.tosiSelectFieldWidth,padding:d.tosiSelectValuePadding,height:d.tosiSelectTouchSize,lineHeight:d.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(l){if(typeof l==="string")this._options=v1.parseOptionsString(l);else this._options=l;this.queueRender()}static parseOptionsString(l){return l.split(",").map((i)=>{let o=i.trim();if(o==="")return null;let[y,s]=o.split("=").map((c)=>c.trim());if(!s)return{value:y,caption:y};let[x,h]=s.split(":").map((c)=>c.trim());return{value:y,caption:x||y,icon:h||void 0}})}value="";filter="";isExpanded=!1;formDisabledCallback(l){this.disabled=l}formResetCallback(){this.value=""}setValue=(l,i=!1)=>{if(this.value!==l)this.value=l,this.queueRender(!0);if(i)this.dispatchEvent(new Event("action"))};getValue=()=>this.value;get selectOptions(){return this.options}buildOptionMenuItem=(l)=>{if(l===null)return null;let{setValue:i,getValue:o}=this,y,s,x,h,c;if(typeof l==="string")s=x=l;else({icon:y,caption:s,value:x,tooltip:h,properties:c}=l);if(this.localized)s=K(s);let{options:r}=l;if(r)return{icon:y,caption:s,tooltip:h,properties:c,checked:()=>Vl(r,o()),menuItems:r.map(this.buildOptionMenuItem)};return{icon:y,caption:s,tooltip:h,properties:c,checked:()=>o()===x,action:typeof x==="function"?async()=>{let n=await x();if(n!==void 0)i(n,!0)}:()=>{if(typeof x==="string")i(x,!0)}}};poppedOptions=[];get optionsMenu(){let l=this.selectOptions.map(this.buildOptionMenuItem);if(this.filter==="")return l;let i=(o)=>{if(o===null)return!0;else if(o.menuItems){let y=c1(o.menuItems);return o.menuItems=y.filter(i),y.length>0}else return o.caption.toLocaleLowerCase().includes(this.filter)};return l.filter(i)}handleChange=(l)=>{let{value:i}=this.parts,o=i.value||"";if(this.value!==String(o))this.value=o,this.dispatchEvent(new Event("change"));this.filter="",l.stopPropagation(),l.preventDefault()};handleKey=(l)=>{if(l.key==="Enter")l.preventDefault()};filterMenu=n2(()=>{this.filter=this.parts.value.value.toLocaleLowerCase(),Y(0),this.popOptions()});popOptions=(l)=>{if(l&&l.type==="click")this.filter="";this.poppedOptions=this.optionsMenu,this.isExpanded=!0,this.updateAriaExpanded(),G({target:this,menuItems:this.poppedOptions,showChecked:!0,role:"listbox",onClose:()=>{this.isExpanded=!1,this.updateAriaExpanded()}})};updateAriaExpanded(){let{value:l}=this.parts;l.setAttribute("aria-expanded",String(this.isExpanded))}content=()=>[J6({type:"button",part:"button",onClick:this.popOptions},_l(),H6({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}),t.chevronDown())];get allOptions(){let l=[];function i(o){for(let y of o)if(typeof y==="string")l.push({caption:y,value:y});else if(y?.value)l.push(y);else if(y?.options)i(y.options)}return i(this.selectOptions),l}findOption(){return this.allOptions.find((i)=>i.value===this.value)||{caption:this.value,value:this.value}}localeChanged=()=>{this.queueRender()};connectedCallback(){super.connectedCallback();let l=this.getAttribute("options");if(l&&this._options.length===0)this._options=v1.parseOptionsString(l);if(this.localized)U0.allInstances.add(this)}disconnectedCallback(){if(super.disconnectedCallback(),this.localized)U0.allInstances.delete(this)}render(){super.render();let{value:l,button:i}=this.parts;i.disabled=this.disabled;let o=l.previousElementSibling,y=this.findOption(),s=_l();if(l.value=this.localized?K(y.caption):y.caption,y.icon)if(y.icon instanceof HTMLElement)s=y.icon.cloneNode(!0);else s=t[y.icon]();o.replaceWith(s),l.setAttribute("placeholder",this.localized?K(this.placeholder):this.placeholder),l.style.pointerEvents=this.editable?"":"none",l.readOnly=!this.editable}}var $6=v1,h1=v1.elementCreator(),Y6=u((...l)=>h1(...l),"xinSelect is deprecated, use tosiSelect instead (tag is now <tosi-select>)");var{span:Pl}=w,{i18n:Q}=S({i18n:{locale:window.navigator.language,locales:[window.navigator.language],languages:[window.navigator.language],emoji:[""],stringMap:{},localeOptions:[{icon:Pl(),caption:window.navigator.language,value:window.navigator.language}]}});P1.localeOptions={toDOM(l,i){if(l instanceof v1)l.options=i}};var I6=(l)=>{if(Q.locales.value.includes(l))Q.locale.value=l;else console.error(`language ${l} is not available`)},c5=()=>{let l=Array.from(z1.allInstances);for(let i of l)i.localeChanged()};Q.locale.observe(c5);var S6=O0((l)=>[l.caption.toLocaleLowerCase()]);function D6(l){let[i,,o,y,...s]=l.split(`
14
- `).map((x)=>x.split("\t"));if(i&&o&&y&&s){if(Q.locales.value=i,Q.languages.value=o,Q.emoji.value=y,Q.stringMap.value=s.reduce((x,h)=>{return x[h[0].toLocaleLowerCase()]=h,x},{}),Q.localeOptions.value=i.map((x,h)=>({icon:Pl({title:i[h]},y[h]),caption:o[h],value:x})).sort(S6),!Q.locales.value.includes(Q.locale.value)){let x=Q.locale.value.substring(0,2);Q.locale.value=Q.locales.value.find((h)=>h.substring(0,2)===x)||Q.locales.value[0]}c5()}}function K(l){if(l.endsWith("…"))return K(l.substring(0,l.length-1))+"…";let i=Q.locales.value.indexOf(Q.locale.value);if(i>-1){let o=W(Q.stringMap),y=l.toLocaleLowerCase(),s=o[y],x=s&&s[i];if((!x||x==='"')&&y.includes("#")){let h=o[y.substring(0,y.indexOf("#"))];x=h&&h[i]}if(x)x=x.split("#",2)[0],l=l.toLocaleLowerCase()===l?x.toLocaleLowerCase():x;else l=l.split("#",2)[0]}else l=l.split("#",2)[0];return l}class X0 extends a{static preferredTagName="tosi-locale-picker";static initAttributes={hideCaption:!1};content=()=>{return h1({part:"select",showIcon:!0,title:K("Language"),bindValue:Q.locale,bindLocaleOptions:Q.localeOptions})};render(){super.render(),this.parts.select.toggleAttribute("hide-caption",this.hideCaption)}}var T6=X0,Ol=X0.elementCreator(),e6=Ol;class z1 extends a{static preferredTagName="tosi-localized";static lightStyleSpec={":host":{pointerEvents:"none"}};static allInstances=new Set;static initAttributes={refString:""};contents=()=>w.xinSlot();connectedCallback(){super.connectedCallback(),z1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),z1.allInstances.delete(this)}localeChanged(){if(!this.refString)this.refString=this.textContent||"";this.textContent=this.refString?K(this.refString):""}render(){super.render(),this.localeChanged()}}var U0=z1,f1=z1.elementCreator(),u6=f1;var Ul=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||""),L6=Ul?{meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",escape:"⎋"}:{meta:"Meta",ctrl:"Ctrl",alt:"Alt",shift:"Shift",escape:"Esc"},Xl=(l)=>{if(l.code)return l.code.replace(/^Key|^Digit/,"");return l.key},M6=(l)=>{let i=[];if(l.altKey)i.push("alt");if(l.ctrlKey)i.push("ctrl");if(l.metaKey)i.push("meta");if(l.shiftKey)i.push("shift");return i.push(Xl(l)),i.join("-")},m6=[[/\^|ctrl-?/i,"ctrlKey"],[/⌘|meta-?/i,"metaKey"],[/⌥|⎇|alt-?|option-?/i,"altKey"],[/⇧|shift-?/i,"shiftKey"]],N0=(l)=>{let i=l.trim(),o={ctrlKey:!1,metaKey:!1,altKey:!1,shiftKey:!1,key:""};for(let[y,s]of m6)if(y.test(i))o[s]=!0,i=i.replace(y,"");return i=i.replace(/^-+/,""),o.key=i.toLowerCase(),o},r5=(l,i)=>{let o=N0(i);return l.key.toLowerCase()===o.key&&l.metaKey===o.metaKey&&l.ctrlKey===o.ctrlKey&&l.altKey===o.altKey&&l.shiftKey===o.shiftKey},E6=(l)=>{let i=N0(l),o=[];if(i.altKey)o.push("alt");if(i.ctrlKey)o.push("ctrl");if(i.metaKey)o.push("meta");if(i.shiftKey)o.push("shift");return o.push(i.key),o.join("-")},K0=(l)=>{let i=N0(l);if(Ul){let y=[];if(i.ctrlKey)y.push("⌃");if(i.altKey)y.push("⌥");if(i.shiftKey)y.push("⇧");if(i.metaKey)y.push("⌘");return y.push(i.key.toUpperCase()),y.join("")}let o=[];if(i.ctrlKey)o.push("Ctrl");if(i.altKey)o.push("Alt");if(i.shiftKey)o.push("Shift");if(i.metaKey)o.push("Meta");return o.push(i.key.toUpperCase()),o.join("+")};var F0={};B4(F0,{stringToTypes:()=>t2,isTypeAllowed:()=>a2,init:()=>d5,draggedElement:()=>s8});var l8=()=>!!document.querySelector(".drag-source"),a2=(l,i)=>{if(!l)return!1;for(let o of l)if(o==="special/any")return!0;else if(o.indexOf("*")>-1){let[y,s]=o.split("/"),[x,h]=i.split("/");if((y==="*"||y===x)&&(s==="*"||s===h))return!0}else if(o===i)return!0},b0=(l)=>{for(let i of[...document.querySelectorAll(`.${l}`)])i.classList.remove(l)},bl=()=>{if(w2)w2.disconnect(),w2=null;n5=[],b0("drag-over"),b0("drag-source"),b0("drag-target")},t2=(l,i=";")=>{return(l||"").split(i).map((o)=>o.trim()).filter((o)=>o!=="")},n5=[],w2=null,C5=(l)=>{if(!l)l=[];n5=l;let i=[...document.querySelectorAll("[data-drop]")];for(let o of i){let y=t2(o.dataset.drop);if(l.find((s)=>a2(y,s)))o.classList.add("drag-target");else o.classList.remove("drag-target")}if(!w2)w2=new MutationObserver(()=>C5(n5)),w2.observe(document.body,{childList:!0,subtree:!0})};function i8(l){let i=l.target?.closest('[draggable="true"],a[href]');if(!i)return;i.classList.add("drag-source");let o=i.matches('[draggable="true"]')?t2(i.dataset.drag||"text/html"):t2(i.dataset.drag||"url");for(let y of o){let s=i.dataset.dragContent||(y==="text/html"?i.innerHTML:i.textContent);l.dataTransfer?.setData(y,s||"")}C5(l.dataTransfer?.types),l.stopPropagation()}function Nl(l){if(!l8())C5(l.dataTransfer?.types);let i=l.target.closest(".drag-target");if(i&&l.dataTransfer)i.classList.add("drag-over"),l.dataTransfer.dropEffect="copy";else l.preventDefault(),l.stopPropagation()}function o8(){b0("drag-over")}function y8(l){let i=l.target.closest(".drag-target");if(i){let o=(i.dataset?.drop||"").split(";");for(let y of o)if(a2(l.dataTransfer?.types,y))if(y==="text/html")i.innerHTML=l.dataTransfer?.getData(y)||"";else i.textContent=l.dataTransfer?.getData(y)||""}bl()}var s8=()=>document.querySelector(".drag-source"),Kl=!1,d5=()=>{if(Kl)return;document.body.addEventListener("dragstart",i8),document.body.addEventListener("dragenter",Nl),document.body.addEventListener("dragover",Nl),document.body.addEventListener("drop",y8),document.body.addEventListener("dragleave",o8),document.body.addEventListener("dragend",bl),window.addEventListener("dragover",(l)=>l.preventDefault()),window.addEventListener("drop",(l)=>l.preventDefault()),Kl=!0};var c1=(l)=>typeof l==="function"?l():l,{div:Fl,button:Y2,span:Z,a:x8,xinSlot:h8}=w,Wl=(l)=>{let i=[];for(let o of l)if(o===null){if(i.length>0&&i[i.length-1]!==null)i.push(o)}else i.push(o);while(i.length>0&&i[i.length-1]===null)i.pop();return i},$2=(l,i,o=!1)=>{let y=[];for(let s of l){if(s===null){y.push(s);continue}let{acceptsDrop:x}=s;if(!x){if(!o)y.push({...s,enabled:()=>!1});continue}if(!i.some((r)=>a2(x,r))){if(!o)y.push({...s,enabled:()=>!1});continue}let c=s;if(c.menuItems){let r=$2(c1(c.menuItems),i,!0);if(r.length>0||c.dropAction){let n=o?r:$2(c1(c.menuItems),i,!1);y.push({...c,menuItems:n})}else if(!o)y.push({...c,enabled:()=>!1})}else y.push(s)}return Wl(y)},g5=(l,i=!1)=>{let o=[];for(let y of l){if(y===null){o.push(y);continue}let{action:s,menuItems:x}=y;if(s||x)if(x){let h=g5(c1(x),!0);if(h.length>0){let c=i?h:g5(c1(x),!1);o.push({...y,menuItems:c})}else if(!i)o.push({...y,enabled:()=>!1})}else o.push(y);else if(!i)o.push({...y,enabled:()=>!1})}return Wl(o)};O1("xin-menu-helper",{".xin-menu":{overflow:"hidden auto",maxHeight:`calc(${d.maxHeight} - ${g.menuInset("8px")})`,borderRadius:d.spacing50,background:g.menuBg("#fafafa"),boxShadow:g.menuShadow(`${d.spacing13} ${d.spacing50} ${d.spacing} #0004`)},".xin-menu > div":{width:g.menuWidth("auto")},".xin-menu-trigger":{paddingLeft:0,paddingRight:0,minWidth:g.touchSize("48px")},".xin-menu-separator":{display:"inline-block",content:" ",height:"1px",width:"100%",background:g.menuSeparatorColor("#2224"),margin:g.menuSeparatorMargin("8px 0")},".xin-menu-item":{boxShadow:"none",border:"none !important",display:"grid",alignItems:"center",justifyContent:"flex-start",textDecoration:"none",gridTemplateColumns:"0px 1fr 30px",width:"100%",gap:0,background:"transparent",padding:g.menuItemPadding("0 16px"),height:g.menuItemHeight("48px"),lineHeight:g.menuItemHeight("48px"),textAlign:"left"},".xin-menu-item, .xin-menu-item > span":{color:g.menuItemColor("#222")},".xin-menu-with-icons .xin-menu-item":{gridTemplateColumns:"30px 1fr 30px"},".xin-menu-item svg":{stroke:g.menuItemIconColor("#222")},".xin-menu-item.xin-menu-item-checked":{background:g.menuItemHoverBg("#eee")},".xin-menu-item > span:nth-child(2)":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"left"},".xin-menu-item:hover":{boxShadow:"none !important",background:g.menuItemHoverBg("#eee")},".xin-menu-item.drag-target:hover":{boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${g.menuDropOverBg("#2196F3")} 50%, transparent) !important`},".xin-menu-item:active":{boxShadow:"none !important",background:g.menuItemActiveBg("#aaa"),color:g.menuItemActiveColor("#000")},".xin-menu-item:active svg":{stroke:g.menuItemIconActiveColor("#000")},".xin-menu-item-highlight":{boxShadow:"none !important",background:g.menuItemActiveBg("#aaa"),color:g.menuItemActiveColor("#000")},".xin-menu-item-highlight svg":{stroke:g.menuItemIconActiveColor("#000")},".xin-drop-over":{background:`${g.menuDropOverBg("#2196F3")} !important`,color:`${g.menuDropOverColor("#fff")} !important`},".xin-drop-over > span":{color:`${g.menuDropOverColor("#fff")} !important`},".xin-drop-over svg":{stroke:`${g.menuDropOverColor("#fff")} !important`},".drag-target":{boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${g.menuDropOverBg("#2196F3")} 50%, transparent) !important`}});var Ql=(l,i)=>{let o=l.checked&&l.checked()&&"check"||!1,y=l?.icon||o||Z(" ");if(typeof y==="string")y=t[y]();let s=i.role==="listbox"?"option":"menuitem",x,h=l.properties||{};if(typeof l?.action==="string")x=x8({class:"xin-menu-item",role:s,href:l.action},h,y,i.localized?Z(K(l.caption)):Z(l.caption),Z(l.shortcut?K0(l.shortcut):" "));else x=Y2({class:"xin-menu-item",role:s,onClick:l.action},h,y,i.localized?Z(K(l.caption)):Z(l.caption),Z(l.shortcut?K0(l.shortcut):" "));if(x.classList.toggle("xin-menu-item-checked",o!==!1),l.tooltip)x.dataset.tooltip=l.tooltip;if(i.role==="listbox"&&o)x.setAttribute("aria-selected","true");if(l?.enabled&&!l.enabled())x.setAttribute("disabled",""),x.setAttribute("aria-disabled","true");return x},Gl=(l,i)=>{let o=l?.icon||Z(" ");if(typeof o==="string")o=t[o]();let y=l.properties||{},s=Y2({class:"xin-menu-item",onDragenter(x){v2(),s.classList.add("xin-drop-over"),x.preventDefault()},onDragover(x){if(x.preventDefault(),x.dataTransfer)x.dataTransfer.dropEffect="copy"},onDragleave(x){let h=x.relatedTarget;if(h&&s.contains(h))return;s.classList.remove("xin-drop-over")},onDrop(x){if(x.preventDefault(),x.stopPropagation(),s.classList.remove("xin-drop-over"),l.dropAction&&x.dataTransfer)l.dropAction(x.dataTransfer);Y(0)}},y,o,i.localized?Z(K(l.caption)):Z(l.caption),Z(" "));if(l.tooltip)s.dataset.tooltip=l.tooltip;if(l.dropAction&&l.acceptsDrop)s.dataset.drop=l.acceptsDrop.join(";");if(l?.enabled&&!l.enabled())s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true");return s},k5=(l,i)=>{let o=l.checked&&l.checked()&&"check"||!1,y=l?.icon||o||Z(" ");if(typeof y==="string")y=t[y]();let s=null,x=!1,h=l.properties||{},c=Y2({class:"xin-menu-item",disabled:!(!l.enabled||l.enabled()),onClick(r){if(i._dropMode)return;G(Object.assign({},i,{menuItems:c1(l.menuItems),target:c,submenuDepth:(i.submenuDepth||0)+1,position:"side"})),r.stopPropagation(),r.preventDefault()},onDragenter(r){if(!i._dropMode)return;v2(),r.preventDefault(),r.stopPropagation();let n=r.relatedTarget;if(n&&c.contains(n))return;if(c.classList.add("xin-drop-over"),x){if(Y((i.submenuDepth||0)+1),x=!1,s)clearTimeout(s);s=null;return}if(s)clearTimeout(s);s=setTimeout(()=>{x=!0;let C=c1(l.menuItems),k=i._dataTypes?$2(C,i._dataTypes,i.hideDisabled):C;if(k.length>0)G(Object.assign({},i,{menuItems:k,target:c,submenuDepth:(i.submenuDepth||0)+1,position:"side",_dropMode:!0,_dataTypes:i._dataTypes}))},i.disclosureDelay??200)},onDragover(r){if(!i._dropMode)return;if(r.preventDefault(),r.stopPropagation(),r.dataTransfer)r.dataTransfer.dropEffect=l.dropAction?"copy":"link"},onDragleave(r){if(!i._dropMode)return;let n=r.relatedTarget;if(n&&c.contains(n))return;if(x&&n&&I.some((C)=>C.menu.contains(n)||C.target.contains(n)))return;if(c.classList.remove("xin-drop-over"),s)clearTimeout(s),s=null},onDrop(r){if(!i._dropMode||!l.dropAction)return;if(r.preventDefault(),r.stopPropagation(),c.classList.remove("xin-drop-over"),r.dataTransfer)l.dropAction(r.dataTransfer);Y(0)}},h,y,i.localized?Z(K(l.caption)):Z(l.caption),t.chevronRight({style:{justifySelf:"flex-end"}}));if(l.tooltip)c.dataset.tooltip=l.tooltip;if(i._dropMode&&l.dropAction&&l.acceptsDrop)c.dataset.drop=l.acceptsDrop.join(";");return c},Zl=(l,i)=>{if(l===null)return Z({class:"xin-menu-separator"});else if(i._dropMode){let o=l;if(o.menuItems&&c1(o.menuItems).length>0)return k5(o,i);else if(l.dropAction)return Gl(l,i);else{let s=l?.icon||Z(" ");if(typeof s==="string")s=t[s]();return Y2({class:"xin-menu-item",disabled:!0},s,i.localized?Z(K(l.caption)):Z(l.caption),Z(" "))}}else{let o=l?.action?Ql(l,i):k5(l,i);if(i.showChecked&&l.checked&&l.checked())requestAnimationFrame(()=>{o.scrollIntoView({block:"center"})});return o}},Rl=(l)=>{let{target:i,width:o,menuItems:y,role:s="menu"}=l,x=y.find((r)=>r?.icon||r?.checked),h=l.submenuDepth||0,c=Fl({class:x?"xin-menu xin-menu-with-icons":"xin-menu",role:s,onClick(){if(!l._dropMode)Y(0)},onDragover(r){if(!l._dropMode)return;r.preventDefault()},onDragenter(){if(!l._dropMode)return;v2()},onDragleave(r){if(!l._dropMode)return;let n=r.relatedTarget;if(n&&c.contains(n))return;if(n&&I.some((C)=>C.menu.contains(n)||C.target.contains(n)))return;Jl(h)}},Fl({style:{minWidth:i.offsetWidth+"px",width:typeof o==="number"?`${o}px`:o},onMousedown(r){r.preventDefault(),r.stopPropagation()}},...y.map((r)=>Zl(r,l))));return c},B2,I=[],H2=null,v2=()=>{if(H2)clearTimeout(H2),H2=null},Jl=(l)=>{v2(),H2=setTimeout(()=>{H2=null,Y(l)},500)},Y=(l=0)=>{if(v2(),l===0)document.querySelectorAll("tosi-menu.xin-drop-over").forEach((o)=>o.classList.remove("xin-drop-over"));let i=I.splice(l);for(let o of i)if(o.menu.remove(),o.onClose)o.onClose();return B2=i[0],l>0?I[l-1]:void 0};document.addEventListener("mousedown",(l)=>{if(I.length===0)return;let i=l.composedPath();if(!I.find((o)=>i.includes(o.target)||i.includes(o.menu)))Y(0)});document.body.addEventListener("keydown",(l)=>{if(l.key==="Escape")Y(0)});var G=(l)=>{l=Object.assign({submenuDepth:0},l);let{target:i,position:o,submenuDepth:y}=l;if(B2&&!document.body.contains(B2?.menu))B2=void 0;if(I.length&&!document.body.contains(I[0].menu))I.splice(0);if(l._dropMode){if(I.length>y&&I[y]?.target===i)return;Y(y)}else{if(y===0&&B2?.target===i)return;let h=Y(y);if(B2?.target===i)return;if(h&&h.target===i){Y();return}}if(!l.menuItems?.length)return;let s=Rl(l),x=J2({content:s,target:i,position:o});x.remainOnScroll=l._dropMode?"remain":"remove",I.push({target:i,menu:x,onClose:l.onClose})},Hl=(l)=>{let{dataTypes:i,...o}=l,y=$2(l.menuItems,i,l.hideDisabled);if(!y.length)return;G({...o,menuItems:y,_dropMode:!0,_dataTypes:i})};function p5(l,i,o=[]){for(let y of l){if(!y)continue;let{shortcut:s}=y,{menuItems:x}=y;if(s){if(r5(i,s)){let h=y;if(h.enabled&&!h.enabled())return;if(o.some((c)=>c.enabled&&!c.enabled()))return;return{action:h,path:o}}}else if(x){let h=p5(c1(x),i,[...o,y]);if(h)return h}}return}class W0 extends a{static preferredTagName="tosi-menu";static lightStyleSpec={":host":{display:"inline-flex",minWidth:d.touchSize,minHeight:d.touchSize},":host button":{margin:0,padding:0,alignSelf:"stretch",flex:"1",textAlign:"center"},":host button > xin-slot":{display:"flex",alignItems:"center",gap:g.tosiMenuTriggerGap("10px")}};static initAttributes={menuWidth:"auto",localized:!1,icon:"",acceptsDrop:"",disclosureDelay:0,hideDisabled:!1};menuItems=[];dropAction=null;_dragMatches=!1;_matchesDrag(l){if(!this.acceptsDrop)return!1;let i=t2(this.acceptsDrop);return[...l.dataTransfer?.types||[]].some((y)=>i.some((s)=>a2([s],y)))}showMenu=(l)=>{if(l.type==="click"||l.code==="Space")G({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),l.stopPropagation(),l.preventDefault()};handleDragEnter=(l)=>{if(this._dragMatches=this._matchesDrag(l),!this._dragMatches)return;v2(),this.classList.add("xin-drop-over");let i=[...l.dataTransfer?.types||[]];if(this.menuItems.length)Hl({target:this.parts.trigger,menuItems:this.menuItems,dataTypes:i,width:this.menuWidth,localized:this.localized,disclosureDelay:this.disclosureDelay||void 0,hideDisabled:this.hideDisabled});l.preventDefault()};handleDragOver=(l)=>{if(!this._dragMatches)return;if(l.preventDefault(),l.dataTransfer)l.dataTransfer.dropEffect=this.dropAction?"copy":"link"};handleDragLeave=(l)=>{if(!this._dragMatches)return;let i=l.relatedTarget;if(i&&this.contains(i))return;if(i&&I.some((o)=>o.menu.contains(i)||o.target.contains(i))){this.classList.remove("xin-drop-over");return}this.classList.remove("xin-drop-over"),Jl(0)};handleDrop=(l)=>{if(!this._dragMatches||!this.dropAction)return;if(l.preventDefault(),l.stopPropagation(),this.classList.remove("xin-drop-over"),l.dataTransfer)this.dropAction(l.dataTransfer);Y(0)};content=()=>Y2({tabindex:0,part:"trigger",onClick:this.showMenu},h8());handleShortcut=async(l)=>{let i=p5(this.menuItems,l);if(!i)return;l.preventDefault(),l.stopImmediatePropagation();let{action:o,path:y}=i;if(this.isConnected&&document.body.contains(this))await this.animateShortcut(y,o);if(o.action instanceof Function)o.action()};findMenuItemByCaption(l,i){for(let o of l.querySelectorAll(".xin-menu-item")){let y=o.children[1];if(y&&y.textContent===i)return o}return null}async animateShortcut(l,i){Y(0),G({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),await new Promise((y)=>setTimeout(y,80));for(let y=0;y<l.length;y++){let s=y+1,x=I[y]?.menu;if(!x)break;let h=this.findMenuItemByCaption(x,l[y].caption);if(!h)break;G({target:h,width:this.menuWidth,localized:this.localized,menuItems:c1(l[y].menuItems),submenuDepth:s,position:"side"}),await new Promise((c)=>setTimeout(c,80))}let o=I[I.length-1]?.menu;if(o){let y=this.findMenuItemByCaption(o,i.caption);if(y)y.classList.add("xin-menu-item-highlight")}await new Promise((y)=>setTimeout(y,300)),Y(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(),document.addEventListener("keydown",this.handleShortcut,!0),this.acceptsDrop)this.dataset.drop=this.acceptsDrop}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleShortcut)}}var $l=W0.elementCreator(),c8=$l,r8=W0;function n8(l,i,o){let y=l.find((s)=>s[i]!==void 0&&s[i]!==null);if(y!==void 0){let s=y[i];switch(typeof s){case"string":if(s.match(/^\d+(\.\d+)?$/))return 6*o;else if(s.includes(" "))return 20*o;else return 12*o;case"number":return 6*o;case"boolean":return 5*o;case"object":return!1;default:return 8*o}}return!1}var{div:z2,span:w5,button:C8,template:d8}=w,Yl=(l)=>l;class Q0 extends a{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","--row-height":"var(--tosi-table-row-height)","--touch-size":"var(--tosi-table-touch-size)","--dragged-header-bg":"var(--tosi-table-dragged-header-bg)","--dragged-header-color":"var(--tosi-table-dragged-header-color)","--drop-header-bg":"var(--tosi-table-drop-header-bg)",overflow:"auto hidden"},":host .thead, :host .tbody":{width:d.tosiTableGridRowWidth},":host .tr":{display:"grid",gridTemplateColumns:d.tosiTableGridColumns,height:d.tosiTableRowHeight,lineHeight:d.tosiTableRowHeight},":host .td, :host .th":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"flex",alignItems:"center"},":host .th .menu-trigger":{color:"currentColor",background:"none",padding:0,lineHeight:d.tosiTableTouchSize,height:d.tosiTableTouchSize,width:d.tosiTableTouchSize},':host [draggable="true"]':{cursor:"ew-resize"},':host [draggable="true"]:active':{background:d.tosiTableDraggedHeaderBg,color:d.tosiTableDraggedHeaderColor},":host .drag-over":{background:d.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=()=>{};selectedKey=Symbol("selected");selectBinding=(l,i)=>{if(i==null)return;l.toggleAttribute("aria-selected",i[this.selectedKey]===!0)};maxVisibleRows=1e4;get value(){return{array:this.array,filter:this.filter,columns:this.columns}}set value(l){let{array:i,columns:o,filter:y}=W(l);if(this._array!==i||this._columns!==o||this._filter!==y)this.queueRender();this._array=i||[],this._columns=o||null,this._filter=y||Yl}rowData={visible:[],pinnedTop:[],pinnedBottom:[]};_array=[];_columns=null;_filter=Yl;get virtual(){return this.rowHeight>0?{height:this.rowHeight}:void 0}constructor(){super();this.rowData=S({[this.instanceId]:this.rowData})[this.instanceId]}get array(){return this._array}set array(l){this._array=W(l),this.queueRender()}get filter(){return this._filter}set filter(l){if(this._filter!==l)this._filter=l,this.queueRender()}get sort(){if(this._sort)return this._sort;let l=this._columns?.find((o)=>o.sort==="ascending"||o.sort==="descending");if(!l)return;let{prop:i}=l;return l.sort==="ascending"?(o,y)=>o[i]>y[i]?1:-1:(o,y)=>o[i]>y[i]?-1:1}set sort(l){if(this._sort!==l)this._sort=l,this.queueRender()}get columns(){if(!Array.isArray(this._columns)){let{_array:l}=this;this._columns=Object.keys(l[0]||{}).map((i)=>{let o=n8(l,i,this.charWidth);return{name:i.replace(/([a-z])([A-Z])/g,"$1 $2").toLocaleLowerCase(),prop:i,align:typeof l[0][i]==="number"||l[0][i]!==""&&!isNaN(l[0][i])?"right":"left",visible:o!==!1,width:o?o:0}})}return this._columns}set columns(l){this._columns=l,this.queueRender()}get visibleColumns(){return this.columns.filter((l)=>l.visible!==!1)}content=null;getColumn(l){let i=(l.touches!==void 0?l.touches[0].clientX:l.clientX)-this.getBoundingClientRect().x+this.scrollLeft,o=l.touches!==void 0?20:5,y=0,s=[];return this.visibleColumns.find((h)=>{if(h.visible!==!1)return y+=h.width,s.push(y),Math.abs(i-y)<o})}setCursor=(l)=>{if(this.getColumn(l)!==void 0)this.style.cursor="col-resize";else this.style.cursor=""};resizeColumn=(l)=>{let i=this.getColumn(l);if(i!==void 0){let o=Number(i.width),y=l.touches!==void 0,s=y?l.touches[0].identifier:void 0;M(l,(x,h,c)=>{if((y?[...c.touches].find((C)=>C.identifier===s):!0)===void 0)return!0;let n=o+x;if(i.width=n>this.minColumnWidth?n:this.minColumnWidth,this.setColumnWidths(),c.type==="mouseup")return!0},"col-resize")}};selectRow(l,i=!0){if(i)l[this.selectedKey]=!0;else delete l[this.selectedKey];for(let o of Array.from(this.querySelectorAll(".tr"))){let y=U1(o);this.selectBinding(o,y)}}selectRows(l,i=!0){for(let o of l||this.array)if(i)o[this.selectedKey]=!0;else delete o[this.selectedKey];for(let o of Array.from(this.querySelectorAll(".tr"))){let y=U1(o);this.selectBinding(o,y)}}deSelect(l){this.selectRows(l,!1)}rangeStart;updateSelection=(l)=>{if(!this.select&&!this.multiple)return;let{target:i}=l;if(!(i instanceof HTMLElement))return;let o=i.closest(".tr");if(!(o instanceof HTMLElement))return;let y=U1(o);if(y==null)return;let s=l,x=window.getSelection();if(x!==null)x.removeAllRanges();let h=this.visibleRows;if(this.multiple&&s.shiftKey&&h.length>0&&this.rangeStart!==y){let c=this.rangeStart===void 0||this.rangeStart[this.selectedKey]===!0,[r,n]=[this.rangeStart!==void 0?h.indexOf(this.rangeStart):0,h.indexOf(y)].sort((C,k)=>C-k);if(r>-1)for(let C=r;C<=n;C++){let k=h[C];this.selectRow(k,c)}}else if(this.multiple&&s.metaKey){this.selectRow(y,!y[this.selectedKey]);let c=h.indexOf(y),r=h[c+1],n=c>0?h[c-1]:void 0;if(r!==void 0&&r[this.selectedKey]===!0)this.rangeStart=r;else if(n!==void 0&&n[this.selectedKey]===!0)this.rangeStart=n;else this.rangeStart=void 0}else this.rangeStart=y,this.deSelect(),this.selectRow(y,!0);this.selectionChanged(this.visibleSelectedRows);for(let c of Array.from(this.querySelectorAll(".tr"))){let r=U1(c);this.selectBinding(c,r)}};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)}setColumnWidths(){let l=this.visibleColumns.map((o)=>o.width+"px").join(" "),i=this.visibleColumns.reduce((o,y)=>o+y.width,0)+"px";this.style.setProperty("--tosi-table-grid-columns",l),this.style.setProperty("--tosi-table-grid-row-width",i),this.style.setProperty("--grid-columns",l),this.style.setProperty("--grid-row-width",i)}sortByColumn=(l,i="auto")=>{for(let o of this.columns.filter((y)=>W(y.sort)!==!1))if(W(o)===l){if(i==="auto")o.sort=o.sort==="ascending"?"descending":"ascending";else o.sort=i;this.queueRender()}else delete o.sort};popColumnMenu=(l,i)=>{let{sortByColumn:o}=this,y=this.columns.filter((h)=>h.visible===!1),s=this.queueRender.bind(this),x=[];if(!this.nosort&&i.sort!==!1)x.push({caption:this.localized?`${K("Sort")} ${K("Ascending")}`:"Sort Ascending",icon:"sortAscending",action(){o(i)}},{caption:this.localized?`${K("Sort")} ${K("Descending")}`:"Sort Descending",icon:"sortDescending",action(){o(i,"descending")}});if(!this.nohide){if(x.length)x.push(null);x.push({caption:this.localized?`${K("Hide")} ${K("Column")}`:"Hide Column",icon:"eyeOff",enabled:()=>i.visible!==!0,action(){i.visible=!1,s()}},{caption:this.localized?`${K("Show")} ${K("Column")}`:"Show Column",icon:"eye",enabled:()=>y.length>0,menuItems:y.map((h)=>{return{caption:h.name||h.prop,action(){delete h.visible,s()}}})})}G({target:l,localized:this.localized,menuItems:x})};get captionSpan(){return this.localized?f1:w5}headerCell=(l)=>{let{popColumnMenu:i}=this,o="none",y;switch(l.sort){case"ascending":y=t.sortAscending(),o="descending";break;case!1:break;default:break;case"descending":o="ascending",y=t.sortDescending()}let s=!(this.nosort&&this.nohide)?C8({class:"menu-trigger",onClick(x){i(x.target,l),x.stopPropagation()}},y||t.moreVertical()):{};return l.headerCell!==void 0?l.headerCell(l):w5({class:"th",role:"columnheader",ariaSort:o,style:{...this.cellStyle,justifyContent:l.align||"left"}},this.captionSpan({style:{flex:"1"}},typeof l.name==="string"?l.name:l.prop),s)};dataCell=(l)=>{if(l.dataCell!==void 0)return l.dataCell(l);return w5({class:"td",role:"cell",style:{...this.cellStyle,justifyContent:l.align||"left"},bindText:`^.${l.prop}`})};get visibleRows(){return W(this.rowData.visible)}get visibleSelectedRows(){return this.visibleRows.filter((l)=>l[this.selectedKey])}get selectedRows(){return this.array.filter((l)=>l[this.selectedKey])}rowTemplate(l){return d8(z2({class:"tr",role:"row",bind:{value:"^",binding:{toDOM:this.selectBinding}}},...l.map(this.dataCell)))}draggedColumn;dropColumn=(l)=>{let i=l.target.closest(".drag-over"),o=Array.from(i.parentElement.children).indexOf(i),y=this.visibleColumns[o],s=this.columns.indexOf(this.draggedColumn),x=this.columns.indexOf(y);this.columns.splice(s,1),this.columns.splice(x,0,this.draggedColumn),console.log({event:l,target:i,targetIndex:o,draggedIndex:s,droppedIndex:x}),this.queueRender(),l.preventDefault(),l.stopPropagation()};render(){super.render(),this.rowData.pinnedTop=this.pinnedTop>0?this._array.slice(0,this.pinnedTop):[],this.rowData.pinnedBottom=this.pinnedBottom>0?this._array.slice(this._array.length-this.pinnedBottom):[],this.rowData.visible=this.filter(this._array.slice(this.pinnedTop,Math.min(this.maxVisibleRows,this._array.length-this.pinnedTop-this.pinnedBottom)));let{sort:l}=this;if(l)this.rowData.visible.sort(l);this.textContent="",this.style.display="flex",this.style.flexDirection="column";let{visibleColumns:i}=this;if(this.style.setProperty("--tosi-table-row-height",`${this.rowHeight}px`),this.style.setProperty("--row-height",`${this.rowHeight}px`),this.setColumnWidths(),!this.noreorder)d5();let o=this.instanceId+"-column-header",y=i.map((s)=>{let x=this.headerCell(s);if(!this.noreorder&&x.children[0]){let h=x.children[0];h.setAttribute("draggable","true"),h.style.pointerEvents="all",h.dataset.drag=o,x.dataset.drop=o,h.addEventListener("dragstart",()=>{this.draggedColumn=s}),x.addEventListener("drop",this.dropColumn)}return x});if(this.append(z2({class:"thead",role:"rowgroup",style:{touchAction:"none"}},z2({class:"tr",role:"row"},...y))),this.pinnedTop>0)this.append(z2({part:"pinnedTopRows",class:"tbody",role:"rowgroup",style:{flex:"0 0 auto",overflow:"hidden",height:`${this.rowHeight*this.pinnedTop}px`},bindList:{value:this.rowData.pinnedTop,virtual:this.virtual}},this.rowTemplate(i)));if(this.append(z2({part:"visibleRows",class:"tbody",role:"rowgroup",style:{content:" ",minHeight:"100px",flex:"1 1 100px",overflow:"hidden auto"},bindList:{value:this.rowData.visible,virtual:this.virtual}},this.rowTemplate(i))),this.pinnedBottom>0)this.append(z2({part:"pinnedBottomRows",class:"tbody",role:"rowgroup",style:{flex:"0 0 auto",overflow:"hidden",height:`${this.rowHeight*this.pinnedBottom}px`},bindList:{value:this.rowData.pinnedBottom,virtual:this.virtual}},this.rowTemplate(i)))}}var g8=Q0,t5=Q0.elementCreator(),k8=t5,p8=t5;var{dialog:w8,button:a5,header:t8,footer:a8,xinSlot:B5,h3:v5,p:z5,label:B8,input:v8,div:z8}=w;class f5 extends a{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:g.menuShadow("0 5px 10px #0004"),_dialogBackground:g.background("#fafafa"),_dialogColor:g.textColor("#222"),boxShadow:d.dialogShadow,background:d.dialogBackground,color:d.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(l,i="Alert"){return new Promise((o)=>{let y=G0({removeOnClose:!0,closeOnBackgroundClick:!0,dialogWillClose(){o()}},v5({slot:"header"},i),l.includes(`
15
- `)?w.pre({style:{whiteSpace:"pre-wrap",margin:0}},l):z5(l));document.body.append(y),y.showModal()})}static async confirm(l,i="Confirm"){return new Promise((o)=>{let y=G0({removeOnClose:!0,dialogWillClose(s){o(s==="confirm")}},v5({slot:"header"},i),z5(l),a5({slot:"footer",onClick(){y.close()}},"Cancel"));document.body.append(y),y.showModal()})}static async prompt(l,i="Prompt",o=""){return new Promise((y)=>{let s=v8({value:o}),x=G0({removeOnClose:!0,dialogWillClose(h){y(h==="confirm"?s.value:null)},initialFocus(){s.focus()}},v5({slot:"header"},i),z5(B8({style:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:5}},z8(l),s)),a5({slot:"footer",onClick(){x.close()}},"Cancel"));document.body.append(x),x.showModal()})}removeOnClose=!1;closeOnBackgroundClick=!1;constructor(){super();d2(this,"click",()=>{if(this.closeOnBackgroundClick)this.close()})}dialogWillClose=(l="cancel")=>{console.log("dialog will close with",l)};initialFocus(){this.parts.ok.focus()}#l=(l)=>{};showModal=()=>{return this.style.zIndex=String(l2()),new Promise((l)=>{this.#l=l,this.parts.dialog.showModal(),requestAnimationFrame(()=>{this.initialFocus()})})};close=(l="cancel")=>{if(this.dialogWillClose(l),this.#l(l),this.parts.dialog.close(),this.removeOnClose)this.remove()};ok=()=>{this.close("confirm")};content=()=>w8({part:"dialog"},t8(B5({name:"header"})),B5(),a8(B5({name:"footer"}),a5({part:"ok",onClick:this.ok},"OK")))}var G0=f5.elementCreator();function A5(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var o2=A5();function Ll(l){o2=l}var T2={exec:()=>null};function X(l,i=""){let o=typeof l=="string"?l:l.source,y={replace:(s,x)=>{let h=typeof x=="string"?x:x.source;return h=h.replace(D.caret,"$1"),o=o.replace(s,h),y},getRegex:()=>new RegExp(o,i)};return y}var f8=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),D={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:(l)=>new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}#`),htmlBeginRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}<(?:[a-z].*>|!--)`,"i")},j8=/^(?:[ \t]*(?:\n|$))+/,A8=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,q8=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,e2=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_8=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,q5=/(?:[*+-]|\d{1,9}[.)])/,Ml=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ml=X(Ml).replace(/bull/g,q5).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(),V8=X(Ml).replace(/bull/g,q5).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(),_5=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,P8=/^[^\n]+/,V5=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,O8=X(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",V5).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),U8=X(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,q5).getRegex(),$0="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",P5=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,X8=X("^ {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",P5).replace("tag",$0).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),El=X(_5).replace("hr",e2).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",$0).getRegex(),N8=X(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",El).getRegex(),O5={blockquote:N8,code:A8,def:O8,fences:q8,heading:_8,hr:e2,html:X8,lheading:ml,list:U8,newline:j8,paragraph:El,table:T2,text:P8},Il=X("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",e2).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",$0).getRegex(),K8={...O5,lheading:V8,table:Il,paragraph:X(_5).replace("hr",e2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Il).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",$0).getRegex()},b8={...O5,html:X(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",P5).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:T2,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(_5).replace("hr",e2).replace("heading",` *#{1,6} *[^
16
- ]`).replace("lheading",ml).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},F8=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,W8=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,li=/^( {2,}|\\)\n(?!\s*$)/,Q8=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Y0=/[\p{P}\p{S}]/u,U5=/[\s\p{P}\p{S}]/u,ii=/[^\s\p{P}\p{S}]/u,G8=X(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,U5).getRegex(),oi=/(?!~)[\p{P}\p{S}]/u,Z8=/(?!~)[\s\p{P}\p{S}]/u,R8=/(?:[^\s\p{P}\p{S}]|~)/u,J8=X(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",f8?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),yi=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,H8=X(yi,"u").replace(/punct/g,Y0).getRegex(),$8=X(yi,"u").replace(/punct/g,oi).getRegex(),si="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Y8=X(si,"gu").replace(/notPunctSpace/g,ii).replace(/punctSpace/g,U5).replace(/punct/g,Y0).getRegex(),I8=X(si,"gu").replace(/notPunctSpace/g,R8).replace(/punctSpace/g,Z8).replace(/punct/g,oi).getRegex(),S8=X("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ii).replace(/punctSpace/g,U5).replace(/punct/g,Y0).getRegex(),D8=X(/\\(punct)/,"gu").replace(/punct/g,Y0).getRegex(),T8=X(/^<(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(),e8=X(P5).replace("(?:-->|$)","-->").getRegex(),u8=X("^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",e8).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),R0=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,L8=X(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",R0).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xi=X(/^!?\[(label)\]\[(ref)\]/).replace("label",R0).replace("ref",V5).getRegex(),hi=X(/^!?\[(ref)\](?:\[\])?/).replace("ref",V5).getRegex(),M8=X("reflink|nolink(?!\\()","g").replace("reflink",xi).replace("nolink",hi).getRegex(),Sl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,X5={_backpedal:T2,anyPunctuation:D8,autolink:T8,blockSkip:J8,br:li,code:W8,del:T2,emStrongLDelim:H8,emStrongRDelimAst:Y8,emStrongRDelimUnd:S8,escape:F8,link:L8,nolink:hi,punctuation:G8,reflink:xi,reflinkSearch:M8,tag:u8,text:Q8,url:T2},m8={...X5,link:X(/^!?\[(label)\]\((.*?)\)/).replace("label",R0).getRegex(),reflink:X(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",R0).getRegex()},j5={...X5,emStrongRDelimAst:I8,emStrongLDelim:$8,url:X(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Sl).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:X(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Sl).getRegex()},E8={...j5,br:X(li).replace("{2,}","*").getRegex(),text:X(j5.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Z0={normal:O5,gfm:K8,pedantic:b8},I2={normal:X5,gfm:j5,breaks:E8,pedantic:m8},l7={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Dl=(l)=>l7[l];function j1(l,i){if(i){if(D.escapeTest.test(l))return l.replace(D.escapeReplace,Dl)}else if(D.escapeTestNoEncode.test(l))return l.replace(D.escapeReplaceNoEncode,Dl);return l}function Tl(l){try{l=encodeURI(l).replace(D.percentDecode,"%")}catch{return null}return l}function el(l,i){let o=l.replace(D.findPipe,(x,h,c)=>{let r=!1,n=h;for(;--n>=0&&c[n]==="\\";)r=!r;return r?"|":" |"}),y=o.split(D.splitPipe),s=0;if(y[0].trim()||y.shift(),y.length>0&&!y.at(-1)?.trim()&&y.pop(),i)if(y.length>i)y.splice(i);else for(;y.length<i;)y.push("");for(;s<y.length;s++)y[s]=y[s].trim().replace(D.slashPipe,"|");return y}function S2(l,i,o){let y=l.length;if(y===0)return"";let s=0;for(;s<y;){let x=l.charAt(y-s-1);if(x===i&&!o)s++;else if(x!==i&&o)s++;else break}return l.slice(0,y-s)}function i7(l,i){if(l.indexOf(i[1])===-1)return-1;let o=0;for(let y=0;y<l.length;y++)if(l[y]==="\\")y++;else if(l[y]===i[0])o++;else if(l[y]===i[1]&&(o--,o<0))return y;return o>0?-2:-1}function ul(l,i,o,y,s){let x=i.href,h=i.title||null,c=l[1].replace(s.other.outputLinkReplace,"$1");y.state.inLink=!0;let r={type:l[0].charAt(0)==="!"?"image":"link",raw:o,href:x,title:h,text:c,tokens:y.inlineTokens(c)};return y.state.inLink=!1,r}function o7(l,i,o){let y=l.match(o.other.indentCodeCompensation);if(y===null)return i;let s=y[1];return i.split(`
12
+ `)},Q9=(l)=>{y1("initVars","initVars is deprecated. Just use _ and __ prefixes instead.");let i={};for(let o of Object.keys(l)){let y=l[o],s=a1(o);i[`--${s}`]=typeof y==="number"&&y!==0?String(y)+"px":y}return i},Y4=(l)=>{let i={};for(let o of Object.keys(l)){let y=l[o];if(y instanceof f)i[o]=y.inverseLuminance;else if(typeof y==="string"&&y.match(/^(#[0-9a-fA-F]{3}|rgba?\(|hsla?\()/))i[o]=f.fromCss(y).inverseLuminance}return i},k=new Proxy({},{get(l,i){if(l[i]===void 0){let o="--"+a1(i);l[i]=(y)=>`var(${o}, ${y})`}return l[i]}}),d=new Proxy({},{get(l,i){if(i==="default")return k;if(l[i]==null){i=a1(i);let[,o,,y,s,x]=i.match(/^([-\w]*?)((_)?(\d+)(\w?))?$/)||["",i],h=`--${o}`;if(s!=null){let c=y==null?Number(s)/100:-Number(s)/100;switch(x){case"b":case"s":case"h":case"o":{let r=`--${i}`;f.registerComputedColor(r,h,c,x),l[i]=`var(${r})`}break;case"":l[i]=`calc(var(${h}) * ${c})`;break;default:throw console.error(x),Error(`Unrecognized method ${x} for css variable ${h}`)}}else l[i]=`var(${h})`}return l[i]}});function sl(){let l=(i)=>typeof matchMedia<"u"&&matchMedia(i).matches;return{colorScheme:l("(prefers-color-scheme: dark)")?"dark":"light",contrast:l("(prefers-contrast: more)")?"more":l("(prefers-contrast: less)")?"less":l("(prefers-contrast: custom)")?"custom":"no-preference",reducedMotion:l("(prefers-reduced-motion: reduce)"),reducedTransparency:l("(prefers-reduced-transparency: reduce)"),forcedColors:l("(forced-colors: active)")}}function G9(l){if(typeof matchMedia>"u")return()=>{};let i=["(prefers-color-scheme: dark)","(prefers-contrast: more)","(prefers-contrast: less)","(prefers-contrast: custom)","(prefers-reduced-motion: reduce)","(prefers-reduced-transparency: reduce)","(forced-colors: active)"],o=()=>l(sl()),y=i.map((s)=>matchMedia(s));for(let s of y)s.addEventListener("change",o);return()=>{for(let s of y)s.removeEventListener("change",o)}}var Z9="http://www.w3.org/1998/Math/MathML",R9="http://www.w3.org/2000/svg",d0={},xl=(l,i,o)=>{let y=ol(a1(i),o);if(y.prop.startsWith("--"))l.style.setProperty(y.prop,y.value);else l.style[i]=y.value},J9=(l)=>{return{toDOM(i,o){xl(i,l,o)}}},hl=(l,i,o)=>{if(i==="style")if(typeof o==="object")for(let y of Object.keys(o))if(L(o[y]))Z1(l,o[y],J9(y));else xl(l,y,o[y]);else l.setAttribute("style",o);else{let y=a1(i),s=l.constructor.observedAttributes;if(s?.includes(i)||s?.includes(y))if(typeof o==="boolean")o?l.setAttribute(y,""):l.removeAttribute(y);else l.setAttribute(y,o);else if(l[i]!==void 0){let{MathMLElement:x}=globalThis;if(l instanceof SVGElement||x!==void 0&&l instanceof x)l.setAttribute(i,o);else l[i]=o}else if(y==="class")o.split(" ").forEach((x)=>{l.classList.add(x)});else if(l[y]!==void 0)l[y]=o;else if(typeof o==="boolean")o?l.setAttribute(y,""):l.removeAttribute(y);else l.setAttribute(y,o)}},z4={},$9=(l)=>{if(!z4[l])z4[l]={toDOM(i,o){hl(i,l,o)}};return z4[l]},I4=(l,i,o)=>{if(i==="apply")o(l);else if(i.match(/^on[A-Z]/)!=null){let y=i.substring(2).toLowerCase();d2(l,y,o)}else if(i==="bind")if((typeof o.binding==="string"?P1[o.binding]:o.binding)!==void 0&&o.value!==void 0)Z1(l,o.value,o.binding instanceof Function?{toDOM:o.binding}:o.binding);else throw Error("bad binding");else if(i.match(/^bind[A-Z]/)!=null){let y=i.substring(4,5).toLowerCase()+i.substring(5),s=P1[y];if(s!==void 0)Z1(l,o,s);else throw Error(`${i} is not allowed, bindings.${y} is not defined`)}else if(L(o))Z1(l,o,$9(i));else hl(l,i,o)},S4=(l,...i)=>{if(d0[l]===void 0){let[s,x]=l.split("|");if(x===void 0)d0[l]=globalThis.document.createElement(s);else d0[l]=globalThis.document.createElementNS(x,s)}let o=d0[l].cloneNode(),y={};for(let s of i)if(s instanceof Element||s instanceof DocumentFragment||typeof s==="string"||typeof s==="number")if(o instanceof HTMLTemplateElement)o.content.append(s);else o.append(s);else if(L(s))o.append(w.span({bindText:s}));else Object.assign(y,s);for(let s of Object.keys(y)){let x=y[s];I4(o,s,x)}return o},D4=(...l)=>{let i=globalThis.document.createDocumentFragment();for(let o of l)i.append(o);return i},w=new Proxy({fragment:D4},{get(l,i){if(i=i.replace(/[A-Z]/g,(o)=>`-${o.toLocaleLowerCase()}`),l[i]===void 0)l[i]=(...o)=>S4(i,...o);return l[i]},set(){throw Error("You may not add new properties to elements")}}),B0=new Proxy({fragment:D4},{get(l,i){if(l[i]===void 0)l[i]=(...o)=>S4(`${i}|${R9}`,...o);return l[i]},set(){throw Error("You may not add new properties to elements")}}),cl=new Proxy({fragment:D4},{get(l,i){if(l[i]===void 0)l[i]=(...o)=>S4(`${i}|${Z9}`,...o);return l[i]},set(){throw Error("You may not add new properties to elements")}}),N3=new WeakSet;function H9(l,i,o="part"){let y=`[data-${o}]`;for(let s of Array.from(l.querySelectorAll(y))){if(N3.has(s))continue;let x=s.getAttribute(`data-${o}`);if(x==null)continue;let h=i[x];if(h==null)continue;N3.add(s);for(let c of Object.keys(h))I4(s,c,h[c])}}var Y9=["sort","splice","copyWithin","fill","pop","push","reverse","shift","unshift"],I9=!0,S9=/^\.?([^.[\](),])+(\.[^.[\](),]+|\[\d+\]|\[[^=[\](),]*=[^[\]()]+\])*$/,D9=(l)=>S9.test(l),K1=(l="",i="")=>{if(l==="")return i;else if(i.match(/^\d+$/)!==null||i.includes("="))return`${l}[${i}]`;else return`${l}.${i}`},rl={};function f4(l,i){if(l!==null&&(typeof l==="object"||typeof l==="function"))return l;return new Proxy(rl,G1(i,!0))}var U2=()=>new Proxy({},G1("^",!0)),j4=(l)=>{let i=l(U2())?.path;if(!i?.startsWith("^."))throw Error("selector must return a property of the item");return i.substring(2)},A4=(l,i,o)=>{for(let y=0;y<l.length;y++)if(`${u(l[y],i)}`===`${o}`)return y;return-1},K3=(l,i)=>({listFind(o,y){if(o instanceof Element){let h=o;while(h&&!h[K2]&&h.parentElement)h=h.parentElement;let c=h?.[K2];if(c==null)return;let r=i.indexOf(c);return r!==-1?o1[l][r]:void 0}let s=j4(o),x=A4(i,s,y);return x!==-1?o1[l][x]:void 0},listUpdate(o,y){let s=j4(o),x=u(y,s),h=A4(i,s,x);if(h!==-1){let c=o1[l][h];for(let r of Object.keys(y))c[r]=y[r];return c}return o1[l].push(y),o1[l][i.length-1]},listRemove(o,y){let s=j4(o),x=A4(i,s,y);if(x===-1)return!1;return o1[l].splice(x,1),!0}}),b3=!1;function u1(){if(!b3)console.warn("xinValue, tosiValue, xinPath, tosiPath, etc. are deprecated. Use value, path, observe, bind, on, binding, listBinding instead."),b3=!0}var F3=(l)=>{return l===rl},G1=(l,i)=>({get(o,y){if(F3(o)){let c=()=>u(s1,l);switch(y){case"path":return l;case"value":return c();case"valueOf":case"toJSON":return()=>c();case Symbol.toPrimitive:return(n)=>{let C=c();if(n==="number")return Number(C);if(n==="string")return String(C);return C};case"toString":return()=>String(c());case"touch":return()=>n1(l);case"observe":return(n)=>{let C=W1(l,n);return()=>Q1(C)};case"on":return(n,C)=>C0()(n,C,c());case"bind":return(n,C,g)=>{n0()(n,l,C,g)};case"binding":return(n)=>({bind:{value:l,binding:n}});case"listBinding":return(n=({span:g})=>g({bindText:"^"}),C={})=>[{bindList:{value:l,...C}},w.template(n(w,U2()))];case"listFind":case"listUpdate":case"listRemove":return K3(l,o)[y];case M1:case"xinValue":case"tosiValue":return u1(),c();case B1:case"xinPath":case"tosiPath":return u1(),l;case f3:case"tosiObserve":return u1(),(n)=>{let C=W1(l,n);return()=>Q1(C)};case A3:case"tosiOn":return u1(),(n,C)=>C0()(n,C,c());case j3:case"tosiBind":return u1(),(n,C,g)=>{n0()(n,l,C,g)};case"tosiBinding":return u1(),(n)=>({bind:{value:l,binding:n}});case"tosiListBinding":return u1(),(n=({span:g})=>g({bindText:"^"}),C={})=>[{bindList:{value:l,...C}},w.template(n(w,U2()))]}let r=c();if(r!=null){let n=Object(r);if(y in n){let C=n[y];return typeof C==="function"?C.bind(n):C}}return}if(i&&!(y in o))switch(y){case"path":return l;case"value":return o.valueOf?o.valueOf():o;case"valueOf":case"toJSON":return()=>o.valueOf?o.valueOf():o;case"touch":return()=>n1(l);case"observe":return(c)=>{let r=W1(l,c);return()=>Q1(r)};case"on":return(c,r)=>C0()(c,r,W(o));case"bind":return(c,r,n)=>{n0()(c,l,r,n)};case"binding":return(c)=>({bind:{value:l,binding:c}});case"listBinding":return(c=({span:n})=>n({bindText:"^"}),r={})=>[{bindList:{value:l,...r}},w.template(c(w,U2()))];case"listFind":case"listUpdate":case"listRemove":return K3(l,o)[y]}switch(y){case B1:case"xinPath":case"tosiPath":return l;case M1:case"xinValue":case"tosiValue":return o.valueOf?o.valueOf():o;case f3:case"xinObserve":case"tosiObserve":return(c)=>{let r=W1(l,c);return()=>Q1(r)};case A3:case"xinOn":case"tosiOn":return(c,r)=>C0()(c,r,W(o));case j3:case"xinBind":case"tosiBind":return(c,r,n)=>{n0()(c,l,r,n)};case"tosiBinding":return(c)=>({bind:{value:l,binding:c}});case"tosiListBinding":return(c=({span:n})=>n({bindText:"^"}),r={})=>[{bindList:{value:l,...r}},w.template(c(w,U2()))]}if(typeof y==="symbol")return o[y];let s=Object.getOwnPropertyDescriptor(o,y);if(s&&!s.configurable&&!s.writable&&"value"in s)return s.value;let x=y,h=x.match(/^([^.[]+)\.(.+)$/)??x.match(/^([^\]]+)(\[.+)/)??x.match(/^(\[[^\]]+\])\.(.+)$/)??x.match(/^(\[[^\]]+\])\[(.+)$/);if(h!==null){let[,c,r]=h,n=K1(l,c),C=u(o,c);return C!==null&&typeof C==="object"?new Proxy(C,G1(n,i))[r]:C}if(x.startsWith("[")&&x.endsWith("]"))x=x.substring(1,x.length-1);if(!Array.isArray(o)&&o[x]!==void 0||Array.isArray(o)&&x.includes("=")){let c;if(x.includes("=")){let[r,n]=x.split("=");c=o.find((C)=>`${u(C,r)}`===n)}else c=o[x];if(c instanceof Object){let r=K1(l,x);return new Proxy(c instanceof Function?c.bind(o):c,G1(r,i))}else return i?f4(c,K1(l,x)):c}else if(Array.isArray(o)){let c=o[x];return typeof c==="function"?(...r)=>{let n=r.map((g)=>W(g)),C=c.apply(o,n);if(Y9.includes(x))n1(l);if(C!=null&&typeof C==="object"){if(x==="find"||x==="findLast"||x==="at"){let g=o.indexOf(C);if(g!==-1)return new Proxy(C,G1(K1(l,String(g)),i))}}return C}:typeof c==="object"?new Proxy(c,G1(K1(l,x),i)):i?f4(c,K1(l,x)):c}else return i?f4(o[x],K1(l,x)):o[x]},set(o,y,s){s=W(s);let x=y===M1||y==="xinValue"||y==="tosiValue"||y==="value"&&(F3(o)||i)?l:K1(l,y);if(I9&&!D9(x))throw Error(`setting invalid path ${x}`);if(W(H[x])!==s&&a0(s1,x,s))n1(x);return!0}}),T4=(l,i)=>{let o=typeof i==="function"?i:H[i];if(typeof o!=="function")throw Error(`observe expects a function or path to a function, ${i} is neither`);return W1(l,o)},H=new Proxy(s1,G1("",!1));f9(H);var o1=new Proxy(s1,G1("",!0)),T9=16,u9=100;function W3(l,i){let o=Array.from(l.querySelectorAll(r2));if(l.matches(r2))o.unshift(l);for(let y of o){let s=m1.get(y);for(let x of s){if(x.path.startsWith("^"))x.path=`${i}${x.path.substring(1)}`;if(x.binding.toDOM!=null)x.binding.toDOM(y,H[x.path])}}}class nl{boundElement;listTop;listBottom;isNamespaced;template;options;itemToElement;array=[];_filteredCache;_update;_previousSlice;static filterBoundObservers=new WeakMap;constructor(l,i,o={}){if(this.boundElement=l,this.itemToElement=new WeakMap,o.idPath!=null){let s=L(i);if(s!=null)n9(s,o.idPath)}if(l.children.length!==1)throw Error("ListBinding expects an element with exactly one child element");if(l.children[0]instanceof HTMLTemplateElement){let s=l.children[0];if(s.content.children.length!==1)throw Error("ListBinding expects a template with exactly one child element");this.template=F2(s.content.children[0])}else this.template=l.children[0],this.template.remove();this.options=o;let y=l.namespaceURI;if(this.isNamespaced=y==="http://www.w3.org/2000/svg"||y==="http://www.w3.org/1998/Math/MathML",this.isNamespaced)this.listTop=null,this.listBottom=null;else 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.boundElement.append(this.listTop),this.boundElement.append(this.listBottom);if(this.boundElement[k0]=this,this.isNamespaced&&o.virtual!=null)console.warn("ListBinding: virtual scrolling is not supported in SVG/MathML containers, ignoring virtual option");if(!this.isNamespaced&&o.virtual!=null)if(Q4.observe(this.boundElement),this._update=n2(()=>{this.update(this.array,!0)},T9),this.boundElement.addEventListener("resize",this._update),o.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:l,visibleProp:i}=this.options,o=this.array;if(l!==void 0)o=o.filter((y)=>y[l]!==!0);if(i!==void 0)o=o.filter((y)=>y[i]===!0);if(this.options.filter&&this.needle!==void 0)o=this.options.filter(o,this.needle);return this._filteredCache=o,o}visibleSlice(){let{virtual:l}=this.options,i=this.filteredArray(),o=0,y=i.length-1,s=0,x=0;if(l!=null&&this.boundElement instanceof HTMLElement){let h=this.boundElement.offsetWidth,c=l.scrollContainer==="window",r,n;if(c){r=window.innerHeight;let p=this.boundElement.getBoundingClientRect();n=Math.max(0,-p.top)}else r=this.boundElement.offsetHeight,n=this.boundElement.scrollTop;let C=l.width!=null?Math.max(1,Math.floor(h/l.width)):l.visibleColumns??1,g=Math.ceil(i.length/C);if(l.minHeight!=null){let p=l.minHeight,z=Math.ceil(r/p)+(l.rowChunkSize||1),B=C*z,j=g*p,V=Math.max(0,j-r),P=V>0?Math.min(1,Math.max(0,n/V)):0,q=Math.max(0,g-z+1),_=P*q,N=Math.floor(_);if(l.rowChunkSize)N-=N%l.rowChunkSize;return o=N*C,y=o+B-1,s=n,x=Math.max(0,j-n-r),{items:i,firstItem:o,lastItem:y,topBuffer:s,bottomBuffer:x,interpolation:{t:P,position:_,scrollTop:n,viewportHeight:r,totalScrollHeight:j,rowHeight:l.height}}}else{let p=Math.ceil(r/l.height)+(l.rowChunkSize||1),z=C*p,B=Math.floor(n/l.height);if(B>g-p+1)B=Math.max(0,g-p+1);if(l.rowChunkSize)B-=B%l.rowChunkSize;o=B*C,y=o+z-1,s=B*l.height,x=Math.max((g-p)*l.height-s,0)}}return{items:i,firstItem:o,lastItem:y,topBuffer:s,bottomBuffer:x}}needle;filter=n2((l)=>{if(this.needle!==l)this.needle=l,this.update(this.array)},u9);update(l,i){if(l==null)l=[];if(this.array=l,!i)this._filteredCache=void 0;let{hiddenProp:o,visibleProp:y}=this.options,s=L(l),x=this.visibleSlice();this.boundElement.classList.toggle("-xin-empty-list",x.items.length===0);let h=this._previousSlice,{firstItem:c,lastItem:r,topBuffer:n,bottomBuffer:C}=x,g=o===void 0&&y===void 0&&i===!0&&h!=null&&c===h.firstItem&&r===h.lastItem;if(g&&x.interpolation==null&&n===h.topBuffer&&C===h.bottomBuffer)return;if(g&&x.interpolation!=null){this._updateInterpolatedBuffers(x);return}this._previousSlice=x;let p=0,z=0,B=0;for(let q of Array.from(this.boundElement.children)){if(q===this.listTop||q===this.listBottom)continue;let _=q[K2];if(_==null)q.remove();else{let N=x.items.indexOf(_);if(N<c||N>r)q.remove(),this.itemToElement.delete(_),p++}}if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(n)+"px",this.listBottom.style.height=String(C)+"px";let j=[],{idPath:V}=this.options;for(let q=c;q<=r;q++){let _=x.items[q];if(_===void 0)continue;let N=this.itemToElement.get(W(_));if(N==null){if(B++,N=F2(this.template),typeof _==="object")this.itemToElement.set(W(_),N),N[K2]=W(_);if(this.listBottom!=null)this.boundElement.insertBefore(N,this.listBottom);else this.boundElement.append(N);if(V!=null){let m=_[V],$=`${s}[${V}=${m}]`;W3(N,$)}else{let m=`${s}[${q}]`;W3(N,m)}}j.push(N)}let P=null;for(let q of j){if(q.previousElementSibling!==P)if(z++,P?.nextElementSibling!=null)this.boundElement.insertBefore(q,P.nextElementSibling);else if(this.listBottom!=null)this.boundElement.insertBefore(q,this.listBottom);else this.boundElement.append(q);P=q}if(x.interpolation!=null)this._updateInterpolatedBuffers(x);if(p0.perf)console.log(s,"updated",{removed:p,created:B,moved:z})}_updateInterpolatedBuffers(l){let{t:i,position:o,scrollTop:y,viewportHeight:s,totalScrollHeight:x,rowHeight:h}=l.interpolation,c=0;for(let g of Array.from(this.boundElement.children)){if(g===this.listTop||g===this.listBottom)continue;c+=g.offsetHeight||h}let r=y,n=y+s-c,C=Math.max(0,i*n+(1-i)*r-o%1*h);if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(C)+"px",this.listBottom.style.height=String(Math.max(0,x-C-c))+"px"}}var v0=(l,i,o)=>{let y=l[k0];if(i&&y===void 0)y=new nl(l,i,o),l[k0]=y;return y},u4=(l)=>{let i;while(!(i=l[K2])&&l&&l.parentElement)l=l.parentElement;return i?{element:l,item:i}:void 0},U1=(l)=>{let i=u4(l);return i?i.item:void 0},e9=(l)=>{let i=u4(l);if(!i)return console.error("deleteListItem failed, element is not part of a list instance",l),!1;let o=v0(i.element.parentElement);if(!o.options.idPath)return console.error("deleteListItem failed, list binding has no idPath",l.parentElement,o),!1;let y=o.array.indexOf(i.item);if(y>-1)return o.array.splice(y,1),!0;return!1},L9={start:"start",middle:"center",end:"end",nearest:"nearest"},M9=(l,i,o={})=>{let y=v0(l);if(y==null)return console.error("scrollListItemIntoView failed, element has no list binding",l),!1;let{position:s="middle"}=o,x=y.filteredArray(),h=W(i)??i,c=x.indexOf(h);if(c===-1)return console.error("scrollListItemIntoView failed, item not found in list",i),!1;let{virtual:r}=y.options;if(r!=null&&l instanceof HTMLElement){let n=r.width!=null?Math.max(1,Math.floor(l.offsetWidth/r.width)):r.visibleColumns??1,C=Math.floor(c/n),g=r.minHeight??r.height,p=Math.ceil(x.length/n),z=r.scrollContainer==="window",B=z?window.innerHeight:l.offsetHeight,j;if(r.minHeight!=null){let V=Math.ceil(B/g)+(r.rowChunkSize||1),P=p*g,q=Math.max(0,P-B),_=Math.max(1,p-V+1),N=C/_;switch(s){case"start":j=N*q;break;case"end":j=Math.max(0,(C-V+1)/_*q);break;case"nearest":{let m=z?Math.max(0,-l.getBoundingClientRect().top):l.scrollTop,$=q>0?m/q:0,E=Math.floor($*_);if(C<E)j=N*q;else if(C>=E+V)j=Math.max(0,(C-V+1)/_*q);else return!0;break}default:{let m=C-Math.floor(V/2);j=Math.max(0,m)/_*q}}}else{let V=C*r.height;switch(s){case"start":j=V;break;case"end":j=V-B+r.height;break;case"nearest":{let P=z?Math.max(0,-l.getBoundingClientRect().top):l.scrollTop;if(V<P)j=V;else if(V+r.height>P+B)j=V-B+r.height;else return!0;break}default:j=V-(B-r.height)/2}}if(j=Math.max(0,j),z){let V=l.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:V+j,behavior:"smooth"})}else l.scrollTo({top:j,behavior:"smooth"})}else{let n=y.itemToElement.get(h);if(n==null)return console.error("scrollListItemIntoView failed, no DOM element found for item",i),!1;n.scrollIntoView({block:L9[s]??"center",behavior:"smooth"})}return!0},{document:W2,MutationObserver:Q3}=globalThis,e4=(l,i)=>{let o=m1.get(l);if(o==null)return;for(let y of o){let{binding:s,options:x}=y,{path:h}=y,{toDOM:c}=s;if(c!=null){if(h.startsWith("^")){let r=U1(l);if(r!=null&&r[B1]!=null)h=y.path=`${r[B1]}${h.substring(1)}`;else{if(l instanceof HTMLElement)console.warn(`Unresolved relative binding "${h}" —`,l,"is not part of a list. If this is a list template, wrap it in a <template>.");continue}}if(i==null||h.startsWith(i))c(l,$4()[h],x)}}};if(Q3!=null)new Q3((l)=>{l.forEach((i)=>{Array.from(i.addedNodes).forEach((o)=>{if(o instanceof Element)Array.from(o.querySelectorAll(r2)).forEach((y)=>e4(y))})})}).observe(W2.body,{subtree:!0,childList:!0});W1(()=>!0,(l)=>{let i=Array.from(W2.querySelectorAll(r2));for(let o of i)e4(o,l)});var G3=(l)=>{let i=l.target?.closest(r2);while(i!=null){let o=m1.get(i);for(let y of o){let{binding:s,path:x}=y,{fromDOM:h}=s;if(h!=null){let c;try{c=h(i,y.options)}catch(r){throw console.error("Cannot get value from",i,"via",y),Error("Cannot obtain value fromDOM")}if(c!=null){let r=$4(),n=r[x];if(n==null)r[x]=c;else{let C=n[B1]!=null?n[M1]:n,g=c[B1]!=null?c[M1]:c;if(C!==g)r[x]=g}}}}i=i.parentElement.closest(r2)}};if(globalThis.document!=null)W2.body.addEventListener("change",G3,!0),W2.body.addEventListener("input",G3,!0);function Z1(l,i,o,y){if(l instanceof DocumentFragment)throw Error("bind cannot bind to a DocumentFragment");let s;if(typeof i==="object"&&i[B1]===void 0&&y===void 0){let{value:c}=i;s=typeof c==="string"?c:c[B1],y=i,delete y.value}else s=typeof i==="string"?i:i[B1];if(s==null)throw Error("bind requires a path or object with xin Proxy");let{toDOM:x}=o;l.classList?.add(H3);let h=m1.get(l);if(h==null)h=[],m1.set(l,h);if(h.push({path:s,binding:o,options:y}),x!=null&&!s.startsWith("^"))n1(s);if(y?.filter&&y?.needle)Z1(l,y.needle,{toDOM(c,r){console.log({needle:r}),c[k0]?.filter(r)}});return l}var Z3=new Set,m9=(l)=>{let i=l?.target?.closest(z3),o=!1,y=new Proxy(l,{get(x,h){if(h==="stopPropagation")return()=>{l.stopPropagation(),o=!0};else{let c=x[h];return typeof c==="function"?c.bind(x):c}}}),s=new Set;while(!o&&i!=null){let x=b2.get(i)[l.type]||s;for(let h of x){if(typeof h==="function")h(y);else{let c=$4()[h];if(typeof c==="function")c(y);else throw Error(`no event handler found at path ${h}`)}if(o)continue}i=i.parentElement!=null?i.parentElement.closest(z3):null}};function d2(l,i,o){let y=b2.get(l);if(l.classList.add(Y3),y==null)y={},b2.set(l,y);if(!y[i])y[i]=new Set;if(y[i].add(o),!Z3.has(i))Z3.add(i),W2.body.addEventListener(i,m9,!0);return()=>{y[i].delete(o)}}j9(Z1,d2);function Cl(l,i){if(!l.internals)return;let o={},y="";if(l.hasAttribute("required")&&i==="")o.valueMissing=!0,y="Please fill out this field.";let s=l.getAttribute("minlength");if(s&&i.length<parseInt(s,10))o.tooShort=!0,y=`Please use at least ${s} characters.`;let x=l.getAttribute("maxlength");if(x&&i.length>parseInt(x,10))o.tooLong=!0,y=`Please use no more than ${x} characters.`;let h=l.getAttribute("pattern");if(h&&i!=="")try{if(!new RegExp(`^(?:${h})$`).test(i))o.patternMismatch=!0,y="Please match the requested format."}catch{}if(Object.keys(o).length>0)l.internals.setValidity(o,y,l);else l.internals.setValidity({})}var E9=0;function q4(){return`custom-elt${(E9++).toString(36)}`}var R3=0,_4=null;function l6(){if(_4===null)_4=new MutationObserver((l)=>{let i=new Set;for(let o of l)if(o.type==="attributes"&&o.target instanceof a){let y=o.target,s=E3(o.attributeName);if(y._legacyTrackedAttrs?.has(s))i.add(y)}for(let o of i)o.queueRender(!1)});return _4}var N2={};function i6(l,i){let o=N2[l],y=C2(i).replace(/:host\(([^)]+)\)/g,`${l}$1`).replace(/:host\b/g,l);N2[l]=o?o+`
13
+ `+y:y}function o6(l){if(N2[l])document.head.append(w.style({id:l+"-component"},N2[l]));delete N2[l]}class a extends HTMLElement{static elements=w;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(l){if(this.internals)if(l)this.internals.setValidity({customError:!0},l);else this.internals.setValidity({})}setValidity(l,i,o){this.internals?.setValidity(l,i,o)}setFormValue(l,i){this.internals?.setFormValue(l,i)}static get observedAttributes(){let l=this.initAttributes;if(l)return["hidden",...Object.keys(l).map(a1)];return["hidden"]}instanceId;styleNode;static styleSpec;static styleNode;content=w.slot();isSlotted;static _tagName=null;static get tagName(){return this._tagName}_legacyTrackedAttrs;_attrValues;_valueChanged=!1;static StyleNode(l){return console.warn("StyleNode is deprecated, use static shadowStyleSpec instead"),w.style(C2(l))}static elementCreator(l={}){let i=this;if(!Object.prototype.hasOwnProperty.call(i,"_elementCreator")){if(l.tag!==void 0)y1("elementCreator-tag","Passing tag to elementCreator() is deprecated. Use static preferredTagName instead.");if(l.styleSpec!==void 0)y1("elementCreator-styleSpec","Passing styleSpec to elementCreator() is deprecated. Use static lightStyleSpec instead.");if(l.extends!==void 0)y1("elementCreator-extends","Passing extends to elementCreator() is deprecated. Use static extends instead.");let o=l.tag??i.preferredTagName;if(o==null)if(typeof i.name==="string"&&i.name!==""){if(o=a1(i.name),o.startsWith("-"))o=o.slice(1)}else o=q4();if(customElements.get(o)!=null)console.warn(`${o} is already defined`);if(o.match(/\w+(-\w+)+/)==null)console.warn(`${o} is not a legal tag for a custom-element`),o=q4();while(customElements.get(o)!==void 0)o=q4();i._tagName=o;let y=l.styleSpec??i.lightStyleSpec;if(y!==void 0)i6(o,y);let s=l.extends??i.extends,x=s?{extends:s}:void 0;window.customElements.define(o,this,x),i._elementCreator=w[o]}return i._elementCreator}initAttributes(...l){if(y1("initAttributes","initAttributes() is deprecated. Use static initAttributes = { ... } instead."),!this._legacyTrackedAttrs)this._legacyTrackedAttrs=new Set;for(let y of l)this._legacyTrackedAttrs.add(y);l6().observe(this,{attributes:!0});let i={},o={};l.forEach((y)=>{i[y]=L1(this[y]);let s=a1(y);Object.defineProperty(this,y,{enumerable:!1,get(){if(typeof i[y]==="boolean")return this.hasAttribute(s);else if(this.hasAttribute(s))return typeof i[y]==="number"?parseFloat(this.getAttribute(s)):this.getAttribute(s);else if(o[y]!==void 0)return o[y];else return i[y]},set(x){if(typeof i[y]==="boolean"){if(x!==this[y]){if(x)this.setAttribute(s,"");else this.removeAttribute(s);this.queueRender()}}else if(typeof i[y]==="number"){if(x!==parseFloat(this[y]))this.setAttribute(s,x),this.queueRender()}else if(typeof x==="object"||`${x}`!==`${this[y]}`){if(x===null||x===void 0||typeof x==="object")this.removeAttribute(s);else this.setAttribute(s,x);this.queueRender(),o[y]=x}}})})}initValue(){let l=Object.getOwnPropertyDescriptor(this,"value");if(l===void 0||l.get!==void 0||l.set!==void 0)return;let i=this.hasAttribute("value")?this.getAttribute("value"):L1(this.value);delete this.value,Object.defineProperty(this,"value",{enumerable:!1,get(){return i},set(o){if(i!==o)i=o,this._valueChanged=!0,this.queueRender(!0)}})}_parts;get parts(){let l=this.shadowRoot!=null?this.shadowRoot:this;if(this._parts==null)this._parts=new Proxy({},{get(i,o){if(i[o]===void 0){let y=l.querySelector(`[part="${o}"]`);if(y==null)y=l.querySelector(o);if(y==null)throw Error(`elementRef "${o}" does not exist!`);y.removeAttribute("data-ref"),i[o]=y}return i[o]}});return this._parts}attributeChangedCallback(l,i,o){let y=E3(l);if(!this._legacyTrackedAttrs?.has(y))this.queueRender(!1)}constructor(){super();if(R3+=1,this.constructor.formAssociated&&typeof this.attachInternals==="function"&&!this.internals)this.internals=this.attachInternals();let l=this.constructor.initAttributes;if(l)this._setupAttributeAccessors(l);this.instanceId=`${this.tagName.toLocaleLowerCase()}-${R3}`,this._value=L1(this.defaultValue)}_setupAttributeAccessors(l){if(!this._attrValues)this._attrValues=new Map;for(let i of Object.keys(l)){let o=a1(i),y=l[i];if(i==="value"){console.warn(`${this.tagName}: 'value' cannot be an attribute. Use the Component value property instead.`);continue}if(typeof y==="object"&&y!==null){console.warn(`${this.tagName}: initAttributes.${i} is an object. Use a regular property instead.`);continue}let s=this,x=!1;while(s){let h=Object.getOwnPropertyDescriptor(s,i);if(h){if(!h.configurable||h.get||h.set){x=!0;break}break}s=Object.getPrototypeOf(s)}if(x)continue;Object.defineProperty(this,i,{enumerable:!1,get:()=>{if(typeof y==="boolean")return this.hasAttribute(o);else if(this.hasAttribute(o))return typeof y==="number"?parseFloat(this.getAttribute(o)):this.getAttribute(o);else if(this._attrValues.has(i))return this._attrValues.get(i);else return y},set:(h)=>{if(typeof y==="boolean"){if(h!==this[i]){if(h)this.setAttribute(o,"");else this.removeAttribute(o);this.queueRender()}}else if(typeof y==="number"){if(h!==parseFloat(this[i]))this.setAttribute(o,h),this.queueRender()}else if(typeof h==="object"||`${h}`!==`${this[i]}`){if(h===null||h===void 0||typeof h==="object")this.removeAttribute(o);else this.setAttribute(o,h);this.queueRender(),this._attrValues.set(i,h)}}})}}connectedCallback(){if(o6(this.constructor.tagName),this.hydrate(),this.role!=null)this.setAttribute("role",this.role);if(this.constructor.formAssociated&&!this.hasAttribute("tabindex"))this.setAttribute("tabindex","0");if(this.onResize!==void 0){if(Q4.observe(this),this._onResize==null)this._onResize=this.onResize.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(){Q4.unobserve(this)}formResetCallback(){if(this.value!==void 0)this.value=this.defaultValue??""}formDisabledCallback(l){if(l)this.setAttribute("disabled","");else this.removeAttribute("disabled")}formStateRestoreCallback(l){if(this.value!==void 0&&typeof l==="string")this.value=l}_changeQueued=!1;_renderQueued=!1;queueRender(l=!1){if(!this._hydrated)return;if(!this._changeQueued)this._changeQueued=l;if(!this._renderQueued)this._renderQueued=!0,requestAnimationFrame(()=>{if(this._changeQueued){if(M3(this,"change"),this.internals&&this.value!==void 0)this.internals.setFormValue(this.value)}this._changeQueued=!1,this._renderQueued=!1,this.render()})}_hydrated=!1;hydrate(){if(!this._hydrated){this.initValue();let l=typeof this.content!=="function",i=typeof this.content==="function"?this.content(w):this.content;if(Array.isArray(i)){let x={};i=i.filter((h)=>{if(h instanceof Node||typeof h==="string"||typeof h==="number"||L(h))return!0;return Object.assign(x,h),!1});for(let h of Object.keys(x))I4(this,h,x[h])}let o=this.constructor,y=o.shadowStyleSpec??o.styleSpec;if(o.styleSpec&&!o.shadowStyleSpec)y1("static-styleSpec","static styleSpec is deprecated. Use static shadowStyleSpec instead.");let{styleNode:s}=o;if(y)s=o.styleNode=w.style(C2(y)),delete o.styleNode;if(this.styleNode)console.warn(this,"styleNode is deprecated, use static shadowStyleSpec instead"),s=this.styleNode;if(s){let x=this.attachShadow({mode:"open"});x.appendChild(s.cloneNode(!0)),U3(x,i,l)}else if(i!==null){let x=Array.from(this.childNodes);U3(this,i,l),this.isSlotted=this.querySelector("slot,tosi-slot,xin-slot")!==void 0;let h=Array.from(this.querySelectorAll("slot"));if(h.length>0)h.forEach(z0.replaceSlot);if(x.length>0){let c={"":this};Array.from(this.querySelectorAll("tosi-slot,xin-slot")).forEach((r)=>{c[r.name]=r}),x.forEach((r)=>{let n=c[""],C=r instanceof Element?c[r.slot]:n;(C!==void 0?C:n).append(r)})}}this._hydrated=!0}}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 l=typeof this.value==="string"?this.value:String(this.value);Cl(this,l)}}class z0 extends a{static preferredTagName="tosi-slot";static initAttributes={name:""};content=null;static replaceSlot(l){let i=document.createElement("tosi-slot");if(l.name!=="")i.setAttribute("name",l.name);l.replaceWith(i)}}var y6=z0.elementCreator();class dl extends a{static preferredTagName="xin-slot";static initAttributes={name:""};content=null;constructor(){super();y1("xin-slot","<xin-slot> is deprecated. Use <tosi-slot> instead.")}static replaceSlot=z0.replaceSlot}var s6=dl.elementCreator(),x6=(l=()=>!0)=>{let i=localStorage.getItem("xin-state");if(i!=null){let y=JSON.parse(i);for(let s of Object.keys(y).filter(l))if(H[s]!==void 0)Object.assign(H[s],y[s]);else H[s]=y[s]}let o=Q2(()=>{let y={},s=W(H);for(let x of Object.keys(s).filter(l))y[x]=s[x];localStorage.setItem("xin-state",JSON.stringify(y)),console.log("xin state saved to localStorage")},500);T4(l,o)},h6="tosijs-share",c6="tosijs-share",X2="shared",r6=1,G4=new Set,Z4=new Set,V4=new Map,e1=null,R4="",g0=null,n6=null;function J3(){if(g0!=null)return Promise.resolve(g0);return new Promise((l,i)=>{let o=indexedDB.open(c6,r6);o.onupgradeneeded=()=>{o.result.createObjectStore(X2)},o.onsuccess=()=>{g0=o.result,l(g0)},o.onerror=()=>i(o.error)})}var C6={async get(l){let i=await J3();return new Promise((o,y)=>{let s=i.transaction(X2,"readonly").objectStore(X2).get(l);s.onsuccess=()=>o(s.result),s.onerror=()=>y(s.error)})},async set(l,i){let o=await J3();return new Promise((y,s)=>{let x=o.transaction(X2,"readwrite");x.objectStore(X2).put(i,l),x.oncomplete=()=>y(),x.onerror=()=>s(x.error)})}};function gl(){return n6??C6}function d6(l){return l!=null&&l.type==="tosijs-share"&&typeof l.path==="string"}function kl(l){for(let i of G4)if(l===i||l.startsWith(i+"."))return i;return}function g6(l){for(let i of Z4)if(l===i||l.startsWith(i+"."))return!0;return!1}function k6(l,i){Z4.add(l),a0(s1,l,i),n1(l),H4().then(()=>{Z4.delete(l)})}function p6(){if(e1!=null)return e1;return R4=crypto.randomUUID(),e1=new BroadcastChannel(h6),e1.onmessage=(l)=>{let i=l.data;if(!d6(i))return;if(i.origin===R4)return;if(kl(i.path)===void 0)return;k6(i.path,i.value)},e1}function w6(l,i){if(e1==null)return;let o={type:"tosijs-share",path:l,value:i,origin:R4};e1.postMessage(o)}function t6(l){if(!V4.has(l))V4.set(l,Q2(()=>{let i=u(s1,l);gl().set(l,i)},500));V4.get(l)()}async function a6(...l){if(typeof BroadcastChannel>"u")return{restored:[]};p6();let i=[],o=gl();for(let y of l){let s=typeof y==="string"?y:L(y);if(s===void 0)throw Error("share() requires boxed proxies or string paths. Got a non-proxy value.");if(G4.has(s))continue;G4.add(s);let x=await o.get(s);if(x!==void 0)a0(s1,s,x),n1(s),i.push(y);else{let h=u(s1,s);await o.set(s,h)}W1((h)=>h===s||h.startsWith(s+"."),(h)=>{if(g6(h))return;let c=kl(h);if(c===void 0)return;let r=u(s1,h);w6(h,r),t6(c)})}return{restored:i}}var J4=new Set;function $3(l,i){for(let o of l)if(i===o||i.startsWith(o+"."))return o;return}function B6(l){for(let i of J4)if(l===i||l.startsWith(i+"."))return!0;return!1}function v6(l,i){J4.add(l),a0(s1,l,i),n1(l),H4().then(()=>{J4.delete(l)})}async function z6(l,i,...o){let y=new Set,s=[],x=[],h=i.throttleInterval??100;await l.connect();let c=n2(()=>{if(s.length===0)return;let r=s.splice(0);l.send(r)},h);l.onReceive((r)=>{for(let n of r){if($3(y,n.path)===void 0)continue;v6(n.path,n.value)}});for(let r of o){let n=typeof r==="string"?r:L(r);if(n===void 0)throw Error("sync() requires boxed proxies or string paths. Got a non-proxy value.");y.add(n);let C=W1((g)=>g===n||g.startsWith(n+"."),(g)=>{if(B6(g))return;if($3(y,g)===void 0)return;let p=u(s1,g);s.push({path:g,value:p}),c()});x.push(C)}return{disconnect(){for(let r of x)Q1(r);x.length=0,y.clear(),s.length=0,l.disconnect()}}}var pl="1.5.5";function S(l){return Object.assign(o1,l),o1}function L4(l){return y1("boxedProxy","boxedProxy is deprecated, please use tosi() instead"),S(l)}var f6=new FinalizationRegistry((l)=>{l()});function j6(l,i){let o=S3();o1[o]=l;let y=o1[o],s=()=>{delete H[o]};if(i)f6.register(i,s);return[y,s]}function wl(l,i=!1){if(i)return y1("xinProxy-boxed","xinProxy(..., true) is deprecated; use tosi(...) instead"),L4(l);return Object.keys(l).forEach((o)=>{H[o]=l[o]}),H}var A6={};async function M4(l,i){let o=await i(l,{Color:f,Component:a,elements:w,svgElements:B0,mathML:cl,varDefault:k,vars:d,xin:H,boxed:o1,xinProxy:wl,boxedProxy:L4,tosi:S,makeComponent:M4,bind:Z1,on:d2,version:pl}),{type:y}=o;y.preferredTagName=l;let s=o.lightStyleSpec??o.styleSpec;if(s)y.lightStyleSpec=s;let x={type:y,creator:y.elementCreator()};return A6[l]=x,x}var f0={":host":{display:"none"}},P4={},q6=(l)=>import(l);class j0 extends a{static preferredTagName="tosi-blueprint";static lightStyleSpec=f0;static initAttributes={tag:"anon-elt",src:"",property:"default"};loaded;blueprintLoaded=(l)=>{};async packaged(){let{tag:l,src:i,property:o}=this,y=`${l}.${o}:${i}`;if(!this.loaded){if(P4[y]===void 0)P4[y]=q6(i).then((s)=>{let x=s[o];return M4(l,x)});else console.log(`using cached ${l} with signature ${y}`);this.loaded=await P4[y],this.blueprintLoaded(this.loaded)}return this.loaded}}var _6=j0.elementCreator();class m4 extends a{static preferredTagName="tosi-loader";static lightStyleSpec=f0;allLoaded=()=>{};async load(){let l=Array.from(this.querySelectorAll("tosi-blueprint, xin-blueprint")).filter((i)=>i.src).map((i)=>i.packaged());await Promise.all(l),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var V6=m4.elementCreator();class tl extends j0{static preferredTagName="xin-blueprint";static lightStyleSpec=f0;constructor(){super();y1("xin-blueprint","<xin-blueprint> is deprecated. Use <tosi-blueprint> instead.")}}var P6=tl.elementCreator();class al extends a{static preferredTagName="xin-loader";static lightStyleSpec=f0;allLoaded=()=>{};constructor(){super();y1("xin-loader","<xin-loader> is deprecated. Use <tosi-loader> instead.")}async load(){let l=Array.from(this.querySelectorAll("xin-blueprint")).filter((i)=>i.src).map((i)=>i.packaged());await Promise.all(l),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var O6=al.elementCreator();var E4={};class g2 extends a{static preferredTagName="tosi-ab";static set conditions(l){Object.assign(E4,l);for(let i of[...g2.instances])i.queueRender()}static initAttributes={condition:"",not:!1};static instances=new Set;connectedCallback(){super.connectedCallback(),g2.instances.add(this)}disconnectedCallback(){super.disconnectedCallback(),g2.instances.delete(this)}render(){if(this.condition!==""&&(this.not?E4[this.condition]!==!0:E4[this.condition]===!0))this.toggleAttribute("hidden",!1);else this.toggleAttribute("hidden",!0)}}var U6=g2.elementCreator();var A0={};function x1(l,i){if(A0[l]===void 0){if(i!==void 0){let y=globalThis[i];A0[l]=Promise.resolve({[i]:y})}let o=w.script({src:l});document.head.append(o),A0[l]=new Promise((y)=>{o.onload=()=>y(globalThis)})}return A0[l]}var l5={};function q0(l){if(l5[l]===void 0){let i=w.link({rel:"stylesheet",type:"text/css",href:l});document.head.append(i),l5[l]=new Promise((o)=>{i.onload=o})}return l5[l]}var Z2={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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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>',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>',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>',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>',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>',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>',arrowUpCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="16 12 12 8 8 12"></polyline><line x1="12" y1="16" x2="12" y2="8"></line></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>',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>',arrowDown:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"></line><polyline points="19 12 12 19 5 12"></polyline></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>',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>',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>',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>',chevronsDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',circle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle></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>',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>',cornerLeftUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="14 9 9 4 4 9"></polyline><path d="M20 20h-7a4 4 0 0 1-4-4V4"></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>',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>',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>',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>',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>',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>',arrowUpLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="17" y1="17" x2="7" y2="7"></line><polyline points="7 17 7 7 17 7"></polyline></svg>',chevronDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',toggleLeft:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="8" cy="12" r="3"></circle></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>',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>',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>',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>',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>',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>',chevronUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="18 15 12 9 6 15"></polyline></svg>',arrowDownLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="17" y1="7" x2="7" y2="17"></line><polyline points="17 17 7 17 7 7"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',chevronRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 18 15 12 9 6"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',arrowLeftCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 8 8 12 12 16"></polyline><line x1="16" y1="12" x2="8" y2="12"></line></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>',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>',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>',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>',settings:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.6.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.6.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.6.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.6.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></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>',thumbsDown:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',check:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></svg>',rotateCcw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path></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>',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>',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>',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>',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>',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>',cornerUpLeft:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 14 4 9 9 4"></polyline><path d="M20 20v-7a4 4 0 0 0-4-4H4"></path></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>',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.01" y2="8"></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>',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>',refreshCcw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="1 4 1 10 7 10"></polyline><polyline points="23 20 23 14 17 14"></polyline><path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"></path></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',navigation:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="3 11 22 2 13 21 11 13 3 11"></polygon></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',square:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect></svg>',play:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21 5 3"></polygon></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>',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>',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>',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>',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>',facebook:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M464 0h-416c-26 0-48 22-48 48v416c0 26 22 48 48 48h208v-224h-64v-64h64v-32c0-53 43-96 96-96h64v64h-64c-18 0-32 14-32 32v32h96l-16 64h-80v224h144c26 0 48-22 48-48v-416c0-26-22-48-48-48z"></path></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',cornerLeftDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="14 15 9 20 4 15"></polyline><path d="M20 4h-7a4 4 0 0 0-4 4v12"></path></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>',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>',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>',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>',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>',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>',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>',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>',chevronsUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="17 11 12 6 7 11"></polyline><polyline points="17 18 12 13 7 18"></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>',twitch:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path></svg>',youtube:'<svg class="filled" version="1" viewBox="0 0 512 512"><g></g><path d="M507 154c0 0-5-35-20-51-20-20-41-21-51-22-72-5-179-5-179-5h-0c0 0-108 0-179 5-10 1-32 1-51 22-15 16-20 51-20 51s-5 41-5 83v39c0 41 5 83 5 83s5 35 20 51c20 20 45 20 57 22 41 4 174 5 174 5s108-0 179-5c10-1 32-1 51-22 15-16 20-51 20-51s5-41 5-83v-39c-0-41-5-83-5-83zM203 322v-144l138 72-138 72z"></path></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>',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>',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>',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>',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>',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>',skipBack:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="19 20 9 12 19 4 19 20"></polygon><line x1="5" y1="19" x2="5" y2="5"></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',arrowUp:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="19" x2="12" y2="5"></line><polyline points="5 12 12 5 19 12"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',chevronsLeft:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="11 17 6 12 11 7"></polyline><polyline points="18 17 13 12 18 7"></polyline></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>',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>',arrowLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></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>',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>',arrowDownRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="7" y1="7" x2="17" y2="17"></line><polyline points="17 7 17 17 7 17"></polyline></svg>',framer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></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>',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>',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>',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>',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>',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>',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>',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>',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>',arrowDownCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="8 12 12 16 16 12"></polyline><line x1="12" y1="8" x2="12" y2="16"></line></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',cornerDownLeft:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 10 4 15 9 20"></polyline><path d="M20 4v7a4 4 0 0 1-4 4H4"></path></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>',minus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line></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>',navigation2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 19 21 12 17 5 21 12 2"></polygon></svg>',chevronLeft:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6"></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>',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>',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>',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>',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>',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>',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>',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>',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> '};var X6=(l)=>{Object.assign(Z2,l)},i5=(l,i,o,y)=>{l.setAttribute("xmlns","http://www.w3.org/2000/svg");for(let h of[...l.querySelectorAll("path, polygon, line, circle, rect, ellipse, polyline")]){if(i!==void 0)h.setAttribute("fill",i);if(o!==void 0)h.setAttribute("stroke",o);if(y!==void 0)h.setAttribute("stroke-width",String(y))}let s=l.querySelectorAll("[style]");l.removeAttribute("style");for(let h of[...s]){let{fill:c,stroke:r,strokeWidth:n,strokeLinecap:C,strokeLinejoin:g}=h.style;if(c)h.setAttribute("fill",f.fromCss(c).html);if(r)h.setAttribute("stroke",f.fromCss(r).html);if(n)h.setAttribute("strokeWidth",n);if(C)h.setAttribute("strokeLinecap",C);if(g)h.setAttribute("strokeLinejoin",g);h.removeAttribute("style")}return`url(data:image/svg+xml;charset=UTF-8,${encodeURIComponent(l.outerHTML)})`},t=new Proxy(Z2,{get(l,i){let o=Z2[i];if(i&&!o)console.warn(`icon ${i} does not exist`);if(!o)o=Z2.square;return(...y)=>{let s=w.div();s.innerHTML=o;let x=s.querySelector("svg"),h=new Set(x.classList);h.add("tosi-icon");let c=B0.svg({class:Array.from(h).join(" "),viewBox:x.getAttribute("viewBox")},...y,...x.children);if(c.style.strokeWidth=k.tosiIconStrokeWidth("2px"),h.has("filled"))c.style.stroke="none",c.style.fill="currentColor";else if(h.has("stroked"))c.style.stroke=k.tosiIconStroke("currentColor"),c.style.fill="none";else c.style.stroke=k.tosiIconStroke("currentColor"),c.style.fill=k.tosiIconFill("currentColor");return c.style.height=k.tosiIconSize("16px"),c}}});class o5 extends a{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",stroke:"currentColor",strokeWidth:k.tosiIconStrokeWidth("2px"),strokeLinejoin:k.tosiIconStrokeLinejoin("round"),strokeLinecap:k.tosiIconStrokeLinecap("round"),fill:k.tosiIconFill("none")},":host, :host svg":{height:k.tosiIconSize("16px")}};static initAttributes={icon:"",size:0,fill:"",stroke:"",strokeWidth:1};render(){super.render(),this.textContent="";let l={};if(this.size)l.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)l.stroke=this.stroke,l.strokeWidth=this.strokeWidth;if(this.fill)l.fill=this.fill;this.append(t[this.icon]({style:l}))}}var N6=o5.elementCreator();var Bl=()=>{};class y5 extends a{static preferredTagName="tosi-3d";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:i5(t.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=w.canvas({part:"canvas"});constructor(){super();this.babylonReady=(async()=>{let{BABYLON:l}=await x1("https://cdn.babylonjs.com/babylon.js","BABYLON");return l})()}scene;engine;sceneCreated=Bl;update=Bl;_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(l,i,o)=>{let{BABYLON:y}=await x1("https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js","BABYLON");y.SceneLoader.Append(l,i,this.scene,o)};loadUI=async(l)=>{let{BABYLON:i}=await x1("https://cdn.babylonjs.com/gui/babylon.gui.min.js","BABYLON"),o=i.GUI.AdvancedDynamicTexture.CreateFullscreenUI("GUI",!0,this.scene),{snippetId:y,jsonUrl:s,data:x,size:h}=l;if(h)o.idealWidth=h,o.renderAtIdealSize=!0;let c;if(y)c=await o.parseFromSnippetAsync(y);else if(s)c=await o.parseFromURLAsync(s);else if(x)c=o.parseContent(x);else return null;let r=o.getChildren()[0],n=r.children.reduce((C,g)=>{return C[g.name]=g,C},{});return{advancedTexture:o,gui:c,root:r,widgets:n}};connectedCallback(){super.connectedCallback();let{canvas:l}=this.parts;this.babylonReady.then(async(i)=>{if(this.BABYLON=i,this.engine=new i.Engine(l,!0),this.scene=new i.Scene(this.engine),this.sceneCreated)await this.sceneCreated(this,i);if(this.scene.activeCamera===void 0)new i.ArcRotateCamera("default-camera",-Math.PI/2,Math.PI/2.5,3,new i.Vector3(0,0,0)).attachControl(this.parts.canvas,!0);this.engine.runRenderLoop(this._update)})}}var K6=y5.elementCreator();class k2 extends a{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(k2.bodymovinAvailable===void 0)k2.bodymovinAvailable=x1("https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js","bodymovin")}doneLoading=()=>{this._loading=!1};load=({bodymovin:l})=>{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 i=this.shadowRoot;if(i!==null)i.querySelector("svg")?.remove()}this.animation=l.loadAnimation(this.config),this.animation.addEventListener("DOMLoaded",this.doneLoading)};render(){super.render(),k2.bodymovinAvailable.then(this.load).catch((l)=>{console.error(l)})}}var b6=k2.elementCreator();var{button:s5,slot:F6,div:_0}=w;class V0 extends a{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(l){let{scroller:i,back:o,forward:y}=this.parts;if(this.lastPage<=0)y.disabled=o.disabled=!0,l=0;else l=Math.max(0,Math.min(this.lastPage,l)),l=isNaN(l)?0:l;if(this._page!==l)this._page=isNaN(l)?0:l,this.animateScroll(this._page*i.offsetWidth),o.disabled=this.page<=0&&!this.loop,y.disabled=this.page>=this.lastPage&&!this.loop}get visibleItems(){return[...this.children].filter((l)=>getComputedStyle(l).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:d.carouselDotSize,_carouselProgressPadding:12,_carouselDotTransition:"0.125s ease-in-out",display:"flex",flexDirection:"column",position:"relative"},":host:focus":{outline:"none",boxShadow:"none"},":host svg":{height:d.carouselIconSize},":host button":{outline:"none",border:"none",boxShadow:"none",background:"transparent",color:d.carouselButtonColor,padding:0},":host::part(back), :host::part(forward)":{position:"absolute",top:0,bottom:0,width:d.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:d.carouselButtonHoverColor},":host button:active":{color:d.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:d.carouselButtonColor,borderRadius:d.carouselDotSize,height:d.carouselDotSize,width:d.carouselDotSize,transition:d.carouselDotTransition},":host .dot:not(.current):hover":{background:d.carouselButtonHoverColor,height:d.carouselDotSize150,width:d.carouselDotSize150,margin:d.carouselDotSize_25},":host .dot:not(.current):active":{background:d.carouselButtonActiveColor},":host .dot.current":{background:d.carouselDotCurrentColor},":host::part(progress)":{display:"flex",gap:d.carouselDotSpacing,justifyContent:"center",padding:d.carouselProgressPadding}};easing=(l)=>{return Math.sin(l*Math.PI*0.5)};indicateCurrent=()=>{let{scroller:l,progress:i}=this.parts,o=l.scrollLeft/l.offsetWidth;[...i.children].forEach((y,s)=>{y.classList.toggle("current",Math.floor(s/this.maxVisibleItems-o)===0)}),this.lastAutoAdvance=Date.now(),clearTimeout(this.snapTimer),this.snapTimer=setTimeout(this.snapPosition,this.snapDelay*1000)};snapPosition=()=>{let{scroller:l}=this.parts,i=Math.round(l.scrollLeft/l.offsetWidth);if(i!==this.page)this.page=i>this.page?Math.ceil(i):Math.floor(i);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=(l)=>{let{progress:i}=this.parts,o=[...i.children].indexOf(l.target);if(o>-1)this.page=Math.floor(o/this.maxVisibleItems)};snapTimer;animationFrame;animateScroll(l,i=-1,o=0){cancelAnimationFrame(this.animationFrame);let{scroller:y}=this.parts;if(i===-1){i=y.scrollLeft,o=Date.now(),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(l,i,o)});return}let s=(Date.now()-o)/1000;if(s>=this.snapDuration||Math.abs(y.scrollLeft-l)<2)y.scrollLeft=l,this.animationFrame=null;else y.scrollLeft=i+this.easing(s/this.snapDuration)*(l-i),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(l,i,o)})}content=()=>[_0({part:"pager"},s5({title:"previous slide",part:"back"},t.chevronLeft()),_0({title:"slides",role:"group",part:"scroller"},_0({part:"grid"},F6())),s5({title:"next slide",part:"forward"},t.chevronRight())),_0({title:"choose slide to display",role:"group",part:"progress"})];connectedCallback(){super.connectedCallback(),this.ariaRoleDescription="carousel",this.ariaOrientation="horizontal",this.ariaReadOnly="true";let{back:l,forward:i,scroller:o,progress:y}=this.parts;l.addEventListener("click",this.back),i.addEventListener("click",this.forward),o.addEventListener("scroll",this.indicateCurrent),y.addEventListener("click",this.handleDotClick),this.lastAutoAdvance=Date.now(),this.interval=setInterval(this.autoAdvance,100)}disconnectedCallback(){clearInterval(this.interval)}render(){super.render();let{dots:l,arrows:i,visibleItems:o,lastPage:y}=this,{progress:s,back:x,forward:h,grid:c}=this.parts;o.forEach((r)=>{r.role="group"}),c.style.gridTemplateColumns=`${100/this.maxVisibleItems/(1+this.lastPage)}% `.repeat(o.length).trim(),c.style.width=(1+this.lastPage)*100+"%",s.textContent="",s.append(...o.map((r,n)=>s5({title:`item ${n+1}`,class:"dot"}))),this.indicateCurrent(),s.style.display=l&&y>0?"":"none",x.hidden=h.hidden=!(i&&y>0)}}var W6=V0,vl=V0.elementCreator(),Q6=vl;var zl="https://cdnjs.cloudflare.com/ajax/libs/ace/1.23.2/",fl="ace/theme/tomorrow",G6=async()=>{let{ace:l}=await x1(`${zl}ace.min.js`);return l},Z6=async(l,i="html",o={},y=fl)=>{let s=await G6();s.config.set("basePath",zl);let x=s.edit(l,{mode:`ace/mode/${i}`,tabSize:2,useSoftTabs:!0,useWorker:!1,...o});return x.setTheme(y),{ace:s,editor:x}};class E1 extends a{static preferredTagName="tosi-code";source="";get value(){return this.editor===void 0?this.source:this.editor.getValue()}set value(l){if(this.editor===void 0)this.source=l;else this.editor.setValue(l),this.editor.clearSelection(),this.editor.session.getUndoManager().reset()}static initAttributes={mode:"javascript",theme:fl,disabled:!1};role="code editor";_ace;_editor;_editorPromise;options={};get ace(){return this._ace}get editor(){return this._editor}static shadowStyleSpec={":host":{display:"block",position:"relative",width:"100%",height:"100%"}};onResize(){if(this.editor!==void 0)this.editor.resize(!0)}connectedCallback(){if(super.connectedCallback(),this.source==="")this.value=this.textContent!==null?this.textContent.trim():"";if(this._editorPromise===void 0)this._editorPromise=Z6(this,this.mode,this.options,this.theme),this._editorPromise.then(({ace:l,editor:i})=>{this._ace=l,this._editor=i,i.setValue(this.source,1),i.clearSelection(),i.session.getUndoManager().reset()})}render(){if(super.render(),this._editorPromise!==void 0)this._editorPromise.then(({editor:l})=>l.setReadOnly(this.disabled))}}var p2=E1.elementCreator();var{input:x5}=w,jl=f.fromCss("#8888");class Al extends a{static preferredTagName="tosi-color";value=jl.rgba;color=jl;static shadowStyleSpec={":host":{_gap:8,_swatchSize:32,_cssWidth:72,_alphaWidth:72,display:"inline-flex",gap:d.gap,alignItems:"center"},':host input[type="color"]':{border:0,width:d.swatchSize,height:d.swatchSize,background:"transparent"},":host::part(alpha)":{width:d.alphaWidth},":host::part(css)":{width:d.cssWidth,fontFamily:"monospace"}};content=[x5({title:"base color",type:"color",part:"rgb"}),x5({type:"range",title:"opacity",part:"alpha",min:0,max:1,step:0.05}),x5({title:"css color spec",part:"css"})];valueChanged=!1;update=(l)=>{let{rgb:i,alpha:o,css:y}=this.parts;if(l.type==="input")this.color=f.fromCss(i.value),this.color.a=Number(o.value),y.value=this.color.html;else this.color=f.fromCss(y.value),i.value=this.color.html.substring(0,7),o.value=String(this.color.a);i.style.opacity=String(this.color.a),this.value=this.color.rgba,this.valueChanged=!0};connectedCallback(){super.connectedCallback();let{rgb:l,alpha:i,css:o}=this.parts;l.addEventListener("input",this.update),i.addEventListener("input",this.update),o.addEventListener("change",this.update)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{rgb:l,alpha:i,css:o}=this.parts;this.color=f.fromCss(this.value),l.value=this.color.html.substring(0,7),l.style.opacity=String(this.color.a),i.value=String(this.color.a),o.value=this.color.html}}var h5=Al.elementCreator();var R1=w.div({style:{content:" ",position:"fixed",top:0,left:0,right:0,bottom:0}}),P0={passive:!0},M=(l,i,o="move")=>{if(!l.type.startsWith("touch")){let{clientX:s,clientY:x}=l;R1.style.cursor=o,J1(R1),document.body.append(R1);let h=(c)=>{let r=c.clientX-s,n=c.clientY-x;if(i(r,n,c)===!0)R1.removeEventListener("mousemove",h),R1.removeEventListener("mouseup",h),R1.remove()};R1.addEventListener("mousemove",h,P0),R1.addEventListener("mouseup",h,P0)}else if(l instanceof TouchEvent){let s=l.changedTouches[0],x=s.identifier,h=s.clientX,c=s.clientY,r=l.target,n=0,C=0,g=(p)=>{let z=[...p.touches].find((B)=>B.identifier===x);if(z!==void 0)n=z.clientX-h,C=z.clientY-c;if(p.type==="touchmove")p.stopPropagation(),p.preventDefault();if(i(n,C,p)===!0||z===void 0)r.removeEventListener("touchmove",g),r.removeEventListener("touchend",g),r.removeEventListener("touchcancel",g)};r.addEventListener("touchmove",g),r.addEventListener("touchend",g,P0),r.addEventListener("touchcancel",g,P0)}},l2=(l="body *")=>[...document.querySelectorAll(l)].map((i)=>parseFloat(getComputedStyle(i).zIndex)).reduce((i,o)=>isNaN(i)||Number(i)<o?o:Number(i),0),J1=(l,i="body *")=>{l.style.zIndex=String(l2(i)+1)};var{slot:R6}=w;class X1 extends a{static preferredTagName="tosi-float";static floats=new Set;static initAttributes={drag:!1,remainOnResize:"remove",remainOnScroll:"remain"};content=R6();static shadowStyleSpec={":host":{position:"fixed"}};reposition=(l)=>{if(l instanceof MouseEvent&&l.button!==0)return;if(l.target?.closest(".no-drag"))return;if(this.drag){J1(this);let o=this.offsetLeft,y=this.offsetTop;M(l,(s,x,h)=>{if(this.style.left=`${o+s}px`,this.style.top=`${y+x}px`,this.style.right="auto",this.style.bottom="auto",h.type==="mouseup")return!0})}};connectedCallback(){super.connectedCallback(),X1.floats.add(this);let l={passive:!0};this.addEventListener("touchstart",this.reposition,l),this.addEventListener("mousedown",this.reposition,l),J1(this)}disconnectedCallback(){super.disconnectedCallback(),X1.floats.delete(this)}}var J6=X1,R2=X1.elementCreator(),$6=R2;window.addEventListener("resize",()=>{Array.from(X1.floats).forEach((l)=>{if(l.remainOnResize==="hide")l.hidden=!0;else if(l.remainOnResize==="remove")l.remove()})},{passive:!0});document.addEventListener("scroll",(l)=>{if(l.target instanceof HTMLElement&&l.target.closest(X1.tagName))return;Array.from(X1.floats).forEach((i)=>{if(i.remainOnScroll==="hide")i.hidden=!0;else if(i.remainOnScroll==="remove")i.remove()})},{passive:!0,capture:!0});var J2=(l)=>{let{content:i,target:o,position:y,remainOnScroll:s,remainOnResize:x,draggable:h}=l,c=Array.isArray(i)?R2(...i):R2(i);if(ql(c,o,y,s,x,h),l.class)c.setAttribute("class",l.class);return document.body.append(c),c},ql=(l,i,o,y,s,x=!1)=>{{let{position:B}=getComputedStyle(l);if(B!=="fixed")l.style.position="fixed";if(s)l.remainOnResize=s;if(y)l.remainOnScroll=y;J1(l)}l.drag=x;let{left:h,top:c,width:r,height:n}=i.getBoundingClientRect(),C=h+r*0.5,g=c+n*0.5,p=window.innerWidth,z=window.innerHeight;if(o==="side")o=(C<p*0.5?"e":"w")+(g<z*0.5?"s":"n");else if(o==="auto"||o===void 0)o=(g<z*0.5?"s":"n")+(C<p*0.5?"e":"w");if(l.style.top=l.style.left=l.style.right=l.style.bottom=l.style.transform="",o.length===2){let[B,j]=o;switch(B){case"n":l.style.bottom=(z-c).toFixed(2)+"px";break;case"e":l.style.left=(h+r).toFixed(2)+"px";break;case"s":l.style.top=(c+n).toFixed(2)+"px";break;case"w":l.style.right=(p-h).toFixed(2)+"px";break}switch(j){case"n":l.style.bottom=(z-c-n).toFixed(2)+"px";break;case"e":l.style.left=h.toFixed(2)+"px";break;case"s":l.style.top=c.toFixed(2)+"px";break;case"w":l.style.right=(p-h-r).toFixed(2)+"px";break}l.style.transform=""}else if(o==="n")l.style.bottom=(z-c).toFixed(2)+"px",l.style.left=C.toFixed(2)+"px",l.style.transform="translateX(-50%)";else if(o==="s")l.style.top=(c+n).toFixed(2)+"px",l.style.left=C.toFixed(2)+"px",l.style.transform="translateX(-50%)";else if(o==="e")l.style.left=(h+r).toFixed(2)+"px",l.style.top=g.toFixed(2)+"px",l.style.transform="translateY(-50%)";else if(o==="w")l.style.right=(p-h).toFixed(2)+"px",l.style.top=g.toFixed(2)+"px",l.style.transform="translateY(-50%)";l.style.setProperty("--max-height",`calc(100vh - ${l.style.top||l.style.bottom})`),l.style.setProperty("--max-width",`calc(100vw - ${l.style.left||l.style.right})`)};function O0(l,i=!0){return(o,y)=>{let s=l(o),x=l(y);for(let h in s)if(s[h]!==x[h])return(Array.isArray(i)?i[h]!==!1:i)?s[h]>x[h]?1:-1:s[h]>x[h]?-1:1;return 0}}var{button:H6,span:_l,input:Y6}=w,Vl=(l,i)=>{return!!l.find((o)=>{if(o===null||i==null)return!1;else if(Array.isArray(o))return Vl(o,i);else if(o.value===i||o===i)return!0})};class v1 extends a{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:d.tosiSelectGap,textAlign:"left",height:d.tosiSelectTouchSize,padding:d.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:d.tosiSelectFieldWidth,padding:d.tosiSelectValuePadding,height:d.tosiSelectTouchSize,lineHeight:d.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(l){if(typeof l==="string")this._options=v1.parseOptionsString(l);else this._options=l;this.queueRender()}static parseOptionsString(l){return l.split(",").map((i)=>{let o=i.trim();if(o==="")return null;let[y,s]=o.split("=").map((c)=>c.trim());if(!s)return{value:y,caption:y};let[x,h]=s.split(":").map((c)=>c.trim());return{value:y,caption:x||y,icon:h||void 0}})}value="";filter="";isExpanded=!1;formDisabledCallback(l){this.disabled=l}formResetCallback(){this.value=""}setValue=(l,i=!1)=>{if(this.value!==l)this.value=l,this.queueRender(!0);if(i)this.dispatchEvent(new Event("action"))};getValue=()=>this.value;get selectOptions(){return this.options}buildOptionMenuItem=(l)=>{if(l===null)return null;let{setValue:i,getValue:o}=this,y,s,x,h,c;if(typeof l==="string")s=x=l;else({icon:y,caption:s,value:x,tooltip:h,properties:c}=l);if(this.localized)s=K(s);let{options:r}=l;if(r)return{icon:y,caption:s,tooltip:h,properties:c,checked:()=>Vl(r,o()),menuItems:r.map(this.buildOptionMenuItem)};return{icon:y,caption:s,tooltip:h,properties:c,checked:()=>o()===x,action:typeof x==="function"?async()=>{let n=await x();if(n!==void 0)i(n,!0)}:()=>{if(typeof x==="string")i(x,!0)}}};poppedOptions=[];get optionsMenu(){let l=this.selectOptions.map(this.buildOptionMenuItem);if(this.filter==="")return l;let i=(o)=>{if(o===null)return!0;else if(o.menuItems){let y=c1(o.menuItems);return o.menuItems=y.filter(i),y.length>0}else return o.caption.toLocaleLowerCase().includes(this.filter)};return l.filter(i)}handleChange=(l)=>{let{value:i}=this.parts,o=i.value||"";if(this.value!==String(o))this.value=o,this.dispatchEvent(new Event("change"));this.filter="",l.stopPropagation(),l.preventDefault()};handleKey=(l)=>{if(l.key==="Enter")l.preventDefault()};filterMenu=n2(()=>{this.filter=this.parts.value.value.toLocaleLowerCase(),Y(0),this.popOptions()});popOptions=(l)=>{if(l&&l.type==="click")this.filter="";this.poppedOptions=this.optionsMenu,this.isExpanded=!0,this.updateAriaExpanded(),G({target:this,menuItems:this.poppedOptions,showChecked:!0,role:"listbox",onClose:()=>{this.isExpanded=!1,this.updateAriaExpanded()}})};updateAriaExpanded(){let{value:l}=this.parts;l.setAttribute("aria-expanded",String(this.isExpanded))}content=()=>[H6({type:"button",part:"button",onClick:this.popOptions},_l(),Y6({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}),t.chevronDown())];get allOptions(){let l=[];function i(o){for(let y of o)if(typeof y==="string")l.push({caption:y,value:y});else if(y?.value)l.push(y);else if(y?.options)i(y.options)}return i(this.selectOptions),l}findOption(){return this.allOptions.find((i)=>i.value===this.value)||{caption:this.value,value:this.value}}localeChanged=()=>{this.queueRender()};connectedCallback(){super.connectedCallback();let l=this.getAttribute("options");if(l&&this._options.length===0)this._options=v1.parseOptionsString(l);if(this.localized)U0.allInstances.add(this)}disconnectedCallback(){if(super.disconnectedCallback(),this.localized)U0.allInstances.delete(this)}render(){super.render();let{value:l,button:i}=this.parts;i.disabled=this.disabled;let o=l.previousElementSibling,y=this.findOption(),s=_l();if(l.value=this.localized?K(y.caption):y.caption,y.icon)if(y.icon instanceof HTMLElement)s=y.icon.cloneNode(!0);else s=t[y.icon]();o.replaceWith(s),l.setAttribute("placeholder",this.localized?K(this.placeholder):this.placeholder),l.style.pointerEvents=this.editable?"":"none",l.readOnly=!this.editable}}var I6=v1,h1=v1.elementCreator(),S6=e((...l)=>h1(...l),"xinSelect is deprecated, use tosiSelect instead (tag is now <tosi-select>)");var{span:Pl}=w,{i18n:Q}=S({i18n:{locale:window.navigator.language,locales:[window.navigator.language],languages:[window.navigator.language],emoji:[""],stringMap:{},localeOptions:[{icon:Pl(),caption:window.navigator.language,value:window.navigator.language}]}});P1.localeOptions={toDOM(l,i){if(l instanceof v1)l.options=i}};var D6=(l)=>{if(Q.locales.value.includes(l))Q.locale.value=l;else console.error(`language ${l} is not available`)},c5=()=>{let l=Array.from(z1.allInstances);for(let i of l)i.localeChanged()};Q.locale.observe(c5);var T6=O0((l)=>[l.caption.toLocaleLowerCase()]);function u6(l){let[i,,o,y,...s]=l.split(`
14
+ `).map((x)=>x.split("\t"));if(i&&o&&y&&s){if(Q.locales.value=i,Q.languages.value=o,Q.emoji.value=y,Q.stringMap.value=s.reduce((x,h)=>{return x[h[0].toLocaleLowerCase()]=h,x},{}),Q.localeOptions.value=i.map((x,h)=>({icon:Pl({title:i[h]},y[h]),caption:o[h],value:x})).sort(T6),!Q.locales.value.includes(Q.locale.value)){let x=Q.locale.value.substring(0,2);Q.locale.value=Q.locales.value.find((h)=>h.substring(0,2)===x)||Q.locales.value[0]}c5()}}function K(l){if(l.endsWith("…"))return K(l.substring(0,l.length-1))+"…";let i=Q.locales.value.indexOf(Q.locale.value);if(i>-1){let o=W(Q.stringMap),y=l.toLocaleLowerCase(),s=o[y],x=s&&s[i];if((!x||x==='"')&&y.includes("#")){let h=o[y.substring(0,y.indexOf("#"))];x=h&&h[i]}if(x)x=x.split("#",2)[0],l=l.toLocaleLowerCase()===l?x.toLocaleLowerCase():x;else l=l.split("#",2)[0]}else l=l.split("#",2)[0];return l}class X0 extends a{static preferredTagName="tosi-locale-picker";static initAttributes={hideCaption:!1};content=()=>{return h1({part:"select",showIcon:!0,title:K("Language"),bindValue:Q.locale,bindLocaleOptions:Q.localeOptions})};render(){super.render(),this.parts.select.toggleAttribute("hide-caption",this.hideCaption)}}var e6=X0,Ol=X0.elementCreator(),L6=Ol;class z1 extends a{static preferredTagName="tosi-localized";static lightStyleSpec={":host":{pointerEvents:"none"}};static allInstances=new Set;static initAttributes={refString:""};contents=()=>w.xinSlot();connectedCallback(){super.connectedCallback(),z1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),z1.allInstances.delete(this)}localeChanged(){if(!this.refString)this.refString=this.textContent||"";this.textContent=this.refString?K(this.refString):""}render(){super.render(),this.localeChanged()}}var U0=z1,f1=z1.elementCreator(),M6=f1;var Ul=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||""),m6=Ul?{meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",escape:"⎋"}:{meta:"Meta",ctrl:"Ctrl",alt:"Alt",shift:"Shift",escape:"Esc"},Xl=(l)=>{if(l.code)return l.code.replace(/^Key|^Digit/,"");return l.key},E6=(l)=>{let i=[];if(l.altKey)i.push("alt");if(l.ctrlKey)i.push("ctrl");if(l.metaKey)i.push("meta");if(l.shiftKey)i.push("shift");return i.push(Xl(l)),i.join("-")},l8=[[/\^|ctrl-?/i,"ctrlKey"],[/⌘|meta-?/i,"metaKey"],[/⌥|⎇|alt-?|option-?/i,"altKey"],[/⇧|shift-?/i,"shiftKey"]],N0=(l)=>{let i=l.trim(),o={ctrlKey:!1,metaKey:!1,altKey:!1,shiftKey:!1,key:""};for(let[y,s]of l8)if(y.test(i))o[s]=!0,i=i.replace(y,"");return i=i.replace(/^-+/,""),o.key=i.toLowerCase(),o},r5=(l,i)=>{let o=N0(i);return l.key.toLowerCase()===o.key&&l.metaKey===o.metaKey&&l.ctrlKey===o.ctrlKey&&l.altKey===o.altKey&&l.shiftKey===o.shiftKey},i8=(l)=>{let i=N0(l),o=[];if(i.altKey)o.push("alt");if(i.ctrlKey)o.push("ctrl");if(i.metaKey)o.push("meta");if(i.shiftKey)o.push("shift");return o.push(i.key),o.join("-")},K0=(l)=>{let i=N0(l);if(Ul){let y=[];if(i.ctrlKey)y.push("⌃");if(i.altKey)y.push("⌥");if(i.shiftKey)y.push("⇧");if(i.metaKey)y.push("⌘");return y.push(i.key.toUpperCase()),y.join("")}let o=[];if(i.ctrlKey)o.push("Ctrl");if(i.altKey)o.push("Alt");if(i.shiftKey)o.push("Shift");if(i.metaKey)o.push("Meta");return o.push(i.key.toUpperCase()),o.join("+")};var F0={};B4(F0,{stringToTypes:()=>t2,isTypeAllowed:()=>a2,init:()=>d5,draggedElement:()=>h8});var o8=()=>!!document.querySelector(".drag-source"),a2=(l,i)=>{if(!l)return!1;for(let o of l)if(o==="special/any")return!0;else if(o.indexOf("*")>-1){let[y,s]=o.split("/"),[x,h]=i.split("/");if((y==="*"||y===x)&&(s==="*"||s===h))return!0}else if(o===i)return!0},b0=(l)=>{for(let i of[...document.querySelectorAll(`.${l}`)])i.classList.remove(l)},bl=()=>{if(w2)w2.disconnect(),w2=null;n5=[],b0("drag-over"),b0("drag-source"),b0("drag-target")},t2=(l,i=";")=>{return(l||"").split(i).map((o)=>o.trim()).filter((o)=>o!=="")},n5=[],w2=null,C5=(l)=>{if(!l)l=[];n5=l;let i=[...document.querySelectorAll("[data-drop]")];for(let o of i){let y=t2(o.dataset.drop);if(l.find((s)=>a2(y,s)))o.classList.add("drag-target");else o.classList.remove("drag-target")}if(!w2)w2=new MutationObserver(()=>C5(n5)),w2.observe(document.body,{childList:!0,subtree:!0})};function y8(l){let i=l.target?.closest('[draggable="true"],a[href]');if(!i)return;i.classList.add("drag-source");let o=i.matches('[draggable="true"]')?t2(i.dataset.drag||"text/html"):t2(i.dataset.drag||"url");for(let y of o){let s=i.dataset.dragContent||(y==="text/html"?i.innerHTML:i.textContent);l.dataTransfer?.setData(y,s||"")}C5(l.dataTransfer?.types),l.stopPropagation()}function Nl(l){if(!o8())C5(l.dataTransfer?.types);let i=l.target.closest(".drag-target");if(i&&l.dataTransfer)i.classList.add("drag-over"),l.dataTransfer.dropEffect="copy";else l.preventDefault(),l.stopPropagation()}function s8(){b0("drag-over")}function x8(l){let i=l.target.closest(".drag-target");if(i){let o=(i.dataset?.drop||"").split(";");for(let y of o)if(a2(l.dataTransfer?.types,y))if(y==="text/html")i.innerHTML=l.dataTransfer?.getData(y)||"";else i.textContent=l.dataTransfer?.getData(y)||""}bl()}var h8=()=>document.querySelector(".drag-source"),Kl=!1,d5=()=>{if(Kl)return;document.body.addEventListener("dragstart",y8),document.body.addEventListener("dragenter",Nl),document.body.addEventListener("dragover",Nl),document.body.addEventListener("drop",x8),document.body.addEventListener("dragleave",s8),document.body.addEventListener("dragend",bl),window.addEventListener("dragover",(l)=>l.preventDefault()),window.addEventListener("drop",(l)=>l.preventDefault()),Kl=!0};var c1=(l)=>typeof l==="function"?l():l,{div:Fl,button:Y2,span:Z,a:c8,xinSlot:r8}=w,Gl=(l)=>{let i=[];for(let o of l)if(o===null){if(i.length>0&&i[i.length-1]!==null)i.push(o)}else i.push(o);while(i.length>0&&i[i.length-1]===null)i.pop();return i},H2=(l,i,o=!1)=>{let y=[];for(let s of l){if(s===null){y.push(s);continue}let{acceptsDrop:x}=s;if(!x){if(!o)y.push({...s,enabled:()=>!1});continue}if(!i.some((r)=>a2(x,r))){if(!o)y.push({...s,enabled:()=>!1});continue}let c=s;if(c.menuItems){let r=H2(c1(c.menuItems),i,!0);if(r.length>0||c.dropAction){let n=o?r:H2(c1(c.menuItems),i,!1);y.push({...c,menuItems:n})}else if(!o)y.push({...c,enabled:()=>!1})}else y.push(s)}return Gl(y)},g5=(l,i=!1)=>{let o=[];for(let y of l){if(y===null){o.push(y);continue}let{action:s,menuItems:x}=y;if(s||x)if(x){let h=g5(c1(x),!0);if(h.length>0){let c=i?h:g5(c1(x),!1);o.push({...y,menuItems:c})}else if(!i)o.push({...y,enabled:()=>!1})}else o.push(y);else if(!i)o.push({...y,enabled:()=>!1})}return Gl(o)},n8={overflow:"hidden auto",maxHeight:`calc(${d.maxHeight} - ${k.menuInset("8px")})`,borderRadius:d.spacing50,background:k.menuBg("#fafafa"),boxShadow:k.menuShadow(`${d.spacing13} ${d.spacing50} ${d.spacing} #0004`)},C8={boxShadow:"none",border:"none !important",display:"grid",alignItems:"center",justifyContent:"flex-start",textDecoration:"none",gridTemplateColumns:"0px 1fr 30px",width:"100%",gap:0,background:"transparent",padding:k.menuItemPadding("0 16px"),height:k.menuItemHeight("48px"),lineHeight:k.menuItemHeight("48px"),textAlign:"left"},d8={color:k.menuItemColor("#222")},g8={boxShadow:"none !important",background:k.menuItemHoverBg("#eee")},Wl={boxShadow:"none !important",background:k.menuItemActiveBg("#aaa"),color:k.menuItemActiveColor("#000")},k8={background:`${k.menuDropOverBg("#2196F3")} !important`,color:`${k.menuDropOverColor("#fff")} !important`},p8={color:`${k.menuDropOverColor("#fff")} !important`},w8={stroke:`${k.menuDropOverColor("#fff")} !important`},Ql={boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${k.menuDropOverBg("#2196F3")} 50%, transparent) !important`};O1("xin-menu-helper",{".xin-menu, .tosi-menu":n8,".xin-menu > div, .tosi-menu > div":{width:k.menuWidth("auto")},".xin-menu-trigger, .tosi-menu-trigger":{paddingLeft:0,paddingRight:0,minWidth:k.touchSize("48px")},".xin-menu-separator, .tosi-menu-separator":{display:"inline-block",content:" ",height:"1px",width:"100%",background:k.menuSeparatorColor("#2224"),margin:k.menuSeparatorMargin("8px 0")},".xin-menu-item, .tosi-menu-item":C8,".xin-menu-item, .xin-menu-item > span, .tosi-menu-item, .tosi-menu-item > span":d8,".xin-menu-with-icons .xin-menu-item, .tosi-menu-with-icons .tosi-menu-item":{gridTemplateColumns:"30px 1fr 30px"},".xin-menu-item svg, .tosi-menu-item svg":{stroke:k.menuItemIconColor("#222")},".xin-menu-item.xin-menu-item-checked, .tosi-menu-item.tosi-menu-item-checked":{background:k.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":g8,".xin-menu-item.drag-target:hover, .tosi-menu-item.drag-target:hover":Ql,".xin-menu-item:active, .tosi-menu-item:active":Wl,".xin-menu-item:active svg, .tosi-menu-item:active svg":{stroke:k.menuItemIconActiveColor("#000")},".xin-menu-item-highlight, .tosi-menu-item-highlight":Wl,".xin-menu-item-highlight svg, .tosi-menu-item-highlight svg":{stroke:k.menuItemIconActiveColor("#000")},".xin-drop-over, .tosi-drop-over":k8,".xin-drop-over > span, .tosi-drop-over > span":p8,".xin-drop-over svg, .tosi-drop-over svg":w8,".drag-target":Ql});var Zl=(l,i)=>{let o=l.checked&&l.checked()&&"check"||!1,y=l?.icon||o||Z(" ");if(typeof y==="string")y=t[y]();let s=i.role==="listbox"?"option":"menuitem",x,h=l.properties||{};if(typeof l?.action==="string")x=c8({class:"xin-menu-item tosi-menu-item",role:s,href:l.action},h,y,i.localized?Z(K(l.caption)):Z(l.caption),Z(l.shortcut?K0(l.shortcut):" "));else x=Y2({class:"xin-menu-item tosi-menu-item",role:s,onClick:l.action},h,y,i.localized?Z(K(l.caption)):Z(l.caption),Z(l.shortcut?K0(l.shortcut):" "));if(x.classList.toggle("xin-menu-item-checked",o!==!1),x.classList.toggle("tosi-menu-item-checked",o!==!1),l.tooltip)x.dataset.tooltip=l.tooltip;if(i.role==="listbox"&&o)x.setAttribute("aria-selected","true");if(l?.enabled&&!l.enabled())x.setAttribute("disabled",""),x.setAttribute("aria-disabled","true");return x},Rl=(l,i)=>{let o=l?.icon||Z(" ");if(typeof o==="string")o=t[o]();let y=l.properties||{},s=Y2({class:"xin-menu-item tosi-menu-item",onDragenter(x){v2(),s.classList.add("xin-drop-over","tosi-drop-over"),x.preventDefault()},onDragover(x){if(x.preventDefault(),x.dataTransfer)x.dataTransfer.dropEffect="copy"},onDragleave(x){let h=x.relatedTarget;if(h&&s.contains(h))return;s.classList.remove("xin-drop-over","tosi-drop-over")},onDrop(x){if(x.preventDefault(),x.stopPropagation(),s.classList.remove("xin-drop-over","tosi-drop-over"),l.dropAction&&x.dataTransfer)l.dropAction(x.dataTransfer);Y(0)}},y,o,i.localized?Z(K(l.caption)):Z(l.caption),Z(" "));if(l.tooltip)s.dataset.tooltip=l.tooltip;if(l.dropAction&&l.acceptsDrop)s.dataset.drop=l.acceptsDrop.join(";");if(l?.enabled&&!l.enabled())s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true");return s},k5=(l,i)=>{let o=l.checked&&l.checked()&&"check"||!1,y=l?.icon||o||Z(" ");if(typeof y==="string")y=t[y]();let s=null,x=!1,h=l.properties||{},c=Y2({class:"xin-menu-item tosi-menu-item",disabled:!(!l.enabled||l.enabled()),onClick(r){if(i._dropMode)return;G(Object.assign({},i,{menuItems:c1(l.menuItems),target:c,submenuDepth:(i.submenuDepth||0)+1,position:"side"})),r.stopPropagation(),r.preventDefault()},onDragenter(r){if(!i._dropMode)return;v2(),r.preventDefault(),r.stopPropagation();let n=r.relatedTarget;if(n&&c.contains(n))return;if(c.classList.add("xin-drop-over","tosi-drop-over"),x){if(Y((i.submenuDepth||0)+1),x=!1,s)clearTimeout(s);s=null;return}if(s)clearTimeout(s);s=setTimeout(()=>{x=!0;let C=c1(l.menuItems),g=i._dataTypes?H2(C,i._dataTypes,i.hideDisabled):C;if(g.length>0)G(Object.assign({},i,{menuItems:g,target:c,submenuDepth:(i.submenuDepth||0)+1,position:"side",_dropMode:!0,_dataTypes:i._dataTypes}))},i.disclosureDelay??200)},onDragover(r){if(!i._dropMode)return;if(r.preventDefault(),r.stopPropagation(),r.dataTransfer)r.dataTransfer.dropEffect=l.dropAction?"copy":"link"},onDragleave(r){if(!i._dropMode)return;let n=r.relatedTarget;if(n&&c.contains(n))return;if(x&&n&&I.some((C)=>C.menu.contains(n)||C.target.contains(n)))return;if(c.classList.remove("xin-drop-over","tosi-drop-over"),s)clearTimeout(s),s=null},onDrop(r){if(!i._dropMode||!l.dropAction)return;if(r.preventDefault(),r.stopPropagation(),c.classList.remove("xin-drop-over","tosi-drop-over"),r.dataTransfer)l.dropAction(r.dataTransfer);Y(0)}},h,y,i.localized?Z(K(l.caption)):Z(l.caption),t.chevronRight({style:{justifySelf:"flex-end"}}));if(l.tooltip)c.dataset.tooltip=l.tooltip;if(i._dropMode&&l.dropAction&&l.acceptsDrop)c.dataset.drop=l.acceptsDrop.join(";");return c},Jl=(l,i)=>{if(l===null)return Z({class:"xin-menu-separator tosi-menu-separator"});else if(i._dropMode){let o=l;if(o.menuItems&&c1(o.menuItems).length>0)return k5(o,i);else if(l.dropAction)return Rl(l,i);else{let s=l?.icon||Z(" ");if(typeof s==="string")s=t[s]();return Y2({class:"xin-menu-item tosi-menu-item",disabled:!0},s,i.localized?Z(K(l.caption)):Z(l.caption),Z(" "))}}else{let o=l?.action?Zl(l,i):k5(l,i);if(i.showChecked&&l.checked&&l.checked())requestAnimationFrame(()=>{o.scrollIntoView({block:"center"})});return o}},$l=(l)=>{let{target:i,width:o,menuItems:y,role:s="menu"}=l,x=y.find((r)=>r?.icon||r?.checked),h=l.submenuDepth||0,c=Fl({class:x?"xin-menu tosi-menu xin-menu-with-icons tosi-menu-with-icons":"xin-menu tosi-menu",role:s,onClick(){if(!l._dropMode)Y(0)},onDragover(r){if(!l._dropMode)return;r.preventDefault()},onDragenter(){if(!l._dropMode)return;v2()},onDragleave(r){if(!l._dropMode)return;let n=r.relatedTarget;if(n&&c.contains(n))return;if(n&&I.some((C)=>C.menu.contains(n)||C.target.contains(n)))return;Hl(h)}},Fl({style:{minWidth:i.offsetWidth+"px",width:typeof o==="number"?`${o}px`:o},onMousedown(r){r.preventDefault(),r.stopPropagation()}},...y.map((r)=>Jl(r,l))));return c},B2,I=[],$2=null,v2=()=>{if($2)clearTimeout($2),$2=null},Hl=(l)=>{v2(),$2=setTimeout(()=>{$2=null,Y(l)},500)},Y=(l=0)=>{if(v2(),l===0)document.querySelectorAll("tosi-menu.xin-drop-over, tosi-menu.tosi-drop-over").forEach((o)=>o.classList.remove("xin-drop-over","tosi-drop-over"));let i=I.splice(l);for(let o of i)if(o.menu.remove(),o.onClose)o.onClose();return B2=i[0],l>0?I[l-1]:void 0};document.addEventListener("mousedown",(l)=>{if(I.length===0)return;let i=l.composedPath();if(!I.find((o)=>i.includes(o.target)||i.includes(o.menu)))Y(0)});document.body.addEventListener("keydown",(l)=>{if(l.key==="Escape")Y(0)});var G=(l)=>{l=Object.assign({submenuDepth:0},l);let{target:i,position:o,submenuDepth:y}=l;if(B2&&!document.body.contains(B2?.menu))B2=void 0;if(I.length&&!document.body.contains(I[0].menu))I.splice(0);if(l._dropMode){if(I.length>y&&I[y]?.target===i)return;Y(y)}else{if(y===0&&B2?.target===i)return;let h=Y(y);if(B2?.target===i)return;if(h&&h.target===i){Y();return}}if(!l.menuItems?.length)return;let s=$l(l),x=J2({content:s,target:i,position:o});x.remainOnScroll=l._dropMode?"remain":"remove",I.push({target:i,menu:x,onClose:l.onClose})},Yl=(l)=>{let{dataTypes:i,...o}=l,y=H2(l.menuItems,i,l.hideDisabled);if(!y.length)return;G({...o,menuItems:y,_dropMode:!0,_dataTypes:i})};function p5(l,i,o=[]){for(let y of l){if(!y)continue;let{shortcut:s}=y,{menuItems:x}=y;if(s){if(r5(i,s)){let h=y;if(h.enabled&&!h.enabled())return;if(o.some((c)=>c.enabled&&!c.enabled()))return;return{action:h,path:o}}}else if(x){let h=p5(c1(x),i,[...o,y]);if(h)return h}}return}class W0 extends a{static preferredTagName="tosi-menu";static lightStyleSpec={":host":{display:"inline-flex",minWidth:d.touchSize,minHeight:d.touchSize},":host button":{margin:0,padding:0,alignSelf:"stretch",flex:"1",textAlign:"center"},":host button > xin-slot":{display:"flex",alignItems:"center",gap:k.tosiMenuTriggerGap("10px")}};static initAttributes={menuWidth:"auto",localized:!1,icon:"",acceptsDrop:"",disclosureDelay:0,hideDisabled:!1};menuItems=[];dropAction=null;_dragMatches=!1;_matchesDrag(l){if(!this.acceptsDrop)return!1;let i=t2(this.acceptsDrop);return[...l.dataTransfer?.types||[]].some((y)=>i.some((s)=>a2([s],y)))}showMenu=(l)=>{if(l.type==="click"||l.code==="Space")G({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),l.stopPropagation(),l.preventDefault()};handleDragEnter=(l)=>{if(this._dragMatches=this._matchesDrag(l),!this._dragMatches)return;v2(),this.classList.add("xin-drop-over","tosi-drop-over");let i=[...l.dataTransfer?.types||[]];if(this.menuItems.length)Yl({target:this.parts.trigger,menuItems:this.menuItems,dataTypes:i,width:this.menuWidth,localized:this.localized,disclosureDelay:this.disclosureDelay||void 0,hideDisabled:this.hideDisabled});l.preventDefault()};handleDragOver=(l)=>{if(!this._dragMatches)return;if(l.preventDefault(),l.dataTransfer)l.dataTransfer.dropEffect=this.dropAction?"copy":"link"};handleDragLeave=(l)=>{if(!this._dragMatches)return;let i=l.relatedTarget;if(i&&this.contains(i))return;if(i&&I.some((o)=>o.menu.contains(i)||o.target.contains(i))){this.classList.remove("xin-drop-over","tosi-drop-over");return}this.classList.remove("xin-drop-over","tosi-drop-over"),Hl(0)};handleDrop=(l)=>{if(!this._dragMatches||!this.dropAction)return;if(l.preventDefault(),l.stopPropagation(),this.classList.remove("xin-drop-over","tosi-drop-over"),l.dataTransfer)this.dropAction(l.dataTransfer);Y(0)};content=()=>Y2({tabindex:0,part:"trigger",onClick:this.showMenu},r8());handleShortcut=async(l)=>{let i=p5(this.menuItems,l);if(!i)return;l.preventDefault(),l.stopImmediatePropagation();let{action:o,path:y}=i;if(this.isConnected&&document.body.contains(this))await this.animateShortcut(y,o);if(o.action instanceof Function)o.action()};findMenuItemByCaption(l,i){for(let o of l.querySelectorAll(".xin-menu-item")){let y=o.children[1];if(y&&y.textContent===i)return o}return null}async animateShortcut(l,i){Y(0),G({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),await new Promise((y)=>setTimeout(y,80));for(let y=0;y<l.length;y++){let s=y+1,x=I[y]?.menu;if(!x)break;let h=this.findMenuItemByCaption(x,l[y].caption);if(!h)break;G({target:h,width:this.menuWidth,localized:this.localized,menuItems:c1(l[y].menuItems),submenuDepth:s,position:"side"}),await new Promise((c)=>setTimeout(c,80))}let o=I[I.length-1]?.menu;if(o){let y=this.findMenuItemByCaption(o,i.caption);if(y)y.classList.add("xin-menu-item-highlight","tosi-menu-item-highlight")}await new Promise((y)=>setTimeout(y,300)),Y(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(),document.addEventListener("keydown",this.handleShortcut,!0),this.acceptsDrop)this.dataset.drop=this.acceptsDrop}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleShortcut)}}var Il=W0.elementCreator(),t8=Il,a8=W0;function B8(l,i,o){let y=l.find((s)=>s[i]!==void 0&&s[i]!==null);if(y!==void 0){let s=y[i];switch(typeof s){case"string":if(s.match(/^\d+(\.\d+)?$/))return 6*o;else if(s.includes(" "))return 20*o;else return 12*o;case"number":return 6*o;case"boolean":return 5*o;case"object":return!1;default:return 8*o}}return!1}var{div:z2,span:w5,button:v8,template:z8}=w,Sl=(l)=>l;class Q0 extends a{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","--row-height":"var(--tosi-table-row-height)","--touch-size":"var(--tosi-table-touch-size)","--dragged-header-bg":"var(--tosi-table-dragged-header-bg)","--dragged-header-color":"var(--tosi-table-dragged-header-color)","--drop-header-bg":"var(--tosi-table-drop-header-bg)",overflow:"auto hidden"},":host .thead, :host .tbody":{width:d.tosiTableGridRowWidth},":host .tr":{display:"grid",gridTemplateColumns:d.tosiTableGridColumns,height:d.tosiTableRowHeight,lineHeight:d.tosiTableRowHeight},":host .td, :host .th":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"flex",alignItems:"center"},":host .th .menu-trigger":{color:"currentColor",background:"none",padding:0,lineHeight:d.tosiTableTouchSize,height:d.tosiTableTouchSize,width:d.tosiTableTouchSize},':host [draggable="true"]':{cursor:"ew-resize"},':host [draggable="true"]:active':{background:d.tosiTableDraggedHeaderBg,color:d.tosiTableDraggedHeaderColor},":host .drag-over":{background:d.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=()=>{};selectedKey=Symbol("selected");selectBinding=(l,i)=>{if(i==null)return;l.toggleAttribute("aria-selected",i[this.selectedKey]===!0)};maxVisibleRows=1e4;get value(){return{array:this.array,filter:this.filter,columns:this.columns}}set value(l){let{array:i,columns:o,filter:y}=W(l);if(this._array!==i||this._columns!==o||this._filter!==y)this.queueRender();this._array=i||[],this._columns=o||null,this._filter=y||Sl}rowData={visible:[],pinnedTop:[],pinnedBottom:[]};_array=[];_columns=null;_filter=Sl;get virtual(){return this.rowHeight>0?{height:this.rowHeight}:void 0}constructor(){super();this.rowData=S({[this.instanceId]:this.rowData})[this.instanceId]}get array(){return this._array}set array(l){this._array=W(l),this.queueRender()}get filter(){return this._filter}set filter(l){if(this._filter!==l)this._filter=l,this.queueRender()}get sort(){if(this._sort)return this._sort;let l=this._columns?.find((o)=>o.sort==="ascending"||o.sort==="descending");if(!l)return;let{prop:i}=l;return l.sort==="ascending"?(o,y)=>o[i]>y[i]?1:-1:(o,y)=>o[i]>y[i]?-1:1}set sort(l){if(this._sort!==l)this._sort=l,this.queueRender()}get columns(){if(!Array.isArray(this._columns)){let{_array:l}=this;this._columns=Object.keys(l[0]||{}).map((i)=>{let o=B8(l,i,this.charWidth);return{name:i.replace(/([a-z])([A-Z])/g,"$1 $2").toLocaleLowerCase(),prop:i,align:typeof l[0][i]==="number"||l[0][i]!==""&&!isNaN(l[0][i])?"right":"left",visible:o!==!1,width:o?o:0}})}return this._columns}set columns(l){this._columns=l,this.queueRender()}get visibleColumns(){return this.columns.filter((l)=>l.visible!==!1)}content=null;getColumn(l){let i=(l.touches!==void 0?l.touches[0].clientX:l.clientX)-this.getBoundingClientRect().x+this.scrollLeft,o=l.touches!==void 0?20:5,y=0,s=[];return this.visibleColumns.find((h)=>{if(h.visible!==!1)return y+=h.width,s.push(y),Math.abs(i-y)<o})}setCursor=(l)=>{if(this.getColumn(l)!==void 0)this.style.cursor="col-resize";else this.style.cursor=""};resizeColumn=(l)=>{let i=this.getColumn(l);if(i!==void 0){let o=Number(i.width),y=l.touches!==void 0,s=y?l.touches[0].identifier:void 0;M(l,(x,h,c)=>{if((y?[...c.touches].find((C)=>C.identifier===s):!0)===void 0)return!0;let n=o+x;if(i.width=n>this.minColumnWidth?n:this.minColumnWidth,this.setColumnWidths(),c.type==="mouseup")return!0},"col-resize")}};selectRow(l,i=!0){if(i)l[this.selectedKey]=!0;else delete l[this.selectedKey];for(let o of Array.from(this.querySelectorAll(".tr"))){let y=U1(o);this.selectBinding(o,y)}}selectRows(l,i=!0){for(let o of l||this.array)if(i)o[this.selectedKey]=!0;else delete o[this.selectedKey];for(let o of Array.from(this.querySelectorAll(".tr"))){let y=U1(o);this.selectBinding(o,y)}}deSelect(l){this.selectRows(l,!1)}rangeStart;updateSelection=(l)=>{if(!this.select&&!this.multiple)return;let{target:i}=l;if(!(i instanceof HTMLElement))return;let o=i.closest(".tr");if(!(o instanceof HTMLElement))return;let y=U1(o);if(y==null)return;let s=l,x=window.getSelection();if(x!==null)x.removeAllRanges();let h=this.visibleRows;if(this.multiple&&s.shiftKey&&h.length>0&&this.rangeStart!==y){let c=this.rangeStart===void 0||this.rangeStart[this.selectedKey]===!0,[r,n]=[this.rangeStart!==void 0?h.indexOf(this.rangeStart):0,h.indexOf(y)].sort((C,g)=>C-g);if(r>-1)for(let C=r;C<=n;C++){let g=h[C];this.selectRow(g,c)}}else if(this.multiple&&s.metaKey){this.selectRow(y,!y[this.selectedKey]);let c=h.indexOf(y),r=h[c+1],n=c>0?h[c-1]:void 0;if(r!==void 0&&r[this.selectedKey]===!0)this.rangeStart=r;else if(n!==void 0&&n[this.selectedKey]===!0)this.rangeStart=n;else this.rangeStart=void 0}else this.rangeStart=y,this.deSelect(),this.selectRow(y,!0);this.selectionChanged(this.visibleSelectedRows);for(let c of Array.from(this.querySelectorAll(".tr"))){let r=U1(c);this.selectBinding(c,r)}};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)}setColumnWidths(){let l=this.visibleColumns.map((o)=>o.width+"px").join(" "),i=this.visibleColumns.reduce((o,y)=>o+y.width,0)+"px";this.style.setProperty("--tosi-table-grid-columns",l),this.style.setProperty("--tosi-table-grid-row-width",i),this.style.setProperty("--grid-columns",l),this.style.setProperty("--grid-row-width",i)}sortByColumn=(l,i="auto")=>{for(let o of this.columns.filter((y)=>W(y.sort)!==!1))if(W(o)===l){if(i==="auto")o.sort=o.sort==="ascending"?"descending":"ascending";else o.sort=i;this.queueRender()}else delete o.sort};popColumnMenu=(l,i)=>{let{sortByColumn:o}=this,y=this.columns.filter((h)=>h.visible===!1),s=this.queueRender.bind(this),x=[];if(!this.nosort&&i.sort!==!1)x.push({caption:this.localized?`${K("Sort")} ${K("Ascending")}`:"Sort Ascending",icon:"sortAscending",action(){o(i)}},{caption:this.localized?`${K("Sort")} ${K("Descending")}`:"Sort Descending",icon:"sortDescending",action(){o(i,"descending")}});if(!this.nohide){if(x.length)x.push(null);x.push({caption:this.localized?`${K("Hide")} ${K("Column")}`:"Hide Column",icon:"eyeOff",enabled:()=>i.visible!==!0,action(){i.visible=!1,s()}},{caption:this.localized?`${K("Show")} ${K("Column")}`:"Show Column",icon:"eye",enabled:()=>y.length>0,menuItems:y.map((h)=>{return{caption:h.name||h.prop,action(){delete h.visible,s()}}})})}G({target:l,localized:this.localized,menuItems:x})};get captionSpan(){return this.localized?f1:w5}headerCell=(l)=>{let{popColumnMenu:i}=this,o="none",y;switch(l.sort){case"ascending":y=t.sortAscending(),o="descending";break;case!1:break;default:break;case"descending":o="ascending",y=t.sortDescending()}let s=!(this.nosort&&this.nohide)?v8({class:"menu-trigger",onClick(x){i(x.target,l),x.stopPropagation()}},y||t.moreVertical()):{};return l.headerCell!==void 0?l.headerCell(l):w5({class:"th",role:"columnheader",ariaSort:o,style:{...this.cellStyle,justifyContent:l.align||"left"}},this.captionSpan({style:{flex:"1"}},typeof l.name==="string"?l.name:l.prop),s)};dataCell=(l)=>{if(l.dataCell!==void 0)return l.dataCell(l);return w5({class:"td",role:"cell",style:{...this.cellStyle,justifyContent:l.align||"left"},bindText:`^.${l.prop}`})};get visibleRows(){return W(this.rowData.visible)}get visibleSelectedRows(){return this.visibleRows.filter((l)=>l[this.selectedKey])}get selectedRows(){return this.array.filter((l)=>l[this.selectedKey])}rowTemplate(l){return z8(z2({class:"tr",role:"row",bind:{value:"^",binding:{toDOM:this.selectBinding}}},...l.map(this.dataCell)))}draggedColumn;dropColumn=(l)=>{let i=l.target.closest(".drag-over"),o=Array.from(i.parentElement.children).indexOf(i),y=this.visibleColumns[o],s=this.columns.indexOf(this.draggedColumn),x=this.columns.indexOf(y);this.columns.splice(s,1),this.columns.splice(x,0,this.draggedColumn),console.log({event:l,target:i,targetIndex:o,draggedIndex:s,droppedIndex:x}),this.queueRender(),l.preventDefault(),l.stopPropagation()};render(){super.render(),this.rowData.pinnedTop=this.pinnedTop>0?this._array.slice(0,this.pinnedTop):[],this.rowData.pinnedBottom=this.pinnedBottom>0?this._array.slice(this._array.length-this.pinnedBottom):[],this.rowData.visible=this.filter(this._array.slice(this.pinnedTop,Math.min(this.maxVisibleRows,this._array.length-this.pinnedTop-this.pinnedBottom)));let{sort:l}=this;if(l)this.rowData.visible.sort(l);this.textContent="",this.style.display="flex",this.style.flexDirection="column";let{visibleColumns:i}=this;if(this.style.setProperty("--tosi-table-row-height",`${this.rowHeight}px`),this.style.setProperty("--row-height",`${this.rowHeight}px`),this.setColumnWidths(),!this.noreorder)d5();let o=this.instanceId+"-column-header",y=i.map((s)=>{let x=this.headerCell(s);if(!this.noreorder&&x.children[0]){let h=x.children[0];h.setAttribute("draggable","true"),h.style.pointerEvents="all",h.dataset.drag=o,x.dataset.drop=o,h.addEventListener("dragstart",()=>{this.draggedColumn=s}),x.addEventListener("drop",this.dropColumn)}return x});if(this.append(z2({class:"thead",role:"rowgroup",style:{touchAction:"none"}},z2({class:"tr",role:"row"},...y))),this.pinnedTop>0)this.append(z2({part:"pinnedTopRows",class:"tbody",role:"rowgroup",style:{flex:"0 0 auto",overflow:"hidden",height:`${this.rowHeight*this.pinnedTop}px`},bindList:{value:this.rowData.pinnedTop,virtual:this.virtual}},this.rowTemplate(i)));if(this.append(z2({part:"visibleRows",class:"tbody",role:"rowgroup",style:{content:" ",minHeight:"100px",flex:"1 1 100px",overflow:"hidden auto"},bindList:{value:this.rowData.visible,virtual:this.virtual}},this.rowTemplate(i))),this.pinnedBottom>0)this.append(z2({part:"pinnedBottomRows",class:"tbody",role:"rowgroup",style:{flex:"0 0 auto",overflow:"hidden",height:`${this.rowHeight*this.pinnedBottom}px`},bindList:{value:this.rowData.pinnedBottom,virtual:this.virtual}},this.rowTemplate(i)))}}var f8=Q0,t5=Q0.elementCreator(),j8=t5,A8=t5;var{dialog:q8,button:a5,header:_8,footer:V8,xinSlot:B5,h3:v5,p:z5,label:P8,input:O8,div:U8}=w;class f5 extends a{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:k.menuShadow("0 5px 10px #0004"),_dialogBackground:k.background("#fafafa"),_dialogColor:k.textColor("#222"),boxShadow:d.dialogShadow,background:d.dialogBackground,color:d.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(l,i="Alert"){return new Promise((o)=>{let y=G0({removeOnClose:!0,closeOnBackgroundClick:!0,dialogWillClose(){o()}},v5({slot:"header"},i),l.includes(`
15
+ `)?w.pre({style:{whiteSpace:"pre-wrap",margin:0}},l):z5(l));document.body.append(y),y.showModal()})}static async confirm(l,i="Confirm"){return new Promise((o)=>{let y=G0({removeOnClose:!0,dialogWillClose(s){o(s==="confirm")}},v5({slot:"header"},i),z5(l),a5({slot:"footer",onClick(){y.close()}},"Cancel"));document.body.append(y),y.showModal()})}static async prompt(l,i="Prompt",o=""){return new Promise((y)=>{let s=O8({value:o}),x=G0({removeOnClose:!0,dialogWillClose(h){y(h==="confirm"?s.value:null)},initialFocus(){s.focus()}},v5({slot:"header"},i),z5(P8({style:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:5}},U8(l),s)),a5({slot:"footer",onClick(){x.close()}},"Cancel"));document.body.append(x),x.showModal()})}removeOnClose=!1;closeOnBackgroundClick=!1;constructor(){super();d2(this,"click",()=>{if(this.closeOnBackgroundClick)this.close()})}dialogWillClose=(l="cancel")=>{console.log("dialog will close with",l)};initialFocus(){this.parts.ok.focus()}#l=(l)=>{};showModal=()=>{return this.style.zIndex=String(l2()),new Promise((l)=>{this.#l=l,this.parts.dialog.showModal(),requestAnimationFrame(()=>{this.initialFocus()})})};close=(l="cancel")=>{if(this.dialogWillClose(l),this.#l(l),this.parts.dialog.close(),this.removeOnClose)this.remove()};ok=()=>{this.close("confirm")};content=()=>q8({part:"dialog"},_8(B5({name:"header"})),B5(),V8(B5({name:"footer"}),a5({part:"ok",onClick:this.ok},"OK")))}var G0=f5.elementCreator();function A5(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var o2=A5();function ml(l){o2=l}var T2={exec:()=>null};function X(l,i=""){let o=typeof l=="string"?l:l.source,y={replace:(s,x)=>{let h=typeof x=="string"?x:x.source;return h=h.replace(D.caret,"$1"),o=o.replace(s,h),y},getRegex:()=>new RegExp(o,i)};return y}var X8=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),D={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:(l)=>new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}#`),htmlBeginRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}<(?:[a-z].*>|!--)`,"i")},N8=/^(?:[ \t]*(?:\n|$))+/,K8=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,b8=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,u2=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,F8=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,q5=/(?:[*+-]|\d{1,9}[.)])/,El=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,li=X(El).replace(/bull/g,q5).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(),W8=X(El).replace(/bull/g,q5).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(),_5=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Q8=/^[^\n]+/,V5=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,G8=X(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",V5).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Z8=X(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,q5).getRegex(),H0="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",P5=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,R8=X("^ {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",P5).replace("tag",H0).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ii=X(_5).replace("hr",u2).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",H0).getRegex(),J8=X(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ii).getRegex(),O5={blockquote:J8,code:K8,def:G8,fences:b8,heading:F8,hr:u2,html:R8,lheading:li,list:Z8,newline:N8,paragraph:ii,table:T2,text:Q8},Dl=X("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u2).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",H0).getRegex(),$8={...O5,lheading:W8,table:Dl,paragraph:X(_5).replace("hr",u2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dl).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",H0).getRegex()},H8={...O5,html:X(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",P5).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:T2,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(_5).replace("hr",u2).replace("heading",` *#{1,6} *[^
16
+ ]`).replace("lheading",li).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Y8=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,I8=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,oi=/^( {2,}|\\)\n(?!\s*$)/,S8=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Y0=/[\p{P}\p{S}]/u,U5=/[\s\p{P}\p{S}]/u,yi=/[^\s\p{P}\p{S}]/u,D8=X(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,U5).getRegex(),si=/(?!~)[\p{P}\p{S}]/u,T8=/(?!~)[\s\p{P}\p{S}]/u,u8=/(?:[^\s\p{P}\p{S}]|~)/u,e8=X(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",X8?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),xi=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,L8=X(xi,"u").replace(/punct/g,Y0).getRegex(),M8=X(xi,"u").replace(/punct/g,si).getRegex(),hi="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",m8=X(hi,"gu").replace(/notPunctSpace/g,yi).replace(/punctSpace/g,U5).replace(/punct/g,Y0).getRegex(),E8=X(hi,"gu").replace(/notPunctSpace/g,u8).replace(/punctSpace/g,T8).replace(/punct/g,si).getRegex(),l7=X("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,yi).replace(/punctSpace/g,U5).replace(/punct/g,Y0).getRegex(),i7=X(/\\(punct)/,"gu").replace(/punct/g,Y0).getRegex(),o7=X(/^<(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(),y7=X(P5).replace("(?:-->|$)","-->").getRegex(),s7=X("^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",y7).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),R0=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,x7=X(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",R0).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ci=X(/^!?\[(label)\]\[(ref)\]/).replace("label",R0).replace("ref",V5).getRegex(),ri=X(/^!?\[(ref)\](?:\[\])?/).replace("ref",V5).getRegex(),h7=X("reflink|nolink(?!\\()","g").replace("reflink",ci).replace("nolink",ri).getRegex(),Tl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,X5={_backpedal:T2,anyPunctuation:i7,autolink:o7,blockSkip:e8,br:oi,code:I8,del:T2,emStrongLDelim:L8,emStrongRDelimAst:m8,emStrongRDelimUnd:l7,escape:Y8,link:x7,nolink:ri,punctuation:D8,reflink:ci,reflinkSearch:h7,tag:s7,text:S8,url:T2},c7={...X5,link:X(/^!?\[(label)\]\((.*?)\)/).replace("label",R0).getRegex(),reflink:X(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",R0).getRegex()},j5={...X5,emStrongRDelimAst:E8,emStrongLDelim:M8,url:X(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Tl).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:X(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Tl).getRegex()},r7={...j5,br:X(oi).replace("{2,}","*").getRegex(),text:X(j5.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Z0={normal:O5,gfm:$8,pedantic:H8},I2={normal:X5,gfm:j5,breaks:r7,pedantic:c7},n7={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ul=(l)=>n7[l];function j1(l,i){if(i){if(D.escapeTest.test(l))return l.replace(D.escapeReplace,ul)}else if(D.escapeTestNoEncode.test(l))return l.replace(D.escapeReplaceNoEncode,ul);return l}function el(l){try{l=encodeURI(l).replace(D.percentDecode,"%")}catch{return null}return l}function Ll(l,i){let o=l.replace(D.findPipe,(x,h,c)=>{let r=!1,n=h;for(;--n>=0&&c[n]==="\\";)r=!r;return r?"|":" |"}),y=o.split(D.splitPipe),s=0;if(y[0].trim()||y.shift(),y.length>0&&!y.at(-1)?.trim()&&y.pop(),i)if(y.length>i)y.splice(i);else for(;y.length<i;)y.push("");for(;s<y.length;s++)y[s]=y[s].trim().replace(D.slashPipe,"|");return y}function S2(l,i,o){let y=l.length;if(y===0)return"";let s=0;for(;s<y;){let x=l.charAt(y-s-1);if(x===i&&!o)s++;else if(x!==i&&o)s++;else break}return l.slice(0,y-s)}function C7(l,i){if(l.indexOf(i[1])===-1)return-1;let o=0;for(let y=0;y<l.length;y++)if(l[y]==="\\")y++;else if(l[y]===i[0])o++;else if(l[y]===i[1]&&(o--,o<0))return y;return o>0?-2:-1}function Ml(l,i,o,y,s){let x=i.href,h=i.title||null,c=l[1].replace(s.other.outputLinkReplace,"$1");y.state.inLink=!0;let r={type:l[0].charAt(0)==="!"?"image":"link",raw:o,href:x,title:h,text:c,tokens:y.inlineTokens(c)};return y.state.inLink=!1,r}function d7(l,i,o){let y=l.match(o.other.indentCodeCompensation);if(y===null)return i;let s=y[1];return i.split(`
17
17
  `).map((x)=>{let h=x.match(o.other.beginningSpace);if(h===null)return x;let[c]=h;return c.length>=s.length?x.slice(s.length):x}).join(`
18
18
  `)}var J0=class{options;rules;lexer;constructor(l){this.options=l||o2}space(l){let i=this.rules.block.newline.exec(l);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(l){let i=this.rules.block.code.exec(l);if(i){let o=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?o:S2(o,`
19
- `)}}}fences(l){let i=this.rules.block.fences.exec(l);if(i){let o=i[0],y=o7(o,i[3]||"",this.rules);return{type:"code",raw:o,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:y}}}heading(l){let i=this.rules.block.heading.exec(l);if(i){let o=i[2].trim();if(this.rules.other.endingHash.test(o)){let y=S2(o,"#");(this.options.pedantic||!y||this.rules.other.endingSpaceChar.test(y))&&(o=y.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(l){let i=this.rules.block.hr.exec(l);if(i)return{type:"hr",raw:S2(i[0],`
19
+ `)}}}fences(l){let i=this.rules.block.fences.exec(l);if(i){let o=i[0],y=d7(o,i[3]||"",this.rules);return{type:"code",raw:o,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:y}}}heading(l){let i=this.rules.block.heading.exec(l);if(i){let o=i[2].trim();if(this.rules.other.endingHash.test(o)){let y=S2(o,"#");(this.options.pedantic||!y||this.rules.other.endingSpaceChar.test(y))&&(o=y.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(l){let i=this.rules.block.hr.exec(l);if(i)return{type:"hr",raw:S2(i[0],`
20
20
  `)}}blockquote(l){let i=this.rules.block.blockquote.exec(l);if(i){let o=S2(i[0],`
21
21
  `).split(`
22
22
  `),y="",s="",x=[];for(;o.length>0;){let h=!1,c=[],r;for(r=0;r<o.length;r++)if(this.rules.other.blockquoteStart.test(o[r]))c.push(o[r]),h=!0;else if(!h)c.push(o[r]);else break;o=o.slice(r);let n=c.join(`
23
23
  `),C=n.replace(this.rules.other.blockquoteSetextReplace,`
24
24
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");y=y?`${y}
25
25
  ${n}`:n,s=s?`${s}
26
- ${C}`:C;let k=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(C,x,!0),this.lexer.state.top=k,o.length===0)break;let p=x.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let z=p,B=z.raw+`
26
+ ${C}`:C;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(C,x,!0),this.lexer.state.top=g,o.length===0)break;let p=x.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let z=p,B=z.raw+`
27
27
  `+o.join(`
28
28
  `),j=this.blockquote(B);x[x.length-1]=j,y=y.substring(0,y.length-z.raw.length)+j.raw,s=s.substring(0,s.length-z.text.length)+j.text;break}else if(p?.type==="list"){let z=p,B=z.raw+`
29
29
  `+o.join(`
30
30
  `),j=this.list(B);x[x.length-1]=j,y=y.substring(0,y.length-p.raw.length)+j.raw,s=s.substring(0,s.length-z.raw.length)+j.raw,o=B.substring(x.at(-1).raw.length).split(`
31
- `);continue}}return{type:"blockquote",raw:y,tokens:x,text:s}}}list(l){let i=this.rules.block.list.exec(l);if(i){let o=i[1].trim(),y=o.length>1,s={type:"list",raw:"",ordered:y,start:y?+o.slice(0,-1):"",loose:!1,items:[]};o=y?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=y?o:"[*+-]");let x=this.rules.other.listItemRegex(o),h=!1;for(;l;){let r=!1,n="",C="";if(!(i=x.exec(l))||this.rules.block.hr.test(l))break;n=i[0],l=l.substring(n.length);let k=i[2].split(`
31
+ `);continue}}return{type:"blockquote",raw:y,tokens:x,text:s}}}list(l){let i=this.rules.block.list.exec(l);if(i){let o=i[1].trim(),y=o.length>1,s={type:"list",raw:"",ordered:y,start:y?+o.slice(0,-1):"",loose:!1,items:[]};o=y?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=y?o:"[*+-]");let x=this.rules.other.listItemRegex(o),h=!1;for(;l;){let r=!1,n="",C="";if(!(i=x.exec(l))||this.rules.block.hr.test(l))break;n=i[0],l=l.substring(n.length);let g=i[2].split(`
32
32
  `,1)[0].replace(this.rules.other.listReplaceTabs,(P)=>" ".repeat(3*P.length)),p=l.split(`
33
- `,1)[0],z=!k.trim(),B=0;if(this.options.pedantic?(B=2,C=k.trimStart()):z?B=i[1].length+1:(B=i[2].search(this.rules.other.nonSpaceChar),B=B>4?1:B,C=k.slice(B),B+=i[1].length),z&&this.rules.other.blankLine.test(p)&&(n+=p+`
34
- `,l=l.substring(p.length+1),r=!0),!r){let P=this.rules.other.nextBulletRegex(B),q=this.rules.other.hrRegex(B),_=this.rules.other.fencesBeginRegex(B),N=this.rules.other.headingBeginRegex(B),m=this.rules.other.htmlBeginRegex(B);for(;l;){let H=l.split(`
35
- `,1)[0],E;if(p=H,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),E=p):E=p.replace(this.rules.other.tabCharGlobal," "),_.test(p)||N.test(p)||m.test(p)||P.test(p)||q.test(p))break;if(E.search(this.rules.other.nonSpaceChar)>=B||!p.trim())C+=`
36
- `+E.slice(B);else{if(z||k.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(k)||N.test(k)||q.test(k))break;C+=`
37
- `+p}!z&&!p.trim()&&(z=!0),n+=H+`
38
- `,l=l.substring(H.length+1),k=E.slice(B)}}s.loose||(h?s.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(h=!0));let j=null,V;this.options.gfm&&(j=this.rules.other.listIsTask.exec(C),j&&(V=j[0]!=="[ ] ",C=C.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:n,task:!!j,checked:V,loose:!1,text:C,tokens:[]}),s.raw+=n}let c=s.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let r=0;r<s.items.length;r++)if(this.lexer.state.top=!1,s.items[r].tokens=this.lexer.blockTokens(s.items[r].text,[]),!s.loose){let n=s.items[r].tokens.filter((k)=>k.type==="space"),C=n.length>0&&n.some((k)=>this.rules.other.anyLine.test(k.raw));s.loose=C}if(s.loose)for(let r=0;r<s.items.length;r++)s.items[r].loose=!0;return s}}html(l){let i=this.rules.block.html.exec(l);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(l){let i=this.rules.block.def.exec(l);if(i){let o=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),y=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:o,raw:i[0],href:y,title:s}}}table(l){let i=this.rules.block.table.exec(l);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let o=el(i[1]),y=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
39
- `):[],x={type:"table",raw:i[0],header:[],align:[],rows:[]};if(o.length===y.length){for(let h of y)this.rules.other.tableAlignRight.test(h)?x.align.push("right"):this.rules.other.tableAlignCenter.test(h)?x.align.push("center"):this.rules.other.tableAlignLeft.test(h)?x.align.push("left"):x.align.push(null);for(let h=0;h<o.length;h++)x.header.push({text:o[h],tokens:this.lexer.inline(o[h]),header:!0,align:x.align[h]});for(let h of s)x.rows.push(el(h,x.header.length).map((c,r)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:x.align[r]})));return x}}lheading(l){let i=this.rules.block.lheading.exec(l);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(l){let i=this.rules.block.paragraph.exec(l);if(i){let o=i[1].charAt(i[1].length-1)===`
40
- `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:o,tokens:this.lexer.inline(o)}}}text(l){let i=this.rules.block.text.exec(l);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(l){let i=this.rules.inline.escape.exec(l);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(l){let i=this.rules.inline.tag.exec(l);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(l){let i=this.rules.inline.link.exec(l);if(i){let o=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;let x=S2(o.slice(0,-1),"\\");if((o.length-x.length)%2===0)return}else{let x=i7(i[2],"()");if(x===-2)return;if(x>-1){let h=(i[0].indexOf("!")===0?5:4)+i[1].length+x;i[2]=i[2].substring(0,x),i[0]=i[0].substring(0,h).trim(),i[3]=""}}let y=i[2],s="";if(this.options.pedantic){let x=this.rules.other.pedanticHrefTitle.exec(y);x&&(y=x[1],s=x[3])}else s=i[3]?i[3].slice(1,-1):"";return y=y.trim(),this.rules.other.startAngleBracket.test(y)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?y=y.slice(1):y=y.slice(1,-1)),ul(i,{href:y&&y.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(l,i){let o;if((o=this.rules.inline.reflink.exec(l))||(o=this.rules.inline.nolink.exec(l))){let y=(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=i[y.toLowerCase()];if(!s){let x=o[0].charAt(0);return{type:"text",raw:x,text:x}}return ul(o,s,o[0],this.lexer,this.rules)}}emStrong(l,i,o=""){let y=this.rules.inline.emStrongLDelim.exec(l);if(!y||y[3]&&o.match(this.rules.other.unicodeAlphaNumeric))return;if(!(y[1]||y[2])||!o||this.rules.inline.punctuation.exec(o)){let s=[...y[0]].length-1,x,h,c=s,r=0,n=y[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(n.lastIndex=0,i=i.slice(-1*l.length+s);(y=n.exec(i))!=null;){if(x=y[1]||y[2]||y[3]||y[4]||y[5]||y[6],!x)continue;if(h=[...x].length,y[3]||y[4]){c+=h;continue}else if((y[5]||y[6])&&s%3&&!((s+h)%3)){r+=h;continue}if(c-=h,c>0)continue;h=Math.min(h,h+c+r);let C=[...y[0]][0].length,k=l.slice(0,s+y.index+C+h);if(Math.min(s,h)%2){let z=k.slice(1,-1);return{type:"em",raw:k,text:z,tokens:this.lexer.inlineTokens(z)}}let p=k.slice(2,-2);return{type:"strong",raw:k,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(l){let i=this.rules.inline.code.exec(l);if(i){let o=i[2].replace(this.rules.other.newLineCharGlobal," "),y=this.rules.other.nonSpaceChar.test(o),s=this.rules.other.startingSpaceChar.test(o)&&this.rules.other.endingSpaceChar.test(o);return y&&s&&(o=o.substring(1,o.length-1)),{type:"codespan",raw:i[0],text:o}}}br(l){let i=this.rules.inline.br.exec(l);if(i)return{type:"br",raw:i[0]}}del(l){let i=this.rules.inline.del.exec(l);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(l){let i=this.rules.inline.autolink.exec(l);if(i){let o,y;return i[2]==="@"?(o=i[1],y="mailto:"+o):(o=i[1],y=o),{type:"link",raw:i[0],text:o,href:y,tokens:[{type:"text",raw:o,text:o}]}}}url(l){let i;if(i=this.rules.inline.url.exec(l)){let o,y;if(i[2]==="@")o=i[0],y="mailto:"+o;else{let s;do s=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(s!==i[0]);o=i[0],i[1]==="www."?y="http://"+i[0]:y=i[0]}return{type:"link",raw:i[0],text:o,href:y,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(l){let i=this.rules.inline.text.exec(l);if(i){let o=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:o}}}},C1=class l{tokens;options;state;tokenizer;inlineQueue;constructor(i){this.tokens=[],this.tokens.links=Object.create(null),this.options=i||o2,this.options.tokenizer=this.options.tokenizer||new J0,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 o={other:D,block:Z0.normal,inline:I2.normal};this.options.pedantic?(o.block=Z0.pedantic,o.inline=I2.pedantic):this.options.gfm&&(o.block=Z0.gfm,this.options.breaks?o.inline=I2.breaks:o.inline=I2.gfm),this.tokenizer.rules=o}static get rules(){return{block:Z0,inline:I2}}static lex(i,o){return new l(o).lex(i)}static lexInline(i,o){return new l(o).inlineTokens(i)}lex(i){i=i.replace(D.carriageReturn,`
33
+ `,1)[0],z=!g.trim(),B=0;if(this.options.pedantic?(B=2,C=g.trimStart()):z?B=i[1].length+1:(B=i[2].search(this.rules.other.nonSpaceChar),B=B>4?1:B,C=g.slice(B),B+=i[1].length),z&&this.rules.other.blankLine.test(p)&&(n+=p+`
34
+ `,l=l.substring(p.length+1),r=!0),!r){let P=this.rules.other.nextBulletRegex(B),q=this.rules.other.hrRegex(B),_=this.rules.other.fencesBeginRegex(B),N=this.rules.other.headingBeginRegex(B),m=this.rules.other.htmlBeginRegex(B);for(;l;){let $=l.split(`
35
+ `,1)[0],E;if(p=$,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),E=p):E=p.replace(this.rules.other.tabCharGlobal," "),_.test(p)||N.test(p)||m.test(p)||P.test(p)||q.test(p))break;if(E.search(this.rules.other.nonSpaceChar)>=B||!p.trim())C+=`
36
+ `+E.slice(B);else{if(z||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(g)||N.test(g)||q.test(g))break;C+=`
37
+ `+p}!z&&!p.trim()&&(z=!0),n+=$+`
38
+ `,l=l.substring($.length+1),g=E.slice(B)}}s.loose||(h?s.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(h=!0));let j=null,V;this.options.gfm&&(j=this.rules.other.listIsTask.exec(C),j&&(V=j[0]!=="[ ] ",C=C.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:n,task:!!j,checked:V,loose:!1,text:C,tokens:[]}),s.raw+=n}let c=s.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let r=0;r<s.items.length;r++)if(this.lexer.state.top=!1,s.items[r].tokens=this.lexer.blockTokens(s.items[r].text,[]),!s.loose){let n=s.items[r].tokens.filter((g)=>g.type==="space"),C=n.length>0&&n.some((g)=>this.rules.other.anyLine.test(g.raw));s.loose=C}if(s.loose)for(let r=0;r<s.items.length;r++)s.items[r].loose=!0;return s}}html(l){let i=this.rules.block.html.exec(l);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(l){let i=this.rules.block.def.exec(l);if(i){let o=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),y=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:o,raw:i[0],href:y,title:s}}}table(l){let i=this.rules.block.table.exec(l);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let o=Ll(i[1]),y=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
39
+ `):[],x={type:"table",raw:i[0],header:[],align:[],rows:[]};if(o.length===y.length){for(let h of y)this.rules.other.tableAlignRight.test(h)?x.align.push("right"):this.rules.other.tableAlignCenter.test(h)?x.align.push("center"):this.rules.other.tableAlignLeft.test(h)?x.align.push("left"):x.align.push(null);for(let h=0;h<o.length;h++)x.header.push({text:o[h],tokens:this.lexer.inline(o[h]),header:!0,align:x.align[h]});for(let h of s)x.rows.push(Ll(h,x.header.length).map((c,r)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:x.align[r]})));return x}}lheading(l){let i=this.rules.block.lheading.exec(l);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(l){let i=this.rules.block.paragraph.exec(l);if(i){let o=i[1].charAt(i[1].length-1)===`
40
+ `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:o,tokens:this.lexer.inline(o)}}}text(l){let i=this.rules.block.text.exec(l);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(l){let i=this.rules.inline.escape.exec(l);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(l){let i=this.rules.inline.tag.exec(l);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(l){let i=this.rules.inline.link.exec(l);if(i){let o=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;let x=S2(o.slice(0,-1),"\\");if((o.length-x.length)%2===0)return}else{let x=C7(i[2],"()");if(x===-2)return;if(x>-1){let h=(i[0].indexOf("!")===0?5:4)+i[1].length+x;i[2]=i[2].substring(0,x),i[0]=i[0].substring(0,h).trim(),i[3]=""}}let y=i[2],s="";if(this.options.pedantic){let x=this.rules.other.pedanticHrefTitle.exec(y);x&&(y=x[1],s=x[3])}else s=i[3]?i[3].slice(1,-1):"";return y=y.trim(),this.rules.other.startAngleBracket.test(y)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?y=y.slice(1):y=y.slice(1,-1)),Ml(i,{href:y&&y.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(l,i){let o;if((o=this.rules.inline.reflink.exec(l))||(o=this.rules.inline.nolink.exec(l))){let y=(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=i[y.toLowerCase()];if(!s){let x=o[0].charAt(0);return{type:"text",raw:x,text:x}}return Ml(o,s,o[0],this.lexer,this.rules)}}emStrong(l,i,o=""){let y=this.rules.inline.emStrongLDelim.exec(l);if(!y||y[3]&&o.match(this.rules.other.unicodeAlphaNumeric))return;if(!(y[1]||y[2])||!o||this.rules.inline.punctuation.exec(o)){let s=[...y[0]].length-1,x,h,c=s,r=0,n=y[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(n.lastIndex=0,i=i.slice(-1*l.length+s);(y=n.exec(i))!=null;){if(x=y[1]||y[2]||y[3]||y[4]||y[5]||y[6],!x)continue;if(h=[...x].length,y[3]||y[4]){c+=h;continue}else if((y[5]||y[6])&&s%3&&!((s+h)%3)){r+=h;continue}if(c-=h,c>0)continue;h=Math.min(h,h+c+r);let C=[...y[0]][0].length,g=l.slice(0,s+y.index+C+h);if(Math.min(s,h)%2){let z=g.slice(1,-1);return{type:"em",raw:g,text:z,tokens:this.lexer.inlineTokens(z)}}let p=g.slice(2,-2);return{type:"strong",raw:g,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(l){let i=this.rules.inline.code.exec(l);if(i){let o=i[2].replace(this.rules.other.newLineCharGlobal," "),y=this.rules.other.nonSpaceChar.test(o),s=this.rules.other.startingSpaceChar.test(o)&&this.rules.other.endingSpaceChar.test(o);return y&&s&&(o=o.substring(1,o.length-1)),{type:"codespan",raw:i[0],text:o}}}br(l){let i=this.rules.inline.br.exec(l);if(i)return{type:"br",raw:i[0]}}del(l){let i=this.rules.inline.del.exec(l);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(l){let i=this.rules.inline.autolink.exec(l);if(i){let o,y;return i[2]==="@"?(o=i[1],y="mailto:"+o):(o=i[1],y=o),{type:"link",raw:i[0],text:o,href:y,tokens:[{type:"text",raw:o,text:o}]}}}url(l){let i;if(i=this.rules.inline.url.exec(l)){let o,y;if(i[2]==="@")o=i[0],y="mailto:"+o;else{let s;do s=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(s!==i[0]);o=i[0],i[1]==="www."?y="http://"+i[0]:y=i[0]}return{type:"link",raw:i[0],text:o,href:y,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(l){let i=this.rules.inline.text.exec(l);if(i){let o=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:o}}}},C1=class l{tokens;options;state;tokenizer;inlineQueue;constructor(i){this.tokens=[],this.tokens.links=Object.create(null),this.options=i||o2,this.options.tokenizer=this.options.tokenizer||new J0,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 o={other:D,block:Z0.normal,inline:I2.normal};this.options.pedantic?(o.block=Z0.pedantic,o.inline=I2.pedantic):this.options.gfm&&(o.block=Z0.gfm,this.options.breaks?o.inline=I2.breaks:o.inline=I2.gfm),this.tokenizer.rules=o}static get rules(){return{block:Z0,inline:I2}}static lex(i,o){return new l(o).lex(i)}static lexInline(i,o){return new l(o).inlineTokens(i)}lex(i){i=i.replace(D.carriageReturn,`
41
41
  `),this.blockTokens(i,this.tokens);for(let o=0;o<this.inlineQueue.length;o++){let y=this.inlineQueue[o];this.inlineTokens(y.src,y.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,o=[],y=!1){for(this.options.pedantic&&(i=i.replace(D.tabCharGlobal," ").replace(D.spaceLine,""));i;){let s;if(this.options.extensions?.block?.some((h)=>(s=h.call({lexer:this},i,o))?(i=i.substring(s.raw.length),o.push(s),!0):!1))continue;if(s=this.tokenizer.space(i)){i=i.substring(s.raw.length);let h=o.at(-1);s.raw.length===1&&h!==void 0?h.raw+=`
42
42
  `:o.push(s);continue}if(s=this.tokenizer.code(i)){i=i.substring(s.raw.length);let h=o.at(-1);h?.type==="paragraph"||h?.type==="text"?(h.raw+=(h.raw.endsWith(`
43
43
  `)?"":`
@@ -51,7 +51,7 @@ ${C}`:C;let k=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
51
51
  `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):o.push(s),y=x.length!==i.length,i=i.substring(s.raw.length);continue}if(s=this.tokenizer.text(i)){i=i.substring(s.raw.length);let h=o.at(-1);h?.type==="text"?(h.raw+=(h.raw.endsWith(`
52
52
  `)?"":`
53
53
  `)+s.raw,h.text+=`
54
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):o.push(s);continue}if(i){let h="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw Error(h)}}return this.state.top=!0,o}inline(i,o=[]){return this.inlineQueue.push({src:i,tokens:o}),o}inlineTokens(i,o=[]){let y=i,s=null;if(this.tokens.links){let r=Object.keys(this.tokens.links);if(r.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(y))!=null;)r.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(y=y.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+y.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(y))!=null;)y=y.slice(0,s.index)+"++"+y.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let x;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(y))!=null;)x=s[2]?s[2].length:0,y=y.slice(0,s.index+x)+"["+"a".repeat(s[0].length-x-2)+"]"+y.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);y=this.options.hooks?.emStrongMask?.call({lexer:this},y)??y;let h=!1,c="";for(;i;){h||(c=""),h=!1;let r;if(this.options.extensions?.inline?.some((C)=>(r=C.call({lexer:this},i,o))?(i=i.substring(r.raw.length),o.push(r),!0):!1))continue;if(r=this.tokenizer.escape(i)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.tag(i)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.link(i)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(r.raw.length);let C=o.at(-1);r.type==="text"&&C?.type==="text"?(C.raw+=r.raw,C.text+=r.text):o.push(r);continue}if(r=this.tokenizer.emStrong(i,y,c)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.codespan(i)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.br(i)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.del(i)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.autolink(i)){i=i.substring(r.raw.length),o.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(i))){i=i.substring(r.raw.length),o.push(r);continue}let n=i;if(this.options.extensions?.startInline){let C=1/0,k=i.slice(1),p;this.options.extensions.startInline.forEach((z)=>{p=z.call({lexer:this},k),typeof p=="number"&&p>=0&&(C=Math.min(C,p))}),C<1/0&&C>=0&&(n=i.substring(0,C+1))}if(r=this.tokenizer.inlineText(n)){i=i.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(c=r.raw.slice(-1)),h=!0;let C=o.at(-1);C?.type==="text"?(C.raw+=r.raw,C.text+=r.text):o.push(r);continue}if(i){let C="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw Error(C)}}return o}},H0=class{options;parser;constructor(l){this.options=l||o2}space(l){return""}code({text:l,lang:i,escaped:o}){let y=(i||"").match(D.notSpaceStart)?.[0],s=l.replace(D.endingNewline,"")+`
54
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):o.push(s);continue}if(i){let h="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw Error(h)}}return this.state.top=!0,o}inline(i,o=[]){return this.inlineQueue.push({src:i,tokens:o}),o}inlineTokens(i,o=[]){let y=i,s=null;if(this.tokens.links){let r=Object.keys(this.tokens.links);if(r.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(y))!=null;)r.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(y=y.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+y.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(y))!=null;)y=y.slice(0,s.index)+"++"+y.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let x;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(y))!=null;)x=s[2]?s[2].length:0,y=y.slice(0,s.index+x)+"["+"a".repeat(s[0].length-x-2)+"]"+y.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);y=this.options.hooks?.emStrongMask?.call({lexer:this},y)??y;let h=!1,c="";for(;i;){h||(c=""),h=!1;let r;if(this.options.extensions?.inline?.some((C)=>(r=C.call({lexer:this},i,o))?(i=i.substring(r.raw.length),o.push(r),!0):!1))continue;if(r=this.tokenizer.escape(i)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.tag(i)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.link(i)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(r.raw.length);let C=o.at(-1);r.type==="text"&&C?.type==="text"?(C.raw+=r.raw,C.text+=r.text):o.push(r);continue}if(r=this.tokenizer.emStrong(i,y,c)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.codespan(i)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.br(i)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.del(i)){i=i.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.autolink(i)){i=i.substring(r.raw.length),o.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(i))){i=i.substring(r.raw.length),o.push(r);continue}let n=i;if(this.options.extensions?.startInline){let C=1/0,g=i.slice(1),p;this.options.extensions.startInline.forEach((z)=>{p=z.call({lexer:this},g),typeof p=="number"&&p>=0&&(C=Math.min(C,p))}),C<1/0&&C>=0&&(n=i.substring(0,C+1))}if(r=this.tokenizer.inlineText(n)){i=i.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(c=r.raw.slice(-1)),h=!0;let C=o.at(-1);C?.type==="text"?(C.raw+=r.raw,C.text+=r.text):o.push(r);continue}if(i){let C="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw Error(C)}}return o}},$0=class{options;parser;constructor(l){this.options=l||o2}space(l){return""}code({text:l,lang:i,escaped:o}){let y=(i||"").match(D.notSpaceStart)?.[0],s=l.replace(D.endingNewline,"")+`
55
55
  `;return y?'<pre><code class="language-'+j1(y)+'">'+(o?s:j1(s,!0))+`</code></pre>
56
56
  `:"<pre><code>"+(o?s:j1(s,!0))+`</code></pre>
57
57
  `}blockquote({tokens:l}){return`<blockquote>
@@ -69,11 +69,11 @@ ${this.parser.parse(l)}</blockquote>
69
69
  `}tablerow({text:l}){return`<tr>
70
70
  ${l}</tr>
71
71
  `}tablecell(l){let i=this.parser.parseInline(l.tokens),o=l.header?"th":"td";return(l.align?`<${o} align="${l.align}">`:`<${o}>`)+i+`</${o}>
72
- `}strong({tokens:l}){return`<strong>${this.parser.parseInline(l)}</strong>`}em({tokens:l}){return`<em>${this.parser.parseInline(l)}</em>`}codespan({text:l}){return`<code>${j1(l,!0)}</code>`}br(l){return"<br>"}del({tokens:l}){return`<del>${this.parser.parseInline(l)}</del>`}link({href:l,title:i,tokens:o}){let y=this.parser.parseInline(o),s=Tl(l);if(s===null)return y;l=s;let x='<a href="'+l+'"';return i&&(x+=' title="'+j1(i)+'"'),x+=">"+y+"</a>",x}image({href:l,title:i,text:o,tokens:y}){y&&(o=this.parser.parseInline(y,this.parser.textRenderer));let s=Tl(l);if(s===null)return j1(o);l=s;let x=`<img src="${l}" alt="${o}"`;return i&&(x+=` title="${j1(i)}"`),x+=">",x}text(l){return"tokens"in l&&l.tokens?this.parser.parseInline(l.tokens):("escaped"in l)&&l.escaped?l.text:j1(l.text)}},N5=class{strong({text:l}){return l}em({text:l}){return l}codespan({text:l}){return l}del({text:l}){return l}html({text:l}){return l}text({text:l}){return l}link({text:l}){return""+l}image({text:l}){return""+l}br(){return""}},d1=class l{options;renderer;textRenderer;constructor(i){this.options=i||o2,this.options.renderer=this.options.renderer||new H0,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new N5}static parse(i,o){return new l(o).parse(i)}static parseInline(i,o){return new l(o).parseInline(i)}parse(i,o=!0){let y="";for(let s=0;s<i.length;s++){let x=i[s];if(this.options.extensions?.renderers?.[x.type]){let c=x,r=this.options.extensions.renderers[c.type].call({parser:this},c);if(r!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){y+=r||"";continue}}let h=x;switch(h.type){case"space":{y+=this.renderer.space(h);continue}case"hr":{y+=this.renderer.hr(h);continue}case"heading":{y+=this.renderer.heading(h);continue}case"code":{y+=this.renderer.code(h);continue}case"table":{y+=this.renderer.table(h);continue}case"blockquote":{y+=this.renderer.blockquote(h);continue}case"list":{y+=this.renderer.list(h);continue}case"html":{y+=this.renderer.html(h);continue}case"def":{y+=this.renderer.def(h);continue}case"paragraph":{y+=this.renderer.paragraph(h);continue}case"text":{let c=h,r=this.renderer.text(c);for(;s+1<i.length&&i[s+1].type==="text";)c=i[++s],r+=`
73
- `+this.renderer.text(c);o?y+=this.renderer.paragraph({type:"paragraph",raw:r,text:r,tokens:[{type:"text",raw:r,text:r,escaped:!0}]}):y+=r;continue}default:{let c='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw Error(c)}}}return y}parseInline(i,o=this.renderer){let y="";for(let s=0;s<i.length;s++){let x=i[s];if(this.options.extensions?.renderers?.[x.type]){let c=this.options.extensions.renderers[x.type].call({parser:this},x);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(x.type)){y+=c||"";continue}}let h=x;switch(h.type){case"escape":{y+=o.text(h);break}case"html":{y+=o.html(h);break}case"link":{y+=o.link(h);break}case"image":{y+=o.image(h);break}case"strong":{y+=o.strong(h);break}case"em":{y+=o.em(h);break}case"codespan":{y+=o.codespan(h);break}case"br":{y+=o.br(h);break}case"del":{y+=o.del(h);break}case"text":{y+=o.text(h);break}default:{let c='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw Error(c)}}}return y}},D2=class{options;block;constructor(l){this.options=l||o2}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(l){return l}postprocess(l){return l}processAllTokens(l){return l}emStrongMask(l){return l}provideLexer(){return this.block?C1.lex:C1.lexInline}provideParser(){return this.block?d1.parse:d1.parseInline}},y7=class{defaults=A5();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=d1;Renderer=H0;TextRenderer=N5;Lexer=C1;Tokenizer=J0;Hooks=D2;constructor(...l){this.use(...l)}walkTokens(l,i){let o=[];for(let y of l)switch(o=o.concat(i.call(this,y)),y.type){case"table":{let s=y;for(let x of s.header)o=o.concat(this.walkTokens(x.tokens,i));for(let x of s.rows)for(let h of x)o=o.concat(this.walkTokens(h.tokens,i));break}case"list":{let s=y;o=o.concat(this.walkTokens(s.items,i));break}default:{let s=y;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach((x)=>{let h=s[x].flat(1/0);o=o.concat(this.walkTokens(h,i))}):s.tokens&&(o=o.concat(this.walkTokens(s.tokens,i)))}}return o}use(...l){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return l.forEach((o)=>{let y={...o};if(y.async=this.defaults.async||y.async||!1,o.extensions&&(o.extensions.forEach((s)=>{if(!s.name)throw Error("extension name required");if("renderer"in s){let x=i.renderers[s.name];x?i.renderers[s.name]=function(...h){let c=s.renderer.apply(this,h);return c===!1&&(c=x.apply(this,h)),c}:i.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let x=i[s.level];x?x.unshift(s.tokenizer):i[s.level]=[s.tokenizer],s.start&&(s.level==="block"?i.startBlock?i.startBlock.push(s.start):i.startBlock=[s.start]:s.level==="inline"&&(i.startInline?i.startInline.push(s.start):i.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(i.childTokens[s.name]=s.childTokens)}),y.extensions=i),o.renderer){let s=this.defaults.renderer||new H0(this.defaults);for(let x in o.renderer){if(!(x in s))throw Error(`renderer '${x}' does not exist`);if(["options","parser"].includes(x))continue;let h=x,c=o.renderer[h],r=s[h];s[h]=(...n)=>{let C=c.apply(s,n);return C===!1&&(C=r.apply(s,n)),C||""}}y.renderer=s}if(o.tokenizer){let s=this.defaults.tokenizer||new J0(this.defaults);for(let x in o.tokenizer){if(!(x in s))throw Error(`tokenizer '${x}' does not exist`);if(["options","rules","lexer"].includes(x))continue;let h=x,c=o.tokenizer[h],r=s[h];s[h]=(...n)=>{let C=c.apply(s,n);return C===!1&&(C=r.apply(s,n)),C}}y.tokenizer=s}if(o.hooks){let s=this.defaults.hooks||new D2;for(let x in o.hooks){if(!(x in s))throw Error(`hook '${x}' does not exist`);if(["options","block"].includes(x))continue;let h=x,c=o.hooks[h],r=s[h];D2.passThroughHooks.has(x)?s[h]=(n)=>{if(this.defaults.async&&D2.passThroughHooksRespectAsync.has(x))return(async()=>{let k=await c.call(s,n);return r.call(s,k)})();let C=c.call(s,n);return r.call(s,C)}:s[h]=(...n)=>{if(this.defaults.async)return(async()=>{let k=await c.apply(s,n);return k===!1&&(k=await r.apply(s,n)),k})();let C=c.apply(s,n);return C===!1&&(C=r.apply(s,n)),C}}y.hooks=s}if(o.walkTokens){let s=this.defaults.walkTokens,x=o.walkTokens;y.walkTokens=function(h){let c=[];return c.push(x.call(this,h)),s&&(c=c.concat(s.call(this,h))),c}}this.defaults={...this.defaults,...y}}),this}setOptions(l){return this.defaults={...this.defaults,...l},this}lexer(l,i){return C1.lex(l,i??this.defaults)}parser(l,i){return d1.parse(l,i??this.defaults)}parseMarkdown(l){return(i,o)=>{let y={...o},s={...this.defaults,...y},x=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&y.async===!1)return x(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 i>"u"||i===null)return x(Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return x(Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=l),s.async)return(async()=>{let h=s.hooks?await s.hooks.preprocess(i):i,c=await(s.hooks?await s.hooks.provideLexer():l?C1.lex:C1.lexInline)(h,s),r=s.hooks?await s.hooks.processAllTokens(c):c;s.walkTokens&&await Promise.all(this.walkTokens(r,s.walkTokens));let n=await(s.hooks?await s.hooks.provideParser():l?d1.parse:d1.parseInline)(r,s);return s.hooks?await s.hooks.postprocess(n):n})().catch(x);try{s.hooks&&(i=s.hooks.preprocess(i));let h=(s.hooks?s.hooks.provideLexer():l?C1.lex:C1.lexInline)(i,s);s.hooks&&(h=s.hooks.processAllTokens(h)),s.walkTokens&&this.walkTokens(h,s.walkTokens);let c=(s.hooks?s.hooks.provideParser():l?d1.parse:d1.parseInline)(h,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(h){return x(h)}}}onError(l,i){return(o)=>{if(o.message+=`
74
- Please report this to https://github.com/markedjs/marked.`,l){let y="<p>An error occurred:</p><pre>"+j1(o.message+"",!0)+"</pre>";return i?Promise.resolve(y):y}if(i)return Promise.reject(o);throw o}}},i2=new y7;function O(l,i){return i2.parse(l,i)}O.options=O.setOptions=function(l){return i2.setOptions(l),O.defaults=i2.defaults,Ll(O.defaults),O};O.getDefaults=A5;O.defaults=o2;O.use=function(...l){return i2.use(...l),O.defaults=i2.defaults,Ll(O.defaults),O};O.walkTokens=function(l,i){return i2.walkTokens(l,i)};O.parseInline=i2.parseInline;O.Parser=d1;O.parser=d1.parse;O.Renderer=H0;O.TextRenderer=N5;O.Lexer=C1;O.lexer=C1.lex;O.Tokenizer=J0;O.Hooks=D2;O.parse=O;var{options:Hs,setOptions:$s,use:Ys,walkTokens:Is,parseInline:Ss}=O;var Ds=d1.parse,Ts=C1.lex;function ci(l,i){if(i==null)i="";else if(typeof i!=="string")i=String(i);return i.replace(/\{\{([^}]+)\}\}/g,(o,y)=>{let s=$[`${l}${y.startsWith("[")?y:"."+y}`];return s===void 0?o:ci(l,String(s))})}class I0 extends a{static preferredTagName="tosi-md";static initAttributes={src:"",elements:!1};context={};value="";content=null;options={};connectedCallback(){if(super.connectedCallback(),this.src!=="")(async()=>{let l=await fetch(this.src);this.value=await l.text()})();else if(this.value==="")if(this.elements)this.value=this.innerHTML;else this.value=this.textContent!=null?this.textContent:""}didRender=()=>{};render(){super.render(),$[this.instanceId]=typeof this.context==="string"?JSON.parse(this.context):this.context;let l=ci(this.instanceId,this.value);if(this.elements){let i=l.split(`
72
+ `}strong({tokens:l}){return`<strong>${this.parser.parseInline(l)}</strong>`}em({tokens:l}){return`<em>${this.parser.parseInline(l)}</em>`}codespan({text:l}){return`<code>${j1(l,!0)}</code>`}br(l){return"<br>"}del({tokens:l}){return`<del>${this.parser.parseInline(l)}</del>`}link({href:l,title:i,tokens:o}){let y=this.parser.parseInline(o),s=el(l);if(s===null)return y;l=s;let x='<a href="'+l+'"';return i&&(x+=' title="'+j1(i)+'"'),x+=">"+y+"</a>",x}image({href:l,title:i,text:o,tokens:y}){y&&(o=this.parser.parseInline(y,this.parser.textRenderer));let s=el(l);if(s===null)return j1(o);l=s;let x=`<img src="${l}" alt="${o}"`;return i&&(x+=` title="${j1(i)}"`),x+=">",x}text(l){return"tokens"in l&&l.tokens?this.parser.parseInline(l.tokens):("escaped"in l)&&l.escaped?l.text:j1(l.text)}},N5=class{strong({text:l}){return l}em({text:l}){return l}codespan({text:l}){return l}del({text:l}){return l}html({text:l}){return l}text({text:l}){return l}link({text:l}){return""+l}image({text:l}){return""+l}br(){return""}},d1=class l{options;renderer;textRenderer;constructor(i){this.options=i||o2,this.options.renderer=this.options.renderer||new $0,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new N5}static parse(i,o){return new l(o).parse(i)}static parseInline(i,o){return new l(o).parseInline(i)}parse(i,o=!0){let y="";for(let s=0;s<i.length;s++){let x=i[s];if(this.options.extensions?.renderers?.[x.type]){let c=x,r=this.options.extensions.renderers[c.type].call({parser:this},c);if(r!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){y+=r||"";continue}}let h=x;switch(h.type){case"space":{y+=this.renderer.space(h);continue}case"hr":{y+=this.renderer.hr(h);continue}case"heading":{y+=this.renderer.heading(h);continue}case"code":{y+=this.renderer.code(h);continue}case"table":{y+=this.renderer.table(h);continue}case"blockquote":{y+=this.renderer.blockquote(h);continue}case"list":{y+=this.renderer.list(h);continue}case"html":{y+=this.renderer.html(h);continue}case"def":{y+=this.renderer.def(h);continue}case"paragraph":{y+=this.renderer.paragraph(h);continue}case"text":{let c=h,r=this.renderer.text(c);for(;s+1<i.length&&i[s+1].type==="text";)c=i[++s],r+=`
73
+ `+this.renderer.text(c);o?y+=this.renderer.paragraph({type:"paragraph",raw:r,text:r,tokens:[{type:"text",raw:r,text:r,escaped:!0}]}):y+=r;continue}default:{let c='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw Error(c)}}}return y}parseInline(i,o=this.renderer){let y="";for(let s=0;s<i.length;s++){let x=i[s];if(this.options.extensions?.renderers?.[x.type]){let c=this.options.extensions.renderers[x.type].call({parser:this},x);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(x.type)){y+=c||"";continue}}let h=x;switch(h.type){case"escape":{y+=o.text(h);break}case"html":{y+=o.html(h);break}case"link":{y+=o.link(h);break}case"image":{y+=o.image(h);break}case"strong":{y+=o.strong(h);break}case"em":{y+=o.em(h);break}case"codespan":{y+=o.codespan(h);break}case"br":{y+=o.br(h);break}case"del":{y+=o.del(h);break}case"text":{y+=o.text(h);break}default:{let c='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw Error(c)}}}return y}},D2=class{options;block;constructor(l){this.options=l||o2}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(l){return l}postprocess(l){return l}processAllTokens(l){return l}emStrongMask(l){return l}provideLexer(){return this.block?C1.lex:C1.lexInline}provideParser(){return this.block?d1.parse:d1.parseInline}},g7=class{defaults=A5();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=d1;Renderer=$0;TextRenderer=N5;Lexer=C1;Tokenizer=J0;Hooks=D2;constructor(...l){this.use(...l)}walkTokens(l,i){let o=[];for(let y of l)switch(o=o.concat(i.call(this,y)),y.type){case"table":{let s=y;for(let x of s.header)o=o.concat(this.walkTokens(x.tokens,i));for(let x of s.rows)for(let h of x)o=o.concat(this.walkTokens(h.tokens,i));break}case"list":{let s=y;o=o.concat(this.walkTokens(s.items,i));break}default:{let s=y;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach((x)=>{let h=s[x].flat(1/0);o=o.concat(this.walkTokens(h,i))}):s.tokens&&(o=o.concat(this.walkTokens(s.tokens,i)))}}return o}use(...l){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return l.forEach((o)=>{let y={...o};if(y.async=this.defaults.async||y.async||!1,o.extensions&&(o.extensions.forEach((s)=>{if(!s.name)throw Error("extension name required");if("renderer"in s){let x=i.renderers[s.name];x?i.renderers[s.name]=function(...h){let c=s.renderer.apply(this,h);return c===!1&&(c=x.apply(this,h)),c}:i.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let x=i[s.level];x?x.unshift(s.tokenizer):i[s.level]=[s.tokenizer],s.start&&(s.level==="block"?i.startBlock?i.startBlock.push(s.start):i.startBlock=[s.start]:s.level==="inline"&&(i.startInline?i.startInline.push(s.start):i.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(i.childTokens[s.name]=s.childTokens)}),y.extensions=i),o.renderer){let s=this.defaults.renderer||new $0(this.defaults);for(let x in o.renderer){if(!(x in s))throw Error(`renderer '${x}' does not exist`);if(["options","parser"].includes(x))continue;let h=x,c=o.renderer[h],r=s[h];s[h]=(...n)=>{let C=c.apply(s,n);return C===!1&&(C=r.apply(s,n)),C||""}}y.renderer=s}if(o.tokenizer){let s=this.defaults.tokenizer||new J0(this.defaults);for(let x in o.tokenizer){if(!(x in s))throw Error(`tokenizer '${x}' does not exist`);if(["options","rules","lexer"].includes(x))continue;let h=x,c=o.tokenizer[h],r=s[h];s[h]=(...n)=>{let C=c.apply(s,n);return C===!1&&(C=r.apply(s,n)),C}}y.tokenizer=s}if(o.hooks){let s=this.defaults.hooks||new D2;for(let x in o.hooks){if(!(x in s))throw Error(`hook '${x}' does not exist`);if(["options","block"].includes(x))continue;let h=x,c=o.hooks[h],r=s[h];D2.passThroughHooks.has(x)?s[h]=(n)=>{if(this.defaults.async&&D2.passThroughHooksRespectAsync.has(x))return(async()=>{let g=await c.call(s,n);return r.call(s,g)})();let C=c.call(s,n);return r.call(s,C)}:s[h]=(...n)=>{if(this.defaults.async)return(async()=>{let g=await c.apply(s,n);return g===!1&&(g=await r.apply(s,n)),g})();let C=c.apply(s,n);return C===!1&&(C=r.apply(s,n)),C}}y.hooks=s}if(o.walkTokens){let s=this.defaults.walkTokens,x=o.walkTokens;y.walkTokens=function(h){let c=[];return c.push(x.call(this,h)),s&&(c=c.concat(s.call(this,h))),c}}this.defaults={...this.defaults,...y}}),this}setOptions(l){return this.defaults={...this.defaults,...l},this}lexer(l,i){return C1.lex(l,i??this.defaults)}parser(l,i){return d1.parse(l,i??this.defaults)}parseMarkdown(l){return(i,o)=>{let y={...o},s={...this.defaults,...y},x=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&y.async===!1)return x(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 i>"u"||i===null)return x(Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return x(Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=l),s.async)return(async()=>{let h=s.hooks?await s.hooks.preprocess(i):i,c=await(s.hooks?await s.hooks.provideLexer():l?C1.lex:C1.lexInline)(h,s),r=s.hooks?await s.hooks.processAllTokens(c):c;s.walkTokens&&await Promise.all(this.walkTokens(r,s.walkTokens));let n=await(s.hooks?await s.hooks.provideParser():l?d1.parse:d1.parseInline)(r,s);return s.hooks?await s.hooks.postprocess(n):n})().catch(x);try{s.hooks&&(i=s.hooks.preprocess(i));let h=(s.hooks?s.hooks.provideLexer():l?C1.lex:C1.lexInline)(i,s);s.hooks&&(h=s.hooks.processAllTokens(h)),s.walkTokens&&this.walkTokens(h,s.walkTokens);let c=(s.hooks?s.hooks.provideParser():l?d1.parse:d1.parseInline)(h,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(h){return x(h)}}}onError(l,i){return(o)=>{if(o.message+=`
74
+ Please report this to https://github.com/markedjs/marked.`,l){let y="<p>An error occurred:</p><pre>"+j1(o.message+"",!0)+"</pre>";return i?Promise.resolve(y):y}if(i)return Promise.reject(o);throw o}}},i2=new g7;function O(l,i){return i2.parse(l,i)}O.options=O.setOptions=function(l){return i2.setOptions(l),O.defaults=i2.defaults,ml(O.defaults),O};O.getDefaults=A5;O.defaults=o2;O.use=function(...l){return i2.use(...l),O.defaults=i2.defaults,ml(O.defaults),O};O.walkTokens=function(l,i){return i2.walkTokens(l,i)};O.parseInline=i2.parseInline;O.Parser=d1;O.parser=d1.parse;O.Renderer=$0;O.TextRenderer=N5;O.Lexer=C1;O.lexer=C1.lex;O.Tokenizer=J0;O.Hooks=D2;O.parse=O;var{options:Ls,setOptions:Ms,use:ms,walkTokens:Es,parseInline:lx}=O;var ix=d1.parse,ox=C1.lex;function ni(l,i){if(i==null)i="";else if(typeof i!=="string")i=String(i);return i.replace(/\{\{([^}]+)\}\}/g,(o,y)=>{let s=H[`${l}${y.startsWith("[")?y:"."+y}`];return s===void 0?o:ni(l,String(s))})}class I0 extends a{static preferredTagName="tosi-md";static initAttributes={src:"",elements:!1};context={};value="";content=null;options={};connectedCallback(){if(super.connectedCallback(),this.src!=="")(async()=>{let l=await fetch(this.src);this.value=await l.text()})();else if(this.value==="")if(this.elements)this.value=this.innerHTML;else this.value=this.textContent!=null?this.textContent:""}didRender=()=>{};render(){super.render(),H[this.instanceId]=typeof this.context==="string"?JSON.parse(this.context):this.context;let l=ni(this.instanceId,this.value);if(this.elements){let i=l.split(`
75
75
  `).reduce((o,y)=>{if(y.startsWith("<")||o.length===0)o.push(y);else{let s=o[o.length-1];if(!s.startsWith("<")||!s.endsWith(">"))o[o.length-1]+=`
76
- `+y;else o.push(y)}return o},[]);this.innerHTML=i.map((o)=>o.startsWith("<")&&o.endsWith(">")?o:O(o,this.options)).join("")}else this.innerHTML=O(l,this.options);this.didRender()}}var s7=I0,f2=I0.elementCreator(),x7=f2,h7=f2;var{div:y2,slot:ri,span:c7,button:r7}=w;class S0 extends a{static preferredTagName="tosi-tabs";static initAttributes={localized:!1};value=0;makeTab(l,i,o){let y=i.getAttribute("name"),s=i.querySelector('template[role="tab"]')?.content.cloneNode(!0)||(this.localized?f1(y):c7(y)),x=y2(s,{part:"tab",tabindex:0,role:"tab",ariaControls:o},i.hasAttribute("data-close")?r7({title:"close",class:"close"},t.x()):{}),h=i.dataset.tooltip;if(h)x.dataset.tooltip=h;return x}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:`${d.spacing50} ${d.spacing}`,cursor:"default",display:"flex",alignItems:"baseline"},':host .tabs > [aria-selected="true"]':{"--text-color":d.tosiTabsSelectedColor,color:d.textColor},":host .elastic":{flex:"1"},":host .border":{background:d.tosiTabsBarColor},":host .border > .selected":{content:" ",width:0,height:d.tosiTabsBarHeight,background:d.tosiTabsSelectedColor,transition:"ease-out 0.2s"},":host button.close":{border:0,background:"transparent",textAlign:"center",marginLeft:d.spacing50,padding:0},":host button.close > svg":{height:"12px"}};onCloseTab=null;content=[y2({role:"tabpanel",part:"tabpanel"},y2({part:"tabrow"},y2({class:"tabs",part:"tabs"}),y2({class:"elastic"}),ri({name:"after-tabs"})),y2({class:"border"},y2({class:"selected",part:"selected"}))),ri()];addTabBody(l,i=!1){if(!l.hasAttribute("name"))throw console.error("element has no name attribute",l),Error("element has no name attribute");if(this.append(l),this.setupTabs(),i)this.value=this.bodies.length-1;this.queueRender()}removeTabBody(l){l.remove(),this.setupTabs(),this.queueRender()}keyTab=(l)=>{let{tabs:i}=this.parts,o=[...i.children].indexOf(l.target);switch(l.key){case"ArrowLeft":this.value=(o+Number(i.children.length)-1)%i.children.length,i.children[this.value].focus(),l.preventDefault();break;case"ArrowRight":this.value=(o+1)%i.children.length,i.children[this.value].focus(),l.preventDefault();break;case" ":this.pickTab(l),l.preventDefault();break;default:}};get bodies(){return[...this.children].filter((l)=>l.hasAttribute("name"))}pickTab=(l)=>{let{tabs:i}=this.parts,o=l.target,y=o.closest("button.close")!==null,s=o.closest(".tabs > div"),x=[...i.children].indexOf(s);if(y){let h=this.bodies[x];if(!this.onCloseTab||this.onCloseTab(h)!==!1)this.removeTabBody(this.bodies[x])}else if(x>-1)this.value=x};setupTabs=()=>{let{tabs:l}=this.parts,i=[...this.children].filter((o)=>!o.hasAttribute("slot")&&o.hasAttribute("name"));if(l.textContent="",this.value>=i.length)this.value=i.length-1;for(let o in i){let y=i[o],s=`${this.instanceId}-${o}`;y.id=s;let x=this.makeTab(this,y,s);l.append(x)}};connectedCallback(){super.connectedCallback();let{tabs:l}=this.parts;l.addEventListener("click",this.pickTab),l.addEventListener("keydown",this.keyTab),this.setupTabs(),z1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),z1.allInstances.delete(this)}localeChanged=()=>{this.queueRender()};onResize(){this.queueRender()}render(){let{tabs:l,selected:i}=this.parts,o=this.bodies;for(let y=0;y<o.length;y++){let s=o[y],x=l.children[y];if(this.value===Number(y))x.setAttribute("aria-selected","true"),i.style.marginLeft=`${x.offsetLeft-l.offsetLeft}px`,i.style.width=`${x.offsetWidth}px`,s.toggleAttribute("hidden",!1);else x.toggleAttribute("aria-selected",!1),s.toggleAttribute("hidden",!0)}}}var n7=S0,u2=S0.elementCreator(),C7=u2,d7=u2;var L2=(async()=>{}).constructor;function H1(l,i){let o=l;for(let y of i)o=o.replace(new RegExp(`import \\{([^}]*)\\} from '${y}'`,"g"),(s,x)=>{return`const { ${x.replace(/\s+/g," ").trim()} } = ${y.replace(/-/g,"")}`});return o}async function ni(l,i,o){let y=H1(l,Object.keys(i)),s=o(y,{transforms:["typescript"]}).code,x=Object.keys(i).map((r)=>r.replace(/-/g,"")),h=Object.values(i);await new L2(...x,s)(...h)}var g7=(l,i)=>{if(i.transforms.includes("typescript"))throw Error('TypeScript examples require the "sucrase" package. Install it with: npm install sucrase');return{code:l}},k7="https://cdn.jsdelivr.net/npm/sucrase@3.35.0/+esm";async function D0(){try{let{transform:l}=await import("sucrase");return l}catch{}try{let{transform:l}=await import(k7);return l}catch{return console.warn("sucrase not available — TypeScript examples will not work. "+"Install with: npm install sucrase"),g7}}var T0="live-example-payload";function Ci(l,i,o){return o!==""?`${l}-${o}`:`${l}-${i}`}function K5(l,i){try{localStorage.setItem(l,JSON.stringify(i))}catch(o){console.warn("live-example: failed to write to localStorage",o)}}function p7(l){if(l===null)return null;try{return JSON.parse(l)}catch{return null}}function di(l,i,o,y,s){let x=location.href.split("?")[0]+`?${l}=${i}`;K5(o,{remoteKey:y,sentAt:Date.now(),...s}),window.open(x)}var w7=typeof BroadcastChannel<"u";class M2{storageKey;remoteKey;lastUpdate=0;interval;channel;listening=!1;onReceive;constructor(l,i,o){this.storageKey=l,this.remoteKey=i,this.onReceive=o}handlePayload=(l)=>{if(l.sentAt<=this.lastUpdate)return;if(l.remoteKey!==this.remoteKey)return;this.lastUpdate=l.sentAt,this.onReceive(l)};handleMessage=(l)=>{let i=l.data;if(i)this.handlePayload(i)};handlePoll=()=>{let l=null;try{l=localStorage.getItem(this.storageKey)}catch{return}let i=p7(l);if(i)this.handlePayload(i)};startListening(){if(this.listening)return;if(this.listening=!0,w7)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(l){let i={remoteKey:this.remoteKey,sentAt:Date.now(),...l};if(K5(this.storageKey,i),this.channel)this.channel.postMessage(i)}sendClose(){let l={remoteKey:this.remoteKey,sentAt:Date.now(),css:"",html:"",js:"",close:!0};if(K5(this.storageKey,l),this.channel)this.channel.postMessage(l)}}var{div:gi}=w;function t7(l,i){let o=l.customElements;if(!o)return;let y=(x)=>{if(!x||o.get(x))return;let h=customElements.get(x);if(h)try{o.define(x,h)}catch{}};for(let x of Object.values(i))if(x&&typeof x==="object"){for(let h of Object.values(x))if(typeof h==="function"&&"tagName"in h)y(h.tagName)}let s=l.document;if(s){let x=s.querySelectorAll("*");for(let h of x){let c=h.tagName.toLowerCase();if(c.includes("-"))y(c)}}}async function e0(l){let{html:i,css:o,js:y,context:s,transform:x,exampleElement:h,styleElement:c,widgetsElement:r,onError:n}=l,C=gi({class:"preview"});C.innerHTML=i,c.innerText=o;let k=h.querySelector(".preview");if(k)k.replaceWith(C);else h.insertBefore(C,r);let p={preview:C,...s};try{let z=H1(y,Object.keys(s)),B=x(z,{transforms:["typescript"]}).code,j=Object.keys(p).map((q)=>q.replace(/-/g,"")),V=Object.values(p);await new L2(...j,B)(...V)}catch(z){if(console.error(z),C.append(gi({class:"preview-error"},String(z.message||z))),n)n(z);else window.alert(`Error: ${z}, the console may have more information…`)}return C}async function u0(l){let{html:i,css:o,js:y,context:s,transform:x,exampleElement:h,widgetsElement:c,onError:r}=l,n=h.querySelector("iframe.preview-iframe");if(!n){n=document.createElement("iframe"),n.className="preview-iframe",n.style.cssText="width: 100%; height: 100%; border: none;";let B=h.querySelector(".preview");if(B)B.replaceWith(n);else h.insertBefore(n,c)}let C=n.contentDocument;if(!C)return console.error("Could not access iframe document"),null;let k=n.contentWindow;if(s.tosijs)k.tosijs=s.tosijs;if(s["tosijs-ui"])k.tosijsui=s["tosijs-ui"];C.open(),C.write(`<!DOCTYPE html>
76
+ `+y;else o.push(y)}return o},[]);this.innerHTML=i.map((o)=>o.startsWith("<")&&o.endsWith(">")?o:O(o,this.options)).join("")}else this.innerHTML=O(l,this.options);this.didRender()}}var k7=I0,f2=I0.elementCreator(),p7=f2,w7=f2;var{div:y2,slot:Ci,span:t7,button:a7}=w;class S0 extends a{static preferredTagName="tosi-tabs";static initAttributes={localized:!1};value=0;makeTab(l,i,o){let y=i.getAttribute("name"),s=i.querySelector('template[role="tab"]')?.content.cloneNode(!0)||(this.localized?f1(y):t7(y)),x=y2(s,{part:"tab",tabindex:0,role:"tab",ariaControls:o},i.hasAttribute("data-close")?a7({title:"close",class:"close"},t.x()):{}),h=i.dataset.tooltip;if(h)x.dataset.tooltip=h;return x}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:`${d.spacing50} ${d.spacing}`,cursor:"default",display:"flex",alignItems:"baseline"},':host .tabs > [aria-selected="true"]':{"--text-color":d.tosiTabsSelectedColor,color:d.textColor},":host .elastic":{flex:"1"},":host .border":{background:d.tosiTabsBarColor},":host .border > .selected":{content:" ",width:0,height:d.tosiTabsBarHeight,background:d.tosiTabsSelectedColor,transition:"ease-out 0.2s"},":host button.close":{border:0,background:"transparent",textAlign:"center",marginLeft:d.spacing50,padding:0},":host button.close > svg":{height:"12px"}};onCloseTab=null;content=[y2({role:"tabpanel",part:"tabpanel"},y2({part:"tabrow"},y2({class:"tabs",part:"tabs"}),y2({class:"elastic"}),Ci({name:"after-tabs"})),y2({class:"border"},y2({class:"selected",part:"selected"}))),Ci()];addTabBody(l,i=!1){if(!l.hasAttribute("name"))throw console.error("element has no name attribute",l),Error("element has no name attribute");if(this.append(l),this.setupTabs(),i)this.value=this.bodies.length-1;this.queueRender()}removeTabBody(l){l.remove(),this.setupTabs(),this.queueRender()}keyTab=(l)=>{let{tabs:i}=this.parts,o=[...i.children].indexOf(l.target);switch(l.key){case"ArrowLeft":this.value=(o+Number(i.children.length)-1)%i.children.length,i.children[this.value].focus(),l.preventDefault();break;case"ArrowRight":this.value=(o+1)%i.children.length,i.children[this.value].focus(),l.preventDefault();break;case" ":this.pickTab(l),l.preventDefault();break;default:}};get bodies(){return[...this.children].filter((l)=>l.hasAttribute("name"))}pickTab=(l)=>{let{tabs:i}=this.parts,o=l.target,y=o.closest("button.close")!==null,s=o.closest(".tabs > div"),x=[...i.children].indexOf(s);if(y){let h=this.bodies[x];if(!this.onCloseTab||this.onCloseTab(h)!==!1)this.removeTabBody(this.bodies[x])}else if(x>-1)this.value=x};setupTabs=()=>{let{tabs:l}=this.parts,i=[...this.children].filter((o)=>!o.hasAttribute("slot")&&o.hasAttribute("name"));if(l.textContent="",this.value>=i.length)this.value=i.length-1;for(let o in i){let y=i[o],s=`${this.instanceId}-${o}`;y.id=s;let x=this.makeTab(this,y,s);l.append(x)}};connectedCallback(){super.connectedCallback();let{tabs:l}=this.parts;l.addEventListener("click",this.pickTab),l.addEventListener("keydown",this.keyTab),this.setupTabs(),z1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),z1.allInstances.delete(this)}localeChanged=()=>{this.queueRender()};onResize(){this.queueRender()}render(){let{tabs:l,selected:i}=this.parts,o=this.bodies;for(let y=0;y<o.length;y++){let s=o[y],x=l.children[y];if(this.value===Number(y))x.setAttribute("aria-selected","true"),i.style.marginLeft=`${x.offsetLeft-l.offsetLeft}px`,i.style.width=`${x.offsetWidth}px`,s.toggleAttribute("hidden",!1);else x.toggleAttribute("aria-selected",!1),s.toggleAttribute("hidden",!0)}}}var B7=S0,e2=S0.elementCreator(),v7=e2,z7=e2;var L2=(async()=>{}).constructor;function $1(l,i){let o=l;for(let y of i)o=o.replace(new RegExp(`import \\{([^}]*)\\} from '${y}'`,"g"),(s,x)=>{return`const { ${x.replace(/\s+/g," ").trim()} } = ${y.replace(/-/g,"")}`});return o}async function di(l,i,o){let y=$1(l,Object.keys(i)),s=o(y,{transforms:["typescript"]}).code,x=Object.keys(i).map((r)=>r.replace(/-/g,"")),h=Object.values(i);await new L2(...x,s)(...h)}var f7=(l,i)=>{if(i.transforms.includes("typescript"))throw Error('TypeScript examples require the "sucrase" package. Install it with: npm install sucrase');return{code:l}},j7="https://cdn.jsdelivr.net/npm/sucrase@3.35.0/+esm";async function D0(){try{let{transform:l}=await import("sucrase");return l}catch{}try{let{transform:l}=await import(j7);return l}catch{return console.warn("sucrase not available — TypeScript examples will not work. "+"Install with: npm install sucrase"),f7}}var T0="live-example-payload";function gi(l,i,o){return o!==""?`${l}-${o}`:`${l}-${i}`}function K5(l,i){try{localStorage.setItem(l,JSON.stringify(i))}catch(o){console.warn("live-example: failed to write to localStorage",o)}}function A7(l){if(l===null)return null;try{return JSON.parse(l)}catch{return null}}function ki(l,i,o,y,s){let x=location.href.split("?")[0]+`?${l}=${i}`;K5(o,{remoteKey:y,sentAt:Date.now(),...s}),window.open(x)}var q7=typeof BroadcastChannel<"u";class M2{storageKey;remoteKey;lastUpdate=0;interval;channel;listening=!1;onReceive;constructor(l,i,o){this.storageKey=l,this.remoteKey=i,this.onReceive=o}handlePayload=(l)=>{if(l.sentAt<=this.lastUpdate)return;if(l.remoteKey!==this.remoteKey)return;this.lastUpdate=l.sentAt,this.onReceive(l)};handleMessage=(l)=>{let i=l.data;if(i)this.handlePayload(i)};handlePoll=()=>{let l=null;try{l=localStorage.getItem(this.storageKey)}catch{return}let i=A7(l);if(i)this.handlePayload(i)};startListening(){if(this.listening)return;if(this.listening=!0,q7)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(l){let i={remoteKey:this.remoteKey,sentAt:Date.now(),...l};if(K5(this.storageKey,i),this.channel)this.channel.postMessage(i)}sendClose(){let l={remoteKey:this.remoteKey,sentAt:Date.now(),css:"",html:"",js:"",close:!0};if(K5(this.storageKey,l),this.channel)this.channel.postMessage(l)}}var{div:pi}=w;function _7(l,i){let o=l.customElements;if(!o)return;let y=(x)=>{if(!x||o.get(x))return;let h=customElements.get(x);if(h)try{o.define(x,h)}catch{}};for(let x of Object.values(i))if(x&&typeof x==="object"){for(let h of Object.values(x))if(typeof h==="function"&&"tagName"in h)y(h.tagName)}let s=l.document;if(s){let x=s.querySelectorAll("*");for(let h of x){let c=h.tagName.toLowerCase();if(c.includes("-"))y(c)}}}async function u0(l){let{html:i,css:o,js:y,context:s,transform:x,exampleElement:h,styleElement:c,widgetsElement:r,onError:n}=l,C=pi({class:"preview"});C.innerHTML=i,c.innerText=o;let g=h.querySelector(".preview");if(g)g.replaceWith(C);else h.insertBefore(C,r);let p={preview:C,...s};try{let z=$1(y,Object.keys(s)),B=x(z,{transforms:["typescript"]}).code,j=Object.keys(p).map((q)=>q.replace(/-/g,"")),V=Object.values(p);await new L2(...j,B)(...V)}catch(z){if(console.error(z),C.append(pi({class:"preview-error"},String(z.message||z))),n)n(z);else window.alert(`Error: ${z}, the console may have more information…`)}return C}async function e0(l){let{html:i,css:o,js:y,context:s,transform:x,exampleElement:h,widgetsElement:c,onError:r}=l,n=h.querySelector("iframe.preview-iframe");if(!n){n=document.createElement("iframe"),n.className="preview-iframe",n.style.cssText="width: 100%; height: 100%; border: none;";let B=h.querySelector(".preview");if(B)B.replaceWith(n);else h.insertBefore(n,c)}let C=n.contentDocument;if(!C)return console.error("Could not access iframe document"),null;let g=n.contentWindow;if(s.tosijs)g.tosijs=s.tosijs;if(s["tosijs-ui"])g.tosijsui=s["tosijs-ui"];C.open(),C.write(`<!DOCTYPE html>
77
77
  <html>
78
78
  <head>
79
79
  <style>
@@ -85,16 +85,16 @@ Please report this to https://github.com/markedjs/marked.`,l){let y="<p>An error
85
85
  <body>
86
86
  <div class="preview">${i}</div>
87
87
  </body>
88
- </html>`),C.close(),t7(k,s);let p=C.querySelector(".preview");if(!p)return console.error("Could not find preview element in iframe"),null;let z={preview:p,...s};try{let B=H1(y,Object.keys(s)),j=x(B,{transforms:["typescript"]}).code,V=k.eval("(async () => {}).constructor"),P=Object.keys(z).map((N)=>N.replace(/-/g,"")),q=Object.values(z);await new V(...P,j)(...q)}catch(B){console.error(B);let j=C.createElement("div");if(j.className="preview-error",j.textContent=String(B.message||B),p.append(j),r)r(B);else window.alert(`Error: ${B}, the console may have more information…`)}return p}function L0(l,i,o,y){let s=[...l.querySelectorAll(".language-html,.language-js,.language-css,.language-test")].filter((x)=>!x.closest(y)).map((x)=>({block:x.parentElement,language:x.classList[0].split("-").pop(),code:x.innerText}));for(let x=0;x<s.length;x+=1){let h=[s[x]];while(x<s.length-1&&s[x].block.nextElementSibling===s[x+1].block)h.push(s[x+1]),x+=1;let c=o({context:i});h[0].block.parentElement.insertBefore(c,h[0].block),h.forEach((n)=>{switch(n.language){case"js":c.js=n.code;break;case"html":c.html=n.code;break;case"css":c.css=n.code;break;case"test":c.test=n.code;break}n.block.remove()}),c.showDefaultTab()}}var ki={":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.-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"}};class b5 extends Error{constructor(l){super(l);this.name="AssertionError"}}function pi(l,i){if(l===i)return!0;if(typeof l!==typeof i)return!1;if(l===null||i===null)return l===i;if(typeof l!=="object")return!1;let o=l,y=i;if(Array.isArray(o)!==Array.isArray(y))return!1;let s=Object.keys(o),x=Object.keys(y);if(s.length!==x.length)return!1;return s.every((h)=>pi(o[h],y[h]))}var a7=5000,B7={stringify(l){if(typeof l>"u")return"undefined";if(l===null)return"null";if(typeof Element<"u"&&l instanceof Element)return`<${l.tagName.toLowerCase()}>`;if(typeof Node<"u"&&l instanceof Node)return`[${l.nodeName}]`;try{return JSON.stringify(l)}catch{return String(l)}}},{stringify:A1}=B7;function wi(l,i=!1){let o=(s,x)=>{if(!(i?!s:s))throw new b5(i?`not: ${x}`:x)};return{toBe(s){o(l===s,`Expected ${A1(l)} to be ${A1(s)}`)},toEqual(s){o(pi(l,s),`Expected ${A1(l)} to equal ${A1(s)}`)},toBeTruthy(){o(!!l,`Expected ${A1(l)} to be truthy`)},toBeFalsy(){o(!l,`Expected ${A1(l)} to be falsy`)},toBeNull(){o(l===null,`Expected ${A1(l)} to be null`)},toBeUndefined(){o(l===void 0,`Expected ${A1(l)} to be undefined`)},toBeDefined(){o(l!==void 0,`Expected ${A1(l)} to be defined`)},toContain(s){if(typeof l==="string")o(l.includes(s),`Expected "${l}" to contain "${s}"`);else if(Array.isArray(l))o(l.includes(s),`Expected array to contain ${A1(s)}`);else throw new b5("toContain requires string or array")},toHaveLength(s){let x=l.length;o(x===s,`Expected length ${x} to be ${s}`)},toMatch(s){o(s.test(l),`Expected "${l}" to match ${s}`)},toBeGreaterThan(s){o(l>s,`Expected ${l} to be greater than ${s}`)},toBeLessThan(s){o(l<s,`Expected ${l} to be less than ${s}`)},toBeInstanceOf(s){o(l instanceof s,`Expected value to be instance of ${s.name}`)},get not(){return wi(l,!i)}}}function F5(l){return wi(l)}function v7(l){return new Promise((i)=>setTimeout(i,l))}function z7(l,i,o=1000){return new Promise((y,s)=>{let x=Date.now(),h=()=>{let c=l.querySelector(i);if(c){y(c);return}if(Date.now()-x>=o){s(Error(`Timeout waiting for "${i}" after ${o}ms`));return}requestAnimationFrame(h)};h()})}function f7(l,i,o){return Promise.race([l,new Promise((y,s)=>setTimeout(()=>s(Error(`Test "${o}" timed out after ${i}ms`)),i))])}function W5(l,i=a7){let o="",y=[];return{pending:y,expect:F5,test(s,x){let h=o?`${o} > ${s}`:s;try{let c=x();if(c instanceof Promise){let r=f7(c,i,h).then(()=>{l.push({name:h,passed:!0})}).catch((n)=>{l.push({name:h,passed:!1,error:n.message})});y.push(r)}else l.push({name:h,passed:!0})}catch(c){l.push({name:h,passed:!1,error:c.message})}},describe(s,x){let h=o;o=o?`${o} > ${s}`:s,x(),o=h}}}async function M0(l,i,o,y){let s=[],x=W5(s),h={preview:i,...o,expect:x.expect,test:x.test,describe:x.describe,waitMs:v7,waitFor:(c,r)=>z7(i,c,r)};try{let c=H1(l,Object.keys(o)),r=y(c,{transforms:["typescript"]}).code,n=Object.keys(h).map((p)=>p.replace(/-/g,"")),C=Object.values(h);await new L2(...n,r)(...C)}catch(c){s.push({name:"Test execution",passed:!1,error:c.message})}if(x.pending.length>0)await Promise.all(x.pending);return{passed:s.filter((c)=>c.passed).length,failed:s.filter((c)=>!c.passed).length,tests:s}}var{div:j2,xinSlot:j7,style:A7,button:s2,pre:ti,span:ai}=w,Q5="tosijs-ui-tests-enabled",q7=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function _7(){if(typeof localStorage>"u")return!1;let l=localStorage.getItem(Q5);if(l!==null)return l==="true";return q7}var{testManager:r1}=S({testManager:{enabled:_7()}});function m0(){document.body.classList.toggle("tests-enabled",r1.enabled.value),document.body.style.setProperty("--tests-enabled",r1.enabled.value?"1":"0")}if(typeof document<"u")if(document.body)m0();else document.addEventListener("DOMContentLoaded",m0);function G5(){localStorage.setItem(Q5,"true"),r1.enabled.value=!0,m0(),document.querySelectorAll("tosi-example").forEach((l)=>{l.refresh()})}function Z5(){localStorage.setItem(Q5,"false"),r1.enabled.value=!1,m0()}class $1 extends a{static preferredTagName="tosi-example";static lightStyleSpec=ki;static initAttributes={persistToDom:!1,iframe:!1};prefix="lx";storageKey=T0;context={};uuid=crypto.randomUUID();remoteId="";remoteSync;undoInterval;testResults;pendingValues={};pendingShowDefaultTab=!1;beforeUnloadHandler;static insertExamples(l,i={}){L0(l,i,E0,$1.tagName)}get activeTab(){let{editors:l}=this.parts;return[...l.children].find((i)=>i.getAttribute("hidden")===null)}get hydrated(){try{return this.parts.js!==void 0}catch{return!1}}getEditorValue(l){if(!this.hydrated)return this.pendingValues[l]??"";return this.parts[l].value}setEditorValue(l,i){if(!this.hydrated){this.pendingValues[l]=i;return}let o=this.parts[l];o.value=i}flushPendingValues(){for(let[l,i]of Object.entries(this.pendingValues)){let o=this.parts[l];if(o)o.value=i}if(this.pendingValues={},this.pendingShowDefaultTab)this.pendingShowDefaultTab=!1,this.showDefaultTab()}get css(){return this.getEditorValue("css")}set css(l){this.setEditorValue("css",l)}get html(){return this.getEditorValue("html")}set html(l){this.setEditorValue("html",l)}get js(){return this.getEditorValue("js")}set js(l){this.setEditorValue("js",l)}get test(){return this.getEditorValue("test")}set test(l){this.setEditorValue("test",l)}get remoteKey(){return Ci(this.prefix,this.uuid,this.remoteId)}updateUndo=()=>{let{activeTab:l}=this,{undo:i,redo:o}=this.parts;if(l instanceof E1&&l.editor!==void 0){let y=l.editor.session.getUndoManager();i.disabled=!y.hasUndo(),o.disabled=!y.hasRedo()}else i.disabled=!0,o.disabled=!0;this.updateTestResultsVisibility()};updateTestResultsVisibility(){let{testResults:l}=this.parts,i=this.testResults,o=this.activeTab?.getAttribute("name")==="test",y=i&&i.failed>0;l.hidden=!i||i.tests.length===0||!o&&!y}undo=()=>{let{activeTab:l}=this;if(l instanceof E1)l.editor.undo()};redo=()=>{let{activeTab:l}=this;if(l instanceof E1)l.editor.redo()};get isMaximized(){return this.classList.contains("-maximize")}flipLayout=()=>{this.classList.toggle("-vertical")};exampleMenu=()=>{let l=r1.enabled.value;G({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:l?"check":"",caption:"Run tests",action:()=>{if(l)Z5();else G5()}}]})};handleShortcuts=(l)=>{if(l.metaKey||l.ctrlKey){let i=!1;switch(l.key){case"s":case"r":this.refresh(),i=!0;break;case"/":this.flipLayout();break;case"c":if(l.shiftKey)this.copy(),i=!0;break}if(i)l.preventDefault(),l.stopPropagation()}};content=()=>[j2({part:"example"},A7({part:"style"}),j2({part:"testIndicator",title:"test status"}),ti({part:"testResults",hidden:!0}),s2({title:"example menu",part:"exampleWidgets",onClick:this.exampleMenu},t.code())),j2({class:"code-editors",part:"codeEditors",onKeydown:this.handleShortcuts,hidden:!0},u2({part:"editors",onChange:this.updateUndo},p2({name:"js",mode:"javascript",part:"js"}),p2({name:"html",mode:"html",part:"html"}),p2({name:"css",mode:"css",part:"css"}),p2({name:"test",mode:"javascript",part:"test"}),j2({slot:"after-tabs",class:"row"},s2({title:"undo",part:"undo",class:"transparent",onClick:this.undo},t.cornerUpLeft()),s2({title:"redo",part:"redo",class:"transparent",onClick:this.redo},t.cornerUpRight()),s2({title:"flip direction (⌘/ | ^/)",class:"transparent",onClick:this.flipLayout},t.columns({class:"layout-indicator"})),s2({title:"copy as markdown (⌘⇧C | ^⇧C)",class:"transparent",onClick:this.copy},t.copy()),s2({title:"reload (⌘R | ^R)",class:"transparent",onClick:this.refreshRemote},t.refreshCw()),s2({title:"close code",class:"transparent",onClick:this.closeCode},t.x())))),j7({part:"sources",hidden:!0})];connectedCallback(){super.connectedCallback(),this.flushPendingValues();let{sources:l}=this.parts;this.initFromElements([...l.children]),this.remoteSync=new M2(this.storageKey,this.remoteKey,(o)=>{if(o.close){if(this.remoteId!=="")window.close();else this.classList.remove("-maximize"),this.parts.codeEditors.hidden=!0;return}if(this.css=o.css,this.html=o.html,this.js=o.js,o.test)this.test=o.test;this.refresh()}),this.remoteSync.startListening();let i=Math.random()*100;this.undoInterval=setInterval(()=>{if(!document.hidden)this.updateUndo()},250+i),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}copy=()=>{let l=this.js!==""?"```js\n"+this.js.trim()+"\n```\n":"",i=this.html!==""?"```html\n"+this.html.trim()+"\n```\n":"",o=this.css!==""?"```css\n"+this.css.trim()+"\n```\n":"",y=this.test!==""?"```test\n"+this.test.trim()+"\n```\n":"";navigator.clipboard.writeText(l+i+o+y)};toggleMaximize=()=>{this.classList.toggle("-maximize")};showCode=()=>{this.classList.add("-maximize"),this.classList.toggle("-vertical",this.offsetHeight>this.offsetWidth),this.parts.codeEditors.hidden=!1};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:l,html:i,js:o,test:y}=this;di(this.prefix,this.uuid,this.storageKey,this.remoteKey,{css:l,html:i,js:o,test:y}),this.classList.add("-maximize")};refreshRemote=()=>{this.remoteSync?.send({css:this.css,html:this.html,js:this.js,test:this.test})};updateSources=()=>{if(this.persistToDom){let{sources:l}=this.parts;l.innerText="";for(let i of["js","css","html","test"])if(this[i])l.append(ti({class:`language-${i}`,innerHTML:this[i]}))}};refresh=async()=>{if(this.remoteId!=="")return;let l=await D0(),{example:i,style:o,exampleWidgets:y}=this.parts,s,x,h=(c)=>{x=c};if(this.iframe)s=await u0({html:this.html,css:this.css,js:this.js,context:this.context,transform:l,exampleElement:i,widgetsElement:y,onError:h});else s=await e0({html:this.html,css:this.css,js:this.js,context:this.context,transform:l,exampleElement:i,styleElement:o,widgetsElement:y,onError:h});if(this.persistToDom)this.updateSources();if((this.test||x)&&s&&r1.enabled.value){if(await new Promise((c)=>requestAnimationFrame(c)),this.classList.add("-has-tests","-test-running"),this.classList.remove("-test-passed","-test-failed"),this.testResults=this.test?await M0(this.test,s,this.context,l):{passed:0,failed:0,tests:[]},x)this.testResults.failed+=1,this.testResults.tests.unshift({name:"example loads without error",passed:!1,error:String(x)});this.classList.remove("-test-running"),this.displayTestResults()}else this.classList.remove("-has-tests","-test-running","-test-passed","-test-failed")};displayTestResults(){let{testResults:l,testIndicator:i}=this.parts,o=this.testResults;if(!o||o.tests.length===0){l.hidden=!0,this.classList.remove("-test-passed","-test-failed"),i.title="no tests";return}l.innerHTML="";let y=j2({style:{marginBottom:"8px",fontWeight:"bold"}},`${o.passed}/${o.tests.length} tests passed`);l.append(y);for(let s of o.tests){let x=s.passed?"✓":"✗",h=s.passed?"test-pass":"test-fail",c=j2({class:h},ai(x+" "),s.name,s.error?ai({style:{opacity:"0.7"}},` - ${s.error}`):"");l.append(c)}this.classList.toggle("-test-passed",o.failed===0),this.classList.toggle("-test-failed",o.failed>0),i.title=o.failed===0?`${o.passed} tests passed`:`${o.failed}/${o.tests.length} tests failed`,this.updateTestResultsVisibility(),this.dispatchEvent(new CustomEvent("testcomplete",{bubbles:!0,detail:{results:o,element:this}}))}initFromElements(l){for(let i of l){i.hidden=!0;let[o,...y]=i.innerHTML.split(`
88
+ </html>`),C.close(),_7(g,s);let p=C.querySelector(".preview");if(!p)return console.error("Could not find preview element in iframe"),null;let z={preview:p,...s};try{let B=$1(y,Object.keys(s)),j=x(B,{transforms:["typescript"]}).code,V=g.eval("(async () => {}).constructor"),P=Object.keys(z).map((N)=>N.replace(/-/g,"")),q=Object.values(z);await new V(...P,j)(...q)}catch(B){console.error(B);let j=C.createElement("div");if(j.className="preview-error",j.textContent=String(B.message||B),p.append(j),r)r(B);else window.alert(`Error: ${B}, the console may have more information…`)}return p}function L0(l,i,o,y){let s=[...l.querySelectorAll(".language-html,.language-js,.language-css,.language-test")].filter((x)=>!x.closest(y)).map((x)=>({block:x.parentElement,language:x.classList[0].split("-").pop(),code:x.innerText}));for(let x=0;x<s.length;x+=1){let h=[s[x]];while(x<s.length-1&&s[x].block.nextElementSibling===s[x+1].block)h.push(s[x+1]),x+=1;let c=o({context:i});h[0].block.parentElement.insertBefore(c,h[0].block),h.forEach((n)=>{switch(n.language){case"js":c.js=n.code;break;case"html":c.html=n.code;break;case"css":c.css=n.code;break;case"test":c.test=n.code;break}n.block.remove()}),c.showDefaultTab()}}var wi={":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.-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"}};class b5 extends Error{constructor(l){super(l);this.name="AssertionError"}}function ti(l,i){if(l===i)return!0;if(typeof l!==typeof i)return!1;if(l===null||i===null)return l===i;if(typeof l!=="object")return!1;let o=l,y=i;if(Array.isArray(o)!==Array.isArray(y))return!1;let s=Object.keys(o),x=Object.keys(y);if(s.length!==x.length)return!1;return s.every((h)=>ti(o[h],y[h]))}var V7=5000,P7={stringify(l){if(typeof l>"u")return"undefined";if(l===null)return"null";if(typeof Element<"u"&&l instanceof Element)return`<${l.tagName.toLowerCase()}>`;if(typeof Node<"u"&&l instanceof Node)return`[${l.nodeName}]`;try{return JSON.stringify(l)}catch{return String(l)}}},{stringify:A1}=P7;function ai(l,i=!1){let o=(s,x)=>{if(!(i?!s:s))throw new b5(i?`not: ${x}`:x)};return{toBe(s){o(l===s,`Expected ${A1(l)} to be ${A1(s)}`)},toEqual(s){o(ti(l,s),`Expected ${A1(l)} to equal ${A1(s)}`)},toBeTruthy(){o(!!l,`Expected ${A1(l)} to be truthy`)},toBeFalsy(){o(!l,`Expected ${A1(l)} to be falsy`)},toBeNull(){o(l===null,`Expected ${A1(l)} to be null`)},toBeUndefined(){o(l===void 0,`Expected ${A1(l)} to be undefined`)},toBeDefined(){o(l!==void 0,`Expected ${A1(l)} to be defined`)},toContain(s){if(typeof l==="string")o(l.includes(s),`Expected "${l}" to contain "${s}"`);else if(Array.isArray(l))o(l.includes(s),`Expected array to contain ${A1(s)}`);else throw new b5("toContain requires string or array")},toHaveLength(s){let x=l.length;o(x===s,`Expected length ${x} to be ${s}`)},toMatch(s){o(s.test(l),`Expected "${l}" to match ${s}`)},toBeGreaterThan(s){o(l>s,`Expected ${l} to be greater than ${s}`)},toBeLessThan(s){o(l<s,`Expected ${l} to be less than ${s}`)},toBeInstanceOf(s){o(l instanceof s,`Expected value to be instance of ${s.name}`)},get not(){return ai(l,!i)}}}function F5(l){return ai(l)}function O7(l){return new Promise((i)=>setTimeout(i,l))}function U7(l,i,o=1000){return new Promise((y,s)=>{let x=Date.now(),h=()=>{let c=l.querySelector(i);if(c){y(c);return}if(Date.now()-x>=o){s(Error(`Timeout waiting for "${i}" after ${o}ms`));return}requestAnimationFrame(h)};h()})}function X7(l,i,o){return Promise.race([l,new Promise((y,s)=>setTimeout(()=>s(Error(`Test "${o}" timed out after ${i}ms`)),i))])}function W5(l,i=V7){let o="",y=[];return{pending:y,expect:F5,test(s,x){let h=o?`${o} > ${s}`:s;try{let c=x();if(c instanceof Promise){let r=X7(c,i,h).then(()=>{l.push({name:h,passed:!0})}).catch((n)=>{l.push({name:h,passed:!1,error:n.message})});y.push(r)}else l.push({name:h,passed:!0})}catch(c){l.push({name:h,passed:!1,error:c.message})}},describe(s,x){let h=o;o=o?`${o} > ${s}`:s,x(),o=h}}}async function M0(l,i,o,y){let s=[],x=W5(s),h={preview:i,...o,expect:x.expect,test:x.test,describe:x.describe,waitMs:O7,waitFor:(c,r)=>U7(i,c,r)};try{let c=$1(l,Object.keys(o)),r=y(c,{transforms:["typescript"]}).code,n=Object.keys(h).map((p)=>p.replace(/-/g,"")),C=Object.values(h);await new L2(...n,r)(...C)}catch(c){s.push({name:"Test execution",passed:!1,error:c.message})}if(x.pending.length>0)await Promise.all(x.pending);return{passed:s.filter((c)=>c.passed).length,failed:s.filter((c)=>!c.passed).length,tests:s}}var{div:j2,xinSlot:N7,style:K7,button:s2,pre:Bi,span:vi}=w,Q5="tosijs-ui-tests-enabled",b7=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function F7(){if(typeof localStorage>"u")return!1;let l=localStorage.getItem(Q5);if(l!==null)return l==="true";return b7}var{testManager:r1}=S({testManager:{enabled:F7()}});function m0(){document.body.classList.toggle("tests-enabled",r1.enabled.value),document.body.style.setProperty("--tests-enabled",r1.enabled.value?"1":"0")}if(typeof document<"u")if(document.body)m0();else document.addEventListener("DOMContentLoaded",m0);function G5(){localStorage.setItem(Q5,"true"),r1.enabled.value=!0,m0(),document.querySelectorAll("tosi-example").forEach((l)=>{l.refresh()})}function Z5(){localStorage.setItem(Q5,"false"),r1.enabled.value=!1,m0()}class H1 extends a{static preferredTagName="tosi-example";static lightStyleSpec=wi;static initAttributes={persistToDom:!1,iframe:!1};prefix="lx";storageKey=T0;context={};uuid=crypto.randomUUID();remoteId="";remoteSync;undoInterval;testResults;pendingValues={};pendingShowDefaultTab=!1;beforeUnloadHandler;static insertExamples(l,i={}){L0(l,i,E0,H1.tagName)}get activeTab(){let{editors:l}=this.parts;return[...l.children].find((i)=>i.getAttribute("hidden")===null)}get hydrated(){try{return this.parts.js!==void 0}catch{return!1}}getEditorValue(l){if(!this.hydrated)return this.pendingValues[l]??"";return this.parts[l].value}setEditorValue(l,i){if(!this.hydrated){this.pendingValues[l]=i;return}let o=this.parts[l];o.value=i}flushPendingValues(){for(let[l,i]of Object.entries(this.pendingValues)){let o=this.parts[l];if(o)o.value=i}if(this.pendingValues={},this.pendingShowDefaultTab)this.pendingShowDefaultTab=!1,this.showDefaultTab()}get css(){return this.getEditorValue("css")}set css(l){this.setEditorValue("css",l)}get html(){return this.getEditorValue("html")}set html(l){this.setEditorValue("html",l)}get js(){return this.getEditorValue("js")}set js(l){this.setEditorValue("js",l)}get test(){return this.getEditorValue("test")}set test(l){this.setEditorValue("test",l)}get remoteKey(){return gi(this.prefix,this.uuid,this.remoteId)}updateUndo=()=>{let{activeTab:l}=this,{undo:i,redo:o}=this.parts;if(l instanceof E1&&l.editor!==void 0){let y=l.editor.session.getUndoManager();i.disabled=!y.hasUndo(),o.disabled=!y.hasRedo()}else i.disabled=!0,o.disabled=!0;this.updateTestResultsVisibility()};updateTestResultsVisibility(){let{testResults:l}=this.parts,i=this.testResults,o=this.activeTab?.getAttribute("name")==="test",y=i&&i.failed>0;l.hidden=!i||i.tests.length===0||!o&&!y}undo=()=>{let{activeTab:l}=this;if(l instanceof E1)l.editor.undo()};redo=()=>{let{activeTab:l}=this;if(l instanceof E1)l.editor.redo()};get isMaximized(){return this.classList.contains("-maximize")}flipLayout=()=>{this.classList.toggle("-vertical")};exampleMenu=()=>{let l=r1.enabled.value;G({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:l?"check":"",caption:"Run tests",action:()=>{if(l)Z5();else G5()}}]})};handleShortcuts=(l)=>{if(l.metaKey||l.ctrlKey){let i=!1;switch(l.key){case"s":case"r":this.refresh(),i=!0;break;case"/":this.flipLayout();break;case"c":if(l.shiftKey)this.copy(),i=!0;break}if(i)l.preventDefault(),l.stopPropagation()}};content=()=>[j2({part:"example"},K7({part:"style"}),j2({part:"testIndicator",title:"test status"}),Bi({part:"testResults",hidden:!0}),s2({title:"example menu",part:"exampleWidgets",onClick:this.exampleMenu},t.code())),j2({class:"code-editors",part:"codeEditors",onKeydown:this.handleShortcuts,hidden:!0},e2({part:"editors",onChange:this.updateUndo},p2({name:"js",mode:"javascript",part:"js"}),p2({name:"html",mode:"html",part:"html"}),p2({name:"css",mode:"css",part:"css"}),p2({name:"test",mode:"javascript",part:"test"}),j2({slot:"after-tabs",class:"row"},s2({title:"undo",part:"undo",class:"transparent",onClick:this.undo},t.cornerUpLeft()),s2({title:"redo",part:"redo",class:"transparent",onClick:this.redo},t.cornerUpRight()),s2({title:"flip direction (⌘/ | ^/)",class:"transparent",onClick:this.flipLayout},t.columns({class:"layout-indicator"})),s2({title:"copy as markdown (⌘⇧C | ^⇧C)",class:"transparent",onClick:this.copy},t.copy()),s2({title:"reload (⌘R | ^R)",class:"transparent",onClick:this.refreshRemote},t.refreshCw()),s2({title:"close code",class:"transparent",onClick:this.closeCode},t.x())))),N7({part:"sources",hidden:!0})];connectedCallback(){super.connectedCallback(),this.flushPendingValues();let{sources:l}=this.parts;this.initFromElements([...l.children]),this.remoteSync=new M2(this.storageKey,this.remoteKey,(o)=>{if(o.close){if(this.remoteId!=="")window.close();else this.classList.remove("-maximize"),this.parts.codeEditors.hidden=!0;return}if(this.css=o.css,this.html=o.html,this.js=o.js,o.test)this.test=o.test;this.refresh()}),this.remoteSync.startListening();let i=Math.random()*100;this.undoInterval=setInterval(()=>{if(!document.hidden)this.updateUndo()},250+i),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}copy=()=>{let l=this.js!==""?"```js\n"+this.js.trim()+"\n```\n":"",i=this.html!==""?"```html\n"+this.html.trim()+"\n```\n":"",o=this.css!==""?"```css\n"+this.css.trim()+"\n```\n":"",y=this.test!==""?"```test\n"+this.test.trim()+"\n```\n":"";navigator.clipboard.writeText(l+i+o+y)};toggleMaximize=()=>{this.classList.toggle("-maximize")};showCode=()=>{this.classList.add("-maximize"),this.classList.toggle("-vertical",this.offsetHeight>this.offsetWidth),this.parts.codeEditors.hidden=!1};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:l,html:i,js:o,test:y}=this;ki(this.prefix,this.uuid,this.storageKey,this.remoteKey,{css:l,html:i,js:o,test:y}),this.classList.add("-maximize")};refreshRemote=()=>{this.remoteSync?.send({css:this.css,html:this.html,js:this.js,test:this.test})};updateSources=()=>{if(this.persistToDom){let{sources:l}=this.parts;l.innerText="";for(let i of["js","css","html","test"])if(this[i])l.append(Bi({class:`language-${i}`,innerHTML:this[i]}))}};refresh=async()=>{if(this.remoteId!=="")return;let l=await D0(),{example:i,style:o,exampleWidgets:y}=this.parts,s,x,h=(c)=>{x=c};if(this.iframe)s=await e0({html:this.html,css:this.css,js:this.js,context:this.context,transform:l,exampleElement:i,widgetsElement:y,onError:h});else s=await u0({html:this.html,css:this.css,js:this.js,context:this.context,transform:l,exampleElement:i,styleElement:o,widgetsElement:y,onError:h});if(this.persistToDom)this.updateSources();if((this.test||x)&&s&&r1.enabled.value){if(await new Promise((c)=>requestAnimationFrame(c)),this.classList.add("-has-tests","-test-running"),this.classList.remove("-test-passed","-test-failed"),this.testResults=this.test?await M0(this.test,s,this.context,l):{passed:0,failed:0,tests:[]},x)this.testResults.failed+=1,this.testResults.tests.unshift({name:"example loads without error",passed:!1,error:String(x)});this.classList.remove("-test-running"),this.displayTestResults()}else this.classList.remove("-has-tests","-test-running","-test-passed","-test-failed")};displayTestResults(){let{testResults:l,testIndicator:i}=this.parts,o=this.testResults;if(!o||o.tests.length===0){l.hidden=!0,this.classList.remove("-test-passed","-test-failed"),i.title="no tests";return}l.innerHTML="";let y=j2({style:{marginBottom:"8px",fontWeight:"bold"}},`${o.passed}/${o.tests.length} tests passed`);l.append(y);for(let s of o.tests){let x=s.passed?"✓":"✗",h=s.passed?"test-pass":"test-fail",c=j2({class:h},vi(x+" "),s.name,s.error?vi({style:{opacity:"0.7"}},` - ${s.error}`):"");l.append(c)}this.classList.toggle("-test-passed",o.failed===0),this.classList.toggle("-test-failed",o.failed>0),i.title=o.failed===0?`${o.passed} tests passed`:`${o.failed}/${o.tests.length} tests failed`,this.updateTestResultsVisibility(),this.dispatchEvent(new CustomEvent("testcomplete",{bubbles:!0,detail:{results:o,element:this}}))}initFromElements(l){for(let i of l){i.hidden=!0;let[o,...y]=i.innerHTML.split(`
89
89
  `);if(["js","html","css","test"].includes(o)){let s=y.filter((h)=>h.trim()!=="").map((h)=>h.match(/^\s*/)[0].length).sort()[0],x=(s>0?y.map((h)=>h.substring(s)):y).join(`
90
- `);this.setEditorValue(o,x)}else{let s=["js","html","css","test"].find((x)=>i.matches(`.language-${x}`));if(s)this.setEditorValue(s,s==="html"?i.innerHTML:i.innerText)}}}showDefaultTab(){if(!this.hydrated){this.pendingShowDefaultTab=!0;return}let{editors:l}=this.parts;if(this.js!=="")l.value=0;else if(this.html!=="")l.value=1;else if(this.css!=="")l.value=2;else if(this.test!=="")l.value=3}render(){if(super.render(),this.remoteId!==""){let l=localStorage.getItem(this.storageKey);if(l!==null){let i=JSON.parse(l);if(this.remoteKey!==i.remoteKey)return;if(this.css=i.css,this.html=i.html,this.js=i.js,i.test)this.test=i.test;this.parts.example.hidden=!0,this.parts.codeEditors.hidden=!1,this.classList.add("-maximize"),this.updateUndo()}}else this.refresh()}}var E0=$1.elementCreator(),V7=new URL(window.location.href).searchParams,Bi=V7.get("lx");if(Bi)document.title+=" [code editor]",document.body.textContent="",document.body.append(E0({remoteId:Bi}));var{slot:vi}=w;class x2 extends a{static preferredTagName="tosi-sidenav";static initAttributes={minSize:800,navSize:200,compact:!1,contentVisible:!1};value="normal";content=[vi({name:"nav",part:"nav"}),vi({part:"content"})];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:`${g.navWidth("50%")} ${g.contentWidth("50%")}`,gridTemplateRows:"100%",position:"relative",margin:g.margin("0 0 0 -100%"),transition:g.sideNavTransition("0.25s ease-out")},":host slot":{position:"relative"},":host slot:not([name])":{display:"block"},':host slot[name="nav"]':{display:"block"}};onResize=()=>{let{content:l}=this.parts,i=this.offsetParent;if(i===null)return;let o=this.value;if(this.compact=i.offsetWidth<this.minSize,[...this.childNodes].find((s)=>s instanceof Element?s.getAttribute("slot")!=="nav":!0)===void 0)o="compact/nav",this.style.setProperty("--nav-width","100%"),this.style.setProperty("--content-width","0%");else if(!this.compact)o="normal",l.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(l.classList.remove("-tosi-sidenav-visible"),this.style.setProperty("--nav-width","50%"),this.style.setProperty("--content-width","50%"),this.contentVisible)o="compact/content",this.style.setProperty("--margin","0 0 0 -100%");else o="compact/nav",this.style.setProperty("--margin","0 -100% 0 0");if(this.value!==o)this.value=o};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 P7=x2,m2=x2.elementCreator(),O7=m2,U7=m2;var{div:R5,span:E2,a:Y1,header:X7,button:zi,template:N7,input:K7,h2:b7}=w,A2={pass:g.testColorPass("#0a0"),fail:g.testColorFail("#c00"),running:g.testColorRunning("#fa0")},F7={"@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:d.fontSize50,height:d.fontSize50,borderRadius:"50%",marginLeft:d.spacing50,display:"inline-block",verticalAlign:"middle"},".doc-link.-test-passed::after":{background:A2.pass},".doc-link.-test-failed::after":{background:A2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget":{_testBg:A2.running,position:"fixed",bottom:d.spacing,right:d.spacing,zIndex:"1000",background:d.testBg,color:"white",gap:d.spacing50},".test-widget[hidden]":{display:"none"},".test-widget.-running":{_testBg:A2.running,animation:"test-appear 0.3s ease-out, test-pulse 2s ease-in-out 0.3s infinite"},".test-widget.-passed":{_testBg:A2.pass,animation:"test-fade 3s ease-out forwards"},".test-widget.-failed":{_testBg:A2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget .count":{background:"white",color:d.testBg,borderRadius:"50%",width:d.lineHeight,height:d.lineHeight,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"}};function W7(l){let{docs:i,context:o={},projectName:y="",projectLinks:s={},navSize:x=200,minSize:h=600}=l;for(let v of i)v.testStatus=void 0;let c=document.location.search!==""?document.location.search.substring(1).split("&")[0]:i[0]?.filename||"README.md",r=i.find((v)=>v.filename===c)||i[0],{app:n}=S({app:{docs:i,currentDoc:r,compact:!1}}),C={},k,p=!1,z=0,B=0;window.__docTestResults=new Promise((v)=>{k=v});let j=(v)=>{let A=C[v],U=n.docs.find((F)=>F.filename===v);if(U)U.testStatus=A?A.passed?"passed":"failed":void 0},V=()=>{if(B>=z&&k){let v={passed:0,failed:0,pages:C};for(let A of Object.values(C))v.passed+=A.totalPassed,v.failed+=A.totalFailed;if(k(v),k=void 0,P)fetch("/report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)}).catch(()=>{})}},P=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1",q=(v)=>{let{results:A}=v.detail,U=String(n.currentDoc.filename);C[U]={passed:A.failed===0,tests:[...A.tests],totalPassed:A.passed,totalFailed:A.failed},j(U)},_=(v)=>{B++,V(),t4()};P1.docLink={toDOM(v,A){v.setAttribute("href",`?${A}`)}},P1.current={toDOM(v,A){let U=v.getAttribute("href")||"";v.classList.toggle("current",A===U.substring(1))}},P1.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 N=Q2(()=>{let v=m.value.toLocaleLowerCase();n.docs.forEach((A)=>{A.hidden=!A.title.toLocaleLowerCase().includes(v)&&!A.text.toLocaleLowerCase().includes(v)}),n1(n.docs)}),m=K7({slot:"nav",placeholder:"search",type:"search",style:{width:"calc(100% - 10px)",margin:"5px"},onInput:N});window.addEventListener("popstate",()=>{let v=window.location.search.substring(1);n.currentDoc=n.docs.find((A)=>A.filename===v)||n.docs[0]});let H=[zi({class:"iconic",style:{color:d.linkColor},title:"navigation",bind:{value:n.compact,binding:{toDOM(v,A){v.style.display=A?"":"none",v.nextSibling.style.display=A?"":"none"}}},onClick(){let v=document.querySelector(x2.tagName);v.contentVisible=!v.contentVisible}},t.menu()),E2({style:{flex:"0 0 10px"}})];if(y)H.push(Y1({href:"/",style:{display:"flex",alignItems:"center",borderBottom:"none"}},s.tosijs?t.tosiUi({style:{_xinIconSize:40,marginRight:10}}):E2(),b7(y)));if(H.push(E2({class:"elastic"})),s.tosijs)H.push(Y1({class:"iconic",title:"tosijs",target:"_blank"},t.tosi(),{href:s.tosijs}));if(s.discord)H.push(Y1({class:"iconic",title:"discord",target:"_blank"},t.discord(),{href:s.discord}));if(s.blog)H.push(Y1({class:"iconic",title:"blog",target:"_blank"},t.blog(),{href:s.blog}));if(s.github)H.push(Y1({class:"iconic",title:"github",target:"_blank"},t.github(),{href:s.github}));if(s.npm)H.push(Y1({class:"iconic",title:"npmjs",target:"_blank"},t.npm(),{href:s.npm}));let E=R5({style:{display:"flex",flexDirection:"column",maxWidth:"100vw",height:"100vh",overflow:"hidden"}},X7(...H),m2({name:"Documentation",navSize:x,minSize:h,style:{flex:"1 1 auto",overflow:"hidden"},onChange(){let v=document.querySelector(x2.tagName);n.compact=v.compact}},m,R5({slot:"nav",style:{display:"flex",flexDirection:"column",width:"100%",height:"calc(100% - 44px)",overflowY:"scroll"},bindList:{idPath:"filename",hiddenProp:"hidden",value:n.docs}},N7(Y1({class:"doc-link",bindCurrent:"app.currentDoc.filename",bindDocLink:"^.filename",bindTestStatus:"^.testStatus",onClick(v){let A=v.target,U=U1(v.target),F=v.target.closest("tosi-sidenav");F.contentVisible=!0;let{href:R}=A;window.history.pushState({href:R},"",R),n.currentDoc=U,v.preventDefault();let w1=String(U.filename),l1=C[w1];if(l1&&!l1.passed)setTimeout(()=>{let J=document.querySelector("tosi-example.-test-failed");if(J)J.scrollIntoView({behavior:"smooth",block:"center"})},100)}},f1({bindText:"^.title"})))),R5({style:{position:"relative",overflowY:"scroll",height:"100%"}},Y1({class:"view-source",target:"_blank",style:{display:s.github?"flex":"none",alignItems:"center",gap:"6px",position:"fixed",top:"calc(var(--xin-header-height, 60px) + 5px)",right:"5px",fontSize:"0.875em",color:"var(--brand-color, inherit)",opacity:"0.7",borderBottom:"none",transition:"opacity 0.2s ease"},onMouseenter(v){v.target.style.opacity="0.9"},onMouseleave(v){v.target.style.opacity="0.7"},bind:{value:n.currentDoc,binding(v,A){if(s.github&&A.path&&A.path!=="README.md")v.href=`${s.github}/blob/main/${A.path}`,v.style.display="flex";else v.style.display="none"}}},t.github({style:{_xinIconSize:16}}),"View source on GitHub"),f2({style:{display:"block",maxWidth:"44em",margin:"auto",padding:"0 1em",overflow:"hidden"},bindValue:"app.currentDoc.text",didRender(){$1.insertExamples(this,o)}}))));O1("test-indicators",F7);let T=zi({class:"test-widget",hidden:!0,onClick:Ei},E2({part:"label"},"Tests"),E2({class:"count",part:"count"},"0"));E.appendChild(T);let r0=!1;function t3(){r0=!0,T.hidden=!1,T.classList.remove("-passed","-failed"),T.classList.add("-running"),a3()}function a3(){let v=T.querySelector('[part="label"]'),A=T.querySelector('[part="count"]'),U=Object.values(C).reduce((R,w1)=>R+w1.totalPassed,0),F=Object.values(C).reduce((R,w1)=>R+w1.totalFailed,0);if(v)if(r0)v.textContent="Running";else if(F>0)v.textContent="Failed";else if(U>0)v.textContent="Passed";else v.textContent="Tests";if(A)A.textContent=F>0?String(F):String(U)}function t4(){let v=Object.values(C).reduce((A,U)=>A+U.totalFailed,0);if(r0&&B>=z)if(r0=!1,T.classList.remove("-running"),v>0)T.classList.add("-failed"),T.classList.remove("-passed"),T.hidden=!1;else T.classList.add("-passed"),T.classList.remove("-failed"),T.hidden=!1;a3()}function Ei(){let v=Object.entries(C).filter(([,U])=>!U.passed),A=[];for(let[U,F]of v){let R=i.find((l1)=>l1.filename===U),w1=F.tests.filter((l1)=>!l1.passed);for(let l1 of w1)A.push({caption:`${R?.title||U}: ${l1.name}`,action:()=>{let J=n.docs.find((i1)=>String(i1.filename)===U);if(J)window.history.pushState({href:`?${U}`},"",`?${U}`),n.currentDoc=J,setTimeout(()=>{let i1=document.querySelector("tosi-example.-test-failed");if(i1)i1.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 U=l9();navigator.clipboard.writeText(U)}}),G({target:T,menuItems:A})}function l9(){let v=["# Test Results",""],A=0,U=0;for(let[F,R]of Object.entries(C)){let l1=i.find((J)=>J.filename===F)?.title||F;if(A+=R.totalPassed,U+=R.totalFailed,R.tests.length>0){v.push(`## ${l1}`),v.push("");for(let J of R.tests){let i1=J.passed?"✓":"✗",D1=J.error?`- ${i1} ${J.name}: ${J.error}`:`- ${i1} ${J.name}`;v.push(D1)}v.push("")}}return v.unshift(`**Summary: ${A} passed, ${U} failed**`,""),v.join(`
91
- `)}E.addEventListener("testcomplete",(v)=>{q(v),t4()});let i9=async()=>{if(p)return;if(!r1.enabled.value)return;p=!0;let v=i.filter((F)=>F.text.includes("```test"));if(z=v.length,z>0)t3();if(z===0){if(k)k({passed:0,failed:0,pages:{}}),k=void 0;return}let A=document.createElement("iframe");A.style.cssText="position: fixed; left: 0; top: 0; width: 800px; height: 600px; opacity: 0; pointer-events: none;",document.body.appendChild(A);let U=String(n.currentDoc.filename);for(let F of v){if(F.filename===U)continue;C[F.filename]={passed:!0,tests:[],totalPassed:0,totalFailed:0};let R=document.createElement("div"),w1=f2({value:F.text,didRender(){$1.insertExamples(this,o)}});R.appendChild(w1);let l1=(i1)=>{let{results:D1}=i1.detail,N1=C[F.filename];N1.tests.push(...D1.tests),N1.totalPassed+=D1.passed,N1.totalFailed+=D1.failed,N1.passed=N1.totalFailed===0,j(F.filename),t4()};R.addEventListener("testcomplete",l1);let J=A.contentDocument;if(J)J.body.innerHTML="",J.body.appendChild(R),await new Promise((i1)=>{let D1=Date.now()+30000,N1=()=>{if(Date.now()>D1){i1();return}let v3=[...R.querySelectorAll("tosi-example")].filter((a4)=>a4.classList.contains("-has-tests")),o9=v3.filter((a4)=>a4.classList.contains("-test-running"));if(v3.length>0&&o9.length===0)i1();else setTimeout(N1,100)};setTimeout(N1,200)});_(F.filename)}if(A.remove(),v.some((F)=>F.filename===U))setTimeout(()=>{_(U)},1000)},B3=()=>{if(!r1.enabled.value)return;if(P)setTimeout(i9,1000);else if(r.text.includes("```test"))z=1,t3(),setTimeout(()=>_(r.filename),2000);else if(k)k({passed:0,failed:0,pages:{}}),k=void 0};return B3(),r1.enabled.observe(B3),E}var{div:g1,slot:Q7}=w;class k1 extends a{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:d.handleSize,width:d.handleSize,padding:d.handlePadding,"--text-color":d.handleColor,background:d.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(${d.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":d.handleHoverColor,background:d.handleHoverBg}};static snappedCoords(l,i){let{gridSize:o}=k1;return k1.snapToGrid||l.shiftKey?i.map((y)=>Math.round(y/o)*o):i}static snappedAngle(l,i){let{angleSize:o}=k1;return k1.snapAngle||l.shiftKey?Math.round(i/o)*o:i}get locked(){let l=this.parentElement;if(l.style.inset)return{left:!0,top:!0,bottom:!0,right:!0};let i=l.style.right.match(/\d/)!==null,o=!i||l.style.left.match(/\d/)!==null,y=l.style.bottom.match(/\d/)!==null,s=!y||l.style.top.match(/\d/)!==null;return{left:o,top:s,bottom:y,right:i}}set locked(l){let{bottom:i,right:o}=l,{left:y,top:s}=l,x=this.parentElement,h=x.offsetLeft,c=x.offsetTop,r=x.offsetWidth,n=x.offsetHeight,C=x.offsetParent.offsetWidth-h-r,k=x.offsetParent.offsetHeight-c-n;if(Object.assign(x.style,{left:"",right:"",top:"",bottom:"",width:"",height:""}),!o)y=!0;if(!i)s=!0;if(y)x.style.left=h+"px";if(o)x.style.right=C+"px";if(y&&o)x.style.width="auto";else x.style.width=r+"px";if(s)x.style.top=c+"px";if(i)x.style.bottom=k+"px";if(s&&i)x.style.height="auto";else x.style.height=n+"px";this.queueRender()}get coords(){let{top:l,left:i,right:o,bottom:y}=this.parentElement.style;return{top:parseFloat(l),left:parseFloat(i),right:parseFloat(o),bottom:parseFloat(y)}}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=(l)=>{let{locked:i}=this;this.locked=i;let o=this.parentElement,{top:y,left:s,bottom:x,right:h}=this.coords;M(l,(c,r,n)=>{if([c,r]=k1.snappedCoords(n,[c,r]),!isNaN(y))o.style.top=y+r+"px";if(!isNaN(x))o.style.bottom=x-r+"px";if(!isNaN(s))o.style.left=s+c+"px";if(!isNaN(h))o.style.right=h-c+"px";if(n.type==="mouseup")return this.triggerChange(),!0})};resize=(l)=>{let i=this.parentElement,{locked:o}=this;this.locked=Object.assign({left:!0,top:!0,right:!0,bottom:!0});let[y,s]=[this.right,this.bottom];M(l,(x,h,c)=>{let r=y-x,n=s-h;if([r,n]=k1.snappedCoords(c,[r,n]),i.style.right=r+"px",i.style.bottom=n+"px",c.type==="mouseup")return this.locked=o,this.triggerChange(),!0})};adjustSize=(l)=>{let i=this.parentElement,{locked:o}=this,y=l.target.getAttribute("part");this.locked=Object.assign({left:!0,right:!0,top:!0,bottom:!0});let s=this[y];M(l,(x,h,c)=>{let[r]=k1.snappedCoords(c,[s+(["left","right"].includes(y)?x:h)*(["right","bottom"].includes(y)?-1:1)]);if(i.style[y]=r+"px",c.type==="mouseup")return this.locked=o,this.triggerChange(),!0})};get rect(){return this.parentElement.getBoundingClientRect()}get center(){let l=this.parentElement.getBoundingClientRect();return{x:l.x+l.width*0.5,y:l.y+l.height*0.5}}get element(){return this.parentElement}adjustRotation=(l)=>{let{center:i}=this,{transformOrigin:o}=this.element.style;if(!o)this.element.style.transformOrigin="50% 50%";M(l,(y,s,x)=>{let{clientX:h,clientY:c}=x,r=h-i.x,n=c-i.y,C=n>0?90:-90;if(r!==0)C=Math.atan2(n,r)*180/Math.PI;if(C=k1.snappedAngle(x,C),C===0)this.element.style.transformOrigin="",this.element.style.transform="";else this.element.style.transform=`rotate(${C}deg)`;return this.triggerChange(),x.type==="mouseup"})};toggleLock=(l)=>{let{locked:i}=this,o=l.target.title.split(" ")[1];i[o]=!i[o],this.locked=i,this.queueRender(),l.stopPropagation(),l.preventDefault()};content=()=>[g1({part:"move",style:{top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},t.move()),g1({part:"left",title:"resize left",class:"drag-size",style:{left:"-6px",width:"8px"}}),g1({part:"right",title:"resize right",class:"drag-size",style:{left:"calc(100% - 2px)",width:"8px"}}),g1({part:"top",title:"resize top",class:"drag-size",style:{top:"-6px",height:"8px",cursor:"ns-resize"}}),g1({part:"bottom",title:"resize bottom",class:"drag-size",style:{top:"calc(100% - 2px)",height:"8px",cursor:"ns-resize"}}),g1({part:"resize",style:{top:"100%",left:"100%"}},t.resize()),g1({part:"rotate",style:{top:"50%",right:"0"}},t.refreshCw()),g1({part:"lockLeft",title:"lock left",style:{top:"50%",left:0,transform:"translate(-100%, -50%)"}},t.unlock(),t.lock()),g1({part:"lockRight",title:"lock right",style:{top:"50%",left:"100%",transform:"translate(0%, -50%)"}},t.unlock(),t.lock()),g1({part:"lockTop",title:"lock top",style:{top:0,left:"50%",transform:"translate(-50%, -100%)"}},t.unlock(),t.lock()),g1({part:"lockBottom",title:"lock bottom",style:{top:"100%",left:"50%",transform:"translate(-50%, 0%)"}},t.unlock(),t.lock()),Q7()];connectedCallback(){super.connectedCallback();let{left:l,right:i,top:o,bottom:y,lockLeft:s,lockRight:x,lockTop:h,lockBottom:c,move:r,resize:n,rotate:C}=this.parts,k={passive:!0};[l,i,o,y].forEach((p)=>{p.addEventListener("mousedown",this.adjustSize,k),p.addEventListener("touchstart",this.adjustSize,k)}),[s,x,h,c].forEach((p)=>{p.addEventListener("click",this.toggleLock)}),n.addEventListener("mousedown",this.resize,k),r.addEventListener("mousedown",this.adjustPosition,k),C.addEventListener("mousedown",this.adjustRotation,k),n.addEventListener("touchstart",this.resize,k),r.addEventListener("touchstart",this.adjustPosition,k),C.addEventListener("touchstart",this.adjustRotation,k)}render(){if(super.render(),!this.parentElement)return;let{lockLeft:l,lockRight:i,lockTop:o,lockBottom:y}=this.parts,{left:s,right:x,top:h,bottom:c}=this.locked;l.toggleAttribute("locked",s),i.toggleAttribute("locked",x),o.toggleAttribute("locked",h),y.toggleAttribute("locked",c)}}var G7=k1.elementCreator();var{div:Z7,input:R7,button:J5,span:J7}=w,fi=(l)=>l,ji="null filter, everything matches",H5={contains:{caption:"contains",negative:"does not contain",makeTest:(l)=>{return l=l.toLocaleLowerCase(),(i)=>String(i).toLocaleLowerCase().includes(l)}},hasTags:{caption:"has tags",makeTest:(l)=>{let i=l.split(/[\s,]/).map((o)=>o.trim().toLocaleLowerCase()).filter((o)=>o!=="");return(o)=>Array.isArray(o)&&i.find((y)=>!o.includes(y))===void 0}},doesNotHaveTags:{caption:"does not have tags",makeTest:(l)=>{let i=l.split(/[\s,]/).map((o)=>o.trim().toLocaleLowerCase()).filter((o)=>o!=="");return(o)=>Array.isArray(o)&&i.find((y)=>o.includes(y))===void 0}},equals:{caption:"=",negative:"≠",makeTest:(l)=>{if(isNaN(Number(l)))return l=String(l).toLocaleLowerCase(),(o)=>String(o).toLocaleLowerCase()===l;let i=Number(l);return(o)=>Number(o)===i}},after:{caption:"is after",negative:"is before",makeTest:(l)=>{let i=new Date(l);return(o)=>new Date(o)>i}},greaterThan:{caption:">",negative:"≤",makeTest:(l)=>{if(!isNaN(Number(l))){let i=Number(l);return(o)=>Number(o)>i}return l=l.toLocaleLowerCase(),(i)=>String(i).toLocaleLowerCase()>l}},truthy:{caption:"is true/non-empty/non-zero",negative:"is false/empty/zero",needsValue:!1,makeTest:()=>(l)=>!!l},isTrue:{caption:"= true",needsValue:!1,makeTest:()=>(l)=>l===!0},isFalse:{caption:"= false",needsValue:!1,makeTest:()=>(l)=>l===!1}},H7={description:"anything",test:()=>!0};function Ai(l){return l.options[l.selectedIndex]?.caption||""}class $5 extends a{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=H5;content=()=>[h1({part:"haystack"}),h1({part:"condition"}),R7({part:"needle",type:"search"}),J7({part:"padding"}),J5({part:"remove",title:"delete"},t.trash())];filter=H7;get state(){let{haystack:l,needle:i,condition:o}=this.parts;return{haystack:l.value,needle:i.value,condition:o.value}}set state(l){Object.assign(this,l)}buildFilter=()=>{let{haystack:l,condition:i,needle:o}=this.parts,y=i.value.startsWith("~"),s=y?i.value.slice(1):i.value,x=this.filters[s];o.hidden=x.needsValue===!1;let h=x.needsValue===!1?x.makeTest(void 0):x.makeTest(o.value),c=l.value,r;if(c!=="*")r=y?(k)=>!h(k[c]):(k)=>h(k[c]);else r=y?(k)=>Object.values(k).find((p)=>!h(p))!==void 0:(k)=>Object.values(k).find((p)=>h(p))!==void 0;let n=x.needsValue!==!1?` "${o.value}"`:"",C=`${Ai(l)} ${Ai(i)}${n}`;this.filter={description:C,test:r},this.parentElement?.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{haystack:l,condition:i,needle:o,remove:y}=this.parts;l.addEventListener("change",this.buildFilter),i.addEventListener("change",this.buildFilter),o.addEventListener("input",this.buildFilter),l.value=this.haystack,i.value=this.condition,o.value=this.needle,y.addEventListener("click",()=>{let{parentElement:s}=this;this.remove(),s?.dispatchEvent(new Event("change"))})}render(){super.render();let{haystack:l,condition:i,needle:o}=this.parts;if(l.options=[{caption:"any field",value:"*"},...this.fields.map((y)=>y.prop)],i.options=Object.keys(this.filters).map((y)=>{let s=this.filters[y];return s.negative!==void 0?[{caption:s.caption,value:y},{caption:s.negative,value:"~"+y}]:{caption:s.caption,value:y}}).flat(),this.haystack!=="")l.value=this.haystack;if(this.condition!=="")i.value=this.condition;if(this.needle!=="")o.value=this.needle;this.buildFilter()}}var l4=$5.elementCreator();class Y5 extends a{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(l){this._fields=l,this.queueRender()}get state(){let{filterContainer:l}=this.parts;return[...l.children].map((i)=>i.state)}set state(l){let{fields:i,filters:o}=this,{filterContainer:y}=this.parts;y.textContent="";for(let s of l)y.append(l4({fields:i,filters:o,...s}))}filter=fi;description=ji;addFilter=()=>{let{fields:l,filters:i}=this,{filterContainer:o}=this.parts;o.append(l4({fields:l,filters:i}))};content=()=>[J5({part:"add",title:"add filter condition",onClick:this.addFilter,class:"round"},t.plus()),Z7({part:"filterContainer"}),J5({part:"reset",title:"reset filter",onClick:this.reset},t.x())];filters=H5;reset=()=>{let{fields:l,filters:i}=this,{filterContainer:o}=this.parts;this.description=ji,this.filter=fi,o.textContent="",o.append(l4({fields:l,filters:i})),this.dispatchEvent(new Event("change"))};buildFilter=()=>{let{filterContainer:l}=this.parts;if(l.children.length===0){this.reset();return}let i=[...l.children].map((y)=>y.filter),o=i.map((y)=>y.test);this.description=i.map((y)=>y.description).join(", "),this.filter=(y)=>y.filter((s)=>o.find((x)=>x(s)===!1)===void 0),this.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{filterContainer:l}=this.parts;l.addEventListener("change",this.buildFilter),this.reset()}render(){super.render()}}var $7=Y5.elementCreator();var{form:Y7,slot:I5,xinSlot:qi,label:I7,input:S7,span:D7}=w;function I1(l,i,o){if(o!==""&&o!==!1)l.setAttribute(i,o);else l.removeAttribute(i)}function T7(l){switch(l.type){case"checkbox":return l.checked;case"radio":{let i=l.parentElement?.querySelector(`input[type="radio"][name="${l.name}"]:checked`);return i?i.value:null}case"range":case"number":return Number(l.value);default:return Array.isArray(l.value)&&l.value.length===0?null:l.value}}function _i(l,i){if(!(l instanceof HTMLElement));else if(l instanceof HTMLInputElement)switch(l.type){case"checkbox":l.checked=i;break;case"radio":l.checked=i===l.value;break;default:l.value=String(i||"")}else if(i!=null||l.value!=null)l.value=String(i||"")}class i4 extends a{static preferredTagName="tosi-field";static lightStyleSpec={':host [part="field"]':{position:"relative",display:"flex",alignItems:"center",gap:g.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=I7(qi({part:"caption"}),D7({part:"field"},qi({part:"input",name:"input"}),S7({part:"valueHolder"})));valueChanged=!1;handleChange=()=>{let{input:l,valueHolder:i}=this.parts,o=l.children[0]||i;if(o!==i)i.value=o.value;this.value=T7(o),this.valueChanged=!0;let y=this.closest("tosi-form");if(y&&this.key!=="")switch(this.type){case"checkbox":y.fields[this.key]=o.checked;break;case"number":case"range":if(this.fixedPrecision>-1)o.value=Number(o.value).toFixed(this.fixedPrecision),y.fields[this.key]=Number(o.value);else y.fields[this.key]=Number(o.value);break;default:y.fields[this.key]=o.value}};connectedCallback(){super.connectedCallback();let{input:l,valueHolder:i}=this.parts;i.addEventListener("change",this.handleChange),l.addEventListener("change",this.handleChange,!0)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{input:l,caption:i,valueHolder:o,field:y}=this.parts;if(i.textContent?.trim()==="")i.append(this.caption!==""?this.caption:this.key);if(this.type==="text"){l.textContent="";let s=w.textarea({value:this.value});if(this.placeholder)s.setAttribute("placeholder",this.placeholder);l.append(s)}else if(this.type==="color")l.textContent="",l.append(h5({value:this.value}));else if(l.children.length===0){if(I1(o,"placeholder",this.placeholder),I1(o,"type",this.type),I1(o,"pattern",this.pattern),I1(o,"min",this.min),I1(o,"max",this.max),this.step)I1(o,"step",this.step);else if(this.fixedPrecision>0&&this.type==="number")I1(o,"step",Math.pow(10,-this.fixedPrecision))}if(_i(o,this.value),_i(l.children[0],this.value),this.prefix?y.setAttribute("prefix",this.prefix):y.removeAttribute("prefix"),this.suffix?y.setAttribute("suffix",this.suffix):y.removeAttribute("suffix"),o.classList.toggle("hidden",l.children.length>0),l.children.length>0)o.setAttribute("tabindex","-1");else o.removeAttribute("tabindex");l.style.display=l.children.length===0?"none":"",I1(o,"required",!this.optional)}}class o4 extends a{static preferredTagName="tosi-form";context={};value={};get isValid(){return[...this.querySelectorAll("*")].filter((i)=>i.required!==void 0).find((i)=>!i.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=[I5({part:"header",name:"header"}),Y7({part:"form"},I5({part:"content"})),I5({part:"footer",name:"footer"})];getField=(l)=>{return this.querySelector(`tosi-field[key="${l}"]`)};get fields(){if(typeof this.value==="string")try{this.value=JSON.parse(this.value)}catch(o){console.log("<tosi-form> could not use its value, expects valid JSON"),this.value={}}let{getField:l}=this,i=this.dispatchEvent.bind(this);return new Proxy(this.value,{get(o,y){return o[y]},set(o,y,s){if(o[y]!==s){o[y]=s;let x=l(y);if(x)x.value=s;i(new Event("change"))}return!0}})}set fields(l){let i=[...this.querySelectorAll("tosi-field")];for(let o of i)o.value=l[o.key]}submit=()=>{this.parts.form.dispatchEvent(new Event("submit"))};handleSubmit=(l)=>{l.preventDefault(),l.stopPropagation();let i=this.fields;this.submitCallback(i,this.isValid)};submitCallback=(l,i)=>{console.log("override submitCallback to handle this data",{value:l,isValid:i})};connectedCallback(){super.connectedCallback();let{form:l}=this.parts;l.addEventListener("submit",this.handleSubmit),this.addEventListener("change",this.handleElementChange,!0),this.initializeNamedElements()}handleElementChange=(l)=>{let i=l.target,o=i.getAttribute("name");if(o&&"value"in i)this.fields[o]=i.value};initializeNamedElements(){let l=this.fields,i=this.querySelectorAll("[name], [key]");for(let o of i){let y=o.getAttribute("name")||o.getAttribute("key");if(y&&l[y]!==void 0)o.value=l[y]}}}var e7=i4,u7=o4,Vi=i4.elementCreator(),Pi=o4.elementCreator(),L7=Vi,M7=Pi;var{a:m7}=w;class S5 extends a{static preferredTagName="tosi-header";static shadowStyleSpec={":host":{display:"flex",alignItems:"center",padding:g.tosiHeaderPadding("12px 24px"),background:g.tosiHeaderBg("var(--tosi-accent, #EE257B)"),lineHeight:g.tosiHeaderLineHeight("32px"),gap:g.tosiHeaderGap("8px")},"::slotted(*)":{display:"inline-flex",alignItems:"center"}};content=({slot:l})=>[l()]}var E7=S5.elementCreator(),Oi={tosijs:()=>t.tosi(),discord:()=>t.discord(),blog:()=>t.blog(),github:()=>t.github(),npm:()=>t.npm()};class D5 extends a{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 l=[];for(let[i,o]of Object.entries(this.links)){if(!o||!Oi[i])continue;l.push(m7({title:i,target:"_blank",href:o},Oi[i]()))}this.replaceChildren(...l)}}var lo=D5.elementCreator();function Ui(){return navigator.getGamepads().filter((i)=>i!==null).map((i)=>{let{id:o,axes:y,buttons:s}=i;return{id:o,axes:y,buttons:s.map((x,h)=>{let{pressed:c,value:r}=x;return{index:h,pressed:c,value:r}}).filter((x)=>x.pressed||x.value!==0).reduce((x,h)=>{return x[h.index]=h.value,x},{})}})}function io(){let l=Ui();return l.length===0?"no active gamepads":l.map(({id:i,axes:o,buttons:y})=>{let s=o.map((h)=>h.toFixed(2)).join(" "),x=Object.keys(y).map((h)=>`[${h}](${y[Number(h)].toFixed(2)})`).join(" ");return`${i}
90
+ `);this.setEditorValue(o,x)}else{let s=["js","html","css","test"].find((x)=>i.matches(`.language-${x}`));if(s)this.setEditorValue(s,s==="html"?i.innerHTML:i.innerText)}}}showDefaultTab(){if(!this.hydrated){this.pendingShowDefaultTab=!0;return}let{editors:l}=this.parts;if(this.js!=="")l.value=0;else if(this.html!=="")l.value=1;else if(this.css!=="")l.value=2;else if(this.test!=="")l.value=3}render(){if(super.render(),this.remoteId!==""){let l=localStorage.getItem(this.storageKey);if(l!==null){let i=JSON.parse(l);if(this.remoteKey!==i.remoteKey)return;if(this.css=i.css,this.html=i.html,this.js=i.js,i.test)this.test=i.test;this.parts.example.hidden=!0,this.parts.codeEditors.hidden=!1,this.classList.add("-maximize"),this.updateUndo()}}else this.refresh()}}var E0=H1.elementCreator(),W7=new URL(window.location.href).searchParams,zi=W7.get("lx");if(zi)document.title+=" [code editor]",document.body.textContent="",document.body.append(E0({remoteId:zi}));var{slot:fi}=w;class x2 extends a{static preferredTagName="tosi-sidenav";static initAttributes={minSize:800,navSize:200,compact:!1,contentVisible:!1};value="normal";content=[fi({name:"nav",part:"nav"}),fi({part:"content"})];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:`${k.navWidth("50%")} ${k.contentWidth("50%")}`,gridTemplateRows:"100%",position:"relative",margin:k.margin("0 0 0 -100%"),transition:k.sideNavTransition("0.25s ease-out")},":host slot":{position:"relative"},":host slot:not([name])":{display:"block"},':host slot[name="nav"]':{display:"block"}};onResize=()=>{let{content:l}=this.parts,i=this.offsetParent;if(i===null)return;let o=this.value;if(this.compact=i.offsetWidth<this.minSize,[...this.childNodes].find((s)=>s instanceof Element?s.getAttribute("slot")!=="nav":!0)===void 0)o="compact/nav",this.style.setProperty("--nav-width","100%"),this.style.setProperty("--content-width","0%");else if(!this.compact)o="normal",l.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(l.classList.remove("-tosi-sidenav-visible"),this.style.setProperty("--nav-width","50%"),this.style.setProperty("--content-width","50%"),this.contentVisible)o="compact/content",this.style.setProperty("--margin","0 0 0 -100%");else o="compact/nav",this.style.setProperty("--margin","0 -100% 0 0");if(this.value!==o)this.value=o};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 Q7=x2,m2=x2.elementCreator(),G7=m2,Z7=m2;var{div:R5,span:E2,a:Y1,header:R7,button:ji,template:J7,input:$7,h2:H7}=w,A2={pass:k.testColorPass("#0a0"),fail:k.testColorFail("#c00"),running:k.testColorRunning("#fa0")},Y7={"@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:d.fontSize50,height:d.fontSize50,borderRadius:"50%",marginLeft:d.spacing50,display:"inline-block",verticalAlign:"middle"},".doc-link.-test-passed::after":{background:A2.pass},".doc-link.-test-failed::after":{background:A2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget":{_testBg:A2.running,position:"fixed",bottom:d.spacing,right:d.spacing,zIndex:"1000",background:d.testBg,color:"white",gap:d.spacing50},".test-widget[hidden]":{display:"none"},".test-widget.-running":{_testBg:A2.running,animation:"test-appear 0.3s ease-out, test-pulse 2s ease-in-out 0.3s infinite"},".test-widget.-passed":{_testBg:A2.pass,animation:"test-fade 3s ease-out forwards"},".test-widget.-failed":{_testBg:A2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget .count":{background:"white",color:d.testBg,borderRadius:"50%",width:d.lineHeight,height:d.lineHeight,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"}};function I7(l){let{docs:i,context:o={},projectName:y="",projectLinks:s={},navSize:x=200,minSize:h=600}=l;for(let v of i)v.testStatus=void 0;let c=document.location.search!==""?document.location.search.substring(1).split("&")[0]:i[0]?.filename||"README.md",r=i.find((v)=>v.filename===c)||i[0],{app:n}=S({app:{docs:i,currentDoc:r,compact:!1}}),C={},g,p=!1,z=0,B=0;window.__docTestResults=new Promise((v)=>{g=v});let j=(v)=>{let A=C[v],U=n.docs.find((F)=>F.filename===v);if(U)U.testStatus=A?A.passed?"passed":"failed":void 0},V=()=>{if(B>=z&&g){let v={passed:0,failed:0,pages:C};for(let A of Object.values(C))v.passed+=A.totalPassed,v.failed+=A.totalFailed;if(g(v),g=void 0,P)fetch("/report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)}).catch(()=>{})}},P=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1",q=(v)=>{let{results:A}=v.detail,U=String(n.currentDoc.filename);C[U]={passed:A.failed===0,tests:[...A.tests],totalPassed:A.passed,totalFailed:A.failed},j(U)},_=(v)=>{B++,V(),t4()};P1.docLink={toDOM(v,A){v.setAttribute("href",`?${A}`)}},P1.current={toDOM(v,A){let U=v.getAttribute("href")||"";v.classList.toggle("current",A===U.substring(1))}},P1.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 N=Q2(()=>{let v=m.value.toLocaleLowerCase();n.docs.forEach((A)=>{A.hidden=!A.title.toLocaleLowerCase().includes(v)&&!A.text.toLocaleLowerCase().includes(v)}),n1(n.docs)}),m=$7({slot:"nav",placeholder:"search",type:"search",style:{width:"calc(100% - 10px)",margin:"5px"},onInput:N});window.addEventListener("popstate",()=>{let v=window.location.search.substring(1);n.currentDoc=n.docs.find((A)=>A.filename===v)||n.docs[0]});let $=[ji({class:"iconic",style:{color:d.linkColor},title:"navigation",bind:{value:n.compact,binding:{toDOM(v,A){v.style.display=A?"":"none",v.nextSibling.style.display=A?"":"none"}}},onClick(){let v=document.querySelector(x2.tagName);v.contentVisible=!v.contentVisible}},t.menu()),E2({style:{flex:"0 0 10px"}})];if(y)$.push(Y1({href:"/",style:{display:"flex",alignItems:"center",borderBottom:"none"}},s.tosijs?t.tosiUi({style:{_xinIconSize:40,marginRight:10}}):E2(),H7(y)));if($.push(E2({class:"elastic"})),s.tosijs)$.push(Y1({class:"iconic",title:"tosijs",target:"_blank"},t.tosi(),{href:s.tosijs}));if(s.discord)$.push(Y1({class:"iconic",title:"discord",target:"_blank"},t.discord(),{href:s.discord}));if(s.blog)$.push(Y1({class:"iconic",title:"blog",target:"_blank"},t.blog(),{href:s.blog}));if(s.github)$.push(Y1({class:"iconic",title:"github",target:"_blank"},t.github(),{href:s.github}));if(s.npm)$.push(Y1({class:"iconic",title:"npmjs",target:"_blank"},t.npm(),{href:s.npm}));let E=R5({style:{display:"flex",flexDirection:"column",maxWidth:"100vw",height:"100vh",overflow:"hidden"}},R7(...$),m2({name:"Documentation",navSize:x,minSize:h,style:{flex:"1 1 auto",overflow:"hidden"},onChange(){let v=document.querySelector(x2.tagName);n.compact=v.compact}},m,R5({slot:"nav",style:{display:"flex",flexDirection:"column",width:"100%",height:"calc(100% - 44px)",overflowY:"scroll"},bindList:{idPath:"filename",hiddenProp:"hidden",value:n.docs}},J7(Y1({class:"doc-link",bindCurrent:"app.currentDoc.filename",bindDocLink:"^.filename",bindTestStatus:"^.testStatus",onClick(v){let A=v.target,U=U1(v.target),F=v.target.closest("tosi-sidenav");F.contentVisible=!0;let{href:R}=A;window.history.pushState({href:R},"",R),n.currentDoc=U,v.preventDefault();let w1=String(U.filename),l1=C[w1];if(l1&&!l1.passed)setTimeout(()=>{let J=document.querySelector("tosi-example.-test-failed");if(J)J.scrollIntoView({behavior:"smooth",block:"center"})},100)}},f1({bindText:"^.title"})))),R5({style:{position:"relative",overflowY:"scroll",height:"100%"}},Y1({class:"view-source",target:"_blank",style:{display:s.github?"flex":"none",alignItems:"center",gap:"6px",position:"fixed",top:"calc(var(--xin-header-height, 60px) + 5px)",right:"5px",fontSize:"0.875em",color:"var(--brand-color, inherit)",opacity:"0.7",borderBottom:"none",transition:"opacity 0.2s ease"},onMouseenter(v){v.target.style.opacity="0.9"},onMouseleave(v){v.target.style.opacity="0.7"},bind:{value:n.currentDoc,binding(v,A){if(s.github&&A.path&&A.path!=="README.md")v.href=`${s.github}/blob/main/${A.path}`,v.style.display="flex";else v.style.display="none"}}},t.github({style:{_xinIconSize:16}}),"View source on GitHub"),f2({style:{display:"block",maxWidth:"44em",margin:"auto",padding:"0 1em",overflow:"hidden"},bindValue:"app.currentDoc.text",didRender(){H1.insertExamples(this,o)}}))));O1("test-indicators",Y7);let T=ji({class:"test-widget",hidden:!0,onClick:i9},E2({part:"label"},"Tests"),E2({class:"count",part:"count"},"0"));E.appendChild(T);let r0=!1;function t3(){r0=!0,T.hidden=!1,T.classList.remove("-passed","-failed"),T.classList.add("-running"),a3()}function a3(){let v=T.querySelector('[part="label"]'),A=T.querySelector('[part="count"]'),U=Object.values(C).reduce((R,w1)=>R+w1.totalPassed,0),F=Object.values(C).reduce((R,w1)=>R+w1.totalFailed,0);if(v)if(r0)v.textContent="Running";else if(F>0)v.textContent="Failed";else if(U>0)v.textContent="Passed";else v.textContent="Tests";if(A)A.textContent=F>0?String(F):String(U)}function t4(){let v=Object.values(C).reduce((A,U)=>A+U.totalFailed,0);if(r0&&B>=z)if(r0=!1,T.classList.remove("-running"),v>0)T.classList.add("-failed"),T.classList.remove("-passed"),T.hidden=!1;else T.classList.add("-passed"),T.classList.remove("-failed"),T.hidden=!1;a3()}function i9(){let v=Object.entries(C).filter(([,U])=>!U.passed),A=[];for(let[U,F]of v){let R=i.find((l1)=>l1.filename===U),w1=F.tests.filter((l1)=>!l1.passed);for(let l1 of w1)A.push({caption:`${R?.title||U}: ${l1.name}`,action:()=>{let J=n.docs.find((i1)=>String(i1.filename)===U);if(J)window.history.pushState({href:`?${U}`},"",`?${U}`),n.currentDoc=J,setTimeout(()=>{let i1=document.querySelector("tosi-example.-test-failed");if(i1)i1.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 U=o9();navigator.clipboard.writeText(U)}}),G({target:T,menuItems:A})}function o9(){let v=["# Test Results",""],A=0,U=0;for(let[F,R]of Object.entries(C)){let l1=i.find((J)=>J.filename===F)?.title||F;if(A+=R.totalPassed,U+=R.totalFailed,R.tests.length>0){v.push(`## ${l1}`),v.push("");for(let J of R.tests){let i1=J.passed?"✓":"✗",D1=J.error?`- ${i1} ${J.name}: ${J.error}`:`- ${i1} ${J.name}`;v.push(D1)}v.push("")}}return v.unshift(`**Summary: ${A} passed, ${U} failed**`,""),v.join(`
91
+ `)}E.addEventListener("testcomplete",(v)=>{q(v),t4()});let y9=async()=>{if(p)return;if(!r1.enabled.value)return;p=!0;let v=i.filter((F)=>F.text.includes("```test"));if(z=v.length,z>0)t3();if(z===0){if(g)g({passed:0,failed:0,pages:{}}),g=void 0;return}let A=document.createElement("iframe");A.style.cssText="position: fixed; left: 0; top: 0; width: 800px; height: 600px; opacity: 0; pointer-events: none;",document.body.appendChild(A);let U=String(n.currentDoc.filename);for(let F of v){if(F.filename===U)continue;C[F.filename]={passed:!0,tests:[],totalPassed:0,totalFailed:0};let R=document.createElement("div"),w1=f2({value:F.text,didRender(){H1.insertExamples(this,o)}});R.appendChild(w1);let l1=(i1)=>{let{results:D1}=i1.detail,N1=C[F.filename];N1.tests.push(...D1.tests),N1.totalPassed+=D1.passed,N1.totalFailed+=D1.failed,N1.passed=N1.totalFailed===0,j(F.filename),t4()};R.addEventListener("testcomplete",l1);let J=A.contentDocument;if(J)J.body.innerHTML="",J.body.appendChild(R),await new Promise((i1)=>{let D1=Date.now()+30000,N1=()=>{if(Date.now()>D1){i1();return}let v3=[...R.querySelectorAll("tosi-example")].filter((a4)=>a4.classList.contains("-has-tests")),s9=v3.filter((a4)=>a4.classList.contains("-test-running"));if(v3.length>0&&s9.length===0)i1();else setTimeout(N1,100)};setTimeout(N1,200)});_(F.filename)}if(A.remove(),v.some((F)=>F.filename===U))setTimeout(()=>{_(U)},1000)},B3=()=>{if(!r1.enabled.value)return;if(P)setTimeout(y9,1000);else if(r.text.includes("```test"))z=1,t3(),setTimeout(()=>_(r.filename),2000);else if(g)g({passed:0,failed:0,pages:{}}),g=void 0};return B3(),r1.enabled.observe(B3),E}var{div:g1,slot:S7}=w;class k1 extends a{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:d.handleSize,width:d.handleSize,padding:d.handlePadding,"--text-color":d.handleColor,background:d.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(${d.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":d.handleHoverColor,background:d.handleHoverBg}};static snappedCoords(l,i){let{gridSize:o}=k1;return k1.snapToGrid||l.shiftKey?i.map((y)=>Math.round(y/o)*o):i}static snappedAngle(l,i){let{angleSize:o}=k1;return k1.snapAngle||l.shiftKey?Math.round(i/o)*o:i}get locked(){let l=this.parentElement;if(l.style.inset)return{left:!0,top:!0,bottom:!0,right:!0};let i=l.style.right.match(/\d/)!==null,o=!i||l.style.left.match(/\d/)!==null,y=l.style.bottom.match(/\d/)!==null,s=!y||l.style.top.match(/\d/)!==null;return{left:o,top:s,bottom:y,right:i}}set locked(l){let{bottom:i,right:o}=l,{left:y,top:s}=l,x=this.parentElement,h=x.offsetLeft,c=x.offsetTop,r=x.offsetWidth,n=x.offsetHeight,C=x.offsetParent.offsetWidth-h-r,g=x.offsetParent.offsetHeight-c-n;if(Object.assign(x.style,{left:"",right:"",top:"",bottom:"",width:"",height:""}),!o)y=!0;if(!i)s=!0;if(y)x.style.left=h+"px";if(o)x.style.right=C+"px";if(y&&o)x.style.width="auto";else x.style.width=r+"px";if(s)x.style.top=c+"px";if(i)x.style.bottom=g+"px";if(s&&i)x.style.height="auto";else x.style.height=n+"px";this.queueRender()}get coords(){let{top:l,left:i,right:o,bottom:y}=this.parentElement.style;return{top:parseFloat(l),left:parseFloat(i),right:parseFloat(o),bottom:parseFloat(y)}}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=(l)=>{let{locked:i}=this;this.locked=i;let o=this.parentElement,{top:y,left:s,bottom:x,right:h}=this.coords;M(l,(c,r,n)=>{if([c,r]=k1.snappedCoords(n,[c,r]),!isNaN(y))o.style.top=y+r+"px";if(!isNaN(x))o.style.bottom=x-r+"px";if(!isNaN(s))o.style.left=s+c+"px";if(!isNaN(h))o.style.right=h-c+"px";if(n.type==="mouseup")return this.triggerChange(),!0})};resize=(l)=>{let i=this.parentElement,{locked:o}=this;this.locked=Object.assign({left:!0,top:!0,right:!0,bottom:!0});let[y,s]=[this.right,this.bottom];M(l,(x,h,c)=>{let r=y-x,n=s-h;if([r,n]=k1.snappedCoords(c,[r,n]),i.style.right=r+"px",i.style.bottom=n+"px",c.type==="mouseup")return this.locked=o,this.triggerChange(),!0})};adjustSize=(l)=>{let i=this.parentElement,{locked:o}=this,y=l.target.getAttribute("part");this.locked=Object.assign({left:!0,right:!0,top:!0,bottom:!0});let s=this[y];M(l,(x,h,c)=>{let[r]=k1.snappedCoords(c,[s+(["left","right"].includes(y)?x:h)*(["right","bottom"].includes(y)?-1:1)]);if(i.style[y]=r+"px",c.type==="mouseup")return this.locked=o,this.triggerChange(),!0})};get rect(){return this.parentElement.getBoundingClientRect()}get center(){let l=this.parentElement.getBoundingClientRect();return{x:l.x+l.width*0.5,y:l.y+l.height*0.5}}get element(){return this.parentElement}adjustRotation=(l)=>{let{center:i}=this,{transformOrigin:o}=this.element.style;if(!o)this.element.style.transformOrigin="50% 50%";M(l,(y,s,x)=>{let{clientX:h,clientY:c}=x,r=h-i.x,n=c-i.y,C=n>0?90:-90;if(r!==0)C=Math.atan2(n,r)*180/Math.PI;if(C=k1.snappedAngle(x,C),C===0)this.element.style.transformOrigin="",this.element.style.transform="";else this.element.style.transform=`rotate(${C}deg)`;return this.triggerChange(),x.type==="mouseup"})};toggleLock=(l)=>{let{locked:i}=this,o=l.target.title.split(" ")[1];i[o]=!i[o],this.locked=i,this.queueRender(),l.stopPropagation(),l.preventDefault()};content=()=>[g1({part:"move",style:{top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},t.move()),g1({part:"left",title:"resize left",class:"drag-size",style:{left:"-6px",width:"8px"}}),g1({part:"right",title:"resize right",class:"drag-size",style:{left:"calc(100% - 2px)",width:"8px"}}),g1({part:"top",title:"resize top",class:"drag-size",style:{top:"-6px",height:"8px",cursor:"ns-resize"}}),g1({part:"bottom",title:"resize bottom",class:"drag-size",style:{top:"calc(100% - 2px)",height:"8px",cursor:"ns-resize"}}),g1({part:"resize",style:{top:"100%",left:"100%"}},t.resize()),g1({part:"rotate",style:{top:"50%",right:"0"}},t.refreshCw()),g1({part:"lockLeft",title:"lock left",style:{top:"50%",left:0,transform:"translate(-100%, -50%)"}},t.unlock(),t.lock()),g1({part:"lockRight",title:"lock right",style:{top:"50%",left:"100%",transform:"translate(0%, -50%)"}},t.unlock(),t.lock()),g1({part:"lockTop",title:"lock top",style:{top:0,left:"50%",transform:"translate(-50%, -100%)"}},t.unlock(),t.lock()),g1({part:"lockBottom",title:"lock bottom",style:{top:"100%",left:"50%",transform:"translate(-50%, 0%)"}},t.unlock(),t.lock()),S7()];connectedCallback(){super.connectedCallback();let{left:l,right:i,top:o,bottom:y,lockLeft:s,lockRight:x,lockTop:h,lockBottom:c,move:r,resize:n,rotate:C}=this.parts,g={passive:!0};[l,i,o,y].forEach((p)=>{p.addEventListener("mousedown",this.adjustSize,g),p.addEventListener("touchstart",this.adjustSize,g)}),[s,x,h,c].forEach((p)=>{p.addEventListener("click",this.toggleLock)}),n.addEventListener("mousedown",this.resize,g),r.addEventListener("mousedown",this.adjustPosition,g),C.addEventListener("mousedown",this.adjustRotation,g),n.addEventListener("touchstart",this.resize,g),r.addEventListener("touchstart",this.adjustPosition,g),C.addEventListener("touchstart",this.adjustRotation,g)}render(){if(super.render(),!this.parentElement)return;let{lockLeft:l,lockRight:i,lockTop:o,lockBottom:y}=this.parts,{left:s,right:x,top:h,bottom:c}=this.locked;l.toggleAttribute("locked",s),i.toggleAttribute("locked",x),o.toggleAttribute("locked",h),y.toggleAttribute("locked",c)}}var D7=k1.elementCreator();var{div:T7,input:u7,button:J5,span:e7}=w,Ai=(l)=>l,qi="null filter, everything matches",$5={contains:{caption:"contains",negative:"does not contain",makeTest:(l)=>{return l=l.toLocaleLowerCase(),(i)=>String(i).toLocaleLowerCase().includes(l)}},hasTags:{caption:"has tags",makeTest:(l)=>{let i=l.split(/[\s,]/).map((o)=>o.trim().toLocaleLowerCase()).filter((o)=>o!=="");return(o)=>Array.isArray(o)&&i.find((y)=>!o.includes(y))===void 0}},doesNotHaveTags:{caption:"does not have tags",makeTest:(l)=>{let i=l.split(/[\s,]/).map((o)=>o.trim().toLocaleLowerCase()).filter((o)=>o!=="");return(o)=>Array.isArray(o)&&i.find((y)=>o.includes(y))===void 0}},equals:{caption:"=",negative:"≠",makeTest:(l)=>{if(isNaN(Number(l)))return l=String(l).toLocaleLowerCase(),(o)=>String(o).toLocaleLowerCase()===l;let i=Number(l);return(o)=>Number(o)===i}},after:{caption:"is after",negative:"is before",makeTest:(l)=>{let i=new Date(l);return(o)=>new Date(o)>i}},greaterThan:{caption:">",negative:"≤",makeTest:(l)=>{if(!isNaN(Number(l))){let i=Number(l);return(o)=>Number(o)>i}return l=l.toLocaleLowerCase(),(i)=>String(i).toLocaleLowerCase()>l}},truthy:{caption:"is true/non-empty/non-zero",negative:"is false/empty/zero",needsValue:!1,makeTest:()=>(l)=>!!l},isTrue:{caption:"= true",needsValue:!1,makeTest:()=>(l)=>l===!0},isFalse:{caption:"= false",needsValue:!1,makeTest:()=>(l)=>l===!1}},L7={description:"anything",test:()=>!0};function _i(l){return l.options[l.selectedIndex]?.caption||""}class H5 extends a{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=$5;content=()=>[h1({part:"haystack"}),h1({part:"condition"}),u7({part:"needle",type:"search"}),e7({part:"padding"}),J5({part:"remove",title:"delete"},t.trash())];filter=L7;get state(){let{haystack:l,needle:i,condition:o}=this.parts;return{haystack:l.value,needle:i.value,condition:o.value}}set state(l){Object.assign(this,l)}buildFilter=()=>{let{haystack:l,condition:i,needle:o}=this.parts,y=i.value.startsWith("~"),s=y?i.value.slice(1):i.value,x=this.filters[s];o.hidden=x.needsValue===!1;let h=x.needsValue===!1?x.makeTest(void 0):x.makeTest(o.value),c=l.value,r;if(c!=="*")r=y?(g)=>!h(g[c]):(g)=>h(g[c]);else r=y?(g)=>Object.values(g).find((p)=>!h(p))!==void 0:(g)=>Object.values(g).find((p)=>h(p))!==void 0;let n=x.needsValue!==!1?` "${o.value}"`:"",C=`${_i(l)} ${_i(i)}${n}`;this.filter={description:C,test:r},this.parentElement?.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{haystack:l,condition:i,needle:o,remove:y}=this.parts;l.addEventListener("change",this.buildFilter),i.addEventListener("change",this.buildFilter),o.addEventListener("input",this.buildFilter),l.value=this.haystack,i.value=this.condition,o.value=this.needle,y.addEventListener("click",()=>{let{parentElement:s}=this;this.remove(),s?.dispatchEvent(new Event("change"))})}render(){super.render();let{haystack:l,condition:i,needle:o}=this.parts;if(l.options=[{caption:"any field",value:"*"},...this.fields.map((y)=>y.prop)],i.options=Object.keys(this.filters).map((y)=>{let s=this.filters[y];return s.negative!==void 0?[{caption:s.caption,value:y},{caption:s.negative,value:"~"+y}]:{caption:s.caption,value:y}}).flat(),this.haystack!=="")l.value=this.haystack;if(this.condition!=="")i.value=this.condition;if(this.needle!=="")o.value=this.needle;this.buildFilter()}}var l4=H5.elementCreator();class Y5 extends a{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(l){this._fields=l,this.queueRender()}get state(){let{filterContainer:l}=this.parts;return[...l.children].map((i)=>i.state)}set state(l){let{fields:i,filters:o}=this,{filterContainer:y}=this.parts;y.textContent="";for(let s of l)y.append(l4({fields:i,filters:o,...s}))}filter=Ai;description=qi;addFilter=()=>{let{fields:l,filters:i}=this,{filterContainer:o}=this.parts;o.append(l4({fields:l,filters:i}))};content=()=>[J5({part:"add",title:"add filter condition",onClick:this.addFilter,class:"round"},t.plus()),T7({part:"filterContainer"}),J5({part:"reset",title:"reset filter",onClick:this.reset},t.x())];filters=$5;reset=()=>{let{fields:l,filters:i}=this,{filterContainer:o}=this.parts;this.description=qi,this.filter=Ai,o.textContent="",o.append(l4({fields:l,filters:i})),this.dispatchEvent(new Event("change"))};buildFilter=()=>{let{filterContainer:l}=this.parts;if(l.children.length===0){this.reset();return}let i=[...l.children].map((y)=>y.filter),o=i.map((y)=>y.test);this.description=i.map((y)=>y.description).join(", "),this.filter=(y)=>y.filter((s)=>o.find((x)=>x(s)===!1)===void 0),this.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{filterContainer:l}=this.parts;l.addEventListener("change",this.buildFilter),this.reset()}render(){super.render()}}var M7=Y5.elementCreator();var{form:m7,slot:I5,xinSlot:Vi,label:E7,input:lo,span:io}=w;function I1(l,i,o){if(o!==""&&o!==!1)l.setAttribute(i,o);else l.removeAttribute(i)}function oo(l){switch(l.type){case"checkbox":return l.checked;case"radio":{let i=l.parentElement?.querySelector(`input[type="radio"][name="${l.name}"]:checked`);return i?i.value:null}case"range":case"number":return Number(l.value);default:return Array.isArray(l.value)&&l.value.length===0?null:l.value}}function Pi(l,i){if(!(l instanceof HTMLElement));else if(l instanceof HTMLInputElement)switch(l.type){case"checkbox":l.checked=i;break;case"radio":l.checked=i===l.value;break;default:l.value=String(i||"")}else if(i!=null||l.value!=null)l.value=String(i||"")}class i4 extends a{static preferredTagName="tosi-field";static lightStyleSpec={':host [part="field"]':{position:"relative",display:"flex",alignItems:"center",gap:k.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=E7(Vi({part:"caption"}),io({part:"field"},Vi({part:"input",name:"input"}),lo({part:"valueHolder"})));valueChanged=!1;handleChange=()=>{let{input:l,valueHolder:i}=this.parts,o=l.children[0]||i;if(o!==i)i.value=o.value;this.value=oo(o),this.valueChanged=!0;let y=this.closest("tosi-form");if(y&&this.key!=="")switch(this.type){case"checkbox":y.fields[this.key]=o.checked;break;case"number":case"range":if(this.fixedPrecision>-1)o.value=Number(o.value).toFixed(this.fixedPrecision),y.fields[this.key]=Number(o.value);else y.fields[this.key]=Number(o.value);break;default:y.fields[this.key]=o.value}};connectedCallback(){super.connectedCallback();let{input:l,valueHolder:i}=this.parts;i.addEventListener("change",this.handleChange),l.addEventListener("change",this.handleChange,!0)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{input:l,caption:i,valueHolder:o,field:y}=this.parts;if(i.textContent?.trim()==="")i.append(this.caption!==""?this.caption:this.key);if(this.type==="text"){l.textContent="";let s=w.textarea({value:this.value});if(this.placeholder)s.setAttribute("placeholder",this.placeholder);l.append(s)}else if(this.type==="color")l.textContent="",l.append(h5({value:this.value}));else if(l.children.length===0){if(I1(o,"placeholder",this.placeholder),I1(o,"type",this.type),I1(o,"pattern",this.pattern),I1(o,"min",this.min),I1(o,"max",this.max),this.step)I1(o,"step",this.step);else if(this.fixedPrecision>0&&this.type==="number")I1(o,"step",Math.pow(10,-this.fixedPrecision))}if(Pi(o,this.value),Pi(l.children[0],this.value),this.prefix?y.setAttribute("prefix",this.prefix):y.removeAttribute("prefix"),this.suffix?y.setAttribute("suffix",this.suffix):y.removeAttribute("suffix"),o.classList.toggle("hidden",l.children.length>0),l.children.length>0)o.setAttribute("tabindex","-1");else o.removeAttribute("tabindex");l.style.display=l.children.length===0?"none":"",I1(o,"required",!this.optional)}}class o4 extends a{static preferredTagName="tosi-form";context={};value={};get isValid(){return[...this.querySelectorAll("*")].filter((i)=>i.required!==void 0).find((i)=>!i.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=[I5({part:"header",name:"header"}),m7({part:"form"},I5({part:"content"})),I5({part:"footer",name:"footer"})];getField=(l)=>{return this.querySelector(`tosi-field[key="${l}"]`)};get fields(){if(typeof this.value==="string")try{this.value=JSON.parse(this.value)}catch(o){console.log("<tosi-form> could not use its value, expects valid JSON"),this.value={}}let{getField:l}=this,i=this.dispatchEvent.bind(this);return new Proxy(this.value,{get(o,y){return o[y]},set(o,y,s){if(o[y]!==s){o[y]=s;let x=l(y);if(x)x.value=s;i(new Event("change"))}return!0}})}set fields(l){let i=[...this.querySelectorAll("tosi-field")];for(let o of i)o.value=l[o.key]}submit=()=>{this.parts.form.dispatchEvent(new Event("submit"))};handleSubmit=(l)=>{l.preventDefault(),l.stopPropagation();let i=this.fields;this.submitCallback(i,this.isValid)};submitCallback=(l,i)=>{console.log("override submitCallback to handle this data",{value:l,isValid:i})};connectedCallback(){super.connectedCallback();let{form:l}=this.parts;l.addEventListener("submit",this.handleSubmit),this.addEventListener("change",this.handleElementChange,!0),this.initializeNamedElements()}handleElementChange=(l)=>{let i=l.target,o=i.getAttribute("name");if(o&&"value"in i)this.fields[o]=i.value};initializeNamedElements(){let l=this.fields,i=this.querySelectorAll("[name], [key]");for(let o of i){let y=o.getAttribute("name")||o.getAttribute("key");if(y&&l[y]!==void 0)o.value=l[y]}}}var yo=i4,so=o4,Oi=i4.elementCreator(),Ui=o4.elementCreator(),xo=Oi,ho=Ui;var{a:co}=w;class S5 extends a{static preferredTagName="tosi-header";static shadowStyleSpec={":host":{display:"flex",alignItems:"center",padding:k.tosiHeaderPadding("12px 24px"),background:k.tosiHeaderBg("var(--tosi-accent, #EE257B)"),lineHeight:k.tosiHeaderLineHeight("32px"),gap:k.tosiHeaderGap("8px")},"::slotted(*)":{display:"inline-flex",alignItems:"center"}};content=({slot:l})=>[l()]}var ro=S5.elementCreator(),Xi={tosijs:()=>t.tosi(),discord:()=>t.discord(),blog:()=>t.blog(),github:()=>t.github(),npm:()=>t.npm()};class D5 extends a{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 l=[];for(let[i,o]of Object.entries(this.links)){if(!o||!Xi[i])continue;l.push(co({title:i,target:"_blank",href:o},Xi[i]()))}this.replaceChildren(...l)}}var no=D5.elementCreator();function Ni(){return navigator.getGamepads().filter((i)=>i!==null).map((i)=>{let{id:o,axes:y,buttons:s}=i;return{id:o,axes:y,buttons:s.map((x,h)=>{let{pressed:c,value:r}=x;return{index:h,pressed:c,value:r}}).filter((x)=>x.pressed||x.value!==0).reduce((x,h)=>{return x[h.index]=h.value,x},{})}})}function Co(){let l=Ni();return l.length===0?"no active gamepads":l.map(({id:i,axes:o,buttons:y})=>{let s=o.map((h)=>h.toFixed(2)).join(" "),x=Object.keys(y).map((h)=>`[${h}](${y[Number(h)].toFixed(2)})`).join(" ");return`${i}
92
92
  ${s}
93
93
  ${x}`}).join(`
94
- `)}function oo(l){let i={};return l.input.onControllerAddedObservable.add((o)=>{o.onMotionControllerInitObservable.add((y)=>{let s={};y.getComponentIds().forEach((h)=>{let c=y.getComponent(h);if(s[h]={pressed:c.pressed,touched:c.touched,value:c.value,axes:{x:c.axes.x,y:c.axes.y}},c.onButtonStateChangedObservable.add((r)=>{s[h].pressed=r.pressed,s[h].touched=r.touched,s[h].value=r.value}),c.onAxisValueChangedObservable)c.onAxisValueChangedObservable.add((r)=>{s[h].axes={x:r.x,y:r.y}})}),i[y.handedness]=s})}),i}function yo(l){if(l===void 0||Object.keys(l).length===0)return"no xr inputs";return Object.keys(l).map((i)=>{let o=l[i],y=[];for(let[s,x]of Object.entries(o)){let h=[];if(x.pressed)h.push("P");if(x.touched)h.push("T");let c=x.value>0,r=x.axes.x!==0||x.axes.y!==0;if(h.length>0||c||r){let n=`${s}[${h.join("")}]`;if(c)n+=` v:${x.value.toFixed(2)}`;if(r)n+=` x:${x.axes.x.toFixed(2)} y:${x.axes.y.toFixed(2)}`;y.push(n)}}return`${i}
94
+ `)}function go(l){let i={};return l.input.onControllerAddedObservable.add((o)=>{o.onMotionControllerInitObservable.add((y)=>{let s={};y.getComponentIds().forEach((h)=>{let c=y.getComponent(h);if(s[h]={pressed:c.pressed,touched:c.touched,value:c.value,axes:{x:c.axes.x,y:c.axes.y}},c.onButtonStateChangedObservable.add((r)=>{s[h].pressed=r.pressed,s[h].touched=r.touched,s[h].value=r.value}),c.onAxisValueChangedObservable)c.onAxisValueChangedObservable.add((r)=>{s[h].axes={x:r.x,y:r.y}})}),i[y.handedness]=s})}),i}function ko(l){if(l===void 0||Object.keys(l).length===0)return"no xr inputs";return Object.keys(l).map((i)=>{let o=l[i],y=[];for(let[s,x]of Object.entries(o)){let h=[];if(x.pressed)h.push("P");if(x.touched)h.push("T");let c=x.value>0,r=x.axes.x!==0||x.axes.y!==0;if(h.length>0||c||r){let n=`${s}[${h.join("")}]`;if(c)n+=` v:${x.value.toFixed(2)}`;if(r)n+=` x:${x.axes.x.toFixed(2)} y:${x.axes.y.toFixed(2)}`;y.push(n)}}return`${i}
95
95
  ${y.join(`
96
96
  `)||"(idle)"}`}).join(`
97
- `)}var{slot:T5}=w;class e5 extends a{static preferredTagName="tosi-row";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[T5()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"row",gap:g.tosiRowGap("0"),alignItems:g.tosiRowAlign("stretch"),justifyContent:g.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 so=e5.elementCreator();class u5 extends a{static preferredTagName="tosi-column";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[T5()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"column",gap:g.tosiColumnGap("0"),alignItems:g.tosiColumnAlign("stretch"),justifyContent:g.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 xo=u5.elementCreator();class L5 extends a{static preferredTagName="tosi-grid";static initAttributes={columns:"",rows:"",gap:""};content=[T5()];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:g.tosiGridColumns("1fr"),gridTemplateRows:g.tosiGridRows("auto"),gap:g.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 ho=L5.elementCreator(),{span:Xi}=w,Ni=(...l)=>Xi({style:{flex:"1 1 var(--tosi-space, 0.5em)"}},...l),M5=(...l)=>Xi({style:{flex:"0 0 var(--tosi-space, 0.5em)"}},...l);var q1={accent:f.fromCss("#EE257B"),background:f.fromCss("#fafafa"),text:f.fromCss("#222222")},Ki={_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 bi(l){let{accent:i,background:o,text:y}=l,s=l.accentText??i.contrasting(),x=l.backgroundInset??o.darken(0.03),h=l.border??y.opacity(0.15),c=l.shadow??y.opacity(0.1),r=l.focus??i.opacity(0.5);return{_tosiAccent:i,_tosiAccentLight:i.brighten(0.15),_tosiAccentDark:i.darken(0.15),_tosiAccentText:s,_tosiBg:o,_tosiBgInset:x,_tosiBgHover:o.darken(0.05),_tosiBgActive:o.darken(0.1),_tosiText:y,_tosiTextMuted:y.opacity(0.6),_tosiTextDisabled:y.opacity(0.4),_tosiBorder:h,_tosiBorderFocus:i,_tosiShadow:c,_tosiShadowColor:c,_tosiFocusRing:`0 0 0 2px ${r}`,_tosiInputBg:o,_tosiInputBorder:h,_tosiInputBorderFocus:i,_tosiButtonBg:o,_tosiButtonText:y,_tosiButtonBorder:h,_tosiButtonHoverBg:o.darken(0.05),_tosiButtonActiveBg:i,_tosiButtonActiveText:s}}function q2(l){return{":root":{...Ki,...bi(l)}}}function y4(l){let o=q2(l)[":root"];return{":root":Y4(o)}}function m5(l,i="tosi-theme"){O1(i,l)}var co=q2(q1),ro=y4(q1),Fi={"--xin-icon-size":d.tosiIconSize,"--xin-icon-fill":d.tosiIconFill,"--xin-icon-stroke":d.tosiIconStroke,"--xin-tabs-bar-color":d.tosiTabsBarColor,"--xin-tabs-bar-height":d.tosiTabsBarHeight,"--xin-tabs-selected-color":d.tosiTabsSelectedColor,"--spacing":d.tosiSpacing,"--gap":d.tosiSpacingSm,"--touch-size":d.tosiTouchSize,"--background":d.tosiBg,"--text-color":d.tosiText,"--brand-color":d.tosiAccent,"--brand-text-color":d.tosiAccentText};function no(l){return{":root":{...q2(l)[":root"],...Fi}}}function Co(l,i){let o={};for(let[y,s]of Object.entries(i)){let x=`--tosi-${l}-${y.replace(/([A-Z])/g,"-$1").toLowerCase()}`;o[y]=`var(${x}, ${s})`}return o}var{div:_2,label:s4,input:x4,span:go,button:Wi}=w,{liveTheme:b}=S({liveTheme:{accent:String(q1.accent),background:String(q1.background),text:String(q1.text),dark:!1}}),h4=!1;function l0(){if(!h4)return;let l={accent:f.fromCss(b.accent.value),background:f.fromCss(b.background.value),text:f.fromCss(b.text.value)},i=b.dark.value?y4(l):q2(l);m5(i,"tosi-live-theme")}function Qi(){if(h4)return;h4=!0,b.accent.observe(l0),b.background.observe(l0),b.text.observe(l0),b.dark.observe(l0),l0()}function ko(){h4=!1}class E5 extends a{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=()=>[_2({class:"field"},s4("Accent"),x4({type:"color",part:"accent"})),_2({class:"field"},s4("Background"),x4({type:"color",part:"background"})),_2({class:"field"},s4("Text"),x4({type:"color",part:"text"})),_2({class:"field"},s4("Dark mode"),x4({type:"checkbox",part:"dark"})),_2({class:"preview",part:"preview",style:{background:"var(--tosi-bg, #fafafa)",color:"var(--tosi-text, #222)"}},go("Preview "),Wi({class:"preview-button",style:{background:"var(--tosi-accent, #EE257B)",color:"var(--tosi-accent-text, white)"}},"Button")),_2({class:"actions"},Wi({part:"reset"},"Reset"))];connectedCallback(){super.connectedCallback(),Qi();let l=()=>{this.parts.accent.value=b.accent.value,this.parts.background.value=b.background.value,this.parts.text.value=b.text.value,this.parts.dark.checked=b.dark.value};l(),b.accent.observe(l),b.background.observe(l),b.text.observe(l),b.dark.observe(l),this.parts.accent.addEventListener("input",()=>{b.accent.value=this.parts.accent.value}),this.parts.background.addEventListener("input",()=>{b.background.value=this.parts.background.value}),this.parts.text.addEventListener("input",()=>{b.text.value=this.parts.text.value}),this.parts.dark.addEventListener("change",()=>{b.dark.value=this.parts.dark.checked}),this.parts.reset.addEventListener("click",()=>{b.accent.value=String(q1.accent),b.background.value=String(q1.background),b.text.value=String(q1.text),b.dark.value=!1})}}var po=E5.elementCreator();var{div:wo}=w;class h2 extends a{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(l){}formResetCallback(){this.value="",this.coords="65.01715565258993,25.48081004203459,12"}content=wo({style:{width:"100%",height:"100%"}});get map(){return this._map}static mapboxCSSAvailable;static mapboxAvailable;_map;static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"400px",height:"400px",textAlign:"left"}};constructor(){super();if(h2.mapboxCSSAvailable===void 0)h2.mapboxCSSAvailable=q0("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.css").catch((l)=>{console.error("failed to load mapbox-gl.css",l)}),h2.mapboxAvailable=x1("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.js").catch((l)=>{console.error("failed to load mapbox-gl.js",l)})}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[s,x,h]=this.coords.split(",").map((c)=>Number(c));this._map.setCenter([x,s]),this._map.setZoom(h),this._lastCoords=this.coords}if(this.mapStyle!==this._lastStyle)this._map.setStyle(this.mapStyle),this._lastStyle=this.mapStyle;return}let{div:l}=this.parts,[i,o,y]=this.coords.split(",").map((s)=>Number(s));this._lastCoords=this.coords,this._lastStyle=this.mapStyle,h2.mapboxAvailable.then(({mapboxgl:s})=>{console.log("%cmapbox may complain about missing css -- don't panic!","background: orange; color: black; padding: 0 5px;"),s.accessToken=this.token,this._map=new s.Map({container:l,style:this.mapStyle,zoom:y,center:[o,i]}),this._map.on("render",()=>this._map.resize()),this._map.on("moveend",()=>{let x=this._map.getCenter(),h=this._map.getZoom(),c=`${x.lat.toFixed(6)},${x.lng.toFixed(6)},${h.toFixed(1)}`;if(c!==this.value){if(this.internals)this.internals.setFormValue(c)}})})}}var to=h2.elementCreator();var{div:l3,span:c4,button:i3}=w,i0=86400000,ao=[0,1,2,3,4,5,6],Bo=[1,2,3,4,5,6,7,8,9,10,11,12],o3=(l,i=2,o="0")=>String(l).padStart(i,o),o0=(l,i,o)=>new Date(`${l}-${o3(i)}-${o3(o)}`);class y3 extends a{static preferredTagName="tosi-month";static lightStyleSpec={":host":{display:"block"},":host [part=header]":{display:"flex",alignItems:"stretch",justifyContent:"stretch"},":host[disabled]":{pointerEvents:"none",opacity:g.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:g.monthTodayBackground("transparent"),boxShadow:g.monthTodayShadow("none"),backdropFilter:g.monthTodayBackdropFilter("brightness(0.9)"),fontWeight:g.monthTodayFontWeight("800")},":host .day, :host .date":{padding:5,display:"flex",justifyContent:"center",userSelect:"none"},":host .day":{color:g.monthDayColor("hotpink"),background:g.monthDayBackground("white"),fontWeight:g.monthDayFontWeight("800")},":host .date":{cursor:"default"},":host .weekend":{background:g.monthWeekendBackground("#eee")},":host .date:not(.in-month)":{opacity:0.5},":host .date.checked":{color:g.monthDateCheckedColor("white"),background:g.monthDateCheckedBackground("hotpink")},":host:not([range]) .date.checked":{borderRadius:g.monthDateCheckedBorderRadius("10px")},":host .range-start":{borderTopLeftRadius:g.monthDateCheckedBorderRadius("10px"),borderBottomLeftRadius:g.monthDateCheckedBorderRadius("10px")},":host .range-end":{borderTopRightRadius:g.monthDateCheckedBorderRadius("10px"),borderBottomRightRadius:g.monthDateCheckedBorderRadius("10px")}};static formAssociated=!0;static initAttributes={month:NaN,year:NaN,weekStart:0,minDate:o0(new Date().getFullYear()-100,1,1).toISOString().split("T")[0],maxDate:o0(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(l){this.disabled=l}formResetCallback(){this.value="",this.selectedDays=[]}get endDay(){return 1-this.weekStart}get months(){return Bo.map((l)=>({caption:o0(2025,l,1).toString().split(" ")[1],value:String(l)}))}get years(){let l=Number(this.minDate.split("-")[0]),i=Number(this.maxDate.split("-")[0]),o=[];for(let y=l;y<=i;y++)o.push(String(y));return o}monthChanged=(l,i)=>{};gotoMonth(l,i){if(this.month!==i||this.year!==l)this.month=i,this.year=l,this.monthChanged(l,i)}setMonth=()=>{this.gotoMonth(Number(this.parts.year.value),Number(this.parts.month.value))};get to(){return this.selectedDays[1]||""}set to(l){this.selectedDays[1]=l,this.selectedDays.splice(2)}get from(){return this.selectedDays[0]||""}set from(l){this.selectedDays[0]=l,this.selectedDays.splice(2)}clickDate=(l)=>{let i=l.target.getAttribute("title");this.selectDate(i)};keyDate=(l)=>{let i=!1;switch(l.code){case"Space":{let o=l.target.getAttribute("title");this.selectDate(o),i=!0;break}case"Tab":break;default:console.log(l)}if(i)l.preventDefault(),l.stopPropagation()};#l="";selectDate=(l)=>{if(this.#l=l,this.range){if(!this.to)this.selectedDays=[l,l];else if(this.from===l&&this.to===l)this.selectedDays=[];else if(this.from===l)this.from=this.to;else if(this.to===l)this.to=this.from;else if(l<this.from)this.from=l;else if(l>this.to)this.to=l;else this.to=l;this.value=`${this.from},${this.to}`}else if(this.multiple){if(this.selectedDays.includes(l))this.selectedDays.splice(this.selectedDays.indexOf(l),1);else this.selectedDays.push(l),this.selectedDays.sort();this.value=this.selectedDays.join(",")}else if(this.selectable)if(this.selectedDays.includes(l))this.value="",this.selectedDays=[];else this.value=l,this.selectedDays=[l]};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=(l)=>{if(!this.range)return this.selectedDays.includes(l);else if(this.range)return this.from&&l>=this.from&&l<=this.to;return!1};dateMenuItem=(l,i="")=>{return l=l.split("T")[0],{caption:i||l,enabled:()=>!l.startsWith(`${this.year}-${o3(this.month)}-`),action:()=>{this.gotoDate(l)}}};jumpMenu=()=>{G({target:this.parts.jump,menuItems:[this.dateMenuItem(new Date().toISOString(),"This Month"),...this.selectedDays.length===0?[]:[null],...this.selectedDays.map((l)=>this.dateMenuItem(l))]})};content=()=>[l3({part:"header"},i3({part:"previous",onClick:this.previousMonth},t.chevronLeft()),c4({style:{flex:"1"}}),i3({part:"jump",onClick:this.jumpMenu},t.calendar()),h1({part:"month",options:this.months,onChange:this.setMonth}),h1({part:"year",options:[this.year],onChange:this.setMonth}),c4({style:{flex:"1"}}),i3({part:"next",onClick:this.nextMonth},t.chevronRight())),l3({part:"week"}),l3({part:"days"})];gotoDate(l){let i=new Date(l);this.gotoMonth(i.getFullYear(),i.getMonth()+1)}connectedCallback(){super.connectedCallback();let l=new Date(this.value.split(",").pop()||Date.now());if(isNaN(this.month))this.month=l.getMonth()+1;if(isNaN(this.year))this.year=l.getFullYear()}days=[];render(){super.render();let{week:l,days:i,jump:o,month:y,year:s,previous:x,next:h}=this.parts;this.selectedDays=this.value?this.value.split(","):[];let c=o0(this.year,this.month,1),r=new Date(c.valueOf()-(7+c.getDay()-this.weekStart)%7*i0),n=this.month===12?1:this.month+1,C=new Date(o0(this.year+(this.month===12?1:0),n,1).valueOf()-i0),k=new Date(C.valueOf()+(this.weekStart*2+5+this.endDay-C.getDay())%7*i0),p=ao.map((P)=>new Date(r.valueOf()+P*i0).toString().split(" ")[0]);this.days=[];let z=new Date().toISOString().split("T")[0];for(let P=r.valueOf();P<=k.valueOf();P+=i0){let q=new Date(P),_=q.toISOString().split("T")[0];this.days.push({date:q,selected:!1,inMonth:q.getMonth()+1===this.month,isToday:_===z,isWeekend:q.getDay()%6===0,inRange:!!(this.from&&_>=this.from&&_<=this.to)})}y.value=String(this.month),s.value=String(this.year),y.disabled=s.disabled=o.disabled=x.disabled=h.disabled=this.disabled||this.readonly,s.options=this.years,l.textContent="",l.append(...p.map((P)=>c4({class:"day"},P))),i.textContent="";let B=null,{to:j,from:V}=this;i.append(...this.days.map((P)=>{let q=["date"];if(P.inMonth)q.push("in-month");if(P.isToday)q.push("today");let _=P.date.toISOString().split("T")[0];if(this.checkDay(_))q.push("checked");if(q.push(P.isWeekend?"weekend":"weekday"),this.range){if(j===_)q.push("range-end");if(V===_)q.push("range-start")}let N=c4({class:q.join(" "),title:_,onClick:this.clickDate,onKeydown:this.keyDate,tabindex:"0"},P.date.getDate());if(_===this.#l)B=N;return N})),B?.focus()}}var vo=y3.elementCreator();var{div:s3,button:zo}=w,fo={error:"red",warn:"orange",info:"royalblue",log:"gray",success:"green",progress:"royalblue"};class S1 extends a{static preferredTagName="tosi-notification";static singleton;static shadowStyleSpec={":host":{_notificationSpacing:8,_notificationWidth:360,_notificationPadding:`${d.notificationSpacing} ${d.notificationSpacing50} ${d.notificationSpacing} ${d.notificationSpacing200}`,_notificationBg:"#fafafa",_notificationAccentColor:"#aaa",_notificationTextColor:"#444",_notificationIconSize:d.notificationSpacing300,_notificationButtonSize:48,_notificationBorderWidth:"3px 0 0",_notificationBorderRadius:d.notificationSpacing50,position:"fixed",left:0,right:0,bottom:0,paddingBottom:d.notificationSpacing,width:d.notificationWidth,display:"flex",flexDirection:"column-reverse",margin:"0 auto",gap:d.notificationSpacing,maxHeight:"50vh",overflow:"hidden auto",boxShadow:"none !important"},":host *":{color:d.notificationTextColor},":host .note":{display:"grid",background:d.notificationBg,padding:d.notificationPadding,gridTemplateColumns:`${d.notificationIconSize} 1fr ${d.notificationButtonSize}`,gap:d.notificationSpacing,alignItems:"center",borderRadius:d.notificationBorderRadius,boxShadow:`0 2px 8px #0006, inset 0 0 0 2px ${d.notificationAccentColor}`,borderColor:d.notificationAccentColor,borderWidth:d.notificationBorderWidth,borderStyle:"solid",transition:"0.5s ease-in",transitionProperty:"margin, opacity",zIndex:1},":host .note .icon":{stroke:d.notificationAccentColor},":host .note button":{display:"flex",lineHeight:d.notificationButtonSize,padding:0,margin:0,height:d.notificationButtonSize,width:d.notificationButtonSize,background:"transparent",alignItems:"center",justifyContent:"center",boxShadow:"none",border:"none",position:"relative"},":host .note button:hover svg":{stroke:d.notificationAccentColor},":host .note button:active svg":{borderRadius:99,stroke:d.notificationBg,background:d.notificationAccentColor,padding:d.spacing50},":host .note svg":{height:d.notificationIconSize,width:d.notificationIconSize,pointerEvents:"none"},":host .message":{display:"flex",flexDirection:"column",alignItems:"center",gap:d.notificationSpacing},":host .note.closing":{opacity:0,zIndex:0}};static removeNote(l){l.classList.add("closing"),l.style.marginBottom=-l.offsetHeight+"px";let i=()=>{l.remove()};l.addEventListener("transitionend",i),setTimeout(i,1000)}static post(l){let{message:i,duration:o,type:y,close:s,progress:x,icon:h,color:c}=Object.assign({type:"info",duration:-1},typeof l==="string"?{message:l}:l);if(!this.singleton)this.singleton=x3();let r=this.singleton;document.body.append(r),r.style.zIndex=String(l2()+1);let n=c||fo[y],C=x||y==="progress"?w.progress():{},k=()=>{if(s)s();S1.removeNote(B)},p=h instanceof SVGElement?h:h?t[h]({class:"icon"}):t.info({class:"icon"}),z=y==="error"||y==="warn",B=s3({class:`note ${y}`,role:z?"alert":"status",ariaLive:z?"assertive":"polite",style:{_notificationAccentColor:n}},p,s3({class:"message"},s3(i),C),zo({class:"close",title:"close",ariaLabel:"Close notification",apply(j){j.addEventListener("click",k)}},t.x()));if(r.shadowRoot.append(B),C instanceof HTMLProgressElement&&x instanceof Function){C.setAttribute("max",String(100)),C.value=x();let j=setInterval(()=>{if(!r.shadowRoot.contains(B)){clearInterval(j);return}let V=x();if(C.value=V,V>=100)S1.removeNote(B)},1000)}if(o>0)setTimeout(()=>{S1.removeNote(B)},o*1000);return B.scrollIntoView(),k}content=null}var jo=S1,x3=S1.elementCreator(),Ao=x3;function qo(l){return S1.post(l)}var Gi=async(l,i="SHA-1")=>{let y=new TextEncoder().encode(l),s=await crypto.subtle.digest(i,y);return Array.from(new Uint8Array(s)).map((c)=>c.toString(16).padStart(2,"0")).join("")},Zi=async(l)=>{let i=await Gi(l),o=await fetch(`https://weakpass.com/api/v1/search/${i}`);if(o.ok){let y=await o.json();console.log("password found in weakpass database",y)}return o.status!==404},{span:h3,xinSlot:_o}=w;class r4 extends a{static preferredTagName="tosi-password-strength";static lightStyleSpec={":host":{display:"inline-flex",flexDirection:"column",gap:d.spacing50,position:"relative"},":host xin-slot":{display:"flex"},':host [part="meter"]':{display:"block",position:"relative",height:g.meterHeight("24px"),background:g.indicatorBg("white"),borderRadius:g.meterRadius("4px"),boxShadow:g.meterShadow(`inset 0 0 0 2px ${d.indicatorColor}`)},':host [part="level"]':{height:g.levelHeight("20px"),content:'" "',display:"inline-block",width:0,transition:"0.15s ease-out",background:d.indicatorColor,margin:g.levelMargin("2px"),borderRadius:g.levelRadius("2px")},':host [part="description"]':{position:"absolute",inset:"0",color:d.descriptionColor,height:g.meterHeight("24px"),lineHeight:g.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(l){return this.issues={tooShort:l.length<this.minLength,short:l.length<this.goodLength,noUpper:!l.match(/[A-Z]/),noLower:!l.match(/[a-z]/),noNumber:!l.match(/[0-9]/),noSpecial:!l.match(/[^a-zA-Z0-9]/)},this.issues.tooShort?0:Object.values(this.issues).filter((i)=>!i).length-1}async isBreached(){let l=this.querySelector("input")?.value;if(!l||typeof l!=="string")return!0;return await Zi(l)}updateIndicator=(l)=>{let{level:i,description:o}=this.parts,y=this.indicatorColors.split(","),s=this.descriptionColors.split(","),x=this.strength(l);if(this.value!==x)this.value=x,this.dispatchEvent(new Event("change"));i.style.width=`${(x+1)*16.67}%`,this.style.setProperty("--indicator-color",y[x]),this.style.setProperty("--description-color",s[x]),o.textContent=this.strengthDescriptions[x]};update=(l)=>{let i=l.target.closest("input");this.updateIndicator(i?.value||"")};content=()=>[_o({onInput:this.update}),h3({part:"meter"},h3({part:"level"}),h3({part:"description"}))];render(){super.render();let l=this.querySelector("input");this.updateIndicator(l?.value)}}var Vo=r4,Ri=r4.elementCreator(),Po=Ri;var{span:c3}=w;class n4 extends a{static preferredTagName="tosi-rating";static formAssociated=!0;static initAttributes={max:5,min:1,icon:"star",step:1,ratingStroke:"#e81",ratingFill:"#f91",emptyStroke:"none",emptyFill:"#ccc",readonly:!1,iconSize:24,hollow:!1,required:!1,name:""};value="";formDisabledCallback(l){this.readonly=l}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=()=>c3({part:"container"},c3({part:"empty"}),c3({part:"filled"}));displayValue(l){let{empty:i,filled:o}=this.parts,s=Math.round((typeof l==="string"?0:l||0)/this.step)*this.step;o.style.width=s/this.max*i.offsetWidth+"px"}update=(l)=>{if(this.readonly)return;let{empty:i}=this.parts,o=l instanceof MouseEvent?l.pageX-i.getBoundingClientRect().x:0,y=Math.min(Math.max(this.min,Math.round(o/i.offsetWidth*this.max/this.step+this.step*0.5)*this.step),this.max);if(l.type==="click")this.value=y;else if(l.type==="mousemove")this.displayValue(y);else this.displayValue(this.value||0)};handleKey=(l)=>{let i=this.value===""?NaN:Number(this.value);if(isNaN(i))i=Math.round((this.min+this.max)*0.5*this.step)*this.step;let o=!1;switch(l.key){case"ArrowUp":case"ArrowRight":i+=this.step,o=!0;break;case"ArrowDown":case"ArrowLeft":i-=this.step,o=!0;break}if(this.value=Math.max(Math.min(i,this.max),this.min),o)l.stopPropagation(),l.preventDefault()};connectedCallback(){super.connectedCallback();let{container:l}=this.parts;l.tabIndex=0,l.addEventListener("mousemove",this.update,!0),l.addEventListener("mouseleave",this.update),l.addEventListener("blur",this.update),l.addEventListener("click",this.update),l.addEventListener("keydown",this.handleKey)}_renderedIcon="";render(){super.render();let l=this.iconSize+"px";if(this.style.setProperty("--tosi-icon-size",l),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:i,filled:o}=this.parts;if(i.classList.toggle("hollow",this.hollow),i.style.setProperty("--tosi-icon-fill",this.emptyFill),i.style.setProperty("--tosi-icon-stroke",this.emptyStroke),o.style.setProperty("--tosi-icon-fill",this.ratingFill),o.style.setProperty("--tosi-icon-stroke",this.ratingStroke),this._renderedIcon!==this.icon){this._renderedIcon=this.icon;for(let y=0;y<this.max;y++)i.append(t[this.icon]()),o.append(t[this.icon]())}this.displayValue(this.value)}}var Oo=n4,Ji=n4.elementCreator(),Uo=u((...l)=>Ji(...l),"xinRating is deprecated, use tosiRating instead (tag is now <tosi-rating>)");var{xinSlot:Hi,div:Xo,button:No,span:pc}=w,Ko=[{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 r3(l=Ko){return h1({title:"paragraph style",slot:"toolbar",class:"block-style",options:l.map(({caption:i,tagType:o})=>({caption:i,value:`formatBlock,${o}`}))})}var y0=()=>M5({slot:"toolbar"});function p1(l,i,o){return No({slot:"toolbar",dataCommand:i,title:l},o)}var bo=()=>[p1("left-justify","justifyLeft",t.alignLeft()),p1("center","justifyCenter",t.alignCenter()),p1("right-justify","justifyRight",t.alignRight()),y0(),p1("bullet list","insertUnorderedList",t.listBullet()),p1("numbered list","insertOrderedList",t.listNumber()),y0(),p1("indent","indent",t.indent()),p1("indent","outdent",t.outdent())],$i=()=>[p1("bold","bold",t.fontBold()),p1("italic","italic",t.fontItalic()),p1("underline","underline",t.fontUnderline())],Fo=()=>[r3(),y0(),...$i()],Yi=()=>[r3(),y0(),...bo(),y0(),...$i()];class C4 extends a{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(l){if(this.isInitialized)this.parts.doc.contentEditable=l?"false":"true"}formResetCallback(){this.value=""}_value="";get value(){return this.isInitialized?this.parts.doc.innerHTML:this._value}set value(l){let i=this._value;if(this._value=l,this.isInitialized){if(this.parts.doc.innerHTML!==l)this.parts.doc.innerHTML=l}if(i!==l&&this.internals)this.internals.setFormValue(l)}blockElement(l){let{doc:i}=this.parts;while(l.parentElement!==null&&l.parentElement!==i)l=l.parentElement;return l.parentElement===i?l:void 0}get selectedBlocks(){let{doc:l}=this.parts,i=window.getSelection();if(i===null)return[];let o=[];for(let y=0;y<i.rangeCount;y++){let s=i.getRangeAt(y);if(!l.contains(s.commonAncestorContainer))continue;let x=this.blockElement(s.startContainer),h=this.blockElement(s.endContainer);o.push(x);while(x!==h&&x!==null)x=x.nextElementSibling,o.push(x)}return o}get selectedText(){let l=window.getSelection();if(l===null)return"";return this.selectedBlocks.length?l.toString():""}selectionChange=()=>{};_updatingBlockStyle=!1;handleSelectChange=(l)=>{if(this._updatingBlockStyle)return;let o=l.target?.closest(v1.tagName);if(o==null)return;this.doCommand(o.value)};handleButtonClick=(l)=>{let o=l.target?.closest("button");if(o==null)return;this.doCommand(o.dataset.command)};content=[Hi({name:"toolbar",part:"toolbar",onClick:this.handleButtonClick,onChange:this.handleSelectChange}),Xo({part:"doc",contenteditable:!0,style:{flex:"1 1 auto",outline:"none"}}),Hi({part:"content"})];doCommand(l){if(l===void 0)return;let i=l.split(",");console.log("execCommand",i[0],!1,...i.slice(1)),document.execCommand(i[0],!1,...i.slice(1))}updateBlockStyle(){let l=this.parts.toolbar.querySelector(".block-style");if(l===null)return;let i=this.selectedBlocks.map((o)=>o.tagName);i=[...new Set(i)],this._updatingBlockStyle=!0,l.value=i.length===1?`formatBlock,${i[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:l,content:i}=this.parts;if(i.innerHTML!==""&&l.innerHTML==="")l.innerHTML=i.innerHTML,i.innerHTML="";this.isInitialized=!0,i.style.display="none",l.addEventListener("input",this.handleInput),this.updateValidity(),document.addEventListener("selectionchange",(o)=>{this.updateBlockStyle(),this.selectionChange(o,this)})}render(){let{toolbar:l}=this.parts;if(super.render(),l.children.length===0)switch(this.widgets){case"minimal":l.append(...Fo());break;case"default":l.append(...Yi());break}}}var Wo=C4,Ii=C4.elementCreator(),Qo=u((...l)=>Ii(...l),"richText is deprecated, use tosiRichText instead (tag is now <tosi-rich-text>)");var{router:s0}=S({router:{path:"",hash:"",pattern:""}}),n3={};function Go(){return{...n3}}var d4=[],C3=!1,g4=new Set;function Zo(l){let i=[];if(l==="")return{regex:/^\/?$/,paramNames:i};let o=l.split("/").map((s)=>{if(s.startsWith(":"))return i.push(s.slice(1)),"([^/]+)";return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});return{regex:new RegExp("^/?"+o.join("/")+"/?$"),paramNames:i}}function Ro(l){let i=l.split("?")[0].split("#")[0];for(let y of d4){if(y.fallback)continue;let s=i.match(y.regex);if(s){let x={};return y.paramNames.forEach((h,c)=>{x[h]=decodeURIComponent(s[c+1])}),{route:y,params:x}}}let o=d4.find((y)=>y.fallback);if(o)return{route:o,params:{}};return null}function x0(){let l=C3?window.location.hash.replace(/^#\/?/,""):window.location.pathname;s0.path.value=l,s0.hash.value=window.location.hash;let i=Ro(l);if(i){n3=i.params,s0.pattern.value=i.route.regex.source;let o=new Map;for(let y of i.route.targets)o.set(y.view??"default",y);for(let y of g4){let s=y.name||"default",x=o.get(s);if(x)y.replaceChildren(x.component(i.params));else y.replaceChildren()}}else{n3={},s0.pattern.value="";for(let o of g4)o.replaceChildren()}}var Si=!1;function Di(){if(Si)return;Si=!0,window.addEventListener("popstate",x0),window.addEventListener("hashchange",x0)}function Jo(l,i={}){C3=i.hashRouting??!1,d4=l.map((o)=>{let{regex:y,paramNames:s}=Zo(o.pattern);return{regex:y,paramNames:s,targets:o.targets,fallback:o.fallback??!1}}),Di(),x0()}function Ho(l){if(Di(),C3)window.location.hash="#/"+l.replace(/^\//,"");else window.history.pushState({},"","/"+l.replace(/^\//,""));x0()}class d3 extends a{static preferredTagName="tosi-route-view";static initAttributes={name:"default"};content=null;connectedCallback(){if(super.connectedCallback(),g4.add(this),d4.length>0)x0()}disconnectedCallback(){super.disconnectedCallback(),g4.delete(this)}}var $o=d3.elementCreator();var{div:Yo,slot:Io,label:So,span:Do,input:Ti}=w;class V2 extends a{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(l){if(typeof l==="string")this._choices=V2.parseChoicesString(l);else this._choices=l;this.queueRender()}static parseChoicesString(l){return l.split(",").filter((i)=>i.trim()!=="").map((i)=>{let[o,y]=i.split("=").map((c)=>c.trim()),[s,x]=(y||o).split(":").map((c)=>c.trim()),h=x?t[x]():"";return{value:o,icon:h,caption:s}})}value="";formDisabledCallback(l){}formResetCallback(){this.value=""}get values(){return(this.value||"").split(",").map((l)=>l.trim()).filter((l)=>l!=="")}content=()=>[Io(),Yo({part:"options"},Ti({part:"custom",hidden:!0}))];static shadowStyleSpec={":host":{display:"inline-flex",gap:g.segmentedOptionGap("8px"),alignItems:g.segmentedAlignItems("center")},":host, :host::part(options)":{flexDirection:g.segmentedDirection("row")},":host label":{display:"inline-grid",alignItems:"center",gap:g.segmentedOptionGap("8px"),gridTemplateColumns:g.segmentedOptionGridColumns("0px 24px 1fr"),padding:g.segmentedOptionPadding("4px 12px"),font:g.segmentedOptionFont("16px")},":host label:focus":{outline:"none",boxShadow:g.segmentedFocusShadow(`inset 0 0 0 2px ${g.segmentedOptionCurrentBackground("#44a")}`),borderRadius:g.segmentedOptionsBorderRadius("8px")},":host label:has(:checked)":{color:g.segmentedOptionCurrentColor("#eee"),background:g.segmentedOptionCurrentBackground("#44a")},":host label:has(:checked):focus":{boxShadow:g.segmentedCurrentFocusShadow(`inset 0 0 0 2px ${g.segmentedOptionCurrentColor("#eee")}`)},":host svg":{height:g.segmentOptionIconSize("16px"),stroke:g.segmentedOptionIconColor("currentColor")},":host label.no-icon":{gap:0,gridTemplateColumns:g.segmentedOptionGridColumns("0px 1fr")},':host input[type="radio"], :host input[type="checkbox"]':{visibility:g.segmentedInputVisibility("hidden")},":host::part(options)":{display:"flex",borderRadius:g.segmentedOptionsBorderRadius("8px"),background:g.segmentedOptionsBackground("#fff"),color:g.segmentedOptionColor("#222"),overflow:"hidden",alignItems:g.segmentedOptionAlignItems("stretch")},":host::part(custom)":{padding:g.segmentedOptionPadding("4px 12px"),color:g.segmentedOptionCurrentColor("#eee"),background:g.segmentedOptionCurrentBackground("#44a"),font:g.segmentedOptionFont("16px"),border:"0",outline:"none"},":host::part(custom)::placeholder":{color:g.segmentedOptionCurrentColor("#eee"),opacity:g.segmentedPlaceholderOpacity(0.75)}};valueChanged=!1;handleChange=()=>{let{options:l,custom:i}=this.parts;if(this.multiple){let o=[...l.querySelectorAll("input:checked")];this.value=o.map((y)=>y.value).join(",")}else{let o=l.querySelector("input:checked");if(!o)this.value="";else if(o.value)i.setAttribute("hidden",""),this.value=o.value;else i.removeAttribute("hidden"),i.focus(),i.select(),this.value=i.value}this.valueChanged=!0};handleKey=(l)=>{let i=!1;switch(l.code){case"Space":if(l.target instanceof HTMLLabelElement)l.target.click(),i=!0;break;case"Tab":if(!(l.target instanceof HTMLLabelElement))l.target.closest("label").focus();break;case"ArrowLeft":case"ArrowUp":{let o=l.target.closest("label");if(o.previousElementSibling instanceof HTMLLabelElement)o.previousElementSibling.focus()}i=!0;break;case"ArrowRight":case"ArrowDown":{let o=l.target.closest("label");if(o.nextElementSibling instanceof HTMLLabelElement)o.nextElementSibling.focus()}i=!0;break}if(i)l.preventDefault(),l.stopPropagation()};connectedCallback(){super.connectedCallback();let l=this.getAttribute("choices");if(l&&this._choices.length===0)this._choices=V2.parseChoicesString(l);let{options:i}=this.parts;if(this.name==="")this.name=this.instanceId;if(i.addEventListener("change",this.handleChange),i.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 l=[...this.choices];if(this.other&&!this.multiple){let[i,o]=this.other.split(":");l.push({value:"",caption:i,icon:o})}return l}get isOtherValue(){return Boolean(this.value===""||this.value&&!this._choicesWithOther.find((l)=>l.value===this.value))}render(){if(super.render(),this.valueChanged){this.valueChanged=!1;return}let{options:l,custom:i}=this.parts;l.textContent="";let o=this.multiple?"checkbox":"radio",{values:y,isOtherValue:s}=this;if(l.append(...this._choicesWithOther.map((x)=>{return So({tabindex:0},Ti({type:o,name:this.name,value:x.value,checked:y.includes(x.value)||x.value===""&&s,tabIndex:-1}),x.icon||{class:"no-icon"},this.localized?f1(x.caption):Do(x.caption))})),this.other&&!this.multiple)i.hidden=!s,i.value=s?this.value:"",i.placeholder=this.placeholder,l.append(i)}}var To=V2,ei=V2.elementCreator(),eo=u((...l)=>ei(...l),"xinSegmented is deprecated, use tosiSegmented instead (tag is now <tosi-segmented>)");var{slot:ui}=w;class g3 extends a{static preferredTagName="tosi-sizebreak";static initAttributes={minWidth:0,minHeight:0};value="normal";content=[ui({part:"normal"}),ui({part:"small",name:"small"})];static shadowStyleSpec={":host":{display:"inline-block",position:"relative"}};onResize=()=>{let{normal:l,small:i}=this.parts,o=this.offsetParent;if(!(o instanceof HTMLElement))return;else if(o.offsetWidth<this.minWidth||o.offsetHeight<this.minHeight)l.hidden=!0,i.hidden=!1,this.value="small";else l.hidden=!1,i.hidden=!0,this.value="normal"};connectedCallback(){super.connectedCallback(),globalThis.addEventListener("resize",this.onResize)}disconnectedCallback(){super.disconnectedCallback(),globalThis.removeEventListener("resize",this.onResize)}}var uo=g3.elementCreator();class k4 extends a{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:d.resizeIconFill}};content=t.resize();get minSize(){let{minWidth:l,minHeight:i}=getComputedStyle(this.target);return{width:parseFloat(l)||32,height:parseFloat(i)||32}}resizeTarget=(l)=>{let{target:i}=this;if(!i)return;let{offsetWidth:o,offsetHeight:y}=i;i.style.left=i.offsetLeft+"px",i.style.top=i.offsetTop+"px",i.style.bottom="",i.style.right="";let{minSize:s}=this;M(l,(x,h,c)=>{if(i.style.width=Math.max(s.width,o+x)+"px",i.style.height=Math.max(s.height,y+h)+"px",c.type==="mouseup")return!0},"nwse-resize")};connectedCallback(){if(super.connectedCallback(),!this.target)this.target=this.parentElement;let l={passive:!0};this.addEventListener("mousedown",this.resizeTarget,l),this.addEventListener("touchstart",this.resizeTarget,l)}}var Lo=k4,Li=k4.elementCreator(),Mo=Li;var{div:mo,input:Eo,span:ly,button:k3}=w;class h0 extends a{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":g.brandColor("blue"),"--tag-text-color":g.brandTextColor("white"),display:"inline-flex",borderRadius:g.tagRoundedRadius(d.spacing50),color:d.tagTextColor,background:d.tagBg,padding:`0 ${d.spacing75} 0 ${d.spacing75}`,height:`calc(${d.lineHeight} + ${d.spacing50})`,lineHeight:`calc(${d.lineHeight} + ${d.spacing50})`},':host > [part="caption"]':{position:"relative",whiteSpace:"nowrap",overflow:"hidden",flex:"1 1 auto",fontSize:g.fontSize("16px"),color:d.tagTextColor,textOverflow:"ellipsis"},':host [part="remove"]':{boxShadow:"none",margin:`0 ${d.spacing_50} 0 ${d.spacing25}`,padding:0,display:"inline-flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:d.spacing150,width:d.spacing150,color:d.tagCloseButtonColor,background:d.tagCloseButtonBg,borderRadius:g.tagCloseButtonRadius("99px"),opacity:d.tagButtonOpacity},':host [part="remove"]:hover':{background:d.tagCloseButtonBg,opacity:d.tagButtonHoverOpacity}};static initAttributes={caption:"",removeable:!1};removeCallback=()=>{this.remove()};content=()=>[ly({part:"caption"},this.caption),k3(t.x(),{type:"button",part:"remove",hidden:!this.removeable,ariaLabel:`Remove ${this.caption}`,onClick:this.removeCallback})]}var iy=h0,p3=h0.elementCreator(),oy=u((...l)=>p3(...l),"xinTag is deprecated, use tosiTag instead (tag is now <tosi-tag>)");class P2 extends a{static preferredTagName="tosi-tag-list";static lightStyleSpec={":host":{"--tag-list-bg":"#f8f8f8","--touch-size":"44px","--spacing":"16px",display:"grid",gridTemplateColumns:"auto",alignItems:"center",background:d.tagListBg,gap:d.spacing25,borderRadius:g.taglistRoundedRadius(d.spacing50),overflow:"hidden"},":host[editable]":{gridTemplateColumns:`0px auto ${d.touchSize}`},":host[editable][text-entry]":{gridTemplateColumns:`0px 2fr 1fr ${d.touchSize}`},':host [part="tagContainer"]':{display:"flex",content:'" "',alignItems:"center",background:d.inputBg,borderRadius:g.tagContainerRadius(d.spacing50),boxShadow:d.borderShadow,flexWrap:"nowrap",overflow:"auto hidden",gap:d.spacing25,minHeight:`calc(${d.lineHeight} + ${d.spacing})`,padding:d.spacing25},':host [part="tagMenu"]':{width:d.touchSize,height:d.touchSize,lineHeight:d.touchSize,textAlign:"center",padding:0,margin:0},":host [hidden]":{display:"none !important"},':host button[part="tagMenu"]':{background:d.brandColor,color:d.brandTextColor}};static formAssociated=!0;static initAttributes={name:"",textEntry:!1,editable:!1,placeholder:"enter tags",disabled:!1,required:!1};value="";get tags(){return this.value.split(",").map((l)=>l.trim()).filter((l)=>l!=="")}set tags(l){this.value=l.join(",")}_availableTags=[];get availableTags(){return this._availableTags}set availableTags(l){if(typeof l==="string")this._availableTags=P2.parseAvailableTagsString(l);else this._availableTags=l;this.queueRender()}static parseAvailableTagsString(l){return l.split(",").map((i)=>{let o=i.trim();return o===""?null:o})}connectedCallback(){super.connectedCallback();let l=this.getAttribute("available-tags");if(l&&this._availableTags.length===0)this._availableTags=P2.parseAvailableTagsString(l)}formDisabledCallback(l){this.disabled=l}formResetCallback(){this.value=""}addTag=(l)=>{let i=l.trim();if(i===""||this.tags.includes(i))return;this.tags=[...this.tags,i],this.queueRender(!0)};toggleTag=(l)=>{if(this.tags.includes(l))this.tags=this.tags.filter((i)=>i!==l),this.queueRender(!0);else this.addTag(l)};enterTag=(l)=>{let{tagInput:i}=this.parts;switch(l.key){case",":{let o=i.value.split(",")[0];this.addTag(o)}break;case"Enter":{let o=i.value.split(",")[0];this.addTag(o)}l.stopPropagation(),l.preventDefault();break;default:}};popSelectMenu=()=>{let{toggleTag:l}=this,{tagMenu:i}=this.parts,o=[...this.availableTags],y=this.tags.filter((x)=>!o.includes(x));if(y.length)o.push(null,...y);let s=o.map((x)=>{if(x===""||x===null)return null;else if(typeof x==="object")return{checked:()=>this.tags.includes(x.value),caption:x.caption,action(){l(x.value)}};else return{checked:()=>this.tags.includes(x),caption:x,action(){l(x)}}});G({target:i,width:"auto",menuItems:s})};content=()=>[k3({type:"button",style:{visibility:"hidden"},tabindex:-1}),mo({part:"tagContainer",class:"row",role:"list",ariaLabel:"Selected tags"}),Eo({part:"tagInput",class:"elastic",ariaLabel:"Enter new tag",onKeydown:this.enterTag}),k3({type:"button",title:"add tag",ariaLabel:"Select tags from list",ariaHaspopup:"listbox",part:"tagMenu",onClick:this.popSelectMenu},t.chevronDown())];removeTag=(l)=>{if(this.editable&&!this.disabled){let i=l.target.closest(h0.tagName);this.tags=this.tags.filter((o)=>o!==i.caption),i.remove(),this.queueRender(!0)}l.stopPropagation(),l.preventDefault()};render(){super.render();let{tagContainer:l,tagMenu:i,tagInput:o}=this.parts;if(i.disabled=this.disabled,o.value="",o.setAttribute("placeholder",this.placeholder),this.editable&&!this.disabled)i.toggleAttribute("hidden",!1),o.toggleAttribute("hidden",!this.textEntry);else i.toggleAttribute("hidden",!0),o.toggleAttribute("hidden",!0);l.textContent="";for(let y of this.tags)l.append(p3({caption:y,removeable:this.editable&&!this.disabled,removeCallback:this.removeTag}))}}var yy=P2,Mi=P2.elementCreator(),sy=u((...l)=>Mi(...l),"xinTagList is deprecated, use tosiTagList instead (tag is now <tosi-tag-list>)");var mi="1.4.11";var{span:xy}=w,c0=null,p4=null,w4=null,_1="tosi-tooltip";O1("tosi-tooltip",{[`.${_1}`]:{pointerEvents:"none",padding:g.tosiTooltipPadding("4px 10px"),borderRadius:g.tosiTooltipRadius("6px"),background:g.tosiTooltipBg("#333"),color:g.tosiTooltipColor("#fff"),fontSize:g.tosiTooltipFontSize("13px"),lineHeight:"1.4",maxWidth:g.tosiTooltipMaxWidth("280px"),whiteSpace:"pre-line",boxShadow:"0 2px 8px #0003",position:"relative"},[`.${_1} p`]:{margin:"0"},[`.${_1} code`]:{background:"#fff2",padding:"0 4px",borderRadius:"3px",fontSize:"0.9em"},[`.${_1} a`]:{color:"inherit"},[`.${_1}::before`]:{content:'""',position:"absolute",width:"8px",height:"8px",background:"inherit",transform:"rotate(45deg)"},[`.${_1}.tt-s::before`]:{top:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${_1}.tt-n::before`]:{bottom:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${_1}.tt-e::before`]:{left:"-4px",top:"var(--tosi-tooltip-arrow)"},[`.${_1}.tt-w::before`]:{right:"-4px",top:"var(--tosi-tooltip-arrow)"}});function O2(){if(p4!==null)clearTimeout(p4),p4=null;if(c0!==null)c0.remove(),c0=null;w4=null}function hy(l){if(l.startsWith("s"))return"tt-s";if(l.startsWith("n"))return"tt-n";if(l.startsWith("e"))return"tt-e";if(l.startsWith("w"))return"tt-w";return"tt-s"}function cy(l,i,o){let y=i.getBoundingClientRect(),s=l.getBoundingClientRect(),x=y.left+y.width*0.5,h=y.top+y.height*0.5,c;if(o.startsWith("s")||o.startsWith("n"))c=Math.max(8,Math.min(s.width-8,x-s.left))-4;else c=Math.max(8,Math.min(s.height-8,h-s.top))-4;l.style.setProperty("--tosi-tooltip-arrow",c+"px")}function ry(l,i){if(i)l=K(l);let o=xy({class:_1});return o.innerHTML=O.parseInline(l),o}function ny(l,i,o){O2(),w4=l;let{top:y,left:s,width:x}=l.getBoundingClientRect(),h=s+x*0.5,c=window.innerHeight,r=window.innerWidth,n=(y>c*0.5?"n":"s")+(h>r*0.5?"w":"e"),C=ry(i,o);C.classList.add(hy(n)),c0=J2({content:C,target:l,position:n,remainOnScroll:"remove",remainOnResize:"remove"}),requestAnimationFrame(()=>{if(c0&&w4)cy(C,l,n)})}function Cy(l){for(let i of l.composedPath())if(i instanceof HTMLElement&&i.dataset.tooltip)return i;return null}function dy(l={}){let{convertTitles:i=!0,delay:o=250,localize:y=!1}=l;document.addEventListener("pointermove",(s)=>{if(i){for(let c of s.composedPath())if(c instanceof HTMLElement&&c.title&&!c.dataset.tooltip){c.dataset.tooltip=c.title,c.removeAttribute("title");break}}let x=Cy(s);if(x===w4)return;if(O2(),!x)return;let h=x.dataset.tooltip||null;if(!h)return;p4=setTimeout(()=>ny(x,h,y),o)}),document.addEventListener("pointerleave",O2),document.addEventListener("pointerdown",O2),document.addEventListener("keydown",O2),window.addEventListener("scroll",O2,!0)}Object.assign(globalThis,{xinjs:G2,xinjsui:w3});})();
97
+ `)}var{slot:T5}=w;class u5 extends a{static preferredTagName="tosi-row";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[T5()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"row",gap:k.tosiRowGap("0"),alignItems:k.tosiRowAlign("stretch"),justifyContent:k.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 po=u5.elementCreator();class e5 extends a{static preferredTagName="tosi-column";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[T5()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"column",gap:k.tosiColumnGap("0"),alignItems:k.tosiColumnAlign("stretch"),justifyContent:k.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 wo=e5.elementCreator();class L5 extends a{static preferredTagName="tosi-grid";static initAttributes={columns:"",rows:"",gap:""};content=[T5()];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:k.tosiGridColumns("1fr"),gridTemplateRows:k.tosiGridRows("auto"),gap:k.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 to=L5.elementCreator(),{span:Ki}=w,bi=(...l)=>Ki({style:{flex:"1 1 var(--tosi-space, 0.5em)"}},...l),M5=(...l)=>Ki({style:{flex:"0 0 var(--tosi-space, 0.5em)"}},...l);var q1={accent:f.fromCss("#EE257B"),background:f.fromCss("#fafafa"),text:f.fromCss("#222222")},Fi={_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 Wi(l){let{accent:i,background:o,text:y}=l,s=l.accentText??i.contrasting(),x=l.backgroundInset??o.darken(0.03),h=l.border??y.opacity(0.15),c=l.shadow??y.opacity(0.1),r=l.focus??i.opacity(0.5);return{_tosiAccent:i,_tosiAccentLight:i.brighten(0.15),_tosiAccentDark:i.darken(0.15),_tosiAccentText:s,_tosiBg:o,_tosiBgInset:x,_tosiBgHover:o.darken(0.05),_tosiBgActive:o.darken(0.1),_tosiText:y,_tosiTextMuted:y.opacity(0.6),_tosiTextDisabled:y.opacity(0.4),_tosiBorder:h,_tosiBorderFocus:i,_tosiShadow:c,_tosiShadowColor:c,_tosiFocusRing:`0 0 0 2px ${r}`,_tosiInputBg:o,_tosiInputBorder:h,_tosiInputBorderFocus:i,_tosiButtonBg:o,_tosiButtonText:y,_tosiButtonBorder:h,_tosiButtonHoverBg:o.darken(0.05),_tosiButtonActiveBg:i,_tosiButtonActiveText:s}}function q2(l){return{":root":{...Fi,...Wi(l)}}}function y4(l){let o=q2(l)[":root"];return{":root":Y4(o)}}function m5(l,i="tosi-theme"){O1(i,l)}var ao=q2(q1),Bo=y4(q1),Qi={"--xin-icon-size":d.tosiIconSize,"--xin-icon-fill":d.tosiIconFill,"--xin-icon-stroke":d.tosiIconStroke,"--xin-tabs-bar-color":d.tosiTabsBarColor,"--xin-tabs-bar-height":d.tosiTabsBarHeight,"--xin-tabs-selected-color":d.tosiTabsSelectedColor,"--spacing":d.tosiSpacing,"--gap":d.tosiSpacingSm,"--touch-size":d.tosiTouchSize,"--background":d.tosiBg,"--text-color":d.tosiText,"--brand-color":d.tosiAccent,"--brand-text-color":d.tosiAccentText};function vo(l){return{":root":{...q2(l)[":root"],...Qi}}}function zo(l,i){let o={};for(let[y,s]of Object.entries(i)){let x=`--tosi-${l}-${y.replace(/([A-Z])/g,"-$1").toLowerCase()}`;o[y]=`var(${x}, ${s})`}return o}var{div:_2,label:s4,input:x4,span:fo,button:Gi}=w,{liveTheme:b}=S({liveTheme:{accent:String(q1.accent),background:String(q1.background),text:String(q1.text),dark:!1}}),h4=!1;function l0(){if(!h4)return;let l={accent:f.fromCss(b.accent.value),background:f.fromCss(b.background.value),text:f.fromCss(b.text.value)},i=b.dark.value?y4(l):q2(l);m5(i,"tosi-live-theme")}function Zi(){if(h4)return;h4=!0,b.accent.observe(l0),b.background.observe(l0),b.text.observe(l0),b.dark.observe(l0),l0()}function jo(){h4=!1}class E5 extends a{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=()=>[_2({class:"field"},s4("Accent"),x4({type:"color",part:"accent"})),_2({class:"field"},s4("Background"),x4({type:"color",part:"background"})),_2({class:"field"},s4("Text"),x4({type:"color",part:"text"})),_2({class:"field"},s4("Dark mode"),x4({type:"checkbox",part:"dark"})),_2({class:"preview",part:"preview",style:{background:"var(--tosi-bg, #fafafa)",color:"var(--tosi-text, #222)"}},fo("Preview "),Gi({class:"preview-button",style:{background:"var(--tosi-accent, #EE257B)",color:"var(--tosi-accent-text, white)"}},"Button")),_2({class:"actions"},Gi({part:"reset"},"Reset"))];connectedCallback(){super.connectedCallback(),Zi();let l=()=>{this.parts.accent.value=b.accent.value,this.parts.background.value=b.background.value,this.parts.text.value=b.text.value,this.parts.dark.checked=b.dark.value};l(),b.accent.observe(l),b.background.observe(l),b.text.observe(l),b.dark.observe(l),this.parts.accent.addEventListener("input",()=>{b.accent.value=this.parts.accent.value}),this.parts.background.addEventListener("input",()=>{b.background.value=this.parts.background.value}),this.parts.text.addEventListener("input",()=>{b.text.value=this.parts.text.value}),this.parts.dark.addEventListener("change",()=>{b.dark.value=this.parts.dark.checked}),this.parts.reset.addEventListener("click",()=>{b.accent.value=String(q1.accent),b.background.value=String(q1.background),b.text.value=String(q1.text),b.dark.value=!1})}}var Ao=E5.elementCreator();var{div:qo}=w;class h2 extends a{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(l){}formResetCallback(){this.value="",this.coords="65.01715565258993,25.48081004203459,12"}content=qo({style:{width:"100%",height:"100%"}});get map(){return this._map}static mapboxCSSAvailable;static mapboxAvailable;_map;static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"400px",height:"400px",textAlign:"left"}};constructor(){super();if(h2.mapboxCSSAvailable===void 0)h2.mapboxCSSAvailable=q0("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.css").catch((l)=>{console.error("failed to load mapbox-gl.css",l)}),h2.mapboxAvailable=x1("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.js").catch((l)=>{console.error("failed to load mapbox-gl.js",l)})}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[s,x,h]=this.coords.split(",").map((c)=>Number(c));this._map.setCenter([x,s]),this._map.setZoom(h),this._lastCoords=this.coords}if(this.mapStyle!==this._lastStyle)this._map.setStyle(this.mapStyle),this._lastStyle=this.mapStyle;return}let{div:l}=this.parts,[i,o,y]=this.coords.split(",").map((s)=>Number(s));this._lastCoords=this.coords,this._lastStyle=this.mapStyle,h2.mapboxAvailable.then(({mapboxgl:s})=>{console.log("%cmapbox may complain about missing css -- don't panic!","background: orange; color: black; padding: 0 5px;"),s.accessToken=this.token,this._map=new s.Map({container:l,style:this.mapStyle,zoom:y,center:[o,i]}),this._map.on("render",()=>this._map.resize()),this._map.on("moveend",()=>{let x=this._map.getCenter(),h=this._map.getZoom(),c=`${x.lat.toFixed(6)},${x.lng.toFixed(6)},${h.toFixed(1)}`;if(c!==this.value){if(this.internals)this.internals.setFormValue(c)}})})}}var _o=h2.elementCreator();var{div:l3,span:c4,button:i3}=w,i0=86400000,Vo=[0,1,2,3,4,5,6],Po=[1,2,3,4,5,6,7,8,9,10,11,12],o3=(l,i=2,o="0")=>String(l).padStart(i,o),o0=(l,i,o)=>new Date(`${l}-${o3(i)}-${o3(o)}`);class y3 extends a{static preferredTagName="tosi-month";static lightStyleSpec={":host":{display:"block"},":host [part=header]":{display:"flex",alignItems:"stretch",justifyContent:"stretch"},":host[disabled]":{pointerEvents:"none",opacity:k.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:k.monthTodayBackground("transparent"),boxShadow:k.monthTodayShadow("none"),backdropFilter:k.monthTodayBackdropFilter("brightness(0.9)"),fontWeight:k.monthTodayFontWeight("800")},":host .day, :host .date":{padding:5,display:"flex",justifyContent:"center",userSelect:"none"},":host .day":{color:k.monthDayColor("hotpink"),background:k.monthDayBackground("white"),fontWeight:k.monthDayFontWeight("800")},":host .date":{cursor:"default"},":host .weekend":{background:k.monthWeekendBackground("#eee")},":host .date:not(.in-month)":{opacity:0.5},":host .date.checked":{color:k.monthDateCheckedColor("white"),background:k.monthDateCheckedBackground("hotpink")},":host:not([range]) .date.checked":{borderRadius:k.monthDateCheckedBorderRadius("10px")},":host .range-start":{borderTopLeftRadius:k.monthDateCheckedBorderRadius("10px"),borderBottomLeftRadius:k.monthDateCheckedBorderRadius("10px")},":host .range-end":{borderTopRightRadius:k.monthDateCheckedBorderRadius("10px"),borderBottomRightRadius:k.monthDateCheckedBorderRadius("10px")}};static formAssociated=!0;static initAttributes={month:NaN,year:NaN,weekStart:0,minDate:o0(new Date().getFullYear()-100,1,1).toISOString().split("T")[0],maxDate:o0(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(l){this.disabled=l}formResetCallback(){this.value="",this.selectedDays=[]}get endDay(){return 1-this.weekStart}get months(){return Po.map((l)=>({caption:o0(2025,l,1).toString().split(" ")[1],value:String(l)}))}get years(){let l=Number(this.minDate.split("-")[0]),i=Number(this.maxDate.split("-")[0]),o=[];for(let y=l;y<=i;y++)o.push(String(y));return o}monthChanged=(l,i)=>{};gotoMonth(l,i){if(this.month!==i||this.year!==l)this.month=i,this.year=l,this.monthChanged(l,i)}setMonth=()=>{this.gotoMonth(Number(this.parts.year.value),Number(this.parts.month.value))};get to(){return this.selectedDays[1]||""}set to(l){this.selectedDays[1]=l,this.selectedDays.splice(2)}get from(){return this.selectedDays[0]||""}set from(l){this.selectedDays[0]=l,this.selectedDays.splice(2)}clickDate=(l)=>{let i=l.target.getAttribute("title");this.selectDate(i)};keyDate=(l)=>{let i=!1;switch(l.code){case"Space":{let o=l.target.getAttribute("title");this.selectDate(o),i=!0;break}case"Tab":break;default:console.log(l)}if(i)l.preventDefault(),l.stopPropagation()};#l="";selectDate=(l)=>{if(this.#l=l,this.range){if(!this.to)this.selectedDays=[l,l];else if(this.from===l&&this.to===l)this.selectedDays=[];else if(this.from===l)this.from=this.to;else if(this.to===l)this.to=this.from;else if(l<this.from)this.from=l;else if(l>this.to)this.to=l;else this.to=l;this.value=`${this.from},${this.to}`}else if(this.multiple){if(this.selectedDays.includes(l))this.selectedDays.splice(this.selectedDays.indexOf(l),1);else this.selectedDays.push(l),this.selectedDays.sort();this.value=this.selectedDays.join(",")}else if(this.selectable)if(this.selectedDays.includes(l))this.value="",this.selectedDays=[];else this.value=l,this.selectedDays=[l]};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=(l)=>{if(!this.range)return this.selectedDays.includes(l);else if(this.range)return this.from&&l>=this.from&&l<=this.to;return!1};dateMenuItem=(l,i="")=>{return l=l.split("T")[0],{caption:i||l,enabled:()=>!l.startsWith(`${this.year}-${o3(this.month)}-`),action:()=>{this.gotoDate(l)}}};jumpMenu=()=>{G({target:this.parts.jump,menuItems:[this.dateMenuItem(new Date().toISOString(),"This Month"),...this.selectedDays.length===0?[]:[null],...this.selectedDays.map((l)=>this.dateMenuItem(l))]})};content=()=>[l3({part:"header"},i3({part:"previous",onClick:this.previousMonth},t.chevronLeft()),c4({style:{flex:"1"}}),i3({part:"jump",onClick:this.jumpMenu},t.calendar()),h1({part:"month",options:this.months,onChange:this.setMonth}),h1({part:"year",options:[this.year],onChange:this.setMonth}),c4({style:{flex:"1"}}),i3({part:"next",onClick:this.nextMonth},t.chevronRight())),l3({part:"week"}),l3({part:"days"})];gotoDate(l){let i=new Date(l);this.gotoMonth(i.getFullYear(),i.getMonth()+1)}connectedCallback(){super.connectedCallback();let l=new Date(this.value.split(",").pop()||Date.now());if(isNaN(this.month))this.month=l.getMonth()+1;if(isNaN(this.year))this.year=l.getFullYear()}days=[];render(){super.render();let{week:l,days:i,jump:o,month:y,year:s,previous:x,next:h}=this.parts;this.selectedDays=this.value?this.value.split(","):[];let c=o0(this.year,this.month,1),r=new Date(c.valueOf()-(7+c.getDay()-this.weekStart)%7*i0),n=this.month===12?1:this.month+1,C=new Date(o0(this.year+(this.month===12?1:0),n,1).valueOf()-i0),g=new Date(C.valueOf()+(this.weekStart*2+5+this.endDay-C.getDay())%7*i0),p=Vo.map((P)=>new Date(r.valueOf()+P*i0).toString().split(" ")[0]);this.days=[];let z=new Date().toISOString().split("T")[0];for(let P=r.valueOf();P<=g.valueOf();P+=i0){let q=new Date(P),_=q.toISOString().split("T")[0];this.days.push({date:q,selected:!1,inMonth:q.getMonth()+1===this.month,isToday:_===z,isWeekend:q.getDay()%6===0,inRange:!!(this.from&&_>=this.from&&_<=this.to)})}y.value=String(this.month),s.value=String(this.year),y.disabled=s.disabled=o.disabled=x.disabled=h.disabled=this.disabled||this.readonly,s.options=this.years,l.textContent="",l.append(...p.map((P)=>c4({class:"day"},P))),i.textContent="";let B=null,{to:j,from:V}=this;i.append(...this.days.map((P)=>{let q=["date"];if(P.inMonth)q.push("in-month");if(P.isToday)q.push("today");let _=P.date.toISOString().split("T")[0];if(this.checkDay(_))q.push("checked");if(q.push(P.isWeekend?"weekend":"weekday"),this.range){if(j===_)q.push("range-end");if(V===_)q.push("range-start")}let N=c4({class:q.join(" "),title:_,onClick:this.clickDate,onKeydown:this.keyDate,tabindex:"0"},P.date.getDate());if(_===this.#l)B=N;return N})),B?.focus()}}var Oo=y3.elementCreator();var{div:s3,button:Uo}=w,Xo={error:"red",warn:"orange",info:"royalblue",log:"gray",success:"green",progress:"royalblue"};class S1 extends a{static preferredTagName="tosi-notification";static singleton;static shadowStyleSpec={":host":{_notificationSpacing:8,_notificationWidth:360,_notificationPadding:`${d.notificationSpacing} ${d.notificationSpacing50} ${d.notificationSpacing} ${d.notificationSpacing200}`,_notificationBg:"#fafafa",_notificationAccentColor:"#aaa",_notificationTextColor:"#444",_notificationIconSize:d.notificationSpacing300,_notificationButtonSize:48,_notificationBorderWidth:"3px 0 0",_notificationBorderRadius:d.notificationSpacing50,position:"fixed",left:0,right:0,bottom:0,paddingBottom:d.notificationSpacing,width:d.notificationWidth,display:"flex",flexDirection:"column-reverse",margin:"0 auto",gap:d.notificationSpacing,maxHeight:"50vh",overflow:"hidden auto",boxShadow:"none !important"},":host *":{color:d.notificationTextColor},":host .note":{display:"grid",background:d.notificationBg,padding:d.notificationPadding,gridTemplateColumns:`${d.notificationIconSize} 1fr ${d.notificationButtonSize}`,gap:d.notificationSpacing,alignItems:"center",borderRadius:d.notificationBorderRadius,boxShadow:`0 2px 8px #0006, inset 0 0 0 2px ${d.notificationAccentColor}`,borderColor:d.notificationAccentColor,borderWidth:d.notificationBorderWidth,borderStyle:"solid",transition:"0.5s ease-in",transitionProperty:"margin, opacity",zIndex:1},":host .note .icon":{stroke:d.notificationAccentColor},":host .note button":{display:"flex",lineHeight:d.notificationButtonSize,padding:0,margin:0,height:d.notificationButtonSize,width:d.notificationButtonSize,background:"transparent",alignItems:"center",justifyContent:"center",boxShadow:"none",border:"none",position:"relative"},":host .note button:hover svg":{stroke:d.notificationAccentColor},":host .note button:active svg":{borderRadius:99,stroke:d.notificationBg,background:d.notificationAccentColor,padding:d.spacing50},":host .note svg":{height:d.notificationIconSize,width:d.notificationIconSize,pointerEvents:"none"},":host .message":{display:"flex",flexDirection:"column",alignItems:"center",gap:d.notificationSpacing},":host .note.closing":{opacity:0,zIndex:0}};static removeNote(l){l.classList.add("closing"),l.style.marginBottom=-l.offsetHeight+"px";let i=()=>{l.remove()};l.addEventListener("transitionend",i),setTimeout(i,1000)}static post(l){let{message:i,duration:o,type:y,close:s,progress:x,icon:h,color:c}=Object.assign({type:"info",duration:-1},typeof l==="string"?{message:l}:l);if(!this.singleton)this.singleton=x3();let r=this.singleton;document.body.append(r),r.style.zIndex=String(l2()+1);let n=c||Xo[y],C=x||y==="progress"?w.progress():{},g=()=>{if(s)s();S1.removeNote(B)},p=h instanceof SVGElement?h:h?t[h]({class:"icon"}):t.info({class:"icon"}),z=y==="error"||y==="warn",B=s3({class:`note ${y}`,role:z?"alert":"status",ariaLive:z?"assertive":"polite",style:{_notificationAccentColor:n}},p,s3({class:"message"},s3(i),C),Uo({class:"close",title:"close",ariaLabel:"Close notification",apply(j){j.addEventListener("click",g)}},t.x()));if(r.shadowRoot.append(B),C instanceof HTMLProgressElement&&x instanceof Function){C.setAttribute("max",String(100)),C.value=x();let j=setInterval(()=>{if(!r.shadowRoot.contains(B)){clearInterval(j);return}let V=x();if(C.value=V,V>=100)S1.removeNote(B)},1000)}if(o>0)setTimeout(()=>{S1.removeNote(B)},o*1000);return B.scrollIntoView(),g}content=null}var No=S1,x3=S1.elementCreator(),Ko=x3;function bo(l){return S1.post(l)}var Ri=async(l,i="SHA-1")=>{let y=new TextEncoder().encode(l),s=await crypto.subtle.digest(i,y);return Array.from(new Uint8Array(s)).map((c)=>c.toString(16).padStart(2,"0")).join("")},Ji=async(l)=>{let i=await Ri(l),o=await fetch(`https://weakpass.com/api/v1/search/${i}`);if(o.ok){let y=await o.json();console.log("password found in weakpass database",y)}return o.status!==404},{span:h3,xinSlot:Fo}=w;class r4 extends a{static preferredTagName="tosi-password-strength";static lightStyleSpec={":host":{display:"inline-flex",flexDirection:"column",gap:d.spacing50,position:"relative"},":host xin-slot":{display:"flex"},':host [part="meter"]':{display:"block",position:"relative",height:k.meterHeight("24px"),background:k.indicatorBg("white"),borderRadius:k.meterRadius("4px"),boxShadow:k.meterShadow(`inset 0 0 0 2px ${d.indicatorColor}`)},':host [part="level"]':{height:k.levelHeight("20px"),content:'" "',display:"inline-block",width:0,transition:"0.15s ease-out",background:d.indicatorColor,margin:k.levelMargin("2px"),borderRadius:k.levelRadius("2px")},':host [part="description"]':{position:"absolute",inset:"0",color:d.descriptionColor,height:k.meterHeight("24px"),lineHeight:k.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(l){return this.issues={tooShort:l.length<this.minLength,short:l.length<this.goodLength,noUpper:!l.match(/[A-Z]/),noLower:!l.match(/[a-z]/),noNumber:!l.match(/[0-9]/),noSpecial:!l.match(/[^a-zA-Z0-9]/)},this.issues.tooShort?0:Object.values(this.issues).filter((i)=>!i).length-1}async isBreached(){let l=this.querySelector("input")?.value;if(!l||typeof l!=="string")return!0;return await Ji(l)}updateIndicator=(l)=>{let{level:i,description:o}=this.parts,y=this.indicatorColors.split(","),s=this.descriptionColors.split(","),x=this.strength(l);if(this.value!==x)this.value=x,this.dispatchEvent(new Event("change"));i.style.width=`${(x+1)*16.67}%`,this.style.setProperty("--indicator-color",y[x]),this.style.setProperty("--description-color",s[x]),o.textContent=this.strengthDescriptions[x]};update=(l)=>{let i=l.target.closest("input");this.updateIndicator(i?.value||"")};content=()=>[Fo({onInput:this.update}),h3({part:"meter"},h3({part:"level"}),h3({part:"description"}))];render(){super.render();let l=this.querySelector("input");this.updateIndicator(l?.value)}}var Wo=r4,$i=r4.elementCreator(),Qo=$i;var{span:c3}=w;class n4 extends a{static preferredTagName="tosi-rating";static formAssociated=!0;static initAttributes={max:5,min:1,icon:"star",step:1,ratingStroke:"#e81",ratingFill:"#f91",emptyStroke:"none",emptyFill:"#ccc",readonly:!1,iconSize:24,hollow:!1,required:!1,name:""};value="";formDisabledCallback(l){this.readonly=l}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=()=>c3({part:"container"},c3({part:"empty"}),c3({part:"filled"}));displayValue(l){let{empty:i,filled:o}=this.parts,s=Math.round((typeof l==="string"?0:l||0)/this.step)*this.step;o.style.width=s/this.max*i.offsetWidth+"px"}update=(l)=>{if(this.readonly)return;let{empty:i}=this.parts,o=l instanceof MouseEvent?l.pageX-i.getBoundingClientRect().x:0,y=Math.min(Math.max(this.min,Math.round(o/i.offsetWidth*this.max/this.step+this.step*0.5)*this.step),this.max);if(l.type==="click")this.value=y;else if(l.type==="mousemove")this.displayValue(y);else this.displayValue(this.value||0)};handleKey=(l)=>{let i=this.value===""?NaN:Number(this.value);if(isNaN(i))i=Math.round((this.min+this.max)*0.5*this.step)*this.step;let o=!1;switch(l.key){case"ArrowUp":case"ArrowRight":i+=this.step,o=!0;break;case"ArrowDown":case"ArrowLeft":i-=this.step,o=!0;break}if(this.value=Math.max(Math.min(i,this.max),this.min),o)l.stopPropagation(),l.preventDefault()};connectedCallback(){super.connectedCallback();let{container:l}=this.parts;l.tabIndex=0,l.addEventListener("mousemove",this.update,!0),l.addEventListener("mouseleave",this.update),l.addEventListener("blur",this.update),l.addEventListener("click",this.update),l.addEventListener("keydown",this.handleKey)}_renderedIcon="";render(){super.render();let l=this.iconSize+"px";if(this.style.setProperty("--tosi-icon-size",l),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:i,filled:o}=this.parts;if(i.classList.toggle("hollow",this.hollow),i.style.setProperty("--tosi-icon-fill",this.emptyFill),i.style.setProperty("--tosi-icon-stroke",this.emptyStroke),o.style.setProperty("--tosi-icon-fill",this.ratingFill),o.style.setProperty("--tosi-icon-stroke",this.ratingStroke),this._renderedIcon!==this.icon){this._renderedIcon=this.icon;for(let y=0;y<this.max;y++)i.append(t[this.icon]()),o.append(t[this.icon]())}this.displayValue(this.value)}}var Go=n4,Hi=n4.elementCreator(),Zo=e((...l)=>Hi(...l),"xinRating is deprecated, use tosiRating instead (tag is now <tosi-rating>)");var{xinSlot:Yi,div:Ro,button:Jo,span:Ac}=w,$o=[{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 r3(l=$o){return h1({title:"paragraph style",slot:"toolbar",class:"block-style",options:l.map(({caption:i,tagType:o})=>({caption:i,value:`formatBlock,${o}`}))})}var y0=()=>M5({slot:"toolbar"});function p1(l,i,o){return Jo({slot:"toolbar",dataCommand:i,title:l},o)}var Ho=()=>[p1("left-justify","justifyLeft",t.alignLeft()),p1("center","justifyCenter",t.alignCenter()),p1("right-justify","justifyRight",t.alignRight()),y0(),p1("bullet list","insertUnorderedList",t.listBullet()),p1("numbered list","insertOrderedList",t.listNumber()),y0(),p1("indent","indent",t.indent()),p1("indent","outdent",t.outdent())],Ii=()=>[p1("bold","bold",t.fontBold()),p1("italic","italic",t.fontItalic()),p1("underline","underline",t.fontUnderline())],Yo=()=>[r3(),y0(),...Ii()],Si=()=>[r3(),y0(),...Ho(),y0(),...Ii()];class C4 extends a{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(l){if(this.isInitialized)this.parts.doc.contentEditable=l?"false":"true"}formResetCallback(){this.value=""}_value="";get value(){return this.isInitialized?this.parts.doc.innerHTML:this._value}set value(l){let i=this._value;if(this._value=l,this.isInitialized){if(this.parts.doc.innerHTML!==l)this.parts.doc.innerHTML=l}if(i!==l&&this.internals)this.internals.setFormValue(l)}blockElement(l){let{doc:i}=this.parts;while(l.parentElement!==null&&l.parentElement!==i)l=l.parentElement;return l.parentElement===i?l:void 0}get selectedBlocks(){let{doc:l}=this.parts,i=window.getSelection();if(i===null)return[];let o=[];for(let y=0;y<i.rangeCount;y++){let s=i.getRangeAt(y);if(!l.contains(s.commonAncestorContainer))continue;let x=this.blockElement(s.startContainer),h=this.blockElement(s.endContainer);o.push(x);while(x!==h&&x!==null)x=x.nextElementSibling,o.push(x)}return o}get selectedText(){let l=window.getSelection();if(l===null)return"";return this.selectedBlocks.length?l.toString():""}selectionChange=()=>{};_updatingBlockStyle=!1;handleSelectChange=(l)=>{if(this._updatingBlockStyle)return;let o=l.target?.closest(v1.tagName);if(o==null)return;this.doCommand(o.value)};handleButtonClick=(l)=>{let o=l.target?.closest("button");if(o==null)return;this.doCommand(o.dataset.command)};content=[Yi({name:"toolbar",part:"toolbar",onClick:this.handleButtonClick,onChange:this.handleSelectChange}),Ro({part:"doc",contenteditable:!0,style:{flex:"1 1 auto",outline:"none"}}),Yi({part:"content"})];doCommand(l){if(l===void 0)return;let i=l.split(",");console.log("execCommand",i[0],!1,...i.slice(1)),document.execCommand(i[0],!1,...i.slice(1))}updateBlockStyle(){let l=this.parts.toolbar.querySelector(".block-style");if(l===null)return;let i=this.selectedBlocks.map((o)=>o.tagName);i=[...new Set(i)],this._updatingBlockStyle=!0,l.value=i.length===1?`formatBlock,${i[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:l,content:i}=this.parts;if(i.innerHTML!==""&&l.innerHTML==="")l.innerHTML=i.innerHTML,i.innerHTML="";this.isInitialized=!0,i.style.display="none",l.addEventListener("input",this.handleInput),this.updateValidity(),document.addEventListener("selectionchange",(o)=>{this.updateBlockStyle(),this.selectionChange(o,this)})}render(){let{toolbar:l}=this.parts;if(super.render(),l.children.length===0)switch(this.widgets){case"minimal":l.append(...Yo());break;case"default":l.append(...Si());break}}}var Io=C4,Di=C4.elementCreator(),So=e((...l)=>Di(...l),"richText is deprecated, use tosiRichText instead (tag is now <tosi-rich-text>)");var{router:s0}=S({router:{path:"",hash:"",pattern:""}}),n3={};function Do(){return{...n3}}var d4=[],C3=!1,g4=new Set;function To(l){let i=[];if(l==="")return{regex:/^\/?$/,paramNames:i};let o=l.split("/").map((s)=>{if(s.startsWith(":"))return i.push(s.slice(1)),"([^/]+)";return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});return{regex:new RegExp("^/?"+o.join("/")+"/?$"),paramNames:i}}function uo(l){let i=l.split("?")[0].split("#")[0];for(let y of d4){if(y.fallback)continue;let s=i.match(y.regex);if(s){let x={};return y.paramNames.forEach((h,c)=>{x[h]=decodeURIComponent(s[c+1])}),{route:y,params:x}}}let o=d4.find((y)=>y.fallback);if(o)return{route:o,params:{}};return null}function x0(){let l=C3?window.location.hash.replace(/^#\/?/,""):window.location.pathname;s0.path.value=l,s0.hash.value=window.location.hash;let i=uo(l);if(i){n3=i.params,s0.pattern.value=i.route.regex.source;let o=new Map;for(let y of i.route.targets)o.set(y.view??"default",y);for(let y of g4){let s=y.name||"default",x=o.get(s);if(x)y.replaceChildren(x.component(i.params));else y.replaceChildren()}}else{n3={},s0.pattern.value="";for(let o of g4)o.replaceChildren()}}var Ti=!1;function ui(){if(Ti)return;Ti=!0,window.addEventListener("popstate",x0),window.addEventListener("hashchange",x0)}function eo(l,i={}){C3=i.hashRouting??!1,d4=l.map((o)=>{let{regex:y,paramNames:s}=To(o.pattern);return{regex:y,paramNames:s,targets:o.targets,fallback:o.fallback??!1}}),ui(),x0()}function Lo(l){if(ui(),C3)window.location.hash="#/"+l.replace(/^\//,"");else window.history.pushState({},"","/"+l.replace(/^\//,""));x0()}class d3 extends a{static preferredTagName="tosi-route-view";static initAttributes={name:"default"};content=null;connectedCallback(){if(super.connectedCallback(),g4.add(this),d4.length>0)x0()}disconnectedCallback(){super.disconnectedCallback(),g4.delete(this)}}var Mo=d3.elementCreator();var{div:mo,slot:Eo,label:ly,span:iy,input:ei}=w;class V2 extends a{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(l){if(typeof l==="string")this._choices=V2.parseChoicesString(l);else this._choices=l;this.queueRender()}static parseChoicesString(l){return l.split(",").filter((i)=>i.trim()!=="").map((i)=>{let[o,y]=i.split("=").map((c)=>c.trim()),[s,x]=(y||o).split(":").map((c)=>c.trim()),h=x?t[x]():"";return{value:o,icon:h,caption:s}})}value="";formDisabledCallback(l){}formResetCallback(){this.value=""}get values(){return(this.value||"").split(",").map((l)=>l.trim()).filter((l)=>l!=="")}content=()=>[Eo(),mo({part:"options"},ei({part:"custom",hidden:!0}))];static shadowStyleSpec={":host":{display:"inline-flex",gap:k.segmentedOptionGap("8px"),alignItems:k.segmentedAlignItems("center")},":host, :host::part(options)":{flexDirection:k.segmentedDirection("row")},":host label":{display:"inline-grid",alignItems:"center",gap:k.segmentedOptionGap("8px"),gridTemplateColumns:k.segmentedOptionGridColumns("0px 24px 1fr"),padding:k.segmentedOptionPadding("4px 12px"),font:k.segmentedOptionFont("16px")},":host label:focus":{outline:"none",boxShadow:k.segmentedFocusShadow(`inset 0 0 0 2px ${k.segmentedOptionCurrentBackground("#44a")}`),borderRadius:k.segmentedOptionsBorderRadius("8px")},":host label:has(:checked)":{color:k.segmentedOptionCurrentColor("#eee"),background:k.segmentedOptionCurrentBackground("#44a")},":host label:has(:checked):focus":{boxShadow:k.segmentedCurrentFocusShadow(`inset 0 0 0 2px ${k.segmentedOptionCurrentColor("#eee")}`)},":host svg":{height:k.segmentOptionIconSize("16px"),stroke:k.segmentedOptionIconColor("currentColor")},":host label.no-icon":{gap:0,gridTemplateColumns:k.segmentedOptionGridColumns("0px 1fr")},':host input[type="radio"], :host input[type="checkbox"]':{visibility:k.segmentedInputVisibility("hidden")},":host::part(options)":{display:"flex",borderRadius:k.segmentedOptionsBorderRadius("8px"),background:k.segmentedOptionsBackground("#fff"),color:k.segmentedOptionColor("#222"),overflow:"hidden",alignItems:k.segmentedOptionAlignItems("stretch")},":host::part(custom)":{padding:k.segmentedOptionPadding("4px 12px"),color:k.segmentedOptionCurrentColor("#eee"),background:k.segmentedOptionCurrentBackground("#44a"),font:k.segmentedOptionFont("16px"),border:"0",outline:"none"},":host::part(custom)::placeholder":{color:k.segmentedOptionCurrentColor("#eee"),opacity:k.segmentedPlaceholderOpacity(0.75)}};valueChanged=!1;handleChange=()=>{let{options:l,custom:i}=this.parts;if(this.multiple){let o=[...l.querySelectorAll("input:checked")];this.value=o.map((y)=>y.value).join(",")}else{let o=l.querySelector("input:checked");if(!o)this.value="";else if(o.value)i.setAttribute("hidden",""),this.value=o.value;else i.removeAttribute("hidden"),i.focus(),i.select(),this.value=i.value}this.valueChanged=!0};handleKey=(l)=>{let i=!1;switch(l.code){case"Space":if(l.target instanceof HTMLLabelElement)l.target.click(),i=!0;break;case"Tab":if(!(l.target instanceof HTMLLabelElement))l.target.closest("label").focus();break;case"ArrowLeft":case"ArrowUp":{let o=l.target.closest("label");if(o.previousElementSibling instanceof HTMLLabelElement)o.previousElementSibling.focus()}i=!0;break;case"ArrowRight":case"ArrowDown":{let o=l.target.closest("label");if(o.nextElementSibling instanceof HTMLLabelElement)o.nextElementSibling.focus()}i=!0;break}if(i)l.preventDefault(),l.stopPropagation()};connectedCallback(){super.connectedCallback();let l=this.getAttribute("choices");if(l&&this._choices.length===0)this._choices=V2.parseChoicesString(l);let{options:i}=this.parts;if(this.name==="")this.name=this.instanceId;if(i.addEventListener("change",this.handleChange),i.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 l=[...this.choices];if(this.other&&!this.multiple){let[i,o]=this.other.split(":");l.push({value:"",caption:i,icon:o})}return l}get isOtherValue(){return Boolean(this.value===""||this.value&&!this._choicesWithOther.find((l)=>l.value===this.value))}render(){if(super.render(),this.valueChanged){this.valueChanged=!1;return}let{options:l,custom:i}=this.parts;l.textContent="";let o=this.multiple?"checkbox":"radio",{values:y,isOtherValue:s}=this;if(l.append(...this._choicesWithOther.map((x)=>{return ly({tabindex:0},ei({type:o,name:this.name,value:x.value,checked:y.includes(x.value)||x.value===""&&s,tabIndex:-1}),x.icon||{class:"no-icon"},this.localized?f1(x.caption):iy(x.caption))})),this.other&&!this.multiple)i.hidden=!s,i.value=s?this.value:"",i.placeholder=this.placeholder,l.append(i)}}var oy=V2,Li=V2.elementCreator(),yy=e((...l)=>Li(...l),"xinSegmented is deprecated, use tosiSegmented instead (tag is now <tosi-segmented>)");var{slot:Mi}=w;class g3 extends a{static preferredTagName="tosi-sizebreak";static initAttributes={minWidth:0,minHeight:0};value="normal";content=[Mi({part:"normal"}),Mi({part:"small",name:"small"})];static shadowStyleSpec={":host":{display:"inline-block",position:"relative"}};onResize=()=>{let{normal:l,small:i}=this.parts,o=this.offsetParent;if(!(o instanceof HTMLElement))return;else if(o.offsetWidth<this.minWidth||o.offsetHeight<this.minHeight)l.hidden=!0,i.hidden=!1,this.value="small";else l.hidden=!1,i.hidden=!0,this.value="normal"};connectedCallback(){super.connectedCallback(),globalThis.addEventListener("resize",this.onResize)}disconnectedCallback(){super.disconnectedCallback(),globalThis.removeEventListener("resize",this.onResize)}}var sy=g3.elementCreator();class k4 extends a{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:d.resizeIconFill}};content=t.resize();get minSize(){let{minWidth:l,minHeight:i}=getComputedStyle(this.target);return{width:parseFloat(l)||32,height:parseFloat(i)||32}}resizeTarget=(l)=>{let{target:i}=this;if(!i)return;let{offsetWidth:o,offsetHeight:y}=i;i.style.left=i.offsetLeft+"px",i.style.top=i.offsetTop+"px",i.style.bottom="",i.style.right="";let{minSize:s}=this;M(l,(x,h,c)=>{if(i.style.width=Math.max(s.width,o+x)+"px",i.style.height=Math.max(s.height,y+h)+"px",c.type==="mouseup")return!0},"nwse-resize")};connectedCallback(){if(super.connectedCallback(),!this.target)this.target=this.parentElement;let l={passive:!0};this.addEventListener("mousedown",this.resizeTarget,l),this.addEventListener("touchstart",this.resizeTarget,l)}}var xy=k4,mi=k4.elementCreator(),hy=mi;var{div:cy,input:ry,span:ny,button:k3}=w;class h0 extends a{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":k.brandColor("blue"),"--tag-text-color":k.brandTextColor("white"),display:"inline-flex",borderRadius:k.tagRoundedRadius(d.spacing50),color:d.tagTextColor,background:d.tagBg,padding:`0 ${d.spacing75} 0 ${d.spacing75}`,height:`calc(${d.lineHeight} + ${d.spacing50})`,lineHeight:`calc(${d.lineHeight} + ${d.spacing50})`},':host > [part="caption"]':{position:"relative",whiteSpace:"nowrap",overflow:"hidden",flex:"1 1 auto",fontSize:k.fontSize("16px"),color:d.tagTextColor,textOverflow:"ellipsis"},':host [part="remove"]':{boxShadow:"none",margin:`0 ${d.spacing_50} 0 ${d.spacing25}`,padding:0,display:"inline-flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:d.spacing150,width:d.spacing150,color:d.tagCloseButtonColor,background:d.tagCloseButtonBg,borderRadius:k.tagCloseButtonRadius("99px"),opacity:d.tagButtonOpacity},':host [part="remove"]:hover':{background:d.tagCloseButtonBg,opacity:d.tagButtonHoverOpacity}};static initAttributes={caption:"",removeable:!1};removeCallback=()=>{this.remove()};content=()=>[ny({part:"caption"},this.caption),k3(t.x(),{type:"button",part:"remove",hidden:!this.removeable,ariaLabel:`Remove ${this.caption}`,onClick:this.removeCallback})]}var Cy=h0,p3=h0.elementCreator(),dy=e((...l)=>p3(...l),"xinTag is deprecated, use tosiTag instead (tag is now <tosi-tag>)");class P2 extends a{static preferredTagName="tosi-tag-list";static lightStyleSpec={":host":{"--tag-list-bg":"#f8f8f8","--touch-size":"44px","--spacing":"16px",display:"grid",gridTemplateColumns:"auto",alignItems:"center",background:d.tagListBg,gap:d.spacing25,borderRadius:k.taglistRoundedRadius(d.spacing50),overflow:"hidden"},":host[editable]":{gridTemplateColumns:`0px auto ${d.touchSize}`},":host[editable][text-entry]":{gridTemplateColumns:`0px 2fr 1fr ${d.touchSize}`},':host [part="tagContainer"]':{display:"flex",content:'" "',alignItems:"center",background:d.inputBg,borderRadius:k.tagContainerRadius(d.spacing50),boxShadow:d.borderShadow,flexWrap:"nowrap",overflow:"auto hidden",gap:d.spacing25,minHeight:`calc(${d.lineHeight} + ${d.spacing})`,padding:d.spacing25},':host [part="tagMenu"]':{width:d.touchSize,height:d.touchSize,lineHeight:d.touchSize,textAlign:"center",padding:0,margin:0},":host [hidden]":{display:"none !important"},':host button[part="tagMenu"]':{background:d.brandColor,color:d.brandTextColor}};static formAssociated=!0;static initAttributes={name:"",textEntry:!1,editable:!1,placeholder:"enter tags",disabled:!1,required:!1};value="";get tags(){return this.value.split(",").map((l)=>l.trim()).filter((l)=>l!=="")}set tags(l){this.value=l.join(",")}_availableTags=[];get availableTags(){return this._availableTags}set availableTags(l){if(typeof l==="string")this._availableTags=P2.parseAvailableTagsString(l);else this._availableTags=l;this.queueRender()}static parseAvailableTagsString(l){return l.split(",").map((i)=>{let o=i.trim();return o===""?null:o})}connectedCallback(){super.connectedCallback();let l=this.getAttribute("available-tags");if(l&&this._availableTags.length===0)this._availableTags=P2.parseAvailableTagsString(l)}formDisabledCallback(l){this.disabled=l}formResetCallback(){this.value=""}addTag=(l)=>{let i=l.trim();if(i===""||this.tags.includes(i))return;this.tags=[...this.tags,i],this.queueRender(!0)};toggleTag=(l)=>{if(this.tags.includes(l))this.tags=this.tags.filter((i)=>i!==l),this.queueRender(!0);else this.addTag(l)};enterTag=(l)=>{let{tagInput:i}=this.parts;switch(l.key){case",":{let o=i.value.split(",")[0];this.addTag(o)}break;case"Enter":{let o=i.value.split(",")[0];this.addTag(o)}l.stopPropagation(),l.preventDefault();break;default:}};popSelectMenu=()=>{let{toggleTag:l}=this,{tagMenu:i}=this.parts,o=[...this.availableTags],y=this.tags.filter((x)=>!o.includes(x));if(y.length)o.push(null,...y);let s=o.map((x)=>{if(x===""||x===null)return null;else if(typeof x==="object")return{checked:()=>this.tags.includes(x.value),caption:x.caption,action(){l(x.value)}};else return{checked:()=>this.tags.includes(x),caption:x,action(){l(x)}}});G({target:i,width:"auto",menuItems:s})};content=()=>[k3({type:"button",style:{visibility:"hidden"},tabindex:-1}),cy({part:"tagContainer",class:"row",role:"list",ariaLabel:"Selected tags"}),ry({part:"tagInput",class:"elastic",ariaLabel:"Enter new tag",onKeydown:this.enterTag}),k3({type:"button",title:"add tag",ariaLabel:"Select tags from list",ariaHaspopup:"listbox",part:"tagMenu",onClick:this.popSelectMenu},t.chevronDown())];removeTag=(l)=>{if(this.editable&&!this.disabled){let i=l.target.closest(h0.tagName);this.tags=this.tags.filter((o)=>o!==i.caption),i.remove(),this.queueRender(!0)}l.stopPropagation(),l.preventDefault()};render(){super.render();let{tagContainer:l,tagMenu:i,tagInput:o}=this.parts;if(i.disabled=this.disabled,o.value="",o.setAttribute("placeholder",this.placeholder),this.editable&&!this.disabled)i.toggleAttribute("hidden",!1),o.toggleAttribute("hidden",!this.textEntry);else i.toggleAttribute("hidden",!0),o.toggleAttribute("hidden",!0);l.textContent="";for(let y of this.tags)l.append(p3({caption:y,removeable:this.editable&&!this.disabled,removeCallback:this.removeTag}))}}var gy=P2,Ei=P2.elementCreator(),ky=e((...l)=>Ei(...l),"xinTagList is deprecated, use tosiTagList instead (tag is now <tosi-tag-list>)");var l9="1.4.12";var{span:py}=w,c0=null,p4=null,w4=null,_1="tosi-tooltip";O1("tosi-tooltip",{[`.${_1}`]:{pointerEvents:"none",padding:k.tosiTooltipPadding("4px 10px"),borderRadius:k.tosiTooltipRadius("6px"),background:k.tosiTooltipBg("#333"),color:k.tosiTooltipColor("#fff"),fontSize:k.tosiTooltipFontSize("13px"),lineHeight:"1.4",maxWidth:k.tosiTooltipMaxWidth("280px"),whiteSpace:"pre-line",boxShadow:"0 2px 8px #0003",position:"relative"},[`.${_1} p`]:{margin:"0"},[`.${_1} code`]:{background:"#fff2",padding:"0 4px",borderRadius:"3px",fontSize:"0.9em"},[`.${_1} a`]:{color:"inherit"},[`.${_1}::before`]:{content:'""',position:"absolute",width:"8px",height:"8px",background:"inherit",transform:"rotate(45deg)"},[`.${_1}.tt-s::before`]:{top:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${_1}.tt-n::before`]:{bottom:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${_1}.tt-e::before`]:{left:"-4px",top:"var(--tosi-tooltip-arrow)"},[`.${_1}.tt-w::before`]:{right:"-4px",top:"var(--tosi-tooltip-arrow)"}});function O2(){if(p4!==null)clearTimeout(p4),p4=null;if(c0!==null)c0.remove(),c0=null;w4=null}function wy(l){if(l.startsWith("s"))return"tt-s";if(l.startsWith("n"))return"tt-n";if(l.startsWith("e"))return"tt-e";if(l.startsWith("w"))return"tt-w";return"tt-s"}function ty(l,i,o){let y=i.getBoundingClientRect(),s=l.getBoundingClientRect(),x=y.left+y.width*0.5,h=y.top+y.height*0.5,c;if(o.startsWith("s")||o.startsWith("n"))c=Math.max(8,Math.min(s.width-8,x-s.left))-4;else c=Math.max(8,Math.min(s.height-8,h-s.top))-4;l.style.setProperty("--tosi-tooltip-arrow",c+"px")}function ay(l,i){if(i)l=K(l);let o=py({class:_1});return o.innerHTML=O.parseInline(l),o}function By(l,i,o){O2(),w4=l;let{top:y,left:s,width:x}=l.getBoundingClientRect(),h=s+x*0.5,c=window.innerHeight,r=window.innerWidth,n=(y>c*0.5?"n":"s")+(h>r*0.5?"w":"e"),C=ay(i,o);C.classList.add(wy(n)),c0=J2({content:C,target:l,position:n,remainOnScroll:"remove",remainOnResize:"remove"}),requestAnimationFrame(()=>{if(c0&&w4)ty(C,l,n)})}function vy(l){for(let i of l.composedPath())if(i instanceof HTMLElement&&i.dataset.tooltip)return i;return null}function zy(l={}){let{convertTitles:i=!0,delay:o=250,localize:y=!1}=l;document.addEventListener("pointermove",(s)=>{if(i){for(let c of s.composedPath())if(c instanceof HTMLElement&&c.title&&!c.dataset.tooltip){c.dataset.tooltip=c.title,c.removeAttribute("title");break}}let x=vy(s);if(x===w4)return;if(O2(),!x)return;let h=x.dataset.tooltip||null;if(!h)return;p4=setTimeout(()=>By(x,h,y),o)}),document.addEventListener("pointerleave",O2),document.addEventListener("pointerdown",O2),document.addEventListener("keydown",O2),window.addEventListener("scroll",O2,!0)}Object.assign(globalThis,{xinjs:G2,xinjsui:w3});})();
98
98
 
99
- //# debugId=91D96BA92C7CA06D64756E2164756E21
99
+ //# debugId=DDD04304E88DC28964756E2164756E21
100
100
  //# sourceMappingURL=iife.js.map