@bolttech/template-editor 0.0.3 → 0.0.5
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/template-editor.cjs +42 -42
- package/dist/template-editor.mjs +3261 -3263
- package/package.json +5 -6
package/dist/template-editor.cjs
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
"use strict";var Fd=Object.defineProperty;var Ed=(e,r,a)=>r in e?Fd(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a;var Fe=(e,r,a)=>Ed(e,typeof r!="symbol"?r+"":r,a);Object.defineProperty(exports,"__esModule",{value:!0});const o=require("react/jsx-runtime"),Sd=require("react-shadow"),S=require("react"),H=require("@craftjs/core"),tt=require("react-icons/ri"),T=require("react-icons/fi"),kd=require("htmlparser2"),Ad=require("@monaco-editor/react"),Nd=require("react-dom"),zt=require("react-icons/lu"),jd=require("@craftjs/utils"),_d=require("re-resizable"),Bd=require("@bolttech/templating-sdk");function Nn(e){return e&&e.__esModule?e:{default:e}}function Td(e,r){for(var a=0;a<r.length;a++){const s=r[a];if(typeof s!="string"&&!Array.isArray(s)){for(const l in s)if(l!=="default"&&!(l in e)){const u=Object.getOwnPropertyDescriptor(s,l);u&&Object.defineProperty(e,l,u.get?u:{enumerable:!0,get:function(){return s[l]}})}}}return Object.freeze(e)}const Ld=Nn(Sd),Ge=Nn(S),Pd=Nn(Ad),io=({text:e="Text",style:r,href:a,...s})=>{const{connectors:{connect:l,drag:u},selected:d}=H.useNode(m=>({selected:m.events.selected})),{isEnabled:p}=H.useEditor(m=>({isEnabled:m.options.enabled})),f=()=>({...{fontFamily:"inherit",fontWeight:"500",cursor:d?"pointer":"default",transition:"all 0.2s",padding:"8px 16px",fontSize:"16px",backgroundColor:"#3b82f6",color:"#ffffff",borderRadius:"8px",borderStyle:"none",whiteSpace:"nowrap",display:"inline-flex",textDecoration:"none",lineHeight:"1.5",alignItems:"center",justifyContent:"center"},...r});return o.jsx("a",{ref:m=>{m&&l(u(m))},style:f(),href:p?void 0:a,target:"_blank",...s,children:e})},Id={props:{text:"Text",target:"_blank",style:{fontFamily:"inherit",fontWeight:"500",cursor:"pointer",transition:"all 0.2s",padding:"8px 16px",fontSize:"16px",backgroundColor:"#3b82f6",color:"#ffffff",borderRadius:"8px",borderStyle:"none",whiteSpace:"nowrap",display:"inline-flex",textDecoration:"none",lineHeight:"1.5",alignItems:"center",justifyContent:"center"}},displayName:"Anchor",custom:{displayName:"Anchor",settings:["anchor","typography","background","border","spacing"]}};function jn(){const{actions:{setProp:e},text:r,href:a}=H.useNode(s=>({text:s.data.props.text,href:s.data.props.href}));return o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Text"}),o.jsx("input",{type:"text",value:r,onChange:s=>e(l=>l.text=s.target.value),className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Link"}),o.jsx("input",{type:"text",value:a||"",onChange:s=>{e(l=>l.href=s.target.value)},className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]})]})}io.craft={...Id,related:{settings:jn}};const lo=({children:e,style:r,...a})=>{const{connectors:{connect:s,drag:l}}=H.useNode(d=>({selected:d.events.selected})),u={...r,overflow:"visible",boxSizing:"border-box",...r?.height==="auto"&&{height:"auto",minHeight:r?.minHeight||"50px"}};return o.jsx("div",{ref:d=>{d&&s(l(d))},style:u,...a,children:e})},Od={displayName:"Box",isCanvas:!0,custom:{resizable:!0,settings:["box","default"]},props:{style:{border:"none",borderRadius:"0px",width:"100%",height:"auto",minHeight:"50px"}}};lo.craft={...Od};const We=({options:e,value:r,onChange:a,placeholder:s="Select an option",disabled:l=!1,className:u=""})=>o.jsxs("div",{className:`relative ${u}`,children:[o.jsxs("select",{value:r||"",onChange:d=>a?.(d.target.value),disabled:l,className:`w-full appearance-none rounded-none border border-[#E8E7EE] bg-white px-3 py-2 pr-10 text-sm text-gray-700 transition-all duration-200 hover:border-[#170F4F]/30 hover:bg-gray-50 focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]/20 disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-400 ${r?"text-gray-700":"text-gray-500"} `,children:[s&&o.jsx("option",{value:"",disabled:!0,hidden:!0,children:s}),e.map(d=>o.jsx("option",{value:d.value,children:d.label},d.value))]}),o.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:o.jsx(T.FiChevronDown,{size:16,className:`transition-colors duration-200 ${l?"text-gray-400":"text-gray-500"}`})})]});function uo(){const{actions:{setProp:e},style:r}=H.useNode(s=>({style:s.data.props.style})),a=r.display==="block"?"block":r.flexDirection;return o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Layout direction"}),o.jsx(We,{options:[{value:"row",label:"Row"},{value:"column",label:"Column"},{value:"block",label:"Block"}],value:a,onChange:s=>{e(s==="block"?l=>{l.style.display="block",delete l.style.flexDirection}:l=>{l.style.display="flex",l.style.flexDirection=s})},placeholder:"Choose alignment"})]}),r.display!=="block"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Alignment"}),o.jsx(We,{options:[{value:"flex-start",label:"Flex Start"},{value:"flex-end",label:"Flex End"},{value:"center",label:"Center"},{value:"space-between",label:"Space Between"},{value:"space-around",label:"Space Around"},{value:"space-evenly",label:"Space Evenly"}],value:r.justifyContent,onChange:s=>e(l=>l.style.justifyContent=s),placeholder:"Choose alignment"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Gap"}),o.jsx(We,{options:[{value:"0px",label:"0"},{value:"4px",label:"4"},{value:"8px",label:"8"},{value:"12px",label:"12"},{value:"16px",label:"16"},{value:"24px",label:"24"},{value:"32px",label:"32"},{value:"48px",label:"48"},{value:"64px",label:"64"}],value:r.gap,onChange:s=>e(l=>l.style.gap=s),placeholder:"Choose gap"})]})]})]})}const co=({text:e="Button",onClick:r,style:a,...s})=>{const{connectors:{connect:l,drag:u},selected:d}=H.useNode(f=>({selected:f.events.selected})),p=()=>({...{fontFamily:"inherit",fontWeight:"500",cursor:d?"pointer":"default",transition:"all 0.2s",padding:"8px 16px",fontSize:"16px",backgroundColor:"#3b82f6",color:"#ffffff",borderRadius:"8px",borderStyle:"none",whiteSpace:"nowrap"},...a});return o.jsx("button",{ref:f=>{f&&l(u(f))},style:p(),className:`${d?"ring-primary-500 ring-2 ring-opacity-50":"hover:ring-2 hover:ring-gray-300 hover:ring-opacity-50"} transition-all duration-200`,onClick:r,...s,children:e})},Md={props:{text:"Button",style:{fontFamily:"inherit",fontWeight:"500",cursor:"pointer",transition:"all 0.2s",padding:"8px 16px",fontSize:"16",backgroundColor:"#3b82f6",color:"#ffffff",borderRadius:"8px",borderStyle:"none",whiteSpace:"nowrap"}},displayName:"Button",custom:{displayName:"Button",settings:["button","typography","background","border","spacing"]}};function _n(){const{actions:{setProp:e},text:r,href:a}=H.useNode(s=>({text:s.data.props.text,href:s.data.props.href}));return o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Button text"}),o.jsx("input",{type:"text",value:r,onChange:s=>e(l=>l.text=s.target.value),className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Link"}),o.jsx("input",{type:"text",value:a||"",onChange:s=>{e(l=>l.onClick=()=>{window.open(s.target.value,"_blank")}),e(l=>l.href=s.target.value)},className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]})]})}co.craft={...Md,related:{settings:_n}};function Bn(){const{actions:{setProp:e},style:r}=H.useNode(a=>({style:a.data.props.style}));return o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Height"}),o.jsx("input",{type:"text",value:r.height,onChange:a=>e(s=>s.style.height=a.target.value),placeholder:"1px",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Width"}),o.jsx("input",{type:"text",value:r.width,onChange:a=>e(s=>s.style.width=a.target.value),placeholder:"100%",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]})]})}const Tn=({style:e,...r})=>{const{connectors:{connect:a,drag:s},selected:l}=H.useNode(d=>({selected:d.events.selected})),u={...e,cursor:l?"pointer":"default"};return o.jsx("hr",{ref:d=>{d&&a(s(d))},style:u,className:`${l?"ring-primary-500 ring-2 ring-opacity-50":"hover:ring-2 hover:ring-gray-300 hover:ring-opacity-50"} transition-all duration-200`,...r})};Tn.craft={props:{style:{height:"1px",width:"100%",margin:"16px 0",backgroundColor:"#e5e7eb"}},related:{settings:Bn}};const Rd={props:{style:{marginTop:"0px",marginRight:"0px",marginBottom:"0px",marginLeft:"0px",backgroundColor:"#e5e7eb",height:"1px",width:"100%"}},related:{settings:"DividerSettings"},custom:{displayName:"Divider",settings:["divider","background","spacing"]}};Tn.craft={...Rd};const po=({src:e="https://picsum.photos/id/1/1200/1200",alt:r="Image",style:a,...s})=>{const{connectors:{connect:l,drag:u},selected:d}=H.useNode(f=>({selected:f.events.selected})),p={...a,cursor:d?"pointer":"default"};return o.jsx("img",{ref:f=>{f&&l(u(f))},src:e,alt:r,style:p,className:`${d?"ring-primary-500 ring-2 ring-opacity-50":"hover:ring-2 hover:ring-gray-300 hover:ring-opacity-50"}`,...s})},zd={props:{src:"https://picsum.photos/id/1/1200/1200",alt:"Image",style:{width:"200px",height:"200px",objectFit:"cover",borderRadius:"0px"}},custom:{resizable:!0,settings:["image","border"]},related:{settings:"ImageSettings"}};function Ln(){const{actions:{setProp:e},src:r,alt:a,style:s}=H.useNode(l=>({src:l.data.props.src,alt:l.data.props.alt,style:l.data.props.style}));return o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Image URL"}),o.jsx("input",{type:"text",value:r,onChange:l=>e(u=>u.src=l.target.value),placeholder:"https://example.com/image.jpg",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Alt Text"}),o.jsx("input",{type:"text",value:a,onChange:l=>e(u=>u.alt=l.target.value),placeholder:"Image description",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Width"}),o.jsx("input",{type:"text",value:s.width,onChange:l=>e(u=>u.style.width=l.target.value),placeholder:"100%",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Height"}),o.jsx("input",{type:"text",value:s.height,onChange:l=>e(u=>u.style.height=l.target.value),placeholder:"auto",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Object Fit"}),o.jsx(We,{options:[{value:"cover",label:"Cover"},{value:"contain",label:"Contain"},{value:"fill",label:"Fill"},{value:"none",label:"None"},{value:"scale-down",label:"Scale Down"}],value:s.objectFit,onChange:l=>e(u=>u.style.objectFit=l),placeholder:"Choose object fit"})]})]})}po.craft={...zd,related:{settings:Ln}};const $d=new Set(["Delete","Backspace","Escape","Enter","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"]);function Hd({tagName:e="div",html:r,innerRef:a,onChange:s,disabled:l=!1,editable:u=!0,onBlur:d,onKeyUp:p,onKeyDown:f,...m}){const g=S.useRef(null),w=S.useRef(r),D=S.useRef(!1),y=S.useRef(r),v=S.useCallback(()=>(a&&typeof a!="function"?a:g).current,[a]),E=S.useCallback((_,O)=>Object.assign({},_,{target:{value:O}}),[]),C=S.useCallback(_=>{const O=v();if(!O||!s)return;const L=O.innerHTML;L!==w.current&&(y.current=L,D.current=!0,w.current=L,s(E(_,L)))},[v,s,E]),x=S.useCallback((_,O)=>{if(document.activeElement!==_){O();return}const L=window.getSelection();if(!L||L.rangeCount===0){O();return}const ue=L.getRangeAt(0).startOffset;O();try{const pe=document.createRange(),ee=_.firstChild||_,Re=Math.min(ue,ee.textContent?.length||0);pe.setStart(ee,Re),pe.collapse(!0),L.removeAllRanges(),L.addRange(pe)}catch{}},[]);S.useEffect(()=>{const _=v();_&&r!==w.current&&!D.current&&x(_,()=>{_.innerHTML=r,y.current=r,w.current=r})},[r,v,x]),S.useEffect(()=>{const _=v();_&&r!==_.innerHTML&&(_.innerHTML=r),y.current=r,w.current=r},[v,r]),S.useEffect(()=>{u||(D.current=!1)},[u]);const k=S.useCallback(_=>{u&&$d.has(_.key)&&_.stopPropagation(),f?.(_),u&&C(_)},[u,f,C]),j=S.useCallback(_=>{u&&_.stopPropagation(),p?.(_),u&&C(_)},[u,p,C]),N=S.useCallback(_=>{u&&(_.stopPropagation(),C(_))},[u,C]),P=S.useCallback(_=>{D.current=!1,d?.(_),u&&C(_)},[u,d,C]),R=S.useCallback(_=>{typeof a=="function"&&a(_),g.current=_},[a]);return Ge.default.createElement(e,{...m,ref:typeof a=="function"?R:a||g,contentEditable:!l&&u,suppressContentEditableWarning:!0,onInput:N,onBlur:P,onKeyUp:j,onKeyDown:k,dangerouslySetInnerHTML:{__html:r}})}const ho=Ge.default.memo(Hd,(e,r)=>!(r.editable===!1||e.editable!==r.editable||e.disabled!==r.disabled||e.tagName!==r.tagName||JSON.stringify(e.style)!==JSON.stringify(r.style)));ho.displayName="ContentEditable";const qd=[{name:"userName",label:"User Name",value:"John Doe"},{name:"userEmail",label:"User Email",value:"john@example.com"},{name:"companyName",label:"Company Name",value:"Acme Corp"},{name:"currentDate",label:"Current Date",value:new Date().toLocaleDateString()},{name:"currentTime",label:"Current Time",value:new Date().toLocaleTimeString()}],Ud=({ref:e,editableRef:r,position:a,onVariableInsert:s})=>{const{actions:l,style:u={}}=H.useNode(C=>({style:C.data.props.style||{}})),[d,p]=S.useState(!1),[f,m]=S.useState(!1),g=C=>{l.setProp(x=>{x.style={...x.style,...C}})},w=()=>{const x=(u.fontWeight||"normal")==="bold"?"normal":"bold";g({fontWeight:x})},D=()=>{const x=(u.fontStyle||"normal")==="italic"?"normal":"italic";g({fontStyle:x})},y=()=>{const C=u.textDecoration||"none",x=String(C).includes("underline")?"none":"underline";g({textDecoration:x})},v=C=>{g({color:C})},E=C=>{if(r.current){r.current.focus();const x=window.getSelection();if(x&&x.rangeCount>0){const k=x.getRangeAt(0);k.deleteContents();const j=document.createElement("span");j.className="variable-tag",j.style.cssText="background: #e3f2fd; border: 1px solid #90caf9; border-radius: 4px; padding: 2px 6px; margin: 0 2px; color: #1976d2; font-size: 0.9em; cursor: pointer;",j.setAttribute("data-variable",C.name),j.textContent=`{{${C.label}}}`,k.insertNode(j),k.setStartAfter(j),k.collapse(!0),x.removeAllRanges(),x.addRange(k)}}p(!1),s(C.name)};return o.jsx("div",{ref:e,className:"flex flex-wrap gap-2 rounded-lg border border-[#E8E7EE] bg-white p-3 shadow-lg",onMouseDown:C=>C.stopPropagation(),style:{position:"absolute",left:"50%",transform:"translateX(-50%)",zIndex:9999,top:a==="top"?"-70px":void 0,bottom:a==="bottom"?"-70px":void 0},children:o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{className:`flex items-center justify-center border p-2 transition-all duration-200 ${u.fontWeight==="bold"?"border-[#00BAC7] bg-[#CCF1F4] text-[#170F4F]":"border-[#E8E7EE] bg-white text-[#170F4F] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,title:"Bold",onClick:C=>{C.preventDefault(),C.stopPropagation(),w()},children:o.jsx(T.FiBold,{size:14})}),o.jsx("button",{className:`flex items-center justify-center border p-2 transition-all duration-200 ${u.fontStyle==="italic"?"border-[#00BAC7] bg-[#CCF1F4] text-[#170F4F]":"border-[#E8E7EE] bg-white text-[#170F4F] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,title:"Italic",onMouseDown:C=>{C.preventDefault(),C.stopPropagation(),D()},children:o.jsx(T.FiItalic,{size:14})}),o.jsx("button",{className:`flex items-center justify-center border p-2 transition-all duration-200 ${String(u.textDecoration).includes("underline")?"border-[#00BAC7] bg-[#CCF1F4] text-[#170F4F]":"border-[#E8E7EE] bg-white text-[#170F4F] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,title:"Underline",onMouseDown:C=>{C.preventDefault(),C.stopPropagation(),y()},children:o.jsx(T.FiUnderline,{size:14})}),o.jsx("button",{className:"ml-2 flex items-center justify-center border border-[#E8E7EE] bg-white p-2 text-[#170F4F] transition-all duration-200 hover:border-[#00BAC7] hover:bg-[#CCF1F4]",title:"Text Color",onMouseDown:C=>{C.preventDefault(),C.stopPropagation(),m(!f)},children:o.jsx(T.FiEdit3,{size:14})}),f&&o.jsx("input",{type:"color",className:"h-8 w-8 cursor-pointer border border-[#E8E7EE] bg-white hover:border-[#00BAC7]",value:u.color?.toString()||"#000000",onChange:C=>{v(C.target.value),m(!1)}}),o.jsx("button",{className:"flex items-center justify-center border border-[#E8E7EE] bg-white p-2 text-[#170F4F] transition-all duration-200 hover:border-[#00BAC7] hover:bg-[#CCF1F4]",title:"Insert Variable",onMouseDown:C=>{C.preventDefault(),C.stopPropagation(),p(!d)},children:o.jsx(T.FiCode,{size:14})}),d&&o.jsx("div",{className:"absolute left-0 top-full z-10 mt-1 border border-[#E8E7EE] bg-white shadow-lg",children:qd.map(C=>o.jsx("button",{className:"block w-full border-none px-3 py-2 text-left text-[#170F4F] transition-colors hover:bg-[#CCF1F4]",onMouseDown:x=>{x.preventDefault(),x.stopPropagation(),E(C)},children:C.label},C.name))})]})})},Wd=({isEditing:e=!1,children:r="Double-click to edit text...",style:a={}})=>{const{setProp:s}=H.useNode(),[l,u]=S.useState("top"),d=S.useRef(null),p=S.useRef(null),f=S.useRef(null),m=S.useCallback(E=>{s(C=>{C.children=E})},[s]),g=S.useCallback(E=>{s(C=>(C.isEditing=E,C))},[s]),w=S.useCallback(E=>{E.preventDefault(),E.stopPropagation(),g(!0),p.current&&(p.current.getBoundingClientRect().top<window.innerHeight*.1?u("bottom"):u("top"))},[p]),D=S.useCallback(E=>{const C=E.target.value;C!==r&&m(C)},[r,m]),y=E=>{if(d.current){const C=window.getSelection();if(C&&C.rangeCount>0){const x=C.getRangeAt(0),k=document.createElement("span");k.setAttribute("data-variable",E),k.style.cssText="background: #e8f5e8; border: 1px solid #4caf50; border-radius: 4px; padding: 2px 6px; margin: 0 2px; color: #2e7d32; font-size: 0.9em;",k.textContent=`{{${E}}}`,x.deleteContents(),x.insertNode(k),x.setStartAfter(k),x.collapse(!0),C.removeAllRanges(),C.addRange(x);const j=d.current.innerHTML;m(j)}}};S.useEffect(()=>{const E=C=>{if(!e||!p.current)return;const x=C.target;p.current.contains(x)||f.current&&f.current.contains(x)||g(!1)};return e&&document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)}},[e,g]);const v={cursor:e?"text":"pointer",userSelect:e?"text":"none",...a};return o.jsxs("div",{ref:p,onDoubleClick:w,style:{position:"relative",width:"100%",height:"100%"},children:[e&&o.jsx(Ud,{ref:f,editableRef:d,position:l,onVariableInsert:y}),o.jsx(ho,{innerRef:E=>{d.current=E},tagName:"p",html:r,editable:e,onChange:D,style:v})]})},mo=Ge.default.memo(Wd,(e,r)=>!(e.isEditing!==r.isEditing||e.children!==r.children||JSON.stringify(e.style)!==JSON.stringify(r.style))),Vd={displayName:"Text",custom:{resizable:!0,tagHtml:"p",settings:["text","typography","default"]},props:{children:"Double click to edit text 2",isEditing:!1,style:{width:300,height:200,fontSize:16,fontWeight:"normal",color:"#000000",textAlign:"left",minHeight:"50px",padding:"8px",border:"none",outline:"none",overflow:"auto",position:"relative",wordWrap:"break-word",whiteSpace:"normal"}}};mo.craft={...Vd};function fo(){const{actions:{setProp:e},variableId:r,fallback:a}=H.useNode(s=>({variableId:s.data.props.variableId,fallback:s.data.props.fallback}));return o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Variable ID"}),o.jsx("input",{type:"text",value:r,onChange:s=>e(l=>l.variableId=s.target.value),placeholder:"ex: nome_usuario",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Default value"}),o.jsx("input",{type:"text",value:a,onChange:s=>e(l=>l.fallback=s.target.value),placeholder:"ex: Usuário",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]})]})}const Jd=({data:e,onSelect:r,selectedPath:a})=>!e||typeof e!="object"?null:o.jsx("div",{className:"space-y-2",children:Object.entries(e).map(([s,l])=>o.jsxs("button",{onClick:()=>r(s,l),className:`block w-full rounded px-3 py-2 text-left transition-colors ${a===s?"bg-blue-100 text-blue-800":"bg-gray-50 text-gray-700 hover:bg-gray-100"}`,children:[o.jsxs("span",{className:"font-medium",children:[s,":"]})," ",o.jsx("span",{className:"text-sm",children:JSON.stringify(l)})]},s))}),Gd=({isOpen:e,onClose:r,value:a,onSelect:s})=>{const[l,u]=S.useState(a||""),[d,p]=S.useState(null);return Ge.default.useEffect(()=>{const f=localStorage.getItem("bolttech_datasource");if(f)try{const m=JSON.parse(f);m&&typeof m=="object"&&m.data&&p({root:m.data})}catch{}},[e]),e?o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-40",children:o.jsxs("div",{className:"flex w-full max-w-[40vw] flex-col rounded bg-white shadow-xl",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-gray-200 p-4",children:[o.jsx("h2",{className:"text-lg font-bold text-[#170f4f]",children:"Selecionar variável do DataSource"}),o.jsx("button",{onClick:r,className:"p-2 text-gray-400 hover:text-gray-600",children:o.jsx(T.FiX,{size:18})})]}),o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-gray-700",children:"Path da variável"}),o.jsx("input",{type:"text",value:l,onChange:f=>u(f.target.value),className:"focus:ring-primary-500 w-full rounded border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2",placeholder:"Ex: root.user.name"})]}),d&&o.jsx("div",{children:o.jsx(Jd,{data:d,onSelect:f=>u(f),selectedPath:l})}),o.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[o.jsx("button",{onClick:r,className:"rounded bg-gray-100 px-4 py-2 text-gray-700 transition-colors duration-200 hover:bg-gray-200",children:"Cancelar"}),o.jsx("button",{onClick:()=>{s(l),r()},className:"rounded bg-[#170f4f] px-4 py-2 text-white transition-colors duration-200 hover:bg-[#30aab3]",children:"Salvar"})]})]})]})}):null},go=({variableId:e="variable",fallback:r="Default value",...a})=>{const{connectors:{connect:s,drag:l},selected:u,actions:{setProp:d}}=H.useNode(D=>({selected:D.events.selected})),[p,f]=S.useState(!1),m=`{{${e}}}`;let g;try{const D=localStorage.getItem("bolttech_datasource");if(D){const y=JSON.parse(D),v=y&&y.data;v&&e&&(g=e.split(".").reduce((C,x)=>C&&C[x]!==void 0?C[x]:void 0,{root:v}))}}catch{}const w={display:"inline-block",padding:"4px 8px",backgroundColor:"#fef3c7",border:"1px solid #f59e0b",borderRadius:"4px",color:"#92400e",fontFamily:"monospace",fontSize:"14px",cursor:u?"pointer":"default",transition:"all 0.2s"};return o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:D=>{D&&s(l(D))},style:w,className:`${u?"ring-2 ring-yellow-400":"hover:ring-2 hover:ring-yellow-300 hover:ring-opacity-50"} transition-all duration-200`,title:`Variable: ${e}`,onClick:()=>f(!0),...a,children:g!=null?String(g):r||m}),o.jsx(Gd,{isOpen:p,onClose:()=>f(!1),value:e,onSelect:D=>d(y=>y.variableId=D)})]})};go.craft={props:{variableId:"variavel",fallback:"Valor padrão"},related:{settings:fo}};const Jt=[{id:"box",label:"Box",icon:o.jsx(tt.RiBox3Line,{size:16}),category:"layout",component:lo,htmlTags:["div"],settings:uo},{id:"text",label:"Text",icon:o.jsx(tt.RiText,{size:16}),category:"content",component:mo,htmlTags:["p","span","h1","h2","h3","h4","h5","h6"]},{id:"button",label:"Button",icon:o.jsx(tt.RiSquareLine,{size:16}),category:"interactive",component:co,settings:_n,htmlTags:["button"]},{id:"a",label:"Anchor",icon:o.jsx(tt.RiSquareLine,{size:16}),category:"interactive",component:io,settings:jn,htmlTags:["a"]},{id:"image",label:"Image",icon:o.jsx(tt.RiImageLine,{size:16}),category:"media",component:po,settings:Ln,htmlTags:["img"]},{id:"divider",label:"Divider",icon:o.jsx(tt.RiSeparator,{size:16}),category:"layout",component:Tn,settings:Bn,htmlTags:["hr"]},{id:"variable",label:"Variable",icon:o.jsx(tt.RiCodeSSlashLine,{size:16}),category:"dynamic",component:go,settings:fo,htmlTags:["span"]}];function bo(){const[e,r]=S.useState(!1),[a,s]=S.useState(!1),[l,u]=S.useState(!0);return{showPreview:e,togglePreview:()=>{r(E=>!E)},openPreview:()=>{r(!0)},closePreview:()=>{r(!1)},showCodePanel:a,toggleCodePanel:()=>{s(E=>!E)},openCodePanel:()=>{s(!0)},closeCodePanel:()=>{s(!1)},showSidebar:l,toggleSidebar:()=>{u(E=>!E)},isEditorEnabled:!(e||a),setIsEditorEnabled:E=>{r(!E),s(!E)}}}const xo={mobile:{width:375,height:667},tablet:{width:768,height:1024},desktop:{width:1200,height:800}},Kd=new Set(["div","span","p","h1","h2","h3","h4","h5","h6","a","img","button","input","textarea","select","option","ul","ol","li","table","tr","td","th","thead","tbody","section","article","header","footer","nav","main","aside"]),Yd=new Set(["img","input","br","hr","meta","link","area","base","col","embed","source","track","wbr"]),Xd=new Set(["id","className","title","alt","src","href","target","rel"]),Zd=new Set(["width","height","min-width","min-height","max-width","max-height","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","border-width","border-top-width","border-right-width","border-bottom-width","border-left-width","top","right","bottom","left","font-size","line-height","border-radius","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius","letter-spacing","word-spacing","text-indent","text-decoration-thickness"]);class Qd{constructor(r={}){Fe(this,"options");this.options={inlineStyles:!0,prettify:!1,includeComments:!1,customComponentMap:{},styleTransformers:[],...r}}convert(r){try{const a=r.ROOT;if(!a||!a.nodes)return"";const s=this.buildHTMLFromNodes(a.nodes,r);return this.options.prettify?this.prettifyHTML(s):s}catch(a){return console.error("craftJSToHTML - Error during conversion:",a),""}}buildHTMLFromNodes(r,a){return r.map(s=>this.buildHTMLFromNode(s,a)).filter(s=>s.trim()!=="").join("")}buildHTMLFromNode(r,a){const s=a[r];if(!s||s.hidden)return"";const{type:l,props:u={},nodes:d=[]}=s,p=typeof l=="object"&&l&&"resolvedName"in l?l.resolvedName:l,f=this.getTagName(p,s),m=this.buildAttributes(u);let g=this.buildHTMLFromNodes(d,a);return u.children&&typeof u.children=="string"&&(g+=u.children),["button","a"].includes(f)&&u.text&&(g+=u.text),this.isSelfClosingTag(f)?`<${f}${m} />`:`${this.options.includeComments?`<!-- ${p} -->`:""}<${f}${m}>${g}</${f}>`}getTagName(r,a){if(a.custom?.tagName&&typeof a.custom.tagName=="string")return a.custom.tagName.toLowerCase();if(a.custom?.tagHtml&&typeof a.custom.tagHtml=="string")return a.custom.tagHtml.toLowerCase();if(this.options.customComponentMap?.[r])return this.options.customComponentMap[r];const s={image:"img",button:"button",text:"p",divider:"hr",variable:"span",box:"div"};if(s[r])return s[r];const l=r.toLowerCase();return Kd.has(l)?l:"div"}buildAttributes(r){const a=[];for(const s of Xd)if(r[s]){const l=s==="className"?"class":s;a.push(`${l}="${this.escapeHTML(r[s])}"`)}if(r.style&&this.options.inlineStyles){const s=this.convertStyleObjectToCSS(r.style);s&&a.push(`style="${s}"`)}for(const[s,l]of Object.entries(r))s.startsWith("data-")&&typeof l=="string"&&a.push(`${s}="${this.escapeHTML(l)}"`);return a.length>0?` ${a.join(" ")}`:""}convertStyleObjectToCSS(r){if(!r||typeof r!="object")return"";const a=[];for(const[s,l]of Object.entries(r)){if(l==null)continue;const u=this.camelToKebabCase(s);let d=this.applStyleTransformers(s,l);d=this.addUnitIfNeeded(u,d),a.push(`${u}: ${d}`)}return a.join("; ")}camelToKebabCase(r){return r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}applStyleTransformers(r,a){const s=this.options.styleTransformers?.find(l=>l.property===r);return s?s.transform(a):String(a)}addUnitIfNeeded(r,a){const s=parseFloat(a);return!isNaN(s)&&Zd.has(r)&&!a.includes("px")&&!a.includes("%")&&!a.includes("em")&&!a.includes("rem")&&!a.includes("vh")&&!a.includes("vw")?`${s}px`:a}isSelfClosingTag(r){return Yd.has(r.toLowerCase())}escapeHTML(r){const a=document.createElement("div");return a.textContent=r,a.innerHTML}prettifyHTML(r){let a="",s=0;const l=" ";return r.split(/>\s*</).forEach((u,d)=>{d!==0&&(u=`<${u}`),d!==r.split(/>\s*</).length-1&&(u=`${u}>`),u.match(/^<\/\w/)&&s--,a+=`${l.repeat(Math.max(0,s))+u}
|
|
2
|
-
`,u.match(/^<\w[^>]*[^/]$/)&&s++}),a.trim()}}function
|
|
3
|
-
Expected it to be 'string' or 'object'.`;if(
|
|
4
|
-
Expected it to be ${c}.`}var
|
|
5
|
-
`)):i)}var
|
|
6
|
-
`,"\f","\r"," "],zi=new Mi(Ri),Ne=zi,$i=class extends Error{constructor(n,i,c="type"){super(`Unexpected ${i} node ${c}: ${JSON.stringify(n[c])}.`);Fe(this,"name","UnexpectedNodeError");this.node=n}},Hi=$i;function qi(t){return t?.type==="front-matter"}var Qt=qi,Ui=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),Wi=new Set(["if","else if","for","switch","case"]);function oa(t,n){var i;if(t.type==="text"||t.type==="comment"||Qt(t)||t.type==="yaml"||t.type==="toml")return null;if(t.type==="attribute"&&delete n.value,t.type==="docType"&&delete n.value,t.type==="angularControlFlowBlock"&&(i=t.parameters)!=null&&i.children)for(let c of n.parameters.children)Wi.has(t.name)?delete c.expression:c.expression=c.expression.trim();t.type==="angularIcuExpression"&&(n.switchValue=t.switchValue.trim()),t.type==="angularLetDeclarationInitializer"&&delete n.value}oa.ignoredProperties=Ui;var Vi=oa;async function Ji(t,n){if(t.language==="yaml"){let i=t.value.trim(),c=i?await n(i,{parser:"yaml"}):"";return Ni([t.startDelimiter,t.explicitLanguage,Y,c,c?Y:"",t.endDelimiter])}}var Gi=Ji;function er(t,n=!0){return[Ce([ie,t]),n?ie:""]}function dt(t,n){let i=t.type==="NGRoot"?t.node.type==="NGMicrosyntax"&&t.node.body.length===1&&t.node.body[0].type==="NGMicrosyntaxExpression"?t.node.body[0].expression:t.node:t.type==="JsExpressionRoot"?t.node:t;return i&&(i.type==="ObjectExpression"||i.type==="ArrayExpression"||(n.parser==="__vue_expression"||n.parser==="__vue_ts_expression")&&(i.type==="TemplateLiteral"||i.type==="StringLiteral"))}async function ye(t,n,i,c){i={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...i};let h=!0;c&&(i.__onHtmlBindingRoot=(F,A)=>{h=c(F,A)});let b=await n(t,i,n);return h?te(b):er(b)}function Ki(t,n,i,c){let{node:h}=i,b=c.originalText.slice(h.sourceSpan.start.offset,h.sourceSpan.end.offset);return/^\s*$/u.test(b)?"":ye(b,t,{parser:"__ng_directive",__isInHtmlAttribute:!1},dt)}var Yi=Ki,Xi=(t,n)=>{if(!(t&&n==null))return n.toReversed||!Array.isArray(n)?n.toReversed():[...n].reverse()},Zi=Xi;function Qi(t){return Array.isArray(t)&&t.length>0}var Pr=Qi,ia,la,ua,ca,da,el=((ia=globalThis.Deno)==null?void 0:ia.build.os)==="windows"||((ua=(la=globalThis.navigator)==null?void 0:la.platform)==null?void 0:ua.startsWith("Win"))||((da=(ca=globalThis.process)==null?void 0:ca.platform)==null?void 0:da.startsWith("win"))||!1;function pa(t){if(t=t instanceof URL?t:new URL(t),t.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${t.protocol}"`);return t}function tl(t){return t=pa(t),decodeURIComponent(t.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function rl(t){t=pa(t);let n=decodeURIComponent(t.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return t.hostname!==""&&(n=`\\\\${t.hostname}${n}`),n}function nl(t){return el?rl(t):tl(t)}var al=nl,sl=t=>String(t).split(/[/\\]/u).pop();function ha(t,n){if(!n)return;let i=sl(n).toLowerCase();return t.find(({filenames:c})=>c?.some(h=>h.toLowerCase()===i))??t.find(({extensions:c})=>c?.some(h=>i.endsWith(h)))}function ol(t,n){if(n)return t.find(({name:i})=>i.toLowerCase()===n)??t.find(({aliases:i})=>i?.includes(n))??t.find(({extensions:i})=>i?.includes(`.${n}`))}function ma(t,n){if(n){if(String(n).startsWith("file:"))try{n=al(n)}catch{return}if(typeof n=="string")return t.find(({isSupported:i})=>i?.({filepath:n}))}}function il(t,n){let i=Zi(!1,t.plugins).flatMap(h=>h.languages??[]),c=ol(i,n.language)??ha(i,n.physicalFile)??ha(i,n.file)??ma(i,n.physicalFile)??ma(i,n.file)??(n.physicalFile,void 0);return c?.parsers[0]}var tr=il,ll="inline",fa={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",source:"block",track:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},ul="normal",ga={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function cl(t){return t.type==="element"&&!t.hasExplicitNamespace&&!["html","svg"].includes(t.namespace)}var St=cl,dl=t=>k(!1,t,/^[\t\f\r ]*\n/gu,""),ba=t=>dl(Ne.trimEnd(t)),pl=t=>{let n=t,i=Ne.getLeadingWhitespace(n);i&&(n=n.slice(i.length));let c=Ne.getTrailingWhitespace(n);return c&&(n=n.slice(0,-c.length)),{leadingWhitespace:i,trailingWhitespace:c,text:n}};function xa(t,n){return!!(t.type==="ieConditionalComment"&&t.lastChild&&!t.lastChild.isSelfClosing&&!t.lastChild.endSourceSpan||t.type==="ieConditionalComment"&&!t.complete||pt(t)&&t.children.some(i=>i.type!=="text"&&i.type!=="interpolation")||Mr(t,n)&&!je(t,n)&&t.type!=="interpolation")}function rr(t){return t.type==="attribute"||!t.parent||!t.prev?!1:hl(t.prev)}function hl(t){return t.type==="comment"&&t.value.trim()==="prettier-ignore"}function ge(t){return t.type==="text"||t.type==="comment"}function je(t,n){return t.type==="element"&&(t.fullName==="script"||t.fullName==="style"||t.fullName==="svg:style"||t.fullName==="svg:script"||t.fullName==="mj-style"&&n.parser==="mjml"||St(t)&&(t.name==="script"||t.name==="style"))}function ml(t,n){return t.children&&!je(t,n)}function fl(t,n){return je(t,n)||t.type==="interpolation"||Da(t)}function Da(t){return ka(t).startsWith("pre")}function gl(t,n){var i,c;let h=b();if(h&&!t.prev&&(c=(i=t.parent)==null?void 0:i.tagDefinition)!=null&&c.ignoreFirstLf)return t.type==="interpolation";return h;function b(){return Qt(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.prev&&(t.prev.type==="text"||t.prev.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:pt(t.parent)?!0:!(!t.prev&&(t.parent.type==="root"||pt(t)&&t.parent||je(t.parent,n)||ar(t.parent,n)||!El(t.parent.cssDisplay))||t.prev&&!Al(t.prev.cssDisplay))}}function bl(t,n){return Qt(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.next&&(t.next.type==="text"||t.next.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:pt(t.parent)?!0:!(!t.next&&(t.parent.type==="root"||pt(t)&&t.parent||je(t.parent,n)||ar(t.parent,n)||!Sl(t.parent.cssDisplay))||t.next&&!kl(t.next.cssDisplay))}function xl(t,n){return Nl(t.cssDisplay)&&!je(t,n)}function nr(t){return Qt(t)||t.next&&t.sourceSpan.end&&t.sourceSpan.end.line+1<t.next.sourceSpan.start.line}function Dl(t){return ya(t)||t.type==="element"&&t.children.length>0&&(["body","script","style"].includes(t.name)||t.children.some(n=>vl(n)))||t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.type!=="text"&&wa(t.firstChild)&&(!t.lastChild.isTrailingSpaceSensitive||Ca(t.lastChild))}function ya(t){return t.type==="element"&&t.children.length>0&&(["html","head","ul","ol","select"].includes(t.name)||t.cssDisplay.startsWith("table")&&t.cssDisplay!=="table-cell")}function Ir(t){return Fa(t)||t.prev&&yl(t.prev)||va(t)}function yl(t){return Fa(t)||t.type==="element"&&t.fullName==="br"||va(t)}function va(t){return wa(t)&&Ca(t)}function wa(t){return t.hasLeadingSpaces&&(t.prev?t.prev.sourceSpan.end.line<t.sourceSpan.start.line:t.parent.type==="root"||t.parent.startSourceSpan.end.line<t.sourceSpan.start.line)}function Ca(t){return t.hasTrailingSpaces&&(t.next?t.next.sourceSpan.start.line>t.sourceSpan.end.line:t.parent.type==="root"||t.parent.endSourceSpan&&t.parent.endSourceSpan.start.line>t.sourceSpan.end.line)}function Fa(t){switch(t.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(t.name)}return!1}function Or(t){return t.lastChild?Or(t.lastChild):t}function vl(t){var n;return(n=t.children)==null?void 0:n.some(i=>i.type!=="text")}function Ea(t){if(t)switch(t){case"module":case"text/javascript":case"text/babel":case"text/jsx":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules")return"json"}}function wl(t,n){let{name:i,attrMap:c}=t;if(i!=="script"||Object.prototype.hasOwnProperty.call(c,"src"))return;let{type:h,lang:b}=t.attrMap;return!b&&!h?"babel":tr(n,{language:b})??Ea(h)}function Cl(t,n){if(!Mr(t,n))return;let{attrMap:i}=t;if(Object.prototype.hasOwnProperty.call(i,"src"))return;let{type:c,lang:h}=i;return tr(n,{language:h})??Ea(c)}function Fl(t,n){if(t.name==="style"){let{lang:i}=t.attrMap;return i?tr(n,{language:i}):"css"}if(t.name==="mj-style"&&n.parser==="mjml")return"css"}function Sa(t,n){return wl(t,n)??Fl(t,n)??Cl(t,n)}function kt(t){return t==="block"||t==="list-item"||t.startsWith("table")}function El(t){return!kt(t)&&t!=="inline-block"}function Sl(t){return!kt(t)&&t!=="inline-block"}function kl(t){return!kt(t)}function Al(t){return!kt(t)}function Nl(t){return!kt(t)&&t!=="inline-block"}function pt(t){return ka(t).startsWith("pre")}function jl(t,n){let i=t;for(;i;){if(n(i))return!0;i=i.parent}return!1}function _l(t,n){var i;if(ht(t,n))return"block";if(((i=t.prev)==null?void 0:i.type)==="comment"){let h=t.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);if(h)return h[1]}let c=!1;if(t.type==="element"&&t.namespace==="svg")if(jl(t,h=>h.fullName==="svg:foreignObject"))c=!0;else return t.name==="svg"?"inline-block":"block";switch(n.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:if(t.type==="element"&&(!t.namespace||c||St(t))&&Object.prototype.hasOwnProperty.call(fa,t.name))return fa[t.name]}return ll}function ka(t){return t.type==="element"&&(!t.namespace||St(t))&&Object.prototype.hasOwnProperty.call(ga,t.name)?ga[t.name]:ul}function Bl(t){let n=Number.POSITIVE_INFINITY;for(let i of t.split(`
|
|
7
|
-
`)){if(i.length===0)continue;let c=Ne.getLeadingWhitespaceCount(i);if(c===0)return 0;i.length!==c&&c<n&&(n=c)}return n===Number.POSITIVE_INFINITY?0:n}function
|
|
1
|
+
"use strict";var Cd=Object.defineProperty;var Fd=(e,r,a)=>r in e?Cd(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a;var Fe=(e,r,a)=>Fd(e,typeof r!="symbol"?r+"":r,a);Object.defineProperty(exports,"__esModule",{value:!0});const o=require("react/jsx-runtime"),Ed=require("react-shadow"),S=require("react"),H=require("@craftjs/core"),tt=require("react-icons/ri"),T=require("react-icons/fi"),Sd=require("htmlparser2"),kd=require("@monaco-editor/react"),Ad=require("react-dom"),zt=require("react-icons/lu"),Nd=require("@craftjs/utils"),jd=require("re-resizable"),_d=require("@bolttech/templating-sdk");function An(e){return e&&e.__esModule?e:{default:e}}function Bd(e,r){for(var a=0;a<r.length;a++){const s=r[a];if(typeof s!="string"&&!Array.isArray(s)){for(const l in s)if(l!=="default"&&!(l in e)){const u=Object.getOwnPropertyDescriptor(s,l);u&&Object.defineProperty(e,l,u.get?u:{enumerable:!0,get:function(){return s[l]}})}}}return Object.freeze(e)}const Td=An(Ed),Ge=An(S),Ld=An(kd),so=({text:e="Text",style:r,href:a,...s})=>{const{connectors:{connect:l,drag:u},selected:d}=H.useNode(m=>({selected:m.events.selected})),{isEnabled:p}=H.useEditor(m=>({isEnabled:m.options.enabled})),f=()=>({...{fontFamily:"inherit",fontWeight:"500",cursor:d?"pointer":"default",transition:"all 0.2s",padding:"8px 16px",fontSize:"16px",backgroundColor:"#3b82f6",color:"#ffffff",borderRadius:"8px",borderStyle:"none",whiteSpace:"nowrap",display:"inline-flex",textDecoration:"none",lineHeight:"1.5",alignItems:"center",justifyContent:"center"},...r});return o.jsx("a",{ref:m=>{m&&l(u(m))},style:f(),href:p?void 0:a,target:"_blank",...s,children:e})},Pd={props:{text:"Text",target:"_blank",style:{fontFamily:"inherit",fontWeight:"500",cursor:"pointer",transition:"all 0.2s",padding:"8px 16px",fontSize:"16px",backgroundColor:"#3b82f6",color:"#ffffff",borderRadius:"8px",borderStyle:"none",whiteSpace:"nowrap",display:"inline-flex",textDecoration:"none",lineHeight:"1.5",alignItems:"center",justifyContent:"center"}},displayName:"Anchor",custom:{displayName:"Anchor",settings:["anchor","typography","background","border","spacing"]}};function Nn(){const{actions:{setProp:e},text:r,href:a}=H.useNode(s=>({text:s.data.props.text,href:s.data.props.href}));return o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Text"}),o.jsx("input",{type:"text",value:r,onChange:s=>e(l=>l.text=s.target.value),className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Link"}),o.jsx("input",{type:"text",value:a||"",onChange:s=>{e(l=>l.href=s.target.value)},className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]})]})}so.craft={...Pd,related:{settings:Nn}};const oo=({children:e,style:r,...a})=>{const{connectors:{connect:s,drag:l}}=H.useNode(d=>({selected:d.events.selected})),u={...r,overflow:"visible",boxSizing:"border-box",...r?.height==="auto"&&{height:"auto",minHeight:r?.minHeight||"50px"}};return o.jsx("div",{ref:d=>{d&&s(l(d))},style:u,...a,children:e})},Id={displayName:"Box",isCanvas:!0,custom:{resizable:!0,settings:["box","default"]},props:{style:{border:"none",borderRadius:"0px",width:"100%",height:"auto",minHeight:"50px"}}};oo.craft={...Id};const We=({options:e,value:r,onChange:a,placeholder:s="Select an option",disabled:l=!1,className:u=""})=>o.jsxs("div",{className:`relative ${u}`,children:[o.jsxs("select",{value:r||"",onChange:d=>a?.(d.target.value),disabled:l,className:`w-full appearance-none rounded-none border border-[#E8E7EE] bg-white px-3 py-2 pr-10 text-sm text-gray-700 transition-all duration-200 hover:border-[#170F4F]/30 hover:bg-gray-50 focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]/20 disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-400 ${r?"text-gray-700":"text-gray-500"} `,children:[s&&o.jsx("option",{value:"",disabled:!0,hidden:!0,children:s}),e.map(d=>o.jsx("option",{value:d.value,children:d.label},d.value))]}),o.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:o.jsx(T.FiChevronDown,{size:16,className:`transition-colors duration-200 ${l?"text-gray-400":"text-gray-500"}`})})]});function io(){const{actions:{setProp:e},style:r}=H.useNode(s=>({style:s.data.props.style})),a=r.display==="block"?"block":r.flexDirection;return o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Layout direction"}),o.jsx(We,{options:[{value:"row",label:"Row"},{value:"column",label:"Column"},{value:"block",label:"Block"}],value:a,onChange:s=>{e(s==="block"?l=>{l.style.display="block",delete l.style.flexDirection}:l=>{l.style.display="flex",l.style.flexDirection=s})},placeholder:"Choose alignment"})]}),r.display!=="block"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Alignment"}),o.jsx(We,{options:[{value:"flex-start",label:"Flex Start"},{value:"flex-end",label:"Flex End"},{value:"center",label:"Center"},{value:"space-between",label:"Space Between"},{value:"space-around",label:"Space Around"},{value:"space-evenly",label:"Space Evenly"}],value:r.justifyContent,onChange:s=>e(l=>l.style.justifyContent=s),placeholder:"Choose alignment"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Gap"}),o.jsx(We,{options:[{value:"0px",label:"0"},{value:"4px",label:"4"},{value:"8px",label:"8"},{value:"12px",label:"12"},{value:"16px",label:"16"},{value:"24px",label:"24"},{value:"32px",label:"32"},{value:"48px",label:"48"},{value:"64px",label:"64"}],value:r.gap,onChange:s=>e(l=>l.style.gap=s),placeholder:"Choose gap"})]})]})]})}const lo=({text:e="Button",onClick:r,style:a,...s})=>{const{connectors:{connect:l,drag:u},selected:d}=H.useNode(f=>({selected:f.events.selected})),p=()=>({...{fontFamily:"inherit",fontWeight:"500",cursor:d?"pointer":"default",transition:"all 0.2s",padding:"8px 16px",fontSize:"16px",backgroundColor:"#3b82f6",color:"#ffffff",borderRadius:"8px",borderStyle:"none",whiteSpace:"nowrap"},...a});return o.jsx("button",{ref:f=>{f&&l(u(f))},style:p(),className:`${d?"ring-primary-500 ring-2 ring-opacity-50":"hover:ring-2 hover:ring-gray-300 hover:ring-opacity-50"} transition-all duration-200`,onClick:r,...s,children:e})},Od={props:{text:"Button",style:{fontFamily:"inherit",fontWeight:"500",cursor:"pointer",transition:"all 0.2s",padding:"8px 16px",fontSize:"16",backgroundColor:"#3b82f6",color:"#ffffff",borderRadius:"8px",borderStyle:"none",whiteSpace:"nowrap"}},displayName:"Button",custom:{displayName:"Button",settings:["button","typography","background","border","spacing"]}};function jn(){const{actions:{setProp:e},text:r,href:a}=H.useNode(s=>({text:s.data.props.text,href:s.data.props.href}));return o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Button text"}),o.jsx("input",{type:"text",value:r,onChange:s=>e(l=>l.text=s.target.value),className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Link"}),o.jsx("input",{type:"text",value:a||"",onChange:s=>{e(l=>l.onClick=()=>{window.open(s.target.value,"_blank")}),e(l=>l.href=s.target.value)},className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]})]})}lo.craft={...Od,related:{settings:jn}};function _n(){const{actions:{setProp:e},style:r}=H.useNode(a=>({style:a.data.props.style}));return o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Height"}),o.jsx("input",{type:"text",value:r.height,onChange:a=>e(s=>s.style.height=a.target.value),placeholder:"1px",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Width"}),o.jsx("input",{type:"text",value:r.width,onChange:a=>e(s=>s.style.width=a.target.value),placeholder:"100%",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]})]})}const Bn=({style:e,...r})=>{const{connectors:{connect:a,drag:s},selected:l}=H.useNode(d=>({selected:d.events.selected})),u={...e,cursor:l?"pointer":"default"};return o.jsx("hr",{ref:d=>{d&&a(s(d))},style:u,className:`${l?"ring-primary-500 ring-2 ring-opacity-50":"hover:ring-2 hover:ring-gray-300 hover:ring-opacity-50"} transition-all duration-200`,...r})};Bn.craft={props:{style:{height:"1px",width:"100%",margin:"16px 0",backgroundColor:"#e5e7eb"}},related:{settings:_n}};const Md={props:{style:{marginTop:"0px",marginRight:"0px",marginBottom:"0px",marginLeft:"0px",backgroundColor:"#e5e7eb",height:"1px",width:"100%"}},related:{settings:"DividerSettings"},custom:{displayName:"Divider",settings:["divider","background","spacing"]}};Bn.craft={...Md};const uo=({src:e="https://picsum.photos/id/1/1200/1200",alt:r="Image",style:a,...s})=>{const{connectors:{connect:l,drag:u},selected:d}=H.useNode(f=>({selected:f.events.selected})),p={...a,cursor:d?"pointer":"default"};return o.jsx("img",{ref:f=>{f&&l(u(f))},src:e,alt:r,style:p,className:`${d?"ring-primary-500 ring-2 ring-opacity-50":"hover:ring-2 hover:ring-gray-300 hover:ring-opacity-50"}`,...s})},Rd={props:{src:"https://picsum.photos/id/1/1200/1200",alt:"Image",style:{width:"200px",height:"200px",objectFit:"cover",borderRadius:"0px"}},custom:{resizable:!0,settings:["image","border"]},related:{settings:"ImageSettings"}};function Tn(){const{actions:{setProp:e},src:r,alt:a,style:s}=H.useNode(l=>({src:l.data.props.src,alt:l.data.props.alt,style:l.data.props.style}));return o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Image URL"}),o.jsx("input",{type:"text",value:r,onChange:l=>e(u=>u.src=l.target.value),placeholder:"https://example.com/image.jpg",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Alt Text"}),o.jsx("input",{type:"text",value:a,onChange:l=>e(u=>u.alt=l.target.value),placeholder:"Image description",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Width"}),o.jsx("input",{type:"text",value:s.width,onChange:l=>e(u=>u.style.width=l.target.value),placeholder:"100%",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Height"}),o.jsx("input",{type:"text",value:s.height,onChange:l=>e(u=>u.style.height=l.target.value),placeholder:"auto",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Object Fit"}),o.jsx(We,{options:[{value:"cover",label:"Cover"},{value:"contain",label:"Contain"},{value:"fill",label:"Fill"},{value:"none",label:"None"},{value:"scale-down",label:"Scale Down"}],value:s.objectFit,onChange:l=>e(u=>u.style.objectFit=l),placeholder:"Choose object fit"})]})]})}uo.craft={...Rd,related:{settings:Tn}};const zd=new Set(["Delete","Backspace","Escape","Enter","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"]);function $d({tagName:e="div",html:r,innerRef:a,onChange:s,disabled:l=!1,editable:u=!0,onBlur:d,onKeyUp:p,onKeyDown:f,...m}){const g=S.useRef(null),w=S.useRef(r),D=S.useRef(!1),y=S.useRef(r),v=S.useCallback(()=>(a&&typeof a!="function"?a:g).current,[a]),E=S.useCallback((_,O)=>Object.assign({},_,{target:{value:O}}),[]),C=S.useCallback(_=>{const O=v();if(!O||!s)return;const L=O.innerHTML;L!==w.current&&(y.current=L,D.current=!0,w.current=L,s(E(_,L)))},[v,s,E]),x=S.useCallback((_,O)=>{if(document.activeElement!==_){O();return}const L=window.getSelection();if(!L||L.rangeCount===0){O();return}const ue=L.getRangeAt(0).startOffset;O();try{const pe=document.createRange(),ee=_.firstChild||_,Re=Math.min(ue,ee.textContent?.length||0);pe.setStart(ee,Re),pe.collapse(!0),L.removeAllRanges(),L.addRange(pe)}catch{}},[]);S.useEffect(()=>{const _=v();_&&r!==w.current&&!D.current&&x(_,()=>{_.innerHTML=r,y.current=r,w.current=r})},[r,v,x]),S.useEffect(()=>{const _=v();_&&r!==_.innerHTML&&(_.innerHTML=r),y.current=r,w.current=r},[v,r]),S.useEffect(()=>{u||(D.current=!1)},[u]);const k=S.useCallback(_=>{u&&zd.has(_.key)&&_.stopPropagation(),f?.(_),u&&C(_)},[u,f,C]),j=S.useCallback(_=>{u&&_.stopPropagation(),p?.(_),u&&C(_)},[u,p,C]),N=S.useCallback(_=>{u&&(_.stopPropagation(),C(_))},[u,C]),P=S.useCallback(_=>{D.current=!1,d?.(_),u&&C(_)},[u,d,C]),R=S.useCallback(_=>{typeof a=="function"&&a(_),g.current=_},[a]);return Ge.default.createElement(e,{...m,ref:typeof a=="function"?R:a||g,contentEditable:!l&&u,suppressContentEditableWarning:!0,onInput:N,onBlur:P,onKeyUp:j,onKeyDown:k,dangerouslySetInnerHTML:{__html:r}})}const co=Ge.default.memo($d,(e,r)=>!(r.editable===!1||e.editable!==r.editable||e.disabled!==r.disabled||e.tagName!==r.tagName||JSON.stringify(e.style)!==JSON.stringify(r.style)));co.displayName="ContentEditable";const Hd=[{name:"userName",label:"User Name",value:"John Doe"},{name:"userEmail",label:"User Email",value:"john@example.com"},{name:"companyName",label:"Company Name",value:"Acme Corp"},{name:"currentDate",label:"Current Date",value:new Date().toLocaleDateString()},{name:"currentTime",label:"Current Time",value:new Date().toLocaleTimeString()}],qd=({ref:e,editableRef:r,position:a,onVariableInsert:s})=>{const{actions:l,style:u={}}=H.useNode(C=>({style:C.data.props.style||{}})),[d,p]=S.useState(!1),[f,m]=S.useState(!1),g=C=>{l.setProp(x=>{x.style={...x.style,...C}})},w=()=>{const x=(u.fontWeight||"normal")==="bold"?"normal":"bold";g({fontWeight:x})},D=()=>{const x=(u.fontStyle||"normal")==="italic"?"normal":"italic";g({fontStyle:x})},y=()=>{const C=u.textDecoration||"none",x=String(C).includes("underline")?"none":"underline";g({textDecoration:x})},v=C=>{g({color:C})},E=C=>{if(r.current){r.current.focus();const x=window.getSelection();if(x&&x.rangeCount>0){const k=x.getRangeAt(0);k.deleteContents();const j=document.createElement("span");j.className="variable-tag",j.style.cssText="background: #e3f2fd; border: 1px solid #90caf9; border-radius: 4px; padding: 2px 6px; margin: 0 2px; color: #1976d2; font-size: 0.9em; cursor: pointer;",j.setAttribute("data-variable",C.name),j.textContent=`{{${C.label}}}`,k.insertNode(j),k.setStartAfter(j),k.collapse(!0),x.removeAllRanges(),x.addRange(k)}}p(!1),s(C.name)};return o.jsx("div",{ref:e,className:"flex flex-wrap gap-2 rounded-lg border border-[#E8E7EE] bg-white p-3 shadow-lg",onMouseDown:C=>C.stopPropagation(),style:{position:"absolute",left:"50%",transform:"translateX(-50%)",zIndex:9999,top:a==="top"?"-70px":void 0,bottom:a==="bottom"?"-70px":void 0},children:o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{className:`flex items-center justify-center border p-2 transition-all duration-200 ${u.fontWeight==="bold"?"border-[#00BAC7] bg-[#CCF1F4] text-[#170F4F]":"border-[#E8E7EE] bg-white text-[#170F4F] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,title:"Bold",onClick:C=>{C.preventDefault(),C.stopPropagation(),w()},children:o.jsx(T.FiBold,{size:14})}),o.jsx("button",{className:`flex items-center justify-center border p-2 transition-all duration-200 ${u.fontStyle==="italic"?"border-[#00BAC7] bg-[#CCF1F4] text-[#170F4F]":"border-[#E8E7EE] bg-white text-[#170F4F] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,title:"Italic",onMouseDown:C=>{C.preventDefault(),C.stopPropagation(),D()},children:o.jsx(T.FiItalic,{size:14})}),o.jsx("button",{className:`flex items-center justify-center border p-2 transition-all duration-200 ${String(u.textDecoration).includes("underline")?"border-[#00BAC7] bg-[#CCF1F4] text-[#170F4F]":"border-[#E8E7EE] bg-white text-[#170F4F] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,title:"Underline",onMouseDown:C=>{C.preventDefault(),C.stopPropagation(),y()},children:o.jsx(T.FiUnderline,{size:14})}),o.jsx("button",{className:"ml-2 flex items-center justify-center border border-[#E8E7EE] bg-white p-2 text-[#170F4F] transition-all duration-200 hover:border-[#00BAC7] hover:bg-[#CCF1F4]",title:"Text Color",onMouseDown:C=>{C.preventDefault(),C.stopPropagation(),m(!f)},children:o.jsx(T.FiEdit3,{size:14})}),f&&o.jsx("input",{type:"color",className:"h-8 w-8 cursor-pointer border border-[#E8E7EE] bg-white hover:border-[#00BAC7]",value:u.color?.toString()||"#000000",onChange:C=>{v(C.target.value),m(!1)}}),o.jsx("button",{className:"flex items-center justify-center border border-[#E8E7EE] bg-white p-2 text-[#170F4F] transition-all duration-200 hover:border-[#00BAC7] hover:bg-[#CCF1F4]",title:"Insert Variable",onMouseDown:C=>{C.preventDefault(),C.stopPropagation(),p(!d)},children:o.jsx(T.FiCode,{size:14})}),d&&o.jsx("div",{className:"absolute left-0 top-full z-10 mt-1 border border-[#E8E7EE] bg-white shadow-lg",children:Hd.map(C=>o.jsx("button",{className:"block w-full border-none px-3 py-2 text-left text-[#170F4F] transition-colors hover:bg-[#CCF1F4]",onMouseDown:x=>{x.preventDefault(),x.stopPropagation(),E(C)},children:C.label},C.name))})]})})},Ud=({isEditing:e=!1,children:r="Double-click to edit text...",style:a={}})=>{const{setProp:s}=H.useNode(),[l,u]=S.useState("top"),d=S.useRef(null),p=S.useRef(null),f=S.useRef(null),m=S.useCallback(E=>{s(C=>{C.children=E})},[s]),g=S.useCallback(E=>{s(C=>(C.isEditing=E,C))},[s]),w=S.useCallback(E=>{E.preventDefault(),E.stopPropagation(),g(!0),p.current&&(p.current.getBoundingClientRect().top<window.innerHeight*.1?u("bottom"):u("top"))},[p]),D=S.useCallback(E=>{const C=E.target.value;C!==r&&m(C)},[r,m]),y=E=>{if(d.current){const C=window.getSelection();if(C&&C.rangeCount>0){const x=C.getRangeAt(0),k=document.createElement("span");k.setAttribute("data-variable",E),k.style.cssText="background: #e8f5e8; border: 1px solid #4caf50; border-radius: 4px; padding: 2px 6px; margin: 0 2px; color: #2e7d32; font-size: 0.9em;",k.textContent=`{{${E}}}`,x.deleteContents(),x.insertNode(k),x.setStartAfter(k),x.collapse(!0),C.removeAllRanges(),C.addRange(x);const j=d.current.innerHTML;m(j)}}};S.useEffect(()=>{const E=C=>{if(!e||!p.current)return;const x=C.target;p.current.contains(x)||f.current&&f.current.contains(x)||g(!1)};return e&&document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)}},[e,g]);const v={cursor:e?"text":"pointer",userSelect:e?"text":"none",...a};return o.jsxs("div",{ref:p,onDoubleClick:w,style:{position:"relative",width:"100%",height:"100%"},children:[e&&o.jsx(qd,{ref:f,editableRef:d,position:l,onVariableInsert:y}),o.jsx(co,{innerRef:E=>{d.current=E},tagName:"p",html:r,editable:e,onChange:D,style:v})]})},po=Ge.default.memo(Ud,(e,r)=>!(e.isEditing!==r.isEditing||e.children!==r.children||JSON.stringify(e.style)!==JSON.stringify(r.style))),Wd={displayName:"Text",custom:{resizable:!0,tagHtml:"p",settings:["text","typography","default"]},props:{children:"Double click to edit text 2",isEditing:!1,style:{width:300,height:200,fontSize:16,fontWeight:"normal",color:"#000000",textAlign:"left",minHeight:"50px",padding:"8px",border:"none",outline:"none",overflow:"auto",position:"relative",wordWrap:"break-word",whiteSpace:"normal"}}};po.craft={...Wd};function ho(){const{actions:{setProp:e},variableId:r,fallback:a}=H.useNode(s=>({variableId:s.data.props.variableId,fallback:s.data.props.fallback}));return o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Variable ID"}),o.jsx("input",{type:"text",value:r,onChange:s=>e(l=>l.variableId=s.target.value),placeholder:"ex: nome_usuario",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Default value"}),o.jsx("input",{type:"text",value:a,onChange:s=>e(l=>l.fallback=s.target.value),placeholder:"ex: Usuário",className:"focus:ring-primary-500 w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]})]})}const Vd=({data:e,onSelect:r,selectedPath:a})=>!e||typeof e!="object"?null:o.jsx("div",{className:"space-y-2",children:Object.entries(e).map(([s,l])=>o.jsxs("button",{onClick:()=>r(s,l),className:`block w-full rounded px-3 py-2 text-left transition-colors ${a===s?"bg-blue-100 text-blue-800":"bg-gray-50 text-gray-700 hover:bg-gray-100"}`,children:[o.jsxs("span",{className:"font-medium",children:[s,":"]})," ",o.jsx("span",{className:"text-sm",children:JSON.stringify(l)})]},s))}),Jd=({isOpen:e,onClose:r,value:a,onSelect:s})=>{const[l,u]=S.useState(a||""),[d,p]=S.useState(null);return Ge.default.useEffect(()=>{const f=localStorage.getItem("bolttech_datasource");if(f)try{const m=JSON.parse(f);m&&typeof m=="object"&&m.data&&p({root:m.data})}catch{}},[e]),e?o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-40",children:o.jsxs("div",{className:"flex w-full max-w-[40vw] flex-col rounded bg-white shadow-xl",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-gray-200 p-4",children:[o.jsx("h2",{className:"text-lg font-bold text-[#170f4f]",children:"Selecionar variável do DataSource"}),o.jsx("button",{onClick:r,className:"p-2 text-gray-400 hover:text-gray-600",children:o.jsx(T.FiX,{size:18})})]}),o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-gray-700",children:"Path da variável"}),o.jsx("input",{type:"text",value:l,onChange:f=>u(f.target.value),className:"focus:ring-primary-500 w-full rounded border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2",placeholder:"Ex: root.user.name"})]}),d&&o.jsx("div",{children:o.jsx(Vd,{data:d,onSelect:f=>u(f),selectedPath:l})}),o.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[o.jsx("button",{onClick:r,className:"rounded bg-gray-100 px-4 py-2 text-gray-700 transition-colors duration-200 hover:bg-gray-200",children:"Cancelar"}),o.jsx("button",{onClick:()=>{s(l),r()},className:"rounded bg-[#170f4f] px-4 py-2 text-white transition-colors duration-200 hover:bg-[#30aab3]",children:"Salvar"})]})]})]})}):null},mo=({variableId:e="variable",fallback:r="Default value",...a})=>{const{connectors:{connect:s,drag:l},selected:u,actions:{setProp:d}}=H.useNode(D=>({selected:D.events.selected})),[p,f]=S.useState(!1),m=`{{${e}}}`;let g;try{const D=localStorage.getItem("bolttech_datasource");if(D){const y=JSON.parse(D),v=y&&y.data;v&&e&&(g=e.split(".").reduce((C,x)=>C&&C[x]!==void 0?C[x]:void 0,{root:v}))}}catch{}const w={display:"inline-block",padding:"4px 8px",backgroundColor:"#fef3c7",border:"1px solid #f59e0b",borderRadius:"4px",color:"#92400e",fontFamily:"monospace",fontSize:"14px",cursor:u?"pointer":"default",transition:"all 0.2s"};return o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:D=>{D&&s(l(D))},style:w,className:`${u?"ring-2 ring-yellow-400":"hover:ring-2 hover:ring-yellow-300 hover:ring-opacity-50"} transition-all duration-200`,title:`Variable: ${e}`,onClick:()=>f(!0),...a,children:g!=null?String(g):r||m}),o.jsx(Jd,{isOpen:p,onClose:()=>f(!1),value:e,onSelect:D=>d(y=>y.variableId=D)})]})};mo.craft={props:{variableId:"variavel",fallback:"Valor padrão"},related:{settings:ho}};const Jt=[{id:"box",label:"Box",icon:o.jsx(tt.RiBox3Line,{size:16}),category:"layout",component:oo,htmlTags:["div"],settings:io},{id:"text",label:"Text",icon:o.jsx(tt.RiText,{size:16}),category:"content",component:po,htmlTags:["p","span","h1","h2","h3","h4","h5","h6"]},{id:"button",label:"Button",icon:o.jsx(tt.RiSquareLine,{size:16}),category:"interactive",component:lo,settings:jn,htmlTags:["button"]},{id:"a",label:"Anchor",icon:o.jsx(tt.RiSquareLine,{size:16}),category:"interactive",component:so,settings:Nn,htmlTags:["a"]},{id:"image",label:"Image",icon:o.jsx(tt.RiImageLine,{size:16}),category:"media",component:uo,settings:Tn,htmlTags:["img"]},{id:"divider",label:"Divider",icon:o.jsx(tt.RiSeparator,{size:16}),category:"layout",component:Bn,settings:_n,htmlTags:["hr"]},{id:"variable",label:"Variable",icon:o.jsx(tt.RiCodeSSlashLine,{size:16}),category:"dynamic",component:mo,settings:ho,htmlTags:["span"]}];function fo(){const[e,r]=S.useState(!1),[a,s]=S.useState(!1),[l,u]=S.useState(!0);return{showPreview:e,togglePreview:()=>{r(E=>!E)},openPreview:()=>{r(!0)},closePreview:()=>{r(!1)},showCodePanel:a,toggleCodePanel:()=>{s(E=>!E)},openCodePanel:()=>{s(!0)},closeCodePanel:()=>{s(!1)},showSidebar:l,toggleSidebar:()=>{u(E=>!E)},isEditorEnabled:!(e||a),setIsEditorEnabled:E=>{r(!E),s(!E)}}}const go={mobile:{width:375,height:667},tablet:{width:768,height:1024},desktop:{width:1200,height:800}},Gd=new Set(["div","span","p","h1","h2","h3","h4","h5","h6","a","img","button","input","textarea","select","option","ul","ol","li","table","tr","td","th","thead","tbody","section","article","header","footer","nav","main","aside"]),Kd=new Set(["img","input","br","hr","meta","link","area","base","col","embed","source","track","wbr"]),Yd=new Set(["id","className","title","alt","src","href","target","rel"]),Xd=new Set(["width","height","min-width","min-height","max-width","max-height","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","border-width","border-top-width","border-right-width","border-bottom-width","border-left-width","top","right","bottom","left","font-size","line-height","border-radius","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius","letter-spacing","word-spacing","text-indent","text-decoration-thickness"]);class Zd{constructor(r={}){Fe(this,"options");this.options={inlineStyles:!0,prettify:!1,includeComments:!1,customComponentMap:{},styleTransformers:[],...r}}convert(r){try{const a=r.ROOT;if(!a||!a.nodes)return"";const s=this.buildHTMLFromNodes(a.nodes,r);return this.options.prettify?this.prettifyHTML(s):s}catch(a){return console.error("craftJSToHTML - Error during conversion:",a),""}}buildHTMLFromNodes(r,a){return r.map(s=>this.buildHTMLFromNode(s,a)).filter(s=>s.trim()!=="").join("")}buildHTMLFromNode(r,a){const s=a[r];if(!s||s.hidden)return"";const{type:l,props:u={},nodes:d=[]}=s,p=typeof l=="object"&&l&&"resolvedName"in l?l.resolvedName:l,f=this.getTagName(p,s),m=this.buildAttributes(u);let g=this.buildHTMLFromNodes(d,a);return u.children&&typeof u.children=="string"&&(g+=u.children),["button","a"].includes(f)&&u.text&&(g+=u.text),this.isSelfClosingTag(f)?`<${f}${m} />`:`${this.options.includeComments?`<!-- ${p} -->`:""}<${f}${m}>${g}</${f}>`}getTagName(r,a){if(a.custom?.tagName&&typeof a.custom.tagName=="string")return a.custom.tagName.toLowerCase();if(a.custom?.tagHtml&&typeof a.custom.tagHtml=="string")return a.custom.tagHtml.toLowerCase();if(this.options.customComponentMap?.[r])return this.options.customComponentMap[r];const s={image:"img",button:"button",text:"p",divider:"hr",variable:"span",box:"div"};if(s[r])return s[r];const l=r.toLowerCase();return Gd.has(l)?l:"div"}buildAttributes(r){const a=[];for(const s of Yd)if(r[s]){const l=s==="className"?"class":s;a.push(`${l}="${this.escapeHTML(r[s])}"`)}if(r.style&&this.options.inlineStyles){const s=this.convertStyleObjectToCSS(r.style);s&&a.push(`style="${s}"`)}for(const[s,l]of Object.entries(r))s.startsWith("data-")&&typeof l=="string"&&a.push(`${s}="${this.escapeHTML(l)}"`);return a.length>0?` ${a.join(" ")}`:""}convertStyleObjectToCSS(r){if(!r||typeof r!="object")return"";const a=[];for(const[s,l]of Object.entries(r)){if(l==null)continue;const u=this.camelToKebabCase(s);let d=this.applStyleTransformers(s,l);d=this.addUnitIfNeeded(u,d),a.push(`${u}: ${d}`)}return a.join("; ")}camelToKebabCase(r){return r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}applStyleTransformers(r,a){const s=this.options.styleTransformers?.find(l=>l.property===r);return s?s.transform(a):String(a)}addUnitIfNeeded(r,a){const s=parseFloat(a);return!isNaN(s)&&Xd.has(r)&&!a.includes("px")&&!a.includes("%")&&!a.includes("em")&&!a.includes("rem")&&!a.includes("vh")&&!a.includes("vw")?`${s}px`:a}isSelfClosingTag(r){return Kd.has(r.toLowerCase())}escapeHTML(r){const a=document.createElement("div");return a.textContent=r,a.innerHTML}prettifyHTML(r){let a="",s=0;const l=" ";return r.split(/>\s*</).forEach((u,d)=>{d!==0&&(u=`<${u}`),d!==r.split(/>\s*</).length-1&&(u=`${u}>`),u.match(/^<\/\w/)&&s--,a+=`${l.repeat(Math.max(0,s))+u}
|
|
2
|
+
`,u.match(/^<\w[^>]*[^/]$/)&&s++}),a.trim()}}function Cs(e,r){return new Zd(r).convert(e)}const bn={id:"canvas",className:"relative flex-1 border border-gray-300 bg-white shadow-lg",style:{zIndex:1,minHeight:"100%",overflow:"visible",position:"relative",maxWidth:1200}},ln=new Set(["p","span","h1","h2","h3","h4","h5","h6","strong","em","small","mark","del","ins","sub","sup"]);class Qd{constructor(r,a={}){Fe(this,"options");Fe(this,"tagLookupMap");Fe(this,"idCounter");this.options={rootCanvasProps:bn,...a},this.tagLookupMap=this.createTagLookupMap(r),this.idCounter=1}convert(r){if(!r?.trim())return this.createEmptyRoot();try{const a=Sd.parseDocument(r),s={},l=a.children.filter(p=>p.type==="tag"||p.type==="text"),u="ROOT",d=[];for(const p of l){const f=this.traverseNode(p,u,s);f&&d.push(f)}return s[u]=this.createRootNode(d),this.convertToCraftJSFormat(s)}catch(a){return console.error("Error converting HTML to CraftJS:",a),this.createEmptyRoot()}}createTagLookupMap(r){const a=new Map;for(const s of r)for(const l of s.htmlTags)a.set(l.toLowerCase(),s);return a}getNextId(){return`node-${this.idCounter++}`}traverseNode(r,a,s){return r.type==="text"?this.processTextNode(r,a,s):r.type==="tag"?this.processTagNode(r,a,s):null}processTextNode(r,a,s){const l=r.data?.trim();if(!l)return null;if(a&&s[a]&&ln.has(s[a].tagName?.toLowerCase()))return s[a].props.children=(s[a].props.children||"")+l,null;const u=Array.from(this.tagLookupMap.values()).find(p=>p.htmlTags.some(f=>ln.has(f)));if(!u)return null;const d=this.getNextId();return s[d]={id:d,type:u.id,props:{children:l},parent:a,isCanvas:!1,displayName:u.id,custom:{},hidden:!1,nodes:[],linkedNodes:{},tagName:"text"},d}processTagNode(r,a,s){const l=r.name?.toLowerCase();if(!l)return null;const u=this.tagLookupMap.get(l)||null;if(!u)return null;const d=this.getNextId(),p=[];let f="";const m=ln.has(l);r.children?.length>0&&r.children.forEach((w,D)=>{if(w.type==="text"&&m||["button","a"].includes(l)){const y=w.data?.trim();y&&(f+=`${D!==0?" ":""}${y}`)}else if(m){const y=bo(w);f+=`${D!==0?" ":""}${y}`}else{const y=this.traverseNode(w,d,s);y&&p.push(y)}});const g=this.processAttributes(r.attribs||{});return m&&f&&(g.children=f),["button","a"].includes(l)&&f&&(g.text=f),s[d]={id:d,type:u.id,props:g,nodes:p,parent:a,displayName:u.id,isCanvas:u.isCanvas!==!1,custom:{},hidden:!1,linkedNodes:{},tagName:l},d}processAttributes(r){const a={...r};if(a.style&&typeof a.style=="string"){const s=this.parseStyleString(a.style);a.style=s}return a}parseStyleString(r){const a={};return r.split(";").filter(Boolean).forEach(s=>{const[l,u]=s.split(":").map(p=>p?.trim());if(!l||!u)return;const d=l.replace(/-([a-z])/g,p=>p[1].toUpperCase());a[d]=u}),a}createEmptyRoot(){return{ROOT:{type:"div",isCanvas:!0,props:this.options.rootCanvasProps,displayName:"div",custom:{},hidden:!1,nodes:[],linkedNodes:{}}}}createRootNode(r){return{id:"ROOT",type:"div",props:this.options.rootCanvasProps,nodes:r,isCanvas:!0,displayName:"div",custom:{},hidden:!1,linkedNodes:{}}}convertToCraftJSFormat(r){const a={};return Object.entries(r).forEach(([s,l])=>{s==="ROOT"?a[s]={type:l.type,isCanvas:l.isCanvas,props:l.props||{},displayName:l.displayName||l.type,custom:l.custom||{},hidden:l.hidden||!1,nodes:l.nodes||[],linkedNodes:l.linkedNodes||{}}:a[s]={type:{resolvedName:l.type},isCanvas:l.isCanvas,props:l.props||{},displayName:l.displayName||l.type,custom:l.custom||{},hidden:l.hidden||!1,nodes:l.nodes||[],linkedNodes:l.linkedNodes||{},parent:l.parent||"ROOT"}}),a}}function ep(e,r,a){return new Qd(r,a).convert(e)}function bo(e){if(!e.type||e.type==="text")return e.data||"";const r=e.attribs&&Object.keys(e.attribs).length>0?` ${Object.entries(e.attribs).map(([s,l])=>`${s}="${l}"`).join(" ")}`:"",a=e.children?e.children.map(bo).map(s=>s.trim()).join(""):"";return`<${e.name}${r}>${a}</${e.name}>`}function Ln(){const{query:e,actions:r}=H.useEditor();return{import:(l,u={})=>{const{replace:d=!0,...p}=u,f=ep(l,Jt,p);if(d)r.deserialize(f);else{const m=e.serialize();if(typeof m=="string"){r.deserialize(f);return}const g=m,w=g.ROOT;if(!w){r.deserialize(f);return}const{ROOT:D,...y}=f,v=Object.keys(y);Object.assign(g,y),w.nodes=[...w.nodes||[],...v],v.forEach(E=>{g[E]&&(g[E].parent="ROOT")}),r.deserialize(g)}},export:(l={})=>{const u=e.serialize();if(typeof u=="string")try{const p=JSON.parse(u);return Cs(p,l)}catch(p){return console.error("Error parsing JSON:",p),""}return Cs(u,l)}}}function Sr(){const{setIsEditorEnabled:e}=fo(),{query:r,actions:a}=H.useEditor(),{export:s,import:l}=Ln(),{nodes:u}=H.useEditor(w=>({nodes:w.nodes})),d=S.useMemo(()=>Object.keys(u).length>1,[u]),[p,f]=S.useState("desktop");return S.useEffect(()=>{const w=r.node("ROOT").get();w&&a.setProp(w.id,D=>{D.style={...D.style||{},maxWidth:go[p].width||"100%"}})},[p]),{device:p,isEmpty:d,setDevice:f,getHtml:()=>{e(!1);try{return s({inlineStyles:!0,prettify:!1,includeComments:!1})||""}catch(w){return console.warn("Error exporting HTML:",w),""}finally{e(!0)}},loadTemplate:w=>{try{l(w,{replace:!0})}catch(D){console.error("Error loading template into canvas:",D)}}}}function tp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xo={exports:{}};(function(e,r){(function(a){function s(){var l=a();return l.default||l}e.exports=s()})(function(){var a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,d=t=>{throw TypeError(t)},p=(t,n,i)=>n in t?a(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,f=(t,n)=>{for(var i in n)a(t,i,{get:n[i],enumerable:!0})},m=(t,n,i,c)=>{if(n&&typeof n=="object"||typeof n=="function")for(let h of l(n))!u.call(t,h)&&h!==i&&a(t,h,{get:()=>n[h],enumerable:!(c=s(n,h))||c.enumerable});return t},g=t=>m(a({},"__esModule",{value:!0}),t),w=(t,n,i)=>p(t,typeof n!="symbol"?n+"":n,i),D=(t,n,i)=>n.has(t)||d("Cannot "+i),y=(t,n,i)=>(D(t,n,"read from private field"),i?i.call(t):n.get(t)),v=(t,n,i)=>n.has(t)?d("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,i),E=(t,n,i,c)=>(D(t,n,"write to private field"),n.set(t,i),i),C={};f(C,{languages:()=>cc,options:()=>pc,parsers:()=>Va,printers:()=>vd});var x=(t,n,i,c)=>{if(!(t&&n==null))return n.replaceAll?n.replaceAll(i,c):i.global?n.replace(i,c):n.split(i).join(c)},k=x,j="string",N="array",P="cursor",R="indent",_="align",O="trim",L="group",W="fill",ue="if-break",pe="indent-if-break",ee="line-suffix",Re="line-suffix-boundary",ze="line",Zn="label",Lr="break-parent",Qn=new Set([P,R,_,O,L,W,ue,pe,ee,Re,ze,Zn,Lr]),Di=(t,n,i)=>{if(!(t&&n==null))return Array.isArray(n)||typeof n=="string"?n[i<0?n.length+i:i]:n.at(i)},Ft=Di;function yi(t){if(typeof t=="string")return j;if(Array.isArray(t))return N;if(!t)return;let{type:n}=t;if(Qn.has(n))return n}var ea=yi,vi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function wi(t){let n=t===null?"null":typeof t;if(n!=="string"&&n!=="object")return`Unexpected doc '${n}',
|
|
3
|
+
Expected it to be 'string' or 'object'.`;if(ea(t))throw new Error("doc is valid.");let i=Object.prototype.toString.call(t);if(i!=="[object Object]")return`Unexpected doc '${i}'.`;let c=vi([...Qn].map(h=>`'${h}'`));return`Unexpected doc.type '${t.type}'.
|
|
4
|
+
Expected it to be ${c}.`}var Ci=class extends Error{constructor(n){super(wi(n));Fe(this,"name","InvalidDocError");this.doc=n}},Fi=Ci;function ta(t,n){if(typeof t=="string")return n(t);let i=new Map;return c(t);function c(b){if(i.has(b))return i.get(b);let F=h(b);return i.set(b,F),F}function h(b){switch(ea(b)){case N:return n(b.map(c));case W:return n({...b,parts:b.parts.map(c)});case ue:return n({...b,breakContents:c(b.breakContents),flatContents:c(b.flatContents)});case L:{let{expandedStates:F,contents:A}=b;return F?(F=F.map(c),A=F[0]):A=c(A),n({...b,contents:A,expandedStates:F})}case _:case R:case pe:case Zn:case ee:return n({...b,contents:c(b.contents)});case j:case P:case O:case Re:case ze:case Lr:return n(b);default:throw new Fi(b)}}}function xe(t,n=Bi){return ta(t,i=>typeof i=="string"?ct(n,i.split(`
|
|
5
|
+
`)):i)}var Ei=()=>{},Si=Ei;function Ce(t){return{type:R,contents:t}}function ra(t,n){return{type:_,contents:n,n:t}}function te(t,n={}){return Si(n.expandedStates),{type:L,id:n.id,contents:t,break:!!n.shouldBreak,expandedStates:n.expandedStates}}function ki(t){return ra(Number.NEGATIVE_INFINITY,t)}function Ai(t){return ra({type:"root"},t)}function na(t){return{type:W,parts:t}}function Xt(t,n="",i={}){return{type:ue,breakContents:t,flatContents:n,groupId:i.groupId}}function Ni(t,n){return{type:pe,contents:t,groupId:n.groupId,negate:n.negate}}var Et={type:Lr},ji={type:ze,hard:!0},_i={type:ze,hard:!0,literal:!0},X={type:ze},ie={type:ze,soft:!0},Y=[ji,Et],Bi=[_i,Et];function ct(t,n){let i=[];for(let c=0;c<n.length;c++)c!==0&&i.push(t),i.push(n[c]);return i}var Zt="'",aa='"';function Ti(t,n){let i=n===!0||n===Zt?Zt:aa,c=i===Zt?aa:Zt,h=0,b=0;for(let F of t)F===i?h++:F===c&&b++;return h>b?c:i}var Li=Ti;function Pi(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var De,Ii=class{constructor(t){v(this,De),E(this,De,new Set(t))}getLeadingWhitespaceCount(t){let n=y(this,De),i=0;for(let c=0;c<t.length&&n.has(t.charAt(c));c++)i++;return i}getTrailingWhitespaceCount(t){let n=y(this,De),i=0;for(let c=t.length-1;c>=0&&n.has(t.charAt(c));c--)i++;return i}getLeadingWhitespace(t){let n=this.getLeadingWhitespaceCount(t);return t.slice(0,n)}getTrailingWhitespace(t){let n=this.getTrailingWhitespaceCount(t);return t.slice(t.length-n)}hasLeadingWhitespace(t){return y(this,De).has(t.charAt(0))}hasTrailingWhitespace(t){return y(this,De).has(Ft(!1,t,-1))}trimStart(t){let n=this.getLeadingWhitespaceCount(t);return t.slice(n)}trimEnd(t){let n=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-n)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,n=!1){let i=`[${Pi([...y(this,De)].join(""))}]+`,c=new RegExp(n?`(${i})`:i,"u");return t.split(c)}hasWhitespaceCharacter(t){let n=y(this,De);return Array.prototype.some.call(t,i=>n.has(i))}hasNonWhitespaceCharacter(t){let n=y(this,De);return Array.prototype.some.call(t,i=>!n.has(i))}isWhitespaceOnly(t){let n=y(this,De);return Array.prototype.every.call(t,i=>n.has(i))}};De=new WeakMap;var Oi=Ii,Mi=[" ",`
|
|
6
|
+
`,"\f","\r"," "],Ri=new Oi(Mi),Ne=Ri,zi=class extends Error{constructor(n,i,c="type"){super(`Unexpected ${i} node ${c}: ${JSON.stringify(n[c])}.`);Fe(this,"name","UnexpectedNodeError");this.node=n}},$i=zi;function Hi(t){return t?.type==="front-matter"}var Qt=Hi,qi=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),Ui=new Set(["if","else if","for","switch","case"]);function sa(t,n){var i;if(t.type==="text"||t.type==="comment"||Qt(t)||t.type==="yaml"||t.type==="toml")return null;if(t.type==="attribute"&&delete n.value,t.type==="docType"&&delete n.value,t.type==="angularControlFlowBlock"&&(i=t.parameters)!=null&&i.children)for(let c of n.parameters.children)Ui.has(t.name)?delete c.expression:c.expression=c.expression.trim();t.type==="angularIcuExpression"&&(n.switchValue=t.switchValue.trim()),t.type==="angularLetDeclarationInitializer"&&delete n.value}sa.ignoredProperties=qi;var Wi=sa;async function Vi(t,n){if(t.language==="yaml"){let i=t.value.trim(),c=i?await n(i,{parser:"yaml"}):"";return Ai([t.startDelimiter,t.explicitLanguage,Y,c,c?Y:"",t.endDelimiter])}}var Ji=Vi;function er(t,n=!0){return[Ce([ie,t]),n?ie:""]}function dt(t,n){let i=t.type==="NGRoot"?t.node.type==="NGMicrosyntax"&&t.node.body.length===1&&t.node.body[0].type==="NGMicrosyntaxExpression"?t.node.body[0].expression:t.node:t.type==="JsExpressionRoot"?t.node:t;return i&&(i.type==="ObjectExpression"||i.type==="ArrayExpression"||(n.parser==="__vue_expression"||n.parser==="__vue_ts_expression")&&(i.type==="TemplateLiteral"||i.type==="StringLiteral"))}async function ye(t,n,i,c){i={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...i};let h=!0;c&&(i.__onHtmlBindingRoot=(F,A)=>{h=c(F,A)});let b=await n(t,i,n);return h?te(b):er(b)}function Gi(t,n,i,c){let{node:h}=i,b=c.originalText.slice(h.sourceSpan.start.offset,h.sourceSpan.end.offset);return/^\s*$/u.test(b)?"":ye(b,t,{parser:"__ng_directive",__isInHtmlAttribute:!1},dt)}var Ki=Gi,Yi=(t,n)=>{if(!(t&&n==null))return n.toReversed||!Array.isArray(n)?n.toReversed():[...n].reverse()},Xi=Yi;function Zi(t){return Array.isArray(t)&&t.length>0}var Pr=Zi,oa,ia,la,ua,ca,Qi=((oa=globalThis.Deno)==null?void 0:oa.build.os)==="windows"||((la=(ia=globalThis.navigator)==null?void 0:ia.platform)==null?void 0:la.startsWith("Win"))||((ca=(ua=globalThis.process)==null?void 0:ua.platform)==null?void 0:ca.startsWith("win"))||!1;function da(t){if(t=t instanceof URL?t:new URL(t),t.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${t.protocol}"`);return t}function el(t){return t=da(t),decodeURIComponent(t.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function tl(t){t=da(t);let n=decodeURIComponent(t.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return t.hostname!==""&&(n=`\\\\${t.hostname}${n}`),n}function rl(t){return Qi?tl(t):el(t)}var nl=rl,al=t=>String(t).split(/[/\\]/u).pop();function pa(t,n){if(!n)return;let i=al(n).toLowerCase();return t.find(({filenames:c})=>c?.some(h=>h.toLowerCase()===i))??t.find(({extensions:c})=>c?.some(h=>i.endsWith(h)))}function sl(t,n){if(n)return t.find(({name:i})=>i.toLowerCase()===n)??t.find(({aliases:i})=>i?.includes(n))??t.find(({extensions:i})=>i?.includes(`.${n}`))}function ha(t,n){if(n){if(String(n).startsWith("file:"))try{n=nl(n)}catch{return}if(typeof n=="string")return t.find(({isSupported:i})=>i?.({filepath:n}))}}function ol(t,n){let i=Xi(!1,t.plugins).flatMap(h=>h.languages??[]),c=sl(i,n.language)??pa(i,n.physicalFile)??pa(i,n.file)??ha(i,n.physicalFile)??ha(i,n.file)??(n.physicalFile,void 0);return c?.parsers[0]}var tr=ol,il="inline",ma={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",source:"block",track:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},ll="normal",fa={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function ul(t){return t.type==="element"&&!t.hasExplicitNamespace&&!["html","svg"].includes(t.namespace)}var St=ul,cl=t=>k(!1,t,/^[\t\f\r ]*\n/gu,""),ga=t=>cl(Ne.trimEnd(t)),dl=t=>{let n=t,i=Ne.getLeadingWhitespace(n);i&&(n=n.slice(i.length));let c=Ne.getTrailingWhitespace(n);return c&&(n=n.slice(0,-c.length)),{leadingWhitespace:i,trailingWhitespace:c,text:n}};function ba(t,n){return!!(t.type==="ieConditionalComment"&&t.lastChild&&!t.lastChild.isSelfClosing&&!t.lastChild.endSourceSpan||t.type==="ieConditionalComment"&&!t.complete||pt(t)&&t.children.some(i=>i.type!=="text"&&i.type!=="interpolation")||Mr(t,n)&&!je(t,n)&&t.type!=="interpolation")}function rr(t){return t.type==="attribute"||!t.parent||!t.prev?!1:pl(t.prev)}function pl(t){return t.type==="comment"&&t.value.trim()==="prettier-ignore"}function ge(t){return t.type==="text"||t.type==="comment"}function je(t,n){return t.type==="element"&&(t.fullName==="script"||t.fullName==="style"||t.fullName==="svg:style"||t.fullName==="svg:script"||t.fullName==="mj-style"&&n.parser==="mjml"||St(t)&&(t.name==="script"||t.name==="style"))}function hl(t,n){return t.children&&!je(t,n)}function ml(t,n){return je(t,n)||t.type==="interpolation"||xa(t)}function xa(t){return Sa(t).startsWith("pre")}function fl(t,n){var i,c;let h=b();if(h&&!t.prev&&(c=(i=t.parent)==null?void 0:i.tagDefinition)!=null&&c.ignoreFirstLf)return t.type==="interpolation";return h;function b(){return Qt(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.prev&&(t.prev.type==="text"||t.prev.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:pt(t.parent)?!0:!(!t.prev&&(t.parent.type==="root"||pt(t)&&t.parent||je(t.parent,n)||ar(t.parent,n)||!Fl(t.parent.cssDisplay))||t.prev&&!kl(t.prev.cssDisplay))}}function gl(t,n){return Qt(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.next&&(t.next.type==="text"||t.next.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:pt(t.parent)?!0:!(!t.next&&(t.parent.type==="root"||pt(t)&&t.parent||je(t.parent,n)||ar(t.parent,n)||!El(t.parent.cssDisplay))||t.next&&!Sl(t.next.cssDisplay))}function bl(t,n){return Al(t.cssDisplay)&&!je(t,n)}function nr(t){return Qt(t)||t.next&&t.sourceSpan.end&&t.sourceSpan.end.line+1<t.next.sourceSpan.start.line}function xl(t){return Da(t)||t.type==="element"&&t.children.length>0&&(["body","script","style"].includes(t.name)||t.children.some(n=>yl(n)))||t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.type!=="text"&&va(t.firstChild)&&(!t.lastChild.isTrailingSpaceSensitive||wa(t.lastChild))}function Da(t){return t.type==="element"&&t.children.length>0&&(["html","head","ul","ol","select"].includes(t.name)||t.cssDisplay.startsWith("table")&&t.cssDisplay!=="table-cell")}function Ir(t){return Ca(t)||t.prev&&Dl(t.prev)||ya(t)}function Dl(t){return Ca(t)||t.type==="element"&&t.fullName==="br"||ya(t)}function ya(t){return va(t)&&wa(t)}function va(t){return t.hasLeadingSpaces&&(t.prev?t.prev.sourceSpan.end.line<t.sourceSpan.start.line:t.parent.type==="root"||t.parent.startSourceSpan.end.line<t.sourceSpan.start.line)}function wa(t){return t.hasTrailingSpaces&&(t.next?t.next.sourceSpan.start.line>t.sourceSpan.end.line:t.parent.type==="root"||t.parent.endSourceSpan&&t.parent.endSourceSpan.start.line>t.sourceSpan.end.line)}function Ca(t){switch(t.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(t.name)}return!1}function Or(t){return t.lastChild?Or(t.lastChild):t}function yl(t){var n;return(n=t.children)==null?void 0:n.some(i=>i.type!=="text")}function Fa(t){if(t)switch(t){case"module":case"text/javascript":case"text/babel":case"text/jsx":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules")return"json"}}function vl(t,n){let{name:i,attrMap:c}=t;if(i!=="script"||Object.prototype.hasOwnProperty.call(c,"src"))return;let{type:h,lang:b}=t.attrMap;return!b&&!h?"babel":tr(n,{language:b})??Fa(h)}function wl(t,n){if(!Mr(t,n))return;let{attrMap:i}=t;if(Object.prototype.hasOwnProperty.call(i,"src"))return;let{type:c,lang:h}=i;return tr(n,{language:h})??Fa(c)}function Cl(t,n){if(t.name==="style"){let{lang:i}=t.attrMap;return i?tr(n,{language:i}):"css"}if(t.name==="mj-style"&&n.parser==="mjml")return"css"}function Ea(t,n){return vl(t,n)??Cl(t,n)??wl(t,n)}function kt(t){return t==="block"||t==="list-item"||t.startsWith("table")}function Fl(t){return!kt(t)&&t!=="inline-block"}function El(t){return!kt(t)&&t!=="inline-block"}function Sl(t){return!kt(t)}function kl(t){return!kt(t)}function Al(t){return!kt(t)&&t!=="inline-block"}function pt(t){return Sa(t).startsWith("pre")}function Nl(t,n){let i=t;for(;i;){if(n(i))return!0;i=i.parent}return!1}function jl(t,n){var i;if(ht(t,n))return"block";if(((i=t.prev)==null?void 0:i.type)==="comment"){let h=t.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);if(h)return h[1]}let c=!1;if(t.type==="element"&&t.namespace==="svg")if(Nl(t,h=>h.fullName==="svg:foreignObject"))c=!0;else return t.name==="svg"?"inline-block":"block";switch(n.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:if(t.type==="element"&&(!t.namespace||c||St(t))&&Object.prototype.hasOwnProperty.call(ma,t.name))return ma[t.name]}return il}function Sa(t){return t.type==="element"&&(!t.namespace||St(t))&&Object.prototype.hasOwnProperty.call(fa,t.name)?fa[t.name]:ll}function _l(t){let n=Number.POSITIVE_INFINITY;for(let i of t.split(`
|
|
7
|
+
`)){if(i.length===0)continue;let c=Ne.getLeadingWhitespaceCount(i);if(c===0)return 0;i.length!==c&&c<n&&(n=c)}return n===Number.POSITIVE_INFINITY?0:n}function ka(t,n=_l(t)){return n===0?t:t.split(`
|
|
8
8
|
`).map(i=>i.slice(n)).join(`
|
|
9
|
-
`)}function
|
|
10
|
-
`||t==="\f"||t==="\r"||t===" "}var Ul=/^[ \t\n\r\u000c]+/,Wl=/^[, \t\n\r\u000c]+/,Vl=/^[^ \t\n\r\u000c]+/,Jl=/[,]+$/,La=/^\d+$/,Gl=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function Kl(t){let n=t.length,i,c,h,b,F,A=0,B;function z(V){let K,re=V.exec(t.substring(A));if(re)return[K]=re,A+=K.length,K}let I=[];for(;;){if(z(Wl),A>=n){if(I.length===0)throw new Error("Must contain one or more image candidate strings.");return I}B=A,i=z(Vl),c=[],i.slice(-1)===","?(i=i.replace(Jl,""),q()):G()}function G(){for(z(Ul),h="",b="in descriptor";;){if(F=t.charAt(A),b==="in descriptor")if(Ta(F))h&&(c.push(h),h="",b="after descriptor");else if(F===","){A+=1,h&&c.push(h),q();return}else if(F==="(")h+=F,b="in parens";else if(F===""){h&&c.push(h),q();return}else h+=F;else if(b==="in parens")if(F===")")h+=F,b="in descriptor";else if(F===""){c.push(h),q();return}else h+=F;else if(b==="after descriptor"&&!Ta(F))if(F===""){q();return}else b="in descriptor",A-=1;A+=1}}function q(){let V=!1,K,re,se,le,M={},J,ne,Q,de,xt;for(le=0;le<c.length;le++)J=c[le],ne=J[J.length-1],Q=J.substring(0,J.length-1),de=parseInt(Q,10),xt=parseFloat(Q),La.test(Q)&&ne==="w"?((K||re)&&(V=!0),de===0?V=!0:K=de):Gl.test(Q)&&ne==="x"?((K||re||se)&&(V=!0),xt<0?V=!0:re=xt):La.test(Q)&&ne==="h"?((se||re)&&(V=!0),de===0?V=!0:se=de):V=!0;if(!V)M.source={value:i,startOffset:B},K&&(M.width={value:K}),re&&(M.density={value:re}),se&&(M.height={value:se}),I.push(M);else throw new Error(`Invalid srcset descriptor found in "${t}" at "${J}".`)}}var Yl=Kl;function Xl(t){if(t.node.fullName==="srcset"&&(t.parent.fullName==="img"||t.parent.fullName==="source"))return()=>Ql($e(t.node))}var Pa={width:"w",height:"h",density:"x"},Zl=Object.keys(Pa);function Ql(t){let n=Yl(t),i=Zl.filter(I=>n.some(G=>Object.prototype.hasOwnProperty.call(G,I)));if(i.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[c]=i,h=Pa[c],b=n.map(I=>I.source.value),F=Math.max(...b.map(I=>I.length)),A=n.map(I=>I[c]?String(I[c].value):""),B=A.map(I=>{let G=I.indexOf(".");return G===-1?I.length:G}),z=Math.max(...B);return er(ct([",",X],b.map((I,G)=>{let q=[I],V=A[G];if(V){let K=F-I.length+1,re=z-B[G],se=" ".repeat(K+re);q.push(Xt(se," "),V+h)}return q})))}var eu=Xl;function tu(t,n){let{node:i}=t,c=$e(t.node).trim();if(i.fullName==="style"&&!n.parentParser&&!c.includes("{{"))return async h=>er(await h(c,{parser:"css",__isHTMLStyleAttribute:!0}))}var zr=new WeakMap;function ru(t,n){let{root:i}=t;return zr.has(i)||zr.set(i,i.children.some(c=>_a(c,n)&&["ts","typescript"].includes(c.attrMap.lang))),zr.get(i)}var $r=ru;function nu(t,n,i){let{node:c}=i,h=$e(c);return ye(`type T<${h}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},dt)}function au(t,n,{parseWithTs:i}){return ye(`function _(${t}) {}`,n,{parser:i?"babel-ts":"babel",__isVueBindings:!0})}async function su(t,n,i,c){let h=$e(i.node),{left:b,operator:F,right:A}=ou(h),B=$r(i,c);return[te(await ye(`function _(${b}) {}`,t,{parser:B?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",F," ",await ye(A,t,{parser:B?"__ts_expression":"__js_expression"})]}function ou(t){let n=/(.*?)\s+(in|of)\s+(.*)/su,i=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,c=/^\(|\)$/gu,h=t.match(n);if(!h)return;let b={};if(b.for=h[3].trim(),!b.for)return;let F=k(!1,h[1].trim(),c,""),A=F.match(i);A?(b.alias=F.replace(i,""),b.iterator1=A[1].trim(),A[2]&&(b.iterator2=A[2].trim())):b.alias=F;let B=[b.alias,b.iterator1,b.iterator2];if(!B.some((z,I)=>!z&&(I===0||B.slice(I+1).some(Boolean))))return{left:B.filter(Boolean).join(","),operator:h[2],right:b.for}}function iu(t,n){if(n.parser!=="vue")return;let{node:i}=t,c=i.fullName;if(c==="v-for")return su;if(c==="generic"&&_a(i.parent,n))return nu;let h=$e(i),b=$r(t,n);if(Ll(i)||Pl(i,n))return F=>au(h,F,{parseWithTs:b});if(c.startsWith("@")||c.startsWith("v-on:"))return F=>lu(h,F,{parseWithTs:b});if(c.startsWith(":")||c.startsWith(".")||c.startsWith("v-bind:"))return F=>uu(h,F,{parseWithTs:b});if(c.startsWith("v-"))return F=>Ia(h,F,{parseWithTs:b})}async function lu(t,n,{parseWithTs:i}){var c;try{return await Ia(t,n,{parseWithTs:i})}catch(h){if(((c=h.cause)==null?void 0:c.code)!=="BABEL_PARSER_SYNTAX_ERROR")throw h}return ye(t,n,{parser:i?"__vue_ts_event_binding":"__vue_event_binding"},dt)}function uu(t,n,{parseWithTs:i}){return ye(t,n,{parser:i?"__vue_ts_expression":"__vue_expression"},dt)}function Ia(t,n,{parseWithTs:i}){return ye(t,n,{parser:i?"__ts_expression":"__js_expression"},dt)}var cu=iu;function du(t,n){let{node:i}=t;if(i.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(n.originalText.slice(i.valueSpan.start.offset,i.valueSpan.end.offset))||n.parser==="lwc"&&i.value.startsWith("{")&&i.value.endsWith("}"))return[i.rawName,"=",i.value];for(let c of[eu,tu,ql,cu,$l]){let h=c(t,n);if(h)return pu(h)}}}function pu(t){return async(n,i,c,h)=>{let b=await t(n,i,c,h);if(b)return b=ra(b,F=>typeof F=="string"?k(!1,F,'"',"""):F),[c.node.rawName,'="',te(b),'"']}}var hu=du,mu=new Proxy(()=>{},{get:()=>mu});function At(t){return t.sourceSpan.start.offset}function sr(t){return t.sourceSpan.end.offset}function Hr(t,n){return[t.isSelfClosing?"":fu(t,n),Nt(t,n)]}function fu(t,n){return t.lastChild&&Bt(t.lastChild)?"":[gu(t,n),qr(t,n)]}function Nt(t,n){return(t.next?Ze(t.next):_t(t.parent))?"":[jt(t,n),Xe(t,n)]}function gu(t,n){return _t(t)?jt(t.lastChild,n):""}function Xe(t,n){return Bt(t)?qr(t.parent,n):or(t)?Wr(t.next,n):""}function qr(t,n){if(Oa(t,n))return"";switch(t.type){case"ieConditionalComment":return"<!";case"element":if(t.hasHtmComponentClosingTag)return"<//";default:return`</${t.rawName}`}}function jt(t,n){if(Oa(t,n))return"";switch(t.type){case"ieConditionalComment":case"ieConditionalEndComment":return"[endif]-->";case"ieConditionalStartComment":return"]><!-->";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(t.isSelfClosing)return"/>";default:return">"}}function Oa(t,n){return!t.isSelfClosing&&!t.endSourceSpan&&(rr(t)||xa(t.parent,n))}function Ze(t){return t.prev&&t.prev.type!=="docType"&&t.type!=="angularControlFlowBlock"&&!ge(t.prev)&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function _t(t){var n;return((n=t.lastChild)==null?void 0:n.isTrailingSpaceSensitive)&&!t.lastChild.hasTrailingSpaces&&!ge(Or(t.lastChild))&&!pt(t)}function Bt(t){return!t.next&&!t.hasTrailingSpaces&&t.isTrailingSpaceSensitive&&ge(Or(t))}function or(t){return t.next&&!ge(t.next)&&ge(t)&&t.isTrailingSpaceSensitive&&!t.hasTrailingSpaces}function bu(t){let n=t.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su);return n?n[1]?n[1].split(/\s+/u):!0:!1}function ir(t){return!t.prev&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function xu(t,n,i){var c;let{node:h}=t;if(!Pr(h.attrs))return h.isSelfClosing?" ":"";let b=((c=h.prev)==null?void 0:c.type)==="comment"&&bu(h.prev.value),F=typeof b=="boolean"?()=>b:Array.isArray(b)?G=>b.includes(G.rawName):()=>!1,A=t.map(({node:G})=>F(G)?xe(n.originalText.slice(At(G),sr(G))):i(),"attrs"),B=h.type==="element"&&h.fullName==="script"&&h.attrs.length===1&&h.attrs[0].fullName==="src"&&h.children.length===0,z=n.singleAttributePerLine&&h.attrs.length>1&&!ht(h,n)?Y:X,I=[Ce([B?" ":X,ct(z,A)])];return h.firstChild&&ir(h.firstChild)||h.isSelfClosing&&_t(h.parent)||B?I.push(h.isSelfClosing?" ":""):I.push(n.bracketSameLine?h.isSelfClosing?" ":"":h.isSelfClosing?X:ie),I}function Du(t){return t.firstChild&&ir(t.firstChild)?"":Vr(t)}function Ur(t,n,i){let{node:c}=t;return[Tt(c,n),xu(t,n,i),c.isSelfClosing?"":Du(c)]}function Tt(t,n){return t.prev&&or(t.prev)?"":[Qe(t,n),Wr(t,n)]}function Qe(t,n){return ir(t)?Vr(t.parent):Ze(t)?jt(t.prev,n):""}var Ma="<!doctype";function Wr(t,n){switch(t.type){case"ieConditionalComment":case"ieConditionalStartComment":return`<!--[if ${t.condition}`;case"ieConditionalEndComment":return"<!--<!";case"interpolation":return"{{";case"docType":{if(t.value==="html"){let{filepath:c}=n;if(c&&/\.html?$/u.test(c))return Ma}let i=At(t);return n.originalText.slice(i,i+Ma.length)}case"angularIcuExpression":return"{";case"element":if(t.condition)return`<!--[if ${t.condition}]><!--><${t.rawName}`;default:return`<${t.rawName}`}}function Vr(t){switch(t.type){case"ieConditionalComment":return"]>";case"element":if(t.condition)return"><!--<![endif]-->";default:return">"}}function yu(t,n){if(!t.endSourceSpan)return"";let i=t.startSourceSpan.end.offset;t.firstChild&&ir(t.firstChild)&&(i-=Vr(t).length);let c=t.endSourceSpan.start.offset;return t.lastChild&&Bt(t.lastChild)?c+=qr(t,n).length:_t(t)&&(c-=jt(t.lastChild,n).length),n.originalText.slice(i,c)}var Ra=yu,vu=new Set(["if","else if","for","switch","case"]);function wu(t,n){let{node:i}=t;switch(i.type){case"element":if(je(i,n)||i.type==="interpolation")return;if(!i.isSelfClosing&&Mr(i,n)){let c=Sa(i,n);return c?async(h,b)=>{let F=Ra(i,n),A=/^\s*$/u.test(F),B="";return A||(B=await h(ba(F),{parser:c,__embeddedInHtml:!0}),A=B===""),[Qe(i,n),te(Ur(t,n,b)),A?"":Y,B,A?"":Y,Hr(i,n),Xe(i,n)]}:void 0}break;case"text":if(je(i.parent,n)){let c=Sa(i.parent,n);if(c)return async h=>{let b=c==="markdown"?Aa(i.value.replace(/^[^\S\n]*\n/u,"")):i.value,F={parser:c,__embeddedInHtml:!0};if(n.parser==="html"&&c==="babel"){let A="script",{attrMap:B}=i.parent;B&&(B.type==="module"||(B.type==="text/babel"||B.type==="text/jsx")&&B["data-type"]==="module")&&(A="module"),F.__babelSourceType=A}return[Et,Qe(i,n),await h(b,F),Xe(i,n)]}}else if(i.parent.type==="interpolation")return async c=>{let h={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return n.parser==="angular"?h.parser="__ng_interpolation":n.parser==="vue"?h.parser=$r(t,n)?"__vue_ts_expression":"__vue_expression":h.parser="__js_expression",[Ce([X,await c(i.value,h)]),i.parent.next&&Ze(i.parent.next)?" ":X]};break;case"attribute":return hu(t,n);case"front-matter":return c=>Gi(i,c);case"angularControlFlowBlockParameters":return vu.has(t.parent.name)?Yi:void 0;case"angularLetDeclarationInitializer":return c=>ye(i.value,c,{parser:"__ng_binding",__isInHtmlAttribute:!1})}}var Cu=wu,Lt=null;function Pt(t){if(Lt!==null&&typeof Lt.property){let n=Lt;return Lt=Pt.prototype=null,n}return Lt=Pt.prototype=t??Object.create(null),new Pt}var Fu=10;for(let t=0;t<=Fu;t++)Pt();function Eu(t){return Pt(t)}function Su(t,n="type"){Eu(t);function i(c){let h=c[n],b=t[h];if(!Array.isArray(b))throw Object.assign(new Error(`Missing visitor keys for '${h}'.`),{node:c});return b}return i}var ku=Su,Au={"front-matter":[],root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[],angularLetDeclaration:["init"],angularLetDeclarationInitializer:[],angularIcuExpression:["cases"],angularIcuCase:["expression"]},Nu=Au,ju=ku(Nu),_u=ju,Bu="format",Tu=/^\s*<!--\s*@(?:noformat|noprettier)\s*-->/u,Lu=/^\s*<!--\s*@(?:format|prettier)\s*-->/u;function Pu(t){return Lu.test(t)}function Iu(t){return Tu.test(t)}function Ou(t){return`<!-- @${Bu} -->
|
|
9
|
+
`)}function Aa(t){return k(!1,k(!1,t,"'","'"),""",'"')}function $e(t){return Aa(t.value)}var Bl=new Set(["template","style","script"]);function ar(t,n){return ht(t,n)&&!Bl.has(t.fullName)}function ht(t,n){return n.parser==="vue"&&t.type==="element"&&t.parent.type==="root"&&t.fullName.toLowerCase()!=="html"}function Mr(t,n){return ht(t,n)&&(ar(t,n)||t.attrMap.lang&&t.attrMap.lang!=="html")}function Tl(t){let n=t.fullName;return n.charAt(0)==="#"||n==="slot-scope"||n==="v-slot"||n.startsWith("v-slot:")}function Ll(t,n){let i=t.parent;if(!ht(i,n))return!1;let c=i.fullName,h=t.fullName;return c==="script"&&h==="setup"||c==="style"&&h==="vars"}function Na(t,n=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?xe(n):xe(ka(ga(n)),Y):ct(X,Ne.split(n))}function ja(t,n){return ht(t,n)&&t.name==="script"}var _a=/\{\{(.+?)\}\}/su;async function Pl(t,n){let i=[];for(let[c,h]of t.split(_a).entries())if(c%2===0)i.push(xe(h));else try{i.push(te(["{{",Ce([X,await ye(h,n,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),X,"}}"]))}catch{i.push("{{",xe(h),"}}")}return i}function Rr({parser:t}){return(n,i,c)=>ye($e(c.node),n,{parser:t},dt)}var Il=Rr({parser:"__ng_action"}),Ol=Rr({parser:"__ng_binding"}),Ml=Rr({parser:"__ng_directive"});function Rl(t,n){if(n.parser!=="angular")return;let{node:i}=t,c=i.fullName;if(c.startsWith("(")&&c.endsWith(")")||c.startsWith("on-"))return Il;if(c.startsWith("[")&&c.endsWith("]")||/^bind(?:on)?-/u.test(c)||/^ng-(?:if|show|hide|class|style)$/u.test(c))return Ol;if(c.startsWith("*"))return Ml;let h=$e(i);if(/^i18n(?:-.+)?$/u.test(c))return()=>er(na(Na(i,h.trim())),!h.includes("@@"));if(_a.test(h))return b=>Pl(h,b)}var zl=Rl;function $l(t,n){let{node:i}=t,c=$e(i);if(i.fullName==="class"&&!n.parentParser&&!c.includes("{{"))return()=>c.trim().split(/\s+/u).join(" ")}var Hl=$l;function Ba(t){return t===" "||t===`
|
|
10
|
+
`||t==="\f"||t==="\r"||t===" "}var ql=/^[ \t\n\r\u000c]+/,Ul=/^[, \t\n\r\u000c]+/,Wl=/^[^ \t\n\r\u000c]+/,Vl=/[,]+$/,Ta=/^\d+$/,Jl=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function Gl(t){let n=t.length,i,c,h,b,F,A=0,B;function z(V){let K,re=V.exec(t.substring(A));if(re)return[K]=re,A+=K.length,K}let I=[];for(;;){if(z(Ul),A>=n){if(I.length===0)throw new Error("Must contain one or more image candidate strings.");return I}B=A,i=z(Wl),c=[],i.slice(-1)===","?(i=i.replace(Vl,""),q()):G()}function G(){for(z(ql),h="",b="in descriptor";;){if(F=t.charAt(A),b==="in descriptor")if(Ba(F))h&&(c.push(h),h="",b="after descriptor");else if(F===","){A+=1,h&&c.push(h),q();return}else if(F==="(")h+=F,b="in parens";else if(F===""){h&&c.push(h),q();return}else h+=F;else if(b==="in parens")if(F===")")h+=F,b="in descriptor";else if(F===""){c.push(h),q();return}else h+=F;else if(b==="after descriptor"&&!Ba(F))if(F===""){q();return}else b="in descriptor",A-=1;A+=1}}function q(){let V=!1,K,re,se,le,M={},J,ne,Q,de,xt;for(le=0;le<c.length;le++)J=c[le],ne=J[J.length-1],Q=J.substring(0,J.length-1),de=parseInt(Q,10),xt=parseFloat(Q),Ta.test(Q)&&ne==="w"?((K||re)&&(V=!0),de===0?V=!0:K=de):Jl.test(Q)&&ne==="x"?((K||re||se)&&(V=!0),xt<0?V=!0:re=xt):Ta.test(Q)&&ne==="h"?((se||re)&&(V=!0),de===0?V=!0:se=de):V=!0;if(!V)M.source={value:i,startOffset:B},K&&(M.width={value:K}),re&&(M.density={value:re}),se&&(M.height={value:se}),I.push(M);else throw new Error(`Invalid srcset descriptor found in "${t}" at "${J}".`)}}var Kl=Gl;function Yl(t){if(t.node.fullName==="srcset"&&(t.parent.fullName==="img"||t.parent.fullName==="source"))return()=>Zl($e(t.node))}var La={width:"w",height:"h",density:"x"},Xl=Object.keys(La);function Zl(t){let n=Kl(t),i=Xl.filter(I=>n.some(G=>Object.prototype.hasOwnProperty.call(G,I)));if(i.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[c]=i,h=La[c],b=n.map(I=>I.source.value),F=Math.max(...b.map(I=>I.length)),A=n.map(I=>I[c]?String(I[c].value):""),B=A.map(I=>{let G=I.indexOf(".");return G===-1?I.length:G}),z=Math.max(...B);return er(ct([",",X],b.map((I,G)=>{let q=[I],V=A[G];if(V){let K=F-I.length+1,re=z-B[G],se=" ".repeat(K+re);q.push(Xt(se," "),V+h)}return q})))}var Ql=Yl;function eu(t,n){let{node:i}=t,c=$e(t.node).trim();if(i.fullName==="style"&&!n.parentParser&&!c.includes("{{"))return async h=>er(await h(c,{parser:"css",__isHTMLStyleAttribute:!0}))}var zr=new WeakMap;function tu(t,n){let{root:i}=t;return zr.has(i)||zr.set(i,i.children.some(c=>ja(c,n)&&["ts","typescript"].includes(c.attrMap.lang))),zr.get(i)}var $r=tu;function ru(t,n,i){let{node:c}=i,h=$e(c);return ye(`type T<${h}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},dt)}function nu(t,n,{parseWithTs:i}){return ye(`function _(${t}) {}`,n,{parser:i?"babel-ts":"babel",__isVueBindings:!0})}async function au(t,n,i,c){let h=$e(i.node),{left:b,operator:F,right:A}=su(h),B=$r(i,c);return[te(await ye(`function _(${b}) {}`,t,{parser:B?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",F," ",await ye(A,t,{parser:B?"__ts_expression":"__js_expression"})]}function su(t){let n=/(.*?)\s+(in|of)\s+(.*)/su,i=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,c=/^\(|\)$/gu,h=t.match(n);if(!h)return;let b={};if(b.for=h[3].trim(),!b.for)return;let F=k(!1,h[1].trim(),c,""),A=F.match(i);A?(b.alias=F.replace(i,""),b.iterator1=A[1].trim(),A[2]&&(b.iterator2=A[2].trim())):b.alias=F;let B=[b.alias,b.iterator1,b.iterator2];if(!B.some((z,I)=>!z&&(I===0||B.slice(I+1).some(Boolean))))return{left:B.filter(Boolean).join(","),operator:h[2],right:b.for}}function ou(t,n){if(n.parser!=="vue")return;let{node:i}=t,c=i.fullName;if(c==="v-for")return au;if(c==="generic"&&ja(i.parent,n))return ru;let h=$e(i),b=$r(t,n);if(Tl(i)||Ll(i,n))return F=>nu(h,F,{parseWithTs:b});if(c.startsWith("@")||c.startsWith("v-on:"))return F=>iu(h,F,{parseWithTs:b});if(c.startsWith(":")||c.startsWith(".")||c.startsWith("v-bind:"))return F=>lu(h,F,{parseWithTs:b});if(c.startsWith("v-"))return F=>Pa(h,F,{parseWithTs:b})}async function iu(t,n,{parseWithTs:i}){var c;try{return await Pa(t,n,{parseWithTs:i})}catch(h){if(((c=h.cause)==null?void 0:c.code)!=="BABEL_PARSER_SYNTAX_ERROR")throw h}return ye(t,n,{parser:i?"__vue_ts_event_binding":"__vue_event_binding"},dt)}function lu(t,n,{parseWithTs:i}){return ye(t,n,{parser:i?"__vue_ts_expression":"__vue_expression"},dt)}function Pa(t,n,{parseWithTs:i}){return ye(t,n,{parser:i?"__ts_expression":"__js_expression"},dt)}var uu=ou;function cu(t,n){let{node:i}=t;if(i.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(n.originalText.slice(i.valueSpan.start.offset,i.valueSpan.end.offset))||n.parser==="lwc"&&i.value.startsWith("{")&&i.value.endsWith("}"))return[i.rawName,"=",i.value];for(let c of[Ql,eu,Hl,uu,zl]){let h=c(t,n);if(h)return du(h)}}}function du(t){return async(n,i,c,h)=>{let b=await t(n,i,c,h);if(b)return b=ta(b,F=>typeof F=="string"?k(!1,F,'"',"""):F),[c.node.rawName,'="',te(b),'"']}}var pu=cu,hu=new Proxy(()=>{},{get:()=>hu});function At(t){return t.sourceSpan.start.offset}function sr(t){return t.sourceSpan.end.offset}function Hr(t,n){return[t.isSelfClosing?"":mu(t,n),Nt(t,n)]}function mu(t,n){return t.lastChild&&Bt(t.lastChild)?"":[fu(t,n),qr(t,n)]}function Nt(t,n){return(t.next?Ze(t.next):_t(t.parent))?"":[jt(t,n),Xe(t,n)]}function fu(t,n){return _t(t)?jt(t.lastChild,n):""}function Xe(t,n){return Bt(t)?qr(t.parent,n):or(t)?Wr(t.next,n):""}function qr(t,n){if(Ia(t,n))return"";switch(t.type){case"ieConditionalComment":return"<!";case"element":if(t.hasHtmComponentClosingTag)return"<//";default:return`</${t.rawName}`}}function jt(t,n){if(Ia(t,n))return"";switch(t.type){case"ieConditionalComment":case"ieConditionalEndComment":return"[endif]-->";case"ieConditionalStartComment":return"]><!-->";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(t.isSelfClosing)return"/>";default:return">"}}function Ia(t,n){return!t.isSelfClosing&&!t.endSourceSpan&&(rr(t)||ba(t.parent,n))}function Ze(t){return t.prev&&t.prev.type!=="docType"&&t.type!=="angularControlFlowBlock"&&!ge(t.prev)&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function _t(t){var n;return((n=t.lastChild)==null?void 0:n.isTrailingSpaceSensitive)&&!t.lastChild.hasTrailingSpaces&&!ge(Or(t.lastChild))&&!pt(t)}function Bt(t){return!t.next&&!t.hasTrailingSpaces&&t.isTrailingSpaceSensitive&&ge(Or(t))}function or(t){return t.next&&!ge(t.next)&&ge(t)&&t.isTrailingSpaceSensitive&&!t.hasTrailingSpaces}function gu(t){let n=t.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su);return n?n[1]?n[1].split(/\s+/u):!0:!1}function ir(t){return!t.prev&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function bu(t,n,i){var c;let{node:h}=t;if(!Pr(h.attrs))return h.isSelfClosing?" ":"";let b=((c=h.prev)==null?void 0:c.type)==="comment"&&gu(h.prev.value),F=typeof b=="boolean"?()=>b:Array.isArray(b)?G=>b.includes(G.rawName):()=>!1,A=t.map(({node:G})=>F(G)?xe(n.originalText.slice(At(G),sr(G))):i(),"attrs"),B=h.type==="element"&&h.fullName==="script"&&h.attrs.length===1&&h.attrs[0].fullName==="src"&&h.children.length===0,z=n.singleAttributePerLine&&h.attrs.length>1&&!ht(h,n)?Y:X,I=[Ce([B?" ":X,ct(z,A)])];return h.firstChild&&ir(h.firstChild)||h.isSelfClosing&&_t(h.parent)||B?I.push(h.isSelfClosing?" ":""):I.push(n.bracketSameLine?h.isSelfClosing?" ":"":h.isSelfClosing?X:ie),I}function xu(t){return t.firstChild&&ir(t.firstChild)?"":Vr(t)}function Ur(t,n,i){let{node:c}=t;return[Tt(c,n),bu(t,n,i),c.isSelfClosing?"":xu(c)]}function Tt(t,n){return t.prev&&or(t.prev)?"":[Qe(t,n),Wr(t,n)]}function Qe(t,n){return ir(t)?Vr(t.parent):Ze(t)?jt(t.prev,n):""}var Oa="<!doctype";function Wr(t,n){switch(t.type){case"ieConditionalComment":case"ieConditionalStartComment":return`<!--[if ${t.condition}`;case"ieConditionalEndComment":return"<!--<!";case"interpolation":return"{{";case"docType":{if(t.value==="html"){let{filepath:c}=n;if(c&&/\.html?$/u.test(c))return Oa}let i=At(t);return n.originalText.slice(i,i+Oa.length)}case"angularIcuExpression":return"{";case"element":if(t.condition)return`<!--[if ${t.condition}]><!--><${t.rawName}`;default:return`<${t.rawName}`}}function Vr(t){switch(t.type){case"ieConditionalComment":return"]>";case"element":if(t.condition)return"><!--<![endif]-->";default:return">"}}function Du(t,n){if(!t.endSourceSpan)return"";let i=t.startSourceSpan.end.offset;t.firstChild&&ir(t.firstChild)&&(i-=Vr(t).length);let c=t.endSourceSpan.start.offset;return t.lastChild&&Bt(t.lastChild)?c+=qr(t,n).length:_t(t)&&(c-=jt(t.lastChild,n).length),n.originalText.slice(i,c)}var Ma=Du,yu=new Set(["if","else if","for","switch","case"]);function vu(t,n){let{node:i}=t;switch(i.type){case"element":if(je(i,n)||i.type==="interpolation")return;if(!i.isSelfClosing&&Mr(i,n)){let c=Ea(i,n);return c?async(h,b)=>{let F=Ma(i,n),A=/^\s*$/u.test(F),B="";return A||(B=await h(ga(F),{parser:c,__embeddedInHtml:!0}),A=B===""),[Qe(i,n),te(Ur(t,n,b)),A?"":Y,B,A?"":Y,Hr(i,n),Xe(i,n)]}:void 0}break;case"text":if(je(i.parent,n)){let c=Ea(i.parent,n);if(c)return async h=>{let b=c==="markdown"?ka(i.value.replace(/^[^\S\n]*\n/u,"")):i.value,F={parser:c,__embeddedInHtml:!0};if(n.parser==="html"&&c==="babel"){let A="script",{attrMap:B}=i.parent;B&&(B.type==="module"||(B.type==="text/babel"||B.type==="text/jsx")&&B["data-type"]==="module")&&(A="module"),F.__babelSourceType=A}return[Et,Qe(i,n),await h(b,F),Xe(i,n)]}}else if(i.parent.type==="interpolation")return async c=>{let h={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return n.parser==="angular"?h.parser="__ng_interpolation":n.parser==="vue"?h.parser=$r(t,n)?"__vue_ts_expression":"__vue_expression":h.parser="__js_expression",[Ce([X,await c(i.value,h)]),i.parent.next&&Ze(i.parent.next)?" ":X]};break;case"attribute":return pu(t,n);case"front-matter":return c=>Ji(i,c);case"angularControlFlowBlockParameters":return yu.has(t.parent.name)?Ki:void 0;case"angularLetDeclarationInitializer":return c=>ye(i.value,c,{parser:"__ng_binding",__isInHtmlAttribute:!1})}}var wu=vu,Lt=null;function Pt(t){if(Lt!==null&&typeof Lt.property){let n=Lt;return Lt=Pt.prototype=null,n}return Lt=Pt.prototype=t??Object.create(null),new Pt}var Cu=10;for(let t=0;t<=Cu;t++)Pt();function Fu(t){return Pt(t)}function Eu(t,n="type"){Fu(t);function i(c){let h=c[n],b=t[h];if(!Array.isArray(b))throw Object.assign(new Error(`Missing visitor keys for '${h}'.`),{node:c});return b}return i}var Su=Eu,ku={"front-matter":[],root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[],angularLetDeclaration:["init"],angularLetDeclarationInitializer:[],angularIcuExpression:["cases"],angularIcuCase:["expression"]},Au=ku,Nu=Su(Au),ju=Nu,_u="format",Bu=/^\s*<!--\s*@(?:noformat|noprettier)\s*-->/u,Tu=/^\s*<!--\s*@(?:format|prettier)\s*-->/u;function Lu(t){return Tu.test(t)}function Pu(t){return Bu.test(t)}function Iu(t){return`<!-- @${_u} -->
|
|
11
11
|
|
|
12
|
-
${t}`}var
|
|
13
|
-
`);F=A>0?h-A:h}else F--;for(;h<c&&n>0;){let A=i.charCodeAt(h);h++,n--,A==10?(b++,F=0):F++}return new
|
|
12
|
+
${t}`}var Ou=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function Ra(t){let n=sr(t);return t.type==="element"&&!t.endSourceSpan&&Pr(t.children)?Math.max(n,Ra(Ft(!1,t.children,-1))):n}function It(t,n,i){let c=t.node;if(rr(c)){let h=Ra(c);return[Qe(c,n),xe(Ne.trimEnd(n.originalText.slice(At(c)+(c.prev&&or(c.prev)?Wr(c).length:0),h-(c.next&&Ze(c.next)?jt(c,n).length:0)))),Xe(c,n)]}return i()}function lr(t,n){return ge(t)&&ge(n)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?Ir(n)?Y:X:"":Ir(n)?Y:ie:or(t)&&(rr(n)||n.firstChild||n.isSelfClosing||n.type==="element"&&n.attrs.length>0)||t.type==="element"&&t.isSelfClosing&&Ze(n)?"":!n.isLeadingSpaceSensitive||Ir(n)||Ze(n)&&t.lastChild&&Bt(t.lastChild)&&t.lastChild.lastChild&&Bt(t.lastChild.lastChild)?Y:n.hasLeadingSpaces?X:ie}function Jr(t,n,i){let{node:c}=t;if(Da(c))return[Et,...t.map(b=>{let F=b.node,A=F.prev?lr(F.prev,F):"";return[A?[A,nr(F.prev)?Y:""]:"",It(b,n,i)]},"children")];let h=c.children.map(()=>Symbol(""));return t.map((b,F)=>{let A=b.node;if(ge(A)){if(A.prev&&ge(A.prev)){let K=lr(A.prev,A);if(K)return nr(A.prev)?[Y,Y,It(b,n,i)]:[K,It(b,n,i)]}return It(b,n,i)}let B=[],z=[],I=[],G=[],q=A.prev?lr(A.prev,A):"",V=A.next?lr(A,A.next):"";return q&&(nr(A.prev)?B.push(Y,Y):q===Y?B.push(Y):ge(A.prev)?z.push(q):z.push(Xt("",ie,{groupId:h[F-1]}))),V&&(nr(A)?ge(A.next)&&G.push(Y,Y):V===Y?ge(A.next)&&G.push(Y):I.push(V)),[...B,te([...z,te([It(b,n,i),...I],{id:h[F]})]),...G]},"children")}function Mu(t,n,i){let{node:c}=t,h=[];Ru(t)&&h.push("} "),h.push("@",c.name),c.parameters&&h.push(" (",te(i("parameters")),")"),h.push(" {");let b=za(c);return c.children.length>0?(c.firstChild.hasLeadingSpaces=!0,c.lastChild.hasTrailingSpaces=!0,h.push(Ce([Y,Jr(t,n,i)])),b&&h.push(Y,"}")):b&&h.push("}"),te(h,{shouldBreak:!0})}function za(t){var n,i;return!(((n=t.next)==null?void 0:n.type)==="angularControlFlowBlock"&&(i=Ou.get(t.name))!=null&&i.has(t.next.name))}function Ru(t){let{previous:n}=t;return n?.type==="angularControlFlowBlock"&&!rr(n)&&!za(n)}function zu(t,n,i){return[Ce([ie,ct([";",X],t.map(i,"children"))]),ie]}function $u(t,n,i){let{node:c}=t;return[Tt(c,n),te([c.switchValue.trim(),", ",c.clause,c.cases.length>0?[",",Ce([X,ct(X,t.map(i,"cases"))])]:"",ie]),Nt(c,n)]}function Hu(t,n,i){let{node:c}=t;return[c.value," {",te([Ce([ie,t.map(({node:h,isLast:b})=>{let F=[i()];return h.type==="text"&&(h.hasLeadingSpaces&&F.unshift(X),h.hasTrailingSpaces&&!b&&F.push(X)),F},"expression")]),ie]),"}"]}function qu(t,n,i){let{node:c}=t;if(ba(c,n))return[Qe(c,n),te(Ur(t,n,i)),xe(Ma(c,n)),...Hr(c,n),Xe(c,n)];let h=c.children.length===1&&(c.firstChild.type==="interpolation"||c.firstChild.type==="angularIcuExpression")&&c.firstChild.isLeadingSpaceSensitive&&!c.firstChild.hasLeadingSpaces&&c.lastChild.isTrailingSpaceSensitive&&!c.lastChild.hasTrailingSpaces,b=Symbol("element-attr-group-id"),F=I=>te([te(Ur(t,n,i),{id:b}),I,Hr(c,n)]),A=I=>h?Ni(I,{groupId:b}):(je(c,n)||ar(c,n))&&c.parent.type==="root"&&n.parser==="vue"&&!n.vueIndentScriptAndStyle?I:Ce(I),B=()=>h?Xt(ie,"",{groupId:b}):c.firstChild.hasLeadingSpaces&&c.firstChild.isLeadingSpaceSensitive?X:c.firstChild.type==="text"&&c.isWhitespaceSensitive&&c.isIndentationSensitive?ki(ie):ie,z=()=>(c.next?Ze(c.next):_t(c.parent))?c.lastChild.hasTrailingSpaces&&c.lastChild.isTrailingSpaceSensitive?" ":"":h?Xt(ie,"",{groupId:b}):c.lastChild.hasTrailingSpaces&&c.lastChild.isTrailingSpaceSensitive?X:(c.lastChild.type==="comment"||c.lastChild.type==="text"&&c.isWhitespaceSensitive&&c.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${n.tabWidth*(t.ancestors.length-1)}}$`,"u").test(c.lastChild.value)?"":ie;return c.children.length===0?F(c.hasDanglingSpaces&&c.isDanglingSpaceSensitive?X:""):F([xl(c)?Et:"",A([B(),Jr(t,n,i)]),z()])}function ur(t){return t>=9&&t<=32||t==160}function Gr(t){return 48<=t&&t<=57}function cr(t){return t>=97&&t<=122||t>=65&&t<=90}function Uu(t){return t>=97&&t<=102||t>=65&&t<=70||Gr(t)}function Kr(t){return t===10||t===13}function $a(t){return 48<=t&&t<=55}function Yr(t){return t===39||t===34||t===96}var Wu=/-+([a-z0-9])/g;function Vu(t){return t.replace(Wu,(...n)=>n[1].toUpperCase())}var Xr=class Do{constructor(n,i,c,h){this.file=n,this.offset=i,this.line=c,this.col=h}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(n){let i=this.file.content,c=i.length,h=this.offset,b=this.line,F=this.col;for(;h>0&&n<0;)if(h--,n++,i.charCodeAt(h)==10){b--;let A=i.substring(0,h-1).lastIndexOf(`
|
|
13
|
+
`);F=A>0?h-A:h}else F--;for(;h<c&&n>0;){let A=i.charCodeAt(h);h++,n--,A==10?(b++,F=0):F++}return new Do(this.file,h,b,F)}getContext(n,i){let c=this.file.content,h=this.offset;if(h!=null){h>c.length-1&&(h=c.length-1);let b=h,F=0,A=0;for(;F<n&&h>0&&(h--,F++,!(c[h]==`
|
|
14
14
|
`&&++A==i)););for(F=0,A=0;F<n&&b<c.length-1&&(b++,F++,!(c[b]==`
|
|
15
|
-
`&&++A==i)););return{before:c.substring(h,this.offset),after:c.substring(this.offset,b+1)}}return null}},
|
|
16
|
-
`){let i=n.children[0];i.value.length===1?n.removeChild(i):i.value=i.value.slice(1)}})}function Xu(t){let n=i=>{var c,h;return i.type==="element"&&((c=i.prev)==null?void 0:c.type)==="ieConditionalStartComment"&&i.prev.sourceSpan.end.offset===i.startSourceSpan.start.offset&&((h=i.firstChild)==null?void 0:h.type)==="ieConditionalEndComment"&&i.firstChild.sourceSpan.start.offset===i.startSourceSpan.end.offset};t.walk(i=>{if(i.children)for(let c=0;c<i.children.length;c++){let h=i.children[c];if(!n(h))continue;let b=h.prev,F=h.firstChild;i.removeChild(b),c--;let A=new U(b.sourceSpan.start,F.sourceSpan.end),B=new U(A.start,h.sourceSpan.end);h.condition=b.condition,h.sourceSpan=B,h.startSourceSpan=A,h.removeChild(F)}})}function Zu(t,n,i){t.walk(c=>{if(c.children)for(let h=0;h<c.children.length;h++){let b=c.children[h];if(b.type!=="text"&&!n(b))continue;b.type!=="text"&&(b.type="text",b.value=i(b));let F=b.prev;!F||F.type!=="text"||(F.value+=b.value,F.sourceSpan=new U(F.sourceSpan.start,b.sourceSpan.end),c.removeChild(b),h--)}})}function Qu(t){return Zu(t,n=>n.type==="cdata",n=>`<![CDATA[${n.value}]]>`)}function ec(t){let n=i=>{var c,h;return i.type==="element"&&i.attrs.length===0&&i.children.length===1&&i.firstChild.type==="text"&&!Ne.hasWhitespaceCharacter(i.children[0].value)&&!i.firstChild.hasLeadingSpaces&&!i.firstChild.hasTrailingSpaces&&i.isLeadingSpaceSensitive&&!i.hasLeadingSpaces&&i.isTrailingSpaceSensitive&&!i.hasTrailingSpaces&&((c=i.prev)==null?void 0:c.type)==="text"&&((h=i.next)==null?void 0:h.type)==="text"};t.walk(i=>{if(i.children)for(let c=0;c<i.children.length;c++){let h=i.children[c];if(!n(h))continue;let b=h.prev,F=h.next;b.value+=`<${h.rawName}>`+h.firstChild.value+`</${h.rawName}>`+F.value,b.sourceSpan=new U(b.sourceSpan.start,F.sourceSpan.end),b.isTrailingSpaceSensitive=F.isTrailingSpaceSensitive,b.hasTrailingSpaces=F.hasTrailingSpaces,i.removeChild(h),c--,i.removeChild(F)}})}function tc(t,n){if(n.parser==="html")return;let i=/\{\{(.+?)\}\}/su;t.walk(c=>{if(ml(c,n))for(let h of c.children){if(h.type!=="text")continue;let b=h.sourceSpan.start,F=null,A=h.value.split(i);for(let B=0;B<A.length;B++,b=F){let z=A[B];if(B%2===0){F=b.moveBy(z.length),z.length>0&&c.insertChildBefore(h,{type:"text",value:z,sourceSpan:new U(b,F)});continue}F=b.moveBy(z.length+4),c.insertChildBefore(h,{type:"interpolation",sourceSpan:new U(b,F),children:z.length===0?[]:[{type:"text",value:z,sourceSpan:new U(b.moveBy(2),F.moveBy(-2))}]})}c.removeChild(h)}})}function rc(t,n){t.walk(i=>{let c=i.$children;if(!c)return;if(c.length===0||c.length===1&&c[0].type==="text"&&Ne.trim(c[0].value).length===0){i.hasDanglingSpaces=c.length>0,i.$children=[];return}let h=fl(i,n),b=Da(i);if(!h)for(let F=0;F<c.length;F++){let A=c[F];if(A.type!=="text")continue;let{leadingWhitespace:B,text:z,trailingWhitespace:I}=pl(A.value),G=A.prev,q=A.next;z?(A.value=z,A.sourceSpan=new U(A.sourceSpan.start.moveBy(B.length),A.sourceSpan.end.moveBy(-I.length)),B&&(G&&(G.hasTrailingSpaces=!0),A.hasLeadingSpaces=!0),I&&(A.hasTrailingSpaces=!0,q&&(q.hasLeadingSpaces=!0))):(i.removeChild(A),F--,(B||I)&&(G&&(G.hasTrailingSpaces=!0),q&&(q.hasLeadingSpaces=!0)))}i.isWhitespaceSensitive=h,i.isIndentationSensitive=b})}function nc(t){t.walk(n=>{n.isSelfClosing=!n.children||n.type==="element"&&(n.tagDefinition.isVoid||n.endSourceSpan&&n.startSourceSpan.start===n.endSourceSpan.start&&n.startSourceSpan.end===n.endSourceSpan.end)})}function ac(t,n){t.walk(i=>{i.type==="element"&&(i.hasHtmComponentClosingTag=i.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(n.originalText.slice(i.endSourceSpan.start.offset,i.endSourceSpan.end.offset)))})}function sc(t,n){t.walk(i=>{i.cssDisplay=_l(i,n)})}function oc(t,n){t.walk(i=>{let{children:c}=i;if(c){if(c.length===0){i.isDanglingSpaceSensitive=xl(i,n);return}for(let h of c)h.isLeadingSpaceSensitive=gl(h,n),h.isTrailingSpaceSensitive=bl(h,n);for(let h=0;h<c.length;h++){let b=c[h];b.isLeadingSpaceSensitive=(h===0||b.prev.isTrailingSpaceSensitive)&&b.isLeadingSpaceSensitive,b.isTrailingSpaceSensitive=(h===c.length-1||b.next.isLeadingSpaceSensitive)&&b.isTrailingSpaceSensitive}}})}var ic=Ku;function lc(t,n,i){let{node:c}=t;switch(c.type){case"front-matter":return xe(c.raw);case"root":return n.__onHtmlRoot&&n.__onHtmlRoot(c),[te(Jr(t,n,i)),Y];case"element":case"ieConditionalComment":return Uu(t,n,i);case"angularControlFlowBlock":return Ru(t,n,i);case"angularControlFlowBlockParameters":return $u(t,n,i);case"angularControlFlowBlockParameter":return Ne.trim(c.expression);case"angularLetDeclaration":return te(["@let ",te([c.id," =",te(Ce([X,i("init")]))]),";"]);case"angularLetDeclarationInitializer":return c.value;case"angularIcuExpression":return Hu(t,n,i);case"angularIcuCase":return qu(t,n,i);case"ieConditionalStartComment":case"ieConditionalEndComment":return[Tt(c),Nt(c)];case"interpolation":return[Tt(c,n),...t.map(i,"children"),Nt(c,n)];case"text":{if(c.parent.type==="interpolation"){let A=/\n[^\S\n]*$/u,B=A.test(c.value),z=B?c.value.replace(A,""):c.value;return[xe(z),B?Y:""]}let h=Qe(c,n),b=ja(c),F=Xe(c,n);return b[0]=[h,b[0]],b.push([b.pop(),F]),aa(b)}case"docType":return[te([Tt(c,n)," ",k(!1,c.value.replace(/^html\b/iu,"html"),/\s+/gu," ")]),Nt(c,n)];case"comment":return[Qe(c,n),xe(n.originalText.slice(At(c),sr(c))),Xe(c,n)];case"attribute":{if(c.value===null)return c.rawName;let h=Na(c.value),b=Pi(h,'"');return[c.rawName,"=",b,xe(b==='"'?k(!1,h,'"',"""):k(!1,h,"'","'")),b]}case"cdata":default:throw new Hi(c,"HTML")}}var uc={preprocess:ic,print:lc,insertPragma:Ou,massageAstNode:Vi,embed:Cu,getVisitorKeys:_u},cc=uc,dc=[{name:"Angular",type:"markup",extensions:[".component.html"],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["angular"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"HTML",type:"markup",extensions:[".html",".hta",".htm",".html.hl",".inc",".xht",".xhtml"],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["html"],vscodeLanguageIds:["html"],linguistLanguageId:146},{name:"Lightning Web Components",type:"markup",extensions:[],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["lwc"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"MJML",type:"markup",extensions:[".mjml"],tmScope:"text.mjml.basic",aceMode:"html",aliases:["MJML","mjml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["mjml"],filenames:[],vscodeLanguageIds:["mjml"],linguistLanguageId:146},{name:"Vue",type:"markup",extensions:[".vue"],tmScope:"source.vue",aceMode:"html",parsers:["vue"],vscodeLanguageIds:["vue"],linguistLanguageId:391}],Wa={bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},Va="HTML",pc={bracketSameLine:Wa.bracketSameLine,htmlWhitespaceSensitivity:{category:Va,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:Wa.singleAttributePerLine,vueIndentScriptAndStyle:{category:Va,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},hc=pc,Ja={};f(Ja,{angular:()=>Dd,html:()=>gd,lwc:()=>vd,mjml:()=>xd,vue:()=>yd});var Ga;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(Ga||(Ga={}));var Ka;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(Ka||(Ka={}));var Ya;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(Ya||(Ya={}));var Xa={name:"custom-elements"},Za={name:"no-errors-schema"},et;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"})(et||(et={}));var Qa;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(Qa||(Qa={}));var ve;(function(t){t[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA"})(ve||(ve={}));function pr(t,n=!0){if(t[0]!=":")return[null,t];let i=t.indexOf(":",1);if(i===-1){if(n)throw new Error(`Unsupported format "${t}" expecting ":namespace:name"`);return[null,t]}return[t.slice(1,i),t.slice(i+1)]}function es(t){return pr(t)[1]==="ng-container"}function ts(t){return pr(t)[1]==="ng-content"}function hr(t){return t===null?null:pr(t)[0]}function mr(t,n){return t?`:${t}:${n}`:n}var fr;function rs(){return fr||(fr={},gr(et.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),gr(et.STYLE,["*|style"]),gr(et.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),gr(et.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),fr}function gr(t,n){for(let i of n)fr[i.toLowerCase()]=t}var mc=class{},fc="boolean",gc="number",bc="string",xc="object",Dc=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|",":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":math:math^:math:|",":math:maction^:math:|",":math:menclose^:math:|",":math:merror^:math:|",":math:mfenced^:math:|",":math:mfrac^:math:|",":math:mi^:math:|",":math:mmultiscripts^:math:|",":math:mn^:math:|",":math:mo^:math:|",":math:mover^:math:|",":math:mpadded^:math:|",":math:mphantom^:math:|",":math:mroot^:math:|",":math:mrow^:math:|",":math:ms^:math:|",":math:mspace^:math:|",":math:msqrt^:math:|",":math:mstyle^:math:|",":math:msub^:math:|",":math:msubsup^:math:|",":math:msup^:math:|",":math:mtable^:math:|",":math:mtd^:math:|",":math:mtext^:math:|",":math:mtr^:math:|",":math:munder^:math:|",":math:munderover^:math:|",":math:semantics^:math:|"],ns=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),yc=Array.from(ns).reduce((t,[n,i])=>(t.set(n,i),t),new Map),vc=class extends mc{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,Dc.forEach(t=>{let n=new Map,i=new Set,[c,h]=t.split("|"),b=h.split(","),[F,A]=c.split("^");F.split(",").forEach(z=>{this._schema.set(z.toLowerCase(),n),this._eventSchema.set(z.toLowerCase(),i)});let B=A&&this._schema.get(A.toLowerCase());if(B){for(let[z,I]of B)n.set(z,I);for(let z of this._eventSchema.get(A.toLowerCase()))i.add(z)}b.forEach(z=>{if(z.length>0)switch(z[0]){case"*":i.add(z.substring(1));break;case"!":n.set(z.substring(1),fc);break;case"#":n.set(z.substring(1),gc);break;case"%":n.set(z.substring(1),xc);break;default:n.set(z,bc)}})})}hasProperty(t,n,i){if(i.some(c=>c.name===Za.name))return!0;if(t.indexOf("-")>-1){if(es(t)||ts(t))return!1;if(i.some(c=>c.name===Xa.name))return!0}return(this._schema.get(t.toLowerCase())||this._schema.get("unknown")).has(n)}hasElement(t,n){return n.some(i=>i.name===Za.name)||t.indexOf("-")>-1&&(es(t)||ts(t)||n.some(i=>i.name===Xa.name))?!0:this._schema.has(t.toLowerCase())}securityContext(t,n,i){i&&(n=this.getMappedPropName(n)),t=t.toLowerCase(),n=n.toLowerCase();let c=rs()[t+"|"+n];return c||(c=rs()["*|"+n],c||et.NONE)}getMappedPropName(t){return ns.get(t)??t}getDefaultComponentElementName(){return"ng-component"}validateProperty(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${t}' is disallowed for security reasons, please use (${t.slice(2)})=...
|
|
17
|
-
If '${t}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${t}' is disallowed for security reasons, please use (${t.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(t){let n=this._schema.get(t.toLowerCase())||this._schema.get("unknown");return Array.from(n.keys()).map(i=>yc.get(i)??i)}allKnownEventsOfElement(t){return Array.from(this._eventSchema.get(t.toLowerCase())??[])}normalizeAnimationStyleProperty(t){return Ju(t)}normalizeAnimationStyleValue(t,n,i){let c="",h=i.toString().trim(),b=null;if(wc(t)&&i!==0&&i!=="0")if(typeof i=="number")c="px";else{let F=i.match(/^[+-]?[\d\.]+([a-z]*)$/);F&&F[1].length==0&&(b=`Please provide a CSS unit value for ${n}:${i}`)}return{error:b,value:h+c}}};function wc(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var $=class{constructor({closedByChildren:t,implicitNamespacePrefix:n,contentType:i=ve.PARSABLE_DATA,closedByParent:c=!1,isVoid:h=!1,ignoreFirstLf:b=!1,preventNamespaceInheritance:F=!1,canSelfClose:A=!1}={}){this.closedByChildren={},this.closedByParent=!1,t&&t.length>0&&t.forEach(B=>this.closedByChildren[B]=!0),this.isVoid=h,this.closedByParent=c||h,this.implicitNamespacePrefix=n||null,this.contentType=i,this.ignoreFirstLf=b,this.preventNamespaceInheritance=F,this.canSelfClose=A??h}isClosedByChild(t){return this.isVoid||t.toLowerCase()in this.closedByChildren}getContentType(t){return typeof this.contentType=="object"?(t===void 0?void 0:this.contentType[t])??this.contentType.default:this.contentType}},as,Ot;function Zr(t){return Ot||(as=new $({canSelfClose:!0}),Ot=Object.assign(Object.create(null),{base:new $({isVoid:!0}),meta:new $({isVoid:!0}),area:new $({isVoid:!0}),embed:new $({isVoid:!0}),link:new $({isVoid:!0}),img:new $({isVoid:!0}),input:new $({isVoid:!0}),param:new $({isVoid:!0}),hr:new $({isVoid:!0}),br:new $({isVoid:!0}),source:new $({isVoid:!0}),track:new $({isVoid:!0}),wbr:new $({isVoid:!0}),p:new $({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new $({closedByChildren:["tbody","tfoot"]}),tbody:new $({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new $({closedByChildren:["tbody"],closedByParent:!0}),tr:new $({closedByChildren:["tr"],closedByParent:!0}),td:new $({closedByChildren:["td","th"],closedByParent:!0}),th:new $({closedByChildren:["td","th"],closedByParent:!0}),col:new $({isVoid:!0}),svg:new $({implicitNamespacePrefix:"svg"}),foreignObject:new $({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new $({implicitNamespacePrefix:"math"}),li:new $({closedByChildren:["li"],closedByParent:!0}),dt:new $({closedByChildren:["dt","dd"]}),dd:new $({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new $({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new $({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new $({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new $({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new $({closedByChildren:["optgroup"],closedByParent:!0}),option:new $({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new $({ignoreFirstLf:!0}),listing:new $({ignoreFirstLf:!0}),style:new $({contentType:ve.RAW_TEXT}),script:new $({contentType:ve.RAW_TEXT}),title:new $({contentType:{default:ve.ESCAPABLE_RAW_TEXT,svg:ve.PARSABLE_DATA}}),textarea:new $({contentType:ve.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new vc().allKnownElementNames().forEach(n=>{!Ot[n]&&hr(n)===null&&(Ot[n]=new $({canSelfClose:!1}))})),Ot[t]??as}var mt=class{constructor(t,n){this.sourceSpan=t,this.i18n=n}},Cc=class extends mt{constructor(t,n,i,c){super(n,c),this.value=t,this.tokens=i,this.type="text"}visit(t,n){return t.visitText(this,n)}},Fc=class extends mt{constructor(t,n,i,c){super(n,c),this.value=t,this.tokens=i,this.type="cdata"}visit(t,n){return t.visitCdata(this,n)}},Ec=class extends mt{constructor(t,n,i,c,h,b){super(c,b),this.switchValue=t,this.type=n,this.cases=i,this.switchValueSourceSpan=h}visit(t,n){return t.visitExpansion(this,n)}},Sc=class{constructor(t,n,i,c,h){this.value=t,this.expression=n,this.sourceSpan=i,this.valueSourceSpan=c,this.expSourceSpan=h,this.type="expansionCase"}visit(t,n){return t.visitExpansionCase(this,n)}},kc=class extends mt{constructor(t,n,i,c,h,b,F){super(i,F),this.name=t,this.value=n,this.keySpan=c,this.valueSpan=h,this.valueTokens=b,this.type="attribute"}visit(t,n){return t.visitAttribute(this,n)}get nameSpan(){return this.keySpan}},He=class extends mt{constructor(t,n,i,c,h,b=null,F=null,A){super(c,A),this.name=t,this.attrs=n,this.children=i,this.startSourceSpan=h,this.endSourceSpan=b,this.nameSpan=F,this.type="element"}visit(t,n){return t.visitElement(this,n)}},Ac=class{constructor(t,n){this.value=t,this.sourceSpan=n,this.type="comment"}visit(t,n){return t.visitComment(this,n)}},Nc=class{constructor(t,n){this.value=t,this.sourceSpan=n,this.type="docType"}visit(t,n){return t.visitDocType(this,n)}},ft=class extends mt{constructor(t,n,i,c,h,b,F=null,A){super(c,A),this.name=t,this.parameters=n,this.children=i,this.nameSpan=h,this.startSourceSpan=b,this.endSourceSpan=F,this.type="block"}visit(t,n){return t.visitBlock(this,n)}},ss=class{constructor(t,n){this.expression=t,this.sourceSpan=n,this.type="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(t,n){return t.visitBlockParameter(this,n)}},os=class{constructor(t,n,i,c,h){this.name=t,this.value=n,this.sourceSpan=i,this.nameSpan=c,this.valueSpan=h,this.type="letDeclaration",this.startSourceSpan=null,this.endSourceSpan=null}visit(t,n){return t.visitLetDeclaration(this,n)}};function is(t,n,i=null){let c=[],h=t.visit?b=>t.visit(b,i)||b.visit(t,i):b=>b.visit(t,i);return n.forEach(b=>{let F=h(b);F&&c.push(F)}),c}var jc=class{constructor(){}visitElement(t,n){this.visitChildren(n,i=>{i(t.attrs),i(t.children)})}visitAttribute(t,n){}visitText(t,n){}visitCdata(t,n){}visitComment(t,n){}visitDocType(t,n){}visitExpansion(t,n){return this.visitChildren(n,i=>{i(t.cases)})}visitExpansionCase(t,n){}visitBlock(t,n){this.visitChildren(n,i=>{i(t.parameters),i(t.children)})}visitBlockParameter(t,n){}visitLetDeclaration(t,n){}visitChildren(t,n){let i=[],c=this;function h(b){b&&i.push(is(c,b,t))}return n(h),Array.prototype.concat.apply([],i)}},br={AElig:"Æ",AMP:"&",amp:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",af:"",Aring:"Å",angst:"Å",Ascr:"𝒜",Assign:"≔",colone:"≔",coloneq:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",setminus:"∖",setmn:"∖",smallsetminus:"∖",ssetmn:"∖",Barv:"⫧",Barwed:"⌆",doublebarwedge:"⌆",Bcy:"Б",Because:"∵",becaus:"∵",because:"∵",Bernoullis:"ℬ",Bscr:"ℬ",bernou:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",breve:"˘",Bumpeq:"≎",HumpDownHump:"≎",bump:"≎",CHcy:"Ч",COPY:"©",copy:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",DD:"ⅅ",Cayleys:"ℭ",Cfr:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",cedil:"¸",CenterDot:"·",centerdot:"·",middot:"·",Chi:"Χ",CircleDot:"⊙",odot:"⊙",CircleMinus:"⊖",ominus:"⊖",CirclePlus:"⊕",oplus:"⊕",CircleTimes:"⊗",otimes:"⊗",ClockwiseContourIntegral:"∲",cwconint:"∲",CloseCurlyDoubleQuote:"”",rdquo:"”",rdquor:"”",CloseCurlyQuote:"’",rsquo:"’",rsquor:"’",Colon:"∷",Proportion:"∷",Colone:"⩴",Congruent:"≡",equiv:"≡",Conint:"∯",DoubleContourIntegral:"∯",ContourIntegral:"∮",conint:"∮",oint:"∮",Copf:"ℂ",complexes:"ℂ",Coproduct:"∐",coprod:"∐",CounterClockwiseContourIntegral:"∳",awconint:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",asympeq:"≍",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",ddagger:"‡",Darr:"↡",Dashv:"⫤",DoubleLeftTee:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",nabla:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",acute:"´",DiacriticalDot:"˙",dot:"˙",DiacriticalDoubleAcute:"˝",dblac:"˝",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"˜",tilde:"˜",Diamond:"⋄",diam:"⋄",diamond:"⋄",DifferentialD:"ⅆ",dd:"ⅆ",Dopf:"𝔻",Dot:"¨",DoubleDot:"¨",die:"¨",uml:"¨",DotDot:"⃜",DotEqual:"≐",doteq:"≐",esdot:"≐",DoubleDownArrow:"⇓",Downarrow:"⇓",dArr:"⇓",DoubleLeftArrow:"⇐",Leftarrow:"⇐",lArr:"⇐",DoubleLeftRightArrow:"⇔",Leftrightarrow:"⇔",hArr:"⇔",iff:"⇔",DoubleLongLeftArrow:"⟸",Longleftarrow:"⟸",xlArr:"⟸",DoubleLongLeftRightArrow:"⟺",Longleftrightarrow:"⟺",xhArr:"⟺",DoubleLongRightArrow:"⟹",Longrightarrow:"⟹",xrArr:"⟹",DoubleRightArrow:"⇒",Implies:"⇒",Rightarrow:"⇒",rArr:"⇒",DoubleRightTee:"⊨",vDash:"⊨",DoubleUpArrow:"⇑",Uparrow:"⇑",uArr:"⇑",DoubleUpDownArrow:"⇕",Updownarrow:"⇕",vArr:"⇕",DoubleVerticalBar:"∥",par:"∥",parallel:"∥",shortparallel:"∥",spar:"∥",DownArrow:"↓",ShortDownArrow:"↓",darr:"↓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",duarr:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",leftharpoondown:"↽",lhard:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",rhard:"⇁",rightharpoondown:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",top:"⊤",DownTeeArrow:"↧",mapstodown:"↧",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",in:"∈",isin:"∈",isinv:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",eqsim:"≂",esim:"≂",Equilibrium:"⇌",rightleftharpoons:"⇌",rlhar:"⇌",Escr:"ℰ",expectation:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",exist:"∃",ExponentialE:"ⅇ",ee:"ⅇ",exponentiale:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",blacksquare:"▪",squarf:"▪",squf:"▪",Fopf:"𝔽",ForAll:"∀",forall:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",gt:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",ggg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",ge:"≥",geq:"≥",GreaterEqualLess:"⋛",gel:"⋛",gtreqless:"⋛",GreaterFullEqual:"≧",gE:"≧",geqq:"≧",GreaterGreater:"⪢",GreaterLess:"≷",gl:"≷",gtrless:"≷",GreaterSlantEqual:"⩾",geqslant:"⩾",ges:"⩾",GreaterTilde:"≳",gsim:"≳",gtrsim:"≳",Gscr:"𝒢",Gt:"≫",NestedGreaterGreater:"≫",gg:"≫",HARDcy:"Ъ",Hacek:"ˇ",caron:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",Poincareplane:"ℌ",HilbertSpace:"ℋ",Hscr:"ℋ",hamilt:"ℋ",Hopf:"ℍ",quaternions:"ℍ",HorizontalLine:"─",boxh:"─",Hstrok:"Ħ",HumpEqual:"≏",bumpe:"≏",bumpeq:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Im:"ℑ",image:"ℑ",imagpart:"ℑ",Igrave:"Ì",Imacr:"Ī",ImaginaryI:"ⅈ",ii:"ⅈ",Int:"∬",Integral:"∫",int:"∫",Intersection:"⋂",bigcap:"⋂",xcap:"⋂",InvisibleComma:"",ic:"",InvisibleTimes:"",it:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",imagline:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",lt:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Lscr:"ℒ",lagran:"ℒ",Larr:"↞",twoheadleftarrow:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",lang:"⟨",langle:"⟨",LeftArrow:"←",ShortLeftArrow:"←",larr:"←",leftarrow:"←",slarr:"←",LeftArrowBar:"⇤",larrb:"⇤",LeftArrowRightArrow:"⇆",leftrightarrows:"⇆",lrarr:"⇆",LeftCeiling:"⌈",lceil:"⌈",LeftDoubleBracket:"⟦",lobrk:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",dharl:"⇃",downharpoonleft:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",lfloor:"⌊",LeftRightArrow:"↔",harr:"↔",leftrightarrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",dashv:"⊣",LeftTeeArrow:"↤",mapstoleft:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",vartriangleleft:"⊲",vltri:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",ltrie:"⊴",trianglelefteq:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",uharl:"↿",upharpoonleft:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",leftharpoonup:"↼",lharu:"↼",LeftVectorBar:"⥒",LessEqualGreater:"⋚",leg:"⋚",lesseqgtr:"⋚",LessFullEqual:"≦",lE:"≦",leqq:"≦",LessGreater:"≶",lessgtr:"≶",lg:"≶",LessLess:"⪡",LessSlantEqual:"⩽",leqslant:"⩽",les:"⩽",LessTilde:"≲",lesssim:"≲",lsim:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",lAarr:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",longleftarrow:"⟵",xlarr:"⟵",LongLeftRightArrow:"⟷",longleftrightarrow:"⟷",xharr:"⟷",LongRightArrow:"⟶",longrightarrow:"⟶",xrarr:"⟶",Lopf:"𝕃",LowerLeftArrow:"↙",swarr:"↙",swarrow:"↙",LowerRightArrow:"↘",searr:"↘",searrow:"↘",Lsh:"↰",lsh:"↰",Lstrok:"Ł",Lt:"≪",NestedLessLess:"≪",ll:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mscr:"ℳ",phmmat:"ℳ",Mfr:"𝔐",MinusPlus:"∓",mnplus:"∓",mp:"∓",Mopf:"𝕄",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",ZeroWidthSpace:"",NewLine:`
|
|
18
|
-
`,Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",nbsp:" ",Nopf:"ℕ",naturals:"ℕ",Not:"⫬",NotCongruent:"≢",nequiv:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",npar:"∦",nparallel:"∦",nshortparallel:"∦",nspar:"∦",NotElement:"∉",notin:"∉",notinva:"∉",NotEqual:"≠",ne:"≠",NotEqualTilde:"≂̸",nesim:"≂̸",NotExists:"∄",nexist:"∄",nexists:"∄",NotGreater:"≯",ngt:"≯",ngtr:"≯",NotGreaterEqual:"≱",nge:"≱",ngeq:"≱",NotGreaterFullEqual:"≧̸",ngE:"≧̸",ngeqq:"≧̸",NotGreaterGreater:"≫̸",nGtv:"≫̸",NotGreaterLess:"≹",ntgl:"≹",NotGreaterSlantEqual:"⩾̸",ngeqslant:"⩾̸",nges:"⩾̸",NotGreaterTilde:"≵",ngsim:"≵",NotHumpDownHump:"≎̸",nbump:"≎̸",NotHumpEqual:"≏̸",nbumpe:"≏̸",NotLeftTriangle:"⋪",nltri:"⋪",ntriangleleft:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",nltrie:"⋬",ntrianglelefteq:"⋬",NotLess:"≮",nless:"≮",nlt:"≮",NotLessEqual:"≰",nle:"≰",nleq:"≰",NotLessGreater:"≸",ntlg:"≸",NotLessLess:"≪̸",nLtv:"≪̸",NotLessSlantEqual:"⩽̸",nleqslant:"⩽̸",nles:"⩽̸",NotLessTilde:"≴",nlsim:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",npr:"⊀",nprec:"⊀",NotPrecedesEqual:"⪯̸",npre:"⪯̸",npreceq:"⪯̸",NotPrecedesSlantEqual:"⋠",nprcue:"⋠",NotReverseElement:"∌",notni:"∌",notniva:"∌",NotRightTriangle:"⋫",nrtri:"⋫",ntriangleright:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",nrtrie:"⋭",ntrianglerighteq:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",nsqsube:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",nsqsupe:"⋣",NotSubset:"⊂⃒",nsubset:"⊂⃒",vnsub:"⊂⃒",NotSubsetEqual:"⊈",nsube:"⊈",nsubseteq:"⊈",NotSucceeds:"⊁",nsc:"⊁",nsucc:"⊁",NotSucceedsEqual:"⪰̸",nsce:"⪰̸",nsucceq:"⪰̸",NotSucceedsSlantEqual:"⋡",nsccue:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",nsupset:"⊃⃒",vnsup:"⊃⃒",NotSupersetEqual:"⊉",nsupe:"⊉",nsupseteq:"⊉",NotTilde:"≁",nsim:"≁",NotTildeEqual:"≄",nsime:"≄",nsimeq:"≄",NotTildeFullEqual:"≇",ncong:"≇",NotTildeTilde:"≉",nap:"≉",napprox:"≉",NotVerticalBar:"∤",nmid:"∤",nshortmid:"∤",nsmid:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",ohm:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",ldquo:"“",OpenCurlyQuote:"‘",lsquo:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",oline:"‾",OverBrace:"⏞",OverBracket:"⎴",tbrk:"⎴",OverParenthesis:"⏜",PartialD:"∂",part:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",plusmn:"±",pm:"±",Popf:"ℙ",primes:"ℙ",Pr:"⪻",Precedes:"≺",pr:"≺",prec:"≺",PrecedesEqual:"⪯",pre:"⪯",preceq:"⪯",PrecedesSlantEqual:"≼",prcue:"≼",preccurlyeq:"≼",PrecedesTilde:"≾",precsim:"≾",prsim:"≾",Prime:"″",Product:"∏",prod:"∏",Proportional:"∝",prop:"∝",propto:"∝",varpropto:"∝",vprop:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',quot:'"',Qfr:"𝔔",Qopf:"ℚ",rationals:"ℚ",Qscr:"𝒬",RBarr:"⤐",drbkarow:"⤐",REG:"®",circledR:"®",reg:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",twoheadrightarrow:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",Rfr:"ℜ",real:"ℜ",realpart:"ℜ",ReverseElement:"∋",SuchThat:"∋",ni:"∋",niv:"∋",ReverseEquilibrium:"⇋",leftrightharpoons:"⇋",lrhar:"⇋",ReverseUpEquilibrium:"⥯",duhar:"⥯",Rho:"Ρ",RightAngleBracket:"⟩",rang:"⟩",rangle:"⟩",RightArrow:"→",ShortRightArrow:"→",rarr:"→",rightarrow:"→",srarr:"→",RightArrowBar:"⇥",rarrb:"⇥",RightArrowLeftArrow:"⇄",rightleftarrows:"⇄",rlarr:"⇄",RightCeiling:"⌉",rceil:"⌉",RightDoubleBracket:"⟧",robrk:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",dharr:"⇂",downharpoonright:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rfloor:"⌋",RightTee:"⊢",vdash:"⊢",RightTeeArrow:"↦",map:"↦",mapsto:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",vartriangleright:"⊳",vrtri:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",rtrie:"⊵",trianglerighteq:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",uharr:"↾",upharpoonright:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",rharu:"⇀",rightharpoonup:"⇀",RightVectorBar:"⥓",Ropf:"ℝ",reals:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",rAarr:"⇛",Rscr:"ℛ",realine:"ℛ",Rsh:"↱",rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortUpArrow:"↑",UpArrow:"↑",uarr:"↑",uparrow:"↑",Sigma:"Σ",SmallCircle:"∘",compfn:"∘",Sopf:"𝕊",Sqrt:"√",radic:"√",Square:"□",squ:"□",square:"□",SquareIntersection:"⊓",sqcap:"⊓",SquareSubset:"⊏",sqsub:"⊏",sqsubset:"⊏",SquareSubsetEqual:"⊑",sqsube:"⊑",sqsubseteq:"⊑",SquareSuperset:"⊐",sqsup:"⊐",sqsupset:"⊐",SquareSupersetEqual:"⊒",sqsupe:"⊒",sqsupseteq:"⊒",SquareUnion:"⊔",sqcup:"⊔",Sscr:"𝒮",Star:"⋆",sstarf:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",sube:"⊆",subseteq:"⊆",Succeeds:"≻",sc:"≻",succ:"≻",SucceedsEqual:"⪰",sce:"⪰",succeq:"⪰",SucceedsSlantEqual:"≽",sccue:"≽",succcurlyeq:"≽",SucceedsTilde:"≿",scsim:"≿",succsim:"≿",Sum:"∑",sum:"∑",Sup:"⋑",Supset:"⋑",Superset:"⊃",sup:"⊃",supset:"⊃",SupersetEqual:"⊇",supe:"⊇",supseteq:"⊇",THORN:"Þ",TRADE:"™",trade:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",there4:"∴",therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",thinsp:" ",Tilde:"∼",sim:"∼",thicksim:"∼",thksim:"∼",TildeEqual:"≃",sime:"≃",simeq:"≃",TildeFullEqual:"≅",cong:"≅",TildeTilde:"≈",ap:"≈",approx:"≈",asymp:"≈",thickapprox:"≈",thkap:"≈",Topf:"𝕋",TripleDot:"⃛",tdot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",lowbar:"_",UnderBrace:"⏟",UnderBracket:"⎵",bbrk:"⎵",UnderParenthesis:"⏝",Union:"⋃",bigcup:"⋃",xcup:"⋃",UnionPlus:"⊎",uplus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",udarr:"⇅",UpDownArrow:"↕",updownarrow:"↕",varr:"↕",UpEquilibrium:"⥮",udhar:"⥮",UpTee:"⊥",bot:"⊥",bottom:"⊥",perp:"⊥",UpTeeArrow:"↥",mapstoup:"↥",UpperLeftArrow:"↖",nwarr:"↖",nwarrow:"↖",UpperRightArrow:"↗",nearr:"↗",nearrow:"↗",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",bigvee:"⋁",xvee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",mid:"∣",shortmid:"∣",smid:"∣",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"❘",VerticalTilde:"≀",wr:"≀",wreath:"≀",VeryThinSpace:" ",hairsp:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",bigwedge:"⋀",xwedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",Zeta:"Ζ",Zfr:"ℨ",zeetrf:"ℨ",Zopf:"ℤ",integers:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",mstpos:"∾",acE:"∾̳",acd:"∿",acirc:"â",acy:"а",aelig:"æ",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",and:"∧",wedge:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",angle:"∠",ange:"⦤",angmsd:"∡",measuredangle:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angzarr:"⍼",aogon:"ą",aopf:"𝕒",apE:"⩰",apacir:"⩯",ape:"≊",approxeq:"≊",apid:"≋",apos:"'",aring:"å",ascr:"𝒶",ast:"*",midast:"*",atilde:"ã",auml:"ä",awint:"⨑",bNot:"⫭",backcong:"≌",bcong:"≌",backepsilon:"϶",bepsi:"϶",backprime:"‵",bprime:"‵",backsim:"∽",bsim:"∽",backsimeq:"⋍",bsime:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrktbrk:"⎶",bcy:"б",bdquo:"„",ldquor:"„",bemptyv:"⦰",beta:"β",beth:"ℶ",between:"≬",twixt:"≬",bfr:"𝔟",bigcirc:"◯",xcirc:"◯",bigodot:"⨀",xodot:"⨀",bigoplus:"⨁",xoplus:"⨁",bigotimes:"⨂",xotime:"⨂",bigsqcup:"⨆",xsqcup:"⨆",bigstar:"★",starf:"★",bigtriangledown:"▽",xdtri:"▽",bigtriangleup:"△",xutri:"△",biguplus:"⨄",xuplus:"⨄",bkarow:"⤍",rbarr:"⤍",blacklozenge:"⧫",lozf:"⧫",blacktriangle:"▴",utrif:"▴",blacktriangledown:"▾",dtrif:"▾",blacktriangleleft:"◂",ltrif:"◂",blacktriangleright:"▸",rtrif:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",minusb:"⊟",boxplus:"⊞",plusb:"⊞",boxtimes:"⊠",timesb:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bumpE:"⪮",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cemptyv:"⦲",cent:"¢",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",cire:"≗",circlearrowleft:"↺",olarr:"↺",circlearrowright:"↻",orarr:"↻",circledS:"Ⓢ",oS:"Ⓢ",circledast:"⊛",oast:"⊛",circledcirc:"⊚",ocir:"⊚",circleddash:"⊝",odash:"⊝",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",comma:",",commat:"@",comp:"∁",complement:"∁",congdot:"⩭",copf:"𝕔",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",curlyeqprec:"⋞",cuesc:"⋟",curlyeqsucc:"⋟",cularr:"↶",curvearrowleft:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curvearrowright:"↷",curarrm:"⤼",curlyvee:"⋎",cuvee:"⋎",curlywedge:"⋏",cuwed:"⋏",curren:"¤",cwint:"∱",cylcty:"⌭",dHar:"⥥",dagger:"†",daleth:"ℸ",dash:"‐",hyphen:"‐",dbkarow:"⤏",rBarr:"⤏",dcaron:"ď",dcy:"д",ddarr:"⇊",downdownarrows:"⇊",ddotseq:"⩷",eDDot:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",diamondsuit:"♦",diams:"♦",digamma:"ϝ",gammad:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",llcorner:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",doteqdot:"≑",eDot:"≑",dotminus:"∸",minusd:"∸",dotplus:"∔",plusdo:"∔",dotsquare:"⊡",sdotb:"⊡",drcorn:"⌟",lrcorner:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",triangledown:"▿",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",eqcirc:"≖",ecirc:"ê",ecolon:"≕",eqcolon:"≕",ecy:"э",edot:"ė",efDot:"≒",fallingdotseq:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",eqslantgtr:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",eqslantless:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",varnothing:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",straightepsilon:"ϵ",varepsilon:"ϵ",equals:"=",equest:"≟",questeq:"≟",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",risingdotseq:"≓",erarr:"⥱",escr:"ℯ",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",fork:"⋔",pitchfork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",half:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",sfrown:"⌢",fscr:"𝒻",gEl:"⪌",gtreqqless:"⪌",gacute:"ǵ",gamma:"γ",gap:"⪆",gtrapprox:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gimel:"ℷ",gjcy:"ѓ",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gneqq:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gnsim:"⋧",gopf:"𝕘",gscr:"ℊ",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtrdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrarr:"⥸",gvertneqq:"≩︀",gvnE:"≩︀",hardcy:"ъ",harrcir:"⥈",harrw:"↭",leftrightsquigarrow:"↭",hbar:"ℏ",hslash:"ℏ",planck:"ℏ",plankv:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",mldr:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",searhk:"⤥",hkswarow:"⤦",swarhk:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",larrhk:"↩",hookrightarrow:"↪",rarrhk:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hstrok:"ħ",hybull:"⁃",iacute:"í",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",ifr:"𝔦",igrave:"ì",iiiint:"⨌",qint:"⨌",iiint:"∭",tint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",imath:"ı",inodot:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",intcal:"⊺",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iquest:"¿",iscr:"𝒾",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",varkappa:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAtail:"⤛",lBarr:"⤎",lEg:"⪋",lesseqqgtr:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lambda:"λ",langd:"⦑",lap:"⪅",lessapprox:"⪅",laquo:"«",larrbfs:"⤟",larrfs:"⤝",larrlp:"↫",looparrowleft:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",leftarrowtail:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lcy:"л",ldca:"⤶",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leq:"≤",leftleftarrows:"⇇",llarr:"⇇",leftthreetimes:"⋋",lthree:"⋋",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessdot:"⋖",ltdot:"⋖",lfisht:"⥼",lfr:"𝔩",lgE:"⪑",lharul:"⥪",lhblk:"▄",ljcy:"љ",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lneqq:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lnsim:"⋦",loang:"⟬",loarr:"⇽",longmapsto:"⟼",xmap:"⟼",looparrowright:"↬",rarrlp:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",loz:"◊",lozenge:"◊",lpar:"(",lparlt:"⦓",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsime:"⪍",lsimg:"⪏",lsquor:"‚",sbquo:"‚",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",triangleleft:"◃",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",strns:"¯",male:"♂",malt:"✠",maltese:"✠",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",mfr:"𝔪",mho:"℧",micro:"µ",midcir:"⫰",minus:"−",minusdu:"⨪",mlcp:"⫛",models:"⊧",mopf:"𝕞",mscr:"𝓂",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nLeftarrow:"⇍",nlArr:"⇍",nLeftrightarrow:"⇎",nhArr:"⇎",nLl:"⋘̸",nLt:"≪⃒",nRightarrow:"⇏",nrArr:"⇏",nVDash:"⊯",nVdash:"⊮",nacute:"ń",nang:"∠⃒",napE:"⩰̸",napid:"≋̸",napos:"ʼn",natur:"♮",natural:"♮",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",neArr:"⇗",nearhk:"⤤",nedot:"≐̸",nesear:"⤨",toea:"⤨",nfr:"𝔫",nharr:"↮",nleftrightarrow:"↮",nhpar:"⫲",nis:"⋼",nisd:"⋺",njcy:"њ",nlE:"≦̸",nleqq:"≦̸",nlarr:"↚",nleftarrow:"↚",nldr:"‥",nopf:"𝕟",not:"¬",notinE:"⋹̸",notindot:"⋵̸",notinvb:"⋷",notinvc:"⋶",notnivb:"⋾",notnivc:"⋽",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",nrarr:"↛",nrightarrow:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nscr:"𝓃",nsub:"⊄",nsubE:"⫅̸",nsubseteqq:"⫅̸",nsup:"⊅",nsupE:"⫆̸",nsupseteqq:"⫆̸",ntilde:"ñ",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwnear:"⤧",oacute:"ó",ocirc:"ô",ocy:"о",odblac:"ő",odiv:"⨸",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",olcir:"⦾",olcross:"⦻",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",oopf:"𝕠",opar:"⦷",operp:"⦹",or:"∨",vee:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",oscr:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oslash:"ø",osol:"⊘",otilde:"õ",otimesas:"⨶",ouml:"ö",ovbar:"⌽",para:"¶",parsim:"⫳",parsl:"⫽",pcy:"п",percnt:"%",period:".",permil:"‰",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",straightphi:"ϕ",varphi:"ϕ",phone:"☎",pi:"π",piv:"ϖ",varpi:"ϖ",planckh:"ℎ",plus:"+",plusacir:"⨣",pluscir:"⨢",plusdu:"⨥",pluse:"⩲",plussim:"⨦",plustwo:"⨧",pointint:"⨕",popf:"𝕡",pound:"£",prE:"⪳",prap:"⪷",precapprox:"⪷",precnapprox:"⪹",prnap:"⪹",precneqq:"⪵",prnE:"⪵",precnsim:"⋨",prnsim:"⋨",prime:"′",profalar:"⌮",profline:"⌒",profsurf:"⌓",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quatint:"⨖",quest:"?",rAtail:"⤜",rHar:"⥤",race:"∽̱",racute:"ŕ",raemptyv:"⦳",rangd:"⦒",range:"⦥",raquo:"»",rarrap:"⥵",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rightarrowtail:"↣",rarrw:"↝",rightsquigarrow:"↝",ratail:"⤚",ratio:"∶",rbbrk:"❳",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdsh:"↳",rect:"▭",rfisht:"⥽",rfr:"𝔯",rharul:"⥬",rho:"ρ",rhov:"ϱ",varrho:"ϱ",rightrightarrows:"⇉",rrarr:"⇉",rightthreetimes:"⋌",rthree:"⋌",ring:"˚",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rsaquo:"›",rscr:"𝓇",rtimes:"⋊",rtri:"▹",triangleright:"▹",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",scE:"⪴",scap:"⪸",succapprox:"⪸",scaron:"š",scedil:"ş",scirc:"ŝ",scnE:"⪶",succneqq:"⪶",scnap:"⪺",succnapprox:"⪺",scnsim:"⋩",succnsim:"⋩",scpolint:"⨓",scy:"с",sdot:"⋅",sdote:"⩦",seArr:"⇘",sect:"§",semi:";",seswar:"⤩",tosa:"⤩",sext:"✶",sfr:"𝔰",sharp:"♯",shchcy:"щ",shcy:"ш",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",varsigma:"ς",simdot:"⩪",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",smashp:"⨳",smeparsl:"⧤",smile:"⌣",ssmile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",sqcaps:"⊓︀",sqcups:"⊔︀",sscr:"𝓈",star:"☆",sub:"⊂",subset:"⊂",subE:"⫅",subseteqq:"⫅",subdot:"⪽",subedot:"⫃",submult:"⫁",subnE:"⫋",subsetneqq:"⫋",subne:"⊊",subsetneq:"⊊",subplus:"⪿",subrarr:"⥹",subsim:"⫇",subsub:"⫕",subsup:"⫓",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supseteqq:"⫆",supdot:"⪾",supdsub:"⫘",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supsetneqq:"⫌",supne:"⊋",supsetneq:"⊋",supplus:"⫀",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tcaron:"ť",tcedil:"ţ",tcy:"т",telrec:"⌕",tfr:"𝔱",theta:"θ",thetasym:"ϑ",thetav:"ϑ",vartheta:"ϑ",thorn:"þ",times:"×",timesbar:"⨱",timesd:"⨰",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tprime:"‴",triangle:"▵",utri:"▵",triangleq:"≜",trie:"≜",tridot:"◬",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",uHar:"⥣",uacute:"ú",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udblac:"ű",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uogon:"ų",uopf:"𝕦",upsi:"υ",upsilon:"υ",upuparrows:"⇈",uuarr:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",uuml:"ü",uwangle:"⦧",vBar:"⫨",vBarv:"⫩",vangrt:"⦜",varsubsetneq:"⊊︀",vsubne:"⊊︀",varsubsetneqq:"⫋︀",vsubnE:"⫋︀",varsupsetneq:"⊋︀",vsupne:"⊋︀",varsupsetneqq:"⫌︀",vsupnE:"⫌︀",vcy:"в",veebar:"⊻",veeeq:"≚",vellip:"⋮",vfr:"𝔳",vopf:"𝕧",vscr:"𝓋",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedgeq:"≙",weierp:"℘",wp:"℘",wfr:"𝔴",wopf:"𝕨",wscr:"𝓌",xfr:"𝔵",xi:"ξ",xnis:"⋻",xopf:"𝕩",xscr:"𝓍",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},_c="";br.ngsp=_c;var Bc=[/@/,/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function Tc(t,n){if(n!=null&&!(Array.isArray(n)&&n.length==2))throw new Error(`Expected '${t}' to be an array, [start, end].`);if(n!=null){let i=n[0],c=n[1];Bc.forEach(h=>{if(h.test(i)||h.test(c))throw new Error(`['${i}', '${c}'] contains unusable interpolation symbol.`)})}}var Lc=class vo{static fromArray(n){return n?(Tc("interpolation",n),new vo(n[0],n[1])):ls}constructor(n,i){this.start=n,this.end=i}},ls=new Lc("{{","}}"),Qr=class extends Ua{constructor(t,n,i){super(i,t),this.tokenType=n}},Pc=class{constructor(t,n,i){this.tokens=t,this.errors=n,this.nonNormalizedIcuExpressions=i}};function Ic(t,n,i,c={}){let h=new Rc(new qa(t,n),i,c);return h.tokenize(),new Pc(Wc(h.tokens),h.errors,h.nonNormalizedIcuExpressions)}var Oc=/\r\n?/g;function gt(t){return`Unexpected character "${t===0?"EOF":String.fromCharCode(t)}"`}function us(t){return`Unknown entity "${t}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}function Mc(t,n){return`Unable to parse entity "${n}" - ${t} character reference entities must end with ";"`}var xr;(function(t){t.HEX="hexadecimal",t.DEC="decimal"})(xr||(xr={}));var en=class{constructor(t){this.error=t}},Rc=class{constructor(t,n,i){this._getTagContentType=n,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=i.tokenizeExpansionForms||!1,this._interpolationConfig=i.interpolationConfig||ls,this._leadingTriviaCodePoints=i.leadingTriviaChars&&i.leadingTriviaChars.map(h=>h.codePointAt(0)||0),this._canSelfClose=i.canSelfClose||!1,this._allowHtmComponentClosingTags=i.allowHtmComponentClosingTags||!1;let c=i.range||{endPos:t.content.length,startPos:0,startLine:0,startCol:0};this._cursor=i.escapedString?new Vc(t,c):new ms(t,c),this._preserveLineEndings=i.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=i.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=i.tokenizeBlocks??!0,this._tokenizeLet=i.tokenizeLet??!0;try{this._cursor.init()}catch(h){this.handleError(h)}}_processCarriageReturns(t){return this._preserveLineEndings?t:t.replace(Oc,`
|
|
19
|
-
`)}tokenize(){for(;this._cursor.peek()!==0;){let t=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(t):this._attemptStr("--")?this._consumeComment(t):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(t):this._consumeBogusComment(t);else if(this._attemptCharCode(47))this._consumeTagClose(t);else{let n=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=n,this._consumeBogusComment(t)):this._consumeTagOpen(t)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._attemptStr("@let")?this._consumeLetDeclaration(t):this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(t):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(t):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(n){this.handleError(n)}}this._beginToken(34),this._endToken([])}_getBlockName(){let t=!1,n=this._cursor.clone();return this._attemptCharCodeUntilFn(i=>ur(i)?!t:ps(i)?(t=!0,!1):!0),this._cursor.getChars(n).trim()}_consumeBlockStart(t){this._beginToken(25,t);let n=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(Z),this._attemptCharCode(41))this._attemptCharCodeUntilFn(Z);else{n.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):n.type=29}_consumeBlockEnd(t){this._beginToken(27,t),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(hs);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let t=this._cursor.clone(),n=null,i=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||n!==null;){let c=this._cursor.peek();if(c===92)this._cursor.advance();else if(c===n)n=null;else if(n===null&&Yr(c))n=c;else if(c===40&&n===null)i++;else if(c===41&&n===null){if(i===0)break;i>0&&i--}this._cursor.advance()}this._endToken([this._cursor.getChars(t)]),this._attemptCharCodeUntilFn(hs)}}_consumeLetDeclaration(t){if(this._beginToken(30,t),ur(this._cursor.peek()))this._attemptCharCodeUntilFn(Z);else{let i=this._endToken([this._cursor.getChars(t)]);i.type=33;return}let n=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(Z),!this._attemptCharCode(61)){n.type=33;return}this._attemptCharCodeUntilFn(i=>Z(i)&&!Kr(i)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(32),this._endToken([]),this._cursor.advance()):(n.type=33,n.sourceSpan=this._cursor.getSpan(t))}_getLetDeclarationName(){let t=this._cursor.clone(),n=!1;return this._attemptCharCodeUntilFn(i=>cr(i)||i===36||i===95||n&&Gr(i)?(n=!0,!1):!0),this._cursor.getChars(t).trim()}_consumeLetDeclarationValue(){let t=this._cursor.clone();for(this._beginToken(31,t);this._cursor.peek()!==0;){let n=this._cursor.peek();if(n===59)break;Yr(n)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(i=>i===92?(this._cursor.advance(),!1):i===n)),this._cursor.advance()}this._endToken([this._cursor.getChars(t)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(qc(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(t,n=this._cursor.clone()){this._currentTokenStart=n,this._currentTokenType=t}_endToken(t,n){if(this._currentTokenStart===null)throw new Qr("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(n));if(this._currentTokenType===null)throw new Qr("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let i={type:this._currentTokenType,parts:t,sourceSpan:(n??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(i),this._currentTokenStart=null,this._currentTokenType=null,i}_createError(t,n){this._isInExpansionForm()&&(t+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let i=new Qr(t,this._currentTokenType,n);return this._currentTokenStart=null,this._currentTokenType=null,new en(i)}handleError(t){if(t instanceof tn&&(t=this._createError(t.msg,this._cursor.getSpan(t.cursor))),t instanceof en)this.errors.push(t.error);else throw t}_attemptCharCode(t){return this._cursor.peek()===t?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(t){return Uc(this._cursor.peek(),t)?(this._cursor.advance(),!0):!1}_requireCharCode(t){let n=this._cursor.clone();if(!this._attemptCharCode(t))throw this._createError(gt(this._cursor.peek()),this._cursor.getSpan(n))}_attemptStr(t){let n=t.length;if(this._cursor.charsLeft()<n)return!1;let i=this._cursor.clone();for(let c=0;c<n;c++)if(!this._attemptCharCode(t.charCodeAt(c)))return this._cursor=i,!1;return!0}_attemptStrCaseInsensitive(t){for(let n=0;n<t.length;n++)if(!this._attemptCharCodeCaseInsensitive(t.charCodeAt(n)))return!1;return!0}_requireStr(t){let n=this._cursor.clone();if(!this._attemptStr(t))throw this._createError(gt(this._cursor.peek()),this._cursor.getSpan(n))}_requireStrCaseInsensitive(t){let n=this._cursor.clone();if(!this._attemptStrCaseInsensitive(t))throw this._createError(gt(this._cursor.peek()),this._cursor.getSpan(n))}_attemptCharCodeUntilFn(t){for(;!t(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(t,n){let i=this._cursor.clone();if(this._attemptCharCodeUntilFn(t),this._cursor.diff(i)<n)throw this._createError(gt(this._cursor.peek()),this._cursor.getSpan(i))}_attemptUntilChar(t){for(;this._cursor.peek()!==t;)this._cursor.advance()}_readChar(){let t=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),t}_consumeEntity(t){this._beginToken(9);let n=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(35)){let i=this._attemptCharCode(120)||this._attemptCharCode(88),c=this._cursor.clone();if(this._attemptCharCodeUntilFn($c),this._cursor.peek()!=59){this._cursor.advance();let b=i?xr.HEX:xr.DEC;throw this._createError(Mc(b,this._cursor.getChars(n)),this._cursor.getSpan())}let h=this._cursor.getChars(c);this._cursor.advance();try{let b=parseInt(h,i?16:10);this._endToken([String.fromCharCode(b),this._cursor.getChars(n)])}catch{throw this._createError(us(this._cursor.getChars(n)),this._cursor.getSpan())}}else{let i=this._cursor.clone();if(this._attemptCharCodeUntilFn(Hc),this._cursor.peek()!=59)this._beginToken(t,n),this._cursor=i,this._endToken(["&"]);else{let c=this._cursor.getChars(i);this._cursor.advance();let h=br[c];if(!h)throw this._createError(us(c),this._cursor.getSpan(n));this._endToken([h,`&${c};`])}}}_consumeRawText(t,n){this._beginToken(t?6:7);let i=[];for(;;){let c=this._cursor.clone(),h=n();if(this._cursor=c,h)break;t&&this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(6),this._beginToken(6)):i.push(this._readChar())}this._endToken([this._processCarriageReturns(i.join(""))])}_consumeComment(t){this._beginToken(10,t),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(t){this._beginToken(10,t),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(11),this._cursor.advance(),this._endToken([])}_consumeCdata(t){this._beginToken(12,t),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(t){this._beginToken(18,t),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(19),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){let t=this._cursor.clone(),n="";for(;this._cursor.peek()!==58&&!zc(this._cursor.peek());)this._cursor.advance();let i;this._cursor.peek()===58?(n=this._cursor.getChars(t),this._cursor.advance(),i=this._cursor.clone()):i=t,this._requireCharCodeUntilFn(cs,n===""?0:1);let c=this._cursor.getChars(i);return[n,c]}_consumeTagOpen(t){let n,i,c,h=[];try{if(!cr(this._cursor.peek()))throw this._createError(gt(this._cursor.peek()),this._cursor.getSpan(t));for(c=this._consumeTagOpenStart(t),i=c.parts[0],n=c.parts[1],this._attemptCharCodeUntilFn(Z);this._cursor.peek()!==47&&this._cursor.peek()!==62&&this._cursor.peek()!==60&&this._cursor.peek()!==0;){let[F,A]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(Z),this._attemptCharCode(61)){this._attemptCharCodeUntilFn(Z);let B=this._consumeAttributeValue();h.push({prefix:F,name:A,value:B})}else h.push({prefix:F,name:A});this._attemptCharCodeUntilFn(Z)}this._consumeTagOpenEnd()}catch(F){if(F instanceof en){c?c.type=4:(this._beginToken(5,t),this._endToken(["<"]));return}throw F}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===2)return;let b=this._getTagContentType(n,i,this._fullNameStack.length>0,h);this._handleFullNameStackForTagOpen(i,n),b===ve.RAW_TEXT?this._consumeRawTextWithTagClose(i,n,!1):b===ve.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(i,n,!0)}_consumeRawTextWithTagClose(t,n,i){this._consumeRawText(i,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(Z),!this._attemptStrCaseInsensitive(t?`${t}:${n}`:n))?!1:(this._attemptCharCodeUntilFn(Z),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(c=>c===62,3),this._cursor.advance(),this._endToken([t,n]),this._handleFullNameStackForTagClose(t,n)}_consumeTagOpenStart(t){this._beginToken(0,t);let n=this._consumePrefixAndName();return this._endToken(n)}_consumeAttributeName(){let t=this._cursor.peek();if(t===39||t===34)throw this._createError(gt(t),this._cursor.getSpan());this._beginToken(14);let n=this._consumePrefixAndName();return this._endToken(n),n}_consumeAttributeValue(){let t;if(this._cursor.peek()===39||this._cursor.peek()===34){let n=this._cursor.peek();this._consumeQuote(n);let i=()=>this._cursor.peek()===n;t=this._consumeWithInterpolation(16,17,i,i),this._consumeQuote(n)}else{let n=()=>cs(this._cursor.peek());t=this._consumeWithInterpolation(16,17,n,n)}return t}_consumeQuote(t){this._beginToken(15),this._requireCharCode(t),this._endToken([String.fromCodePoint(t)])}_consumeTagOpenEnd(){let t=this._attemptCharCode(47)?2:1;this._beginToken(t),this._requireCharCode(62),this._endToken([])}_consumeTagClose(t){if(this._beginToken(3,t),this._attemptCharCodeUntilFn(Z),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(Z),this._requireCharCode(62),this._endToken([]);else{let[n,i]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(Z),this._requireCharCode(62),this._endToken([n,i]),this._handleFullNameStackForTagClose(n,i)}}_consumeExpansionFormStart(){this._beginToken(20),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(20),this._beginToken(7);let t=this._readUntil(44),n=this._processCarriageReturns(t);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([n]);else{let c=this._endToken([t]);n!==t&&this.nonNormalizedIcuExpressions.push(c)}this._requireCharCode(44),this._attemptCharCodeUntilFn(Z),this._beginToken(7);let i=this._readUntil(44);this._endToken([i]),this._requireCharCode(44),this._attemptCharCodeUntilFn(Z)}_consumeExpansionCaseStart(){this._beginToken(21);let t=this._readUntil(123).trim();this._endToken([t]),this._attemptCharCodeUntilFn(Z),this._beginToken(22),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(Z),this._expansionCaseStack.push(22)}_consumeExpansionCaseEnd(){this._beginToken(23),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(Z),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(24),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(t,n,i,c){this._beginToken(t);let h=[];for(;!i();){let F=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(h.join(""))],F),h.length=0,this._consumeInterpolation(n,F,c),this._beginToken(t)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(h.join(""))]),h.length=0,this._consumeEntity(t),this._beginToken(t)):h.push(this._readChar())}this._inInterpolation=!1;let b=this._processCarriageReturns(h.join(""));return this._endToken([b]),b}_consumeInterpolation(t,n,i){let c=[];this._beginToken(t,n),c.push(this._interpolationConfig.start);let h=this._cursor.clone(),b=null,F=!1;for(;this._cursor.peek()!==0&&(i===null||!i());){let A=this._cursor.clone();if(this._isTagStart()){this._cursor=A,c.push(this._getProcessedChars(h,A)),this._endToken(c);return}if(b===null)if(this._attemptStr(this._interpolationConfig.end)){c.push(this._getProcessedChars(h,A)),c.push(this._interpolationConfig.end),this._endToken(c);return}else this._attemptStr("//")&&(F=!0);let B=this._cursor.peek();this._cursor.advance(),B===92?this._cursor.advance():B===b?b=null:!F&&b===null&&Yr(B)&&(b=B)}c.push(this._getProcessedChars(h,this._cursor)),this._endToken(c)}_getProcessedChars(t,n){return this._processCarriageReturns(n.getChars(t))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._cursor.peek()===64||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let t=this._cursor.clone();t.advance();let n=t.peek();if(97<=n&&n<=122||65<=n&&n<=90||n===47||n===33)return!0}return!1}_isBlockStart(){if(this._tokenizeBlocks&&this._cursor.peek()===64){let t=this._cursor.clone();if(t.advance(),ps(t.peek()))return!0}return!1}_readUntil(t){let n=this._cursor.clone();return this._attemptUntilChar(t),this._cursor.getChars(n)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===22}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===20}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;if(this._interpolationConfig){let t=this._cursor.clone(),n=this._attemptStr(this._interpolationConfig.start);return this._cursor=t,!n}return!0}_handleFullNameStackForTagOpen(t,n){let i=mr(t,n);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===i)&&this._fullNameStack.push(i)}_handleFullNameStackForTagClose(t,n){let i=mr(t,n);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===i&&this._fullNameStack.pop()}};function Z(t){return!ur(t)||t===0}function cs(t){return ur(t)||t===62||t===60||t===47||t===39||t===34||t===61||t===0}function zc(t){return(t<97||122<t)&&(t<65||90<t)&&(t<48||t>57)}function $c(t){return t===59||t===0||!Wu(t)}function Hc(t){return t===59||t===0||!cr(t)}function qc(t){return t!==125}function Uc(t,n){return ds(t)===ds(n)}function ds(t){return t>=97&&t<=122?t-97+65:t}function ps(t){return cr(t)||Gr(t)||t===95}function hs(t){return t!==59&&Z(t)}function Wc(t){let n=[],i;for(let c=0;c<t.length;c++){let h=t[c];i&&i.type===5&&h.type===5||i&&i.type===16&&h.type===16?(i.parts[0]+=h.parts[0],i.sourceSpan.end=h.sourceSpan.end):(i=h,n.push(i))}return n}var ms=class Dn{constructor(n,i){if(n instanceof Dn){this.file=n.file,this.input=n.input,this.end=n.end;let c=n.state;this.state={peek:c.peek,offset:c.offset,line:c.line,column:c.column}}else{if(!i)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=n,this.input=n.content,this.end=i.endPos,this.state={peek:-1,offset:i.startPos,line:i.startLine,column:i.startCol}}}clone(){return new Dn(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(n){return this.state.offset-n.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(n,i){n=n||this;let c=n;if(i)for(;this.diff(n)>0&&i.indexOf(n.peek())!==-1;)c===n&&(n=n.clone()),n.advance();let h=this.locationFromCursor(n),b=this.locationFromCursor(this),F=c!==n?this.locationFromCursor(c):h;return new U(h,b,F)}getChars(n){return this.input.substring(n.state.offset,this.state.offset)}charAt(n){return this.input.charCodeAt(n)}advanceState(n){if(n.offset>=this.end)throw this.state=n,new tn('Unexpected character "EOF"',this);let i=this.charAt(n.offset);i===10?(n.line++,n.column=0):Kr(i)||n.column++,n.offset++,this.updatePeek(n)}updatePeek(n){n.peek=n.offset>=this.end?0:this.charAt(n.offset)}locationFromCursor(n){return new Xr(n.file,n.state.offset,n.state.line,n.state.column)}},Vc=class yn extends ms{constructor(n,i){n instanceof yn?(super(n),this.internalState={...n.internalState}):(super(n,i),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new yn(this)}getChars(n){let i=n.clone(),c="";for(;i.internalState.offset<this.internalState.offset;)c+=String.fromCodePoint(i.peek()),i.advance();return c}processEscapeSequence(){let n=()=>this.internalState.peek;if(n()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),n()===110)this.state.peek=10;else if(n()===114)this.state.peek=13;else if(n()===118)this.state.peek=11;else if(n()===116)this.state.peek=9;else if(n()===98)this.state.peek=8;else if(n()===102)this.state.peek=12;else if(n()===117)if(this.advanceState(this.internalState),n()===123){this.advanceState(this.internalState);let i=this.clone(),c=0;for(;n()!==125;)this.advanceState(this.internalState),c++;this.state.peek=this.decodeHexDigits(i,c)}else{let i=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(i,4)}else if(n()===120){this.advanceState(this.internalState);let i=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(i,2)}else if(Ha(n())){let i="",c=0,h=this.clone();for(;Ha(n())&&c<3;)h=this.clone(),i+=String.fromCodePoint(n()),this.advanceState(this.internalState),c++;this.state.peek=parseInt(i,8),this.internalState=h.internalState}else Kr(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(n,i){let c=this.input.slice(n.internalState.offset,n.internalState.offset+i),h=parseInt(c,16);if(isNaN(h))throw n.state=n.internalState,new tn("Invalid hexadecimal escape sequence",n);return h}},tn=class{constructor(t,n){this.msg=t,this.cursor=n}},ce=class wo extends Ua{static create(n,i,c){return new wo(n,i,c)}constructor(n,i,c){super(i,c),this.elementName=n}},Jc=class{constructor(t,n){this.rootNodes=t,this.errors=n}},Gc=class{constructor(t){this.getTagDefinition=t}parse(t,n,i,c=!1,h){let b=V=>(K,...re)=>V(K.toLowerCase(),...re),F=c?this.getTagDefinition:b(this.getTagDefinition),A=V=>F(V).getContentType(),B=c?h:b(h),z=Ic(t,n,h?(V,K,re,se)=>{let le=B(V,K,re,se);return le!==void 0?le:A(V)}:A,i),I=i&&i.canSelfClose||!1,G=i&&i.allowHtmComponentClosingTags||!1,q=new Kc(z.tokens,F,I,G,c);return q.build(),new Jc(q.rootNodes,z.errors.concat(q.errors))}},Kc=class Co{constructor(n,i,c,h,b){this.tokens=n,this.getTagDefinition=i,this.canSelfClose=c,this.allowHtmComponentClosingTags=h,this.isTagNameCaseSensitive=b,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==34;)this._peek.type===0||this._peek.type===4?this._consumeStartTag(this._advance()):this._peek.type===3?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===20?this._consumeExpansion(this._advance()):this._peek.type===25?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===27?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===30?(this._closeVoidElement(),this._consumeLet(this._advance())):this._peek.type===18?this._consumeDocType(this._advance()):this._peek.type===33?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._advance();for(let n of this._containerStack)n instanceof ft&&this.errors.push(ce.create(n.name,n.sourceSpan,`Unclosed block "${n.name}"`))}_advance(){let n=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],n}_advanceIf(n){return this._peek.type===n?this._advance():null}_consumeCdata(n){let i=this._advance(),c=this._getText(i),h=this._advanceIf(13);this._addToParent(new Fc(c,new U(n.sourceSpan.start,(h||i).sourceSpan.end),[i]))}_consumeComment(n){let i=this._advanceIf(7),c=this._advanceIf(11),h=i!=null?i.parts[0].trim():null,b=c==null?n.sourceSpan:new U(n.sourceSpan.start,c.sourceSpan.end,n.sourceSpan.fullStart);this._addToParent(new Ac(h,b))}_consumeDocType(n){let i=this._advanceIf(7),c=this._advanceIf(19),h=i!=null?i.parts[0].trim():null,b=new U(n.sourceSpan.start,(c||i||n).sourceSpan.end);this._addToParent(new Nc(h,b))}_consumeExpansion(n){let i=this._advance(),c=this._advance(),h=[];for(;this._peek.type===21;){let F=this._parseExpansionCase();if(!F)return;h.push(F)}if(this._peek.type!==24){this.errors.push(ce.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));return}let b=new U(n.sourceSpan.start,this._peek.sourceSpan.end,n.sourceSpan.fullStart);this._addToParent(new Ec(i.parts[0],c.parts[0],h,b,i.sourceSpan)),this._advance()}_parseExpansionCase(){let n=this._advance();if(this._peek.type!==22)return this.errors.push(ce.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;let i=this._advance(),c=this._collectExpansionExpTokens(i);if(!c)return null;let h=this._advance();c.push({type:34,parts:[],sourceSpan:h.sourceSpan});let b=new Co(c,this.getTagDefinition,this.canSelfClose,this.allowHtmComponentClosingTags,this.isTagNameCaseSensitive);if(b.build(),b.errors.length>0)return this.errors=this.errors.concat(b.errors),null;let F=new U(n.sourceSpan.start,h.sourceSpan.end,n.sourceSpan.fullStart),A=new U(i.sourceSpan.start,h.sourceSpan.end,i.sourceSpan.fullStart);return new Sc(n.parts[0],b.rootNodes,F,n.sourceSpan,A)}_collectExpansionExpTokens(n){let i=[],c=[22];for(;;){if((this._peek.type===20||this._peek.type===22)&&c.push(this._peek.type),this._peek.type===23)if(fs(c,22)){if(c.pop(),c.length===0)return i}else return this.errors.push(ce.create(null,n.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===24)if(fs(c,20))c.pop();else return this.errors.push(ce.create(null,n.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===34)return this.errors.push(ce.create(null,n.sourceSpan,"Invalid ICU message. Missing '}'.")),null;i.push(this._advance())}}_getText(n){let i=n.parts[0];if(i.length>0&&i[0]==`
|
|
15
|
+
`&&++A==i)););return{before:c.substring(h,this.offset),after:c.substring(this.offset,b+1)}}return null}},Ha=class{constructor(t,n){this.content=t,this.url=n}},U=class{constructor(t,n,i=t,c=null){this.start=t,this.end=n,this.fullStart=i,this.details=c}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},dr;(function(t){t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR"})(dr||(dr={}));var qa=class{constructor(t,n,i=dr.ERROR,c){this.span=t,this.msg=n,this.level=i,this.relatedError=c}contextualMessage(){let t=this.span.start.getContext(100,3);return t?`${this.msg} ("${t.before}[${dr[this.level]} ->]${t.after}")`:this.msg}toString(){let t=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${t}`}},Ju=[Ku,Yu,Zu,ec,tc,ac,rc,nc,sc,Qu];function Gu(t,n){for(let i of Ju)i(t,n);return t}function Ku(t){t.walk(n=>{if(n.type==="element"&&n.tagDefinition.ignoreFirstLf&&n.children.length>0&&n.children[0].type==="text"&&n.children[0].value[0]===`
|
|
16
|
+
`){let i=n.children[0];i.value.length===1?n.removeChild(i):i.value=i.value.slice(1)}})}function Yu(t){let n=i=>{var c,h;return i.type==="element"&&((c=i.prev)==null?void 0:c.type)==="ieConditionalStartComment"&&i.prev.sourceSpan.end.offset===i.startSourceSpan.start.offset&&((h=i.firstChild)==null?void 0:h.type)==="ieConditionalEndComment"&&i.firstChild.sourceSpan.start.offset===i.startSourceSpan.end.offset};t.walk(i=>{if(i.children)for(let c=0;c<i.children.length;c++){let h=i.children[c];if(!n(h))continue;let b=h.prev,F=h.firstChild;i.removeChild(b),c--;let A=new U(b.sourceSpan.start,F.sourceSpan.end),B=new U(A.start,h.sourceSpan.end);h.condition=b.condition,h.sourceSpan=B,h.startSourceSpan=A,h.removeChild(F)}})}function Xu(t,n,i){t.walk(c=>{if(c.children)for(let h=0;h<c.children.length;h++){let b=c.children[h];if(b.type!=="text"&&!n(b))continue;b.type!=="text"&&(b.type="text",b.value=i(b));let F=b.prev;!F||F.type!=="text"||(F.value+=b.value,F.sourceSpan=new U(F.sourceSpan.start,b.sourceSpan.end),c.removeChild(b),h--)}})}function Zu(t){return Xu(t,n=>n.type==="cdata",n=>`<![CDATA[${n.value}]]>`)}function Qu(t){let n=i=>{var c,h;return i.type==="element"&&i.attrs.length===0&&i.children.length===1&&i.firstChild.type==="text"&&!Ne.hasWhitespaceCharacter(i.children[0].value)&&!i.firstChild.hasLeadingSpaces&&!i.firstChild.hasTrailingSpaces&&i.isLeadingSpaceSensitive&&!i.hasLeadingSpaces&&i.isTrailingSpaceSensitive&&!i.hasTrailingSpaces&&((c=i.prev)==null?void 0:c.type)==="text"&&((h=i.next)==null?void 0:h.type)==="text"};t.walk(i=>{if(i.children)for(let c=0;c<i.children.length;c++){let h=i.children[c];if(!n(h))continue;let b=h.prev,F=h.next;b.value+=`<${h.rawName}>`+h.firstChild.value+`</${h.rawName}>`+F.value,b.sourceSpan=new U(b.sourceSpan.start,F.sourceSpan.end),b.isTrailingSpaceSensitive=F.isTrailingSpaceSensitive,b.hasTrailingSpaces=F.hasTrailingSpaces,i.removeChild(h),c--,i.removeChild(F)}})}function ec(t,n){if(n.parser==="html")return;let i=/\{\{(.+?)\}\}/su;t.walk(c=>{if(hl(c,n))for(let h of c.children){if(h.type!=="text")continue;let b=h.sourceSpan.start,F=null,A=h.value.split(i);for(let B=0;B<A.length;B++,b=F){let z=A[B];if(B%2===0){F=b.moveBy(z.length),z.length>0&&c.insertChildBefore(h,{type:"text",value:z,sourceSpan:new U(b,F)});continue}F=b.moveBy(z.length+4),c.insertChildBefore(h,{type:"interpolation",sourceSpan:new U(b,F),children:z.length===0?[]:[{type:"text",value:z,sourceSpan:new U(b.moveBy(2),F.moveBy(-2))}]})}c.removeChild(h)}})}function tc(t,n){t.walk(i=>{let c=i.$children;if(!c)return;if(c.length===0||c.length===1&&c[0].type==="text"&&Ne.trim(c[0].value).length===0){i.hasDanglingSpaces=c.length>0,i.$children=[];return}let h=ml(i,n),b=xa(i);if(!h)for(let F=0;F<c.length;F++){let A=c[F];if(A.type!=="text")continue;let{leadingWhitespace:B,text:z,trailingWhitespace:I}=dl(A.value),G=A.prev,q=A.next;z?(A.value=z,A.sourceSpan=new U(A.sourceSpan.start.moveBy(B.length),A.sourceSpan.end.moveBy(-I.length)),B&&(G&&(G.hasTrailingSpaces=!0),A.hasLeadingSpaces=!0),I&&(A.hasTrailingSpaces=!0,q&&(q.hasLeadingSpaces=!0))):(i.removeChild(A),F--,(B||I)&&(G&&(G.hasTrailingSpaces=!0),q&&(q.hasLeadingSpaces=!0)))}i.isWhitespaceSensitive=h,i.isIndentationSensitive=b})}function rc(t){t.walk(n=>{n.isSelfClosing=!n.children||n.type==="element"&&(n.tagDefinition.isVoid||n.endSourceSpan&&n.startSourceSpan.start===n.endSourceSpan.start&&n.startSourceSpan.end===n.endSourceSpan.end)})}function nc(t,n){t.walk(i=>{i.type==="element"&&(i.hasHtmComponentClosingTag=i.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(n.originalText.slice(i.endSourceSpan.start.offset,i.endSourceSpan.end.offset)))})}function ac(t,n){t.walk(i=>{i.cssDisplay=jl(i,n)})}function sc(t,n){t.walk(i=>{let{children:c}=i;if(c){if(c.length===0){i.isDanglingSpaceSensitive=bl(i,n);return}for(let h of c)h.isLeadingSpaceSensitive=fl(h,n),h.isTrailingSpaceSensitive=gl(h,n);for(let h=0;h<c.length;h++){let b=c[h];b.isLeadingSpaceSensitive=(h===0||b.prev.isTrailingSpaceSensitive)&&b.isLeadingSpaceSensitive,b.isTrailingSpaceSensitive=(h===c.length-1||b.next.isLeadingSpaceSensitive)&&b.isTrailingSpaceSensitive}}})}var oc=Gu;function ic(t,n,i){let{node:c}=t;switch(c.type){case"front-matter":return xe(c.raw);case"root":return n.__onHtmlRoot&&n.__onHtmlRoot(c),[te(Jr(t,n,i)),Y];case"element":case"ieConditionalComment":return qu(t,n,i);case"angularControlFlowBlock":return Mu(t,n,i);case"angularControlFlowBlockParameters":return zu(t,n,i);case"angularControlFlowBlockParameter":return Ne.trim(c.expression);case"angularLetDeclaration":return te(["@let ",te([c.id," =",te(Ce([X,i("init")]))]),";"]);case"angularLetDeclarationInitializer":return c.value;case"angularIcuExpression":return $u(t,n,i);case"angularIcuCase":return Hu(t,n,i);case"ieConditionalStartComment":case"ieConditionalEndComment":return[Tt(c),Nt(c)];case"interpolation":return[Tt(c,n),...t.map(i,"children"),Nt(c,n)];case"text":{if(c.parent.type==="interpolation"){let A=/\n[^\S\n]*$/u,B=A.test(c.value),z=B?c.value.replace(A,""):c.value;return[xe(z),B?Y:""]}let h=Qe(c,n),b=Na(c),F=Xe(c,n);return b[0]=[h,b[0]],b.push([b.pop(),F]),na(b)}case"docType":return[te([Tt(c,n)," ",k(!1,c.value.replace(/^html\b/iu,"html"),/\s+/gu," ")]),Nt(c,n)];case"comment":return[Qe(c,n),xe(n.originalText.slice(At(c),sr(c))),Xe(c,n)];case"attribute":{if(c.value===null)return c.rawName;let h=Aa(c.value),b=Li(h,'"');return[c.rawName,"=",b,xe(b==='"'?k(!1,h,'"',"""):k(!1,h,"'","'")),b]}case"cdata":default:throw new $i(c,"HTML")}}var lc={preprocess:oc,print:ic,insertPragma:Iu,massageAstNode:Wi,embed:wu,getVisitorKeys:ju},uc=lc,cc=[{name:"Angular",type:"markup",extensions:[".component.html"],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["angular"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"HTML",type:"markup",extensions:[".html",".hta",".htm",".html.hl",".inc",".xht",".xhtml"],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["html"],vscodeLanguageIds:["html"],linguistLanguageId:146},{name:"Lightning Web Components",type:"markup",extensions:[],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["lwc"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"MJML",type:"markup",extensions:[".mjml"],tmScope:"text.mjml.basic",aceMode:"html",aliases:["MJML","mjml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["mjml"],filenames:[],vscodeLanguageIds:["mjml"],linguistLanguageId:146},{name:"Vue",type:"markup",extensions:[".vue"],tmScope:"source.vue",aceMode:"html",parsers:["vue"],vscodeLanguageIds:["vue"],linguistLanguageId:391}],Ua={bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},Wa="HTML",dc={bracketSameLine:Ua.bracketSameLine,htmlWhitespaceSensitivity:{category:Wa,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:Ua.singleAttributePerLine,vueIndentScriptAndStyle:{category:Wa,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},pc=dc,Va={};f(Va,{angular:()=>xd,html:()=>fd,lwc:()=>yd,mjml:()=>bd,vue:()=>Dd});var Ja;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(Ja||(Ja={}));var Ga;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(Ga||(Ga={}));var Ka;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(Ka||(Ka={}));var Ya={name:"custom-elements"},Xa={name:"no-errors-schema"},et;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"})(et||(et={}));var Za;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(Za||(Za={}));var ve;(function(t){t[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA"})(ve||(ve={}));function pr(t,n=!0){if(t[0]!=":")return[null,t];let i=t.indexOf(":",1);if(i===-1){if(n)throw new Error(`Unsupported format "${t}" expecting ":namespace:name"`);return[null,t]}return[t.slice(1,i),t.slice(i+1)]}function Qa(t){return pr(t)[1]==="ng-container"}function es(t){return pr(t)[1]==="ng-content"}function hr(t){return t===null?null:pr(t)[0]}function mr(t,n){return t?`:${t}:${n}`:n}var fr;function ts(){return fr||(fr={},gr(et.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),gr(et.STYLE,["*|style"]),gr(et.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),gr(et.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),fr}function gr(t,n){for(let i of n)fr[i.toLowerCase()]=t}var hc=class{},mc="boolean",fc="number",gc="string",bc="object",xc=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|",":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":math:math^:math:|",":math:maction^:math:|",":math:menclose^:math:|",":math:merror^:math:|",":math:mfenced^:math:|",":math:mfrac^:math:|",":math:mi^:math:|",":math:mmultiscripts^:math:|",":math:mn^:math:|",":math:mo^:math:|",":math:mover^:math:|",":math:mpadded^:math:|",":math:mphantom^:math:|",":math:mroot^:math:|",":math:mrow^:math:|",":math:ms^:math:|",":math:mspace^:math:|",":math:msqrt^:math:|",":math:mstyle^:math:|",":math:msub^:math:|",":math:msubsup^:math:|",":math:msup^:math:|",":math:mtable^:math:|",":math:mtd^:math:|",":math:mtext^:math:|",":math:mtr^:math:|",":math:munder^:math:|",":math:munderover^:math:|",":math:semantics^:math:|"],rs=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),Dc=Array.from(rs).reduce((t,[n,i])=>(t.set(n,i),t),new Map),yc=class extends hc{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,xc.forEach(t=>{let n=new Map,i=new Set,[c,h]=t.split("|"),b=h.split(","),[F,A]=c.split("^");F.split(",").forEach(z=>{this._schema.set(z.toLowerCase(),n),this._eventSchema.set(z.toLowerCase(),i)});let B=A&&this._schema.get(A.toLowerCase());if(B){for(let[z,I]of B)n.set(z,I);for(let z of this._eventSchema.get(A.toLowerCase()))i.add(z)}b.forEach(z=>{if(z.length>0)switch(z[0]){case"*":i.add(z.substring(1));break;case"!":n.set(z.substring(1),mc);break;case"#":n.set(z.substring(1),fc);break;case"%":n.set(z.substring(1),bc);break;default:n.set(z,gc)}})})}hasProperty(t,n,i){if(i.some(c=>c.name===Xa.name))return!0;if(t.indexOf("-")>-1){if(Qa(t)||es(t))return!1;if(i.some(c=>c.name===Ya.name))return!0}return(this._schema.get(t.toLowerCase())||this._schema.get("unknown")).has(n)}hasElement(t,n){return n.some(i=>i.name===Xa.name)||t.indexOf("-")>-1&&(Qa(t)||es(t)||n.some(i=>i.name===Ya.name))?!0:this._schema.has(t.toLowerCase())}securityContext(t,n,i){i&&(n=this.getMappedPropName(n)),t=t.toLowerCase(),n=n.toLowerCase();let c=ts()[t+"|"+n];return c||(c=ts()["*|"+n],c||et.NONE)}getMappedPropName(t){return rs.get(t)??t}getDefaultComponentElementName(){return"ng-component"}validateProperty(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${t}' is disallowed for security reasons, please use (${t.slice(2)})=...
|
|
17
|
+
If '${t}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${t}' is disallowed for security reasons, please use (${t.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(t){let n=this._schema.get(t.toLowerCase())||this._schema.get("unknown");return Array.from(n.keys()).map(i=>Dc.get(i)??i)}allKnownEventsOfElement(t){return Array.from(this._eventSchema.get(t.toLowerCase())??[])}normalizeAnimationStyleProperty(t){return Vu(t)}normalizeAnimationStyleValue(t,n,i){let c="",h=i.toString().trim(),b=null;if(vc(t)&&i!==0&&i!=="0")if(typeof i=="number")c="px";else{let F=i.match(/^[+-]?[\d\.]+([a-z]*)$/);F&&F[1].length==0&&(b=`Please provide a CSS unit value for ${n}:${i}`)}return{error:b,value:h+c}}};function vc(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var $=class{constructor({closedByChildren:t,implicitNamespacePrefix:n,contentType:i=ve.PARSABLE_DATA,closedByParent:c=!1,isVoid:h=!1,ignoreFirstLf:b=!1,preventNamespaceInheritance:F=!1,canSelfClose:A=!1}={}){this.closedByChildren={},this.closedByParent=!1,t&&t.length>0&&t.forEach(B=>this.closedByChildren[B]=!0),this.isVoid=h,this.closedByParent=c||h,this.implicitNamespacePrefix=n||null,this.contentType=i,this.ignoreFirstLf=b,this.preventNamespaceInheritance=F,this.canSelfClose=A??h}isClosedByChild(t){return this.isVoid||t.toLowerCase()in this.closedByChildren}getContentType(t){return typeof this.contentType=="object"?(t===void 0?void 0:this.contentType[t])??this.contentType.default:this.contentType}},ns,Ot;function Zr(t){return Ot||(ns=new $({canSelfClose:!0}),Ot=Object.assign(Object.create(null),{base:new $({isVoid:!0}),meta:new $({isVoid:!0}),area:new $({isVoid:!0}),embed:new $({isVoid:!0}),link:new $({isVoid:!0}),img:new $({isVoid:!0}),input:new $({isVoid:!0}),param:new $({isVoid:!0}),hr:new $({isVoid:!0}),br:new $({isVoid:!0}),source:new $({isVoid:!0}),track:new $({isVoid:!0}),wbr:new $({isVoid:!0}),p:new $({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new $({closedByChildren:["tbody","tfoot"]}),tbody:new $({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new $({closedByChildren:["tbody"],closedByParent:!0}),tr:new $({closedByChildren:["tr"],closedByParent:!0}),td:new $({closedByChildren:["td","th"],closedByParent:!0}),th:new $({closedByChildren:["td","th"],closedByParent:!0}),col:new $({isVoid:!0}),svg:new $({implicitNamespacePrefix:"svg"}),foreignObject:new $({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new $({implicitNamespacePrefix:"math"}),li:new $({closedByChildren:["li"],closedByParent:!0}),dt:new $({closedByChildren:["dt","dd"]}),dd:new $({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new $({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new $({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new $({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new $({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new $({closedByChildren:["optgroup"],closedByParent:!0}),option:new $({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new $({ignoreFirstLf:!0}),listing:new $({ignoreFirstLf:!0}),style:new $({contentType:ve.RAW_TEXT}),script:new $({contentType:ve.RAW_TEXT}),title:new $({contentType:{default:ve.ESCAPABLE_RAW_TEXT,svg:ve.PARSABLE_DATA}}),textarea:new $({contentType:ve.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new yc().allKnownElementNames().forEach(n=>{!Ot[n]&&hr(n)===null&&(Ot[n]=new $({canSelfClose:!1}))})),Ot[t]??ns}var mt=class{constructor(t,n){this.sourceSpan=t,this.i18n=n}},wc=class extends mt{constructor(t,n,i,c){super(n,c),this.value=t,this.tokens=i,this.type="text"}visit(t,n){return t.visitText(this,n)}},Cc=class extends mt{constructor(t,n,i,c){super(n,c),this.value=t,this.tokens=i,this.type="cdata"}visit(t,n){return t.visitCdata(this,n)}},Fc=class extends mt{constructor(t,n,i,c,h,b){super(c,b),this.switchValue=t,this.type=n,this.cases=i,this.switchValueSourceSpan=h}visit(t,n){return t.visitExpansion(this,n)}},Ec=class{constructor(t,n,i,c,h){this.value=t,this.expression=n,this.sourceSpan=i,this.valueSourceSpan=c,this.expSourceSpan=h,this.type="expansionCase"}visit(t,n){return t.visitExpansionCase(this,n)}},Sc=class extends mt{constructor(t,n,i,c,h,b,F){super(i,F),this.name=t,this.value=n,this.keySpan=c,this.valueSpan=h,this.valueTokens=b,this.type="attribute"}visit(t,n){return t.visitAttribute(this,n)}get nameSpan(){return this.keySpan}},He=class extends mt{constructor(t,n,i,c,h,b=null,F=null,A){super(c,A),this.name=t,this.attrs=n,this.children=i,this.startSourceSpan=h,this.endSourceSpan=b,this.nameSpan=F,this.type="element"}visit(t,n){return t.visitElement(this,n)}},kc=class{constructor(t,n){this.value=t,this.sourceSpan=n,this.type="comment"}visit(t,n){return t.visitComment(this,n)}},Ac=class{constructor(t,n){this.value=t,this.sourceSpan=n,this.type="docType"}visit(t,n){return t.visitDocType(this,n)}},ft=class extends mt{constructor(t,n,i,c,h,b,F=null,A){super(c,A),this.name=t,this.parameters=n,this.children=i,this.nameSpan=h,this.startSourceSpan=b,this.endSourceSpan=F,this.type="block"}visit(t,n){return t.visitBlock(this,n)}},as=class{constructor(t,n){this.expression=t,this.sourceSpan=n,this.type="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(t,n){return t.visitBlockParameter(this,n)}},ss=class{constructor(t,n,i,c,h){this.name=t,this.value=n,this.sourceSpan=i,this.nameSpan=c,this.valueSpan=h,this.type="letDeclaration",this.startSourceSpan=null,this.endSourceSpan=null}visit(t,n){return t.visitLetDeclaration(this,n)}};function os(t,n,i=null){let c=[],h=t.visit?b=>t.visit(b,i)||b.visit(t,i):b=>b.visit(t,i);return n.forEach(b=>{let F=h(b);F&&c.push(F)}),c}var Nc=class{constructor(){}visitElement(t,n){this.visitChildren(n,i=>{i(t.attrs),i(t.children)})}visitAttribute(t,n){}visitText(t,n){}visitCdata(t,n){}visitComment(t,n){}visitDocType(t,n){}visitExpansion(t,n){return this.visitChildren(n,i=>{i(t.cases)})}visitExpansionCase(t,n){}visitBlock(t,n){this.visitChildren(n,i=>{i(t.parameters),i(t.children)})}visitBlockParameter(t,n){}visitLetDeclaration(t,n){}visitChildren(t,n){let i=[],c=this;function h(b){b&&i.push(os(c,b,t))}return n(h),Array.prototype.concat.apply([],i)}},br={AElig:"Æ",AMP:"&",amp:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",af:"",Aring:"Å",angst:"Å",Ascr:"𝒜",Assign:"≔",colone:"≔",coloneq:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",setminus:"∖",setmn:"∖",smallsetminus:"∖",ssetmn:"∖",Barv:"⫧",Barwed:"⌆",doublebarwedge:"⌆",Bcy:"Б",Because:"∵",becaus:"∵",because:"∵",Bernoullis:"ℬ",Bscr:"ℬ",bernou:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",breve:"˘",Bumpeq:"≎",HumpDownHump:"≎",bump:"≎",CHcy:"Ч",COPY:"©",copy:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",DD:"ⅅ",Cayleys:"ℭ",Cfr:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",cedil:"¸",CenterDot:"·",centerdot:"·",middot:"·",Chi:"Χ",CircleDot:"⊙",odot:"⊙",CircleMinus:"⊖",ominus:"⊖",CirclePlus:"⊕",oplus:"⊕",CircleTimes:"⊗",otimes:"⊗",ClockwiseContourIntegral:"∲",cwconint:"∲",CloseCurlyDoubleQuote:"”",rdquo:"”",rdquor:"”",CloseCurlyQuote:"’",rsquo:"’",rsquor:"’",Colon:"∷",Proportion:"∷",Colone:"⩴",Congruent:"≡",equiv:"≡",Conint:"∯",DoubleContourIntegral:"∯",ContourIntegral:"∮",conint:"∮",oint:"∮",Copf:"ℂ",complexes:"ℂ",Coproduct:"∐",coprod:"∐",CounterClockwiseContourIntegral:"∳",awconint:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",asympeq:"≍",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",ddagger:"‡",Darr:"↡",Dashv:"⫤",DoubleLeftTee:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",nabla:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",acute:"´",DiacriticalDot:"˙",dot:"˙",DiacriticalDoubleAcute:"˝",dblac:"˝",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"˜",tilde:"˜",Diamond:"⋄",diam:"⋄",diamond:"⋄",DifferentialD:"ⅆ",dd:"ⅆ",Dopf:"𝔻",Dot:"¨",DoubleDot:"¨",die:"¨",uml:"¨",DotDot:"⃜",DotEqual:"≐",doteq:"≐",esdot:"≐",DoubleDownArrow:"⇓",Downarrow:"⇓",dArr:"⇓",DoubleLeftArrow:"⇐",Leftarrow:"⇐",lArr:"⇐",DoubleLeftRightArrow:"⇔",Leftrightarrow:"⇔",hArr:"⇔",iff:"⇔",DoubleLongLeftArrow:"⟸",Longleftarrow:"⟸",xlArr:"⟸",DoubleLongLeftRightArrow:"⟺",Longleftrightarrow:"⟺",xhArr:"⟺",DoubleLongRightArrow:"⟹",Longrightarrow:"⟹",xrArr:"⟹",DoubleRightArrow:"⇒",Implies:"⇒",Rightarrow:"⇒",rArr:"⇒",DoubleRightTee:"⊨",vDash:"⊨",DoubleUpArrow:"⇑",Uparrow:"⇑",uArr:"⇑",DoubleUpDownArrow:"⇕",Updownarrow:"⇕",vArr:"⇕",DoubleVerticalBar:"∥",par:"∥",parallel:"∥",shortparallel:"∥",spar:"∥",DownArrow:"↓",ShortDownArrow:"↓",darr:"↓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",duarr:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",leftharpoondown:"↽",lhard:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",rhard:"⇁",rightharpoondown:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",top:"⊤",DownTeeArrow:"↧",mapstodown:"↧",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",in:"∈",isin:"∈",isinv:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",eqsim:"≂",esim:"≂",Equilibrium:"⇌",rightleftharpoons:"⇌",rlhar:"⇌",Escr:"ℰ",expectation:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",exist:"∃",ExponentialE:"ⅇ",ee:"ⅇ",exponentiale:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",blacksquare:"▪",squarf:"▪",squf:"▪",Fopf:"𝔽",ForAll:"∀",forall:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",gt:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",ggg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",ge:"≥",geq:"≥",GreaterEqualLess:"⋛",gel:"⋛",gtreqless:"⋛",GreaterFullEqual:"≧",gE:"≧",geqq:"≧",GreaterGreater:"⪢",GreaterLess:"≷",gl:"≷",gtrless:"≷",GreaterSlantEqual:"⩾",geqslant:"⩾",ges:"⩾",GreaterTilde:"≳",gsim:"≳",gtrsim:"≳",Gscr:"𝒢",Gt:"≫",NestedGreaterGreater:"≫",gg:"≫",HARDcy:"Ъ",Hacek:"ˇ",caron:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",Poincareplane:"ℌ",HilbertSpace:"ℋ",Hscr:"ℋ",hamilt:"ℋ",Hopf:"ℍ",quaternions:"ℍ",HorizontalLine:"─",boxh:"─",Hstrok:"Ħ",HumpEqual:"≏",bumpe:"≏",bumpeq:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Im:"ℑ",image:"ℑ",imagpart:"ℑ",Igrave:"Ì",Imacr:"Ī",ImaginaryI:"ⅈ",ii:"ⅈ",Int:"∬",Integral:"∫",int:"∫",Intersection:"⋂",bigcap:"⋂",xcap:"⋂",InvisibleComma:"",ic:"",InvisibleTimes:"",it:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",imagline:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",lt:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Lscr:"ℒ",lagran:"ℒ",Larr:"↞",twoheadleftarrow:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",lang:"⟨",langle:"⟨",LeftArrow:"←",ShortLeftArrow:"←",larr:"←",leftarrow:"←",slarr:"←",LeftArrowBar:"⇤",larrb:"⇤",LeftArrowRightArrow:"⇆",leftrightarrows:"⇆",lrarr:"⇆",LeftCeiling:"⌈",lceil:"⌈",LeftDoubleBracket:"⟦",lobrk:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",dharl:"⇃",downharpoonleft:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",lfloor:"⌊",LeftRightArrow:"↔",harr:"↔",leftrightarrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",dashv:"⊣",LeftTeeArrow:"↤",mapstoleft:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",vartriangleleft:"⊲",vltri:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",ltrie:"⊴",trianglelefteq:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",uharl:"↿",upharpoonleft:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",leftharpoonup:"↼",lharu:"↼",LeftVectorBar:"⥒",LessEqualGreater:"⋚",leg:"⋚",lesseqgtr:"⋚",LessFullEqual:"≦",lE:"≦",leqq:"≦",LessGreater:"≶",lessgtr:"≶",lg:"≶",LessLess:"⪡",LessSlantEqual:"⩽",leqslant:"⩽",les:"⩽",LessTilde:"≲",lesssim:"≲",lsim:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",lAarr:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",longleftarrow:"⟵",xlarr:"⟵",LongLeftRightArrow:"⟷",longleftrightarrow:"⟷",xharr:"⟷",LongRightArrow:"⟶",longrightarrow:"⟶",xrarr:"⟶",Lopf:"𝕃",LowerLeftArrow:"↙",swarr:"↙",swarrow:"↙",LowerRightArrow:"↘",searr:"↘",searrow:"↘",Lsh:"↰",lsh:"↰",Lstrok:"Ł",Lt:"≪",NestedLessLess:"≪",ll:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mscr:"ℳ",phmmat:"ℳ",Mfr:"𝔐",MinusPlus:"∓",mnplus:"∓",mp:"∓",Mopf:"𝕄",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",ZeroWidthSpace:"",NewLine:`
|
|
18
|
+
`,Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",nbsp:" ",Nopf:"ℕ",naturals:"ℕ",Not:"⫬",NotCongruent:"≢",nequiv:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",npar:"∦",nparallel:"∦",nshortparallel:"∦",nspar:"∦",NotElement:"∉",notin:"∉",notinva:"∉",NotEqual:"≠",ne:"≠",NotEqualTilde:"≂̸",nesim:"≂̸",NotExists:"∄",nexist:"∄",nexists:"∄",NotGreater:"≯",ngt:"≯",ngtr:"≯",NotGreaterEqual:"≱",nge:"≱",ngeq:"≱",NotGreaterFullEqual:"≧̸",ngE:"≧̸",ngeqq:"≧̸",NotGreaterGreater:"≫̸",nGtv:"≫̸",NotGreaterLess:"≹",ntgl:"≹",NotGreaterSlantEqual:"⩾̸",ngeqslant:"⩾̸",nges:"⩾̸",NotGreaterTilde:"≵",ngsim:"≵",NotHumpDownHump:"≎̸",nbump:"≎̸",NotHumpEqual:"≏̸",nbumpe:"≏̸",NotLeftTriangle:"⋪",nltri:"⋪",ntriangleleft:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",nltrie:"⋬",ntrianglelefteq:"⋬",NotLess:"≮",nless:"≮",nlt:"≮",NotLessEqual:"≰",nle:"≰",nleq:"≰",NotLessGreater:"≸",ntlg:"≸",NotLessLess:"≪̸",nLtv:"≪̸",NotLessSlantEqual:"⩽̸",nleqslant:"⩽̸",nles:"⩽̸",NotLessTilde:"≴",nlsim:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",npr:"⊀",nprec:"⊀",NotPrecedesEqual:"⪯̸",npre:"⪯̸",npreceq:"⪯̸",NotPrecedesSlantEqual:"⋠",nprcue:"⋠",NotReverseElement:"∌",notni:"∌",notniva:"∌",NotRightTriangle:"⋫",nrtri:"⋫",ntriangleright:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",nrtrie:"⋭",ntrianglerighteq:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",nsqsube:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",nsqsupe:"⋣",NotSubset:"⊂⃒",nsubset:"⊂⃒",vnsub:"⊂⃒",NotSubsetEqual:"⊈",nsube:"⊈",nsubseteq:"⊈",NotSucceeds:"⊁",nsc:"⊁",nsucc:"⊁",NotSucceedsEqual:"⪰̸",nsce:"⪰̸",nsucceq:"⪰̸",NotSucceedsSlantEqual:"⋡",nsccue:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",nsupset:"⊃⃒",vnsup:"⊃⃒",NotSupersetEqual:"⊉",nsupe:"⊉",nsupseteq:"⊉",NotTilde:"≁",nsim:"≁",NotTildeEqual:"≄",nsime:"≄",nsimeq:"≄",NotTildeFullEqual:"≇",ncong:"≇",NotTildeTilde:"≉",nap:"≉",napprox:"≉",NotVerticalBar:"∤",nmid:"∤",nshortmid:"∤",nsmid:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",ohm:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",ldquo:"“",OpenCurlyQuote:"‘",lsquo:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",oline:"‾",OverBrace:"⏞",OverBracket:"⎴",tbrk:"⎴",OverParenthesis:"⏜",PartialD:"∂",part:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",plusmn:"±",pm:"±",Popf:"ℙ",primes:"ℙ",Pr:"⪻",Precedes:"≺",pr:"≺",prec:"≺",PrecedesEqual:"⪯",pre:"⪯",preceq:"⪯",PrecedesSlantEqual:"≼",prcue:"≼",preccurlyeq:"≼",PrecedesTilde:"≾",precsim:"≾",prsim:"≾",Prime:"″",Product:"∏",prod:"∏",Proportional:"∝",prop:"∝",propto:"∝",varpropto:"∝",vprop:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',quot:'"',Qfr:"𝔔",Qopf:"ℚ",rationals:"ℚ",Qscr:"𝒬",RBarr:"⤐",drbkarow:"⤐",REG:"®",circledR:"®",reg:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",twoheadrightarrow:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",Rfr:"ℜ",real:"ℜ",realpart:"ℜ",ReverseElement:"∋",SuchThat:"∋",ni:"∋",niv:"∋",ReverseEquilibrium:"⇋",leftrightharpoons:"⇋",lrhar:"⇋",ReverseUpEquilibrium:"⥯",duhar:"⥯",Rho:"Ρ",RightAngleBracket:"⟩",rang:"⟩",rangle:"⟩",RightArrow:"→",ShortRightArrow:"→",rarr:"→",rightarrow:"→",srarr:"→",RightArrowBar:"⇥",rarrb:"⇥",RightArrowLeftArrow:"⇄",rightleftarrows:"⇄",rlarr:"⇄",RightCeiling:"⌉",rceil:"⌉",RightDoubleBracket:"⟧",robrk:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",dharr:"⇂",downharpoonright:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rfloor:"⌋",RightTee:"⊢",vdash:"⊢",RightTeeArrow:"↦",map:"↦",mapsto:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",vartriangleright:"⊳",vrtri:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",rtrie:"⊵",trianglerighteq:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",uharr:"↾",upharpoonright:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",rharu:"⇀",rightharpoonup:"⇀",RightVectorBar:"⥓",Ropf:"ℝ",reals:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",rAarr:"⇛",Rscr:"ℛ",realine:"ℛ",Rsh:"↱",rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortUpArrow:"↑",UpArrow:"↑",uarr:"↑",uparrow:"↑",Sigma:"Σ",SmallCircle:"∘",compfn:"∘",Sopf:"𝕊",Sqrt:"√",radic:"√",Square:"□",squ:"□",square:"□",SquareIntersection:"⊓",sqcap:"⊓",SquareSubset:"⊏",sqsub:"⊏",sqsubset:"⊏",SquareSubsetEqual:"⊑",sqsube:"⊑",sqsubseteq:"⊑",SquareSuperset:"⊐",sqsup:"⊐",sqsupset:"⊐",SquareSupersetEqual:"⊒",sqsupe:"⊒",sqsupseteq:"⊒",SquareUnion:"⊔",sqcup:"⊔",Sscr:"𝒮",Star:"⋆",sstarf:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",sube:"⊆",subseteq:"⊆",Succeeds:"≻",sc:"≻",succ:"≻",SucceedsEqual:"⪰",sce:"⪰",succeq:"⪰",SucceedsSlantEqual:"≽",sccue:"≽",succcurlyeq:"≽",SucceedsTilde:"≿",scsim:"≿",succsim:"≿",Sum:"∑",sum:"∑",Sup:"⋑",Supset:"⋑",Superset:"⊃",sup:"⊃",supset:"⊃",SupersetEqual:"⊇",supe:"⊇",supseteq:"⊇",THORN:"Þ",TRADE:"™",trade:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",there4:"∴",therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",thinsp:" ",Tilde:"∼",sim:"∼",thicksim:"∼",thksim:"∼",TildeEqual:"≃",sime:"≃",simeq:"≃",TildeFullEqual:"≅",cong:"≅",TildeTilde:"≈",ap:"≈",approx:"≈",asymp:"≈",thickapprox:"≈",thkap:"≈",Topf:"𝕋",TripleDot:"⃛",tdot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",lowbar:"_",UnderBrace:"⏟",UnderBracket:"⎵",bbrk:"⎵",UnderParenthesis:"⏝",Union:"⋃",bigcup:"⋃",xcup:"⋃",UnionPlus:"⊎",uplus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",udarr:"⇅",UpDownArrow:"↕",updownarrow:"↕",varr:"↕",UpEquilibrium:"⥮",udhar:"⥮",UpTee:"⊥",bot:"⊥",bottom:"⊥",perp:"⊥",UpTeeArrow:"↥",mapstoup:"↥",UpperLeftArrow:"↖",nwarr:"↖",nwarrow:"↖",UpperRightArrow:"↗",nearr:"↗",nearrow:"↗",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",bigvee:"⋁",xvee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",mid:"∣",shortmid:"∣",smid:"∣",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"❘",VerticalTilde:"≀",wr:"≀",wreath:"≀",VeryThinSpace:" ",hairsp:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",bigwedge:"⋀",xwedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",Zeta:"Ζ",Zfr:"ℨ",zeetrf:"ℨ",Zopf:"ℤ",integers:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",mstpos:"∾",acE:"∾̳",acd:"∿",acirc:"â",acy:"а",aelig:"æ",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",and:"∧",wedge:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",angle:"∠",ange:"⦤",angmsd:"∡",measuredangle:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angzarr:"⍼",aogon:"ą",aopf:"𝕒",apE:"⩰",apacir:"⩯",ape:"≊",approxeq:"≊",apid:"≋",apos:"'",aring:"å",ascr:"𝒶",ast:"*",midast:"*",atilde:"ã",auml:"ä",awint:"⨑",bNot:"⫭",backcong:"≌",bcong:"≌",backepsilon:"϶",bepsi:"϶",backprime:"‵",bprime:"‵",backsim:"∽",bsim:"∽",backsimeq:"⋍",bsime:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrktbrk:"⎶",bcy:"б",bdquo:"„",ldquor:"„",bemptyv:"⦰",beta:"β",beth:"ℶ",between:"≬",twixt:"≬",bfr:"𝔟",bigcirc:"◯",xcirc:"◯",bigodot:"⨀",xodot:"⨀",bigoplus:"⨁",xoplus:"⨁",bigotimes:"⨂",xotime:"⨂",bigsqcup:"⨆",xsqcup:"⨆",bigstar:"★",starf:"★",bigtriangledown:"▽",xdtri:"▽",bigtriangleup:"△",xutri:"△",biguplus:"⨄",xuplus:"⨄",bkarow:"⤍",rbarr:"⤍",blacklozenge:"⧫",lozf:"⧫",blacktriangle:"▴",utrif:"▴",blacktriangledown:"▾",dtrif:"▾",blacktriangleleft:"◂",ltrif:"◂",blacktriangleright:"▸",rtrif:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",minusb:"⊟",boxplus:"⊞",plusb:"⊞",boxtimes:"⊠",timesb:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bumpE:"⪮",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cemptyv:"⦲",cent:"¢",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",cire:"≗",circlearrowleft:"↺",olarr:"↺",circlearrowright:"↻",orarr:"↻",circledS:"Ⓢ",oS:"Ⓢ",circledast:"⊛",oast:"⊛",circledcirc:"⊚",ocir:"⊚",circleddash:"⊝",odash:"⊝",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",comma:",",commat:"@",comp:"∁",complement:"∁",congdot:"⩭",copf:"𝕔",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",curlyeqprec:"⋞",cuesc:"⋟",curlyeqsucc:"⋟",cularr:"↶",curvearrowleft:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curvearrowright:"↷",curarrm:"⤼",curlyvee:"⋎",cuvee:"⋎",curlywedge:"⋏",cuwed:"⋏",curren:"¤",cwint:"∱",cylcty:"⌭",dHar:"⥥",dagger:"†",daleth:"ℸ",dash:"‐",hyphen:"‐",dbkarow:"⤏",rBarr:"⤏",dcaron:"ď",dcy:"д",ddarr:"⇊",downdownarrows:"⇊",ddotseq:"⩷",eDDot:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",diamondsuit:"♦",diams:"♦",digamma:"ϝ",gammad:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",llcorner:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",doteqdot:"≑",eDot:"≑",dotminus:"∸",minusd:"∸",dotplus:"∔",plusdo:"∔",dotsquare:"⊡",sdotb:"⊡",drcorn:"⌟",lrcorner:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",triangledown:"▿",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",eqcirc:"≖",ecirc:"ê",ecolon:"≕",eqcolon:"≕",ecy:"э",edot:"ė",efDot:"≒",fallingdotseq:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",eqslantgtr:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",eqslantless:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",varnothing:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",straightepsilon:"ϵ",varepsilon:"ϵ",equals:"=",equest:"≟",questeq:"≟",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",risingdotseq:"≓",erarr:"⥱",escr:"ℯ",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",fork:"⋔",pitchfork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",half:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",sfrown:"⌢",fscr:"𝒻",gEl:"⪌",gtreqqless:"⪌",gacute:"ǵ",gamma:"γ",gap:"⪆",gtrapprox:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gimel:"ℷ",gjcy:"ѓ",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gneqq:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gnsim:"⋧",gopf:"𝕘",gscr:"ℊ",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtrdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrarr:"⥸",gvertneqq:"≩︀",gvnE:"≩︀",hardcy:"ъ",harrcir:"⥈",harrw:"↭",leftrightsquigarrow:"↭",hbar:"ℏ",hslash:"ℏ",planck:"ℏ",plankv:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",mldr:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",searhk:"⤥",hkswarow:"⤦",swarhk:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",larrhk:"↩",hookrightarrow:"↪",rarrhk:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hstrok:"ħ",hybull:"⁃",iacute:"í",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",ifr:"𝔦",igrave:"ì",iiiint:"⨌",qint:"⨌",iiint:"∭",tint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",imath:"ı",inodot:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",intcal:"⊺",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iquest:"¿",iscr:"𝒾",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",varkappa:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAtail:"⤛",lBarr:"⤎",lEg:"⪋",lesseqqgtr:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lambda:"λ",langd:"⦑",lap:"⪅",lessapprox:"⪅",laquo:"«",larrbfs:"⤟",larrfs:"⤝",larrlp:"↫",looparrowleft:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",leftarrowtail:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lcy:"л",ldca:"⤶",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leq:"≤",leftleftarrows:"⇇",llarr:"⇇",leftthreetimes:"⋋",lthree:"⋋",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessdot:"⋖",ltdot:"⋖",lfisht:"⥼",lfr:"𝔩",lgE:"⪑",lharul:"⥪",lhblk:"▄",ljcy:"љ",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lneqq:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lnsim:"⋦",loang:"⟬",loarr:"⇽",longmapsto:"⟼",xmap:"⟼",looparrowright:"↬",rarrlp:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",loz:"◊",lozenge:"◊",lpar:"(",lparlt:"⦓",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsime:"⪍",lsimg:"⪏",lsquor:"‚",sbquo:"‚",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",triangleleft:"◃",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",strns:"¯",male:"♂",malt:"✠",maltese:"✠",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",mfr:"𝔪",mho:"℧",micro:"µ",midcir:"⫰",minus:"−",minusdu:"⨪",mlcp:"⫛",models:"⊧",mopf:"𝕞",mscr:"𝓂",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nLeftarrow:"⇍",nlArr:"⇍",nLeftrightarrow:"⇎",nhArr:"⇎",nLl:"⋘̸",nLt:"≪⃒",nRightarrow:"⇏",nrArr:"⇏",nVDash:"⊯",nVdash:"⊮",nacute:"ń",nang:"∠⃒",napE:"⩰̸",napid:"≋̸",napos:"ʼn",natur:"♮",natural:"♮",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",neArr:"⇗",nearhk:"⤤",nedot:"≐̸",nesear:"⤨",toea:"⤨",nfr:"𝔫",nharr:"↮",nleftrightarrow:"↮",nhpar:"⫲",nis:"⋼",nisd:"⋺",njcy:"њ",nlE:"≦̸",nleqq:"≦̸",nlarr:"↚",nleftarrow:"↚",nldr:"‥",nopf:"𝕟",not:"¬",notinE:"⋹̸",notindot:"⋵̸",notinvb:"⋷",notinvc:"⋶",notnivb:"⋾",notnivc:"⋽",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",nrarr:"↛",nrightarrow:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nscr:"𝓃",nsub:"⊄",nsubE:"⫅̸",nsubseteqq:"⫅̸",nsup:"⊅",nsupE:"⫆̸",nsupseteqq:"⫆̸",ntilde:"ñ",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwnear:"⤧",oacute:"ó",ocirc:"ô",ocy:"о",odblac:"ő",odiv:"⨸",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",olcir:"⦾",olcross:"⦻",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",oopf:"𝕠",opar:"⦷",operp:"⦹",or:"∨",vee:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",oscr:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oslash:"ø",osol:"⊘",otilde:"õ",otimesas:"⨶",ouml:"ö",ovbar:"⌽",para:"¶",parsim:"⫳",parsl:"⫽",pcy:"п",percnt:"%",period:".",permil:"‰",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",straightphi:"ϕ",varphi:"ϕ",phone:"☎",pi:"π",piv:"ϖ",varpi:"ϖ",planckh:"ℎ",plus:"+",plusacir:"⨣",pluscir:"⨢",plusdu:"⨥",pluse:"⩲",plussim:"⨦",plustwo:"⨧",pointint:"⨕",popf:"𝕡",pound:"£",prE:"⪳",prap:"⪷",precapprox:"⪷",precnapprox:"⪹",prnap:"⪹",precneqq:"⪵",prnE:"⪵",precnsim:"⋨",prnsim:"⋨",prime:"′",profalar:"⌮",profline:"⌒",profsurf:"⌓",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quatint:"⨖",quest:"?",rAtail:"⤜",rHar:"⥤",race:"∽̱",racute:"ŕ",raemptyv:"⦳",rangd:"⦒",range:"⦥",raquo:"»",rarrap:"⥵",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rightarrowtail:"↣",rarrw:"↝",rightsquigarrow:"↝",ratail:"⤚",ratio:"∶",rbbrk:"❳",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdsh:"↳",rect:"▭",rfisht:"⥽",rfr:"𝔯",rharul:"⥬",rho:"ρ",rhov:"ϱ",varrho:"ϱ",rightrightarrows:"⇉",rrarr:"⇉",rightthreetimes:"⋌",rthree:"⋌",ring:"˚",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rsaquo:"›",rscr:"𝓇",rtimes:"⋊",rtri:"▹",triangleright:"▹",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",scE:"⪴",scap:"⪸",succapprox:"⪸",scaron:"š",scedil:"ş",scirc:"ŝ",scnE:"⪶",succneqq:"⪶",scnap:"⪺",succnapprox:"⪺",scnsim:"⋩",succnsim:"⋩",scpolint:"⨓",scy:"с",sdot:"⋅",sdote:"⩦",seArr:"⇘",sect:"§",semi:";",seswar:"⤩",tosa:"⤩",sext:"✶",sfr:"𝔰",sharp:"♯",shchcy:"щ",shcy:"ш",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",varsigma:"ς",simdot:"⩪",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",smashp:"⨳",smeparsl:"⧤",smile:"⌣",ssmile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",sqcaps:"⊓︀",sqcups:"⊔︀",sscr:"𝓈",star:"☆",sub:"⊂",subset:"⊂",subE:"⫅",subseteqq:"⫅",subdot:"⪽",subedot:"⫃",submult:"⫁",subnE:"⫋",subsetneqq:"⫋",subne:"⊊",subsetneq:"⊊",subplus:"⪿",subrarr:"⥹",subsim:"⫇",subsub:"⫕",subsup:"⫓",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supseteqq:"⫆",supdot:"⪾",supdsub:"⫘",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supsetneqq:"⫌",supne:"⊋",supsetneq:"⊋",supplus:"⫀",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tcaron:"ť",tcedil:"ţ",tcy:"т",telrec:"⌕",tfr:"𝔱",theta:"θ",thetasym:"ϑ",thetav:"ϑ",vartheta:"ϑ",thorn:"þ",times:"×",timesbar:"⨱",timesd:"⨰",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tprime:"‴",triangle:"▵",utri:"▵",triangleq:"≜",trie:"≜",tridot:"◬",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",uHar:"⥣",uacute:"ú",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udblac:"ű",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uogon:"ų",uopf:"𝕦",upsi:"υ",upsilon:"υ",upuparrows:"⇈",uuarr:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",uuml:"ü",uwangle:"⦧",vBar:"⫨",vBarv:"⫩",vangrt:"⦜",varsubsetneq:"⊊︀",vsubne:"⊊︀",varsubsetneqq:"⫋︀",vsubnE:"⫋︀",varsupsetneq:"⊋︀",vsupne:"⊋︀",varsupsetneqq:"⫌︀",vsupnE:"⫌︀",vcy:"в",veebar:"⊻",veeeq:"≚",vellip:"⋮",vfr:"𝔳",vopf:"𝕧",vscr:"𝓋",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedgeq:"≙",weierp:"℘",wp:"℘",wfr:"𝔴",wopf:"𝕨",wscr:"𝓌",xfr:"𝔵",xi:"ξ",xnis:"⋻",xopf:"𝕩",xscr:"𝓍",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},jc="";br.ngsp=jc;var _c=[/@/,/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function Bc(t,n){if(n!=null&&!(Array.isArray(n)&&n.length==2))throw new Error(`Expected '${t}' to be an array, [start, end].`);if(n!=null){let i=n[0],c=n[1];_c.forEach(h=>{if(h.test(i)||h.test(c))throw new Error(`['${i}', '${c}'] contains unusable interpolation symbol.`)})}}var Tc=class yo{static fromArray(n){return n?(Bc("interpolation",n),new yo(n[0],n[1])):is}constructor(n,i){this.start=n,this.end=i}},is=new Tc("{{","}}"),Qr=class extends qa{constructor(t,n,i){super(i,t),this.tokenType=n}},Lc=class{constructor(t,n,i){this.tokens=t,this.errors=n,this.nonNormalizedIcuExpressions=i}};function Pc(t,n,i,c={}){let h=new Mc(new Ha(t,n),i,c);return h.tokenize(),new Lc(Uc(h.tokens),h.errors,h.nonNormalizedIcuExpressions)}var Ic=/\r\n?/g;function gt(t){return`Unexpected character "${t===0?"EOF":String.fromCharCode(t)}"`}function ls(t){return`Unknown entity "${t}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}function Oc(t,n){return`Unable to parse entity "${n}" - ${t} character reference entities must end with ";"`}var xr;(function(t){t.HEX="hexadecimal",t.DEC="decimal"})(xr||(xr={}));var en=class{constructor(t){this.error=t}},Mc=class{constructor(t,n,i){this._getTagContentType=n,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=i.tokenizeExpansionForms||!1,this._interpolationConfig=i.interpolationConfig||is,this._leadingTriviaCodePoints=i.leadingTriviaChars&&i.leadingTriviaChars.map(h=>h.codePointAt(0)||0),this._canSelfClose=i.canSelfClose||!1,this._allowHtmComponentClosingTags=i.allowHtmComponentClosingTags||!1;let c=i.range||{endPos:t.content.length,startPos:0,startLine:0,startCol:0};this._cursor=i.escapedString?new Wc(t,c):new hs(t,c),this._preserveLineEndings=i.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=i.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=i.tokenizeBlocks??!0,this._tokenizeLet=i.tokenizeLet??!0;try{this._cursor.init()}catch(h){this.handleError(h)}}_processCarriageReturns(t){return this._preserveLineEndings?t:t.replace(Ic,`
|
|
19
|
+
`)}tokenize(){for(;this._cursor.peek()!==0;){let t=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(t):this._attemptStr("--")?this._consumeComment(t):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(t):this._consumeBogusComment(t);else if(this._attemptCharCode(47))this._consumeTagClose(t);else{let n=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=n,this._consumeBogusComment(t)):this._consumeTagOpen(t)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._attemptStr("@let")?this._consumeLetDeclaration(t):this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(t):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(t):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(n){this.handleError(n)}}this._beginToken(34),this._endToken([])}_getBlockName(){let t=!1,n=this._cursor.clone();return this._attemptCharCodeUntilFn(i=>ur(i)?!t:ds(i)?(t=!0,!1):!0),this._cursor.getChars(n).trim()}_consumeBlockStart(t){this._beginToken(25,t);let n=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(Z),this._attemptCharCode(41))this._attemptCharCodeUntilFn(Z);else{n.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):n.type=29}_consumeBlockEnd(t){this._beginToken(27,t),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(ps);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let t=this._cursor.clone(),n=null,i=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||n!==null;){let c=this._cursor.peek();if(c===92)this._cursor.advance();else if(c===n)n=null;else if(n===null&&Yr(c))n=c;else if(c===40&&n===null)i++;else if(c===41&&n===null){if(i===0)break;i>0&&i--}this._cursor.advance()}this._endToken([this._cursor.getChars(t)]),this._attemptCharCodeUntilFn(ps)}}_consumeLetDeclaration(t){if(this._beginToken(30,t),ur(this._cursor.peek()))this._attemptCharCodeUntilFn(Z);else{let i=this._endToken([this._cursor.getChars(t)]);i.type=33;return}let n=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(Z),!this._attemptCharCode(61)){n.type=33;return}this._attemptCharCodeUntilFn(i=>Z(i)&&!Kr(i)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(32),this._endToken([]),this._cursor.advance()):(n.type=33,n.sourceSpan=this._cursor.getSpan(t))}_getLetDeclarationName(){let t=this._cursor.clone(),n=!1;return this._attemptCharCodeUntilFn(i=>cr(i)||i===36||i===95||n&&Gr(i)?(n=!0,!1):!0),this._cursor.getChars(t).trim()}_consumeLetDeclarationValue(){let t=this._cursor.clone();for(this._beginToken(31,t);this._cursor.peek()!==0;){let n=this._cursor.peek();if(n===59)break;Yr(n)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(i=>i===92?(this._cursor.advance(),!1):i===n)),this._cursor.advance()}this._endToken([this._cursor.getChars(t)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(Hc(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(t,n=this._cursor.clone()){this._currentTokenStart=n,this._currentTokenType=t}_endToken(t,n){if(this._currentTokenStart===null)throw new Qr("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(n));if(this._currentTokenType===null)throw new Qr("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let i={type:this._currentTokenType,parts:t,sourceSpan:(n??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(i),this._currentTokenStart=null,this._currentTokenType=null,i}_createError(t,n){this._isInExpansionForm()&&(t+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let i=new Qr(t,this._currentTokenType,n);return this._currentTokenStart=null,this._currentTokenType=null,new en(i)}handleError(t){if(t instanceof tn&&(t=this._createError(t.msg,this._cursor.getSpan(t.cursor))),t instanceof en)this.errors.push(t.error);else throw t}_attemptCharCode(t){return this._cursor.peek()===t?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(t){return qc(this._cursor.peek(),t)?(this._cursor.advance(),!0):!1}_requireCharCode(t){let n=this._cursor.clone();if(!this._attemptCharCode(t))throw this._createError(gt(this._cursor.peek()),this._cursor.getSpan(n))}_attemptStr(t){let n=t.length;if(this._cursor.charsLeft()<n)return!1;let i=this._cursor.clone();for(let c=0;c<n;c++)if(!this._attemptCharCode(t.charCodeAt(c)))return this._cursor=i,!1;return!0}_attemptStrCaseInsensitive(t){for(let n=0;n<t.length;n++)if(!this._attemptCharCodeCaseInsensitive(t.charCodeAt(n)))return!1;return!0}_requireStr(t){let n=this._cursor.clone();if(!this._attemptStr(t))throw this._createError(gt(this._cursor.peek()),this._cursor.getSpan(n))}_requireStrCaseInsensitive(t){let n=this._cursor.clone();if(!this._attemptStrCaseInsensitive(t))throw this._createError(gt(this._cursor.peek()),this._cursor.getSpan(n))}_attemptCharCodeUntilFn(t){for(;!t(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(t,n){let i=this._cursor.clone();if(this._attemptCharCodeUntilFn(t),this._cursor.diff(i)<n)throw this._createError(gt(this._cursor.peek()),this._cursor.getSpan(i))}_attemptUntilChar(t){for(;this._cursor.peek()!==t;)this._cursor.advance()}_readChar(){let t=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),t}_consumeEntity(t){this._beginToken(9);let n=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(35)){let i=this._attemptCharCode(120)||this._attemptCharCode(88),c=this._cursor.clone();if(this._attemptCharCodeUntilFn(zc),this._cursor.peek()!=59){this._cursor.advance();let b=i?xr.HEX:xr.DEC;throw this._createError(Oc(b,this._cursor.getChars(n)),this._cursor.getSpan())}let h=this._cursor.getChars(c);this._cursor.advance();try{let b=parseInt(h,i?16:10);this._endToken([String.fromCharCode(b),this._cursor.getChars(n)])}catch{throw this._createError(ls(this._cursor.getChars(n)),this._cursor.getSpan())}}else{let i=this._cursor.clone();if(this._attemptCharCodeUntilFn($c),this._cursor.peek()!=59)this._beginToken(t,n),this._cursor=i,this._endToken(["&"]);else{let c=this._cursor.getChars(i);this._cursor.advance();let h=br[c];if(!h)throw this._createError(ls(c),this._cursor.getSpan(n));this._endToken([h,`&${c};`])}}}_consumeRawText(t,n){this._beginToken(t?6:7);let i=[];for(;;){let c=this._cursor.clone(),h=n();if(this._cursor=c,h)break;t&&this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(6),this._beginToken(6)):i.push(this._readChar())}this._endToken([this._processCarriageReturns(i.join(""))])}_consumeComment(t){this._beginToken(10,t),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(t){this._beginToken(10,t),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(11),this._cursor.advance(),this._endToken([])}_consumeCdata(t){this._beginToken(12,t),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(t){this._beginToken(18,t),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(19),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){let t=this._cursor.clone(),n="";for(;this._cursor.peek()!==58&&!Rc(this._cursor.peek());)this._cursor.advance();let i;this._cursor.peek()===58?(n=this._cursor.getChars(t),this._cursor.advance(),i=this._cursor.clone()):i=t,this._requireCharCodeUntilFn(us,n===""?0:1);let c=this._cursor.getChars(i);return[n,c]}_consumeTagOpen(t){let n,i,c,h=[];try{if(!cr(this._cursor.peek()))throw this._createError(gt(this._cursor.peek()),this._cursor.getSpan(t));for(c=this._consumeTagOpenStart(t),i=c.parts[0],n=c.parts[1],this._attemptCharCodeUntilFn(Z);this._cursor.peek()!==47&&this._cursor.peek()!==62&&this._cursor.peek()!==60&&this._cursor.peek()!==0;){let[F,A]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(Z),this._attemptCharCode(61)){this._attemptCharCodeUntilFn(Z);let B=this._consumeAttributeValue();h.push({prefix:F,name:A,value:B})}else h.push({prefix:F,name:A});this._attemptCharCodeUntilFn(Z)}this._consumeTagOpenEnd()}catch(F){if(F instanceof en){c?c.type=4:(this._beginToken(5,t),this._endToken(["<"]));return}throw F}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===2)return;let b=this._getTagContentType(n,i,this._fullNameStack.length>0,h);this._handleFullNameStackForTagOpen(i,n),b===ve.RAW_TEXT?this._consumeRawTextWithTagClose(i,n,!1):b===ve.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(i,n,!0)}_consumeRawTextWithTagClose(t,n,i){this._consumeRawText(i,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(Z),!this._attemptStrCaseInsensitive(t?`${t}:${n}`:n))?!1:(this._attemptCharCodeUntilFn(Z),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(c=>c===62,3),this._cursor.advance(),this._endToken([t,n]),this._handleFullNameStackForTagClose(t,n)}_consumeTagOpenStart(t){this._beginToken(0,t);let n=this._consumePrefixAndName();return this._endToken(n)}_consumeAttributeName(){let t=this._cursor.peek();if(t===39||t===34)throw this._createError(gt(t),this._cursor.getSpan());this._beginToken(14);let n=this._consumePrefixAndName();return this._endToken(n),n}_consumeAttributeValue(){let t;if(this._cursor.peek()===39||this._cursor.peek()===34){let n=this._cursor.peek();this._consumeQuote(n);let i=()=>this._cursor.peek()===n;t=this._consumeWithInterpolation(16,17,i,i),this._consumeQuote(n)}else{let n=()=>us(this._cursor.peek());t=this._consumeWithInterpolation(16,17,n,n)}return t}_consumeQuote(t){this._beginToken(15),this._requireCharCode(t),this._endToken([String.fromCodePoint(t)])}_consumeTagOpenEnd(){let t=this._attemptCharCode(47)?2:1;this._beginToken(t),this._requireCharCode(62),this._endToken([])}_consumeTagClose(t){if(this._beginToken(3,t),this._attemptCharCodeUntilFn(Z),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(Z),this._requireCharCode(62),this._endToken([]);else{let[n,i]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(Z),this._requireCharCode(62),this._endToken([n,i]),this._handleFullNameStackForTagClose(n,i)}}_consumeExpansionFormStart(){this._beginToken(20),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(20),this._beginToken(7);let t=this._readUntil(44),n=this._processCarriageReturns(t);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([n]);else{let c=this._endToken([t]);n!==t&&this.nonNormalizedIcuExpressions.push(c)}this._requireCharCode(44),this._attemptCharCodeUntilFn(Z),this._beginToken(7);let i=this._readUntil(44);this._endToken([i]),this._requireCharCode(44),this._attemptCharCodeUntilFn(Z)}_consumeExpansionCaseStart(){this._beginToken(21);let t=this._readUntil(123).trim();this._endToken([t]),this._attemptCharCodeUntilFn(Z),this._beginToken(22),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(Z),this._expansionCaseStack.push(22)}_consumeExpansionCaseEnd(){this._beginToken(23),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(Z),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(24),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(t,n,i,c){this._beginToken(t);let h=[];for(;!i();){let F=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(h.join(""))],F),h.length=0,this._consumeInterpolation(n,F,c),this._beginToken(t)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(h.join(""))]),h.length=0,this._consumeEntity(t),this._beginToken(t)):h.push(this._readChar())}this._inInterpolation=!1;let b=this._processCarriageReturns(h.join(""));return this._endToken([b]),b}_consumeInterpolation(t,n,i){let c=[];this._beginToken(t,n),c.push(this._interpolationConfig.start);let h=this._cursor.clone(),b=null,F=!1;for(;this._cursor.peek()!==0&&(i===null||!i());){let A=this._cursor.clone();if(this._isTagStart()){this._cursor=A,c.push(this._getProcessedChars(h,A)),this._endToken(c);return}if(b===null)if(this._attemptStr(this._interpolationConfig.end)){c.push(this._getProcessedChars(h,A)),c.push(this._interpolationConfig.end),this._endToken(c);return}else this._attemptStr("//")&&(F=!0);let B=this._cursor.peek();this._cursor.advance(),B===92?this._cursor.advance():B===b?b=null:!F&&b===null&&Yr(B)&&(b=B)}c.push(this._getProcessedChars(h,this._cursor)),this._endToken(c)}_getProcessedChars(t,n){return this._processCarriageReturns(n.getChars(t))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._cursor.peek()===64||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let t=this._cursor.clone();t.advance();let n=t.peek();if(97<=n&&n<=122||65<=n&&n<=90||n===47||n===33)return!0}return!1}_isBlockStart(){if(this._tokenizeBlocks&&this._cursor.peek()===64){let t=this._cursor.clone();if(t.advance(),ds(t.peek()))return!0}return!1}_readUntil(t){let n=this._cursor.clone();return this._attemptUntilChar(t),this._cursor.getChars(n)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===22}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===20}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;if(this._interpolationConfig){let t=this._cursor.clone(),n=this._attemptStr(this._interpolationConfig.start);return this._cursor=t,!n}return!0}_handleFullNameStackForTagOpen(t,n){let i=mr(t,n);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===i)&&this._fullNameStack.push(i)}_handleFullNameStackForTagClose(t,n){let i=mr(t,n);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===i&&this._fullNameStack.pop()}};function Z(t){return!ur(t)||t===0}function us(t){return ur(t)||t===62||t===60||t===47||t===39||t===34||t===61||t===0}function Rc(t){return(t<97||122<t)&&(t<65||90<t)&&(t<48||t>57)}function zc(t){return t===59||t===0||!Uu(t)}function $c(t){return t===59||t===0||!cr(t)}function Hc(t){return t!==125}function qc(t,n){return cs(t)===cs(n)}function cs(t){return t>=97&&t<=122?t-97+65:t}function ds(t){return cr(t)||Gr(t)||t===95}function ps(t){return t!==59&&Z(t)}function Uc(t){let n=[],i;for(let c=0;c<t.length;c++){let h=t[c];i&&i.type===5&&h.type===5||i&&i.type===16&&h.type===16?(i.parts[0]+=h.parts[0],i.sourceSpan.end=h.sourceSpan.end):(i=h,n.push(i))}return n}var hs=class xn{constructor(n,i){if(n instanceof xn){this.file=n.file,this.input=n.input,this.end=n.end;let c=n.state;this.state={peek:c.peek,offset:c.offset,line:c.line,column:c.column}}else{if(!i)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=n,this.input=n.content,this.end=i.endPos,this.state={peek:-1,offset:i.startPos,line:i.startLine,column:i.startCol}}}clone(){return new xn(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(n){return this.state.offset-n.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(n,i){n=n||this;let c=n;if(i)for(;this.diff(n)>0&&i.indexOf(n.peek())!==-1;)c===n&&(n=n.clone()),n.advance();let h=this.locationFromCursor(n),b=this.locationFromCursor(this),F=c!==n?this.locationFromCursor(c):h;return new U(h,b,F)}getChars(n){return this.input.substring(n.state.offset,this.state.offset)}charAt(n){return this.input.charCodeAt(n)}advanceState(n){if(n.offset>=this.end)throw this.state=n,new tn('Unexpected character "EOF"',this);let i=this.charAt(n.offset);i===10?(n.line++,n.column=0):Kr(i)||n.column++,n.offset++,this.updatePeek(n)}updatePeek(n){n.peek=n.offset>=this.end?0:this.charAt(n.offset)}locationFromCursor(n){return new Xr(n.file,n.state.offset,n.state.line,n.state.column)}},Wc=class Dn extends hs{constructor(n,i){n instanceof Dn?(super(n),this.internalState={...n.internalState}):(super(n,i),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new Dn(this)}getChars(n){let i=n.clone(),c="";for(;i.internalState.offset<this.internalState.offset;)c+=String.fromCodePoint(i.peek()),i.advance();return c}processEscapeSequence(){let n=()=>this.internalState.peek;if(n()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),n()===110)this.state.peek=10;else if(n()===114)this.state.peek=13;else if(n()===118)this.state.peek=11;else if(n()===116)this.state.peek=9;else if(n()===98)this.state.peek=8;else if(n()===102)this.state.peek=12;else if(n()===117)if(this.advanceState(this.internalState),n()===123){this.advanceState(this.internalState);let i=this.clone(),c=0;for(;n()!==125;)this.advanceState(this.internalState),c++;this.state.peek=this.decodeHexDigits(i,c)}else{let i=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(i,4)}else if(n()===120){this.advanceState(this.internalState);let i=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(i,2)}else if($a(n())){let i="",c=0,h=this.clone();for(;$a(n())&&c<3;)h=this.clone(),i+=String.fromCodePoint(n()),this.advanceState(this.internalState),c++;this.state.peek=parseInt(i,8),this.internalState=h.internalState}else Kr(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(n,i){let c=this.input.slice(n.internalState.offset,n.internalState.offset+i),h=parseInt(c,16);if(isNaN(h))throw n.state=n.internalState,new tn("Invalid hexadecimal escape sequence",n);return h}},tn=class{constructor(t,n){this.msg=t,this.cursor=n}},ce=class vo extends qa{static create(n,i,c){return new vo(n,i,c)}constructor(n,i,c){super(i,c),this.elementName=n}},Vc=class{constructor(t,n){this.rootNodes=t,this.errors=n}},Jc=class{constructor(t){this.getTagDefinition=t}parse(t,n,i,c=!1,h){let b=V=>(K,...re)=>V(K.toLowerCase(),...re),F=c?this.getTagDefinition:b(this.getTagDefinition),A=V=>F(V).getContentType(),B=c?h:b(h),z=Pc(t,n,h?(V,K,re,se)=>{let le=B(V,K,re,se);return le!==void 0?le:A(V)}:A,i),I=i&&i.canSelfClose||!1,G=i&&i.allowHtmComponentClosingTags||!1,q=new Gc(z.tokens,F,I,G,c);return q.build(),new Vc(q.rootNodes,z.errors.concat(q.errors))}},Gc=class wo{constructor(n,i,c,h,b){this.tokens=n,this.getTagDefinition=i,this.canSelfClose=c,this.allowHtmComponentClosingTags=h,this.isTagNameCaseSensitive=b,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==34;)this._peek.type===0||this._peek.type===4?this._consumeStartTag(this._advance()):this._peek.type===3?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===20?this._consumeExpansion(this._advance()):this._peek.type===25?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===27?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===30?(this._closeVoidElement(),this._consumeLet(this._advance())):this._peek.type===18?this._consumeDocType(this._advance()):this._peek.type===33?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._advance();for(let n of this._containerStack)n instanceof ft&&this.errors.push(ce.create(n.name,n.sourceSpan,`Unclosed block "${n.name}"`))}_advance(){let n=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],n}_advanceIf(n){return this._peek.type===n?this._advance():null}_consumeCdata(n){let i=this._advance(),c=this._getText(i),h=this._advanceIf(13);this._addToParent(new Cc(c,new U(n.sourceSpan.start,(h||i).sourceSpan.end),[i]))}_consumeComment(n){let i=this._advanceIf(7),c=this._advanceIf(11),h=i!=null?i.parts[0].trim():null,b=c==null?n.sourceSpan:new U(n.sourceSpan.start,c.sourceSpan.end,n.sourceSpan.fullStart);this._addToParent(new kc(h,b))}_consumeDocType(n){let i=this._advanceIf(7),c=this._advanceIf(19),h=i!=null?i.parts[0].trim():null,b=new U(n.sourceSpan.start,(c||i||n).sourceSpan.end);this._addToParent(new Ac(h,b))}_consumeExpansion(n){let i=this._advance(),c=this._advance(),h=[];for(;this._peek.type===21;){let F=this._parseExpansionCase();if(!F)return;h.push(F)}if(this._peek.type!==24){this.errors.push(ce.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));return}let b=new U(n.sourceSpan.start,this._peek.sourceSpan.end,n.sourceSpan.fullStart);this._addToParent(new Fc(i.parts[0],c.parts[0],h,b,i.sourceSpan)),this._advance()}_parseExpansionCase(){let n=this._advance();if(this._peek.type!==22)return this.errors.push(ce.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;let i=this._advance(),c=this._collectExpansionExpTokens(i);if(!c)return null;let h=this._advance();c.push({type:34,parts:[],sourceSpan:h.sourceSpan});let b=new wo(c,this.getTagDefinition,this.canSelfClose,this.allowHtmComponentClosingTags,this.isTagNameCaseSensitive);if(b.build(),b.errors.length>0)return this.errors=this.errors.concat(b.errors),null;let F=new U(n.sourceSpan.start,h.sourceSpan.end,n.sourceSpan.fullStart),A=new U(i.sourceSpan.start,h.sourceSpan.end,i.sourceSpan.fullStart);return new Ec(n.parts[0],b.rootNodes,F,n.sourceSpan,A)}_collectExpansionExpTokens(n){let i=[],c=[22];for(;;){if((this._peek.type===20||this._peek.type===22)&&c.push(this._peek.type),this._peek.type===23)if(ms(c,22)){if(c.pop(),c.length===0)return i}else return this.errors.push(ce.create(null,n.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===24)if(ms(c,20))c.pop();else return this.errors.push(ce.create(null,n.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===34)return this.errors.push(ce.create(null,n.sourceSpan,"Invalid ICU message. Missing '}'.")),null;i.push(this._advance())}}_getText(n){let i=n.parts[0];if(i.length>0&&i[0]==`
|
|
20
20
|
`){let c=this._getClosestParentElement();c!=null&&c.children.length==0&&this.getTagDefinition(c.name).ignoreFirstLf&&(i=i.substring(1))}return i}_consumeText(n){let i=[n],c=n.sourceSpan,h=n.parts[0];if(h.length>0&&h[0]===`
|
|
21
|
-
`){let b=this._getContainer();b!=null&&b.children.length===0&&this.getTagDefinition(b.name).ignoreFirstLf&&(h=h.substring(1),i[0]={type:n.type,sourceSpan:n.sourceSpan,parts:[h]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)n=this._advance(),i.push(n),n.type===8?h+=n.parts.join("").replace(/&([^;]+);/g,
|
|
21
|
+
`){let b=this._getContainer();b!=null&&b.children.length===0&&this.getTagDefinition(b.name).ignoreFirstLf&&(h=h.substring(1),i[0]={type:n.type,sourceSpan:n.sourceSpan,parts:[h]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)n=this._advance(),i.push(n),n.type===8?h+=n.parts.join("").replace(/&([^;]+);/g,fs):n.type===9?h+=n.parts[0]:h+=n.parts.join("");if(h.length>0){let b=n.sourceSpan;this._addToParent(new wc(h,new U(c.start,b.end,c.fullStart,c.details),i))}}_closeVoidElement(){let n=this._getContainer();n instanceof He&&this.getTagDefinition(n.name).isVoid&&this._containerStack.pop()}_consumeStartTag(n){let[i,c]=n.parts,h=[];for(;this._peek.type===14;)h.push(this._consumeAttr(this._advance()));let b=this._getElementFullName(i,c,this._getClosestParentElement()),F=!1;if(this._peek.type===2){this._advance(),F=!0;let V=this.getTagDefinition(b);this.canSelfClose||V.canSelfClose||hr(b)!==null||V.isVoid||this.errors.push(ce.create(b,n.sourceSpan,`Only void, custom and foreign elements can be self closed "${n.parts[1]}"`))}else this._peek.type===1&&(this._advance(),F=!1);let A=this._peek.sourceSpan.fullStart,B=new U(n.sourceSpan.start,A,n.sourceSpan.fullStart),z=new U(n.sourceSpan.start,A,n.sourceSpan.fullStart),I=new U(n.sourceSpan.start.moveBy(1),n.sourceSpan.end),G=new He(b,h,[],B,z,void 0,I),q=this._getContainer();this._pushContainer(G,q instanceof He&&this.getTagDefinition(q.name).isClosedByChild(G.name)),F?this._popContainer(b,He,B):n.type===4&&(this._popContainer(b,He,null),this.errors.push(ce.create(b,B,`Opening tag "${b}" not terminated.`)))}_pushContainer(n,i){i&&this._containerStack.pop(),this._addToParent(n),this._containerStack.push(n)}_consumeEndTag(n){let i=this.allowHtmComponentClosingTags&&n.parts.length===0?null:this._getElementFullName(n.parts[0],n.parts[1],this._getClosestParentElement());if(i&&this.getTagDefinition(i).isVoid)this.errors.push(ce.create(i,n.sourceSpan,`Void elements do not have end tags "${n.parts[1]}"`));else if(!this._popContainer(i,He,n.sourceSpan)){let c=`Unexpected closing tag "${i}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(ce.create(i,n.sourceSpan,c))}}_popContainer(n,i,c){let h=!1;for(let b=this._containerStack.length-1;b>=0;b--){let F=this._containerStack[b];if(hr(F.name)?F.name===n:(n==null||F.name.toLowerCase()===n.toLowerCase())&&F instanceof i)return F.endSourceSpan=c,F.sourceSpan.end=c!==null?c.end:F.sourceSpan.end,this._containerStack.splice(b,this._containerStack.length-b),!h;(F instanceof ft||F instanceof He&&!this.getTagDefinition(F.name).closedByParent)&&(h=!0)}return!1}_consumeAttr(n){let i=mr(n.parts[0],n.parts[1]),c=n.sourceSpan.end,h;this._peek.type===15&&(h=this._advance());let b="",F=[],A,B;if(this._peek.type===16)for(A=this._peek.sourceSpan,B=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let I=this._advance();F.push(I),I.type===17?b+=I.parts.join("").replace(/&([^;]+);/g,fs):I.type===9?b+=I.parts[0]:b+=I.parts.join(""),B=c=I.sourceSpan.end}this._peek.type===15&&(B=c=this._advance().sourceSpan.end);let z=A&&B&&new U(h?.sourceSpan.start??A.start,B,h?.sourceSpan.fullStart??A.fullStart);return new Sc(i,b,new U(n.sourceSpan.start,c,n.sourceSpan.fullStart),n.sourceSpan,z,F.length>0?F:void 0,void 0)}_consumeBlockOpen(n){let i=[];for(;this._peek.type===28;){let A=this._advance();i.push(new as(A.parts[0],A.sourceSpan))}this._peek.type===26&&this._advance();let c=this._peek.sourceSpan.fullStart,h=new U(n.sourceSpan.start,c,n.sourceSpan.fullStart),b=new U(n.sourceSpan.start,c,n.sourceSpan.fullStart),F=new ft(n.parts[0],i,[],h,n.sourceSpan,b);this._pushContainer(F,!1)}_consumeBlockClose(n){this._popContainer(null,ft,n.sourceSpan)||this.errors.push(ce.create(null,n.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(n){let i=[];for(;this._peek.type===28;){let A=this._advance();i.push(new as(A.parts[0],A.sourceSpan))}let c=this._peek.sourceSpan.fullStart,h=new U(n.sourceSpan.start,c,n.sourceSpan.fullStart),b=new U(n.sourceSpan.start,c,n.sourceSpan.fullStart),F=new ft(n.parts[0],i,[],h,n.sourceSpan,b);this._pushContainer(F,!1),this._popContainer(null,ft,null),this.errors.push(ce.create(n.parts[0],h,`Incomplete block "${n.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(n){let i=n.parts[0],c,h;if(this._peek.type!==31){this.errors.push(ce.create(n.parts[0],n.sourceSpan,`Invalid @let declaration "${i}". Declaration must have a value.`));return}else c=this._advance();if(this._peek.type!==32){this.errors.push(ce.create(n.parts[0],n.sourceSpan,`Unterminated @let declaration "${i}". Declaration must be terminated with a semicolon.`));return}else h=this._advance();let b=h.sourceSpan.fullStart,F=new U(n.sourceSpan.start,b,n.sourceSpan.fullStart),A=n.sourceSpan.toString().lastIndexOf(i),B=n.sourceSpan.start.moveBy(A),z=new U(B,n.sourceSpan.end),I=new ss(i,c.parts[0],F,z,c.sourceSpan);this._addToParent(I)}_consumeIncompleteLet(n){let i=n.parts[0]??"",c=i?` "${i}"`:"";if(i.length>0){let h=n.sourceSpan.toString().lastIndexOf(i),b=n.sourceSpan.start.moveBy(h),F=new U(b,n.sourceSpan.end),A=new U(n.sourceSpan.start,n.sourceSpan.start.moveBy(0)),B=new ss(i,"",n.sourceSpan,F,A);this._addToParent(B)}this.errors.push(ce.create(n.parts[0],n.sourceSpan,`Incomplete @let declaration${c}. @let declarations must be written as \`@let <name> = <value>;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let n=this._containerStack.length-1;n>-1;n--)if(this._containerStack[n]instanceof He)return this._containerStack[n];return null}_addToParent(n){let i=this._getContainer();i===null?this.rootNodes.push(n):i.children.push(n)}_getElementFullName(n,i,c){if(n===""&&(n=this.getTagDefinition(i).implicitNamespacePrefix||"",n===""&&c!=null)){let h=pr(c.name)[1];this.getTagDefinition(h).preventNamespaceInheritance||(n=hr(c.name))}return mr(n,i)}};function ms(t,n){return t.length>0&&t[t.length-1]===n}function fs(t,n){return br[n]!==void 0?br[n]||t:/^#x[a-f0-9]+$/i.test(n)?String.fromCodePoint(parseInt(n.slice(2),16)):/^#\d+$/.test(n)?String.fromCodePoint(parseInt(n.slice(1),10)):t}var Kc=class extends Jc{constructor(){super(Zr)}parse(t,n,i,c=!1,h){return super.parse(t,n,i,c,h)}},rn=null,Yc=()=>(rn||(rn=new Kc),rn);function gs(t,n={}){let{canSelfClose:i=!1,allowHtmComponentClosingTags:c=!1,isTagNameCaseSensitive:h=!1,getTagContentType:b,tokenizeAngularBlocks:F=!1,tokenizeAngularLetDeclaration:A=!1}=n;return Yc().parse(t,"angular-html-parser",{tokenizeExpansionForms:F,interpolationConfig:void 0,canSelfClose:i,allowHtmComponentClosingTags:c,tokenizeBlocks:F,tokenizeLet:A},h,b)}function Xc(t,n){let i=new SyntaxError(t+" ("+n.loc.start.line+":"+n.loc.start.column+")");return Object.assign(i,n)}var Zc=Xc,Mt=3;function Qc(t){let n=t.slice(0,Mt);if(n!=="---"&&n!=="+++")return;let i=t.indexOf(`
|
|
22
22
|
`,Mt);if(i===-1)return;let c=t.slice(Mt,i).trim(),h=t.indexOf(`
|
|
23
23
|
${n}`,i),b=c;if(b||(b=n==="+++"?"toml":"yaml"),h===-1&&n==="---"&&b==="yaml"&&(h=t.indexOf(`
|
|
24
|
-
...`,i)),h===-1)return;let F=h+1+Mt,A=t.charAt(F+1);if(!/\s?/u.test(A))return;let B=t.slice(0,F);return{type:"front-matter",language:b,explicitLanguage:c,value:t.slice(i+1,h),startDelimiter:n,endDelimiter:B.slice(-Mt),raw:B}}function td(t){let n=ed(t);if(!n)return{content:t};let{raw:i}=n;return{frontMatter:n,content:k(!1,i,/[^\n]/gu," ")+t.slice(i.length)}}var rd=td,Dr={attrs:!0,children:!0,cases:!0,expression:!0},xs=new Set(["parent"]),bt,nn,an,nd=class qt{constructor(n={}){v(this,bt),w(this,"type"),w(this,"parent");for(let i of new Set([...xs,...Object.keys(n)]))this.setProperty(i,n[i])}setProperty(n,i){if(this[n]!==i){if(n in Dr&&(i=i.map(c=>this.createChild(c))),!xs.has(n)){this[n]=i;return}Object.defineProperty(this,n,{value:i,enumerable:!1,configurable:!0})}}map(n){let i;for(let c in Dr){let h=this[c];if(h){let b=sd(h,F=>F.map(n));i!==h&&(i||(i=new qt({parent:this.parent})),i.setProperty(c,b))}}if(i)for(let c in this)c in Dr||(i[c]=this[c]);return n(i||this)}walk(n){for(let i in Dr){let c=this[i];if(c)for(let h=0;h<c.length;h++)c[h].walk(n)}n(this)}createChild(n){let i=n instanceof qt?n.clone():new qt(n);return i.setProperty("parent",this),i}insertChildBefore(n,i){let c=this.$children;c.splice(c.indexOf(n),0,this.createChild(i))}removeChild(n){let i=this.$children;i.splice(i.indexOf(n),1)}replaceChild(n,i){let c=this.$children;c[c.indexOf(n)]=this.createChild(i)}clone(){return new qt(this)}get $children(){return this[y(this,bt,nn)]}set $children(n){this[y(this,bt,nn)]=n}get firstChild(){var n;return(n=this.$children)==null?void 0:n[0]}get lastChild(){return Ft(!0,this.$children,-1)}get prev(){let n=y(this,bt,an);return n[n.indexOf(this)-1]}get next(){let n=y(this,bt,an);return n[n.indexOf(this)+1]}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+":"+this.name:this.name}get attrMap(){return Object.fromEntries(this.attrs.map(n=>[n.fullName,n.value]))}};bt=new WeakSet,nn=function(){return this.type==="angularIcuCase"?"expression":this.type==="angularIcuExpression"?"cases":"children"},an=function(){var t;return((t=this.parent)==null?void 0:t.$children)??[]};var ad=nd;function sd(t,n){let i=t.map(n);return i.some((c,h)=>c!==t[h])?i:t}var od=[{regex:/^(\[if([^\]]*)\]>)(.*?)<!\s*\[endif\]$/su,parse:ld},{regex:/^\[if([^\]]*)\]><!$/u,parse:ud},{regex:/^<!\s*\[endif\]$/u,parse:cd}];function id(t,n){if(t.value)for(let{regex:i,parse:c}of od){let h=t.value.match(i);if(h)return c(t,n,h)}return null}function ld(t,n,i){let[,c,h,b]=i,F=4+c.length,A=t.sourceSpan.start.moveBy(F),B=A.moveBy(b.length),[z,I]=(()=>{try{return[!0,n(b,A).children]}catch{return[!1,[{type:"text",value:b,sourceSpan:new U(A,B)}]]}})();return{type:"ieConditionalComment",complete:z,children:I,condition:k(!1,h.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan,startSourceSpan:new U(t.sourceSpan.start,A),endSourceSpan:new U(B,t.sourceSpan.end)}}function ud(t,n,i){let[,c]=i;return{type:"ieConditionalStartComment",condition:k(!1,c.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan}}function cd(t){return{type:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}var sn=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alt","autocomplete","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootclonable","shadowrootdelegatesfocus","shadowrootmode"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]),dd=new Set(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]);function pd(t){if(t.type==="block"){if(t.name=k(!1,t.name.toLowerCase(),/\s+/gu," ").trim(),t.type="angularControlFlowBlock",!Pr(t.parameters)){delete t.parameters;return}for(let n of t.parameters)n.type="angularControlFlowBlockParameter";t.parameters={type:"angularControlFlowBlockParameters",children:t.parameters,sourceSpan:new U(t.parameters[0].sourceSpan.start,Ft(!1,t.parameters,-1).sourceSpan.end)}}}function hd(t){t.type==="letDeclaration"&&(t.type="angularLetDeclaration",t.id=t.name,t.init={type:"angularLetDeclarationInitializer",sourceSpan:new U(t.valueSpan.start,t.valueSpan.end),value:t.value},delete t.name,delete t.value)}function md(t){(t.type==="plural"||t.type==="select")&&(t.clause=t.type,t.type="angularIcuExpression"),t.type==="expansionCase"&&(t.type="angularIcuCase")}function Ds(t,n,i){let{name:c,canSelfClose:h=!0,normalizeTagName:b=!1,normalizeAttributeName:F=!1,allowHtmComponentClosingTags:A=!1,isTagNameCaseSensitive:B=!1,shouldParseAsRawText:z}=n,{rootNodes:I,errors:G}=bs(t,{canSelfClose:h,allowHtmComponentClosingTags:A,isTagNameCaseSensitive:B,getTagContentType:z?(...M)=>z(...M)?ve.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:c==="angular"?!0:void 0,tokenizeAngularLetDeclaration:c==="angular"?!0:void 0});if(c==="vue"){if(I.some(Q=>Q.type==="docType"&&Q.value==="html"||Q.type==="element"&&Q.name.toLowerCase()==="html"))return Ds(t,on,i);let M,J=()=>M??(M=bs(t,{canSelfClose:h,allowHtmComponentClosingTags:A,isTagNameCaseSensitive:B})),ne=Q=>J().rootNodes.find(({startSourceSpan:de})=>de&&de.start.offset===Q.startSourceSpan.start.offset)??Q;for(let[Q,de]of I.entries()){let{endSourceSpan:xt,startSourceSpan:Cd}=de;if(xt===null)G=J().errors,I[Q]=ne(de);else if(fd(de,i)){let ws=J().errors.find(Cs=>Cs.span.start.offset>Cd.start.offset&&Cs.span.start.offset<xt.end.offset);ws&&ys(ws),I[Q]=ne(de)}}}G.length>0&&ys(G[0]);let q=M=>{let J=M.name.startsWith(":")?M.name.slice(1).split(":")[0]:null,ne=M.nameSpan.toString(),Q=J!==null&&ne.startsWith(`${J}:`),de=Q?ne.slice(J.length+1):ne;M.name=de,M.namespace=J,M.hasExplicitNamespace=Q},V=M=>{switch(M.type){case"element":q(M);for(let J of M.attrs)q(J),J.valueSpan?(J.value=J.valueSpan.toString(),/["']/u.test(J.value[0])&&(J.value=J.value.slice(1,-1))):J.value=null;break;case"comment":M.value=M.sourceSpan.toString().slice(4,-3);break;case"text":M.value=M.sourceSpan.toString();break}},K=(M,J)=>{let ne=M.toLowerCase();return J(ne)?ne:M},re=M=>{if(M.type==="element"&&(b&&(!M.namespace||M.namespace===M.tagDefinition.implicitNamespacePrefix||St(M))&&(M.name=K(M.name,J=>dd.has(J))),F))for(let J of M.attrs)J.namespace||(J.name=K(J.name,ne=>sn.has(M.name)&&(sn.get("*").has(ne)||sn.get(M.name).has(ne))))},se=M=>{M.sourceSpan&&M.endSourceSpan&&(M.sourceSpan=new U(M.sourceSpan.start,M.endSourceSpan.end))},le=M=>{if(M.type==="element"){let J=Zr(B?M.name:M.name.toLowerCase());!M.namespace||M.namespace===J.implicitNamespacePrefix||St(M)?M.tagDefinition=J:M.tagDefinition=Zr("")}};return is(new class extends jc{visitExpansionCase(M,J){c==="angular"&&this.visitChildren(J,ne=>{ne(M.expression)})}visit(M){V(M),le(M),re(M),se(M)}},I),I}function fd(t,n){var i;if(t.type!=="element"||t.name!=="template")return!1;let c=(i=t.attrs.find(h=>h.name==="lang"))==null?void 0:i.value;return!c||tr(n,{language:c})==="html"}function ys(t){let{msg:n,span:{start:i,end:c}}=t;throw Qc(n,{loc:{start:{line:i.line+1,column:i.col+1},end:{line:c.line+1,column:c.col+1}},cause:t})}function vs(t,n,i={},c=!0){let{frontMatter:h,content:b}=c?rd(t):{frontMatter:null,content:t},F=new qa(t,i.filepath),A=new Xr(F,0,0,0),B=A.moveBy(t.length),z={type:"root",sourceSpan:new U(A,B),children:Ds(b,n,i)};if(h){let q=new Xr(F,0,0,0),V=q.moveBy(h.raw.length);h.sourceSpan=new U(q,V),z.children.unshift(h)}let I=new ad(z),G=(q,V)=>{let{offset:K}=V,re=k(!1,t.slice(0,K),/[^\n\r]/gu," "),se=vs(re+q,n,i,!1);se.sourceSpan=new U(V,Ft(!1,se.children,-1).sourceSpan.end);let le=se.children[0];return le.length===K?se.children.shift():(le.sourceSpan=new U(le.sourceSpan.start.moveBy(K),le.sourceSpan.end),le.value=le.value.slice(K)),se};return I.walk(q=>{if(q.type==="comment"){let V=id(q,G);V&&q.parent.replaceChild(q,V)}pd(q),hd(q),md(q)}),I}function Rt(t){return{parse:(n,i)=>vs(n,t,i),hasPragma:Pu,hasIgnorePragma:Iu,astFormat:"html",locStart:At,locEnd:sr}}var on={name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0},gd=Rt(on),bd=new Set(["mj-style","mj-raw"]),xd=Rt({...on,name:"mjml",shouldParseAsRawText:t=>bd.has(t)}),Dd=Rt({name:"angular"}),yd=Rt({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(t,n,i,c){return t.toLowerCase()!=="html"&&!i&&(t!=="template"||c.some(({name:h,value:b})=>h==="lang"&&b!=="html"&&b!==""&&b!==void 0))}}),vd=Rt({name:"lwc",canSelfClose:!1}),wd={html:cc};return g(C)})})(un)),un.exports}var Fo=np();const ap=rp(Fo),sp=Td({__proto__:null,default:ap},[Fo]);var op=Object.create,In=Object.defineProperty,ip=Object.getOwnPropertyDescriptor,lp=Object.getOwnPropertyNames,up=Object.getPrototypeOf,cp=Object.prototype.hasOwnProperty,Eo=e=>{throw TypeError(e)},dp=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),On=(e,r)=>{for(var a in r)In(e,a,{get:r[a],enumerable:!0})},pp=(e,r,a,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of lp(r))!cp.call(e,l)&&l!==a&&In(e,l,{get:()=>r[l],enumerable:!(s=ip(r,l))||s.enumerable});return e},hp=(e,r,a)=>(a=e!=null?op(up(e)):{},pp(In(a,"default",{value:e,enumerable:!0}),e)),mp=(e,r,a)=>r.has(e)||Eo("Cannot "+a),fp=(e,r,a)=>r.has(e)?Eo("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,a),$t=(e,r,a)=>(mp(e,r,"access private method"),a),gp=dp(e=>{Object.defineProperty(e,"__esModule",{value:!0});function r(){return new Proxy({},{get:()=>u=>u})}var a=/\r\n|[\n\r\u2028\u2029]/;function s(u,d,p){let f=Object.assign({column:0,line:-1},u.start),m=Object.assign({},f,u.end),{linesAbove:g=2,linesBelow:w=3}=p||{},D=f.line,y=f.column,v=m.line,E=m.column,C=Math.max(D-(g+1),0),x=Math.min(d.length,v+w);D===-1&&(C=0),v===-1&&(x=d.length);let k=v-D,j={};if(k)for(let N=0;N<=k;N++){let P=N+D;if(!y)j[P]=!0;else if(N===0){let R=d[P-1].length;j[P]=[y,R-y+1]}else if(N===k)j[P]=[0,E];else{let R=d[P-N].length;j[P]=[0,R]}}else y===E?y?j[D]=[y,0]:j[D]=!0:j[D]=[y,E-y];return{start:C,end:x,markerLines:j}}function l(u,d,p={}){let f=r(),m=u.split(a),{start:g,end:w,markerLines:D}=s(d,m,p),y=d.start&&typeof d.start.column=="number",v=String(w).length,E=u.split(a,w).slice(g,w).map((C,x)=>{let k=g+1+x,j=` ${` ${k}`.slice(-v)} |`,N=D[k],P=!D[k+1];if(N){let R="";if(Array.isArray(N)){let _=C.slice(0,Math.max(N[0]-1,0)).replace(/[^\t]/g," "),O=N[1]||1;R=[`
|
|
24
|
+
...`,i)),h===-1)return;let F=h+1+Mt,A=t.charAt(F+1);if(!/\s?/u.test(A))return;let B=t.slice(0,F);return{type:"front-matter",language:b,explicitLanguage:c,value:t.slice(i+1,h),startDelimiter:n,endDelimiter:B.slice(-Mt),raw:B}}function ed(t){let n=Qc(t);if(!n)return{content:t};let{raw:i}=n;return{frontMatter:n,content:k(!1,i,/[^\n]/gu," ")+t.slice(i.length)}}var td=ed,Dr={attrs:!0,children:!0,cases:!0,expression:!0},bs=new Set(["parent"]),bt,nn,an,rd=class qt{constructor(n={}){v(this,bt),w(this,"type"),w(this,"parent");for(let i of new Set([...bs,...Object.keys(n)]))this.setProperty(i,n[i])}setProperty(n,i){if(this[n]!==i){if(n in Dr&&(i=i.map(c=>this.createChild(c))),!bs.has(n)){this[n]=i;return}Object.defineProperty(this,n,{value:i,enumerable:!1,configurable:!0})}}map(n){let i;for(let c in Dr){let h=this[c];if(h){let b=ad(h,F=>F.map(n));i!==h&&(i||(i=new qt({parent:this.parent})),i.setProperty(c,b))}}if(i)for(let c in this)c in Dr||(i[c]=this[c]);return n(i||this)}walk(n){for(let i in Dr){let c=this[i];if(c)for(let h=0;h<c.length;h++)c[h].walk(n)}n(this)}createChild(n){let i=n instanceof qt?n.clone():new qt(n);return i.setProperty("parent",this),i}insertChildBefore(n,i){let c=this.$children;c.splice(c.indexOf(n),0,this.createChild(i))}removeChild(n){let i=this.$children;i.splice(i.indexOf(n),1)}replaceChild(n,i){let c=this.$children;c[c.indexOf(n)]=this.createChild(i)}clone(){return new qt(this)}get $children(){return this[y(this,bt,nn)]}set $children(n){this[y(this,bt,nn)]=n}get firstChild(){var n;return(n=this.$children)==null?void 0:n[0]}get lastChild(){return Ft(!0,this.$children,-1)}get prev(){let n=y(this,bt,an);return n[n.indexOf(this)-1]}get next(){let n=y(this,bt,an);return n[n.indexOf(this)+1]}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+":"+this.name:this.name}get attrMap(){return Object.fromEntries(this.attrs.map(n=>[n.fullName,n.value]))}};bt=new WeakSet,nn=function(){return this.type==="angularIcuCase"?"expression":this.type==="angularIcuExpression"?"cases":"children"},an=function(){var t;return((t=this.parent)==null?void 0:t.$children)??[]};var nd=rd;function ad(t,n){let i=t.map(n);return i.some((c,h)=>c!==t[h])?i:t}var sd=[{regex:/^(\[if([^\]]*)\]>)(.*?)<!\s*\[endif\]$/su,parse:id},{regex:/^\[if([^\]]*)\]><!$/u,parse:ld},{regex:/^<!\s*\[endif\]$/u,parse:ud}];function od(t,n){if(t.value)for(let{regex:i,parse:c}of sd){let h=t.value.match(i);if(h)return c(t,n,h)}return null}function id(t,n,i){let[,c,h,b]=i,F=4+c.length,A=t.sourceSpan.start.moveBy(F),B=A.moveBy(b.length),[z,I]=(()=>{try{return[!0,n(b,A).children]}catch{return[!1,[{type:"text",value:b,sourceSpan:new U(A,B)}]]}})();return{type:"ieConditionalComment",complete:z,children:I,condition:k(!1,h.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan,startSourceSpan:new U(t.sourceSpan.start,A),endSourceSpan:new U(B,t.sourceSpan.end)}}function ld(t,n,i){let[,c]=i;return{type:"ieConditionalStartComment",condition:k(!1,c.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan}}function ud(t){return{type:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}var sn=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alt","autocomplete","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootclonable","shadowrootdelegatesfocus","shadowrootmode"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]),cd=new Set(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]);function dd(t){if(t.type==="block"){if(t.name=k(!1,t.name.toLowerCase(),/\s+/gu," ").trim(),t.type="angularControlFlowBlock",!Pr(t.parameters)){delete t.parameters;return}for(let n of t.parameters)n.type="angularControlFlowBlockParameter";t.parameters={type:"angularControlFlowBlockParameters",children:t.parameters,sourceSpan:new U(t.parameters[0].sourceSpan.start,Ft(!1,t.parameters,-1).sourceSpan.end)}}}function pd(t){t.type==="letDeclaration"&&(t.type="angularLetDeclaration",t.id=t.name,t.init={type:"angularLetDeclarationInitializer",sourceSpan:new U(t.valueSpan.start,t.valueSpan.end),value:t.value},delete t.name,delete t.value)}function hd(t){(t.type==="plural"||t.type==="select")&&(t.clause=t.type,t.type="angularIcuExpression"),t.type==="expansionCase"&&(t.type="angularIcuCase")}function xs(t,n,i){let{name:c,canSelfClose:h=!0,normalizeTagName:b=!1,normalizeAttributeName:F=!1,allowHtmComponentClosingTags:A=!1,isTagNameCaseSensitive:B=!1,shouldParseAsRawText:z}=n,{rootNodes:I,errors:G}=gs(t,{canSelfClose:h,allowHtmComponentClosingTags:A,isTagNameCaseSensitive:B,getTagContentType:z?(...M)=>z(...M)?ve.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:c==="angular"?!0:void 0,tokenizeAngularLetDeclaration:c==="angular"?!0:void 0});if(c==="vue"){if(I.some(Q=>Q.type==="docType"&&Q.value==="html"||Q.type==="element"&&Q.name.toLowerCase()==="html"))return xs(t,on,i);let M,J=()=>M??(M=gs(t,{canSelfClose:h,allowHtmComponentClosingTags:A,isTagNameCaseSensitive:B})),ne=Q=>J().rootNodes.find(({startSourceSpan:de})=>de&&de.start.offset===Q.startSourceSpan.start.offset)??Q;for(let[Q,de]of I.entries()){let{endSourceSpan:xt,startSourceSpan:wd}=de;if(xt===null)G=J().errors,I[Q]=ne(de);else if(md(de,i)){let vs=J().errors.find(ws=>ws.span.start.offset>wd.start.offset&&ws.span.start.offset<xt.end.offset);vs&&Ds(vs),I[Q]=ne(de)}}}G.length>0&&Ds(G[0]);let q=M=>{let J=M.name.startsWith(":")?M.name.slice(1).split(":")[0]:null,ne=M.nameSpan.toString(),Q=J!==null&&ne.startsWith(`${J}:`),de=Q?ne.slice(J.length+1):ne;M.name=de,M.namespace=J,M.hasExplicitNamespace=Q},V=M=>{switch(M.type){case"element":q(M);for(let J of M.attrs)q(J),J.valueSpan?(J.value=J.valueSpan.toString(),/["']/u.test(J.value[0])&&(J.value=J.value.slice(1,-1))):J.value=null;break;case"comment":M.value=M.sourceSpan.toString().slice(4,-3);break;case"text":M.value=M.sourceSpan.toString();break}},K=(M,J)=>{let ne=M.toLowerCase();return J(ne)?ne:M},re=M=>{if(M.type==="element"&&(b&&(!M.namespace||M.namespace===M.tagDefinition.implicitNamespacePrefix||St(M))&&(M.name=K(M.name,J=>cd.has(J))),F))for(let J of M.attrs)J.namespace||(J.name=K(J.name,ne=>sn.has(M.name)&&(sn.get("*").has(ne)||sn.get(M.name).has(ne))))},se=M=>{M.sourceSpan&&M.endSourceSpan&&(M.sourceSpan=new U(M.sourceSpan.start,M.endSourceSpan.end))},le=M=>{if(M.type==="element"){let J=Zr(B?M.name:M.name.toLowerCase());!M.namespace||M.namespace===J.implicitNamespacePrefix||St(M)?M.tagDefinition=J:M.tagDefinition=Zr("")}};return os(new class extends Nc{visitExpansionCase(M,J){c==="angular"&&this.visitChildren(J,ne=>{ne(M.expression)})}visit(M){V(M),le(M),re(M),se(M)}},I),I}function md(t,n){var i;if(t.type!=="element"||t.name!=="template")return!1;let c=(i=t.attrs.find(h=>h.name==="lang"))==null?void 0:i.value;return!c||tr(n,{language:c})==="html"}function Ds(t){let{msg:n,span:{start:i,end:c}}=t;throw Zc(n,{loc:{start:{line:i.line+1,column:i.col+1},end:{line:c.line+1,column:c.col+1}},cause:t})}function ys(t,n,i={},c=!0){let{frontMatter:h,content:b}=c?td(t):{frontMatter:null,content:t},F=new Ha(t,i.filepath),A=new Xr(F,0,0,0),B=A.moveBy(t.length),z={type:"root",sourceSpan:new U(A,B),children:xs(b,n,i)};if(h){let q=new Xr(F,0,0,0),V=q.moveBy(h.raw.length);h.sourceSpan=new U(q,V),z.children.unshift(h)}let I=new nd(z),G=(q,V)=>{let{offset:K}=V,re=k(!1,t.slice(0,K),/[^\n\r]/gu," "),se=ys(re+q,n,i,!1);se.sourceSpan=new U(V,Ft(!1,se.children,-1).sourceSpan.end);let le=se.children[0];return le.length===K?se.children.shift():(le.sourceSpan=new U(le.sourceSpan.start.moveBy(K),le.sourceSpan.end),le.value=le.value.slice(K)),se};return I.walk(q=>{if(q.type==="comment"){let V=od(q,G);V&&q.parent.replaceChild(q,V)}dd(q),pd(q),hd(q)}),I}function Rt(t){return{parse:(n,i)=>ys(n,t,i),hasPragma:Lu,hasIgnorePragma:Pu,astFormat:"html",locStart:At,locEnd:sr}}var on={name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0},fd=Rt(on),gd=new Set(["mj-style","mj-raw"]),bd=Rt({...on,name:"mjml",shouldParseAsRawText:t=>gd.has(t)}),xd=Rt({name:"angular"}),Dd=Rt({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(t,n,i,c){return t.toLowerCase()!=="html"&&!i&&(t!=="template"||c.some(({name:h,value:b})=>h==="lang"&&b!=="html"&&b!==""&&b!==void 0))}}),yd=Rt({name:"lwc",canSelfClose:!1}),vd={html:uc};return g(C)})})(xo);var Co=xo.exports;const rp=tp(Co),np=Bd({__proto__:null,default:rp},[Co]);var ap=Object.create,Pn=Object.defineProperty,sp=Object.getOwnPropertyDescriptor,op=Object.getOwnPropertyNames,ip=Object.getPrototypeOf,lp=Object.prototype.hasOwnProperty,Fo=e=>{throw TypeError(e)},up=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),In=(e,r)=>{for(var a in r)Pn(e,a,{get:r[a],enumerable:!0})},cp=(e,r,a,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of op(r))!lp.call(e,l)&&l!==a&&Pn(e,l,{get:()=>r[l],enumerable:!(s=sp(r,l))||s.enumerable});return e},dp=(e,r,a)=>(a=e!=null?ap(ip(e)):{},cp(Pn(a,"default",{value:e,enumerable:!0}),e)),pp=(e,r,a)=>r.has(e)||Fo("Cannot "+a),hp=(e,r,a)=>r.has(e)?Fo("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,a),$t=(e,r,a)=>(pp(e,r,"access private method"),a),mp=up(e=>{Object.defineProperty(e,"__esModule",{value:!0});function r(){return new Proxy({},{get:()=>u=>u})}var a=/\r\n|[\n\r\u2028\u2029]/;function s(u,d,p){let f=Object.assign({column:0,line:-1},u.start),m=Object.assign({},f,u.end),{linesAbove:g=2,linesBelow:w=3}=p||{},D=f.line,y=f.column,v=m.line,E=m.column,C=Math.max(D-(g+1),0),x=Math.min(d.length,v+w);D===-1&&(C=0),v===-1&&(x=d.length);let k=v-D,j={};if(k)for(let N=0;N<=k;N++){let P=N+D;if(!y)j[P]=!0;else if(N===0){let R=d[P-1].length;j[P]=[y,R-y+1]}else if(N===k)j[P]=[0,E];else{let R=d[P-N].length;j[P]=[0,R]}}else y===E?y?j[D]=[y,0]:j[D]=!0:j[D]=[y,E-y];return{start:C,end:x,markerLines:j}}function l(u,d,p={}){let f=r(),m=u.split(a),{start:g,end:w,markerLines:D}=s(d,m,p),y=d.start&&typeof d.start.column=="number",v=String(w).length,E=u.split(a,w).slice(g,w).map((C,x)=>{let k=g+1+x,j=` ${` ${k}`.slice(-v)} |`,N=D[k],P=!D[k+1];if(N){let R="";if(Array.isArray(N)){let _=C.slice(0,Math.max(N[0]-1,0)).replace(/[^\t]/g," "),O=N[1]||1;R=[`
|
|
25
25
|
`,f.gutter(j.replace(/\d/g," "))," ",_,f.marker("^").repeat(O)].join(""),P&&p.message&&(R+=" "+f.message(p.message))}return[f.marker(">"),f.gutter(j),C.length>0?` ${C}`:"",R].join("")}else return` ${f.gutter(j)}${C.length>0?` ${C}`:""}`}).join(`
|
|
26
26
|
`);return p.message&&!y&&(E=`${" ".repeat(v+1)}${p.message}
|
|
27
|
-
${E}`),E}e.codeFrameColumns=l}),
|
|
28
|
-
`?"crlf":"cr":"lf"}function
|
|
27
|
+
${E}`),E}e.codeFrameColumns=l}),fp={};In(fp,{__debug:()=>Nf,check:()=>kf,doc:()=>ii,format:()=>Xn,formatWithCursor:()=>ui,getSupportInfo:()=>Af,util:()=>li,version:()=>ef});var gp=(e,r,a,s)=>{if(!(e&&r==null))return r.replaceAll?r.replaceAll(a,s):a.global?r.replace(a,s):r.split(a).join(s)},kr=gp,bp=class{diff(e,r,a={}){let s;typeof a=="function"?(s=a,a={}):"callback"in a&&(s=a.callback);let l=this.castInput(e,a),u=this.castInput(r,a),d=this.removeEmpty(this.tokenize(l,a)),p=this.removeEmpty(this.tokenize(u,a));return this.diffWithOptionsObj(d,p,a,s)}diffWithOptionsObj(e,r,a,s){var l;let u=x=>{if(x=this.postProcess(x,a),s){setTimeout(function(){s(x)},0);return}else return x},d=r.length,p=e.length,f=1,m=d+p;a.maxEditLength!=null&&(m=Math.min(m,a.maxEditLength));let g=(l=a.timeout)!==null&&l!==void 0?l:1/0,w=Date.now()+g,D=[{oldPos:-1,lastComponent:void 0}],y=this.extractCommon(D[0],r,e,0,a);if(D[0].oldPos+1>=p&&y+1>=d)return u(this.buildValues(D[0].lastComponent,r,e));let v=-1/0,E=1/0,C=()=>{for(let x=Math.max(v,-f);x<=Math.min(E,f);x+=2){let k,j=D[x-1],N=D[x+1];j&&(D[x-1]=void 0);let P=!1;if(N){let _=N.oldPos-x;P=N&&0<=_&&_<d}let R=j&&j.oldPos+1<p;if(!P&&!R){D[x]=void 0;continue}if(!R||P&&j.oldPos<N.oldPos?k=this.addToPath(N,!0,!1,0,a):k=this.addToPath(j,!1,!0,1,a),y=this.extractCommon(k,r,e,x,a),k.oldPos+1>=p&&y+1>=d)return u(this.buildValues(k.lastComponent,r,e))||!0;D[x]=k,k.oldPos+1>=p&&(E=Math.min(E,x-1)),y+1>=d&&(v=Math.max(v,x+1))}f++};if(s)(function x(){setTimeout(function(){if(f>m||Date.now()>w)return s(void 0);C()||x()},0)})();else for(;f<=m&&Date.now()<=w;){let x=C();if(x)return x}}addToPath(e,r,a,s,l){let u=e.lastComponent;return u&&!l.oneChangePerToken&&u.added===r&&u.removed===a?{oldPos:e.oldPos+s,lastComponent:{count:u.count+1,added:r,removed:a,previousComponent:u.previousComponent}}:{oldPos:e.oldPos+s,lastComponent:{count:1,added:r,removed:a,previousComponent:u}}}extractCommon(e,r,a,s,l){let u=r.length,d=a.length,p=e.oldPos,f=p-s,m=0;for(;f+1<u&&p+1<d&&this.equals(a[p+1],r[f+1],l);)f++,p++,m++,l.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return m&&!l.oneChangePerToken&&(e.lastComponent={count:m,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=p,f}equals(e,r,a){return a.comparator?a.comparator(e,r):e===r||!!a.ignoreCase&&e.toLowerCase()===r.toLowerCase()}removeEmpty(e){let r=[];for(let a=0;a<e.length;a++)e[a]&&r.push(e[a]);return r}castInput(e,r){return e}tokenize(e,r){return Array.from(e)}join(e){return e.join("")}postProcess(e,r){return e}get useLongestToken(){return!1}buildValues(e,r,a){let s=[],l;for(;e;)s.push(e),l=e.previousComponent,delete e.previousComponent,e=l;s.reverse();let u=s.length,d=0,p=0,f=0;for(;d<u;d++){let m=s[d];if(m.removed)m.value=this.join(a.slice(f,f+m.count)),f+=m.count;else{if(!m.added&&this.useLongestToken){let g=r.slice(p,p+m.count);g=g.map(function(w,D){let y=a[f+D];return y.length>w.length?y:w}),m.value=this.join(g)}else m.value=this.join(r.slice(p,p+m.count));p+=m.count,m.added||(f+=m.count)}}return s}},xp=class extends bp{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},Dp=new xp;function yp(e,r,a){return Dp.diff(e,r,a)}function vp(e){let r=e.indexOf("\r");return r!==-1?e.charAt(r+1)===`
|
|
28
|
+
`?"crlf":"cr":"lf"}function On(e){switch(e){case"cr":return"\r";case"crlf":return`\r
|
|
29
29
|
`;default:return`
|
|
30
|
-
`}}function
|
|
30
|
+
`}}function Eo(e,r){let a;switch(r){case`
|
|
31
31
|
`:a=/\n/gu;break;case"\r":a=/\r/gu;break;case`\r
|
|
32
|
-
`:a=/\r\n/gu;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(r)}.`)}let s=e.match(a);return s?s.length:0}function
|
|
33
|
-
`)}var lt="string",Be="array",Ke="cursor",Te="indent",Le="align",Pe="trim",me="group",ke="fill",fe="if-break",Ie="indent-if-break",Oe="line-suffix",Me="line-suffix-boundary",oe="line",Ae="label",be="break-parent",
|
|
34
|
-
`);)r--;return r<e.length?e.slice(0,r):e}function
|
|
35
|
-
Expected it to be 'string' or 'object'.`;if(ut(e))throw new Error("doc is valid.");let a=Object.prototype.toString.call(e);if(a!=="[object Object]")return`Unexpected doc '${a}'.`;let s=
|
|
36
|
-
Expected it to be ${s}.`}var
|
|
37
|
-
`)):a)}function zp(e){if(e.type===oe)return!0}function $p(e){return zn(e,zp,!1)}function wr(e,r){return e.type===Ae?{...e,contents:r(e.contents)}:r(e)}var Hp=()=>{},qp=Hp;function Er(e){return{type:Te,contents:e}}function wt(e,r){return{type:Le,contents:r,n:e}}function No(e,r={}){return qp(r.expandedStates),{type:me,id:r.id,contents:e,break:!!r.shouldBreak,expandedStates:r.expandedStates}}function Up(e){return wt(Number.NEGATIVE_INFINITY,e)}function Wp(e){return wt({type:"root"},e)}function Vp(e){return wt(-1,e)}function Jp(e,r){return No(e[0],{...r,expandedStates:e})}function Gp(e){return{type:ke,parts:e}}function Kp(e,r="",a={}){return{type:fe,breakContents:e,flatContents:r,groupId:a.groupId}}function Yp(e,r){return{type:Ie,contents:e,groupId:r.groupId,negate:r.negate}}function vn(e){return{type:Oe,contents:e}}var Xp={type:Me},Nr={type:be},Zp={type:Pe},$n={type:oe,hard:!0},jo={type:oe,hard:!0,literal:!0},_o={type:oe},Qp={type:oe,soft:!0},ot=[$n,Nr],Bo=[jo,Nr],st={type:Ke};function To(e,r){let a=[];for(let s=0;s<r.length;s++)s!==0&&a.push(e),a.push(r[s]);return a}function Lo(e,r,a){let s=e;if(r>0){for(let l=0;l<Math.floor(r/a);++l)s=Er(s);s=wt(r%a,s),s=wt(Number.NEGATIVE_INFINITY,s)}return s}function eh(e,r){return e?{type:Ae,label:e,contents:r}:r}function _e(e){var r;if(!e)return"";if(Array.isArray(e)){let a=[];for(let s of e)if(Array.isArray(s))a.push(..._e(s));else{let l=_e(s);l!==""&&a.push(l)}return a}return e.type===fe?{...e,breakContents:_e(e.breakContents),flatContents:_e(e.flatContents)}:e.type===me?{...e,contents:_e(e.contents),expandedStates:(r=e.expandedStates)==null?void 0:r.map(_e)}:e.type===ke?{type:"fill",parts:e.parts.map(_e)}:e.contents?{...e,contents:_e(e.contents)}:e}function th(e){let r=Object.create(null),a=new Set;return s(_e(e));function s(u,d,p){var f,m;if(typeof u=="string")return JSON.stringify(u);if(Array.isArray(u)){let g=u.map(s).filter(Boolean);return g.length===1?g[0]:`[${g.join(", ")}]`}if(u.type===oe){let g=((f=p?.[d+1])==null?void 0:f.type)===be;return u.literal?g?"literalline":"literallineWithoutBreakParent":u.hard?g?"hardline":"hardlineWithoutBreakParent":u.soft?"softline":"line"}if(u.type===be)return((m=p?.[d-1])==null?void 0:m.type)===oe&&p[d-1].hard?void 0:"breakParent";if(u.type===Pe)return"trim";if(u.type===Te)return"indent("+s(u.contents)+")";if(u.type===Le)return u.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+s(u.contents)+")":u.n<0?"dedent("+s(u.contents)+")":u.n.type==="root"?"markAsRoot("+s(u.contents)+")":"align("+JSON.stringify(u.n)+", "+s(u.contents)+")";if(u.type===fe)return"ifBreak("+s(u.breakContents)+(u.flatContents?", "+s(u.flatContents):"")+(u.groupId?(u.flatContents?"":', ""')+`, { groupId: ${l(u.groupId)} }`:"")+")";if(u.type===Ie){let g=[];u.negate&&g.push("negate: true"),u.groupId&&g.push(`groupId: ${l(u.groupId)}`);let w=g.length>0?`, { ${g.join(", ")} }`:"";return`indentIfBreak(${s(u.contents)}${w})`}if(u.type===me){let g=[];u.break&&u.break!=="propagated"&&g.push("shouldBreak: true"),u.id&&g.push(`id: ${l(u.id)}`);let w=g.length>0?`, { ${g.join(", ")} }`:"";return u.expandedStates?`conditionalGroup([${u.expandedStates.map(D=>s(D)).join(",")}]${w})`:`group(${s(u.contents)}${w})`}if(u.type===ke)return`fill([${u.parts.map(g=>s(g)).join(", ")}])`;if(u.type===Oe)return"lineSuffix("+s(u.contents)+")";if(u.type===Me)return"lineSuffixBoundary";if(u.type===Ae)return`label(${JSON.stringify(u.label)}, ${s(u.contents)})`;if(u.type===Ke)return"cursor";throw new Error("Unknown doc type "+u.type)}function l(u){if(typeof u!="symbol")return JSON.stringify(String(u));if(u in r)return r[u];let d=u.description||"symbol";for(let p=0;;p++){let f=d+(p>0?` #${p}`:"");if(!a.has(f))return a.add(f),r[u]=`Symbol.for(${JSON.stringify(f)})`}}}var rh=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function nh(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function ah(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var sh=e=>!(nh(e)||ah(e)),oh=/[^\x20-\x7F]/u;function ih(e){if(!e)return 0;if(!oh.test(e))return e.length;e=e.replace(rh()," ");let r=0;for(let a of e){let s=a.codePointAt(0);s<=31||s>=127&&s<=159||s>=768&&s<=879||(r+=sh(s)?1:2)}return r}var Hn=ih,he=Symbol("MODE_BREAK"),Ee=Symbol("MODE_FLAT"),Dt=Symbol("cursor"),wn=Symbol("DOC_FILL_PRINTED_LENGTH");function Po(){return{value:"",length:0,queue:[]}}function lh(e,r){return Cn(e,{type:"indent"},r)}function uh(e,r,a){return r===Number.NEGATIVE_INFINITY?e.root||Po():r<0?Cn(e,{type:"dedent"},a):r?r.type==="root"?{...e,root:e}:Cn(e,{type:typeof r=="string"?"stringAlign":"numberAlign",n:r},a):e}function Cn(e,r,a){let s=r.type==="dedent"?e.queue.slice(0,-1):[...e.queue,r],l="",u=0,d=0,p=0;for(let v of s)switch(v.type){case"indent":g(),a.useTabs?f(1):m(a.tabWidth);break;case"stringAlign":g(),l+=v.n,u+=v.n.length;break;case"numberAlign":d+=1,p+=v.n;break;default:throw new Error(`Unexpected type '${v.type}'`)}return D(),{...e,value:l,length:u,queue:s};function f(v){l+=" ".repeat(v),u+=a.tabWidth*v}function m(v){l+=" ".repeat(v),u+=v}function g(){a.useTabs?w():D()}function w(){d>0&&f(d),y()}function D(){p>0&&m(p),y()}function y(){d=0,p=0}}function Fn(e){let r=0,a=0,s=e.length;e:for(;s--;){let l=e[s];if(l===Dt){a++;continue}for(let u=l.length-1;u>=0;u--){let d=l[u];if(d===" "||d===" ")r++;else{e[s]=l.slice(0,u+1);break e}}}if(r>0||a>0)for(e.length=s+1;a-- >0;)e.push(Dt);return r}function yr(e,r,a,s,l,u){if(a===Number.POSITIVE_INFINITY)return!0;let d=r.length,p=[e],f=[];for(;a>=0;){if(p.length===0){if(d===0)return!0;p.push(r[--d]);continue}let{mode:m,doc:g}=p.pop(),w=ut(g);switch(w){case lt:f.push(g),a-=Hn(g);break;case Be:case ke:{let D=w===Be?g:g.parts,y=g[wn]??0;for(let v=D.length-1;v>=y;v--)p.push({mode:m,doc:D[v]});break}case Te:case Le:case Ie:case Ae:p.push({mode:m,doc:g.contents});break;case Pe:a+=Fn(f);break;case me:{if(u&&g.break)return!1;let D=g.break?he:m,y=g.expandedStates&&D===he?ae(!1,g.expandedStates,-1):g.contents;p.push({mode:D,doc:y});break}case fe:{let D=(g.groupId?l[g.groupId]||Ee:m)===he?g.breakContents:g.flatContents;D&&p.push({mode:m,doc:D});break}case oe:if(m===he||g.hard)return!0;g.soft||(f.push(" "),a--);break;case Oe:s=!0;break;case Me:if(s)return!1;break}}return!1}function jr(e,r){let a={},s=r.printWidth,l=Mn(r.endOfLine),u=0,d=[{ind:Po(),mode:he,doc:e}],p=[],f=!1,m=[],g=0;for(Lp(e);d.length>0;){let{ind:D,mode:y,doc:v}=d.pop();switch(ut(v)){case lt:{let E=l!==`
|
|
32
|
+
`:a=/\r\n/gu;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(r)}.`)}let s=e.match(a);return s?s.length:0}function wp(e){return kr(!1,e,/\r\n?/gu,`
|
|
33
|
+
`)}var lt="string",Be="array",Ke="cursor",Te="indent",Le="align",Pe="trim",me="group",ke="fill",fe="if-break",Ie="indent-if-break",Oe="line-suffix",Me="line-suffix-boundary",oe="line",Ae="label",be="break-parent",So=new Set([Ke,Te,Le,Pe,me,ke,fe,Ie,Oe,Me,oe,Ae,be]),Cp=(e,r,a)=>{if(!(e&&r==null))return Array.isArray(r)||typeof r=="string"?r[a<0?r.length+a:a]:r.at(a)},ae=Cp;function Fp(e){let r=e.length;for(;r>0&&(e[r-1]==="\r"||e[r-1]===`
|
|
34
|
+
`);)r--;return r<e.length?e.slice(0,r):e}function Ep(e){if(typeof e=="string")return lt;if(Array.isArray(e))return Be;if(!e)return;let{type:r}=e;if(So.has(r))return r}var ut=Ep,Sp=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function kp(e){let r=e===null?"null":typeof e;if(r!=="string"&&r!=="object")return`Unexpected doc '${r}',
|
|
35
|
+
Expected it to be 'string' or 'object'.`;if(ut(e))throw new Error("doc is valid.");let a=Object.prototype.toString.call(e);if(a!=="[object Object]")return`Unexpected doc '${a}'.`;let s=Sp([...So].map(l=>`'${l}'`));return`Unexpected doc.type '${e.type}'.
|
|
36
|
+
Expected it to be ${s}.`}var Ap=class extends Error{constructor(r){super(kp(r));Fe(this,"name","InvalidDocError");this.doc=r}},vt=Ap,Fs={};function Np(e,r,a,s){let l=[e];for(;l.length>0;){let u=l.pop();if(u===Fs){a(l.pop());continue}a&&l.push(u,Fs);let d=ut(u);if(!d)throw new vt(u);if(r?.(u)!==!1)switch(d){case Be:case ke:{let p=d===Be?u:u.parts;for(let f=p.length,m=f-1;m>=0;--m)l.push(p[m]);break}case fe:l.push(u.flatContents,u.breakContents);break;case me:if(s&&u.expandedStates)for(let p=u.expandedStates.length,f=p-1;f>=0;--f)l.push(u.expandedStates[f]);else l.push(u.contents);break;case Le:case Te:case Ie:case Ae:case Oe:l.push(u.contents);break;case lt:case Ke:case Pe:case Me:case oe:case be:break;default:throw new vt(u)}}}var Mn=Np;function Ar(e,r){if(typeof e=="string")return r(e);let a=new Map;return s(e);function s(u){if(a.has(u))return a.get(u);let d=l(u);return a.set(u,d),d}function l(u){switch(ut(u)){case Be:return r(u.map(s));case ke:return r({...u,parts:u.parts.map(s)});case fe:return r({...u,breakContents:s(u.breakContents),flatContents:s(u.flatContents)});case me:{let{expandedStates:d,contents:p}=u;return d?(d=d.map(s),p=d[0]):p=s(p),r({...u,contents:p,expandedStates:d})}case Le:case Te:case Ie:case Ae:case Oe:return r({...u,contents:s(u.contents)});case lt:case Ke:case Pe:case Me:case oe:case be:return r(u);default:throw new vt(u)}}}function Rn(e,r,a){let s=a,l=!1;function u(d){if(l)return!1;let p=r(d);p!==void 0&&(l=!0,s=p)}return Mn(e,u),s}function jp(e){if(e.type===me&&e.break||e.type===oe&&e.hard||e.type===be)return!0}function _p(e){return Rn(e,jp,!1)}function Es(e){if(e.length>0){let r=ae(!1,e,-1);!r.expandedStates&&!r.break&&(r.break="propagated")}return null}function Bp(e){let r=new Set,a=[];function s(u){if(u.type===be&&Es(a),u.type===me){if(a.push(u),r.has(u))return!1;r.add(u)}}function l(u){u.type===me&&a.pop().break&&Es(a)}Mn(e,s,l,!0)}function Tp(e){return e.type===oe&&!e.hard?e.soft?"":" ":e.type===fe?e.flatContents:e}function Lp(e){return Ar(e,Tp)}function Ss(e){for(e=[...e];e.length>=2&&ae(!1,e,-2).type===oe&&ae(!1,e,-1).type===be;)e.length-=2;if(e.length>0){let r=Ut(ae(!1,e,-1));e[e.length-1]=r}return e}function Ut(e){switch(ut(e)){case Te:case Ie:case me:case Oe:case Ae:{let r=Ut(e.contents);return{...e,contents:r}}case fe:return{...e,breakContents:Ut(e.breakContents),flatContents:Ut(e.flatContents)};case ke:return{...e,parts:Ss(e.parts)};case Be:return Ss(e);case lt:return Fp(e);case Le:case Ke:case Pe:case Me:case oe:case be:break;default:throw new vt(e)}return e}function ko(e){return Ut(Ip(e))}function Pp(e){switch(ut(e)){case ke:if(e.parts.every(r=>r===""))return"";break;case me:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===me&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Le:case Te:case Ie:case Oe:if(!e.contents)return"";break;case fe:if(!e.flatContents&&!e.breakContents)return"";break;case Be:{let r=[];for(let a of e){if(!a)continue;let[s,...l]=Array.isArray(a)?a:[a];typeof s=="string"&&typeof ae(!1,r,-1)=="string"?r[r.length-1]+=s:r.push(s),r.push(...l)}return r.length===0?"":r.length===1?r[0]:r}case lt:case Ke:case Pe:case Me:case oe:case Ae:case be:break;default:throw new vt(e)}return e}function Ip(e){return Ar(e,r=>Pp(r))}function Op(e,r=_o){return Ar(e,a=>typeof a=="string"?Bo(r,a.split(`
|
|
37
|
+
`)):a)}function Mp(e){if(e.type===oe)return!0}function Rp(e){return Rn(e,Mp,!1)}function wr(e,r){return e.type===Ae?{...e,contents:r(e.contents)}:r(e)}var zp=()=>{},$p=zp;function Er(e){return{type:Te,contents:e}}function wt(e,r){return{type:Le,contents:r,n:e}}function Ao(e,r={}){return $p(r.expandedStates),{type:me,id:r.id,contents:e,break:!!r.shouldBreak,expandedStates:r.expandedStates}}function Hp(e){return wt(Number.NEGATIVE_INFINITY,e)}function qp(e){return wt({type:"root"},e)}function Up(e){return wt(-1,e)}function Wp(e,r){return Ao(e[0],{...r,expandedStates:e})}function Vp(e){return{type:ke,parts:e}}function Jp(e,r="",a={}){return{type:fe,breakContents:e,flatContents:r,groupId:a.groupId}}function Gp(e,r){return{type:Ie,contents:e,groupId:r.groupId,negate:r.negate}}function yn(e){return{type:Oe,contents:e}}var Kp={type:Me},Nr={type:be},Yp={type:Pe},zn={type:oe,hard:!0},No={type:oe,hard:!0,literal:!0},jo={type:oe},Xp={type:oe,soft:!0},ot=[zn,Nr],_o=[No,Nr],st={type:Ke};function Bo(e,r){let a=[];for(let s=0;s<r.length;s++)s!==0&&a.push(e),a.push(r[s]);return a}function To(e,r,a){let s=e;if(r>0){for(let l=0;l<Math.floor(r/a);++l)s=Er(s);s=wt(r%a,s),s=wt(Number.NEGATIVE_INFINITY,s)}return s}function Zp(e,r){return e?{type:Ae,label:e,contents:r}:r}function _e(e){var r;if(!e)return"";if(Array.isArray(e)){let a=[];for(let s of e)if(Array.isArray(s))a.push(..._e(s));else{let l=_e(s);l!==""&&a.push(l)}return a}return e.type===fe?{...e,breakContents:_e(e.breakContents),flatContents:_e(e.flatContents)}:e.type===me?{...e,contents:_e(e.contents),expandedStates:(r=e.expandedStates)==null?void 0:r.map(_e)}:e.type===ke?{type:"fill",parts:e.parts.map(_e)}:e.contents?{...e,contents:_e(e.contents)}:e}function Qp(e){let r=Object.create(null),a=new Set;return s(_e(e));function s(u,d,p){var f,m;if(typeof u=="string")return JSON.stringify(u);if(Array.isArray(u)){let g=u.map(s).filter(Boolean);return g.length===1?g[0]:`[${g.join(", ")}]`}if(u.type===oe){let g=((f=p?.[d+1])==null?void 0:f.type)===be;return u.literal?g?"literalline":"literallineWithoutBreakParent":u.hard?g?"hardline":"hardlineWithoutBreakParent":u.soft?"softline":"line"}if(u.type===be)return((m=p?.[d-1])==null?void 0:m.type)===oe&&p[d-1].hard?void 0:"breakParent";if(u.type===Pe)return"trim";if(u.type===Te)return"indent("+s(u.contents)+")";if(u.type===Le)return u.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+s(u.contents)+")":u.n<0?"dedent("+s(u.contents)+")":u.n.type==="root"?"markAsRoot("+s(u.contents)+")":"align("+JSON.stringify(u.n)+", "+s(u.contents)+")";if(u.type===fe)return"ifBreak("+s(u.breakContents)+(u.flatContents?", "+s(u.flatContents):"")+(u.groupId?(u.flatContents?"":', ""')+`, { groupId: ${l(u.groupId)} }`:"")+")";if(u.type===Ie){let g=[];u.negate&&g.push("negate: true"),u.groupId&&g.push(`groupId: ${l(u.groupId)}`);let w=g.length>0?`, { ${g.join(", ")} }`:"";return`indentIfBreak(${s(u.contents)}${w})`}if(u.type===me){let g=[];u.break&&u.break!=="propagated"&&g.push("shouldBreak: true"),u.id&&g.push(`id: ${l(u.id)}`);let w=g.length>0?`, { ${g.join(", ")} }`:"";return u.expandedStates?`conditionalGroup([${u.expandedStates.map(D=>s(D)).join(",")}]${w})`:`group(${s(u.contents)}${w})`}if(u.type===ke)return`fill([${u.parts.map(g=>s(g)).join(", ")}])`;if(u.type===Oe)return"lineSuffix("+s(u.contents)+")";if(u.type===Me)return"lineSuffixBoundary";if(u.type===Ae)return`label(${JSON.stringify(u.label)}, ${s(u.contents)})`;if(u.type===Ke)return"cursor";throw new Error("Unknown doc type "+u.type)}function l(u){if(typeof u!="symbol")return JSON.stringify(String(u));if(u in r)return r[u];let d=u.description||"symbol";for(let p=0;;p++){let f=d+(p>0?` #${p}`:"");if(!a.has(f))return a.add(f),r[u]=`Symbol.for(${JSON.stringify(f)})`}}}var eh=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function th(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function rh(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var nh=e=>!(th(e)||rh(e)),ah=/[^\x20-\x7F]/u;function sh(e){if(!e)return 0;if(!ah.test(e))return e.length;e=e.replace(eh()," ");let r=0;for(let a of e){let s=a.codePointAt(0);s<=31||s>=127&&s<=159||s>=768&&s<=879||(r+=nh(s)?1:2)}return r}var $n=sh,he=Symbol("MODE_BREAK"),Ee=Symbol("MODE_FLAT"),Dt=Symbol("cursor"),vn=Symbol("DOC_FILL_PRINTED_LENGTH");function Lo(){return{value:"",length:0,queue:[]}}function oh(e,r){return wn(e,{type:"indent"},r)}function ih(e,r,a){return r===Number.NEGATIVE_INFINITY?e.root||Lo():r<0?wn(e,{type:"dedent"},a):r?r.type==="root"?{...e,root:e}:wn(e,{type:typeof r=="string"?"stringAlign":"numberAlign",n:r},a):e}function wn(e,r,a){let s=r.type==="dedent"?e.queue.slice(0,-1):[...e.queue,r],l="",u=0,d=0,p=0;for(let v of s)switch(v.type){case"indent":g(),a.useTabs?f(1):m(a.tabWidth);break;case"stringAlign":g(),l+=v.n,u+=v.n.length;break;case"numberAlign":d+=1,p+=v.n;break;default:throw new Error(`Unexpected type '${v.type}'`)}return D(),{...e,value:l,length:u,queue:s};function f(v){l+=" ".repeat(v),u+=a.tabWidth*v}function m(v){l+=" ".repeat(v),u+=v}function g(){a.useTabs?w():D()}function w(){d>0&&f(d),y()}function D(){p>0&&m(p),y()}function y(){d=0,p=0}}function Cn(e){let r=0,a=0,s=e.length;e:for(;s--;){let l=e[s];if(l===Dt){a++;continue}for(let u=l.length-1;u>=0;u--){let d=l[u];if(d===" "||d===" ")r++;else{e[s]=l.slice(0,u+1);break e}}}if(r>0||a>0)for(e.length=s+1;a-- >0;)e.push(Dt);return r}function yr(e,r,a,s,l,u){if(a===Number.POSITIVE_INFINITY)return!0;let d=r.length,p=[e],f=[];for(;a>=0;){if(p.length===0){if(d===0)return!0;p.push(r[--d]);continue}let{mode:m,doc:g}=p.pop(),w=ut(g);switch(w){case lt:f.push(g),a-=$n(g);break;case Be:case ke:{let D=w===Be?g:g.parts,y=g[vn]??0;for(let v=D.length-1;v>=y;v--)p.push({mode:m,doc:D[v]});break}case Te:case Le:case Ie:case Ae:p.push({mode:m,doc:g.contents});break;case Pe:a+=Cn(f);break;case me:{if(u&&g.break)return!1;let D=g.break?he:m,y=g.expandedStates&&D===he?ae(!1,g.expandedStates,-1):g.contents;p.push({mode:D,doc:y});break}case fe:{let D=(g.groupId?l[g.groupId]||Ee:m)===he?g.breakContents:g.flatContents;D&&p.push({mode:m,doc:D});break}case oe:if(m===he||g.hard)return!0;g.soft||(f.push(" "),a--);break;case Oe:s=!0;break;case Me:if(s)return!1;break}}return!1}function jr(e,r){let a={},s=r.printWidth,l=On(r.endOfLine),u=0,d=[{ind:Lo(),mode:he,doc:e}],p=[],f=!1,m=[],g=0;for(Bp(e);d.length>0;){let{ind:D,mode:y,doc:v}=d.pop();switch(ut(v)){case lt:{let E=l!==`
|
|
38
38
|
`?kr(!1,v,`
|
|
39
|
-
`,l):v;p.push(E),d.length>0&&(u
|
|
39
|
+
`,l):v;p.push(E),d.length>0&&(u+=$n(E));break}case Be:for(let E=v.length-1;E>=0;E--)d.push({ind:D,mode:y,doc:v[E]});break;case Ke:if(g>=2)throw new Error("There are too many 'cursor' in doc.");p.push(Dt),g++;break;case Te:d.push({ind:oh(D,r),mode:y,doc:v.contents});break;case Le:d.push({ind:ih(D,v.n,r),mode:y,doc:v.contents});break;case Pe:u-=Cn(p);break;case me:switch(y){case Ee:if(!f){d.push({ind:D,mode:v.break?he:Ee,doc:v.contents});break}case he:{f=!1;let E={ind:D,mode:Ee,doc:v.contents},C=s-u,x=m.length>0;if(!v.break&&yr(E,d,C,x,a))d.push(E);else if(v.expandedStates){let k=ae(!1,v.expandedStates,-1);if(v.break){d.push({ind:D,mode:he,doc:k});break}else for(let j=1;j<v.expandedStates.length+1;j++)if(j>=v.expandedStates.length){d.push({ind:D,mode:he,doc:k});break}else{let N=v.expandedStates[j],P={ind:D,mode:Ee,doc:N};if(yr(P,d,C,x,a)){d.push(P);break}}}else d.push({ind:D,mode:he,doc:v.contents});break}}v.id&&(a[v.id]=ae(!1,d,-1).mode);break;case ke:{let E=s-u,C=v[vn]??0,{parts:x}=v,k=x.length-C;if(k===0)break;let j=x[C+0],N=x[C+1],P={ind:D,mode:Ee,doc:j},R={ind:D,mode:he,doc:j},_=yr(P,[],E,m.length>0,a,!0);if(k===1){_?d.push(P):d.push(R);break}let O={ind:D,mode:Ee,doc:N},L={ind:D,mode:he,doc:N};if(k===2){_?d.push(O,P):d.push(L,R);break}let W=x[C+2],ue={ind:D,mode:y,doc:{...v,[vn]:C+2}};yr({ind:D,mode:Ee,doc:[j,N,W]},[],E,m.length>0,a,!0)?d.push(ue,O,P):_?d.push(ue,L,P):d.push(ue,L,R);break}case fe:case Ie:{let E=v.groupId?a[v.groupId]:y;if(E===he){let C=v.type===fe?v.breakContents:v.negate?v.contents:Er(v.contents);C&&d.push({ind:D,mode:y,doc:C})}if(E===Ee){let C=v.type===fe?v.flatContents:v.negate?Er(v.contents):v.contents;C&&d.push({ind:D,mode:y,doc:C})}break}case Oe:m.push({ind:D,mode:y,doc:v.contents});break;case Me:m.length>0&&d.push({ind:D,mode:y,doc:zn});break;case oe:switch(y){case Ee:if(v.hard)f=!0;else{v.soft||(p.push(" "),u+=1);break}case he:if(m.length>0){d.push({ind:D,mode:y,doc:v},...m.reverse()),m.length=0;break}v.literal?D.root?(p.push(l,D.root.value),u=D.root.length):(p.push(l),u=0):(u-=Cn(p),p.push(l+D.value),u=D.length);break}break;case Ae:d.push({ind:D,mode:y,doc:v.contents});break;case be:break;default:throw new vt(v)}d.length===0&&m.length>0&&(d.push(...m.reverse()),m.length=0)}let w=p.indexOf(Dt);if(w!==-1){let D=p.indexOf(Dt,w+1);if(D===-1)return{formatted:p.filter(C=>C!==Dt).join("")};let y=p.slice(0,w).join(""),v=p.slice(w+1,D).join(""),E=p.slice(D+1).join("");return{formatted:y+v+E,cursorNodeStart:y.length,cursorNodeText:v}}return{formatted:p.join("")}}function lh(e,r,a=0){let s=0;for(let l=a;l<e.length;++l)e[l]===" "?s=s+r-s%r:s++;return s}var Hn=lh,rt,Fn,Cr,uh=class{constructor(e){hp(this,rt),this.stack=[e]}get key(){let{stack:e,siblings:r}=this;return ae(!1,e,r===null?-2:-4)??null}get index(){return this.siblings===null?null:ae(!1,this.stack,-2)}get node(){return ae(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,r=ae(!1,e,-3);return Array.isArray(r)?r:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:r}=this;return e!==null&&r===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...$t(this,rt,Cr).call(this)]}getName(){let{stack:e}=this,{length:r}=e;return r>1?ae(!1,e,-2):null}getValue(){return ae(!1,this.stack,-1)}getNode(e=0){let r=$t(this,rt,Fn).call(this,e);return r===-1?null:this.stack[r]}getParentNode(e=0){return this.getNode(e+1)}call(e,...r){let{stack:a}=this,{length:s}=a,l=ae(!1,a,-1);for(let u of r)l=l[u],a.push(u,l);try{return e(this)}finally{a.length=s}}callParent(e,r=0){let a=$t(this,rt,Fn).call(this,r+1),s=this.stack.splice(a+1);try{return e(this)}finally{this.stack.push(...s)}}each(e,...r){let{stack:a}=this,{length:s}=a,l=ae(!1,a,-1);for(let u of r)l=l[u],a.push(u,l);try{for(let u=0;u<l.length;++u)a.push(u,l[u]),e(this,u,l),a.length-=2}finally{a.length=s}}map(e,...r){let a=[];return this.each((s,l,u)=>{a[l]=e(s,l,u)},...r),a}match(...e){let r=this.stack.length-1,a=null,s=this.stack[r--];for(let l of e){if(s===void 0)return!1;let u=null;if(typeof a=="number"&&(u=a,a=this.stack[r--],s=this.stack[r--]),l&&!l(s,a,u))return!1;a=this.stack[r--],s=this.stack[r--]}return!0}findAncestor(e){for(let r of $t(this,rt,Cr).call(this))if(e(r))return r}hasAncestor(e){for(let r of $t(this,rt,Cr).call(this))if(e(r))return!0;return!1}};rt=new WeakSet,Fn=function(e){let{stack:r}=this;for(let a=r.length-1;a>=0;a-=2)if(!Array.isArray(r[a])&&--e<0)return a;return-1},Cr=function*(){let{stack:e}=this;for(let r=e.length-3;r>=0;r-=2){let a=e[r];Array.isArray(a)||(yield a)}};var ch=uh,Po=new Proxy(()=>{},{get:()=>Po}),En=Po;function dh(e){return e!==null&&typeof e=="object"}var ph=dh;function*_r(e,r){let{getVisitorKeys:a,filter:s=()=>!0}=r,l=u=>ph(u)&&s(u);for(let u of a(e)){let d=e[u];if(Array.isArray(d))for(let p of d)l(p)&&(yield p);else l(d)&&(yield d)}}function*hh(e,r){let a=[e];for(let s=0;s<a.length;s++){let l=a[s];for(let u of _r(l,r))yield u,a.push(u)}}function mh(e,r){return _r(e,r).next().done}function Gt(e){return(r,a,s)=>{let l=!!(s!=null&&s.backwards);if(a===!1)return!1;let{length:u}=r,d=a;for(;d>=0&&d<u;){let p=r.charAt(d);if(e instanceof RegExp){if(!e.test(p))return d}else if(!e.includes(p))return d;l?d--:d++}return d===-1||d===u?d:!1}}var fh=Gt(/\s/u),Je=Gt(" "),Io=Gt(",; "),Oo=Gt(/[^\n\r]/u);function gh(e,r,a){let s=!!(a!=null&&a.backwards);if(r===!1)return!1;let l=e.charAt(r);if(s){if(e.charAt(r-1)==="\r"&&l===`
|
|
40
40
|
`)return r-2;if(l===`
|
|
41
41
|
`||l==="\r"||l==="\u2028"||l==="\u2029")return r-1}else{if(l==="\r"&&e.charAt(r+1)===`
|
|
42
42
|
`)return r+2;if(l===`
|
|
43
|
-
`||l==="\r"||l==="\u2028"||l==="\u2029")return r+1}return r}var it=
|
|
43
|
+
`||l==="\r"||l==="\u2028"||l==="\u2029")return r+1}return r}var it=gh;function bh(e,r,a={}){let s=Je(e,a.backwards?r-1:r,a),l=it(e,s,a);return s!==l}var Ve=bh;function xh(e){return Array.isArray(e)&&e.length>0}var Dh=xh,Mo=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),yh=e=>Object.keys(e).filter(r=>!Mo.has(r));function vh(e){return e?r=>e(r,Mo):yh}var Br=vh;function wh(e){let r=e.type||e.kind||"(unknown type)",a=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return a.length>20&&(a=a.slice(0,19)+"…"),r+(a?" "+a:"")}function qn(e,r){(e.comments??(e.comments=[])).push(r),r.printed=!1,r.nodeDescription=wh(e)}function Wt(e,r){r.leading=!0,r.trailing=!1,qn(e,r)}function nt(e,r,a){r.leading=!1,r.trailing=!1,a&&(r.marker=a),qn(e,r)}function Vt(e,r){r.leading=!1,r.trailing=!0,qn(e,r)}var un=new WeakMap;function Un(e,r){if(un.has(e))return un.get(e);let{printer:{getCommentChildNodes:a,canAttachComment:s,getVisitorKeys:l},locStart:u,locEnd:d}=r;if(!s)return[];let p=(a?.(e,r)??[..._r(e,{getVisitorKeys:Br(l)})]).flatMap(f=>s(f)?[f]:Un(f,r));return p.sort((f,m)=>u(f)-u(m)||d(f)-d(m)),un.set(e,p),p}function Ro(e,r,a,s){let{locStart:l,locEnd:u}=a,d=l(r),p=u(r),f=Un(e,a),m,g,w=0,D=f.length;for(;w<D;){let y=w+D>>1,v=f[y],E=l(v),C=u(v);if(E<=d&&p<=C)return Ro(v,r,a,v);if(C<=d){m=v,w=y+1;continue}if(p<=E){g=v,D=y;continue}throw new Error("Comment location overlaps with node location")}if(s?.type==="TemplateLiteral"){let{quasis:y}=s,v=dn(y,r,a);m&&dn(y,m,a)!==v&&(m=null),g&&dn(y,g,a)!==v&&(g=null)}return{enclosingNode:s,precedingNode:m,followingNode:g}}var cn=()=>!1;function Ch(e,r){let{comments:a}=e;if(delete e.comments,!Dh(a)||!r.printer.canAttachComment)return;let s=[],{printer:{experimentalFeatures:{avoidAstMutation:l=!1}={},handleComments:u={}},originalText:d}=r,{ownLine:p=cn,endOfLine:f=cn,remaining:m=cn}=u,g=a.map((w,D)=>({...Ro(e,w,r),comment:w,text:d,options:r,ast:e,isLastComment:a.length-1===D}));for(let[w,D]of g.entries()){let{comment:y,precedingNode:v,enclosingNode:E,followingNode:C,text:x,options:k,ast:j,isLastComment:N}=D,P;if(l?P=[D]:(y.enclosingNode=E,y.precedingNode=v,y.followingNode=C,P=[y,x,k,j,N]),Fh(x,k,g,w))y.placement="ownLine",p(...P)||(C?Wt(C,y):v?Vt(v,y):nt(E||j,y));else if(Eh(x,k,g,w))y.placement="endOfLine",f(...P)||(v?Vt(v,y):C?Wt(C,y):nt(E||j,y));else if(y.placement="remaining",!m(...P))if(v&&C){let R=s.length;R>0&&s[R-1].followingNode!==C&&ks(s,k),s.push(D)}else v?Vt(v,y):C?Wt(C,y):nt(E||j,y)}if(ks(s,r),!l)for(let w of a)delete w.precedingNode,delete w.enclosingNode,delete w.followingNode}var zo=e=>!/[\S\n\u2028\u2029]/u.test(e);function Fh(e,r,a,s){let{comment:l,precedingNode:u}=a[s],{locStart:d,locEnd:p}=r,f=d(l);if(u)for(let m=s-1;m>=0;m--){let{comment:g,precedingNode:w}=a[m];if(w!==u||!zo(e.slice(p(g),f)))break;f=d(g)}return Ve(e,f,{backwards:!0})}function Eh(e,r,a,s){let{comment:l,followingNode:u}=a[s],{locStart:d,locEnd:p}=r,f=p(l);if(u)for(let m=s+1;m<a.length;m++){let{comment:g,followingNode:w}=a[m];if(w!==u||!zo(e.slice(f,d(g))))break;f=p(g)}return Ve(e,f)}function ks(e,r){var a,s;let l=e.length;if(l===0)return;let{precedingNode:u,followingNode:d}=e[0],p=r.locStart(d),f;for(f=l;f>0;--f){let{comment:m,precedingNode:g,followingNode:w}=e[f-1];En.strictEqual(g,u),En.strictEqual(w,d);let D=r.originalText.slice(r.locEnd(m),p);if(((s=(a=r.printer).isGap)==null?void 0:s.call(a,D,r))??/^[\s(]*$/u.test(D))p=r.locStart(m);else break}for(let[m,{comment:g}]of e.entries())m<f?Vt(u,g):Wt(d,g);for(let m of[u,d])m.comments&&m.comments.length>1&&m.comments.sort((g,w)=>r.locStart(g)-r.locStart(w));e.length=0}function dn(e,r,a){let s=a.locStart(r)-1;for(let l=1;l<e.length;++l)if(s<a.locStart(e[l]))return l-1;return 0}function Sh(e,r){let a=r-1;a=Je(e,a,{backwards:!0}),a=it(e,a,{backwards:!0}),a=Je(e,a,{backwards:!0});let s=it(e,a,{backwards:!0});return a!==s}var Wn=Sh;function $o(e,r){let a=e.node;return a.printed=!0,r.printer.printComment(e,r)}function kh(e,r){var a;let s=e.node,l=[$o(e,r)],{printer:u,originalText:d,locStart:p,locEnd:f}=r;if((a=u.isBlockComment)!=null&&a.call(u,s)){let g=Ve(d,f(s))?Ve(d,p(s),{backwards:!0})?ot:jo:" ";l.push(g)}else l.push(ot);let m=it(d,Je(d,f(s)));return m!==!1&&Ve(d,m)&&l.push(ot),l}function Ah(e,r,a){var s;let l=e.node,u=$o(e,r),{printer:d,originalText:p,locStart:f}=r,m=(s=d.isBlockComment)==null?void 0:s.call(d,l);if(a!=null&&a.hasLineSuffix&&!(a!=null&&a.isBlock)||Ve(p,f(l),{backwards:!0})){let g=Wn(p,f(l));return{doc:yn([ot,g?ot:"",u]),isBlock:m,hasLineSuffix:!0}}return!m||a!=null&&a.hasLineSuffix?{doc:[yn([" ",u]),Nr],isBlock:m,hasLineSuffix:!0}:{doc:[" ",u],isBlock:m,hasLineSuffix:!1}}function Nh(e,r){let a=e.node;if(!a)return{};let s=r[Symbol.for("printedComments")];if((a.comments||[]).filter(p=>!s.has(p)).length===0)return{leading:"",trailing:""};let l=[],u=[],d;return e.each(()=>{let p=e.node;if(s!=null&&s.has(p))return;let{leading:f,trailing:m}=p;f?l.push(kh(e,r)):m&&(d=Ah(e,r,d),u.push(d.doc))},"comments"),{leading:l,trailing:u}}function jh(e,r,a){let{leading:s,trailing:l}=Nh(e,a);return!s&&!l?r:wr(r,u=>[s,u,l])}function _h(e){let{[Symbol.for("comments")]:r,[Symbol.for("printedComments")]:a}=e;for(let s of r){if(!s.printed&&!a.has(s))throw new Error('Comment "'+s.value.trim()+'" was not printed. Please report this error!');delete s.printed}}var Ho=class extends Error{constructor(){super(...arguments);Fe(this,"name","ConfigError")}},As=class extends Error{constructor(){super(...arguments);Fe(this,"name","UndefinedParserError")}},Bh={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing
|
|
44
44
|
(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive).
|
|
45
45
|
The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset.
|
|
46
|
-
The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function
|
|
47
|
-
`)),
|
|
48
|
-
`)),
|
|
49
|
-
`,1)[0].length);return l>r&&l>u?s:a}var hn=[],zs=[];function Yh(e,r){if(e===r)return 0;let a=e;e.length>r.length&&(e=r,r=a);let s=e.length,l=r.length;for(;s>0&&e.charCodeAt(~-s)===r.charCodeAt(~-l);)s--,l--;let u=0;for(;u<s&&e.charCodeAt(u)===r.charCodeAt(u);)u++;if(s-=u,l-=u,s===0)return l;let d,p,f,m,g=0,w=0;for(;g<s;)zs[g]=e.charCodeAt(u+g),hn[g]=++g;for(;w<l;)for(d=r.charCodeAt(u+w),f=w++,p=w,g=0;g<s;g++)m=d===zs[g]?f:f+1,f=hn[g],p=hn[g]=f>p?m>p?p+1:m:m>f?f+1:m;return p}var Yo=(e,r,{descriptor:a,logger:s,schemas:l})=>{let u=[`Ignored unknown option ${Se.yellow(a.pair({key:e,value:r}))}.`],d=Object.keys(l).sort().find(p=>Yh(e,p)<3);d&&u.push(`Did you mean ${Se.blue(a.key(d))}?`),s.warn(u.join(" "))},Xh=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function Zh(e,r){let a=new e(r),s=Object.create(a);for(let l of Xh)l in r&&(s[l]=Qh(r[l],a,Ye.prototype[l].length));return s}var Ye=class{static create(e){return Zh(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,r){return!1}deprecated(e,r){return!1}forward(e,r){}redirect(e,r){}overlap(e,r,a){return e}preprocess(e,r){return e}postprocess(e,r){return Fr}};function Qh(e,r,a){return typeof e=="function"?(...s)=>e(...s.slice(0,a-1),r,...s.slice(a-1)):()=>e}var em=class extends Ye{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,r){return r.schemas[this._sourceName].validate(e,r)}redirect(e,r){return this._sourceName}},tm=class extends Ye{expected(){return"anything"}validate(){return!0}},rm=class extends Ye{constructor({valueSchema:e,name:r=e.name,...a}){super({...a,name:r}),this._valueSchema=e}expected(e){let{text:r,list:a}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:r&&`an array of ${r}`,list:a&&{title:"an array of the following values",values:[{list:a}]}}}validate(e,r){if(!Array.isArray(e))return!1;let a=[];for(let s of e){let l=r.normalizeValidateResult(this._valueSchema.validate(s,r),s);l!==!0&&a.push(l.value)}return a.length===0?!0:{value:a}}deprecated(e,r){let a=[];for(let s of e){let l=r.normalizeDeprecatedResult(this._valueSchema.deprecated(s,r),s);l!==!1&&a.push(...l.map(({value:u})=>({value:[u]})))}return a}forward(e,r){let a=[];for(let s of e){let l=r.normalizeForwardResult(this._valueSchema.forward(s,r),s);a.push(...l.map($s))}return a}redirect(e,r){let a=[],s=[];for(let l of e){let u=r.normalizeRedirectResult(this._valueSchema.redirect(l,r),l);"remain"in u&&a.push(u.remain),s.push(...u.redirect.map($s))}return a.length===0?{redirect:s}:{redirect:s,remain:a}}overlap(e,r){return e.concat(r)}};function $s({from:e,to:r}){return{from:[e],to:r}}var nm=class extends Ye{expected(){return"true or false"}validate(e){return typeof e=="boolean"}};function am(e,r){let a=Object.create(null);for(let s of e){let l=s[r];if(a[l])throw new Error(`Duplicate ${r} ${JSON.stringify(l)}`);a[l]=s}return a}function sm(e,r){let a=new Map;for(let s of e){let l=s[r];if(a.has(l))throw new Error(`Duplicate ${r} ${JSON.stringify(l)}`);a.set(l,s)}return a}function om(){let e=Object.create(null);return r=>{let a=JSON.stringify(r);return e[a]?!0:(e[a]=!0,!1)}}function im(e,r){let a=[],s=[];for(let l of e)r(l)?a.push(l):s.push(l);return[a,s]}function lm(e){return e===Math.floor(e)}function um(e,r){if(e===r)return 0;let a=typeof e,s=typeof r,l=["undefined","object","boolean","number","string"];return a!==s?l.indexOf(a)-l.indexOf(s):a!=="string"?Number(e)-Number(r):e.localeCompare(r)}function cm(e){return(...r)=>{let a=e(...r);return typeof a=="string"?new Error(a):a}}function Hs(e){return e===void 0?{}:e}function Xo(e){if(typeof e=="string")return{text:e};let{text:r,list:a}=e;return dm((r||a)!==void 0,"Unexpected `expected` result, there should be at least one field."),a?{text:r,list:{title:a.title,values:a.values.map(Xo)}}:{text:r}}function qs(e,r){return e===!0?!0:e===!1?{value:r}:e}function Us(e,r,a=!1){return e===!1?!1:e===!0?a?!0:[{value:r}]:"value"in e?[e]:e.length===0?!1:e}function Ws(e,r){return typeof e=="string"||"key"in e?{from:r,to:e}:"from"in e?{from:e.from,to:e.to}:{from:r,to:e.to}}function kn(e,r){return e===void 0?[]:Array.isArray(e)?e.map(a=>Ws(a,r)):[Ws(e,r)]}function Vs(e,r){let a=kn(typeof e=="object"&&"redirect"in e?e.redirect:e,r);return a.length===0?{remain:r,redirect:a}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:a}:{redirect:a}}function dm(e,r){if(!e)throw new Error(r)}var pm=class extends Ye{constructor(e){super(e),this._choices=sm(e.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:e}){let r=Array.from(this._choices.keys()).map(l=>this._choices.get(l)).filter(({hidden:l})=>!l).map(l=>l.value).sort(um).map(e.value),a=r.slice(0,-2),s=r.slice(-2);return{text:a.concat(s.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(e){return this._choices.has(e)}deprecated(e){let r=this._choices.get(e);return r&&r.deprecated?{value:e}:!1}forward(e){let r=this._choices.get(e);return r?r.forward:void 0}redirect(e){let r=this._choices.get(e);return r?r.redirect:void 0}},hm=class extends Ye{expected(){return"a number"}validate(e,r){return typeof e=="number"}},mm=class extends hm{expected(){return"an integer"}validate(e,r){return r.normalizeValidateResult(super.validate(e,r),e)===!0&&lm(e)}},Js=class extends Ye{expected(){return"a string"}validate(e){return typeof e=="string"}},fm=yt,gm=Yo,bm=Kh,xm=Gh,Dm=class{constructor(e,r){let{logger:a=console,loggerPrintWidth:s=80,descriptor:l=fm,unknown:u=gm,invalid:d=bm,deprecated:p=xm,missing:f=()=>!1,required:m=()=>!1,preprocess:g=D=>D,postprocess:w=()=>Fr}=r||{};this._utils={descriptor:l,logger:a||{warn:()=>{}},loggerPrintWidth:s,schemas:am(e,"name"),normalizeDefaultResult:Hs,normalizeExpectedResult:Xo,normalizeDeprecatedResult:Us,normalizeForwardResult:kn,normalizeRedirectResult:Vs,normalizeValidateResult:qs},this._unknownHandler=u,this._invalidHandler=cm(d),this._deprecatedHandler=p,this._identifyMissing=(D,y)=>!(D in y)||f(D,y),this._identifyRequired=m,this._preprocess=g,this._postprocess=w,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=om()}normalize(e){let r={},a=[this._preprocess(e,this._utils)],s=()=>{for(;a.length!==0;){let l=a.shift(),u=this._applyNormalization(l,r);a.push(...u)}};s();for(let l of Object.keys(this._utils.schemas)){let u=this._utils.schemas[l];if(!(l in r)){let d=Hs(u.default(this._utils));"value"in d&&a.push({[l]:d.value})}}s();for(let l of Object.keys(this._utils.schemas)){if(!(l in r))continue;let u=this._utils.schemas[l],d=r[l],p=u.postprocess(d,this._utils);p!==Fr&&(this._applyValidation(p,l,u),r[l]=p)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(e,r){let a=[],{knownKeys:s,unknownKeys:l}=this._partitionOptionKeys(e);for(let u of s){let d=this._utils.schemas[u],p=d.preprocess(e[u],this._utils);this._applyValidation(p,u,d);let f=({from:w,to:D})=>{a.push(typeof D=="string"?{[D]:w}:{[D.key]:D.value})},m=({value:w,redirectTo:D})=>{let y=Us(d.deprecated(w,this._utils),p,!0);if(y!==!1)if(y===!0)this._hasDeprecationWarned(u)||this._utils.logger.warn(this._deprecatedHandler(u,D,this._utils));else for(let{value:v}of y){let E={key:u,value:v};if(!this._hasDeprecationWarned(E)){let C=typeof D=="string"?{key:D,value:v}:D;this._utils.logger.warn(this._deprecatedHandler(E,C,this._utils))}}};kn(d.forward(p,this._utils),p).forEach(f);let g=Vs(d.redirect(p,this._utils),p);if(g.redirect.forEach(f),"remain"in g){let w=g.remain;r[u]=u in r?d.overlap(r[u],w,this._utils):w,m({value:w})}for(let{from:w,to:D}of g.redirect)m({value:w,redirectTo:D})}for(let u of l){let d=e[u];this._applyUnknownHandler(u,d,r,(p,f)=>{a.push({[p]:f})})}return a}_applyRequiredCheck(e){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,e)&&this._identifyRequired(r))throw this._invalidHandler(r,Jo,this._utils)}_partitionOptionKeys(e){let[r,a]=im(Object.keys(e).filter(s=>!this._identifyMissing(s,e)),s=>s in this._utils.schemas);return{knownKeys:r,unknownKeys:a}}_applyValidation(e,r,a){let s=qs(a.validate(e,this._utils),e);if(s!==!0)throw this._invalidHandler(r,s.value,this._utils)}_applyUnknownHandler(e,r,a,s){let l=this._unknownHandler(e,r,this._utils);if(l)for(let u of Object.keys(l)){if(this._identifyMissing(u,l))continue;let d=l[u];u in this._utils.schemas?s(u,d):a[u]=d}}_applyPostprocess(e){let r=this._postprocess(e,this._utils);if(r!==Fr){if(r.delete)for(let a of r.delete)delete e[a];if(r.override){let{knownKeys:a,unknownKeys:s}=this._partitionOptionKeys(r.override);for(let l of a){let u=r.override[l];this._applyValidation(u,l,this._utils.schemas[l]),e[l]=u}for(let l of s){let u=r.override[l];this._applyUnknownHandler(l,u,e,(d,p)=>{let f=this._utils.schemas[d];this._applyValidation(p,d,f),e[d]=p})}}}}},mn;function ym(e,r,{logger:a=!1,isCLI:s=!1,passThrough:l=!1,FlagSchema:u,descriptor:d}={}){if(s){if(!u)throw new Error("'FlagSchema' option is required.");if(!d)throw new Error("'descriptor' option is required.")}else d=yt;let p=l?Array.isArray(l)?(D,y)=>l.includes(D)?{[D]:y}:void 0:(D,y)=>({[D]:y}):(D,y,v)=>{let{_:E,...C}=v.schemas;return Yo(D,y,{...v,schemas:C})},f=vm(r,{isCLI:s,FlagSchema:u}),m=new Dm(f,{logger:a,unknown:p,descriptor:d}),g=a!==!1;g&&mn&&(m._hasDeprecationWarned=mn);let w=m.normalize(e);return g&&(mn=m._hasDeprecationWarned),w}function vm(e,{isCLI:r,FlagSchema:a}){let s=[];r&&s.push(tm.create({name:"_"}));for(let l of e)s.push(wm(l,{isCLI:r,optionInfos:e,FlagSchema:a})),l.alias&&r&&s.push(em.create({name:l.alias,sourceName:l.name}));return s}function wm(e,{isCLI:r,optionInfos:a,FlagSchema:s}){let{name:l}=e,u={name:l},d,p={};switch(e.type){case"int":d=mm,r&&(u.preprocess=Number);break;case"string":d=Js;break;case"choice":d=pm,u.choices=e.choices.map(f=>f!=null&&f.redirect?{...f,redirect:{to:{key:e.name,value:f.redirect}}}:f);break;case"boolean":d=nm;break;case"flag":d=s,u.flags=a.flatMap(f=>[f.alias,f.description&&f.name,f.oppositeDescription&&`no-${f.name}`].filter(Boolean));break;case"path":d=Js;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?u.validate=(f,m,g)=>e.exception(f)||m.validate(f,g):u.validate=(f,m,g)=>f===void 0||m.validate(f,g),e.redirect&&(p.redirect=f=>f?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(p.deprecated=!0),r&&!e.array){let f=u.preprocess||(m=>m);u.preprocess=(m,g,w)=>g.preprocess(f(Array.isArray(m)?ae(!1,m,-1):m),w)}return e.array?rm.create({...r?{preprocess:f=>Array.isArray(f)?f:[f]}:{},...p,valueSchema:d.create(u)}):d.create({...u,...p})}var Cm=ym,Fm=(e,r,a)=>{if(!(e&&r==null)){if(r.findLast)return r.findLast(a);for(let s=r.length-1;s>=0;s--){let l=r[s];if(a(l,s,r))return l}}},Zo=Fm;function Qo(e,r){if(!r)throw new Error("parserName is required.");let a=Zo(!1,e,l=>l.parsers&&Object.prototype.hasOwnProperty.call(l.parsers,r));if(a)return a;let s=`Couldn't resolve parser "${r}".`;throw s+=" Plugins must be explicitly added to the standalone bundle.",new qo(s)}function Em(e,r){if(!r)throw new Error("astFormat is required.");let a=Zo(!1,e,l=>l.printers&&Object.prototype.hasOwnProperty.call(l.printers,r));if(a)return a;let s=`Couldn't find plugin for AST format "${r}".`;throw s+=" Plugins must be explicitly added to the standalone bundle.",new qo(s)}function Jn({plugins:e,parser:r}){let a=Qo(e,r);return ei(a,r)}function ei(e,r){let a=e.parsers[r];return typeof a=="function"?a():a}function Sm(e,r){let a=e.printers[r];return typeof a=="function"?a():a}var Gs={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function km(e,r={}){var a;let s={...e};if(!s.parser)if(s.filepath){if(s.parser=Jh(s,{physicalFile:s.filepath}),!s.parser)throw new js(`No parser could be inferred for file "${s.filepath}".`)}else throw new js("No parser and no file path given, couldn't infer a parser.");let l=Uo({plugins:e.plugins,showDeprecated:!0}).options,u={...Gs,...Object.fromEntries(l.filter(D=>D.default!==void 0).map(D=>[D.name,D.default]))},d=Qo(s.plugins,s.parser),p=await ei(d,s.parser);s.astFormat=p.astFormat,s.locEnd=p.locEnd,s.locStart=p.locStart;let f=(a=d.printers)!=null&&a[p.astFormat]?d:Em(s.plugins,p.astFormat),m=await Sm(f,p.astFormat);s.printer=m;let g=f.defaultOptions?Object.fromEntries(Object.entries(f.defaultOptions).filter(([,D])=>D!==void 0)):{},w={...u,...g};for(let[D,y]of Object.entries(w))(s[D]===null||s[D]===void 0)&&(s[D]=y);return s.parser==="json"&&(s.trailingComma="none"),Cm(s,l,{passThrough:Object.keys(Gs),...r})}var Ct=km,Am=hp(gp());async function Nm(e,r){let a=await Jn(r),s=a.preprocess?a.preprocess(e,r):e;r.originalText=s;let l;try{l=await a.parse(s,r,r)}catch(u){jm(u,e)}return{text:s,ast:l}}function jm(e,r){let{loc:a}=e;if(a){let s=(0,Am.codeFrameColumns)(r,a,{highlightCode:!0});throw e.message+=`
|
|
50
|
-
`+s,e.codeFrame=s,e}throw e}var Kt=
|
|
51
|
-
`,l)+1),f=s.slice(p,l).match(/^\s*/u)[0],m=
|
|
52
|
-
`&&(D+=
|
|
46
|
+
The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function qo({plugins:e=[],showDeprecated:r=!1}={}){let a=e.flatMap(l=>l.languages??[]),s=[];for(let l of Lh(Object.assign({},...e.map(({options:u})=>u),Bh)))!r&&l.deprecated||(Array.isArray(l.choices)&&(r||(l.choices=l.choices.filter(u=>!u.deprecated)),l.name==="parser"&&(l.choices=[...l.choices,...Th(l.choices,a,e)])),l.pluginDefaults=Object.fromEntries(e.filter(u=>{var d;return((d=u.defaultOptions)==null?void 0:d[l.name])!==void 0}).map(u=>[u.name,u.defaultOptions[l.name]])),s.push(l));return{languages:a,options:s}}function*Th(e,r,a){let s=new Set(e.map(l=>l.value));for(let l of r)if(l.parsers){for(let u of l.parsers)if(!s.has(u)){s.add(u);let d=a.find(f=>f.parsers&&Object.prototype.hasOwnProperty.call(f.parsers,u)),p=l.name;d!=null&&d.name&&(p+=` (plugin: ${d.name})`),yield{value:u,description:p}}}}function Lh(e){let r=[];for(let[a,s]of Object.entries(e)){let l={name:a,...s};Array.isArray(l.default)&&(l.default=ae(!1,l.default,-1).value),r.push(l)}return r}var Ph=(e,r)=>{if(!(e&&r==null))return r.toReversed||!Array.isArray(r)?r.toReversed():[...r].reverse()},Ih=Ph,Ns,js,_s,Bs,Ts,Oh=((Ns=globalThis.Deno)==null?void 0:Ns.build.os)==="windows"||((_s=(js=globalThis.navigator)==null?void 0:js.platform)==null?void 0:_s.startsWith("Win"))||((Ts=(Bs=globalThis.process)==null?void 0:Bs.platform)==null?void 0:Ts.startsWith("win"))||!1;function Uo(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function Mh(e){return e=Uo(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Rh(e){e=Uo(e);let r=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(r=`\\\\${e.hostname}${r}`),r}function zh(e){return Oh?Rh(e):Mh(e)}var $h=zh,Hh=e=>String(e).split(/[/\\]/u).pop();function Ls(e,r){if(!r)return;let a=Hh(r).toLowerCase();return e.find(({filenames:s})=>s?.some(l=>l.toLowerCase()===a))??e.find(({extensions:s})=>s?.some(l=>a.endsWith(l)))}function qh(e,r){if(r)return e.find(({name:a})=>a.toLowerCase()===r)??e.find(({aliases:a})=>a?.includes(r))??e.find(({extensions:a})=>a?.includes(`.${r}`))}function Ps(e,r){if(r){if(String(r).startsWith("file:"))try{r=$h(r)}catch{return}if(typeof r=="string")return e.find(({isSupported:a})=>a?.({filepath:r}))}}function Uh(e,r){let a=Ih(!1,e.plugins).flatMap(l=>l.languages??[]),s=qh(a,r.language)??Ls(a,r.physicalFile)??Ls(a,r.file)??Ps(a,r.physicalFile)??Ps(a,r.file)??(r.physicalFile,void 0);return s?.parsers[0]}var Wh=Uh,yt={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(a=>yt.value(a)).join(", ")}]`;let r=Object.keys(e);return r.length===0?"{}":`{ ${r.map(a=>`${yt.key(a)}: ${yt.value(e[a])}`).join(", ")} }`},pair:({key:e,value:r})=>yt.value({[e]:r})},Wo=new Proxy(String,{get:()=>Wo}),Se=Wo,Vh=(e,r,{descriptor:a})=>{let s=[`${Se.yellow(typeof e=="string"?a.key(e):a.pair(e))} is deprecated`];return r&&s.push(`we now treat it as ${Se.blue(typeof r=="string"?a.key(r):a.pair(r))}`),s.join("; ")+"."},Vo=Symbol.for("vnopts.VALUE_NOT_EXIST"),Fr=Symbol.for("vnopts.VALUE_UNCHANGED"),Is=" ".repeat(2),Jh=(e,r,a)=>{let{text:s,list:l}=a.normalizeExpectedResult(a.schemas[e].expected(a)),u=[];return s&&u.push(Os(e,r,s,a.descriptor)),l&&u.push([Os(e,r,l.title,a.descriptor)].concat(l.values.map(d=>Jo(d,a.loggerPrintWidth))).join(`
|
|
47
|
+
`)),Go(u,a.loggerPrintWidth)};function Os(e,r,a,s){return[`Invalid ${Se.red(s.key(e))} value.`,`Expected ${Se.blue(a)},`,`but received ${r===Vo?Se.gray("nothing"):Se.red(s.value(r))}.`].join(" ")}function Jo({text:e,list:r},a){let s=[];return e&&s.push(`- ${Se.blue(e)}`),r&&s.push([`- ${Se.blue(r.title)}:`].concat(r.values.map(l=>Jo(l,a-Is.length).replace(/^|\n/g,`$&${Is}`))).join(`
|
|
48
|
+
`)),Go(s,a)}function Go(e,r){if(e.length===1)return e[0];let[a,s]=e,[l,u]=e.map(d=>d.split(`
|
|
49
|
+
`,1)[0].length);return l>r&&l>u?s:a}var pn=[],Ms=[];function Gh(e,r){if(e===r)return 0;let a=e;e.length>r.length&&(e=r,r=a);let s=e.length,l=r.length;for(;s>0&&e.charCodeAt(~-s)===r.charCodeAt(~-l);)s--,l--;let u=0;for(;u<s&&e.charCodeAt(u)===r.charCodeAt(u);)u++;if(s-=u,l-=u,s===0)return l;let d,p,f,m,g=0,w=0;for(;g<s;)Ms[g]=e.charCodeAt(u+g),pn[g]=++g;for(;w<l;)for(d=r.charCodeAt(u+w),f=w++,p=w,g=0;g<s;g++)m=d===Ms[g]?f:f+1,f=pn[g],p=pn[g]=f>p?m>p?p+1:m:m>f?f+1:m;return p}var Ko=(e,r,{descriptor:a,logger:s,schemas:l})=>{let u=[`Ignored unknown option ${Se.yellow(a.pair({key:e,value:r}))}.`],d=Object.keys(l).sort().find(p=>Gh(e,p)<3);d&&u.push(`Did you mean ${Se.blue(a.key(d))}?`),s.warn(u.join(" "))},Kh=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function Yh(e,r){let a=new e(r),s=Object.create(a);for(let l of Kh)l in r&&(s[l]=Xh(r[l],a,Ye.prototype[l].length));return s}var Ye=class{static create(e){return Yh(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,r){return!1}deprecated(e,r){return!1}forward(e,r){}redirect(e,r){}overlap(e,r,a){return e}preprocess(e,r){return e}postprocess(e,r){return Fr}};function Xh(e,r,a){return typeof e=="function"?(...s)=>e(...s.slice(0,a-1),r,...s.slice(a-1)):()=>e}var Zh=class extends Ye{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,r){return r.schemas[this._sourceName].validate(e,r)}redirect(e,r){return this._sourceName}},Qh=class extends Ye{expected(){return"anything"}validate(){return!0}},em=class extends Ye{constructor({valueSchema:e,name:r=e.name,...a}){super({...a,name:r}),this._valueSchema=e}expected(e){let{text:r,list:a}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:r&&`an array of ${r}`,list:a&&{title:"an array of the following values",values:[{list:a}]}}}validate(e,r){if(!Array.isArray(e))return!1;let a=[];for(let s of e){let l=r.normalizeValidateResult(this._valueSchema.validate(s,r),s);l!==!0&&a.push(l.value)}return a.length===0?!0:{value:a}}deprecated(e,r){let a=[];for(let s of e){let l=r.normalizeDeprecatedResult(this._valueSchema.deprecated(s,r),s);l!==!1&&a.push(...l.map(({value:u})=>({value:[u]})))}return a}forward(e,r){let a=[];for(let s of e){let l=r.normalizeForwardResult(this._valueSchema.forward(s,r),s);a.push(...l.map(Rs))}return a}redirect(e,r){let a=[],s=[];for(let l of e){let u=r.normalizeRedirectResult(this._valueSchema.redirect(l,r),l);"remain"in u&&a.push(u.remain),s.push(...u.redirect.map(Rs))}return a.length===0?{redirect:s}:{redirect:s,remain:a}}overlap(e,r){return e.concat(r)}};function Rs({from:e,to:r}){return{from:[e],to:r}}var tm=class extends Ye{expected(){return"true or false"}validate(e){return typeof e=="boolean"}};function rm(e,r){let a=Object.create(null);for(let s of e){let l=s[r];if(a[l])throw new Error(`Duplicate ${r} ${JSON.stringify(l)}`);a[l]=s}return a}function nm(e,r){let a=new Map;for(let s of e){let l=s[r];if(a.has(l))throw new Error(`Duplicate ${r} ${JSON.stringify(l)}`);a.set(l,s)}return a}function am(){let e=Object.create(null);return r=>{let a=JSON.stringify(r);return e[a]?!0:(e[a]=!0,!1)}}function sm(e,r){let a=[],s=[];for(let l of e)r(l)?a.push(l):s.push(l);return[a,s]}function om(e){return e===Math.floor(e)}function im(e,r){if(e===r)return 0;let a=typeof e,s=typeof r,l=["undefined","object","boolean","number","string"];return a!==s?l.indexOf(a)-l.indexOf(s):a!=="string"?Number(e)-Number(r):e.localeCompare(r)}function lm(e){return(...r)=>{let a=e(...r);return typeof a=="string"?new Error(a):a}}function zs(e){return e===void 0?{}:e}function Yo(e){if(typeof e=="string")return{text:e};let{text:r,list:a}=e;return um((r||a)!==void 0,"Unexpected `expected` result, there should be at least one field."),a?{text:r,list:{title:a.title,values:a.values.map(Yo)}}:{text:r}}function $s(e,r){return e===!0?!0:e===!1?{value:r}:e}function Hs(e,r,a=!1){return e===!1?!1:e===!0?a?!0:[{value:r}]:"value"in e?[e]:e.length===0?!1:e}function qs(e,r){return typeof e=="string"||"key"in e?{from:r,to:e}:"from"in e?{from:e.from,to:e.to}:{from:r,to:e.to}}function Sn(e,r){return e===void 0?[]:Array.isArray(e)?e.map(a=>qs(a,r)):[qs(e,r)]}function Us(e,r){let a=Sn(typeof e=="object"&&"redirect"in e?e.redirect:e,r);return a.length===0?{remain:r,redirect:a}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:a}:{redirect:a}}function um(e,r){if(!e)throw new Error(r)}var cm=class extends Ye{constructor(e){super(e),this._choices=nm(e.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:e}){let r=Array.from(this._choices.keys()).map(l=>this._choices.get(l)).filter(({hidden:l})=>!l).map(l=>l.value).sort(im).map(e.value),a=r.slice(0,-2),s=r.slice(-2);return{text:a.concat(s.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(e){return this._choices.has(e)}deprecated(e){let r=this._choices.get(e);return r&&r.deprecated?{value:e}:!1}forward(e){let r=this._choices.get(e);return r?r.forward:void 0}redirect(e){let r=this._choices.get(e);return r?r.redirect:void 0}},dm=class extends Ye{expected(){return"a number"}validate(e,r){return typeof e=="number"}},pm=class extends dm{expected(){return"an integer"}validate(e,r){return r.normalizeValidateResult(super.validate(e,r),e)===!0&&om(e)}},Ws=class extends Ye{expected(){return"a string"}validate(e){return typeof e=="string"}},hm=yt,mm=Ko,fm=Jh,gm=Vh,bm=class{constructor(e,r){let{logger:a=console,loggerPrintWidth:s=80,descriptor:l=hm,unknown:u=mm,invalid:d=fm,deprecated:p=gm,missing:f=()=>!1,required:m=()=>!1,preprocess:g=D=>D,postprocess:w=()=>Fr}=r||{};this._utils={descriptor:l,logger:a||{warn:()=>{}},loggerPrintWidth:s,schemas:rm(e,"name"),normalizeDefaultResult:zs,normalizeExpectedResult:Yo,normalizeDeprecatedResult:Hs,normalizeForwardResult:Sn,normalizeRedirectResult:Us,normalizeValidateResult:$s},this._unknownHandler=u,this._invalidHandler=lm(d),this._deprecatedHandler=p,this._identifyMissing=(D,y)=>!(D in y)||f(D,y),this._identifyRequired=m,this._preprocess=g,this._postprocess=w,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=am()}normalize(e){let r={},a=[this._preprocess(e,this._utils)],s=()=>{for(;a.length!==0;){let l=a.shift(),u=this._applyNormalization(l,r);a.push(...u)}};s();for(let l of Object.keys(this._utils.schemas)){let u=this._utils.schemas[l];if(!(l in r)){let d=zs(u.default(this._utils));"value"in d&&a.push({[l]:d.value})}}s();for(let l of Object.keys(this._utils.schemas)){if(!(l in r))continue;let u=this._utils.schemas[l],d=r[l],p=u.postprocess(d,this._utils);p!==Fr&&(this._applyValidation(p,l,u),r[l]=p)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(e,r){let a=[],{knownKeys:s,unknownKeys:l}=this._partitionOptionKeys(e);for(let u of s){let d=this._utils.schemas[u],p=d.preprocess(e[u],this._utils);this._applyValidation(p,u,d);let f=({from:w,to:D})=>{a.push(typeof D=="string"?{[D]:w}:{[D.key]:D.value})},m=({value:w,redirectTo:D})=>{let y=Hs(d.deprecated(w,this._utils),p,!0);if(y!==!1)if(y===!0)this._hasDeprecationWarned(u)||this._utils.logger.warn(this._deprecatedHandler(u,D,this._utils));else for(let{value:v}of y){let E={key:u,value:v};if(!this._hasDeprecationWarned(E)){let C=typeof D=="string"?{key:D,value:v}:D;this._utils.logger.warn(this._deprecatedHandler(E,C,this._utils))}}};Sn(d.forward(p,this._utils),p).forEach(f);let g=Us(d.redirect(p,this._utils),p);if(g.redirect.forEach(f),"remain"in g){let w=g.remain;r[u]=u in r?d.overlap(r[u],w,this._utils):w,m({value:w})}for(let{from:w,to:D}of g.redirect)m({value:w,redirectTo:D})}for(let u of l){let d=e[u];this._applyUnknownHandler(u,d,r,(p,f)=>{a.push({[p]:f})})}return a}_applyRequiredCheck(e){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,e)&&this._identifyRequired(r))throw this._invalidHandler(r,Vo,this._utils)}_partitionOptionKeys(e){let[r,a]=sm(Object.keys(e).filter(s=>!this._identifyMissing(s,e)),s=>s in this._utils.schemas);return{knownKeys:r,unknownKeys:a}}_applyValidation(e,r,a){let s=$s(a.validate(e,this._utils),e);if(s!==!0)throw this._invalidHandler(r,s.value,this._utils)}_applyUnknownHandler(e,r,a,s){let l=this._unknownHandler(e,r,this._utils);if(l)for(let u of Object.keys(l)){if(this._identifyMissing(u,l))continue;let d=l[u];u in this._utils.schemas?s(u,d):a[u]=d}}_applyPostprocess(e){let r=this._postprocess(e,this._utils);if(r!==Fr){if(r.delete)for(let a of r.delete)delete e[a];if(r.override){let{knownKeys:a,unknownKeys:s}=this._partitionOptionKeys(r.override);for(let l of a){let u=r.override[l];this._applyValidation(u,l,this._utils.schemas[l]),e[l]=u}for(let l of s){let u=r.override[l];this._applyUnknownHandler(l,u,e,(d,p)=>{let f=this._utils.schemas[d];this._applyValidation(p,d,f),e[d]=p})}}}}},hn;function xm(e,r,{logger:a=!1,isCLI:s=!1,passThrough:l=!1,FlagSchema:u,descriptor:d}={}){if(s){if(!u)throw new Error("'FlagSchema' option is required.");if(!d)throw new Error("'descriptor' option is required.")}else d=yt;let p=l?Array.isArray(l)?(D,y)=>l.includes(D)?{[D]:y}:void 0:(D,y)=>({[D]:y}):(D,y,v)=>{let{_:E,...C}=v.schemas;return Ko(D,y,{...v,schemas:C})},f=Dm(r,{isCLI:s,FlagSchema:u}),m=new bm(f,{logger:a,unknown:p,descriptor:d}),g=a!==!1;g&&hn&&(m._hasDeprecationWarned=hn);let w=m.normalize(e);return g&&(hn=m._hasDeprecationWarned),w}function Dm(e,{isCLI:r,FlagSchema:a}){let s=[];r&&s.push(Qh.create({name:"_"}));for(let l of e)s.push(ym(l,{isCLI:r,optionInfos:e,FlagSchema:a})),l.alias&&r&&s.push(Zh.create({name:l.alias,sourceName:l.name}));return s}function ym(e,{isCLI:r,optionInfos:a,FlagSchema:s}){let{name:l}=e,u={name:l},d,p={};switch(e.type){case"int":d=pm,r&&(u.preprocess=Number);break;case"string":d=Ws;break;case"choice":d=cm,u.choices=e.choices.map(f=>f!=null&&f.redirect?{...f,redirect:{to:{key:e.name,value:f.redirect}}}:f);break;case"boolean":d=tm;break;case"flag":d=s,u.flags=a.flatMap(f=>[f.alias,f.description&&f.name,f.oppositeDescription&&`no-${f.name}`].filter(Boolean));break;case"path":d=Ws;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?u.validate=(f,m,g)=>e.exception(f)||m.validate(f,g):u.validate=(f,m,g)=>f===void 0||m.validate(f,g),e.redirect&&(p.redirect=f=>f?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(p.deprecated=!0),r&&!e.array){let f=u.preprocess||(m=>m);u.preprocess=(m,g,w)=>g.preprocess(f(Array.isArray(m)?ae(!1,m,-1):m),w)}return e.array?em.create({...r?{preprocess:f=>Array.isArray(f)?f:[f]}:{},...p,valueSchema:d.create(u)}):d.create({...u,...p})}var vm=xm,wm=(e,r,a)=>{if(!(e&&r==null)){if(r.findLast)return r.findLast(a);for(let s=r.length-1;s>=0;s--){let l=r[s];if(a(l,s,r))return l}}},Xo=wm;function Zo(e,r){if(!r)throw new Error("parserName is required.");let a=Xo(!1,e,l=>l.parsers&&Object.prototype.hasOwnProperty.call(l.parsers,r));if(a)return a;let s=`Couldn't resolve parser "${r}".`;throw s+=" Plugins must be explicitly added to the standalone bundle.",new Ho(s)}function Cm(e,r){if(!r)throw new Error("astFormat is required.");let a=Xo(!1,e,l=>l.printers&&Object.prototype.hasOwnProperty.call(l.printers,r));if(a)return a;let s=`Couldn't find plugin for AST format "${r}".`;throw s+=" Plugins must be explicitly added to the standalone bundle.",new Ho(s)}function Vn({plugins:e,parser:r}){let a=Zo(e,r);return Qo(a,r)}function Qo(e,r){let a=e.parsers[r];return typeof a=="function"?a():a}function Fm(e,r){let a=e.printers[r];return typeof a=="function"?a():a}var Vs={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function Em(e,r={}){var a;let s={...e};if(!s.parser)if(s.filepath){if(s.parser=Wh(s,{physicalFile:s.filepath}),!s.parser)throw new As(`No parser could be inferred for file "${s.filepath}".`)}else throw new As("No parser and no file path given, couldn't infer a parser.");let l=qo({plugins:e.plugins,showDeprecated:!0}).options,u={...Vs,...Object.fromEntries(l.filter(D=>D.default!==void 0).map(D=>[D.name,D.default]))},d=Zo(s.plugins,s.parser),p=await Qo(d,s.parser);s.astFormat=p.astFormat,s.locEnd=p.locEnd,s.locStart=p.locStart;let f=(a=d.printers)!=null&&a[p.astFormat]?d:Cm(s.plugins,p.astFormat),m=await Fm(f,p.astFormat);s.printer=m;let g=f.defaultOptions?Object.fromEntries(Object.entries(f.defaultOptions).filter(([,D])=>D!==void 0)):{},w={...u,...g};for(let[D,y]of Object.entries(w))(s[D]===null||s[D]===void 0)&&(s[D]=y);return s.parser==="json"&&(s.trailingComma="none"),vm(s,l,{passThrough:Object.keys(Vs),...r})}var Ct=Em,Sm=dp(mp());async function km(e,r){let a=await Vn(r),s=a.preprocess?a.preprocess(e,r):e;r.originalText=s;let l;try{l=await a.parse(s,r,r)}catch(u){Am(u,e)}return{text:s,ast:l}}function Am(e,r){let{loc:a}=e;if(a){let s=(0,Sm.codeFrameColumns)(r,a,{highlightCode:!0});throw e.message+=`
|
|
50
|
+
`+s,e.codeFrame=s,e}throw e}var Kt=km;async function Nm(e,r,a,s,l){let{embeddedLanguageFormatting:u,printer:{embed:d,hasPrettierIgnore:p=()=>!1,getVisitorKeys:f}}=a;if(!d||u!=="auto")return;if(d.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let m=Br(d.getVisitorKeys??f),g=[];y();let w=e.stack;for(let{print:v,node:E,pathStack:C}of g)try{e.stack=C;let x=await v(D,r,e,a);x&&l.set(E,x)}catch(x){if(globalThis.PRETTIER_DEBUG)throw x}e.stack=w;function D(v,E){return jm(v,E,a,s)}function y(){let{node:v}=e;if(v===null||typeof v!="object"||p(e))return;for(let C of m(v))Array.isArray(v[C])?e.each(y,C):e.call(y,C);let E=d(e,a);if(E){if(typeof E=="function"){g.push({print:E,node:v,pathStack:[...e.stack]});return}l.set(v,E)}}}async function jm(e,r,a,s){let l=await Ct({...a,...r,parentParser:a.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:u}=await Kt(e,l),d=await s(u,l);return ko(d)}function _m(e,r){let{originalText:a,[Symbol.for("comments")]:s,locStart:l,locEnd:u,[Symbol.for("printedComments")]:d}=r,{node:p}=e,f=l(p),m=u(p);for(let g of s)l(g)>=f&&u(g)<=m&&d.add(g);return a.slice(f,m)}var Bm=_m;async function Tr(e,r){({ast:e}=await ei(e,r));let a=new Map,s=new ch(e),l=new Map;await Nm(s,d,r,Tr,l);let u=await Js(s,r,d,void 0,l);if(_h(r),r.cursorOffset>=0){if(r.nodeAfterCursor&&!r.nodeBeforeCursor)return[st,u];if(r.nodeBeforeCursor&&!r.nodeAfterCursor)return[u,st]}return u;function d(f,m){return f===void 0||f===s?p(m):Array.isArray(f)?s.call(()=>p(m),...f):s.call(()=>p(m),f)}function p(f){let m=s.node;if(m==null)return"";let g=m&&typeof m=="object"&&f===void 0;if(g&&a.has(m))return a.get(m);let w=Js(s,r,d,f,l);return g&&a.set(m,w),w}}function Js(e,r,a,s,l){var u;let{node:d}=e,{printer:p}=r,f;switch((u=p.hasPrettierIgnore)!=null&&u.call(p,e)?f=Bm(e,r):l.has(d)?f=l.get(d):f=p.print(e,r,a,s),d){case r.cursorNode:f=wr(f,m=>[st,m,st]);break;case r.nodeBeforeCursor:f=wr(f,m=>[m,st]);break;case r.nodeAfterCursor:f=wr(f,m=>[st,m]);break}return p.printComment&&(!p.willPrintOwnComments||!p.willPrintOwnComments(e,r))&&(f=jh(e,f,r)),f}async function ei(e,r){let a=e.comments??[];r[Symbol.for("comments")]=a,r[Symbol.for("printedComments")]=new Set,Ch(e,r);let{printer:{preprocess:s}}=r;return e=s?await s(e,r):e,{ast:e,comments:a}}function Tm(e,r){let{cursorOffset:a,locStart:s,locEnd:l}=r,u=Br(r.printer.getVisitorKeys),d=y=>s(y)<=a&&l(y)>=a,p=e,f=[e];for(let y of hh(e,{getVisitorKeys:u,filter:d}))f.push(y),p=y;if(mh(p,{getVisitorKeys:u}))return{cursorNode:p};let m,g,w=-1,D=Number.POSITIVE_INFINITY;for(;f.length>0&&(m===void 0||g===void 0);){p=f.pop();let y=m!==void 0,v=g!==void 0;for(let E of _r(p,{getVisitorKeys:u})){if(!y){let C=l(E);C<=a&&C>w&&(m=E,w=C)}if(!v){let C=s(E);C>=a&&C<D&&(g=E,D=C)}}}return{nodeBeforeCursor:m,nodeAfterCursor:g}}var ti=Tm;function Lm(e,r){let{printer:{massageAstNode:a,getVisitorKeys:s}}=r;if(!a)return e;let l=Br(s),u=a.ignoredProperties??new Set;return d(e);function d(p,f){if(!(p!==null&&typeof p=="object"))return p;if(Array.isArray(p))return p.map(D=>d(D,f)).filter(Boolean);let m={},g=new Set(l(p));for(let D in p)!Object.prototype.hasOwnProperty.call(p,D)||u.has(D)||(g.has(D)?m[D]=d(p[D],p):m[D]=p[D]);let w=a(p,m,f);if(w!==null)return w??m}}var Pm=Lm,Im=(e,r,a)=>{if(!(e&&r==null)){if(r.findLastIndex)return r.findLastIndex(a);for(let s=r.length-1;s>=0;s--){let l=r[s];if(a(l,s,r))return s}return-1}},Om=Im,Mm=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function Rm(e,r){let a=[e.node,...e.parentNodes],s=new Set([r.node,...r.parentNodes]);return a.find(l=>ri.has(l.type)&&s.has(l))}function Gs(e){let r=Om(!1,e,a=>a.type!=="Program"&&a.type!=="File");return r===-1?e:e.slice(0,r+1)}function zm(e,r,{locStart:a,locEnd:s}){let l=e.node,u=r.node;if(l===u)return{startNode:l,endNode:u};let d=a(e.node);for(let f of Gs(r.parentNodes))if(a(f)>=d)u=f;else break;let p=s(r.node);for(let f of Gs(e.parentNodes)){if(s(f)<=p)l=f;else break;if(l===u)break}return{startNode:l,endNode:u}}function kn(e,r,a,s,l=[],u){let{locStart:d,locEnd:p}=a,f=d(e),m=p(e);if(!(r>m||r<f||u==="rangeEnd"&&r===f||u==="rangeStart"&&r===m)){for(let g of Un(e,a)){let w=kn(g,r,a,s,[e,...l],u);if(w)return w}if(!s||s(e,l[0]))return{node:e,parentNodes:l}}}function $m(e,r){return r!=="DeclareExportDeclaration"&&e!=="TypeParameterDeclaration"&&(e==="Directive"||e==="TypeAlias"||e==="TSExportAssignment"||e.startsWith("Declare")||e.startsWith("TSDeclare")||e.endsWith("Statement")||e.endsWith("Declaration"))}var ri=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),Hm=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function Ks(e,r,a){if(!r)return!1;switch(e.parser){case"flow":case"hermes":case"babel":case"babel-flow":case"babel-ts":case"typescript":case"acorn":case"espree":case"meriyah":case"oxc":case"oxc-ts":case"__babel_estree":return $m(r.type,a?.type);case"json":case"json5":case"jsonc":case"json-stringify":return ri.has(r.type);case"graphql":return Hm.has(r.kind);case"vue":return r.tag!=="root"}return!1}function qm(e,r,a){let{rangeStart:s,rangeEnd:l,locStart:u,locEnd:d}=r;En.ok(l>s);let p=e.slice(s,l).search(/\S/u),f=p===-1;if(!f)for(s+=p;l>s&&!/\S/u.test(e[l-1]);--l);let m=kn(a,s,r,(y,v)=>Ks(r,y,v),[],"rangeStart"),g=f?m:kn(a,l,r,y=>Ks(r,y),[],"rangeEnd");if(!m||!g)return{rangeStart:0,rangeEnd:0};let w,D;if(Mm(r)){let y=Rm(m,g);w=y,D=y}else({startNode:w,endNode:D}=zm(m,g,r));return{rangeStart:Math.min(u(w),u(D)),rangeEnd:Math.max(d(w),d(D))}}var ni="\uFEFF",Ys=Symbol("cursor");async function ai(e,r,a=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:s,text:l}=await Kt(e,r);r.cursorOffset>=0&&(r={...r,...ti(s,r)});let u=await Tr(s,r);a>0&&(u=To([ot,u],a,r.tabWidth));let d=jr(u,r);if(a>0){let f=d.formatted.trim();d.cursorNodeStart!==void 0&&(d.cursorNodeStart-=d.formatted.indexOf(f),d.cursorNodeStart<0&&(d.cursorNodeStart=0,d.cursorNodeText=d.cursorNodeText.trimStart()),d.cursorNodeStart+d.cursorNodeText.length>f.length&&(d.cursorNodeText=d.cursorNodeText.trimEnd())),d.formatted=f+On(r.endOfLine)}let p=r[Symbol.for("comments")];if(r.cursorOffset>=0){let f,m,g,w;if((r.cursorNode||r.nodeBeforeCursor||r.nodeAfterCursor)&&d.cursorNodeText)if(g=d.cursorNodeStart,w=d.cursorNodeText,r.cursorNode)f=r.locStart(r.cursorNode),m=l.slice(f,r.locEnd(r.cursorNode));else{if(!r.nodeBeforeCursor&&!r.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");f=r.nodeBeforeCursor?r.locEnd(r.nodeBeforeCursor):0;let x=r.nodeAfterCursor?r.locStart(r.nodeAfterCursor):l.length;m=l.slice(f,x)}else f=0,m=l,g=0,w=d.formatted;let D=r.cursorOffset-f;if(m===w)return{formatted:d.formatted,cursorOffset:g+D,comments:p};let y=m.split("");y.splice(D,0,Ys);let v=w.split(""),E=yp(y,v),C=g;for(let x of E)if(x.removed){if(x.value.includes(Ys))break}else C+=x.count;return{formatted:d.formatted,cursorOffset:C,comments:p}}return{formatted:d.formatted,cursorOffset:-1,comments:p}}async function Um(e,r){let{ast:a,text:s}=await Kt(e,r),{rangeStart:l,rangeEnd:u}=qm(s,r,a),d=s.slice(l,u),p=Math.min(l,s.lastIndexOf(`
|
|
51
|
+
`,l)+1),f=s.slice(p,l).match(/^\s*/u)[0],m=Hn(f,r.tabWidth),g=await ai(d,{...r,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:r.cursorOffset>l&&r.cursorOffset<=u?r.cursorOffset-l:-1,endOfLine:"lf"},m),w=g.formatted.trimEnd(),{cursorOffset:D}=r;D>u?D+=w.length-d.length:g.cursorOffset>=0&&(D=g.cursorOffset+l);let y=s.slice(0,l)+w+s.slice(u);if(r.endOfLine!=="lf"){let v=On(r.endOfLine);D>=0&&v===`\r
|
|
52
|
+
`&&(D+=Eo(y.slice(0,D),`
|
|
53
53
|
`)),y=kr(!1,y,`
|
|
54
|
-
`,v)}return{formatted:y,cursorOffset:D,comments:g.comments}}function
|
|
55
|
-
`);a-=p(a),s-=p(s),l-=p(l),e=
|
|
56
|
-
`);return a===-1?0:
|
|
57
|
-
`)return!0;return!1}var
|
|
54
|
+
`,v)}return{formatted:y,cursorOffset:D,comments:g.comments}}function mn(e,r,a){return typeof r!="number"||Number.isNaN(r)||r<0||r>e.length?a:r}function Xs(e,r){let{cursorOffset:a,rangeStart:s,rangeEnd:l}=r;return a=mn(e,a,-1),s=mn(e,s,0),l=mn(e,l,e.length),{...r,cursorOffset:a,rangeStart:s,rangeEnd:l}}function si(e,r){let{cursorOffset:a,rangeStart:s,rangeEnd:l,endOfLine:u}=Xs(e,r),d=e.charAt(0)===ni;if(d&&(e=e.slice(1),a--,s--,l--),u==="auto"&&(u=vp(e)),e.includes("\r")){let p=f=>Eo(e.slice(0,Math.max(f,0)),`\r
|
|
55
|
+
`);a-=p(a),s-=p(s),l-=p(l),e=wp(e)}return{hasBOM:d,text:e,options:Xs(e,{...r,cursorOffset:a,rangeStart:s,rangeEnd:l,endOfLine:u})}}async function Zs(e,r){let a=await Vn(r);return!a.hasPragma||a.hasPragma(e)}async function Wm(e,r){var a;let s=await Vn(r);return(a=s.hasIgnorePragma)==null?void 0:a.call(s,e)}async function oi(e,r){let{hasBOM:a,text:s,options:l}=si(e,await Ct(r));if(l.rangeStart>=l.rangeEnd&&s!==""||l.requirePragma&&!await Zs(s,l)||l.checkIgnorePragma&&await Wm(s,l))return{formatted:e,cursorOffset:r.cursorOffset,comments:[]};let u;return l.rangeStart>0||l.rangeEnd<s.length?u=await Um(s,l):(!l.requirePragma&&l.insertPragma&&l.printer.insertPragma&&!await Zs(s,l)&&(s=l.printer.insertPragma(s)),u=await ai(s,l)),a&&(u.formatted=ni+u.formatted,u.cursorOffset>=0&&u.cursorOffset++),u}async function Vm(e,r,a){let{text:s,options:l}=si(e,await Ct(r)),u=await Kt(s,l);return a&&(a.preprocessForPrint&&(u.ast=await ei(u.ast,l)),a.massage&&(u.ast=Pm(u.ast,l))),u}async function Jm(e,r){r=await Ct(r);let a=await Tr(e,r);return jr(a,r)}async function Gm(e,r){let a=Qp(e),{formatted:s}=await oi(a,{...r,parser:"__js_expression"});return s}async function Km(e,r){r=await Ct(r);let{ast:a}=await Kt(e,r);return r.cursorOffset>=0&&(r={...r,...ti(a,r)}),Tr(a,r)}async function Ym(e,r){return jr(e,await Ct(r))}var ii={};In(ii,{builders:()=>Xm,printer:()=>Zm,utils:()=>Qm});var Xm={join:Bo,line:jo,softline:Xp,hardline:ot,literalline:_o,group:Ao,conditionalGroup:Wp,fill:Vp,lineSuffix:yn,lineSuffixBoundary:Kp,cursor:st,breakParent:Nr,ifBreak:Jp,trim:Yp,indent:Er,indentIfBreak:Gp,align:wt,addAlignmentToDoc:To,markAsRoot:qp,dedentToRoot:Hp,dedent:Up,hardlineWithoutBreakParent:zn,literallineWithoutBreakParent:No,label:Zp,concat:e=>e},Zm={printDocToString:jr},Qm={willBreak:_p,traverseDoc:Mn,findInDoc:Rn,mapDoc:Ar,removeLines:Lp,stripTrailingHardline:ko,replaceEndOfLine:Op,canBreak:Rp},ef="3.6.2",li={};In(li,{addDanglingComment:()=>nt,addLeadingComment:()=>Wt,addTrailingComment:()=>Vt,getAlignmentSize:()=>Hn,getIndentSize:()=>of,getMaxContinuousCount:()=>cf,getNextNonSpaceNonCommentCharacter:()=>pf,getNextNonSpaceNonCommentCharacterIndex:()=>wf,getPreferredQuote:()=>mf,getStringWidth:()=>$n,hasNewline:()=>Ve,hasNewlineInRange:()=>gf,hasSpaces:()=>xf,isNextLineEmpty:()=>Sf,isNextLineEmptyAfterIndex:()=>Yn,isPreviousLineEmpty:()=>Ff,makeString:()=>yf,skip:()=>Gt,skipEverythingButNewLine:()=>Oo,skipInlineComment:()=>Jn,skipNewline:()=>it,skipSpaces:()=>Je,skipToLineEnd:()=>Io,skipTrailingComment:()=>Gn,skipWhitespace:()=>fh});function tf(e,r){if(r===!1)return!1;if(e.charAt(r)==="/"&&e.charAt(r+1)==="*"){for(let a=r+2;a<e.length;++a)if(e.charAt(a)==="*"&&e.charAt(a+1)==="/")return a+2}return r}var Jn=tf;function rf(e,r){return r===!1?!1:e.charAt(r)==="/"&&e.charAt(r+1)==="/"?Oo(e,r):r}var Gn=rf;function nf(e,r){let a=null,s=r;for(;s!==a;)a=s,s=Je(e,s),s=Jn(e,s),s=Gn(e,s),s=it(e,s);return s}var Kn=nf;function af(e,r){let a=null,s=r;for(;s!==a;)a=s,s=Io(e,s),s=Jn(e,s),s=Je(e,s);return s=Gn(e,s),s=it(e,s),s!==!1&&Ve(e,s)}var Yn=af;function sf(e,r){let a=e.lastIndexOf(`
|
|
56
|
+
`);return a===-1?0:Hn(e.slice(a+1).match(/^[\t ]*/u)[0],r)}var of=sf;function lf(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function uf(e,r){let a=e.match(new RegExp(`(${lf(r)})+`,"gu"));return a===null?0:a.reduce((s,l)=>Math.max(s,l.length/r.length),0)}var cf=uf;function df(e,r){let a=Kn(e,r);return a===!1?"":e.charAt(a)}var pf=df,vr="'",Qs='"';function hf(e,r){let a=r===!0||r===vr?vr:Qs,s=a===vr?Qs:vr,l=0,u=0;for(let d of e)d===a?l++:d===s&&u++;return l>u?s:a}var mf=hf;function ff(e,r,a){for(let s=r;s<a;++s)if(e.charAt(s)===`
|
|
57
|
+
`)return!0;return!1}var gf=ff;function bf(e,r,a={}){return Je(e,a.backwards?r-1:r,a)!==r}var xf=bf;function Df(e,r,a){let s=r==='"'?"'":'"',l=kr(!1,e,/\\(.)|(["'])/gsu,(u,d,p)=>d===s?d:p===r?"\\"+p:p||(a&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(d)?d:"\\"+d));return r+l+r}var yf=Df;function vf(e,r,a){return Kn(e,a(r))}function wf(e,r){return arguments.length===2||typeof r=="number"?Kn(e,r):vf(...arguments)}function Cf(e,r,a){return Wn(e,a(r))}function Ff(e,r){return arguments.length===2||typeof r=="number"?Wn(e,r):Cf(...arguments)}function Ef(e,r,a){return Yn(e,a(r))}function Sf(e,r){return arguments.length===2||typeof r=="number"?Yn(e,r):Ef(...arguments)}function at(e,r=1){return async(...a)=>{let s=a[r]??{},l=s.plugins??[];return a[r]={...s,plugins:Array.isArray(l)?l:Object.values(l)},e(...a)}}var ui=at(oi);async function Xn(e,r){let{formatted:a}=await ui(e,{...r,cursorOffset:-1});return a}async function kf(e,r){return await Xn(e,r)===e}var Af=at(qo,0),Nf={parse:at(Vm),formatAST:at(Jm),formatDoc:at(Gm),printToDoc:at(Km),printDocToString:at(Ym)};function jf(e=""){const{actions:r,query:a}=H.useEditor(),{getHtml:s}=Sr(),{import:l}=Ln(),[u,d]=S.useState(e),[p,f]=S.useState(e),[m,g]=S.useState("idle"),[w,D]=S.useState(""),[y,v]=S.useState(!1),E=S.useCallback(async()=>{if(u.trim()){v(!0);try{const O=await Xn(u,{parser:"html",plugins:[np],printWidth:80,tabWidth:2,useTabs:!1,semi:!0,singleQuote:!1,trailingComma:"none",bracketSpacing:!0,htmlWhitespaceSensitivity:"css"});d(O)}catch(O){console.error("Error formatting HTML:",O);const L=u.replace(/>\s*</g,"><").replace(/\n\s*\n/g,`
|
|
58
58
|
`).split(`
|
|
59
59
|
`).map(W=>W.trim()).filter(W=>W).join(`
|
|
60
|
-
`);d(L)}finally{v(!1)}}},[u]),C=S.useRef(null),x=S.useRef(!1),k=u!==p;S.useEffect(()=>{if(!x.current&&r&&a)try{const O=s();O&&O.trim()&&(d(O),f(O)),x.current=!0}catch(O){console.warn("Could not initialize code from canvas:",O)}},[r,a,s]);const j=S.useCallback(async()=>{if(u.trim()){g("processing"),D("");try{l(u,{replace:!0}),g("success")}catch(O){console.error("Error applying code to canvas:",O),g("error"),D(O instanceof Error?O.message:"Unknown error occurred")}}},[l,u]),N=S.useCallback(O=>{d(O),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{O.trim()?j():g("idle")},1e3)},[j]),P=S.useCallback(()=>{f(u),g("success");try{localStorage.setItem("editor_saved_code",u)}catch(O){console.warn("Could not save to localStorage:",O)}},[u]),R=S.useCallback(()=>{d(p),g("idle"),D(""),C.current&&clearTimeout(C.current)},[p]),_=S.useCallback(()=>{C.current&&clearTimeout(C.current),g("idle"),D("")},[]);return S.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]),{codeValue:u,savedCodeValue:p,conversionStatus:m,hasUnsavedChanges:k,errorMessage:w,isFormattingCode:y,handleCodeChange:N,handleSave:P,handleRevert:R,handleClose:_,applyCodeToCanvas:j,formatCode:E}}const Tf=({onClose:e,onFormat:r,onSave:a,isFormattingCode:s,codeValue:l,hasUnsavedChanges:u,conversionStatus:d})=>o.jsxs("div",{className:"flex items-center justify-between border-b border-gray-700 bg-[#23272f] px-4 py-2",children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx("div",{className:"group relative",children:o.jsx("button",{className:"rounded p-1 text-gray-400 transition-colors duration-200 hover:text-white",onClick:e,"aria-label":"Close Code Panel",children:o.jsx(T.FiX,{size:18})})}),o.jsx("span",{className:"text-base font-semibold text-white",children:"Code Editor"}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("div",{className:`h-2 w-2 rounded-full ${u?"bg-yellow-500":"bg-green-500"}`}),o.jsx("span",{className:`text-xs font-medium ${u?"text-yellow-400":"text-green-400"}`,children:u?"Unsaved":"Saved"})]})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsxs("div",{className:"group relative",children:[o.jsx("button",{onClick:r,disabled:s||!l.trim(),className:"rounded p-1 text-gray-400 transition-colors duration-200 hover:text-white disabled:cursor-not-allowed disabled:text-gray-600","aria-label":"Format HTML",children:s?o.jsx(T.FiLoader,{size:18,className:"animate-spin"}):o.jsx(T.FiFileText,{size:18})}),o.jsx("span",{className:"absolute bottom-full left-1/2 z-10 mb-2 -translate-x-1/2 transform whitespace-nowrap rounded bg-gray-900 px-2 py-1 text-xs text-white opacity-0 transition-opacity duration-200 group-hover:opacity-100",children:s?"Formatting HTML...":"Format HTML"})]}),o.jsxs("div",{className:"group relative",children:[o.jsx("button",{onClick:a,disabled:d==="processing"||!u,className:"rounded p-1 text-gray-400 transition-colors duration-200 hover:text-white disabled:cursor-not-allowed disabled:text-gray-600","aria-label":"Save HTML",children:o.jsx(T.FiSave,{size:18})}),o.jsx("span",{className:"absolute bottom-full left-1/2 z-10 mb-2 -translate-x-1/2 transform whitespace-nowrap rounded bg-gray-900 px-2 py-1 text-xs text-white opacity-0 transition-opacity duration-200 group-hover:opacity-100",children:"Save"})]})]})]});function Lf({height:e="100%",defaultLanguage:r="html",theme:a="vs-dark",value:s,onChange:l,options:u}){const d=S.useRef(null),[p,f]=S.useState(null);return S.useEffect(()=>{const m=document.createElement("div");return m.style.position="fixed",m.style.top="0",m.style.left="0",m.style.width="100%",m.style.height="100%",m.style.pointerEvents="none",m.style.zIndex="9999",document.body.appendChild(m),f(m),()=>{m.parentNode&&m.parentNode.removeChild(m)}},[]),S.useEffect(()=>{if(!d.current||!p)return;const m=()=>{if(!d.current||!p)return;const D=d.current.getBoundingClientRect(),y=p.firstChild;y&&(y.style.position="absolute",y.style.top=`${D.top}px`,y.style.left=`${D.left}px`,y.style.width=`${D.width}px`,y.style.height=`${D.height}px`,y.style.pointerEvents="auto")};m();const g=()=>{requestAnimationFrame(m)};window.addEventListener("resize",g),window.addEventListener("scroll",g,!0);let w;return window.ResizeObserver&&(w=new ResizeObserver(g),w.observe(d.current)),()=>{window.removeEventListener("resize",g),window.removeEventListener("scroll",g,!0),w&&w.disconnect()}},[p]),o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:d,style:{width:"100%",height:e}}),p&&Nd.createPortal(o.jsx("div",{style:{backgroundColor:"#1e1e1e"},children:o.jsx(Pd.default,{height:e,defaultLanguage:r,theme:a,value:s,onChange:l,options:u})}),p)]})}function Pf({onClose:e}){const{codeValue:r,conversionStatus:a,hasUnsavedChanges:s,handleCodeChange:l,handleSave:u,handleClose:d,formatCode:p,isFormattingCode:f}=Bf();return o.jsxs("div",{className:"flex h-full w-1/2 flex-col border-r border-gray-200 bg-[#181c24]",children:[o.jsx(Tf,{onClose:()=>{d(),e()},onFormat:p,onSave:u,isFormattingCode:f,codeValue:r,hasUnsavedChanges:s,conversionStatus:a}),o.jsx("div",{className:"flex-1 p-0",style:{width:"100%",height:"100%"},children:o.jsx(Lf,{height:"100%",defaultLanguage:"html",theme:"vs-dark",value:r,onChange:m=>l(m||""),options:{fontSize:16,padding:{top:10},minimap:{enabled:!1},wordWrap:"on",scrollBeyondLastLine:!1,formatOnPaste:!0,formatOnType:!0,autoIndent:"full",tabSize:2,insertSpaces:!0,automaticLayout:!0,folding:!0,lineNumbers:"on",renderWhitespace:"selection",bracketPairColorization:{enabled:!0},guides:{bracketPairs:!0,indentation:!0},suggest:{showKeywords:!0,showSnippets:!0}}})})]})}const If={loading:!1,template:{}},di=S.createContext(If);function pi(){const e=S.useContext(di);if(!e)throw new Error("useTemplate must be used within a TemplateProvider");return e}const Of={},Mf=(e,r)=>({onDeleteNode:()=>{const a=r.getEvent("selected").last();a&&e.delete(a)},onCopy:()=>{const a=r.getEvent("selected").last();if(!a){console.warn("[Copy] No node selected");return}try{const s=r.node(a).toNodeTree();console.log("[Copy] Node tree:",s);const l={type:"craftjs-copy",nodeTree:s,selectedId:a,timestamp:Date.now()};console.log("[Copy] Copy data:",l);const u=JSON.stringify(l,(d,p)=>{if(!["dom","rules","_hydrationTimestamp","events"].includes(d))return d==="type"&&typeof p=="function"?{resolvedName:p.name||p.displayName||"Unknown"}:p});navigator.clipboard.writeText(u),console.log("[Copy] Successfully copied to clipboard")}catch(s){console.error("[Copy] Failed to copy node:",s)}},onPaste:async()=>{console.log("[Paste] Starting paste operation...");try{const a=await navigator.clipboard.readText();if(console.log("[Paste] Clipboard text:",a),!a){console.warn("[Paste] Clipboard is empty");return}let s;try{s=JSON.parse(a),console.log("[Paste] Parsed clipboard data:",s)}catch(w){console.warn("[Paste] Invalid clipboard data:",w);return}if(!s||s.type!=="craftjs-copy"||!s.nodeTree){console.warn("[Paste] Clipboard does not contain valid node data");return}const l=s.nodeTree;console.log("[Paste] Node tree to paste:",l);const d=(w=>{const D={...w},y={},v=()=>Math.random().toString(36).substring(2,15);if(D.nodes&&(Object.keys(D.nodes).forEach(E=>{y[E]=v()}),D.rootNodeId&&y[D.rootNodeId]&&(D.rootNodeId=y[D.rootNodeId])),D.nodes){const E={};Object.keys(D.nodes).forEach(C=>{const x={...D.nodes[C]},k=y[C];if(x.id=k,x.events=x.events||{selected:!1,dragged:!1,hovered:!1},x.dom=null,x.rules=x.rules||{canDrag:()=>!0,canDrop:()=>!0,canMoveIn:()=>!0,canMoveOut:()=>!0},x.data){if(x.data.props=x.data.props||{},x.data.custom=x.data.custom||{},x.data.hidden=x.data.hidden||!1,x.data.isCanvas=x.data.isCanvas||!1,x.data.nodes=x.data.nodes||[],x.data.linkedNodes=x.data.linkedNodes||{},x.data.displayName=x.data.displayName||x.data.type?.displayName||"Component",x.data.parent&&y[x.data.parent]&&(x.data.parent=y[x.data.parent]),x.data.nodes&&Array.isArray(x.data.nodes)&&(x.data.nodes=x.data.nodes.map(j=>y[j]||j)),x.data.linkedNodes){const j={};Object.keys(x.data.linkedNodes).forEach(N=>{const P=x.data.linkedNodes[N];j[N]=y[P]||P}),x.data.linkedNodes=j}if(x.data.type&&typeof x.data.type=="object"&&x.data.type.resolvedName){const j=Jt.find(N=>{const P=typeof N.component=="function"?N.component.name||N.component.displayName:"";return N.id===x.data.type.resolvedName||P===x.data.type.resolvedName});j?(x.data.type=j.component,console.log("[Paste] Resolved component:",x.data.type.resolvedName,"to",j.component)):console.warn("[Paste] Could not resolve component:",x.data.type.resolvedName)}}E[k]=x}),D.nodes=E}return D})(l);console.log("[Paste] Reconstructed node tree:",d);const p=r.getEvent("selected").last();let f="ROOT",m;if(p){const w=r.node(p).get();if(console.log("[Paste] Selected node data:",w),w.data.isCanvas)f=p,m=(w.data.nodes||[]).length,console.log("[Paste] Inserting as child of canvas node:",p,"at index:",m);else{const D=w.data.parent;D?(f=D,m=r.node(f).get().data.nodes.indexOf(p)+1,console.log("[Paste] Inserting after selected node in parent:",f,"at index:",m)):(f="ROOT",m=r.node("ROOT").get().data.nodes.indexOf(p)+1,console.log("[Paste] Inserting after selected node in ROOT at index:",m))}}else m=r.node("ROOT").get().data.nodes.length,console.log("[Paste] No selection, adding to end of ROOT at index:",m);console.log("[Paste] Will insert at parent:",f,"index:",m),console.log("[Paste] Using addNodeTree with reconstructed nodeTree:",d),e.addNodeTree(d,f,m);const g=d.rootNodeId;g&&(console.log("[Paste] Selecting newly pasted node:",g),e.selectNode(g)),console.log("[Paste] Node pasted successfully")}catch(a){console.error("[Paste] Failed to paste:",a),a instanceof Error&&console.error("[Paste] Error stack:",a.stack)}},onUndo:()=>e.history.undo(),onRedo:()=>e.history.redo(),onSave:()=>{const a=r.serialize();console.log("Saving JSON:",a)}});function Rf(){const{actions:e,query:r}=H.useEditor(),a=l=>l.toLowerCase().charAt(0).toUpperCase()+l.toLowerCase().slice(1),s=l=>l.includes("_")?`on${l.split("_").map(a).join("")}`:`on${a(l)}`;S.useEffect(()=>{const l=Mf(e,r),u=d=>{const p=navigator.platform.includes("Mac"),f=[];(p&&d.metaKey||!p&&d.ctrlKey)&&f.push(p?"Meta":"Ctrl"),d.shiftKey&&f.push("Shift"),f.push(d.key);const m=f.join("+");Object.entries(Of).forEach(([g,w])=>{if(w.keys.includes(m)){d.preventDefault();const D=l[s(g)];console.log("Executing shortcut:",g,s(g)),D?.()}})};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[e,r])}const zf=({name:e})=>o.jsx("div",{className:"border-b border-[#e8e7ee] bg-gray-50 p-4",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded bg-[#170f4f]",children:o.jsx("span",{className:"text-xs font-medium text-white",children:e.charAt(0).toUpperCase()})}),o.jsx("div",{className:"flex-1",children:o.jsx("h3",{className:"text-sm font-medium text-[#170f4f]",children:e})})]})});function $f(){const{selected:e,actions:r,query:a}=H.useEditor(m=>({selected:m.events.selected})),s=()=>{if(e&&e.size>0){const m=Array.from(e)[0];r.delete(m)}},l=()=>{if(e&&e.size>0){const m=Array.from(e)[0];console.log("Clone component:",m)}},u=()=>{if(e&&e.size>0){const m=Array.from(e)[0];console.log("Move up component:",m)}},d=()=>{if(e&&e.size>0){const m=Array.from(e)[0];console.log("Move down component:",m)}};S.useEffect(()=>{const m=g=>{if(e&&e.size>0){const w=g.target;!(w.tagName==="INPUT"||w.tagName==="TEXTAREA"||w.contentEditable==="true")&&(g.key==="Backspace"||g.key==="Delete")&&(g.preventDefault(),s())}};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[e]);const f=(()=>{if(!e||e.size===0)return null;const m=Array.from(e)[0],g=a.node(m).get();return g?{id:m,type:g.data.type,displayName:g.data.displayName||String(g.data.type),props:g.data.props,isCanvas:g.data.isCanvas,isDeletable:!0,isDuplicateable:!0,parent:g.data.parent}:null})();return f?o.jsxs("div",{className:"space-y-3 p-4",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("button",{onClick:l,disabled:!f.isDuplicateable,className:"flex items-center justify-center gap-2 border border-[#e8e7ee] bg-white px-3 py-2 text-xs font-medium transition-colors duration-200 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",children:[o.jsx(T.FiCopy,{size:14}),"Duplicate"]}),o.jsxs("button",{onClick:s,disabled:!f.isDeletable,className:"flex items-center justify-center gap-2 border border-[#e8e7ee] bg-white px-3 py-2 text-xs font-medium transition-colors duration-200 hover:border-red-300 hover:bg-red-50 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-50",children:[o.jsx(T.FiTrash2,{size:14}),"Delete"]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("button",{onClick:u,className:"flex items-center justify-center gap-2 border border-[#e8e7ee] bg-white px-3 py-2 text-xs font-medium transition-colors duration-200 hover:bg-gray-50",children:[o.jsx(T.FiArrowUp,{size:14}),"Move Up"]}),o.jsxs("button",{onClick:d,className:"flex items-center justify-center gap-2 border border-[#e8e7ee] bg-white px-3 py-2 text-xs font-medium transition-colors duration-200 hover:bg-gray-50",children:[o.jsx(T.FiArrowDown,{size:14}),"Move Down"]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("button",{className:"flex items-center justify-center gap-2 border border-[#e8e7ee] bg-white px-3 py-2 text-xs font-medium transition-colors duration-200 hover:bg-gray-50",children:[o.jsx(T.FiLock,{size:14}),"Lock"]}),o.jsxs("button",{className:"flex items-center justify-center gap-2 border border-[#e8e7ee] bg-white px-3 py-2 text-xs font-medium transition-colors duration-200 hover:bg-gray-50",children:[o.jsx(T.FiEyeOff,{size:14}),"Hide"]})]})]}):null}function Hf(){const{selected:e,query:r}=H.useEditor(m=>({selected:m.events.selected})),[a,s]=S.useState(""),l=S.useRef(null),u=()=>{if(l.current){const m=l.current.textContent||"";navigator.clipboard.writeText(m).then(()=>{console.log("HTML copied to clipboard")})}},d=m=>{try{const g=r.node(m).get();return g&&g.dom?g.dom.outerHTML.replace(/data-cy="[^"]*"/g,"").replace(/data-craft-id="[^"]*"/g,"").replace(/data-node-id="[^"]*"/g,"").replace(/class="[^"]*craft[^"]*"/g,'class=""').replace(/class="[^"]*ring-[^"]*"/g,'class=""').replace(/class="[^"]*hover:[^"]*"/g,'class=""').replace(/class="[^"]*transition-[^"]*"/g,'class=""').replace(/class="[^"]*duration-[^"]*"/g,'class=""').replace(/class="[^"]*opacity-[^"]*"/g,'class=""').replace(/class="[^"]*cursor-[^"]*"/g,'class=""').replace(/class="[^"]*min-h-screen[^"]*"/g,'class=""').replace(/class="[^"]*bg-white[^"]*"/g,'class=""').replace(/class=""/g,"").replace(/\s+/g," ").trim()||"<!-- No HTML available -->":"<!-- Component not found in DOM -->"}catch(g){return console.error("Error getting component HTML:",g),"<!-- Error getting component HTML -->"}};S.useEffect(()=>{if(e&&e.size>0){const m=Array.from(e)[0];if(r.node(m).get()){const w=d(m);s(w)}}else s("")},[e,r]);const f=(()=>{if(!e||e.size===0)return null;const m=Array.from(e)[0],g=r.node(m).get();return g?{id:m,type:g.data.type,displayName:g.data.displayName||String(g.data.type),props:g.data.props,isCanvas:g.data.isCanvas,isDeletable:!0,isDuplicateable:!0,parent:g.data.parent}:null})();return f?o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs font-medium text-gray-700",children:"Component ID"}),o.jsx("input",{type:"text",value:f.id,readOnly:!0,className:"w-full rounded-none border border-[#e8e7ee] bg-gray-50 px-3 py-2 text-xs focus:outline-none"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs font-medium text-gray-700",children:"Component Parent"}),o.jsx("input",{type:"text",value:String(f.parent),readOnly:!0,className:"w-full rounded-none border border-[#e8e7ee] bg-gray-50 px-3 py-2 text-xs focus:outline-none"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs font-medium text-gray-700",children:"Properties"}),o.jsx("div",{className:"rounded-none border border-[#e8e7ee] bg-gray-50 p-3",children:o.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-600",children:JSON.stringify(f?.props,null,2)})})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700",children:"Component HTML"}),o.jsx("button",{onClick:u,className:"rounded-none p-1 text-gray-400 transition-colors duration-200 hover:bg-gray-100 hover:text-gray-600",title:"Copy HTML to clipboard",children:o.jsx(T.FiClipboard,{size:14})})]}),o.jsx("div",{className:"rounded-none border border-[#e8e7ee] bg-gray-50 p-3",children:o.jsx("pre",{ref:l,className:"whitespace-pre-wrap font-mono text-xs text-gray-600",children:a||"<!-- No HTML available -->"})})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("span",{className:"inline-flex items-center rounded bg-blue-100 px-2 py-1 text-xs font-medium text-blue-800",children:f.isCanvas?"Canvas":"Component"}),f.isDeletable&&o.jsx("span",{className:"inline-flex items-center rounded bg-green-100 px-2 py-1 text-xs font-medium text-green-800",children:"Deletable"}),f.isDuplicateable&&o.jsx("span",{className:"inline-flex items-center rounded bg-purple-100 px-2 py-1 text-xs font-medium text-purple-800",children:"Duplicatable"})]})]}):null}function qf(){const{actions:{setProp:e},text:r}=H.useNode(a=>({text:a.data.props.children}));return o.jsx("div",{className:"space-y-4 p-4",children:o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Text"}),o.jsx("textarea",{rows:5,value:r,onChange:a=>e(s=>s.children=a.target.value),className:"focus:ring-primary-500 min-h-fit w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]})})}const Yt=({title:e,icon:r,children:a,defaultOpen:s=!1,className:l=""})=>{const u=S.useRef(null),[d,p]=S.useState(s),[f,m]=S.useState(s?void 0:0),g=S.useRef(null);S.useEffect(()=>{u.current&&u.current.parentElement&&u.current.parentElement.firstElementChild===u.current&&!s&&(p(!0),m(void 0))},[s]),S.useEffect(()=>{if(g.current)if(d){const D=g.current.scrollHeight;m(D)}else m(0)},[d]);const w=()=>{p(!d)};return o.jsxs("div",{ref:u,className:`overflow-hidden border border-[#E8E7EE] ${l}`,children:[o.jsxs("button",{onClick:w,className:"flex w-full items-center justify-between border-b border-[#E8E7EE] bg-white px-4 py-3 transition-colors hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-[#170F4F]",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[r,o.jsx("h3",{className:"text-sm font-medium text-[#170F4F]",children:e})]}),o.jsx(T.FiChevronDown,{size:16,className:`text-[#A29FB9] transition-transform duration-200 ${d?"rotate-0":"-rotate-90"}`})]}),o.jsx("div",{ref:g,style:{height:f,overflow:"hidden",transition:"height 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},"data-testid":`collapse-content-${e.replace(/\s+/g,"-").toLowerCase()}`,children:d&&o.jsx("div",{className:"bg-white p-4",children:a})})]})};function hi(){const{actions:{setProp:e},style:{backgroundColor:r}={}}=H.useNode(a=>({style:a.data.props.style||{}}));return o.jsx(Yt,{title:"Background",icon:o.jsx(T.FiEdit3,{size:14,className:"text-[#170F4F]"}),defaultOpen:!1,children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("input",{type:"color",value:r,onChange:a=>e(s=>s.style.backgroundColor=a.target.value),className:"h-10 w-10 cursor-pointer border border-[#E8E7EE] transition-colors hover:border-[#170F4F]","aria-label":"Background color"}),o.jsx("input",{type:"text",value:r,onChange:a=>e(s=>s.style.backgroundColor=a.target.value),className:"flex-1 border border-[#E8E7EE] px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]",placeholder:"#ffffff"})]})})}function mi(){const{actions:{setProp:e},style:{borderStyle:r,borderRadius:a,borderColor:s,borderWidth:l}={}}=H.useNode(u=>({style:u.data.props.style||{}}));return o.jsx(Yt,{title:"Border",icon:o.jsx(T.FiSquare,{size:14,className:"text-[#170F4F]"}),defaultOpen:!1,children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Border Radius"}),o.jsx("div",{className:"grid grid-cols-4 gap-1",children:[{value:"",label:"0"},{value:"4px",label:"4px"},{value:"8px",label:"8px"},{value:"9999px",label:"1/2"}].map(u=>o.jsx("button",{onClick:()=>e(d=>d.style.borderRadius=u.value),className:`border border-[#E8E7EE] px-2 py-2 text-xs transition-all ${a===u.value?"border-[#170F4F] bg-[#170F4F] text-white":"text-[#A29FB9] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,children:u.label},u.value))})]}),o.jsxs("div",{children:[o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Border Width"}),o.jsx("div",{className:"grid grid-cols-4 gap-1",children:[{value:"0px",label:"0"},{value:"1px",label:"1px"},{value:"2px",label:"2px"},{value:"4px",label:"4px"}].map(u=>o.jsx("button",{onClick:()=>e(d=>d.style.borderWidth=u.value),className:`border border-[#E8E7EE] px-2 py-2 text-xs transition-all ${l===u.value?"border-[#170F4F] bg-[#170F4F] text-white":"text-[#A29FB9] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,children:u.label},u.value))})]}),o.jsxs("div",{children:[o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Border type"}),o.jsxs("div",{className:"mb-2 grid grid-cols-2 gap-2",children:[o.jsx("button",{onClick:()=>e(u=>u.style.borderStyle="none"),className:`border border-[#E8E7EE] px-3 py-2 text-xs transition-all ${r==="none"?"border-[#170F4F] bg-[#170F4F] text-white":"text-[#A29FB9] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,children:"None"}),o.jsx("button",{onClick:()=>e(u=>u.style.borderStyle="solid"),className:`border border-[#E8E7EE] px-3 py-2 text-xs transition-all ${r==="solid"?"border-[#170F4F] bg-[#170F4F] text-white":"text-[#A29FB9] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,children:"Light"}),o.jsx("button",{onClick:()=>e(u=>u.style.borderStyle="dotted"),className:`border border-[#E8E7EE] px-3 py-2 text-xs transition-all ${r==="dotted"?"border-[#170F4F] bg-[#170F4F] text-white":"text-[#A29FB9] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,children:"Dotted"}),o.jsx("button",{onClick:()=>e(u=>u.style.borderStyle="dashed"),className:`border border-[#E8E7EE] px-3 py-2 text-xs transition-all ${r==="dashed"?"border-[#170F4F] bg-[#170F4F] text-white":"text-[#A29FB9] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,children:"Dashed"})]}),o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Border Color"}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("input",{type:"color",value:s,onChange:u=>e(d=>d.style.borderColor=u.target.value),className:"h-10 w-10 cursor-pointer border border-[#E8E7EE] transition-colors hover:border-[#170F4F]","aria-label":"Background color"}),o.jsx("input",{type:"text",value:s,onChange:u=>e(d=>d.style.borderColor=u.target.value),className:"flex-1 border border-[#E8E7EE] px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]",placeholder:"#ffffff"})]})]})]})})}const we=S.forwardRef(({value:e,onChange:r,min:a,max:s,defaultUnit:l="px",allowedUnits:u=[],className:d="",...p},f)=>{const[m,g]=S.useState(""),[w,D]=S.useState(!1),y=S.useCallback(N=>{if(typeof N=="number")return{value:N,unit:l,text:`${N}${l}`};if(typeof N=="string"&&N.trim()){const P=N.trim(),R=P.match(/^(-?\d*\.?\d+)(.*)$/);if(!R)return{value:0,unit:l,text:""};const[,_,O]=R,L=parseFloat(_),W=O.trim()||l,ue=u.length>0&&!u.includes(W)?l:W;return{value:L,unit:ue,text:P}}return{value:0,unit:l,text:""}},[l,u]),v=S.useMemo(()=>{if(!e||typeof e=="string"&&e.trim()==="")return"";const N=y(e);return`${N.value}${N.unit}`},[e,y]),E=S.useCallback(N=>{g(N.target.value)},[]),C=S.useCallback(N=>{if(N.key==="Enter"){N.currentTarget.blur();return}if(N.key==="ArrowUp"||N.key==="ArrowDown"){N.preventDefault();const P=w?m:v;if(!P.trim())return;const R=y(P);if(isNaN(R.value))return;const _=N.shiftKey?10:N.ctrlKey||N.metaKey?.1:1,O=N.key==="ArrowUp"?R.value+_:R.value-_,L=Math.min(s??O,Math.max(a??O,O)),W=`${L}${R.unit}`;g(W),r?.({value:L,unit:R.unit,text:W})}},[w,m,v,y,a,s,r]),x=S.useCallback(()=>{D(!0),!m&&e&&g(typeof e=="string"?e:v)},[m,e,v]),k=S.useCallback(()=>{if(D(!1),!m.trim()){g(""),r?.({value:0,unit:l,text:""});return}const N=y(m),P=Math.min(s??N.value,Math.max(a??N.value,N.value)),R=`${P}${N.unit}`;g(R),r?.({value:P,unit:N.unit,text:R})},[m,r,l,y,a,s]),j=`border border-[#E8E7EE] bg-white text-center text-xs transition-all focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F] disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-400 ${d.includes("px-")||d.includes("py-")?"":"px-1 py-0.5"}`;return o.jsx("input",{ref:f,type:"text",value:w?m:v,onChange:E,onFocus:x,onBlur:k,onKeyDown:C,className:`${j} ${d}`.trim(),...p})});we.displayName="DimensionInput";const ro={min:0,defaultUnit:"px",allowedUnits:["px","rem","%","vh","vw"],placeholder:"auto",className:"w-20 px-2 py-1 text-xs"};function fi(){const{actions:{setProp:e},style:{columns:r,columnSpacing:a,alignment:s,minHeight:l,width:u,height:d}={}}=H.useNode(m=>({style:m.data.props.style||{}})),p=()=>{r<6&&e(m=>m.style.columns=r+1)},f=()=>{r>1&&e(m=>m.style.columns=r-1)};return o.jsx(Yt,{title:"Layout",icon:o.jsx(T.FiLayout,{size:14,className:"text-[#170F4F]"}),defaultOpen:!1,children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("div",{children:[o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Width"}),o.jsx(we,{value:u,onChange:m=>e(g=>g.style.width=m.text),...ro})]}),o.jsxs("div",{children:[o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Height"}),o.jsx(we,{value:d,onChange:m=>e(g=>g.style.height=m.text),...ro})]})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[o.jsx("span",{className:"text-xs text-[#A29FB9]",children:"Min Height"}),o.jsxs("span",{className:"bg-[#E8E7EE] px-2 py-1 font-mono text-xs text-[#170F4F]",children:[l,"px"]})]}),o.jsx("input",{type:"range",min:"50",max:"400",step:"25",value:l,onChange:m=>e(g=>g.style.minHeight=parseInt(m.target.value)),className:"slider-modern h-2 w-full cursor-pointer appearance-none bg-[#E8E7EE]",style:{background:`linear-gradient(to right, #170F4F 0%, #170F4F ${(l-50)/350*100}%, #E8E7EE ${(l-50)/350*100}%, #E8E7EE 100%)`}})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[o.jsx("span",{className:"text-xs text-[#A29FB9]",children:"Columns"}),o.jsx("span",{className:"bg-[#E8E7EE] px-2 py-1 font-mono text-xs text-[#170F4F]",children:r})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("button",{onClick:f,disabled:r<=1,className:"flex h-8 w-8 items-center justify-center border border-[#E8E7EE] bg-[#E8E7EE] text-[#A29FB9] transition-all hover:border-[#00BAC7] hover:bg-[#CCF1F4] disabled:cursor-not-allowed disabled:opacity-30",children:o.jsx(T.FiMinus,{size:14})}),o.jsx("div",{className:"flex flex-1 justify-center py-1",children:o.jsx("div",{className:"flex gap-1",children:Array.from({length:r},(m,g)=>o.jsx("div",{className:"h-8 w-4 border border-[#170F4F] bg-[#170F4F]"},g))})}),o.jsx("button",{onClick:p,disabled:r>=6,className:"flex h-8 w-8 items-center justify-center border border-[#E8E7EE] bg-[#E8E7EE] text-[#A29FB9] transition-all hover:border-[#00BAC7] hover:bg-[#CCF1F4] disabled:cursor-not-allowed disabled:opacity-30",children:o.jsx(T.FiPlus,{size:14})})]})]}),r>1&&o.jsxs("div",{children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[o.jsx("span",{className:"text-xs text-[#A29FB9]",children:"Column Gap"}),o.jsxs("span",{className:"bg-[#E8E7EE] px-2 py-1 font-mono text-xs text-[#170F4F]",children:[a,"px"]})]}),o.jsx("input",{type:"range",min:"0",max:"40",step:"2",value:a,onChange:m=>e(g=>g.style.columnSpacing=parseInt(m.target.value)),className:"slider-modern h-2 w-full cursor-pointer appearance-none bg-[#E8E7EE]",style:{background:`linear-gradient(to right, #170F4F 0%, #170F4F ${a/40*100}%, #E8E7EE ${a/40*100}%, #E8E7EE 100%)`}})]}),o.jsxs("div",{children:[o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Alignment"}),o.jsx(We,{options:[{value:"left",label:"Left"},{value:"center",label:"Center"},{value:"right",label:"Right"}],value:s,onChange:m=>e(g=>g.style.alignment=m),placeholder:"Choose alignment"})]})]})})}function Ht(e){if(e!=null){if(typeof e=="number")return e===0?"0":void 0;if(typeof e=="string"){const r=e.trim();return r==="0"?"0":/^-?\d+(\.\d+)?(px|em|rem|%|vh|vw|vmin|vmax|ch|ex|cm|mm|in|pt|pc)$/i.test(r)?r:void 0}}}function no(e={},r){const a=Ht(e[r]),s=Ht(e[`${r}Top`]),l=Ht(e[`${r}Right`]),u=Ht(e[`${r}Bottom`]),d=Ht(e[`${r}Left`]);if(a){const p=a.trim().split(/\s+/);switch(p.length){case 1:return{top:p[0],right:p[0],bottom:p[0],left:p[0]};case 2:return{top:p[0],right:p[1],bottom:p[0],left:p[1]};case 3:return{top:p[0],right:p[1],bottom:p[2],left:p[1]};case 4:return{top:p[0],right:p[1],bottom:p[2],left:p[3]}}}return{top:s,right:l,bottom:u,left:d}}const qe={min:0,defaultUnit:"px",allowedUnits:["px","rem","%"],placeholder:"none",className:"w-10 px-0.5 py-0.5 text-xs"};function gi(){const{actions:{setProp:e},style:r={}}=H.useNode(l=>({style:l.data.props.style||{}})),a=S.useMemo(()=>no(r,"margin"),[r]),s=S.useMemo(()=>no(r,"padding"),[r]);return o.jsx(Yt,{title:"Spacing",icon:o.jsx(T.FiMove,{size:14,className:"text-[#170F4F]"}),defaultOpen:!1,children:o.jsx("div",{className:"space-y-3",children:o.jsx("div",{children:o.jsxs("div",{className:"relative border border-[#dce7fe] bg-[#F9FAFB] p-2",children:[o.jsx("div",{className:"absolute left-1 top-[-2px] -translate-y-1/2",children:o.jsx("span",{className:"bg-[#F9FAFB] px-1 text-xs text-[#A29FB9]",style:{background:"linear-gradient(to bottom,transparent 0%,transparent 50%, #F9FAFB 50%, #F9FAFB 100%)"},children:"Margin"})}),o.jsx("div",{className:"mb-1 flex justify-center",children:o.jsx(we,{value:a.top,onChange:l=>e(u=>u.style.marginTop=l.text),...qe})}),o.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[o.jsx(we,{value:a.left,onChange:l=>e(u=>u.style.marginLeft=l.text),...qe}),o.jsxs("div",{className:"relative mx-2 my-1 flex-1 border-2 border-dashed border-[#3B82F6] bg-[#EFF6FF] p-2",children:[o.jsx("div",{className:"absolute left-1 top-[-3px] -translate-y-1/2",children:o.jsx("span",{className:"bg-[#EFF6FF] px-1 text-xs text-[#3B82F6]",style:{background:"linear-gradient(to bottom, transparent 0%, transparent 50%, #EFF6FF 50%, #EFF6FF 100%)"},children:"Padding"})}),o.jsx("div",{className:"mb-1 flex justify-center",children:o.jsx(we,{value:s.top,onChange:l=>e(u=>u.style.paddingTop=l.text),...qe})}),o.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[o.jsx(we,{value:s.left,onChange:l=>e(u=>u.style.paddingLeft=l.text),...qe}),o.jsx("div",{className:"mx-2 my-1 flex h-6 flex-1 items-center justify-center border border-[#D1D5DB] bg-white px-2 py-1",children:o.jsx("span",{className:"text-[10px] font-medium text-[#6B7280] opacity-60",children:"Content"})}),o.jsx(we,{value:s.right,onChange:l=>e(u=>u.style.paddingRight=l.text),...qe})]}),o.jsx("div",{className:"flex justify-center",children:o.jsx(we,{value:s.bottom,onChange:l=>e(u=>u.style.paddingBottom=l.text),...qe})})]}),o.jsx(we,{value:a.right,onChange:l=>e(u=>u.style.marginRight=l.text),...qe})]}),o.jsx("div",{className:"flex justify-center",children:o.jsx(we,{value:a.bottom,onChange:l=>e(u=>u.style.marginBottom=l.text),...qe})})]})})})})}function Uf(){return o.jsxs(o.Fragment,{children:[o.jsx(fi,{}),o.jsx(gi,{}),o.jsx(hi,{}),o.jsx(mi,{})]})}const Wf=["Inter","Roboto","Arial","Georgia","Times New Roman","Montserrat","Lato","Oswald","Poppins"],Vf=[{label:"Lighter",value:"lighter"},{label:"Normal",value:"normal"},{label:"Bold",value:"bold"},{label:"Bolder",value:"bolder"},{label:"100",value:"100"},{label:"200",value:"200"},{label:"300",value:"300"},{label:"400",value:"400"},{label:"500",value:"500"},{label:"600",value:"600"},{label:"700",value:"700"},{label:"800",value:"800"},{label:"900",value:"900"}],Jf=[{label:"Normal",value:"normal"},{label:"No wrapped",value:"nowrap"}];function Gf(){const{actions:{setProp:e},style:r={}}=H.useNode(s=>({style:s.data.props.style})),a=S.useCallback(s=>{e(l=>{l.style={...l.style,...s}})},[e]);return o.jsx(Yt,{title:"Typography",icon:o.jsx(zt.LuType,{size:14,className:"text-[#170F4F]"}),defaultOpen:!0,children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs text-[#A29FB9]",children:"Font"}),o.jsx(We,{options:Wf.map(s=>({value:s,label:s})),value:r.fontFamily||"Inter",onChange:s=>a({fontFamily:s}),placeholder:"Choose font family"})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs text-[#A29FB9]",children:"Size"}),o.jsx("input",{type:"number",min:8,max:96,value:r.fontSize||20,onChange:s=>a({fontSize:Number(s.target.value)}),className:"w-full border border-[#E8E7EE] px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs text-[#A29FB9]",children:"Weight"}),o.jsx(We,{options:Vf,value:r.fontWeight||"normal",onChange:s=>a({fontWeight:s}),placeholder:"Choose font weight"})]})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(T.FiMove,{size:14,className:"text-[#170F4F]"}),o.jsx("h3",{className:"text-sm font-medium text-[#170F4F]",children:"Alignment"})]}),o.jsx("div",{className:"flex gap-2",children:["left","center","right","justify"].map(s=>o.jsx("button",{className:`rounded border px-3 py-2 text-xs font-medium transition-all focus:outline-none focus:ring-2 focus:ring-[#170F4F] ${r.textAlign===s?"border-[#00BAC7] bg-[#CCF1F4]":"border-[#E8E7EE] bg-white"}`,onClick:()=>a({textAlign:s}),children:s.charAt(0).toUpperCase()+s.slice(1)},s))}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs text-[#A29FB9]",children:"Line Break"}),o.jsx(We,{options:Jf,value:r.whiteSpace||"normal",onChange:s=>a({whiteSpace:s}),placeholder:"Choose whiteSpace"})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(zt.LuRemoveFormatting,{size:14,className:"text-[#170F4F]"}),o.jsx("h3",{className:"text-sm font-medium text-[#170F4F]",children:"Formatting"})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{className:`rounded border px-3 py-2 text-xs font-bold ${r?.fontWeight==="bold"?"border-[#00BAC7] bg-[#CCF1F4]":"border-[#E8E7EE] bg-white"}`,onClick:()=>a({fontWeight:r?.fontWeight==="bold"?"normal":"bold"}),children:o.jsx(zt.LuBold,{size:14,className:"text-[#170F4F]"})}),o.jsx("button",{className:`rounded border px-3 py-2 text-xs italic ${r?.fontStyle==="italic"?"border-[#00BAC7] bg-[#CCF1F4]":"border-[#E8E7EE] bg-white"}`,onClick:()=>a({fontStyle:r?.fontStyle==="italic"?"normal":"italic"}),children:o.jsx(zt.LuItalic,{size:14,className:"text-[#170F4F]"})}),o.jsx("button",{className:`rounded border px-3 py-2 text-xs underline ${r?.textDecoration==="underline"?"border-[#00BAC7] bg-[#CCF1F4]":"border-[#E8E7EE] bg-white"}`,onClick:()=>a({textDecoration:r?.textDecoration==="underline"?"none":"underline"}),children:o.jsx(zt.LuUnderline,{size:14,className:"text-[#170F4F]"})})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(T.FiEdit3,{size:14,className:"text-[#170F4F]"}),o.jsx("h3",{className:"text-sm font-medium text-[#170F4F]",children:"Text Color"})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("input",{type:"color",value:r.color||"#000000",onChange:s=>a({color:s.target.value}),className:"h-10 w-10 cursor-pointer border border-[#E8E7EE] transition-colors hover:border-[#170F4F]","aria-label":"Text color"}),o.jsx("input",{type:"text",value:r.color||"#000000",onChange:s=>a({color:s.target.value}),className:"flex-1 border border-[#E8E7EE] px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]",placeholder:"#000000"})]})]})]})})}const Kf={default:Uf,typography:Gf,layout:fi,spacing:gi,background:hi,border:mi,box:uo,text:qf,button:_n,image:Ln,anchor:jn,divider:Bn},Yf=Object.entries(Kf).map(([e,r])=>({id:e,component:r}));function Xf(){const{selected:e,query:r}=H.useEditor(l=>({selected:l.events.selected}));if(!e||e.size===0)return o.jsx("div",{className:"flex h-full items-center justify-center text-gray-500",children:o.jsxs("div",{className:"text-center",children:[o.jsx(T.FiSettings,{size:48,className:"mx-auto mb-4 text-gray-300"}),o.jsx("p",{className:"text-sm",children:"Select a component to see its settings"})]})});const a=Array.from(e)[0],s=r.node(a).get();if(!s)return null;if(s&&s.data.custom&&s.data.custom.settings){const l=s.data.custom.settings,d=(Array.isArray(l)?l:[l]).map(p=>Yf.find(f=>f.id===p)).filter(Boolean);if(d.length>0)return o.jsx(o.Fragment,{children:d.map(p=>{const f=p.component;return Ge.default.createElement(H.NodeProvider,{id:a,related:!0,key:p.id},o.jsx(f,{}))})})}return o.jsx("div",{className:"p-4",children:o.jsx("p",{className:"text-sm text-gray-500",children:"No custom settings available for this component."})})}const Zf=[{id:"settings",label:"Settings",icon:T.FiSettings},{id:"info",label:"Info",icon:T.FiInfo},{id:"actions",label:"Actions",icon:T.FiEye}];function Qf(){const{selected:e,query:r}=H.useEditor(d=>({selected:d.events.selected})),[a,s]=S.useState("settings"),l=S.useMemo(()=>({settings:o.jsx(Xf,{}),info:o.jsx(Hf,{}),actions:o.jsx($f,{})}),[]),u=S.useMemo(()=>{if(!e||e.size===0)return null;const d=Array.from(e)[0],p=r.node(d).get();return p?{id:d,type:p.data.type,displayName:p.data.displayName||String(p.data.type),props:p.data.props,isCanvas:p.data.isCanvas,isDeletable:!0,isDuplicateable:!0,parent:p.data.parent}:null},[e,r]);return o.jsxs("div",{className:"flex h-full w-80 flex-col border-l border-[#e8e7ee] bg-white",children:[u&&o.jsx(zf,{name:String(u.displayName)}),u&&o.jsx("div",{className:"flex border-b border-[#e8e7ee]",children:Zf.map(d=>{const p=d.icon;return o.jsxs("button",{onClick:()=>s(d.id),className:`flex flex-1 items-center justify-center gap-2 px-3 py-2 text-xs font-medium transition-colors duration-200 ${a===d.id?"border-b-2 border-[#170f4f] bg-white text-[#170f4f]":"text-gray-500 hover:bg-gray-50 hover:text-[#170f4f]"}`,children:[o.jsx(p,{size:14}),d.label]},d.id)})}),o.jsx("div",{className:"flex-1 overflow-y-auto",children:l[a]})]})}function eg({blocks:e,searchTerm:r}){const{connectors:a,query:s}=H.useEditor(),[l,u]=S.useState(new Set),d=S.useRef({}),[p,f]=S.useState({}),m=S.useMemo(()=>r.trim()?e.filter(x=>x.label.toLowerCase().includes(r.toLowerCase())||x.category?.toLowerCase().includes(r.toLowerCase())):e,[e,r]),g=m.reduce((x,k)=>{const j=k.category||"other";return x[j]||(x[j]=[]),x[j].push(k),x},{}),w=x=>{u(k=>{const j=new Set(k);return j.has(x)?j.delete(x):j.add(x),j})};S.useEffect(()=>{const x=Object.keys(g);if(x[0]&&l.size===0){const j=new Set(x.slice(1));u(j)}},[g]),S.useEffect(()=>{Object.keys(d.current).forEach(x=>{const k=d.current[x];if(k){const j=l.has(x);f(j?N=>({...N,[x]:0}):N=>({...N,[x]:k.scrollHeight}))}})},[l,m]);const D=x=>o.jsxs("div",{ref:k=>{k&&a.create(k,Ge.default.createElement(x.component,{}),{})},className:"group flex cursor-move flex-col items-center gap-1.5 rounded-md bg-white p-2.5 text-center transition-all duration-200 hover:bg-gray-50",draggable:!0,onDragStart:k=>{k.currentTarget.style.opacity="0.5"},onDragEnd:k=>{k.currentTarget.style.opacity="1"},title:`Drag to add ${x.label} component`,children:[o.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded bg-[#170F4F] text-sm text-white",children:x.icon}),o.jsx("span",{className:"text-xs font-medium leading-tight text-gray-700",children:x.label})]},x.id),y={layout:"Layout",content:"Content",interactive:"Interactive",media:"Media",dynamic:"Dynamic",other:"Other"},v={layout:o.jsx(T.FiGrid,{size:14}),content:o.jsx(T.FiType,{size:14}),interactive:o.jsx(T.FiMousePointer,{size:14}),media:o.jsx(T.FiImage,{size:14}),dynamic:o.jsx(T.FiCode,{size:14}),other:o.jsx(T.FiPackage,{size:14})},E=s.node("ROOT").get(),C=E&&E.data.nodes&&E.data.nodes.length>0;return o.jsxs("div",{className:"flex h-full flex-col",children:[!C&&o.jsx("div",{className:"border-b border-[#E8E7EE] bg-gray-50/50 px-3 py-2",children:o.jsx("p",{className:"text-xs text-gray-500",children:"Drag components to the canvas to add them"})}),o.jsxs("div",{className:"flex-1 overflow-y-auto p-3",children:[Object.entries(g).map(([x,k])=>{const j=l.has(x);return o.jsxs("div",{className:"last:mb-0",children:[o.jsxs("button",{onClick:()=>w(x),className:"mb-3 flex w-full items-center gap-2 rounded p-2 text-gray-700 transition-all duration-200 hover:bg-gray-50",children:[o.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded transition-colors hover:bg-gray-100",children:j?o.jsx(T.FiChevronRight,{size:12,className:"text-gray-400"}):o.jsx(T.FiChevronDown,{size:12,className:"text-gray-400"})}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"text-gray-600",children:v[x]||v.other}),o.jsx("h3",{className:"text-sm font-medium text-gray-900",children:y[x]||x})]}),o.jsx("div",{className:"h-px flex-1 bg-gray-200"}),o.jsx("span",{className:"text-xs font-medium text-gray-500",children:k.length})]}),o.jsx("div",{ref:N=>{d.current[x]=N},style:{height:p[x],overflow:"hidden",transition:"height 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},children:!j&&o.jsx("div",{className:"pb-1",children:o.jsx("div",{className:"grid grid-cols-2 gap-1.5",children:k.map(D)})})})]},x)}),Object.entries(g).length===0&&o.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[o.jsx("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-gray-100",children:o.jsx("span",{className:"text-lg",children:"📦"})}),o.jsx("h3",{className:"mb-1 text-sm font-medium text-gray-900",children:r?"No components found":"No blocks available"}),o.jsx("p",{className:"text-xs text-gray-500",children:r?"Try different search terms":"Add components to get started"})]})]})]})}const tg=e=>Jt.find(a=>{const s=a.label.toLowerCase(),l=a.id.toLowerCase(),u=e.toLowerCase();return s===u||l===u})?.icon||o.jsx(T.FiMousePointer,{size:16});function rg({searchTerm:e}){const[r,a]=S.useState(new Set),{nodes:s,actions:l,selected:u}=H.useEditor(y=>({nodes:y.nodes,selected:y.events.selected})),d=y=>{const v=new Set(r);v.has(y)?v.delete(y):v.add(y),a(v)},p=(y,v)=>{if(!v.trim())return y;const E=new RegExp(`(${v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi");return y.split(E).map((x,k)=>E.test(x)?o.jsx("span",{className:"rounded bg-yellow-200 px-0.5 text-yellow-900",children:x},k):x)},f=(y,v=0,E=!1,C=[])=>{const x=s[y];if(!x)return null;const k=x.data.isCanvas,j=x.data.nodes||[],N=x.data.displayName||(typeof x.data.type=="string"?x.data.type:x.data.type?.displayName)||y,P=u&&u.has(y),R=typeof x.data.name=="string"?x.data.name:x.data?.displayName||"",_=j.length>0,O=r.has(y),L=e.trim()===""||N.toLowerCase().includes(e.toLowerCase())||R.toLowerCase().includes(e.toLowerCase()),W=e.trim()!==""&&j.some(pe=>{const ee=s[pe];if(!ee)return!1;const Re=ee.data.displayName||(typeof ee.data.type=="string"?ee.data.type:ee.data.type?.displayName)||pe,ze=typeof ee.data.name=="string"?ee.data.name:ee.data?.displayName||"";return Re.toLowerCase().includes(e.toLowerCase())||ze.toLowerCase().includes(e.toLowerCase())});return L||W?o.jsxs("div",{className:"flex flex-col",children:[o.jsxs("div",{className:"flex w-full items-center",children:[v>0&&o.jsx("div",{style:{width:v*20}}),o.jsxs("div",{className:`group flex w-full items-center rounded-md px-2 py-1.5 transition-colors ${P?"bg-[#170F4F]/10 hover:bg-[#170F4F]/15":"hover:bg-gray-50"} ${L&&e.trim()?"ring-1 ring-yellow-300":""}`,children:[_?o.jsx("button",{onClick:()=>d(y),className:"mr-1.5 flex h-4 w-4 items-center justify-center rounded opacity-0 transition-opacity hover:bg-gray-200 group-hover:opacity-100",children:O?o.jsx(T.FiChevronRight,{size:12,className:"text-gray-500"}):o.jsx(T.FiChevronDown,{size:12,className:"text-gray-500"})}):o.jsx("div",{className:"w-6"}),o.jsx("div",{className:`mr-2.5 flex h-5 w-5 items-center justify-center ${P?"text-[#170F4F]":"text-gray-600"}`,children:tg(R)}),o.jsx("button",{className:`flex-1 text-left text-sm font-medium transition-colors ${P?"text-[#170F4F]":"text-gray-700 group-hover:text-[#170F4F]"}`,onClick:()=>l.selectNode(y),children:p(N,e)})]})]}),k&&_&&(!O||e.trim()!=="")&&o.jsx("div",{className:"ml-0",children:j.map((pe,ee)=>f(pe,v+1,ee===j.length-1,[...C,E]))})]},y):null},g=s.ROOT?.data?.nodes||[],w=g.length>0,D=r.has("canvas");return o.jsx("div",{className:"flex h-full flex-col",children:o.jsxs("div",{className:"flex-1 space-y-0.5 overflow-y-auto p-2",children:[o.jsxs("div",{className:"flex flex-col",children:[o.jsx("div",{className:"flex w-full items-center",children:o.jsxs("div",{className:`group flex w-full items-center rounded-md px-2 py-1.5 transition-colors ${u&&u.has("ROOT")?"bg-[#170F4F]/10 hover:bg-[#170F4F]/15":"hover:bg-gray-50"}`,children:[w?o.jsx("button",{onClick:()=>d("canvas"),className:"mr-1.5 flex h-4 w-4 items-center justify-center rounded opacity-0 transition-opacity hover:bg-gray-200 group-hover:opacity-100",children:D?o.jsx(T.FiChevronRight,{size:12,className:"text-gray-500"}):o.jsx(T.FiChevronDown,{size:12,className:"text-gray-500"})}):o.jsx("div",{className:"w-6"}),o.jsx("div",{className:"mr-2.5 flex h-5 w-5 items-center justify-center text-[#170F4F]",children:o.jsx(T.FiFile,{size:14})}),o.jsx("button",{className:`flex-1 text-left text-sm font-medium transition-colors ${u&&u.has("ROOT")?"text-[#170F4F]":"text-gray-800 group-hover:text-[#170F4F]"}`,onClick:()=>l.selectNode("ROOT"),children:"Template"})]})}),w&&(!D||e.trim()!=="")&&o.jsx("div",{children:g.map((y,v)=>f(y,1,v===g.length-1,[!0]))})]}),!w&&o.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[o.jsx("div",{className:"mb-2 flex h-10 w-10 items-center justify-center rounded-lg bg-gray-100",children:o.jsx(T.FiLayers,{size:16,className:"text-gray-400"})}),o.jsx("p",{className:"mb-1 text-xs text-gray-500",children:"No layers yet"}),o.jsx("p",{className:"text-xs text-gray-400",children:"Add components to see them here"})]})]})})}const ng=({blocks:e=Jt})=>{const[r,a]=S.useState("blocks"),[s,l]=S.useState("");return o.jsxs("div",{className:"flex h-full w-64 flex-col overflow-hidden border-r border-[#E8E7EE] bg-white",children:[o.jsx("div",{className:"border-b border-[#E8E7EE] bg-gray-50 p-3",children:o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:"text",placeholder:"Search components...",value:s,onChange:u=>l(u.target.value),className:"w-full border border-[#E8E7EE] bg-white px-3 py-2 pl-9 pr-9 text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]/20"}),o.jsx(T.FiSearch,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),s&&o.jsx("button",{onClick:()=>l(""),className:"absolute right-3 top-1/2 -translate-y-1/2 rounded p-0.5 text-gray-400 transition-colors duration-200 hover:bg-gray-100 hover:text-gray-600",children:o.jsx(T.FiX,{size:14})})]})}),o.jsxs("div",{className:"flex border-b border-[#E8E7EE]",children:[o.jsx("button",{className:`flex-1 border-b py-3 text-sm font-medium transition-colors duration-200 ${r==="blocks"?"border-[#170F4F] text-[#170F4F]":"border-transparent text-[#A29FB9] hover:text-[#00BAC7]"}`,onClick:()=>a("blocks"),children:"Blocks"}),o.jsx("button",{className:`flex-1 border-b py-3 text-sm font-medium transition-colors duration-200 ${r==="layers"?"border-[#170F4F] text-[#170F4F]":"border-transparent text-[#A29FB9] hover:text-[#00BAC7]"}`,onClick:()=>a("layers"),children:"Layers"})]}),o.jsx("div",{className:"flex-1 overflow-hidden",children:r==="blocks"?o.jsx(eg,{blocks:e,searchTerm:s}):o.jsx(rg,{searchTerm:s})})]})};function ag(e,r=300){let a;return(...s)=>{clearTimeout(a),a=setTimeout(()=>e(...s),r)}}const sg=({hasChildren:e})=>{const{device:r}=Sr();return e?null:o.jsx("div",{className:`pointer-events-none absolute inset-0 left-auto right-auto z-10 flex items-center justify-center ${r==="mobile"?"w-[10%]":"w-[20%]"}`,children:o.jsxs("div",{className:"mx-auto p-6 text-center",children:[o.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center border border-[#170F4F] bg-[#E8E7EE]",children:o.jsx("span",{className:"text-2xl text-[#170F4F]",children:"📄"})}),o.jsx("h3",{className:"mb-2 text-lg font-medium text-[#170F4F]",children:"Start building your page"}),o.jsx("p",{className:"text-sm text-[#A29FB9]",children:"Drag components from the sidebar to create your page layout."})]})})},og=({hasCanvasContent:e,showCodePanel:r})=>o.jsxs("div",{className:`${r?"w-1/2":"w-full"} mx-auto flex h-full flex-1 items-start justify-center overflow-scroll bg-gradient-to-br from-gray-100 to-gray-200 p-6 transition-all duration-300`,style:{maxHeight:"calc(100vh - 72px)"},children:[o.jsx(sg,{hasChildren:e}),o.jsx(H.Frame,{children:o.jsx(H.Element,{canvas:!0,is:"div",...xn,style:{...xn.style,maxWidth:xo.desktop.width}})})]}),ig=()=>{const[e,r]=S.useState(!1),a=()=>{console.log("Export HTML clicked"),r(!1)},s=()=>{console.log("Data Source clicked"),r(!1)};return Ge.default.useEffect(()=>{const l=u=>{e&&r(!1)};return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[e]),o.jsxs("div",{className:"relative",children:[o.jsx("button",{onClick:()=>r(!e),className:"rounded p-1.5 text-[#6B7280] transition-all duration-200 hover:bg-[#F5F5F7] hover:text-[#170F4F]",title:"Menu options",children:o.jsx(T.FiMenu,{size:16})}),e&&o.jsxs("div",{className:"absolute left-0 top-full z-50 mt-1 w-48 rounded-md border border-[#E8E7EE] bg-white py-1 shadow-lg",children:[o.jsxs("button",{onClick:a,className:"flex w-full items-center gap-3 px-4 py-2 text-sm text-gray-700 hover:bg-gray-50",children:[o.jsx(T.FiDownload,{size:14}),"Export HTML"]}),o.jsxs("button",{onClick:s,className:"flex w-full items-center gap-3 px-4 py-2 text-sm text-gray-700 hover:bg-gray-50",children:[o.jsx(T.FiDatabase,{size:14}),"Data Source"]})]})]})},lg=({canvasSize:e,showCodePanel:r,onPreviewModeToggle:a,onCanvasSizeChange:s,onCodePanelToggle:l,onSave:u,templateIsModified:d=!1,templateName:p,onTemplateNameChange:f,templateReference:m})=>{const[g,w]=S.useState(!1),D=Ge.default.useRef(null);S.useEffect(()=>{g&&D.current&&(D.current.focus(),D.current.select())},[g]);const y=()=>{w(!1)},v=x=>{x.key==="Enter"&&w(!1),x.key==="Escape"&&w(!1)},E=x=>{f?.(x.target.value)},C=async x=>{try{await navigator.clipboard.writeText(x)}catch(k){console.error("Failed to copy slug:",k)}};return o.jsx("div",{className:"border-b border-[#E8E7EE] bg-white",children:o.jsx("div",{className:"px-3 py-3 sm:px-8",children:o.jsxs("div",{className:"relative flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ig,{}),o.jsx("div",{className:"group",children:g?o.jsx("input",{ref:D,className:"w-full truncate rounded border-none bg-transparent px-1.5 text-base font-bold text-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]",value:p,onChange:E,onBlur:y,onKeyDown:v,placeholder:"Untitled Template","aria-label":"Template name"}):o.jsxs("div",{className:"flex items-center",children:[o.jsxs("h1",{className:"cursor-pointer rounded px-1.5 py-1 text-base font-bold text-[#170F4F] hover:bg-gray-50",title:"Double-click to edit",onDoubleClick:()=>w(!0),children:[o.jsx("span",{className:"truncate",children:p||"Untitled Template"}),m&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"mx-1.5 text-gray-300",children:"•"}),o.jsx("span",{className:"rounded-sm bg-gray-100 px-1 py-0.5 font-mono text-[10px] font-medium text-gray-600",children:m})]})]}),m&&o.jsx("button",{onClick:()=>C(m),className:"rounded p-0.5 opacity-0 transition-opacity hover:bg-gray-50 hover:text-[#170F4F] group-hover:opacity-100",title:"Copy slug to clipboard",children:o.jsx(T.FiCopy,{size:9,className:"text-gray-400"})})]})})]}),o.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:o.jsx("div",{className:"flex items-center gap-1 border border-[#E8E7EE] bg-white p-1",children:["desktop","tablet","mobile"].map(x=>{const k={desktop:o.jsx(T.FiMonitor,{size:16}),tablet:o.jsx(T.FiTablet,{size:16}),mobile:o.jsx(T.FiSmartphone,{size:16})};return o.jsxs("button",{className:`flex items-center gap-1.5 px-2 py-1 text-xs font-medium transition-all duration-200 ${e===x?"bg-[#170F4F] text-white":"text-[#170F4F] hover:bg-[#F5F5F7]"}`,onClick:()=>s(x),title:`Switch to ${x} view`,children:[o.jsx("span",{className:"inline sm:hidden",children:k[x]}),o.jsx("span",{className:"hidden sm:inline",children:x.charAt(0).toUpperCase()+x.slice(1)})]},x)})})}),o.jsxs("div",{className:"flex items-center gap-2",children:[d?o.jsxs("div",{className:"flex items-center gap-1 text-orange-600",children:[o.jsx("div",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-orange-500"}),o.jsx("span",{className:"text-xs font-medium",children:"Unsaved"})]}):o.jsxs("div",{className:"flex items-center gap-1 text-green-600",children:[o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),o.jsx("span",{className:"text-xs font-medium",children:"Saved"})]}),o.jsx("button",{className:`p-1.5 transition-all duration-200 ${r?"bg-[#170F4F] text-white":"text-[#6B7280] hover:bg-[#F5F5F7] hover:text-[#170F4F]"}`,onClick:l,title:"Toggle Code Editor",children:o.jsx(T.FiCode,{size:16})}),o.jsx("button",{onClick:a,className:"p-1.5 text-[#6B7280] transition-all duration-200 hover:bg-[#F5F5F7] hover:text-[#170F4F]",title:"Preview template",children:o.jsx(T.FiEye,{size:16})}),u&&o.jsxs("button",{className:"relative flex items-center gap-1.5 bg-[#170F4F] px-3 py-1.5 text-xs font-medium text-white transition-all duration-200 hover:bg-[#009CA8]",onClick:u,title:"Save changes",children:[o.jsx(T.FiSave,{size:14}),"Save",d&&o.jsx("span",{className:"absolute -right-0.5 -top-0.5 h-2 w-2 animate-pulse bg-orange-500"})]})]})]})})})},ug=S.lazy(()=>Promise.resolve().then(function(){return Ag}).then(e=>({default:e.DataSourceModal}))),cg=({showCodePanel:e=!1,onPreviewToggle:r,onCodePanelToggle:a,codePanelChildren:s})=>{Rf();const l=Sr(),{query:u,store:d}=H.useEditor(),{template:p,updateTemplate:f,saveTemplate:m}=pi(),{export:g}=Pn(),[w,D]=S.useState(!1),[y,v]=S.useState(!1),E=S.useCallback(()=>{if(!p)return"";const k=u.serialize();return!k||typeof k=="object"&&Object.keys(k).length<=1?"":g({inlineStyles:!0,prettify:!0,includeComments:!1})},[p,u,g]),C=async()=>{if(!p){alert("No template loaded to save");return}try{f({content:E()}),await m(),alert("Template saved successfully!")}catch(k){console.error("Error saving template:",k),alert("Error saving template. Please try again.")}},x=()=>{};return S.useEffect(()=>{if(!y&&p&&p?.content)try{l.loadTemplate(p.content)}catch(k){console.error("Error loading template into canvas:",k)}finally{v(!0)}},[p?.id]),S.useEffect(()=>{d.subscribe(ag(()=>{f({content:E()})},500),()=>{})},[]),o.jsxs("div",{className:"flex h-full flex-col",children:[o.jsx(lg,{canvasSize:l.device,showCodePanel:e,onPreviewModeToggle:r||(()=>{}),onCanvasSizeChange:l.setDevice,onCodePanelToggle:a||(()=>{}),onSave:C,templateIsModified:p?.isModified,templateName:p?.title,onTemplateNameChange:k=>{f({title:k})},templateReference:p?.slug}),o.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[!e&&o.jsx(ng,{}),o.jsxs("div",{className:`flex flex-1 ${e?"flex-row":"flex-col"}`,children:[e?s:null,o.jsx(og,{canvasSize:l.device,hasCanvasContent:l.isEmpty,showCodePanel:e})]}),!e&&o.jsx(Qf,{})]}),w&&o.jsx(S.Suspense,{fallback:o.jsx("div",{children:"Loading..."}),children:o.jsx(ug,{isOpen:w,onClose:()=>D(!1),onDataImport:x})})]})},bi=({children:e,isHover:r,isSelected:a,name:s,showIndicator:l=!0,width:u,height:d})=>{const p=r&&!a&&l,f=a&&l,m=p||f,g={outline:f?"1px solid #170f4fff":p?"1px dashed #00BAC7":"1px solid transparent",background:f?"rgba(23,15,79,0.03)":p?"rgba(0,186,199,0.02)":"transparent",cursor:"pointer",overflow:"visible",position:"relative",width:u,height:d};return o.jsxs("div",{style:g,className:a?"avoid-transition":"",children:[m&&o.jsxs("div",{className:`absolute left-0 top-0 flex items-center gap-1.5 px-2 py-1 text-xs font-medium backdrop-blur-sm ${f?"border border-[#170F4F] bg-[#170F4F] text-white shadow-lg":"border border-[#00BAC7] bg-[#00BAC7] text-white shadow-md"} `,style:{borderRadius:"4px",transform:"translateY(-100%)",transformOrigin:"left bottom",marginTop:"-2px",zIndex:99999,position:"absolute",transition:"all 0.15s ease-out"},onClick:w=>{w.stopPropagation(),w.preventDefault()},onMouseDown:w=>{w.stopPropagation(),w.preventDefault()},children:[o.jsx("div",{className:"flex h-3 w-3 items-center justify-center",children:f?o.jsx("div",{className:"h-2 w-2 rounded-full bg-white"}):o.jsx("div",{className:"h-2 w-2 rounded-full bg-white opacity-70"})}),o.jsx("span",{className:"select-none whitespace-nowrap leading-none",children:s})]}),e]})},ao=6,Ue=-3,dg={position:"absolute",width:`${ao}px`,height:`${ao}px`,background:"#170F4F",display:"block",pointerEvents:"none",boxShadow:"0 2px 8px rgba(23,15,79,0.3)",border:"0.5px solid #CCF1F4"},pg={topLeft:{left:`${Ue}px`,top:`${Ue}px`},topRight:{right:`${Ue}px`,top:`${Ue}px`},bottomLeft:{left:`${Ue}px`,bottom:`${Ue}px`},bottomRight:{right:`${Ue}px`,bottom:`${Ue}px`}},hg=({children:e,propKey:r={width:"width",height:"height"}})=>{const{actions:a,connectors:{connect:s}}=H.useNode(),{isSelected:l,isHover:u,nodeWidth:d,nodeHeight:p,name:f}=H.useNode(x=>({isSelected:x.events.selected,isHover:x.events.hovered,nodeWidth:x.data.props.style?.[r.width]||x.data.props[r.width]||200,nodeHeight:x.data.props.style?.[r.height]||x.data.props[r.height]||100,name:x.data.custom?.displayName||x.data.displayName})),{maxWidth:m}=H.useEditor(x=>{const j=x.nodes.ROOT?.data?.props?.style||{},N=j.maxWidth||j.width||1200;return{maxWidth:typeof N=="string"?parseInt(N):N}}),g=S.useRef(null),w=S.useRef(null),D=S.useMemo(()=>{const x=()=>{if(typeof d=="number")return Math.round(d);if(typeof d=="string"){if(d.includes("%")&&m){const j=parseFloat(d)/100;return Math.round(m*j)}return d||200}return 200},k=()=>p==="auto"?"auto":typeof p=="number"?Math.round(p):typeof p=="string"?p.includes("%")?p:p||100:100;return{width:x(),height:k()}},[d,p,m]),[y,v]=S.useState(D),E=S.useCallback(()=>{v(D)},[D]);S.useEffect(()=>{if(!m)return;const x=typeof d=="number"?d:parseFloat(d)||0;if(x>m){const k=m/x,j=Math.floor(x*k);a.setProp(N=>{N.style||(N.style={}),N.style[r.width]=j})}},[m,d,a,r.width]);const C=S.useCallback((x,k)=>{if(!w.current)return D;const{width:j,height:N}=w.current;let P=Math.round(j+x),R=Math.round(N+k);return m&&(P=Math.min(P,m)),P=Math.max(P,50),R=Math.max(R,20),{width:P,height:R}},[D,m]);return S.useEffect(()=>{E(),a.setCustom(x=>{x.resizable=!0})},[d,p,E,a]),o.jsx(bi,{isHover:u,isSelected:l,name:f||"Component",showIndicator:!0,width:y.width,height:y.height,children:o.jsxs(_d.Resizable,{ref:x=>{x&&x.resizable&&(g.current=x,s(x.resizable))},enable:{top:l,right:l,bottom:l,left:l,topLeft:l,topRight:l,bottomLeft:l,bottomRight:l},size:y,onResizeStart:x=>{x.preventDefault(),x.stopPropagation();const k=g.current?.resizable;if(!k)return;const j=k.getBoundingClientRect();w.current={width:Math.round(j.width),height:Math.round(j.height)}},onResize:(x,k,j,N)=>{const P=C(N.width,N.height);a.setProp(R=>{R.style||(R.style={}),R.style[r.width]=P.width,R.style[r.height]=P.height}),E()},onResizeStop:(x,k,j,N)=>{const P=C(N.width,N.height);a.setProp(R=>{R.style||(R.style={}),R.style[r.width]=P.width,R.style[r.height]=P.height}),E()},handleStyles:{topLeft:{display:"block"},topRight:{display:"block"},bottomLeft:{display:"block"},bottomRight:{display:"block"}},children:[e,o.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:99999},children:l&&Object.entries(pg).map(([x,k])=>o.jsx("span",{style:{...dg,...k}},x))})]})})},mg=({render:e})=>{const{id:r,isHover:a,isActive:s,name:l,isResizable:u,nodeWidth:d,nodeHeight:p}=H.useNode(m=>({isHover:m.events.hovered,isActive:m.events.selected,name:m.data.custom?.displayName||m.data.displayName,isResizable:m.data.custom.resizable===!0,nodeWidth:m.data.props.style?.width||m.data.props.width||"min-content",nodeHeight:m.data.props.style?.height||m.data.props.height||"min-content"}));return r===jd.ROOT_NODE?o.jsx(o.Fragment,{children:e}):u?o.jsx(hg,{children:e}):o.jsx(bi,{isHover:a,isSelected:s,name:l,width:d,height:p,children:e})},fg=({templateId:e,baseUrl:r,workspace:a,children:s})=>{const[l,u]=S.useState(!1),[d,p]=S.useState({}),f=S.useMemo(()=>(r||console.warn("[TemplateProvider] baseUrl was not provided"),a||console.warn("[TemplateProvider] workspace was not provided"),new Bd.TemplatingSdk(r,{workspace:a})),[r,a]),m=S.useCallback(async y=>{if(y)try{u(!0);const v=await f.get(y);v&&p(v)}finally{u(!1)}},[f]),g=S.useCallback(y=>p(v=>v?.update?.(y)),[p]),w=S.useCallback(async()=>{if(!d?.id){console.warn("No template loaded to save");return}try{u(!0);const y=await d.save();p(y)}catch(y){console.error("Error saving template:",y)}finally{u(!1)}},[d]);S.useEffect(()=>{e&&m(e)},[e,m]);const D=S.useMemo(()=>({loading:l,template:d,loadTemplate:m,updateTemplate:g,saveTemplate:w}),[l,d,m,g]);return o.jsx(di.Provider,{value:D,children:s})},so={desktop:{width:1200,height:800,name:"Desktop"},tablet:{width:768,height:1024,name:"Tablet"},mobile:{width:375,height:667,name:"Mobile"}},gg=({canvasSize:e,hasCanvasContent:r,onZoomChange:a,placeholderData:s={}})=>{const{template:l}=pi(),[u,d]=S.useState(100),[p,f]=S.useState(""),m=S.useMemo(()=>so[e]||so.desktop,[e]);return S.useEffect(()=>{const g=()=>{const w=window.innerWidth-100,D=window.innerHeight-200,y=w/m.width,v=D/m.height,E=Math.min(y,v,1)*100,C=Math.max(25,Math.min(100,E));d(C),a&&a(C)};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[e,m.width,m.height,a]),S.useEffect(()=>{if(!r){f("");return}try{if(l&&l.render){const g=l.render(s);f(g)}else f("")}catch(g){console.error("Error rendering template:",g),f("")}},[r,s,l]),o.jsx("div",{className:"relative flex flex-1 items-center justify-center overflow-auto bg-[#F5F5F7] p-8",children:o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsxs("div",{className:"relative overflow-hidden rounded-lg border border-[#E8E7EE] bg-white shadow-lg",style:{width:m.width*(u/100),height:m.height*(u/100),maxWidth:"100%",maxHeight:"100%"},children:[e==="mobile"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"absolute inset-x-0 top-0 z-10 flex h-6 items-center justify-center rounded-t-lg bg-black",children:o.jsx("div",{className:"h-1 w-12 rounded-full bg-gray-600"})}),o.jsx("div",{className:"absolute inset-x-0 bottom-1 z-10 flex justify-center",children:o.jsx("div",{className:"h-1 w-16 rounded-full bg-black opacity-30"})})]}),o.jsxs("div",{className:"h-full w-full overflow-hidden",style:{transform:`scale(${u/100})`,transformOrigin:"top left",width:`${100/(u/100)}%`,height:`${100/(u/100)}%`},children:[!r&&o.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-50",children:o.jsxs("div",{className:"p-8 text-center",children:[o.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-lg border-2 border-dashed border-[#E8E7EE] bg-[#F5F5F7]",children:o.jsx("span",{className:"text-2xl text-[#A29FB9]",children:"📄"})}),o.jsx("h3",{className:"mb-2 text-lg font-medium text-[#170F4F]",children:"No content to preview"}),o.jsx("p",{className:"text-sm text-[#A29FB9]",children:"Add components to see the preview"})]})}),o.jsx("div",{className:"h-full min-h-screen bg-white",style:{overflow:"visible",position:"relative",minHeight:"100%"},dangerouslySetInnerHTML:{__html:p}})]})]})})})},oo={desktop:{width:1200,height:800,name:"Desktop",icon:T.FiMonitor},tablet:{width:768,height:1024,name:"Tablet",icon:T.FiTablet},mobile:{width:375,height:667,name:"Mobile",icon:T.FiSmartphone}},bg=({canvasSize:e,onCanvasSizeChange:r,onExitPreview:a,onDownloadHTML:s,onOpenInNewTab:l,showPlayground:u=!1,onTogglePlayground:d})=>{const[p,f]=S.useState(!1),[m,g]=S.useState(100);return o.jsx("div",{className:"border-b border-[#E8E7EE] bg-white px-6 py-3",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("button",{onClick:a,className:"flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-[#170F4F] transition-colors hover:bg-[#F5F5F7]",children:[o.jsx(T.FiX,{className:"h-4 w-4"}),"Exit Preview"]}),o.jsx("div",{className:"h-6 w-px bg-[#E8E7EE]"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(T.FiEye,{className:"h-4 w-4 text-[#00BAC7]"}),o.jsx("span",{className:"text-sm font-medium text-[#170F4F]",children:"Preview Mode"})]})]}),o.jsx("div",{className:"flex items-center gap-2",children:Object.keys(oo).map(w=>{const D=oo[w],y=D.icon,v=e===w;return o.jsxs("button",{onClick:()=>r(w),className:`flex items-center gap-2 px-3 py-1.5 text-sm font-medium transition-all duration-200 ${v?"bg-[#170F4F] text-white":"border border-[#E8E7EE] text-[#170F4F] hover:bg-[#F5F5F7]"} `,title:D.name,children:[o.jsx(y,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:D.name})]},w)})}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("div",{className:"flex items-center overflow-hidden border border-[#E8E7EE]",children:[o.jsx("button",{onClick:()=>g(Math.max(25,m-25)),className:"px-3 py-1.5 text-[#170F4F] transition-colors hover:bg-[#F5F5F7] disabled:cursor-not-allowed disabled:opacity-50",disabled:m<=25,children:"−"}),o.jsxs("div",{className:"min-w-[60px] border-x border-[#E8E7EE] bg-[#F5F5F7] px-3 py-1.5 text-center text-sm font-medium text-[#170F4F]",children:[m,"%"]}),o.jsx("button",{onClick:()=>g(Math.min(200,m+25)),className:"px-3 py-1.5 text-[#170F4F] transition-colors hover:bg-[#F5F5F7] disabled:cursor-not-allowed disabled:opacity-50",disabled:m>=200,children:"+"})]}),o.jsx("button",{onClick:()=>f(!p),className:`p-1.5 transition-all duration-200 ${p?"bg-[#170F4F] text-white":"border border-[#E8E7EE] text-[#170F4F] hover:bg-[#F5F5F7]"} `,title:"Toggle Rulers",children:o.jsx(T.FiEyeOff,{className:"h-4 w-4"})}),o.jsx("div",{className:"h-6 w-px bg-[#E8E7EE]"}),d&&o.jsxs("button",{onClick:d,className:`flex items-center gap-2 px-3 py-1.5 text-sm font-medium transition-all duration-200 ${u?"bg-[#170F4F] text-white":"border border-[#E8E7EE] text-[#170F4F] hover:bg-[#F5F5F7]"} `,title:"Toggle Data Playground",children:[o.jsx(T.FiDatabase,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Data"})]}),o.jsx("div",{className:"h-6 w-px bg-[#E8E7EE]"}),o.jsxs("button",{onClick:s,className:"flex items-center gap-2 border border-[#E8E7EE] px-3 py-1.5 text-sm font-medium text-[#170F4F] transition-colors hover:bg-[#F5F5F7]",title:"Download HTML",children:[o.jsx(T.FiDownload,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Download"})]}),o.jsxs("button",{onClick:l,className:"flex items-center gap-2 bg-[#170F4F] px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-[#00BAC7]",title:"Open in New Tab",children:[o.jsx(T.FiExternalLink,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Open"})]})]})]})})},xg=350,Dg=700,yg=450,vg=({placeholders:e,placeholderSchema:r,onPlaceholdersChange:a,onSchemaChange:s,width:l=yg,onWidthChange:u})=>{const[d,p]=S.useState({type:"text"}),[f,m]=S.useState(!1),[g,w]=S.useState(!1),D=S.useRef(null),y=S.useRef(0),v=S.useRef(0),E=S.useCallback(_=>{w(!0),y.current=_.clientX,v.current=l,_.preventDefault()},[l]),C=S.useCallback(_=>{if(!g)return;const O=y.current-_.clientX,L=Math.min(Dg,Math.max(xg,v.current+O));u&&u(L)},[g,u]),x=S.useCallback(()=>{w(!1)},[]);S.useEffect(()=>{if(g)return document.addEventListener("mousemove",C),document.addEventListener("mouseup",x),document.body.style.cursor="col-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",x),document.body.style.cursor="",document.body.style.userSelect=""}},[g,C,x]);const k=(_,O)=>{a({...e,[_]:O})},j=()=>{if(!d.key||!d.label||!d.type)return;const _={key:d.key,label:d.label,type:d.type,value:d.value||N(d.type),options:d.options};s([...r,_]),a({...e,[_.key]:_.value||""}),p({type:"text"}),m(!1)},N=_=>{switch(_){case"text":return"Sample text";case"number":return 0;case"boolean":return!1;case"date":return new Date().toISOString().split("T")[0];case"enum":return"";default:return""}},P=_=>{s(r.filter(L=>L.key!==_));const O={...e};delete O[_],a(O)},R=_=>{const O=e[_.key]??_.value??"";switch(_.type){case"text":return o.jsx("input",{type:"text",value:String(O),onChange:L=>k(_.key,L.target.value),className:"w-full rounded-none border border-[#E8E7EE] bg-white px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:bg-[#F9F8FE] focus:outline-none focus:ring-2 focus:ring-[#170F4F]",placeholder:"Enter text here..."});case"number":return o.jsx("input",{type:"number",value:Number(O),onChange:L=>k(_.key,parseFloat(L.target.value)||0),className:"w-full rounded-none border border-[#E8E7EE] bg-white px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:bg-[#F9F8FE] focus:outline-none focus:ring-2 focus:ring-[#170F4F]",placeholder:"Enter a number..."});case"boolean":return o.jsxs("div",{className:"flex items-center gap-4 rounded-none border border-[#E8E7EE] bg-white p-3",children:[o.jsxs("label",{className:"flex cursor-pointer items-center",children:[o.jsx("input",{type:"radio",name:`${_.key}-bool`,checked:!!O,onChange:()=>k(_.key,!0),className:"h-4 w-4 border-[#E8E7EE] text-[#170F4F] focus:ring-2 focus:ring-[#170F4F]"}),o.jsx("span",{className:"ml-2 text-sm font-medium text-[#170F4F]",children:"Yes"})]}),o.jsxs("label",{className:"flex cursor-pointer items-center",children:[o.jsx("input",{type:"radio",name:`${_.key}-bool`,checked:!O,onChange:()=>k(_.key,!1),className:"h-4 w-4 border-[#E8E7EE] text-[#170F4F] focus:ring-2 focus:ring-[#170F4F]"}),o.jsx("span",{className:"ml-2 text-sm font-medium text-[#170F4F]",children:"No"})]})]});case"enum":return o.jsxs("select",{value:String(O),onChange:L=>k(_.key,L.target.value),className:"w-full rounded-none border border-[#E8E7EE] bg-white px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:bg-[#F9F8FE] focus:outline-none focus:ring-2 focus:ring-[#170F4F]",children:[o.jsx("option",{value:"",children:"Choose an option..."}),_.options?.map((L,W)=>typeof L=="string"?o.jsx("option",{value:L,children:L},W):o.jsx("option",{value:String(L.value),children:L.label},W))]});case"date":return o.jsx("input",{type:"date",value:String(O),onChange:L=>k(_.key,L.target.value),className:"w-full rounded-none border border-[#E8E7EE] bg-white px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:bg-[#F9F8FE] focus:outline-none focus:ring-2 focus:ring-[#170F4F]"});default:return null}};return o.jsxs("div",{className:"relative flex animate-slide-in-right flex-col border-l border-[#E8E7EE] bg-white transition-all duration-300 ease-in-out",style:{width:`${l}px`},children:[o.jsx("div",{ref:D,className:`absolute bottom-0 left-0 top-0 w-1 cursor-col-resize transition-colors duration-200 hover:bg-[#00BAC7] ${g?"bg-[#00BAC7]":"bg-transparent"} group`,onMouseDown:E,children:o.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx(T.FiMoreVertical,{className:"h-3 w-3 text-[#A29FB9]"})})}),o.jsxs("div",{className:"border-b border-[#E8E7EE] bg-gradient-to-r from-[#F9F8FE] to-white p-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"mb-1 text-lg font-semibold text-[#170F4F]",children:"Placeholders"}),o.jsx("p",{className:"text-sm text-[#A29FB9]",children:"Customize the content that appears in your template"})]}),o.jsxs("button",{onClick:()=>m(!0),className:"flex items-center gap-2 rounded-none bg-[#170F4F] px-4 py-2 text-sm font-medium text-white shadow-sm transition-all duration-200 hover:bg-[#00BAC7] hover:shadow-md disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-[#170F4F] disabled:hover:shadow-sm",disabled:f,children:[o.jsx(T.FiPlus,{className:"h-4 w-4"}),"Add"]})]}),f&&o.jsxs("div",{className:"mt-4 animate-fade-in rounded-none border border-[#E8E7EE] bg-white p-4 shadow-sm",children:[o.jsx("h4",{className:"mb-4 text-sm font-semibold text-[#170F4F]",children:"Add New Placeholder"}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-xs font-medium text-[#170F4F]",children:"Field Name"}),o.jsx("input",{type:"text",placeholder:"e.g., Customer Name",value:d.label||"",onChange:_=>{const O=_.target.value,L=O.replace(/[^a-zA-Z0-9\s]/g,"").replace(/\s+/g,"_").replace(/^_+|_+$/g,"");p({...d,label:O,key:L})},className:"w-full rounded-none border border-[#E8E7EE] bg-white px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:bg-[#F9F8FE] focus:outline-none focus:ring-2 focus:ring-[#170F4F]"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-xs font-medium text-[#170F4F]",children:"Data Type"}),o.jsxs("select",{value:d.type||"text",onChange:_=>p({...d,type:_.target.value}),className:"w-full rounded-none border border-[#E8E7EE] bg-white px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:bg-[#F9F8FE] focus:outline-none focus:ring-2 focus:ring-[#170F4F]",children:[o.jsx("option",{value:"text",children:"Text"}),o.jsx("option",{value:"number",children:"Number"}),o.jsx("option",{value:"boolean",children:"True/False"}),o.jsx("option",{value:"enum",children:"Multiple Choice"}),o.jsx("option",{value:"date",children:"Date"})]})]})]}),o.jsxs("div",{className:"mt-6 flex gap-2 border-t border-[#E8E7EE] pt-4",children:[o.jsx("button",{onClick:j,disabled:!d.key||!d.label,className:"rounded-none bg-[#170F4F] px-4 py-2 text-sm font-medium text-white shadow-sm transition-colors duration-200 hover:bg-[#00BAC7] disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-[#170F4F]",children:"Confirm"}),o.jsx("button",{onClick:()=>m(!1),className:"rounded-none border border-[#E8E7EE] px-4 py-2 text-sm font-medium text-[#A29FB9] transition-colors duration-200 hover:bg-[#F9F8FE] hover:text-[#170F4F]",children:"Cancel"})]})]})]}),o.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:r.length===0?o.jsxs("div",{className:"py-12 text-center text-[#A29FB9]",children:[o.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-none border border-[#E8E7EE] bg-[#F9F8FE]",children:o.jsx(T.FiPlus,{className:"h-8 w-8 text-[#170F4F]"})}),o.jsx("h4",{className:"mb-2 text-lg font-medium text-[#170F4F]",children:"No data fields yet"}),o.jsx("p",{className:"mb-4 text-sm",children:"Add data fields to make your template dynamic"}),o.jsx("button",{onClick:()=>m(!0),className:"text-sm font-medium text-[#170F4F] transition-colors duration-200 hover:text-[#00BAC7]",children:"Add your first field"})]}):o.jsx("div",{className:"space-y-4",children:r.map(_=>o.jsxs("div",{className:"rounded-none border border-[#E8E7EE] bg-white p-4 transition-all duration-200 hover:border-[#170F4F] hover:shadow-sm",children:[o.jsxs("div",{className:"mb-3 flex items-start justify-between",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx("h4",{className:"mb-1 text-sm font-semibold text-[#170F4F]",children:_.label}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"inline-flex items-center rounded-none border border-[#E8E7EE] bg-[#F9F8FE] px-2 py-1 text-xs font-medium text-[#170F4F]",children:_.type==="boolean"?"True/False":_.type==="enum"?"Multiple Choice":_.type.charAt(0).toUpperCase()+_.type.slice(1)}),o.jsx("span",{className:"font-mono text-xs text-[#A29FB9]",children:_.key})]})]}),o.jsx("button",{onClick:()=>P(_.key),className:"rounded-none p-1 text-[#A29FB9] transition-colors duration-200 hover:bg-red-50 hover:text-red-500",title:"Remove field",children:o.jsx(T.FiTrash2,{className:"h-4 w-4"})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"block text-xs font-medium text-[#170F4F]",children:"Current Value:"}),o.jsx("div",{className:"w-full",children:R(_)})]})]},_.key))})})]})};function wg(e){let r=`<!DOCTYPE html>
|
|
60
|
+
`);d(L)}finally{v(!1)}}},[u]),C=S.useRef(null),x=S.useRef(!1),k=u!==p;S.useEffect(()=>{if(!x.current&&r&&a)try{const O=s();O&&O.trim()&&(d(O),f(O)),x.current=!0}catch(O){console.warn("Could not initialize code from canvas:",O)}},[r,a,s]);const j=S.useCallback(async()=>{if(u.trim()){g("processing"),D("");try{l(u,{replace:!0}),g("success")}catch(O){console.error("Error applying code to canvas:",O),g("error"),D(O instanceof Error?O.message:"Unknown error occurred")}}},[l,u]),N=S.useCallback(O=>{d(O),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{O.trim()?j():g("idle")},1e3)},[j]),P=S.useCallback(()=>{f(u),g("success");try{localStorage.setItem("editor_saved_code",u)}catch(O){console.warn("Could not save to localStorage:",O)}},[u]),R=S.useCallback(()=>{d(p),g("idle"),D(""),C.current&&clearTimeout(C.current)},[p]),_=S.useCallback(()=>{C.current&&clearTimeout(C.current),g("idle"),D("")},[]);return S.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]),{codeValue:u,savedCodeValue:p,conversionStatus:m,hasUnsavedChanges:k,errorMessage:w,isFormattingCode:y,handleCodeChange:N,handleSave:P,handleRevert:R,handleClose:_,applyCodeToCanvas:j,formatCode:E}}const _f=({onClose:e,onFormat:r,onSave:a,isFormattingCode:s,codeValue:l,hasUnsavedChanges:u,conversionStatus:d})=>o.jsxs("div",{className:"flex items-center justify-between border-b border-gray-700 bg-[#23272f] px-4 py-2",children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx("div",{className:"group relative",children:o.jsx("button",{className:"rounded p-1 text-gray-400 transition-colors duration-200 hover:text-white",onClick:e,"aria-label":"Close Code Panel",children:o.jsx(T.FiX,{size:18})})}),o.jsx("span",{className:"text-base font-semibold text-white",children:"Code Editor"}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("div",{className:`h-2 w-2 rounded-full ${u?"bg-yellow-500":"bg-green-500"}`}),o.jsx("span",{className:`text-xs font-medium ${u?"text-yellow-400":"text-green-400"}`,children:u?"Unsaved":"Saved"})]})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsxs("div",{className:"group relative",children:[o.jsx("button",{onClick:r,disabled:s||!l.trim(),className:"rounded p-1 text-gray-400 transition-colors duration-200 hover:text-white disabled:cursor-not-allowed disabled:text-gray-600","aria-label":"Format HTML",children:s?o.jsx(T.FiLoader,{size:18,className:"animate-spin"}):o.jsx(T.FiFileText,{size:18})}),o.jsx("span",{className:"absolute bottom-full left-1/2 z-10 mb-2 -translate-x-1/2 transform whitespace-nowrap rounded bg-gray-900 px-2 py-1 text-xs text-white opacity-0 transition-opacity duration-200 group-hover:opacity-100",children:s?"Formatting HTML...":"Format HTML"})]}),o.jsxs("div",{className:"group relative",children:[o.jsx("button",{onClick:a,disabled:d==="processing"||!u,className:"rounded p-1 text-gray-400 transition-colors duration-200 hover:text-white disabled:cursor-not-allowed disabled:text-gray-600","aria-label":"Save HTML",children:o.jsx(T.FiSave,{size:18})}),o.jsx("span",{className:"absolute bottom-full left-1/2 z-10 mb-2 -translate-x-1/2 transform whitespace-nowrap rounded bg-gray-900 px-2 py-1 text-xs text-white opacity-0 transition-opacity duration-200 group-hover:opacity-100",children:"Save"})]})]})]});function Bf({height:e="100%",defaultLanguage:r="html",theme:a="vs-dark",value:s,onChange:l,options:u}){const d=S.useRef(null),[p,f]=S.useState(null);return S.useEffect(()=>{const m=document.createElement("div");return m.style.position="fixed",m.style.top="0",m.style.left="0",m.style.width="100%",m.style.height="100%",m.style.pointerEvents="none",m.style.zIndex="9999",document.body.appendChild(m),f(m),()=>{m.parentNode&&m.parentNode.removeChild(m)}},[]),S.useEffect(()=>{if(!d.current||!p)return;const m=()=>{if(!d.current||!p)return;const D=d.current.getBoundingClientRect(),y=p.firstChild;y&&(y.style.position="absolute",y.style.top=`${D.top}px`,y.style.left=`${D.left}px`,y.style.width=`${D.width}px`,y.style.height=`${D.height}px`,y.style.pointerEvents="auto")};m();const g=()=>{requestAnimationFrame(m)};window.addEventListener("resize",g),window.addEventListener("scroll",g,!0);let w;return window.ResizeObserver&&(w=new ResizeObserver(g),w.observe(d.current)),()=>{window.removeEventListener("resize",g),window.removeEventListener("scroll",g,!0),w&&w.disconnect()}},[p]),o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:d,style:{width:"100%",height:e}}),p&&Ad.createPortal(o.jsx("div",{style:{backgroundColor:"#1e1e1e"},children:o.jsx(Ld.default,{height:e,defaultLanguage:r,theme:a,value:s,onChange:l,options:u})}),p)]})}function Tf({onClose:e}){const{codeValue:r,conversionStatus:a,hasUnsavedChanges:s,handleCodeChange:l,handleSave:u,handleClose:d,formatCode:p,isFormattingCode:f}=jf();return o.jsxs("div",{className:"flex h-full w-1/2 flex-col border-r border-gray-200 bg-[#181c24]",children:[o.jsx(_f,{onClose:()=>{d(),e()},onFormat:p,onSave:u,isFormattingCode:f,codeValue:r,hasUnsavedChanges:s,conversionStatus:a}),o.jsx("div",{className:"flex-1 p-0",style:{width:"100%",height:"100%"},children:o.jsx(Bf,{height:"100%",defaultLanguage:"html",theme:"vs-dark",value:r,onChange:m=>l(m||""),options:{fontSize:16,padding:{top:10},minimap:{enabled:!1},wordWrap:"on",scrollBeyondLastLine:!1,formatOnPaste:!0,formatOnType:!0,autoIndent:"full",tabSize:2,insertSpaces:!0,automaticLayout:!0,folding:!0,lineNumbers:"on",renderWhitespace:"selection",bracketPairColorization:{enabled:!0},guides:{bracketPairs:!0,indentation:!0},suggest:{showKeywords:!0,showSnippets:!0}}})})]})}const Lf={loading:!1,template:{}},ci=S.createContext(Lf);function di(){const e=S.useContext(ci);if(!e)throw new Error("useTemplate must be used within a TemplateProvider");return e}const Pf={},If=(e,r)=>({onDeleteNode:()=>{const a=r.getEvent("selected").last();a&&e.delete(a)},onCopy:()=>{const a=r.getEvent("selected").last();if(!a){console.warn("[Copy] No node selected");return}try{const s=r.node(a).toNodeTree();console.log("[Copy] Node tree:",s);const l={type:"craftjs-copy",nodeTree:s,selectedId:a,timestamp:Date.now()};console.log("[Copy] Copy data:",l);const u=JSON.stringify(l,(d,p)=>{if(!["dom","rules","_hydrationTimestamp","events"].includes(d))return d==="type"&&typeof p=="function"?{resolvedName:p.name||p.displayName||"Unknown"}:p});navigator.clipboard.writeText(u),console.log("[Copy] Successfully copied to clipboard")}catch(s){console.error("[Copy] Failed to copy node:",s)}},onPaste:async()=>{console.log("[Paste] Starting paste operation...");try{const a=await navigator.clipboard.readText();if(console.log("[Paste] Clipboard text:",a),!a){console.warn("[Paste] Clipboard is empty");return}let s;try{s=JSON.parse(a),console.log("[Paste] Parsed clipboard data:",s)}catch(w){console.warn("[Paste] Invalid clipboard data:",w);return}if(!s||s.type!=="craftjs-copy"||!s.nodeTree){console.warn("[Paste] Clipboard does not contain valid node data");return}const l=s.nodeTree;console.log("[Paste] Node tree to paste:",l);const d=(w=>{const D={...w},y={},v=()=>Math.random().toString(36).substring(2,15);if(D.nodes&&(Object.keys(D.nodes).forEach(E=>{y[E]=v()}),D.rootNodeId&&y[D.rootNodeId]&&(D.rootNodeId=y[D.rootNodeId])),D.nodes){const E={};Object.keys(D.nodes).forEach(C=>{const x={...D.nodes[C]},k=y[C];if(x.id=k,x.events=x.events||{selected:!1,dragged:!1,hovered:!1},x.dom=null,x.rules=x.rules||{canDrag:()=>!0,canDrop:()=>!0,canMoveIn:()=>!0,canMoveOut:()=>!0},x.data){if(x.data.props=x.data.props||{},x.data.custom=x.data.custom||{},x.data.hidden=x.data.hidden||!1,x.data.isCanvas=x.data.isCanvas||!1,x.data.nodes=x.data.nodes||[],x.data.linkedNodes=x.data.linkedNodes||{},x.data.displayName=x.data.displayName||x.data.type?.displayName||"Component",x.data.parent&&y[x.data.parent]&&(x.data.parent=y[x.data.parent]),x.data.nodes&&Array.isArray(x.data.nodes)&&(x.data.nodes=x.data.nodes.map(j=>y[j]||j)),x.data.linkedNodes){const j={};Object.keys(x.data.linkedNodes).forEach(N=>{const P=x.data.linkedNodes[N];j[N]=y[P]||P}),x.data.linkedNodes=j}if(x.data.type&&typeof x.data.type=="object"&&x.data.type.resolvedName){const j=Jt.find(N=>{const P=typeof N.component=="function"?N.component.name||N.component.displayName:"";return N.id===x.data.type.resolvedName||P===x.data.type.resolvedName});j?(x.data.type=j.component,console.log("[Paste] Resolved component:",x.data.type.resolvedName,"to",j.component)):console.warn("[Paste] Could not resolve component:",x.data.type.resolvedName)}}E[k]=x}),D.nodes=E}return D})(l);console.log("[Paste] Reconstructed node tree:",d);const p=r.getEvent("selected").last();let f="ROOT",m;if(p){const w=r.node(p).get();if(console.log("[Paste] Selected node data:",w),w.data.isCanvas)f=p,m=(w.data.nodes||[]).length,console.log("[Paste] Inserting as child of canvas node:",p,"at index:",m);else{const D=w.data.parent;D?(f=D,m=r.node(f).get().data.nodes.indexOf(p)+1,console.log("[Paste] Inserting after selected node in parent:",f,"at index:",m)):(f="ROOT",m=r.node("ROOT").get().data.nodes.indexOf(p)+1,console.log("[Paste] Inserting after selected node in ROOT at index:",m))}}else m=r.node("ROOT").get().data.nodes.length,console.log("[Paste] No selection, adding to end of ROOT at index:",m);console.log("[Paste] Will insert at parent:",f,"index:",m),console.log("[Paste] Using addNodeTree with reconstructed nodeTree:",d),e.addNodeTree(d,f,m);const g=d.rootNodeId;g&&(console.log("[Paste] Selecting newly pasted node:",g),e.selectNode(g)),console.log("[Paste] Node pasted successfully")}catch(a){console.error("[Paste] Failed to paste:",a),a instanceof Error&&console.error("[Paste] Error stack:",a.stack)}},onUndo:()=>e.history.undo(),onRedo:()=>e.history.redo(),onSave:()=>{const a=r.serialize();console.log("Saving JSON:",a)}});function Of(){const{actions:e,query:r}=H.useEditor(),a=l=>l.toLowerCase().charAt(0).toUpperCase()+l.toLowerCase().slice(1),s=l=>l.includes("_")?`on${l.split("_").map(a).join("")}`:`on${a(l)}`;S.useEffect(()=>{const l=If(e,r),u=d=>{const p=navigator.platform.includes("Mac"),f=[];(p&&d.metaKey||!p&&d.ctrlKey)&&f.push(p?"Meta":"Ctrl"),d.shiftKey&&f.push("Shift"),f.push(d.key);const m=f.join("+");Object.entries(Pf).forEach(([g,w])=>{if(w.keys.includes(m)){d.preventDefault();const D=l[s(g)];console.log("Executing shortcut:",g,s(g)),D?.()}})};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[e,r])}const Mf=({name:e})=>o.jsx("div",{className:"border-b border-[#e8e7ee] bg-gray-50 p-4",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded bg-[#170f4f]",children:o.jsx("span",{className:"text-xs font-medium text-white",children:e.charAt(0).toUpperCase()})}),o.jsx("div",{className:"flex-1",children:o.jsx("h3",{className:"text-sm font-medium text-[#170f4f]",children:e})})]})});function Rf(){const{selected:e,actions:r,query:a}=H.useEditor(m=>({selected:m.events.selected})),s=()=>{if(e&&e.size>0){const m=Array.from(e)[0];r.delete(m)}},l=()=>{if(e&&e.size>0){const m=Array.from(e)[0];console.log("Clone component:",m)}},u=()=>{if(e&&e.size>0){const m=Array.from(e)[0];console.log("Move up component:",m)}},d=()=>{if(e&&e.size>0){const m=Array.from(e)[0];console.log("Move down component:",m)}};S.useEffect(()=>{const m=g=>{if(e&&e.size>0){const w=g.target;!(w.tagName==="INPUT"||w.tagName==="TEXTAREA"||w.contentEditable==="true")&&(g.key==="Backspace"||g.key==="Delete")&&(g.preventDefault(),s())}};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[e]);const f=(()=>{if(!e||e.size===0)return null;const m=Array.from(e)[0],g=a.node(m).get();return g?{id:m,type:g.data.type,displayName:g.data.displayName||String(g.data.type),props:g.data.props,isCanvas:g.data.isCanvas,isDeletable:!0,isDuplicateable:!0,parent:g.data.parent}:null})();return f?o.jsxs("div",{className:"space-y-3 p-4",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("button",{onClick:l,disabled:!f.isDuplicateable,className:"flex items-center justify-center gap-2 border border-[#e8e7ee] bg-white px-3 py-2 text-xs font-medium transition-colors duration-200 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",children:[o.jsx(T.FiCopy,{size:14}),"Duplicate"]}),o.jsxs("button",{onClick:s,disabled:!f.isDeletable,className:"flex items-center justify-center gap-2 border border-[#e8e7ee] bg-white px-3 py-2 text-xs font-medium transition-colors duration-200 hover:border-red-300 hover:bg-red-50 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-50",children:[o.jsx(T.FiTrash2,{size:14}),"Delete"]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("button",{onClick:u,className:"flex items-center justify-center gap-2 border border-[#e8e7ee] bg-white px-3 py-2 text-xs font-medium transition-colors duration-200 hover:bg-gray-50",children:[o.jsx(T.FiArrowUp,{size:14}),"Move Up"]}),o.jsxs("button",{onClick:d,className:"flex items-center justify-center gap-2 border border-[#e8e7ee] bg-white px-3 py-2 text-xs font-medium transition-colors duration-200 hover:bg-gray-50",children:[o.jsx(T.FiArrowDown,{size:14}),"Move Down"]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("button",{className:"flex items-center justify-center gap-2 border border-[#e8e7ee] bg-white px-3 py-2 text-xs font-medium transition-colors duration-200 hover:bg-gray-50",children:[o.jsx(T.FiLock,{size:14}),"Lock"]}),o.jsxs("button",{className:"flex items-center justify-center gap-2 border border-[#e8e7ee] bg-white px-3 py-2 text-xs font-medium transition-colors duration-200 hover:bg-gray-50",children:[o.jsx(T.FiEyeOff,{size:14}),"Hide"]})]})]}):null}function zf(){const{selected:e,query:r}=H.useEditor(m=>({selected:m.events.selected})),[a,s]=S.useState(""),l=S.useRef(null),u=()=>{if(l.current){const m=l.current.textContent||"";navigator.clipboard.writeText(m).then(()=>{console.log("HTML copied to clipboard")})}},d=m=>{try{const g=r.node(m).get();return g&&g.dom?g.dom.outerHTML.replace(/data-cy="[^"]*"/g,"").replace(/data-craft-id="[^"]*"/g,"").replace(/data-node-id="[^"]*"/g,"").replace(/class="[^"]*craft[^"]*"/g,'class=""').replace(/class="[^"]*ring-[^"]*"/g,'class=""').replace(/class="[^"]*hover:[^"]*"/g,'class=""').replace(/class="[^"]*transition-[^"]*"/g,'class=""').replace(/class="[^"]*duration-[^"]*"/g,'class=""').replace(/class="[^"]*opacity-[^"]*"/g,'class=""').replace(/class="[^"]*cursor-[^"]*"/g,'class=""').replace(/class="[^"]*min-h-screen[^"]*"/g,'class=""').replace(/class="[^"]*bg-white[^"]*"/g,'class=""').replace(/class=""/g,"").replace(/\s+/g," ").trim()||"<!-- No HTML available -->":"<!-- Component not found in DOM -->"}catch(g){return console.error("Error getting component HTML:",g),"<!-- Error getting component HTML -->"}};S.useEffect(()=>{if(e&&e.size>0){const m=Array.from(e)[0];if(r.node(m).get()){const w=d(m);s(w)}}else s("")},[e,r]);const f=(()=>{if(!e||e.size===0)return null;const m=Array.from(e)[0],g=r.node(m).get();return g?{id:m,type:g.data.type,displayName:g.data.displayName||String(g.data.type),props:g.data.props,isCanvas:g.data.isCanvas,isDeletable:!0,isDuplicateable:!0,parent:g.data.parent}:null})();return f?o.jsxs("div",{className:"space-y-4 p-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs font-medium text-gray-700",children:"Component ID"}),o.jsx("input",{type:"text",value:f.id,readOnly:!0,className:"w-full rounded-none border border-[#e8e7ee] bg-gray-50 px-3 py-2 text-xs focus:outline-none"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs font-medium text-gray-700",children:"Component Parent"}),o.jsx("input",{type:"text",value:String(f.parent),readOnly:!0,className:"w-full rounded-none border border-[#e8e7ee] bg-gray-50 px-3 py-2 text-xs focus:outline-none"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs font-medium text-gray-700",children:"Properties"}),o.jsx("div",{className:"rounded-none border border-[#e8e7ee] bg-gray-50 p-3",children:o.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-600",children:JSON.stringify(f?.props,null,2)})})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700",children:"Component HTML"}),o.jsx("button",{onClick:u,className:"rounded-none p-1 text-gray-400 transition-colors duration-200 hover:bg-gray-100 hover:text-gray-600",title:"Copy HTML to clipboard",children:o.jsx(T.FiClipboard,{size:14})})]}),o.jsx("div",{className:"rounded-none border border-[#e8e7ee] bg-gray-50 p-3",children:o.jsx("pre",{ref:l,className:"whitespace-pre-wrap font-mono text-xs text-gray-600",children:a||"<!-- No HTML available -->"})})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("span",{className:"inline-flex items-center rounded bg-blue-100 px-2 py-1 text-xs font-medium text-blue-800",children:f.isCanvas?"Canvas":"Component"}),f.isDeletable&&o.jsx("span",{className:"inline-flex items-center rounded bg-green-100 px-2 py-1 text-xs font-medium text-green-800",children:"Deletable"}),f.isDuplicateable&&o.jsx("span",{className:"inline-flex items-center rounded bg-purple-100 px-2 py-1 text-xs font-medium text-purple-800",children:"Duplicatable"})]})]}):null}function $f(){const{actions:{setProp:e},text:r}=H.useNode(a=>({text:a.data.props.children}));return o.jsx("div",{className:"space-y-4 p-4",children:o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Text"}),o.jsx("textarea",{rows:5,value:r,onChange:a=>e(s=>s.children=a.target.value),className:"focus:ring-primary-500 min-h-fit w-full rounded-md border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2"})]})})}const Yt=({title:e,icon:r,children:a,defaultOpen:s=!1,className:l=""})=>{const u=S.useRef(null),[d,p]=S.useState(s),[f,m]=S.useState(s?void 0:0),g=S.useRef(null);S.useEffect(()=>{u.current&&u.current.parentElement&&u.current.parentElement.firstElementChild===u.current&&!s&&(p(!0),m(void 0))},[s]),S.useEffect(()=>{if(g.current)if(d){const D=g.current.scrollHeight;m(D)}else m(0)},[d]);const w=()=>{p(!d)};return o.jsxs("div",{ref:u,className:`overflow-hidden border border-[#E8E7EE] ${l}`,children:[o.jsxs("button",{onClick:w,className:"flex w-full items-center justify-between border-b border-[#E8E7EE] bg-white px-4 py-3 transition-colors hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-[#170F4F]",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[r,o.jsx("h3",{className:"text-sm font-medium text-[#170F4F]",children:e})]}),o.jsx(T.FiChevronDown,{size:16,className:`text-[#A29FB9] transition-transform duration-200 ${d?"rotate-0":"-rotate-90"}`})]}),o.jsx("div",{ref:g,style:{height:f,overflow:"hidden",transition:"height 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},"data-testid":`collapse-content-${e.replace(/\s+/g,"-").toLowerCase()}`,children:d&&o.jsx("div",{className:"bg-white p-4",children:a})})]})};function pi(){const{actions:{setProp:e},style:{backgroundColor:r}={}}=H.useNode(a=>({style:a.data.props.style||{}}));return o.jsx(Yt,{title:"Background",icon:o.jsx(T.FiEdit3,{size:14,className:"text-[#170F4F]"}),defaultOpen:!1,children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("input",{type:"color",value:r,onChange:a=>e(s=>s.style.backgroundColor=a.target.value),className:"h-10 w-10 cursor-pointer border border-[#E8E7EE] transition-colors hover:border-[#170F4F]","aria-label":"Background color"}),o.jsx("input",{type:"text",value:r,onChange:a=>e(s=>s.style.backgroundColor=a.target.value),className:"flex-1 border border-[#E8E7EE] px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]",placeholder:"#ffffff"})]})})}function hi(){const{actions:{setProp:e},style:{borderStyle:r,borderRadius:a,borderColor:s,borderWidth:l}={}}=H.useNode(u=>({style:u.data.props.style||{}}));return o.jsx(Yt,{title:"Border",icon:o.jsx(T.FiSquare,{size:14,className:"text-[#170F4F]"}),defaultOpen:!1,children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Border Radius"}),o.jsx("div",{className:"grid grid-cols-4 gap-1",children:[{value:"",label:"0"},{value:"4px",label:"4px"},{value:"8px",label:"8px"},{value:"9999px",label:"1/2"}].map(u=>o.jsx("button",{onClick:()=>e(d=>d.style.borderRadius=u.value),className:`border border-[#E8E7EE] px-2 py-2 text-xs transition-all ${a===u.value?"border-[#170F4F] bg-[#170F4F] text-white":"text-[#A29FB9] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,children:u.label},u.value))})]}),o.jsxs("div",{children:[o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Border Width"}),o.jsx("div",{className:"grid grid-cols-4 gap-1",children:[{value:"0px",label:"0"},{value:"1px",label:"1px"},{value:"2px",label:"2px"},{value:"4px",label:"4px"}].map(u=>o.jsx("button",{onClick:()=>e(d=>d.style.borderWidth=u.value),className:`border border-[#E8E7EE] px-2 py-2 text-xs transition-all ${l===u.value?"border-[#170F4F] bg-[#170F4F] text-white":"text-[#A29FB9] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,children:u.label},u.value))})]}),o.jsxs("div",{children:[o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Border type"}),o.jsxs("div",{className:"mb-2 grid grid-cols-2 gap-2",children:[o.jsx("button",{onClick:()=>e(u=>u.style.borderStyle="none"),className:`border border-[#E8E7EE] px-3 py-2 text-xs transition-all ${r==="none"?"border-[#170F4F] bg-[#170F4F] text-white":"text-[#A29FB9] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,children:"None"}),o.jsx("button",{onClick:()=>e(u=>u.style.borderStyle="solid"),className:`border border-[#E8E7EE] px-3 py-2 text-xs transition-all ${r==="solid"?"border-[#170F4F] bg-[#170F4F] text-white":"text-[#A29FB9] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,children:"Light"}),o.jsx("button",{onClick:()=>e(u=>u.style.borderStyle="dotted"),className:`border border-[#E8E7EE] px-3 py-2 text-xs transition-all ${r==="dotted"?"border-[#170F4F] bg-[#170F4F] text-white":"text-[#A29FB9] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,children:"Dotted"}),o.jsx("button",{onClick:()=>e(u=>u.style.borderStyle="dashed"),className:`border border-[#E8E7EE] px-3 py-2 text-xs transition-all ${r==="dashed"?"border-[#170F4F] bg-[#170F4F] text-white":"text-[#A29FB9] hover:border-[#00BAC7] hover:bg-[#CCF1F4]"}`,children:"Dashed"})]}),o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Border Color"}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("input",{type:"color",value:s,onChange:u=>e(d=>d.style.borderColor=u.target.value),className:"h-10 w-10 cursor-pointer border border-[#E8E7EE] transition-colors hover:border-[#170F4F]","aria-label":"Background color"}),o.jsx("input",{type:"text",value:s,onChange:u=>e(d=>d.style.borderColor=u.target.value),className:"flex-1 border border-[#E8E7EE] px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]",placeholder:"#ffffff"})]})]})]})})}const we=S.forwardRef(({value:e,onChange:r,min:a,max:s,defaultUnit:l="px",allowedUnits:u=[],className:d="",...p},f)=>{const[m,g]=S.useState(""),[w,D]=S.useState(!1),y=S.useCallback(N=>{if(typeof N=="number")return{value:N,unit:l,text:`${N}${l}`};if(typeof N=="string"&&N.trim()){const P=N.trim(),R=P.match(/^(-?\d*\.?\d+)(.*)$/);if(!R)return{value:0,unit:l,text:""};const[,_,O]=R,L=parseFloat(_),W=O.trim()||l,ue=u.length>0&&!u.includes(W)?l:W;return{value:L,unit:ue,text:P}}return{value:0,unit:l,text:""}},[l,u]),v=S.useMemo(()=>{if(!e||typeof e=="string"&&e.trim()==="")return"";const N=y(e);return`${N.value}${N.unit}`},[e,y]),E=S.useCallback(N=>{g(N.target.value)},[]),C=S.useCallback(N=>{if(N.key==="Enter"){N.currentTarget.blur();return}if(N.key==="ArrowUp"||N.key==="ArrowDown"){N.preventDefault();const P=w?m:v;if(!P.trim())return;const R=y(P);if(isNaN(R.value))return;const _=N.shiftKey?10:N.ctrlKey||N.metaKey?.1:1,O=N.key==="ArrowUp"?R.value+_:R.value-_,L=Math.min(s??O,Math.max(a??O,O)),W=`${L}${R.unit}`;g(W),r?.({value:L,unit:R.unit,text:W})}},[w,m,v,y,a,s,r]),x=S.useCallback(()=>{D(!0),!m&&e&&g(typeof e=="string"?e:v)},[m,e,v]),k=S.useCallback(()=>{if(D(!1),!m.trim()){g(""),r?.({value:0,unit:l,text:""});return}const N=y(m),P=Math.min(s??N.value,Math.max(a??N.value,N.value)),R=`${P}${N.unit}`;g(R),r?.({value:P,unit:N.unit,text:R})},[m,r,l,y,a,s]),j=`border border-[#E8E7EE] bg-white text-center text-xs transition-all focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F] disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-400 ${d.includes("px-")||d.includes("py-")?"":"px-1 py-0.5"}`;return o.jsx("input",{ref:f,type:"text",value:w?m:v,onChange:E,onFocus:x,onBlur:k,onKeyDown:C,className:`${j} ${d}`.trim(),...p})});we.displayName="DimensionInput";const eo={min:0,defaultUnit:"px",allowedUnits:["px","rem","%","vh","vw"],placeholder:"auto",className:"w-20 px-2 py-1 text-xs"};function mi(){const{actions:{setProp:e},style:{columns:r,columnSpacing:a,alignment:s,minHeight:l,width:u,height:d}={}}=H.useNode(m=>({style:m.data.props.style||{}})),p=()=>{r<6&&e(m=>m.style.columns=r+1)},f=()=>{r>1&&e(m=>m.style.columns=r-1)};return o.jsx(Yt,{title:"Layout",icon:o.jsx(T.FiLayout,{size:14,className:"text-[#170F4F]"}),defaultOpen:!1,children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("div",{children:[o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Width"}),o.jsx(we,{value:u,onChange:m=>e(g=>g.style.width=m.text),...eo})]}),o.jsxs("div",{children:[o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Height"}),o.jsx(we,{value:d,onChange:m=>e(g=>g.style.height=m.text),...eo})]})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[o.jsx("span",{className:"text-xs text-[#A29FB9]",children:"Min Height"}),o.jsxs("span",{className:"bg-[#E8E7EE] px-2 py-1 font-mono text-xs text-[#170F4F]",children:[l,"px"]})]}),o.jsx("input",{type:"range",min:"50",max:"400",step:"25",value:l,onChange:m=>e(g=>g.style.minHeight=parseInt(m.target.value)),className:"slider-modern h-2 w-full cursor-pointer appearance-none bg-[#E8E7EE]",style:{background:`linear-gradient(to right, #170F4F 0%, #170F4F ${(l-50)/350*100}%, #E8E7EE ${(l-50)/350*100}%, #E8E7EE 100%)`}})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[o.jsx("span",{className:"text-xs text-[#A29FB9]",children:"Columns"}),o.jsx("span",{className:"bg-[#E8E7EE] px-2 py-1 font-mono text-xs text-[#170F4F]",children:r})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("button",{onClick:f,disabled:r<=1,className:"flex h-8 w-8 items-center justify-center border border-[#E8E7EE] bg-[#E8E7EE] text-[#A29FB9] transition-all hover:border-[#00BAC7] hover:bg-[#CCF1F4] disabled:cursor-not-allowed disabled:opacity-30",children:o.jsx(T.FiMinus,{size:14})}),o.jsx("div",{className:"flex flex-1 justify-center py-1",children:o.jsx("div",{className:"flex gap-1",children:Array.from({length:r},(m,g)=>o.jsx("div",{className:"h-8 w-4 border border-[#170F4F] bg-[#170F4F]"},g))})}),o.jsx("button",{onClick:p,disabled:r>=6,className:"flex h-8 w-8 items-center justify-center border border-[#E8E7EE] bg-[#E8E7EE] text-[#A29FB9] transition-all hover:border-[#00BAC7] hover:bg-[#CCF1F4] disabled:cursor-not-allowed disabled:opacity-30",children:o.jsx(T.FiPlus,{size:14})})]})]}),r>1&&o.jsxs("div",{children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[o.jsx("span",{className:"text-xs text-[#A29FB9]",children:"Column Gap"}),o.jsxs("span",{className:"bg-[#E8E7EE] px-2 py-1 font-mono text-xs text-[#170F4F]",children:[a,"px"]})]}),o.jsx("input",{type:"range",min:"0",max:"40",step:"2",value:a,onChange:m=>e(g=>g.style.columnSpacing=parseInt(m.target.value)),className:"slider-modern h-2 w-full cursor-pointer appearance-none bg-[#E8E7EE]",style:{background:`linear-gradient(to right, #170F4F 0%, #170F4F ${a/40*100}%, #E8E7EE ${a/40*100}%, #E8E7EE 100%)`}})]}),o.jsxs("div",{children:[o.jsx("span",{className:"mb-2 block text-xs text-[#A29FB9]",children:"Alignment"}),o.jsx(We,{options:[{value:"left",label:"Left"},{value:"center",label:"Center"},{value:"right",label:"Right"}],value:s,onChange:m=>e(g=>g.style.alignment=m),placeholder:"Choose alignment"})]})]})})}function Ht(e){if(e!=null){if(typeof e=="number")return e===0?"0":void 0;if(typeof e=="string"){const r=e.trim();return r==="0"?"0":/^-?\d+(\.\d+)?(px|em|rem|%|vh|vw|vmin|vmax|ch|ex|cm|mm|in|pt|pc)$/i.test(r)?r:void 0}}}function to(e={},r){const a=Ht(e[r]),s=Ht(e[`${r}Top`]),l=Ht(e[`${r}Right`]),u=Ht(e[`${r}Bottom`]),d=Ht(e[`${r}Left`]);if(a){const p=a.trim().split(/\s+/);switch(p.length){case 1:return{top:p[0],right:p[0],bottom:p[0],left:p[0]};case 2:return{top:p[0],right:p[1],bottom:p[0],left:p[1]};case 3:return{top:p[0],right:p[1],bottom:p[2],left:p[1]};case 4:return{top:p[0],right:p[1],bottom:p[2],left:p[3]}}}return{top:s,right:l,bottom:u,left:d}}const qe={min:0,defaultUnit:"px",allowedUnits:["px","rem","%"],placeholder:"none",className:"w-10 px-0.5 py-0.5 text-xs"};function fi(){const{actions:{setProp:e},style:r={}}=H.useNode(l=>({style:l.data.props.style||{}})),a=S.useMemo(()=>to(r,"margin"),[r]),s=S.useMemo(()=>to(r,"padding"),[r]);return o.jsx(Yt,{title:"Spacing",icon:o.jsx(T.FiMove,{size:14,className:"text-[#170F4F]"}),defaultOpen:!1,children:o.jsx("div",{className:"space-y-3",children:o.jsx("div",{children:o.jsxs("div",{className:"relative border border-[#dce7fe] bg-[#F9FAFB] p-2",children:[o.jsx("div",{className:"absolute left-1 top-[-2px] -translate-y-1/2",children:o.jsx("span",{className:"bg-[#F9FAFB] px-1 text-xs text-[#A29FB9]",style:{background:"linear-gradient(to bottom,transparent 0%,transparent 50%, #F9FAFB 50%, #F9FAFB 100%)"},children:"Margin"})}),o.jsx("div",{className:"mb-1 flex justify-center",children:o.jsx(we,{value:a.top,onChange:l=>e(u=>u.style.marginTop=l.text),...qe})}),o.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[o.jsx(we,{value:a.left,onChange:l=>e(u=>u.style.marginLeft=l.text),...qe}),o.jsxs("div",{className:"relative mx-2 my-1 flex-1 border-2 border-dashed border-[#3B82F6] bg-[#EFF6FF] p-2",children:[o.jsx("div",{className:"absolute left-1 top-[-3px] -translate-y-1/2",children:o.jsx("span",{className:"bg-[#EFF6FF] px-1 text-xs text-[#3B82F6]",style:{background:"linear-gradient(to bottom, transparent 0%, transparent 50%, #EFF6FF 50%, #EFF6FF 100%)"},children:"Padding"})}),o.jsx("div",{className:"mb-1 flex justify-center",children:o.jsx(we,{value:s.top,onChange:l=>e(u=>u.style.paddingTop=l.text),...qe})}),o.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[o.jsx(we,{value:s.left,onChange:l=>e(u=>u.style.paddingLeft=l.text),...qe}),o.jsx("div",{className:"mx-2 my-1 flex h-6 flex-1 items-center justify-center border border-[#D1D5DB] bg-white px-2 py-1",children:o.jsx("span",{className:"text-[10px] font-medium text-[#6B7280] opacity-60",children:"Content"})}),o.jsx(we,{value:s.right,onChange:l=>e(u=>u.style.paddingRight=l.text),...qe})]}),o.jsx("div",{className:"flex justify-center",children:o.jsx(we,{value:s.bottom,onChange:l=>e(u=>u.style.paddingBottom=l.text),...qe})})]}),o.jsx(we,{value:a.right,onChange:l=>e(u=>u.style.marginRight=l.text),...qe})]}),o.jsx("div",{className:"flex justify-center",children:o.jsx(we,{value:a.bottom,onChange:l=>e(u=>u.style.marginBottom=l.text),...qe})})]})})})})}function Hf(){return o.jsxs(o.Fragment,{children:[o.jsx(mi,{}),o.jsx(fi,{}),o.jsx(pi,{}),o.jsx(hi,{})]})}const qf=["Inter","Roboto","Arial","Georgia","Times New Roman","Montserrat","Lato","Oswald","Poppins"],Uf=[{label:"Lighter",value:"lighter"},{label:"Normal",value:"normal"},{label:"Bold",value:"bold"},{label:"Bolder",value:"bolder"},{label:"100",value:"100"},{label:"200",value:"200"},{label:"300",value:"300"},{label:"400",value:"400"},{label:"500",value:"500"},{label:"600",value:"600"},{label:"700",value:"700"},{label:"800",value:"800"},{label:"900",value:"900"}],Wf=[{label:"Normal",value:"normal"},{label:"No wrapped",value:"nowrap"}];function Vf(){const{actions:{setProp:e},style:r={}}=H.useNode(s=>({style:s.data.props.style})),a=S.useCallback(s=>{e(l=>{l.style={...l.style,...s}})},[e]);return o.jsx(Yt,{title:"Typography",icon:o.jsx(zt.LuType,{size:14,className:"text-[#170F4F]"}),defaultOpen:!0,children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs text-[#A29FB9]",children:"Font"}),o.jsx(We,{options:qf.map(s=>({value:s,label:s})),value:r.fontFamily||"Inter",onChange:s=>a({fontFamily:s}),placeholder:"Choose font family"})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs text-[#A29FB9]",children:"Size"}),o.jsx("input",{type:"number",min:8,max:96,value:r.fontSize||20,onChange:s=>a({fontSize:Number(s.target.value)}),className:"w-full border border-[#E8E7EE] px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs text-[#A29FB9]",children:"Weight"}),o.jsx(We,{options:Uf,value:r.fontWeight||"normal",onChange:s=>a({fontWeight:s}),placeholder:"Choose font weight"})]})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(T.FiMove,{size:14,className:"text-[#170F4F]"}),o.jsx("h3",{className:"text-sm font-medium text-[#170F4F]",children:"Alignment"})]}),o.jsx("div",{className:"flex gap-2",children:["left","center","right","justify"].map(s=>o.jsx("button",{className:`rounded border px-3 py-2 text-xs font-medium transition-all focus:outline-none focus:ring-2 focus:ring-[#170F4F] ${r.textAlign===s?"border-[#00BAC7] bg-[#CCF1F4]":"border-[#E8E7EE] bg-white"}`,onClick:()=>a({textAlign:s}),children:s.charAt(0).toUpperCase()+s.slice(1)},s))}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs text-[#A29FB9]",children:"Line Break"}),o.jsx(We,{options:Wf,value:r.whiteSpace||"normal",onChange:s=>a({whiteSpace:s}),placeholder:"Choose whiteSpace"})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(zt.LuRemoveFormatting,{size:14,className:"text-[#170F4F]"}),o.jsx("h3",{className:"text-sm font-medium text-[#170F4F]",children:"Formatting"})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{className:`rounded border px-3 py-2 text-xs font-bold ${r?.fontWeight==="bold"?"border-[#00BAC7] bg-[#CCF1F4]":"border-[#E8E7EE] bg-white"}`,onClick:()=>a({fontWeight:r?.fontWeight==="bold"?"normal":"bold"}),children:o.jsx(zt.LuBold,{size:14,className:"text-[#170F4F]"})}),o.jsx("button",{className:`rounded border px-3 py-2 text-xs italic ${r?.fontStyle==="italic"?"border-[#00BAC7] bg-[#CCF1F4]":"border-[#E8E7EE] bg-white"}`,onClick:()=>a({fontStyle:r?.fontStyle==="italic"?"normal":"italic"}),children:o.jsx(zt.LuItalic,{size:14,className:"text-[#170F4F]"})}),o.jsx("button",{className:`rounded border px-3 py-2 text-xs underline ${r?.textDecoration==="underline"?"border-[#00BAC7] bg-[#CCF1F4]":"border-[#E8E7EE] bg-white"}`,onClick:()=>a({textDecoration:r?.textDecoration==="underline"?"none":"underline"}),children:o.jsx(zt.LuUnderline,{size:14,className:"text-[#170F4F]"})})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(T.FiEdit3,{size:14,className:"text-[#170F4F]"}),o.jsx("h3",{className:"text-sm font-medium text-[#170F4F]",children:"Text Color"})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("input",{type:"color",value:r.color||"#000000",onChange:s=>a({color:s.target.value}),className:"h-10 w-10 cursor-pointer border border-[#E8E7EE] transition-colors hover:border-[#170F4F]","aria-label":"Text color"}),o.jsx("input",{type:"text",value:r.color||"#000000",onChange:s=>a({color:s.target.value}),className:"flex-1 border border-[#E8E7EE] px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]",placeholder:"#000000"})]})]})]})})}const Jf={default:Hf,typography:Vf,layout:mi,spacing:fi,background:pi,border:hi,box:io,text:$f,button:jn,image:Tn,anchor:Nn,divider:_n},Gf=Object.entries(Jf).map(([e,r])=>({id:e,component:r}));function Kf(){const{selected:e,query:r}=H.useEditor(l=>({selected:l.events.selected}));if(!e||e.size===0)return o.jsx("div",{className:"flex h-full items-center justify-center text-gray-500",children:o.jsxs("div",{className:"text-center",children:[o.jsx(T.FiSettings,{size:48,className:"mx-auto mb-4 text-gray-300"}),o.jsx("p",{className:"text-sm",children:"Select a component to see its settings"})]})});const a=Array.from(e)[0],s=r.node(a).get();if(!s)return null;if(s&&s.data.custom&&s.data.custom.settings){const l=s.data.custom.settings,d=(Array.isArray(l)?l:[l]).map(p=>Gf.find(f=>f.id===p)).filter(Boolean);if(d.length>0)return o.jsx(o.Fragment,{children:d.map(p=>{const f=p.component;return Ge.default.createElement(H.NodeProvider,{id:a,related:!0,key:p.id},o.jsx(f,{}))})})}return o.jsx("div",{className:"p-4",children:o.jsx("p",{className:"text-sm text-gray-500",children:"No custom settings available for this component."})})}const Yf=[{id:"settings",label:"Settings",icon:T.FiSettings},{id:"info",label:"Info",icon:T.FiInfo},{id:"actions",label:"Actions",icon:T.FiEye}];function Xf(){const{selected:e,query:r}=H.useEditor(d=>({selected:d.events.selected})),[a,s]=S.useState("settings"),l=S.useMemo(()=>({settings:o.jsx(Kf,{}),info:o.jsx(zf,{}),actions:o.jsx(Rf,{})}),[]),u=S.useMemo(()=>{if(!e||e.size===0)return null;const d=Array.from(e)[0],p=r.node(d).get();return p?{id:d,type:p.data.type,displayName:p.data.displayName||String(p.data.type),props:p.data.props,isCanvas:p.data.isCanvas,isDeletable:!0,isDuplicateable:!0,parent:p.data.parent}:null},[e,r]);return o.jsxs("div",{className:"flex h-full w-80 flex-col border-l border-[#e8e7ee] bg-white",children:[u&&o.jsx(Mf,{name:String(u.displayName)}),u&&o.jsx("div",{className:"flex border-b border-[#e8e7ee]",children:Yf.map(d=>{const p=d.icon;return o.jsxs("button",{onClick:()=>s(d.id),className:`flex flex-1 items-center justify-center gap-2 px-3 py-2 text-xs font-medium transition-colors duration-200 ${a===d.id?"border-b-2 border-[#170f4f] bg-white text-[#170f4f]":"text-gray-500 hover:bg-gray-50 hover:text-[#170f4f]"}`,children:[o.jsx(p,{size:14}),d.label]},d.id)})}),o.jsx("div",{className:"flex-1 overflow-y-auto",children:l[a]})]})}function Zf({blocks:e,searchTerm:r}){const{connectors:a,query:s}=H.useEditor(),[l,u]=S.useState(new Set),d=S.useRef({}),[p,f]=S.useState({}),m=S.useMemo(()=>r.trim()?e.filter(x=>x.label.toLowerCase().includes(r.toLowerCase())||x.category?.toLowerCase().includes(r.toLowerCase())):e,[e,r]),g=m.reduce((x,k)=>{const j=k.category||"other";return x[j]||(x[j]=[]),x[j].push(k),x},{}),w=x=>{u(k=>{const j=new Set(k);return j.has(x)?j.delete(x):j.add(x),j})};S.useEffect(()=>{const x=Object.keys(g);if(x[0]&&l.size===0){const j=new Set(x.slice(1));u(j)}},[g]),S.useEffect(()=>{Object.keys(d.current).forEach(x=>{const k=d.current[x];if(k){const j=l.has(x);f(j?N=>({...N,[x]:0}):N=>({...N,[x]:k.scrollHeight}))}})},[l,m]);const D=x=>o.jsxs("div",{ref:k=>{k&&a.create(k,Ge.default.createElement(x.component,{}),{})},className:"group flex cursor-move flex-col items-center gap-1.5 rounded-md bg-white p-2.5 text-center transition-all duration-200 hover:bg-gray-50",draggable:!0,onDragStart:k=>{k.currentTarget.style.opacity="0.5"},onDragEnd:k=>{k.currentTarget.style.opacity="1"},title:`Drag to add ${x.label} component`,children:[o.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded bg-[#170F4F] text-sm text-white",children:x.icon}),o.jsx("span",{className:"text-xs font-medium leading-tight text-gray-700",children:x.label})]},x.id),y={layout:"Layout",content:"Content",interactive:"Interactive",media:"Media",dynamic:"Dynamic",other:"Other"},v={layout:o.jsx(T.FiGrid,{size:14}),content:o.jsx(T.FiType,{size:14}),interactive:o.jsx(T.FiMousePointer,{size:14}),media:o.jsx(T.FiImage,{size:14}),dynamic:o.jsx(T.FiCode,{size:14}),other:o.jsx(T.FiPackage,{size:14})},E=s.node("ROOT").get(),C=E&&E.data.nodes&&E.data.nodes.length>0;return o.jsxs("div",{className:"flex h-full flex-col",children:[!C&&o.jsx("div",{className:"border-b border-[#E8E7EE] bg-gray-50/50 px-3 py-2",children:o.jsx("p",{className:"text-xs text-gray-500",children:"Drag components to the canvas to add them"})}),o.jsxs("div",{className:"flex-1 overflow-y-auto p-3",children:[Object.entries(g).map(([x,k])=>{const j=l.has(x);return o.jsxs("div",{className:"last:mb-0",children:[o.jsxs("button",{onClick:()=>w(x),className:"mb-3 flex w-full items-center gap-2 rounded p-2 text-gray-700 transition-all duration-200 hover:bg-gray-50",children:[o.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded transition-colors hover:bg-gray-100",children:j?o.jsx(T.FiChevronRight,{size:12,className:"text-gray-400"}):o.jsx(T.FiChevronDown,{size:12,className:"text-gray-400"})}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"text-gray-600",children:v[x]||v.other}),o.jsx("h3",{className:"text-sm font-medium text-gray-900",children:y[x]||x})]}),o.jsx("div",{className:"h-px flex-1 bg-gray-200"}),o.jsx("span",{className:"text-xs font-medium text-gray-500",children:k.length})]}),o.jsx("div",{ref:N=>{d.current[x]=N},style:{height:p[x],overflow:"hidden",transition:"height 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},children:!j&&o.jsx("div",{className:"pb-1",children:o.jsx("div",{className:"grid grid-cols-2 gap-1.5",children:k.map(D)})})})]},x)}),Object.entries(g).length===0&&o.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[o.jsx("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-gray-100",children:o.jsx("span",{className:"text-lg",children:"📦"})}),o.jsx("h3",{className:"mb-1 text-sm font-medium text-gray-900",children:r?"No components found":"No blocks available"}),o.jsx("p",{className:"text-xs text-gray-500",children:r?"Try different search terms":"Add components to get started"})]})]})]})}const Qf=e=>Jt.find(a=>{const s=a.label.toLowerCase(),l=a.id.toLowerCase(),u=e.toLowerCase();return s===u||l===u})?.icon||o.jsx(T.FiMousePointer,{size:16});function eg({searchTerm:e}){const[r,a]=S.useState(new Set),{nodes:s,actions:l,selected:u}=H.useEditor(y=>({nodes:y.nodes,selected:y.events.selected})),d=y=>{const v=new Set(r);v.has(y)?v.delete(y):v.add(y),a(v)},p=(y,v)=>{if(!v.trim())return y;const E=new RegExp(`(${v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi");return y.split(E).map((x,k)=>E.test(x)?o.jsx("span",{className:"rounded bg-yellow-200 px-0.5 text-yellow-900",children:x},k):x)},f=(y,v=0,E=!1,C=[])=>{const x=s[y];if(!x)return null;const k=x.data.isCanvas,j=x.data.nodes||[],N=x.data.displayName||(typeof x.data.type=="string"?x.data.type:x.data.type?.displayName)||y,P=u&&u.has(y),R=typeof x.data.name=="string"?x.data.name:x.data?.displayName||"",_=j.length>0,O=r.has(y),L=e.trim()===""||N.toLowerCase().includes(e.toLowerCase())||R.toLowerCase().includes(e.toLowerCase()),W=e.trim()!==""&&j.some(pe=>{const ee=s[pe];if(!ee)return!1;const Re=ee.data.displayName||(typeof ee.data.type=="string"?ee.data.type:ee.data.type?.displayName)||pe,ze=typeof ee.data.name=="string"?ee.data.name:ee.data?.displayName||"";return Re.toLowerCase().includes(e.toLowerCase())||ze.toLowerCase().includes(e.toLowerCase())});return L||W?o.jsxs("div",{className:"flex flex-col",children:[o.jsxs("div",{className:"flex w-full items-center",children:[v>0&&o.jsx("div",{style:{width:v*20}}),o.jsxs("div",{className:`group flex w-full items-center rounded-md px-2 py-1.5 transition-colors ${P?"bg-[#170F4F]/10 hover:bg-[#170F4F]/15":"hover:bg-gray-50"} ${L&&e.trim()?"ring-1 ring-yellow-300":""}`,children:[_?o.jsx("button",{onClick:()=>d(y),className:"mr-1.5 flex h-4 w-4 items-center justify-center rounded opacity-0 transition-opacity hover:bg-gray-200 group-hover:opacity-100",children:O?o.jsx(T.FiChevronRight,{size:12,className:"text-gray-500"}):o.jsx(T.FiChevronDown,{size:12,className:"text-gray-500"})}):o.jsx("div",{className:"w-6"}),o.jsx("div",{className:`mr-2.5 flex h-5 w-5 items-center justify-center ${P?"text-[#170F4F]":"text-gray-600"}`,children:Qf(R)}),o.jsx("button",{className:`flex-1 text-left text-sm font-medium transition-colors ${P?"text-[#170F4F]":"text-gray-700 group-hover:text-[#170F4F]"}`,onClick:()=>l.selectNode(y),children:p(N,e)})]})]}),k&&_&&(!O||e.trim()!=="")&&o.jsx("div",{className:"ml-0",children:j.map((pe,ee)=>f(pe,v+1,ee===j.length-1,[...C,E]))})]},y):null},g=s.ROOT?.data?.nodes||[],w=g.length>0,D=r.has("canvas");return o.jsx("div",{className:"flex h-full flex-col",children:o.jsxs("div",{className:"flex-1 space-y-0.5 overflow-y-auto p-2",children:[o.jsxs("div",{className:"flex flex-col",children:[o.jsx("div",{className:"flex w-full items-center",children:o.jsxs("div",{className:`group flex w-full items-center rounded-md px-2 py-1.5 transition-colors ${u&&u.has("ROOT")?"bg-[#170F4F]/10 hover:bg-[#170F4F]/15":"hover:bg-gray-50"}`,children:[w?o.jsx("button",{onClick:()=>d("canvas"),className:"mr-1.5 flex h-4 w-4 items-center justify-center rounded opacity-0 transition-opacity hover:bg-gray-200 group-hover:opacity-100",children:D?o.jsx(T.FiChevronRight,{size:12,className:"text-gray-500"}):o.jsx(T.FiChevronDown,{size:12,className:"text-gray-500"})}):o.jsx("div",{className:"w-6"}),o.jsx("div",{className:"mr-2.5 flex h-5 w-5 items-center justify-center text-[#170F4F]",children:o.jsx(T.FiFile,{size:14})}),o.jsx("button",{className:`flex-1 text-left text-sm font-medium transition-colors ${u&&u.has("ROOT")?"text-[#170F4F]":"text-gray-800 group-hover:text-[#170F4F]"}`,onClick:()=>l.selectNode("ROOT"),children:"Template"})]})}),w&&(!D||e.trim()!=="")&&o.jsx("div",{children:g.map((y,v)=>f(y,1,v===g.length-1,[!0]))})]}),!w&&o.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[o.jsx("div",{className:"mb-2 flex h-10 w-10 items-center justify-center rounded-lg bg-gray-100",children:o.jsx(T.FiLayers,{size:16,className:"text-gray-400"})}),o.jsx("p",{className:"mb-1 text-xs text-gray-500",children:"No layers yet"}),o.jsx("p",{className:"text-xs text-gray-400",children:"Add components to see them here"})]})]})})}const tg=({blocks:e=Jt})=>{const[r,a]=S.useState("blocks"),[s,l]=S.useState("");return o.jsxs("div",{className:"flex h-full w-64 flex-col overflow-hidden border-r border-[#E8E7EE] bg-white",children:[o.jsx("div",{className:"border-b border-[#E8E7EE] bg-gray-50 p-3",children:o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:"text",placeholder:"Search components...",value:s,onChange:u=>l(u.target.value),className:"w-full border border-[#E8E7EE] bg-white px-3 py-2 pl-9 pr-9 text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:border-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]/20"}),o.jsx(T.FiSearch,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),s&&o.jsx("button",{onClick:()=>l(""),className:"absolute right-3 top-1/2 -translate-y-1/2 rounded p-0.5 text-gray-400 transition-colors duration-200 hover:bg-gray-100 hover:text-gray-600",children:o.jsx(T.FiX,{size:14})})]})}),o.jsxs("div",{className:"flex border-b border-[#E8E7EE]",children:[o.jsx("button",{className:`flex-1 border-b py-3 text-sm font-medium transition-colors duration-200 ${r==="blocks"?"border-[#170F4F] text-[#170F4F]":"border-transparent text-[#A29FB9] hover:text-[#00BAC7]"}`,onClick:()=>a("blocks"),children:"Blocks"}),o.jsx("button",{className:`flex-1 border-b py-3 text-sm font-medium transition-colors duration-200 ${r==="layers"?"border-[#170F4F] text-[#170F4F]":"border-transparent text-[#A29FB9] hover:text-[#00BAC7]"}`,onClick:()=>a("layers"),children:"Layers"})]}),o.jsx("div",{className:"flex-1 overflow-hidden",children:r==="blocks"?o.jsx(Zf,{blocks:e,searchTerm:s}):o.jsx(eg,{searchTerm:s})})]})};function rg(e,r=300){let a;return(...s)=>{clearTimeout(a),a=setTimeout(()=>e(...s),r)}}const ng=({hasChildren:e})=>{const{device:r}=Sr();return e?null:o.jsx("div",{className:`pointer-events-none absolute inset-0 left-auto right-auto z-10 flex items-center justify-center ${r==="mobile"?"w-[10%]":"w-[20%]"}`,children:o.jsxs("div",{className:"mx-auto p-6 text-center",children:[o.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center border border-[#170F4F] bg-[#E8E7EE]",children:o.jsx("span",{className:"text-2xl text-[#170F4F]",children:"📄"})}),o.jsx("h3",{className:"mb-2 text-lg font-medium text-[#170F4F]",children:"Start building your page"}),o.jsx("p",{className:"text-sm text-[#A29FB9]",children:"Drag components from the sidebar to create your page layout."})]})})},ag=({hasCanvasContent:e,showCodePanel:r})=>o.jsxs("div",{className:`${r?"w-1/2":"w-full"} mx-auto flex h-full flex-1 items-start justify-center overflow-scroll bg-gradient-to-br from-gray-100 to-gray-200 p-6 transition-all duration-300`,style:{maxHeight:"calc(100vh - 72px)"},children:[o.jsx(ng,{hasChildren:e}),o.jsx(H.Frame,{children:o.jsx(H.Element,{canvas:!0,is:"div",...bn,style:{...bn.style,maxWidth:go.desktop.width}})})]}),sg=()=>{const[e,r]=S.useState(!1),a=()=>{console.log("Export HTML clicked"),r(!1)},s=()=>{console.log("Data Source clicked"),r(!1)};return Ge.default.useEffect(()=>{const l=u=>{e&&r(!1)};return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[e]),o.jsxs("div",{className:"relative",children:[o.jsx("button",{onClick:()=>r(!e),className:"rounded p-1.5 text-[#6B7280] transition-all duration-200 hover:bg-[#F5F5F7] hover:text-[#170F4F]",title:"Menu options",children:o.jsx(T.FiMenu,{size:16})}),e&&o.jsxs("div",{className:"absolute left-0 top-full z-50 mt-1 w-48 rounded-md border border-[#E8E7EE] bg-white py-1 shadow-lg",children:[o.jsxs("button",{onClick:a,className:"flex w-full items-center gap-3 px-4 py-2 text-sm text-gray-700 hover:bg-gray-50",children:[o.jsx(T.FiDownload,{size:14}),"Export HTML"]}),o.jsxs("button",{onClick:s,className:"flex w-full items-center gap-3 px-4 py-2 text-sm text-gray-700 hover:bg-gray-50",children:[o.jsx(T.FiDatabase,{size:14}),"Data Source"]})]})]})},og=({canvasSize:e,showCodePanel:r,onPreviewModeToggle:a,onCanvasSizeChange:s,onCodePanelToggle:l,onSave:u,templateIsModified:d=!1,templateName:p,onTemplateNameChange:f,templateReference:m})=>{const[g,w]=S.useState(!1),D=Ge.default.useRef(null);S.useEffect(()=>{g&&D.current&&(D.current.focus(),D.current.select())},[g]);const y=()=>{w(!1)},v=x=>{x.key==="Enter"&&w(!1),x.key==="Escape"&&w(!1)},E=x=>{f?.(x.target.value)},C=async x=>{try{await navigator.clipboard.writeText(x)}catch(k){console.error("Failed to copy slug:",k)}};return o.jsx("div",{className:"border-b border-[#E8E7EE] bg-white",children:o.jsx("div",{className:"px-3 py-3 sm:px-8",children:o.jsxs("div",{className:"relative flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(sg,{}),o.jsx("div",{className:"group",children:g?o.jsx("input",{ref:D,className:"w-full truncate rounded border-none bg-transparent px-1.5 text-base font-bold text-[#170F4F] focus:outline-none focus:ring-1 focus:ring-[#170F4F]",value:p,onChange:E,onBlur:y,onKeyDown:v,placeholder:"Untitled Template","aria-label":"Template name"}):o.jsxs("div",{className:"flex items-center",children:[o.jsxs("h1",{className:"cursor-pointer rounded px-1.5 py-1 text-base font-bold text-[#170F4F] hover:bg-gray-50",title:"Double-click to edit",onDoubleClick:()=>w(!0),children:[o.jsx("span",{className:"truncate",children:p||"Untitled Template"}),m&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"mx-1.5 text-gray-300",children:"•"}),o.jsx("span",{className:"rounded-sm bg-gray-100 px-1 py-0.5 font-mono text-[10px] font-medium text-gray-600",children:m})]})]}),m&&o.jsx("button",{onClick:()=>C(m),className:"rounded p-0.5 opacity-0 transition-opacity hover:bg-gray-50 hover:text-[#170F4F] group-hover:opacity-100",title:"Copy slug to clipboard",children:o.jsx(T.FiCopy,{size:9,className:"text-gray-400"})})]})})]}),o.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:o.jsx("div",{className:"flex items-center gap-1 border border-[#E8E7EE] bg-white p-1",children:["desktop","tablet","mobile"].map(x=>{const k={desktop:o.jsx(T.FiMonitor,{size:16}),tablet:o.jsx(T.FiTablet,{size:16}),mobile:o.jsx(T.FiSmartphone,{size:16})};return o.jsxs("button",{className:`flex items-center gap-1.5 px-2 py-1 text-xs font-medium transition-all duration-200 ${e===x?"bg-[#170F4F] text-white":"text-[#170F4F] hover:bg-[#F5F5F7]"}`,onClick:()=>s(x),title:`Switch to ${x} view`,children:[o.jsx("span",{className:"inline sm:hidden",children:k[x]}),o.jsx("span",{className:"hidden sm:inline",children:x.charAt(0).toUpperCase()+x.slice(1)})]},x)})})}),o.jsxs("div",{className:"flex items-center gap-2",children:[d?o.jsxs("div",{className:"flex items-center gap-1 text-orange-600",children:[o.jsx("div",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-orange-500"}),o.jsx("span",{className:"text-xs font-medium",children:"Unsaved"})]}):o.jsxs("div",{className:"flex items-center gap-1 text-green-600",children:[o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),o.jsx("span",{className:"text-xs font-medium",children:"Saved"})]}),o.jsx("button",{className:`p-1.5 transition-all duration-200 ${r?"bg-[#170F4F] text-white":"text-[#6B7280] hover:bg-[#F5F5F7] hover:text-[#170F4F]"}`,onClick:l,title:"Toggle Code Editor",children:o.jsx(T.FiCode,{size:16})}),o.jsx("button",{onClick:a,className:"p-1.5 text-[#6B7280] transition-all duration-200 hover:bg-[#F5F5F7] hover:text-[#170F4F]",title:"Preview template",children:o.jsx(T.FiEye,{size:16})}),u&&o.jsxs("button",{className:"relative flex items-center gap-1.5 bg-[#170F4F] px-3 py-1.5 text-xs font-medium text-white transition-all duration-200 hover:bg-[#009CA8]",onClick:u,title:"Save changes",children:[o.jsx(T.FiSave,{size:14}),"Save",d&&o.jsx("span",{className:"absolute -right-0.5 -top-0.5 h-2 w-2 animate-pulse bg-orange-500"})]})]})]})})})},ig=S.lazy(()=>Promise.resolve().then(function(){return Sg}).then(e=>({default:e.DataSourceModal}))),lg=({showCodePanel:e=!1,onPreviewToggle:r,onCodePanelToggle:a,codePanelChildren:s})=>{Of();const l=Sr(),{query:u,store:d}=H.useEditor(),{template:p,updateTemplate:f,saveTemplate:m}=di(),{export:g}=Ln(),[w,D]=S.useState(!1),[y,v]=S.useState(!1),E=S.useCallback(()=>{if(!p)return"";const k=u.serialize();return!k||typeof k=="object"&&Object.keys(k).length<=1?"":g({inlineStyles:!0,prettify:!0,includeComments:!1})},[p,u,g]),C=async()=>{if(!p){alert("No template loaded to save");return}try{f({content:E()}),await m(),alert("Template saved successfully!")}catch(k){console.error("Error saving template:",k),alert("Error saving template. Please try again.")}},x=()=>{};return S.useEffect(()=>{if(!y&&p&&p?.content)try{l.loadTemplate(p.content)}catch(k){console.error("Error loading template into canvas:",k)}finally{v(!0)}},[p?.id]),S.useEffect(()=>{d.subscribe(rg(()=>{f({content:E()})},500),()=>{})},[]),o.jsxs("div",{className:"flex h-full flex-col",children:[o.jsx(og,{canvasSize:l.device,showCodePanel:e,onPreviewModeToggle:r||(()=>{}),onCanvasSizeChange:l.setDevice,onCodePanelToggle:a||(()=>{}),onSave:C,templateIsModified:p?.isModified,templateName:p?.title,onTemplateNameChange:k=>{f({title:k})},templateReference:p?.slug}),o.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[!e&&o.jsx(tg,{}),o.jsxs("div",{className:`flex flex-1 ${e?"flex-row":"flex-col"}`,children:[e?s:null,o.jsx(ag,{canvasSize:l.device,hasCanvasContent:l.isEmpty,showCodePanel:e})]}),!e&&o.jsx(Xf,{})]}),w&&o.jsx(S.Suspense,{fallback:o.jsx("div",{children:"Loading..."}),children:o.jsx(ig,{isOpen:w,onClose:()=>D(!1),onDataImport:x})})]})},gi=({children:e,isHover:r,isSelected:a,name:s,showIndicator:l=!0,width:u,height:d})=>{const p=r&&!a&&l,f=a&&l,m=p||f,g={outline:f?"1px solid #170f4fff":p?"1px dashed #00BAC7":"1px solid transparent",background:f?"rgba(23,15,79,0.03)":p?"rgba(0,186,199,0.02)":"transparent",cursor:"pointer",overflow:"visible",position:"relative",width:u,height:d};return o.jsxs("div",{style:g,className:a?"avoid-transition":"",children:[m&&o.jsxs("div",{className:`absolute left-0 top-0 flex items-center gap-1.5 px-2 py-1 text-xs font-medium backdrop-blur-sm ${f?"border border-[#170F4F] bg-[#170F4F] text-white shadow-lg":"border border-[#00BAC7] bg-[#00BAC7] text-white shadow-md"} `,style:{borderRadius:"4px",transform:"translateY(-100%)",transformOrigin:"left bottom",marginTop:"-2px",zIndex:99999,position:"absolute",transition:"all 0.15s ease-out"},onClick:w=>{w.stopPropagation(),w.preventDefault()},onMouseDown:w=>{w.stopPropagation(),w.preventDefault()},children:[o.jsx("div",{className:"flex h-3 w-3 items-center justify-center",children:f?o.jsx("div",{className:"h-2 w-2 rounded-full bg-white"}):o.jsx("div",{className:"h-2 w-2 rounded-full bg-white opacity-70"})}),o.jsx("span",{className:"select-none whitespace-nowrap leading-none",children:s})]}),e]})},ro=6,Ue=-3,ug={position:"absolute",width:`${ro}px`,height:`${ro}px`,background:"#170F4F",display:"block",pointerEvents:"none",boxShadow:"0 2px 8px rgba(23,15,79,0.3)",border:"0.5px solid #CCF1F4"},cg={topLeft:{left:`${Ue}px`,top:`${Ue}px`},topRight:{right:`${Ue}px`,top:`${Ue}px`},bottomLeft:{left:`${Ue}px`,bottom:`${Ue}px`},bottomRight:{right:`${Ue}px`,bottom:`${Ue}px`}},dg=({children:e,propKey:r={width:"width",height:"height"}})=>{const{actions:a,connectors:{connect:s}}=H.useNode(),{isSelected:l,isHover:u,nodeWidth:d,nodeHeight:p,name:f}=H.useNode(x=>({isSelected:x.events.selected,isHover:x.events.hovered,nodeWidth:x.data.props.style?.[r.width]||x.data.props[r.width]||200,nodeHeight:x.data.props.style?.[r.height]||x.data.props[r.height]||100,name:x.data.custom?.displayName||x.data.displayName})),{maxWidth:m}=H.useEditor(x=>{const j=x.nodes.ROOT?.data?.props?.style||{},N=j.maxWidth||j.width||1200;return{maxWidth:typeof N=="string"?parseInt(N):N}}),g=S.useRef(null),w=S.useRef(null),D=S.useMemo(()=>{const x=()=>{if(typeof d=="number")return Math.round(d);if(typeof d=="string"){if(d.includes("%")&&m){const j=parseFloat(d)/100;return Math.round(m*j)}return d||200}return 200},k=()=>p==="auto"?"auto":typeof p=="number"?Math.round(p):typeof p=="string"?p.includes("%")?p:p||100:100;return{width:x(),height:k()}},[d,p,m]),[y,v]=S.useState(D),E=S.useCallback(()=>{v(D)},[D]);S.useEffect(()=>{if(!m)return;const x=typeof d=="number"?d:parseFloat(d)||0;if(x>m){const k=m/x,j=Math.floor(x*k);a.setProp(N=>{N.style||(N.style={}),N.style[r.width]=j})}},[m,d,a,r.width]);const C=S.useCallback((x,k)=>{if(!w.current)return D;const{width:j,height:N}=w.current;let P=Math.round(j+x),R=Math.round(N+k);return m&&(P=Math.min(P,m)),P=Math.max(P,50),R=Math.max(R,20),{width:P,height:R}},[D,m]);return S.useEffect(()=>{E(),a.setCustom(x=>{x.resizable=!0})},[d,p,E,a]),o.jsx(gi,{isHover:u,isSelected:l,name:f||"Component",showIndicator:!0,width:y.width,height:y.height,children:o.jsxs(jd.Resizable,{ref:x=>{x&&x.resizable&&(g.current=x,s(x.resizable))},enable:{top:l,right:l,bottom:l,left:l,topLeft:l,topRight:l,bottomLeft:l,bottomRight:l},size:y,onResizeStart:x=>{x.preventDefault(),x.stopPropagation();const k=g.current?.resizable;if(!k)return;const j=k.getBoundingClientRect();w.current={width:Math.round(j.width),height:Math.round(j.height)}},onResize:(x,k,j,N)=>{const P=C(N.width,N.height);a.setProp(R=>{R.style||(R.style={}),R.style[r.width]=P.width,R.style[r.height]=P.height}),E()},onResizeStop:(x,k,j,N)=>{const P=C(N.width,N.height);a.setProp(R=>{R.style||(R.style={}),R.style[r.width]=P.width,R.style[r.height]=P.height}),E()},handleStyles:{topLeft:{display:"block"},topRight:{display:"block"},bottomLeft:{display:"block"},bottomRight:{display:"block"}},children:[e,o.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:99999},children:l&&Object.entries(cg).map(([x,k])=>o.jsx("span",{style:{...ug,...k}},x))})]})})},pg=({render:e})=>{const{id:r,isHover:a,isActive:s,name:l,isResizable:u,nodeWidth:d,nodeHeight:p}=H.useNode(m=>({isHover:m.events.hovered,isActive:m.events.selected,name:m.data.custom?.displayName||m.data.displayName,isResizable:m.data.custom.resizable===!0,nodeWidth:m.data.props.style?.width||m.data.props.width||"min-content",nodeHeight:m.data.props.style?.height||m.data.props.height||"min-content"}));return r===Nd.ROOT_NODE?o.jsx(o.Fragment,{children:e}):u?o.jsx(dg,{children:e}):o.jsx(gi,{isHover:a,isSelected:s,name:l,width:d,height:p,children:e})},hg=({templateId:e,baseUrl:r,workspace:a,children:s})=>{const[l,u]=S.useState(!1),[d,p]=S.useState({}),f=S.useMemo(()=>(r||console.warn("[TemplateProvider] baseUrl was not provided"),a||console.warn("[TemplateProvider] workspace was not provided"),new _d.TemplatingSdk(r,{workspace:a})),[r,a]),m=S.useCallback(async y=>{if(y)try{u(!0);const v=await f.get(y);v&&p(v)}finally{u(!1)}},[f]),g=S.useCallback(y=>p(v=>v?.update?.(y)),[p]),w=S.useCallback(async()=>{if(!d?.id){console.warn("No template loaded to save");return}try{u(!0);const y=await d.save();p(y)}catch(y){console.error("Error saving template:",y)}finally{u(!1)}},[d]);S.useEffect(()=>{e&&m(e)},[e,m]);const D=S.useMemo(()=>({loading:l,template:d,loadTemplate:m,updateTemplate:g,saveTemplate:w}),[l,d,m,g]);return o.jsx(ci.Provider,{value:D,children:s})},no={desktop:{width:1200,height:800,name:"Desktop"},tablet:{width:768,height:1024,name:"Tablet"},mobile:{width:375,height:667,name:"Mobile"}},mg=({canvasSize:e,hasCanvasContent:r,onZoomChange:a,placeholderData:s={}})=>{const{template:l}=di(),[u,d]=S.useState(100),[p,f]=S.useState(""),m=S.useMemo(()=>no[e]||no.desktop,[e]);return S.useEffect(()=>{const g=()=>{const w=window.innerWidth-100,D=window.innerHeight-200,y=w/m.width,v=D/m.height,E=Math.min(y,v,1)*100,C=Math.max(25,Math.min(100,E));d(C),a&&a(C)};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[e,m.width,m.height,a]),S.useEffect(()=>{if(!r){f("");return}try{if(l&&l.render){const g=l.render(s);f(g)}else f("")}catch(g){console.error("Error rendering template:",g),f("")}},[r,s,l]),o.jsx("div",{className:"relative flex flex-1 items-center justify-center overflow-auto bg-[#F5F5F7] p-8",children:o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsxs("div",{className:"relative overflow-hidden rounded-lg border border-[#E8E7EE] bg-white shadow-lg",style:{width:m.width*(u/100),height:m.height*(u/100),maxWidth:"100%",maxHeight:"100%"},children:[e==="mobile"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"absolute inset-x-0 top-0 z-10 flex h-6 items-center justify-center rounded-t-lg bg-black",children:o.jsx("div",{className:"h-1 w-12 rounded-full bg-gray-600"})}),o.jsx("div",{className:"absolute inset-x-0 bottom-1 z-10 flex justify-center",children:o.jsx("div",{className:"h-1 w-16 rounded-full bg-black opacity-30"})})]}),o.jsxs("div",{className:"h-full w-full overflow-hidden",style:{transform:`scale(${u/100})`,transformOrigin:"top left",width:`${100/(u/100)}%`,height:`${100/(u/100)}%`},children:[!r&&o.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-50",children:o.jsxs("div",{className:"p-8 text-center",children:[o.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-lg border-2 border-dashed border-[#E8E7EE] bg-[#F5F5F7]",children:o.jsx("span",{className:"text-2xl text-[#A29FB9]",children:"📄"})}),o.jsx("h3",{className:"mb-2 text-lg font-medium text-[#170F4F]",children:"No content to preview"}),o.jsx("p",{className:"text-sm text-[#A29FB9]",children:"Add components to see the preview"})]})}),o.jsx("div",{className:"h-full min-h-screen bg-white",style:{overflow:"visible",position:"relative",minHeight:"100%"},dangerouslySetInnerHTML:{__html:p}})]})]})})})},ao={desktop:{width:1200,height:800,name:"Desktop",icon:T.FiMonitor},tablet:{width:768,height:1024,name:"Tablet",icon:T.FiTablet},mobile:{width:375,height:667,name:"Mobile",icon:T.FiSmartphone}},fg=({canvasSize:e,onCanvasSizeChange:r,onExitPreview:a,onDownloadHTML:s,onOpenInNewTab:l,showPlayground:u=!1,onTogglePlayground:d})=>{const[p,f]=S.useState(!1),[m,g]=S.useState(100);return o.jsx("div",{className:"border-b border-[#E8E7EE] bg-white px-6 py-3",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("button",{onClick:a,className:"flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-[#170F4F] transition-colors hover:bg-[#F5F5F7]",children:[o.jsx(T.FiX,{className:"h-4 w-4"}),"Exit Preview"]}),o.jsx("div",{className:"h-6 w-px bg-[#E8E7EE]"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(T.FiEye,{className:"h-4 w-4 text-[#00BAC7]"}),o.jsx("span",{className:"text-sm font-medium text-[#170F4F]",children:"Preview Mode"})]})]}),o.jsx("div",{className:"flex items-center gap-2",children:Object.keys(ao).map(w=>{const D=ao[w],y=D.icon,v=e===w;return o.jsxs("button",{onClick:()=>r(w),className:`flex items-center gap-2 px-3 py-1.5 text-sm font-medium transition-all duration-200 ${v?"bg-[#170F4F] text-white":"border border-[#E8E7EE] text-[#170F4F] hover:bg-[#F5F5F7]"} `,title:D.name,children:[o.jsx(y,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:D.name})]},w)})}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("div",{className:"flex items-center overflow-hidden border border-[#E8E7EE]",children:[o.jsx("button",{onClick:()=>g(Math.max(25,m-25)),className:"px-3 py-1.5 text-[#170F4F] transition-colors hover:bg-[#F5F5F7] disabled:cursor-not-allowed disabled:opacity-50",disabled:m<=25,children:"−"}),o.jsxs("div",{className:"min-w-[60px] border-x border-[#E8E7EE] bg-[#F5F5F7] px-3 py-1.5 text-center text-sm font-medium text-[#170F4F]",children:[m,"%"]}),o.jsx("button",{onClick:()=>g(Math.min(200,m+25)),className:"px-3 py-1.5 text-[#170F4F] transition-colors hover:bg-[#F5F5F7] disabled:cursor-not-allowed disabled:opacity-50",disabled:m>=200,children:"+"})]}),o.jsx("button",{onClick:()=>f(!p),className:`p-1.5 transition-all duration-200 ${p?"bg-[#170F4F] text-white":"border border-[#E8E7EE] text-[#170F4F] hover:bg-[#F5F5F7]"} `,title:"Toggle Rulers",children:o.jsx(T.FiEyeOff,{className:"h-4 w-4"})}),o.jsx("div",{className:"h-6 w-px bg-[#E8E7EE]"}),d&&o.jsxs("button",{onClick:d,className:`flex items-center gap-2 px-3 py-1.5 text-sm font-medium transition-all duration-200 ${u?"bg-[#170F4F] text-white":"border border-[#E8E7EE] text-[#170F4F] hover:bg-[#F5F5F7]"} `,title:"Toggle Data Playground",children:[o.jsx(T.FiDatabase,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Data"})]}),o.jsx("div",{className:"h-6 w-px bg-[#E8E7EE]"}),o.jsxs("button",{onClick:s,className:"flex items-center gap-2 border border-[#E8E7EE] px-3 py-1.5 text-sm font-medium text-[#170F4F] transition-colors hover:bg-[#F5F5F7]",title:"Download HTML",children:[o.jsx(T.FiDownload,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Download"})]}),o.jsxs("button",{onClick:l,className:"flex items-center gap-2 bg-[#170F4F] px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-[#00BAC7]",title:"Open in New Tab",children:[o.jsx(T.FiExternalLink,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Open"})]})]})]})})},gg=350,bg=700,xg=450,Dg=({placeholders:e,placeholderSchema:r,onPlaceholdersChange:a,onSchemaChange:s,width:l=xg,onWidthChange:u})=>{const[d,p]=S.useState({type:"text"}),[f,m]=S.useState(!1),[g,w]=S.useState(!1),D=S.useRef(null),y=S.useRef(0),v=S.useRef(0),E=S.useCallback(_=>{w(!0),y.current=_.clientX,v.current=l,_.preventDefault()},[l]),C=S.useCallback(_=>{if(!g)return;const O=y.current-_.clientX,L=Math.min(bg,Math.max(gg,v.current+O));u&&u(L)},[g,u]),x=S.useCallback(()=>{w(!1)},[]);S.useEffect(()=>{if(g)return document.addEventListener("mousemove",C),document.addEventListener("mouseup",x),document.body.style.cursor="col-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",x),document.body.style.cursor="",document.body.style.userSelect=""}},[g,C,x]);const k=(_,O)=>{a({...e,[_]:O})},j=()=>{if(!d.key||!d.label||!d.type)return;const _={key:d.key,label:d.label,type:d.type,value:d.value||N(d.type),options:d.options};s([...r,_]),a({...e,[_.key]:_.value||""}),p({type:"text"}),m(!1)},N=_=>{switch(_){case"text":return"Sample text";case"number":return 0;case"boolean":return!1;case"date":return new Date().toISOString().split("T")[0];case"enum":return"";default:return""}},P=_=>{s(r.filter(L=>L.key!==_));const O={...e};delete O[_],a(O)},R=_=>{const O=e[_.key]??_.value??"";switch(_.type){case"text":return o.jsx("input",{type:"text",value:String(O),onChange:L=>k(_.key,L.target.value),className:"w-full rounded-none border border-[#E8E7EE] bg-white px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:bg-[#F9F8FE] focus:outline-none focus:ring-2 focus:ring-[#170F4F]",placeholder:"Enter text here..."});case"number":return o.jsx("input",{type:"number",value:Number(O),onChange:L=>k(_.key,parseFloat(L.target.value)||0),className:"w-full rounded-none border border-[#E8E7EE] bg-white px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:bg-[#F9F8FE] focus:outline-none focus:ring-2 focus:ring-[#170F4F]",placeholder:"Enter a number..."});case"boolean":return o.jsxs("div",{className:"flex items-center gap-4 rounded-none border border-[#E8E7EE] bg-white p-3",children:[o.jsxs("label",{className:"flex cursor-pointer items-center",children:[o.jsx("input",{type:"radio",name:`${_.key}-bool`,checked:!!O,onChange:()=>k(_.key,!0),className:"h-4 w-4 border-[#E8E7EE] text-[#170F4F] focus:ring-2 focus:ring-[#170F4F]"}),o.jsx("span",{className:"ml-2 text-sm font-medium text-[#170F4F]",children:"Yes"})]}),o.jsxs("label",{className:"flex cursor-pointer items-center",children:[o.jsx("input",{type:"radio",name:`${_.key}-bool`,checked:!O,onChange:()=>k(_.key,!1),className:"h-4 w-4 border-[#E8E7EE] text-[#170F4F] focus:ring-2 focus:ring-[#170F4F]"}),o.jsx("span",{className:"ml-2 text-sm font-medium text-[#170F4F]",children:"No"})]})]});case"enum":return o.jsxs("select",{value:String(O),onChange:L=>k(_.key,L.target.value),className:"w-full rounded-none border border-[#E8E7EE] bg-white px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:bg-[#F9F8FE] focus:outline-none focus:ring-2 focus:ring-[#170F4F]",children:[o.jsx("option",{value:"",children:"Choose an option..."}),_.options?.map((L,W)=>typeof L=="string"?o.jsx("option",{value:L,children:L},W):o.jsx("option",{value:String(L.value),children:L.label},W))]});case"date":return o.jsx("input",{type:"date",value:String(O),onChange:L=>k(_.key,L.target.value),className:"w-full rounded-none border border-[#E8E7EE] bg-white px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:bg-[#F9F8FE] focus:outline-none focus:ring-2 focus:ring-[#170F4F]"});default:return null}};return o.jsxs("div",{className:"relative flex animate-slide-in-right flex-col border-l border-[#E8E7EE] bg-white transition-all duration-300 ease-in-out",style:{width:`${l}px`},children:[o.jsx("div",{ref:D,className:`absolute bottom-0 left-0 top-0 w-1 cursor-col-resize transition-colors duration-200 hover:bg-[#00BAC7] ${g?"bg-[#00BAC7]":"bg-transparent"} group`,onMouseDown:E,children:o.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx(T.FiMoreVertical,{className:"h-3 w-3 text-[#A29FB9]"})})}),o.jsxs("div",{className:"border-b border-[#E8E7EE] bg-gradient-to-r from-[#F9F8FE] to-white p-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"mb-1 text-lg font-semibold text-[#170F4F]",children:"Placeholders"}),o.jsx("p",{className:"text-sm text-[#A29FB9]",children:"Customize the content that appears in your template"})]}),o.jsxs("button",{onClick:()=>m(!0),className:"flex items-center gap-2 rounded-none bg-[#170F4F] px-4 py-2 text-sm font-medium text-white shadow-sm transition-all duration-200 hover:bg-[#00BAC7] hover:shadow-md disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-[#170F4F] disabled:hover:shadow-sm",disabled:f,children:[o.jsx(T.FiPlus,{className:"h-4 w-4"}),"Add"]})]}),f&&o.jsxs("div",{className:"mt-4 animate-fade-in rounded-none border border-[#E8E7EE] bg-white p-4 shadow-sm",children:[o.jsx("h4",{className:"mb-4 text-sm font-semibold text-[#170F4F]",children:"Add New Placeholder"}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-xs font-medium text-[#170F4F]",children:"Field Name"}),o.jsx("input",{type:"text",placeholder:"e.g., Customer Name",value:d.label||"",onChange:_=>{const O=_.target.value,L=O.replace(/[^a-zA-Z0-9\s]/g,"").replace(/\s+/g,"_").replace(/^_+|_+$/g,"");p({...d,label:O,key:L})},className:"w-full rounded-none border border-[#E8E7EE] bg-white px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:bg-[#F9F8FE] focus:outline-none focus:ring-2 focus:ring-[#170F4F]"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-xs font-medium text-[#170F4F]",children:"Data Type"}),o.jsxs("select",{value:d.type||"text",onChange:_=>p({...d,type:_.target.value}),className:"w-full rounded-none border border-[#E8E7EE] bg-white px-3 py-2 text-sm transition-all focus:border-[#170F4F] focus:bg-[#F9F8FE] focus:outline-none focus:ring-2 focus:ring-[#170F4F]",children:[o.jsx("option",{value:"text",children:"Text"}),o.jsx("option",{value:"number",children:"Number"}),o.jsx("option",{value:"boolean",children:"True/False"}),o.jsx("option",{value:"enum",children:"Multiple Choice"}),o.jsx("option",{value:"date",children:"Date"})]})]})]}),o.jsxs("div",{className:"mt-6 flex gap-2 border-t border-[#E8E7EE] pt-4",children:[o.jsx("button",{onClick:j,disabled:!d.key||!d.label,className:"rounded-none bg-[#170F4F] px-4 py-2 text-sm font-medium text-white shadow-sm transition-colors duration-200 hover:bg-[#00BAC7] disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-[#170F4F]",children:"Confirm"}),o.jsx("button",{onClick:()=>m(!1),className:"rounded-none border border-[#E8E7EE] px-4 py-2 text-sm font-medium text-[#A29FB9] transition-colors duration-200 hover:bg-[#F9F8FE] hover:text-[#170F4F]",children:"Cancel"})]})]})]}),o.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:r.length===0?o.jsxs("div",{className:"py-12 text-center text-[#A29FB9]",children:[o.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-none border border-[#E8E7EE] bg-[#F9F8FE]",children:o.jsx(T.FiPlus,{className:"h-8 w-8 text-[#170F4F]"})}),o.jsx("h4",{className:"mb-2 text-lg font-medium text-[#170F4F]",children:"No data fields yet"}),o.jsx("p",{className:"mb-4 text-sm",children:"Add data fields to make your template dynamic"}),o.jsx("button",{onClick:()=>m(!0),className:"text-sm font-medium text-[#170F4F] transition-colors duration-200 hover:text-[#00BAC7]",children:"Add your first field"})]}):o.jsx("div",{className:"space-y-4",children:r.map(_=>o.jsxs("div",{className:"rounded-none border border-[#E8E7EE] bg-white p-4 transition-all duration-200 hover:border-[#170F4F] hover:shadow-sm",children:[o.jsxs("div",{className:"mb-3 flex items-start justify-between",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx("h4",{className:"mb-1 text-sm font-semibold text-[#170F4F]",children:_.label}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"inline-flex items-center rounded-none border border-[#E8E7EE] bg-[#F9F8FE] px-2 py-1 text-xs font-medium text-[#170F4F]",children:_.type==="boolean"?"True/False":_.type==="enum"?"Multiple Choice":_.type.charAt(0).toUpperCase()+_.type.slice(1)}),o.jsx("span",{className:"font-mono text-xs text-[#A29FB9]",children:_.key})]})]}),o.jsx("button",{onClick:()=>P(_.key),className:"rounded-none p-1 text-[#A29FB9] transition-colors duration-200 hover:bg-red-50 hover:text-red-500",title:"Remove field",children:o.jsx(T.FiTrash2,{className:"h-4 w-4"})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"block text-xs font-medium text-[#170F4F]",children:"Current Value:"}),o.jsx("div",{className:"w-full",children:R(_)})]})]},_.key))})})]})};function yg(e){let r=`<!DOCTYPE html>
|
|
61
61
|
<html lang="en">
|
|
62
62
|
<head>
|
|
63
63
|
<meta charset="UTF-8">
|
|
@@ -86,4 +86,4 @@ The range will extend backwards to the start of the first line containing the se
|
|
|
86
86
|
${e}
|
|
87
87
|
</div>
|
|
88
88
|
</body>
|
|
89
|
-
</html>`;r=r.replace(/\s+/g," ").replace(/>\s+</g,"><").trim();const a=new Blob([r],{type:"text/html"}),s=URL.createObjectURL(a),l=document.createElement("a");l.href=s,l.download="bolttech-page.html",document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(s)}const gn={desktop:{width:1200,height:800,name:"Desktop"},tablet:{width:768,height:1024,name:"Tablet"},mobile:{width:375,height:667,name:"Mobile"}},Cg=({isPreviewMode:e,onExitPreview:r,initialPlaceholders:a={},initialPlaceholderSchema:s=[]})=>{const{getHtml:l,device:u,setDevice:d,isEmpty:p}=Sr(),[f,m]=S.useState(!1),[g,w]=S.useState(100),[D,y]=S.useState(!0),[v,E]=S.useState(450),[C,x]=S.useState(a),[k,j]=S.useState(s),N=()=>{m(!0),setTimeout(()=>{r(),m(!1)},300)},P=()=>{const _=l();wg(_)},R=()=>{y(!D)};return e?o.jsxs("div",{className:`fixed inset-0 z-50 bg-[#F5F5F7] ${f?"animate-fade-out":"animate-fade-in"}`,children:[o.jsx("div",{className:f?"animate-slide-up-out":"animate-slide-down",children:o.jsx(bg,{canvasSize:u,onCanvasSizeChange:d,onExitPreview:N,onDownloadHTML:P,onOpenInNewTab:()=>{const _=l();window.open()?.document.write(_)},showPlayground:D,onTogglePlayground:R})}),o.jsxs("div",{className:"flex h-full",children:[o.jsx("div",{className:f?"animate-slide-down-out":"animate-slide-up",style:{flex:1},children:o.jsx(gg,{canvasSize:u,hasCanvasContent:p,onZoomChange:w,placeholderData:C})}),D&&o.jsx(vg,{placeholders:C,placeholderSchema:k,onPlaceholdersChange:x,onSchemaChange:j,width:v,onWidthChange:E})]}),o.jsxs("div",{className:"fixed bottom-4 left-4 z-[60] rounded bg-[#170F4F] px-3 py-2 text-sm text-white shadow-md",children:[gn[u].name," • ",gn[u].width,"×",gn[u].height,"px • ",g.toFixed(3),"%"]})]}):null},Fg=Jt.reduce((e,r)=>(e[r.id]=r.component,e),{}),Eg=({placeholders:e={},placeholderSchema:r=[]})=>{const a=bo();return o.jsxs(H.Editor,{resolver:Fg,onRender:mg,enabled:a.isEditorEnabled,children:[o.jsx(cg,{onPreviewToggle:a.togglePreview,showCodePanel:a.showCodePanel,onCodePanelToggle:a.toggleCodePanel,codePanelChildren:o.jsx(Pf,{onClose:a.closeCodePanel})}),o.jsx(Cg,{isPreviewMode:a.showPreview,onExitPreview:()=>a.togglePreview(),initialPlaceholders:e,initialPlaceholderSchema:r})]})},Sg='@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Arial,Helvetica,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 480px){.container{max-width:480px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1440px){.container{max-width:1440px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-right-0\\.5{right:-.125rem}.-top-0\\.5{top:-.125rem}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.bottom-4{bottom:1rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-1\\/2{left:50%}.left-3{left:.75rem}.left-4{left:1rem}.left-auto{left:auto}.right-0{right:0}.right-3{right:.75rem}.right-auto{right:auto}.top-0{top:0}.top-1\\/2{top:50%}.top-\\[-2px\\]{top:-2px}.top-\\[-3px\\]{top:-3px}.top-full{top:100%}.z-10{z-index:10}.z-50{z-index:50}.z-\\[60\\]{z-index:60}.mx-1\\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mr-1\\.5{margin-right:.375rem}.mr-2\\.5{margin-right:.625rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\\[400px\\]{height:400px}.h-\\[90vh\\]{height:90vh}.h-full{height:100%}.h-px{height:1px}.max-h-\\[42vh\\]{max-height:42vh}.min-h-fit{min-height:-moz-fit-content;min-height:fit-content}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\\.5{width:.375rem}.w-1\\/2{width:50%}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-\\[10\\%\\]{width:10%}.w-\\[20\\%\\]{width:20%}.w-full{width:100%}.w-px{width:1px}.min-w-\\[120px\\]{min-width:120px}.min-w-\\[140px\\]{min-width:140px}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[60px\\]{min-width:60px}.max-w-6xl{max-width:72rem}.max-w-\\[40vw\\]{max-width:40vw}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.animate-fade-in{animation:fadeIn .4s ease-out}.animate-fade-out{animation:fadeOut .3s ease-in}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-slide-down{animation:slideDown .5s ease-out .1s both}.animate-slide-down-out{animation:slideDownOut .3s ease-in both}.animate-slide-in-right{animation:slideInRight .3s ease-out}.animate-slide-up{animation:slideUp .5s ease-out .2s both}.animate-slide-up-out{animation:slideUpOut .3s ease-in both}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-col-resize{cursor:col-resize}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:4px}.rounded-none{border-radius:0}.rounded-sm{border-radius:2px}.rounded-t-lg{border-top-left-radius:8px;border-top-right-radius:8px}.border{border-width:1px}.border-2{border-width:2px}.border-x{border-left-width:1px;border-right-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\\[\\#00BAC7\\]{--tw-border-opacity: 1;border-color:rgb(0 186 199 / var(--tw-border-opacity, 1))}.border-\\[\\#170F4F\\],.border-\\[\\#170f4f\\]{--tw-border-opacity: 1;border-color:rgb(23 15 79 / var(--tw-border-opacity, 1))}.border-\\[\\#30aab3\\]{--tw-border-opacity: 1;border-color:rgb(48 170 179 / var(--tw-border-opacity, 1))}.border-\\[\\#3B82F6\\]{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-\\[\\#D1D5DB\\]{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-\\[\\#E8E7EE\\]{--tw-border-opacity: 1;border-color:rgb(232 231 238 / var(--tw-border-opacity, 1))}.border-\\[\\#dce7fe\\]{--tw-border-opacity: 1;border-color:rgb(220 231 254 / var(--tw-border-opacity, 1))}.border-\\[\\#e8e7ee\\]{--tw-border-opacity: 1;border-color:rgb(232 231 238 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-\\[\\#00BAC7\\]{--tw-bg-opacity: 1;background-color:rgb(0 186 199 / var(--tw-bg-opacity, 1))}.bg-\\[\\#170F4F\\]{--tw-bg-opacity: 1;background-color:rgb(23 15 79 / var(--tw-bg-opacity, 1))}.bg-\\[\\#170F4F\\]\\/10{background-color:#170f4f1a}.bg-\\[\\#170f4f\\]{--tw-bg-opacity: 1;background-color:rgb(23 15 79 / var(--tw-bg-opacity, 1))}.bg-\\[\\#181c24\\]{--tw-bg-opacity: 1;background-color:rgb(24 28 36 / var(--tw-bg-opacity, 1))}.bg-\\[\\#23272f\\]{--tw-bg-opacity: 1;background-color:rgb(35 39 47 / var(--tw-bg-opacity, 1))}.bg-\\[\\#CCF1F4\\]{--tw-bg-opacity: 1;background-color:rgb(204 241 244 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E8E7EE\\]{--tw-bg-opacity: 1;background-color:rgb(232 231 238 / var(--tw-bg-opacity, 1))}.bg-\\[\\#EFF6FF\\]{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F5F5F7\\]{--tw-bg-opacity: 1;background-color:rgb(245 245 247 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F9F8FE\\]{--tw-bg-opacity: 1;background-color:rgb(249 248 254 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F9FAFB\\]{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-50\\/50{background-color:#f9fafb80}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-opacity-40{--tw-bg-opacity: .4}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\\[\\#F9F8FE\\]{--tw-gradient-from: #F9F8FE var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 248 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-100{--tw-gradient-from: #f3f4f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(243 244 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-gray-200{--tw-gradient-to: #e5e7eb var(--tw-gradient-to-position)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0\\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-8{padding-bottom:2rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-3{padding-right:.75rem}.pr-9{padding-right:2.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:2px}.text-\\[\\#00BAC7\\]{--tw-text-opacity: 1;color:rgb(0 186 199 / var(--tw-text-opacity, 1))}.text-\\[\\#170F4F\\],.text-\\[\\#170f4f\\]{--tw-text-opacity: 1;color:rgb(23 15 79 / var(--tw-text-opacity, 1))}.text-\\[\\#3B82F6\\]{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-\\[\\#6B7280\\]{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-\\[\\#A29FB9\\]{--tw-text-opacity: 1;color:rgb(162 159 185 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-800{--tw-text-opacity: 1;color:rgb(107 33 168 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(113 63 18 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow-lg{--tw-shadow: 0 10px 15px rgba(0, 0, 0, .15);--tw-shadow-colored: 0 10px 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px rgba(0, 0, 0, .1);--tw-shadow-colored: 0 4px 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px rgba(0, 0, 0, .05);--tw-shadow-colored: 0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-yellow-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 224 71 / var(--tw-ring-opacity, 1))}.ring-yellow-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 204 21 / var(--tw-ring-opacity, 1))}.ring-opacity-50{--tw-ring-opacity: .5}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.avoid-transition,.avoid-transition *{transition:none!important}#canvas,#canvas *{transition:width .3s ease-in-out,height .3s ease-in-out,max-width .3s ease-in-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes slideDown{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUpOut{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-20px)}}@keyframes slideDownOut{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(20px)}}@keyframes slideInRight{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}@keyframes slideOutRight{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(100%)}}.last\\:mb-0:last-child{margin-bottom:0}.hover\\:border-\\[\\#00BAC7\\]:hover{--tw-border-opacity: 1;border-color:rgb(0 186 199 / var(--tw-border-opacity, 1))}.hover\\:border-\\[\\#170F4F\\]:hover{--tw-border-opacity: 1;border-color:rgb(23 15 79 / var(--tw-border-opacity, 1))}.hover\\:border-\\[\\#170F4F\\]\\/30:hover{border-color:#170f4f4d}.hover\\:border-\\[\\#30aab3\\]:hover{--tw-border-opacity: 1;border-color:rgb(48 170 179 / var(--tw-border-opacity, 1))}.hover\\:border-red-300:hover{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.hover\\:bg-\\[\\#009CA8\\]:hover{--tw-bg-opacity: 1;background-color:rgb(0 156 168 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#00BAC7\\]:hover{--tw-bg-opacity: 1;background-color:rgb(0 186 199 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#170F4F\\]\\/15:hover{background-color:#170f4f26}.hover\\:bg-\\[\\#30aab3\\]:hover{--tw-bg-opacity: 1;background-color:rgb(48 170 179 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#CCF1F4\\]:hover{--tw-bg-opacity: 1;background-color:rgb(204 241 244 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#F5F5F7\\]:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 247 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#F9F8FE\\]:hover{--tw-bg-opacity: 1;background-color:rgb(249 248 254 / var(--tw-bg-opacity, 1))}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\\:text-\\[\\#00BAC7\\]:hover{--tw-text-opacity: 1;color:rgb(0 186 199 / var(--tw-text-opacity, 1))}.hover\\:text-\\[\\#170F4F\\]:hover,.hover\\:text-\\[\\#170f4f\\]:hover{--tw-text-opacity: 1;color:rgb(23 15 79 / var(--tw-text-opacity, 1))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.hover\\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\\:shadow-md:hover{--tw-shadow: 0 4px 6px rgba(0, 0, 0, .1);--tw-shadow-colored: 0 4px 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-sm:hover{--tw-shadow: 0 1px 2px rgba(0, 0, 0, .05);--tw-shadow-colored: 0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:ring-2:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\\:ring-gray-300:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1))}.hover\\:ring-yellow-300:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 224 71 / var(--tw-ring-opacity, 1))}.hover\\:ring-opacity-50:hover{--tw-ring-opacity: .5}.focus\\:border-\\[\\#170F4F\\]:focus{--tw-border-opacity: 1;border-color:rgb(23 15 79 / var(--tw-border-opacity, 1))}.focus\\:bg-\\[\\#F9F8FE\\]:focus{--tw-bg-opacity: 1;background-color:rgb(249 248 254 / var(--tw-bg-opacity, 1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-inset:focus{--tw-ring-inset: inset}.focus\\:ring-\\[\\#170F4F\\]:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(23 15 79 / var(--tw-ring-opacity, 1))}.focus\\:ring-\\[\\#170F4F\\]\\/20:focus{--tw-ring-color: rgb(23 15 79 / .2)}.focus\\:ring-\\[\\#30aab3\\]:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(48 170 179 / var(--tw-ring-opacity, 1))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-gray-50:disabled{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.disabled\\:text-gray-400:disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.disabled\\:text-gray-600:disabled{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:hover\\:bg-\\[\\#170F4F\\]:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(23 15 79 / var(--tw-bg-opacity, 1))}.disabled\\:hover\\:shadow-sm:hover:disabled{--tw-shadow: 0 1px 2px rgba(0, 0, 0, .05);--tw-shadow-colored: 0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group:hover .group-hover\\:text-\\[\\#170F4F\\]{--tw-text-opacity: 1;color:rgb(23 15 79 / var(--tw-text-opacity, 1))}.group:hover .group-hover\\:opacity-100{opacity:1}@media (min-width: 768px){.sm\\:inline{display:inline}.sm\\:hidden{display:none}.sm\\:px-8{padding-left:2rem;padding-right:2rem}}';function xi({templateId:e,placeholders:r={},placeholderSchema:a=[],sdk:s={baseUrl:"",workspace:""},width:l="100%",height:u="100%"}){return o.jsxs(Ld.default.div,{className:"bolttech-template-editor",style:{height:u,width:l},children:[o.jsx("style",{type:"text/css",children:Sg}),o.jsx(fg,{templateId:e,baseUrl:s.baseUrl,workspace:s.workspace,children:o.jsx(Eg,{placeholders:r,placeholderSchema:a})})]})}const bn=({name:e,value:r,path:a,onSelect:s,isSelected:l})=>{const u=typeof r=="object"&&r!==null&&!Array.isArray(r),d=Array.isArray(r),p=()=>r===null?"null":r===void 0?"undefined":typeof r=="string"?`"${r}"`:typeof r=="number"||typeof r=="boolean"?String(r):d?`Array(${r.length})`:u?`Object(${Object.keys(r).length})`:String(r),f=()=>r===null?"null":r===void 0?"undefined":typeof r=="string"?"string":typeof r=="number"?"number":typeof r=="boolean"?"boolean":d?"array":u?"object":typeof r;return o.jsxs("button",{onClick:()=>s(a,r),className:`flex min-w-[120px] flex-col items-center gap-1 rounded-none border border-[#e8e7ee] p-3 transition-all duration-200 ${l?"border-[#30aab3] bg-[#170f4f] text-white":"bg-white text-[#170f4f] hover:border-[#30aab3] hover:bg-gray-50"}`,children:[o.jsx("div",{className:"text-xs font-medium",children:e}),o.jsx("div",{className:`text-xs ${f()==="string"?"text-green-600":f()==="number"?"text-blue-600":f()==="boolean"?"text-purple-600":f()==="null"?"text-gray-500":"text-orange-600"} ${l?"text-white":""}`,children:p()}),o.jsxs("div",{className:`text-xs ${l?"text-gray-300":"text-gray-400"}`,children:["(",f(),")"]})]})},Di=({data:e,onPathSelect:r})=>{const[a,s]=S.useState([]),[l,u]=S.useState(null),[d,p]=S.useState(!1),f=(v,E)=>E.reduce((C,x)=>{if(C!=null){if(x.startsWith("[")&&x.endsWith("]")){const k=parseInt(x.slice(1,-1),10);return C[k]}return C[x]}},v),g=(()=>{const v=[];let E=[],C=e;v.push({path:[],value:e,isRoot:!0});for(const x of a)E=[...E,x],C=f(e,E),C!=null&&typeof C=="object"&&v.push({path:[...E],value:C,isRoot:!1});return v})(),w=(v,E,C)=>{if(typeof C=="object"&&C!==null&&(s(x=>[...x.slice(0,v),E]),r)){const x=[...g[v].path,E];r(x.join("."))}},D=(v,E,C)=>{if(typeof C!="object"||C===null){if(u({path:[...g[v].path,E],value:C}),r){const x=[...g[v].path,E];r(x.join("."))}}else u(null)},y=(v,E)=>{const C=v.value;return v.isRoot?o.jsx("div",{className:"flex min-w-[140px] flex-col gap-2",children:Object.entries(e).map(([x,k])=>o.jsx(bn,{name:x,value:k,path:x,onSelect:(j,N)=>typeof N=="object"&&N!==null?w(0,x,N):D(0,x,N),isSelected:a.length===0},x))},E):Array.isArray(C)?o.jsx("div",{className:"flex min-w-[140px] flex-col gap-2",children:C.map((x,k)=>o.jsx(bn,{name:`[${k}]`,value:x,path:`[${k}]`,onSelect:(j,N)=>typeof N=="object"&&N!==null?w(E,`[${k}]`,N):D(E,`[${k}]`,N),isSelected:!1},k))},E):typeof C=="object"&&C!==null?o.jsx("div",{className:"flex min-w-[140px] flex-col gap-2",children:Object.entries(C).map(([x,k])=>o.jsx(bn,{name:x,value:k,path:x,onSelect:(j,N)=>typeof N=="object"&&N!==null?w(E,x,N):D(E,x,N),isSelected:!1},x))},E):null};return o.jsxs("div",{className:"overflow-x-auto rounded-none border border-[#e8e7ee] bg-white",children:[o.jsx("div",{className:"border-b border-[#e8e7ee] bg-gray-50 px-4 py-2",children:o.jsx("h3",{className:"text-sm font-medium text-[#170f4f]",children:"Data Structure"})}),o.jsxs("div",{className:"flex gap-6 overflow-x-auto p-4",children:[g.map((v,E)=>y(v,E)),l&&o.jsx("div",{className:"flex min-w-[180px] flex-col gap-2",children:o.jsxs("div",{className:"mt-2 rounded-none border border-[#e8e7ee] bg-gray-50 p-3",children:[o.jsx("h4",{className:"mb-1 text-xs font-medium text-gray-600",children:"Selected Value"}),o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx("span",{className:"font-medium",children:"Path:"})," ",l.path.join("."),o.jsx("button",{className:"ml-1 text-gray-400 hover:text-gray-600",onClick:()=>{navigator.clipboard.writeText(l.path.join(".")),p(!0),setTimeout(()=>p(!1),2e3)},title:"Copy path",children:d?o.jsx(T.FiCheck,{size:14}):o.jsx(T.FiCopy,{size:14})})]}),o.jsxs("div",{className:"text-sm",children:[o.jsx("span",{className:"font-medium",children:"Value:"})," ",String(l.value)]}),o.jsxs("div",{className:"text-sm",children:[o.jsx("span",{className:"font-medium",children:"Type:"})," ",typeof l.value]})]})})]})]})},kg=({isOpen:e,onClose:r,onDataImport:a})=>{const[s,l]=S.useState("url"),[u,d]=S.useState(""),[p,f]=S.useState(""),[m,g]=S.useState(""),[w,D]=S.useState(!1),[y,v]=S.useState(""),[E,C]=S.useState(!1),[x,k]=S.useState(null);S.useEffect(()=>{if(e){const L=localStorage.getItem("bolttech_datasource");if(L)try{const W=JSON.parse(L);W&&typeof W=="object"&&W.data&&(k(W.data),W.url&&f(W.url))}catch{}}},[e]);const j=L=>{const W=L.target.files?.[0];if(!W)return;if(!W.name.endsWith(".json")){v("Please select a JSON file");return}const ue=new FileReader;ue.onload=pe=>{try{const ee=pe.target?.result,Re=JSON.parse(ee);d(ee),k(Re),v("")}catch{v("Invalid JSON file"),d(""),k(null)}},ue.readAsText(W)},N=async()=>{if(!p.trim()){v("Please enter a URL");return}D(!0),v("");try{const L=await fetch(p);if(!L.ok)throw new Error("Failed to fetch data");const W=await L.json();g(JSON.stringify(W,null,2)),k(W),v("")}catch{v("Failed to fetch data from URL")}finally{D(!1)}},P=L=>{g(L),v("");try{if(L.trim()){const W=JSON.parse(L);k(W)}else k(null)}catch{v("Invalid JSON format"),k(null)}},R=()=>{let L;try{switch(s){case"file":if(!u){v("Please select a file");return}L=JSON.parse(u);break;case"url":if(!m){v("Please fetch data from URL first");return}L=JSON.parse(m);break;case"code":if(!m.trim()){v("Please enter JSON data");return}L=JSON.parse(m);break}s==="url"?localStorage.setItem("bolttech_datasource",JSON.stringify({from:s,data:L,url:p})):localStorage.setItem("bolttech_datasource",JSON.stringify({from:s,data:L})),a(L),r()}catch{v("Invalid JSON data")}},_=()=>{navigator.clipboard.writeText(m),C(!0),setTimeout(()=>C(!1),2e3)},O=()=>{try{return m.trim()?(JSON.parse(m),!0):!1}catch{return!1}};return e?o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:L=>{L.target===L.currentTarget&&r()},children:o.jsxs("div",{className:"flex h-[90vh] w-full max-w-6xl flex-col rounded-none bg-white shadow-xl",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-[#e8e7ee] bg-white p-6",children:[o.jsx("h2",{className:"text-lg font-bold tracking-wide text-[#170f4f]",children:"DataSource"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>{localStorage.removeItem("bolttech_datasource"),k(null),d(""),f(""),g("")},className:"rounded-none p-2 text-gray-400 transition-colors duration-200 hover:bg-red-50 hover:text-red-600",title:"Clean Data",children:"🧹"}),o.jsx("button",{onClick:r,className:"rounded-none p-2 text-gray-400 transition-colors duration-200 hover:bg-gray-50 hover:text-gray-600",children:o.jsx(T.FiX,{size:18})})]})]}),o.jsx("div",{className:"max-h-[42vh] overflow-y-auto border-b border-[#e8e7ee] px-6 py-4",children:o.jsx(Di,{data:{root:x||{}}})}),o.jsxs("div",{className:"flex border-b border-[#e8e7ee]",children:[o.jsxs("button",{onClick:()=>l("url"),className:`flex items-center gap-2 px-6 py-3 text-sm font-medium transition-colors duration-200 ${s==="url"?"border-b-2 border-[#30aab3] text-[#170f4f]":"text-gray-500 hover:text-[#170f4f]"}`,children:[o.jsx(T.FiLink,{size:16}),"URL"]}),o.jsxs("button",{onClick:()=>l("file"),className:`flex items-center gap-2 px-6 py-3 text-sm font-medium transition-colors duration-200 ${s==="file"?"border-b-2 border-[#30aab3] text-[#170f4f]":"text-gray-500 hover:text-[#170f4f]"}`,children:[o.jsx(T.FiUpload,{size:16}),"Import File"]}),o.jsxs("button",{onClick:()=>l("code"),className:`flex items-center gap-2 px-6 py-3 text-sm font-medium transition-colors duration-200 ${s==="code"?"border-b-2 border-[#30aab3] text-[#170f4f]":"text-gray-500 hover:text-[#170f4f]"}`,children:[o.jsx(T.FiCode,{size:16}),"Custom Code"]})]}),o.jsxs("div",{className:"flex-1 overflow-hidden p-6",children:[s==="code"&&o.jsxs("div",{className:"flex h-full flex-col",children:[o.jsx("div",{className:"mb-4",children:o.jsx("p",{className:"mb-1 text-sm text-gray-500",children:"Enter your JSON data below"})}),o.jsxs("div",{className:"flex-1 overflow-hidden rounded-none bg-gray-900",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-gray-700 bg-gray-800 px-4 py-2",children:[o.jsx("span",{className:"text-sm font-medium text-gray-300",children:"JSON Editor"}),m&&o.jsxs("button",{onClick:_,className:"flex items-center gap-1 text-xs text-gray-400 hover:text-gray-300",children:[E?o.jsx(T.FiCheck,{size:12}):o.jsx(T.FiCopy,{size:12}),E?"Copied!":"Copy"]})]}),o.jsx("div",{className:"h-full overflow-auto pb-8",children:o.jsx("textarea",{value:m,onChange:L=>P(L.target.value),placeholder:'{"name": "John", "age": 30, "city": "New York"}',className:"h-full w-full resize-none border-none bg-transparent p-4 font-mono text-sm text-gray-300 outline-none"})})]})]}),s==="url"&&o.jsx("div",{className:"bte:flex bte:h-full bte:flex-col",children:o.jsxs("div",{className:"bte:mb-4",children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"JSON URL"}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{type:"url",value:p,onChange:L=>f(L.target.value),placeholder:"https://api.example.com/data.json",className:"flex-1 rounded-none border border-[#e8e7ee] px-3 py-2 focus:outline-none focus:ring-2 focus:ring-[#30aab3]"}),o.jsx("button",{onClick:N,disabled:w||!p.trim(),className:"rounded-none bg-[#170f4f] px-4 py-2 text-white transition-colors duration-200 hover:bg-[#30aab3] disabled:cursor-not-allowed disabled:opacity-50",children:w?"Loading...":"Fetch"})]})]})}),s==="file"&&o.jsxs("div",{className:"bte:flex bte:h-full bte:flex-col",children:[o.jsxs("div",{className:"bte:mb-4",children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Select JSON File"}),o.jsxs("div",{className:"rounded-none border-2 border-dashed border-[#e8e7ee] p-8 text-center transition-colors duration-200 hover:border-[#30aab3]",children:[o.jsx("input",{type:"file",accept:".json",onChange:j,className:"hidden",id:"file-upload"}),o.jsxs("label",{htmlFor:"file-upload",className:"flex cursor-pointer flex-col items-center",children:[o.jsx(T.FiUpload,{size:48,className:"mb-4 text-gray-400"}),o.jsx(T.FiUpload,{size:48,className:"mb-4 text-gray-400"}),o.jsx("span",{className:"text-lg font-medium text-gray-700",children:"Click to upload JSON file"}),o.jsx("span",{className:"mt-1 text-sm text-gray-500",children:"or drag and drop"})]})]})]}),u&&o.jsxs("div",{className:"flex-1 overflow-hidden rounded-none bg-gray-900",children:[o.jsx("div",{className:"flex items-center justify-between border-b border-gray-700 bg-gray-800 px-4 py-2",children:o.jsx("span",{className:"text-sm font-medium text-gray-300",children:"File Preview"})}),o.jsx("div",{className:"h-32 overflow-auto",children:o.jsx("pre",{className:"whitespace-pre-wrap p-4 font-mono text-sm text-gray-300",children:o.jsx("code",{children:u})})})]})]}),y&&o.jsx("div",{className:"mt-4 rounded-none border border-red-200 bg-red-50 p-3",children:o.jsx("p",{className:"text-sm text-red-600",children:y})})]}),o.jsxs("div",{className:"flex items-center justify-end gap-3 border-t border-[#e8e7ee] p-6",children:[o.jsx("button",{onClick:r,className:"rounded-none bg-gray-100 px-4 py-2 text-gray-700 transition-colors duration-200 hover:bg-gray-200",children:"Cancel"}),o.jsx("button",{onClick:R,disabled:s==="file"&&!u||s==="url"&&!m||s==="code"&&!m||!O(),className:"rounded-none bg-[#170f4f] px-4 py-2 text-white transition-colors duration-200 hover:bg-[#30aab3] disabled:cursor-not-allowed disabled:opacity-50",children:"Import Data"})]})]})}):null},Ag=Object.freeze({__proto__:null,DataSourceModal:kg,HorizontalDataView:Di});exports.TemplateEditor=xi;exports.default=xi;
|
|
89
|
+
</html>`;r=r.replace(/\s+/g," ").replace(/>\s+</g,"><").trim();const a=new Blob([r],{type:"text/html"}),s=URL.createObjectURL(a),l=document.createElement("a");l.href=s,l.download="bolttech-page.html",document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(s)}const fn={desktop:{width:1200,height:800,name:"Desktop"},tablet:{width:768,height:1024,name:"Tablet"},mobile:{width:375,height:667,name:"Mobile"}},vg=({isPreviewMode:e,onExitPreview:r,initialPlaceholders:a={},initialPlaceholderSchema:s=[]})=>{const{getHtml:l,device:u,setDevice:d,isEmpty:p}=Sr(),[f,m]=S.useState(!1),[g,w]=S.useState(100),[D,y]=S.useState(!0),[v,E]=S.useState(450),[C,x]=S.useState(a),[k,j]=S.useState(s),N=()=>{m(!0),setTimeout(()=>{r(),m(!1)},300)},P=()=>{const _=l();yg(_)},R=()=>{y(!D)};return e?o.jsxs("div",{className:`fixed inset-0 z-50 bg-[#F5F5F7] ${f?"animate-fade-out":"animate-fade-in"}`,children:[o.jsx("div",{className:f?"animate-slide-up-out":"animate-slide-down",children:o.jsx(fg,{canvasSize:u,onCanvasSizeChange:d,onExitPreview:N,onDownloadHTML:P,onOpenInNewTab:()=>{const _=l();window.open()?.document.write(_)},showPlayground:D,onTogglePlayground:R})}),o.jsxs("div",{className:"flex h-full",children:[o.jsx("div",{className:f?"animate-slide-down-out":"animate-slide-up",style:{flex:1},children:o.jsx(mg,{canvasSize:u,hasCanvasContent:p,onZoomChange:w,placeholderData:C})}),D&&o.jsx(Dg,{placeholders:C,placeholderSchema:k,onPlaceholdersChange:x,onSchemaChange:j,width:v,onWidthChange:E})]}),o.jsxs("div",{className:"fixed bottom-4 left-4 z-[60] rounded bg-[#170F4F] px-3 py-2 text-sm text-white shadow-md",children:[fn[u].name," • ",fn[u].width,"×",fn[u].height,"px • ",g.toFixed(3),"%"]})]}):null},wg=Jt.reduce((e,r)=>(e[r.id]=r.component,e),{}),Cg=({placeholders:e={},placeholderSchema:r=[]})=>{const a=fo();return o.jsxs(H.Editor,{resolver:wg,onRender:pg,enabled:a.isEditorEnabled,children:[o.jsx(lg,{onPreviewToggle:a.togglePreview,showCodePanel:a.showCodePanel,onCodePanelToggle:a.toggleCodePanel,codePanelChildren:o.jsx(Tf,{onClose:a.closeCodePanel})}),o.jsx(vg,{isPreviewMode:a.showPreview,onExitPreview:()=>a.togglePreview(),initialPlaceholders:e,initialPlaceholderSchema:r})]})},Fg='@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Arial,Helvetica,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 480px){.container{max-width:480px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1440px){.container{max-width:1440px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-right-0\\.5{right:-.125rem}.-top-0\\.5{top:-.125rem}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.bottom-4{bottom:1rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-1\\/2{left:50%}.left-3{left:.75rem}.left-4{left:1rem}.left-auto{left:auto}.right-0{right:0}.right-3{right:.75rem}.right-auto{right:auto}.top-0{top:0}.top-1\\/2{top:50%}.top-\\[-2px\\]{top:-2px}.top-\\[-3px\\]{top:-3px}.top-full{top:100%}.z-10{z-index:10}.z-50{z-index:50}.z-\\[60\\]{z-index:60}.mx-1\\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mr-1\\.5{margin-right:.375rem}.mr-2\\.5{margin-right:.625rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\\[400px\\]{height:400px}.h-\\[90vh\\]{height:90vh}.h-full{height:100%}.h-px{height:1px}.max-h-\\[42vh\\]{max-height:42vh}.min-h-fit{min-height:-moz-fit-content;min-height:fit-content}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\\.5{width:.375rem}.w-1\\/2{width:50%}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-\\[10\\%\\]{width:10%}.w-\\[20\\%\\]{width:20%}.w-full{width:100%}.w-px{width:1px}.min-w-\\[120px\\]{min-width:120px}.min-w-\\[140px\\]{min-width:140px}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[60px\\]{min-width:60px}.max-w-6xl{max-width:72rem}.max-w-\\[40vw\\]{max-width:40vw}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.animate-fade-in{animation:fadeIn .4s ease-out}.animate-fade-out{animation:fadeOut .3s ease-in}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-slide-down{animation:slideDown .5s ease-out .1s both}.animate-slide-down-out{animation:slideDownOut .3s ease-in both}.animate-slide-in-right{animation:slideInRight .3s ease-out}.animate-slide-up{animation:slideUp .5s ease-out .2s both}.animate-slide-up-out{animation:slideUpOut .3s ease-in both}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-col-resize{cursor:col-resize}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:4px}.rounded-none{border-radius:0}.rounded-sm{border-radius:2px}.rounded-t-lg{border-top-left-radius:8px;border-top-right-radius:8px}.border{border-width:1px}.border-2{border-width:2px}.border-x{border-left-width:1px;border-right-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\\[\\#00BAC7\\]{--tw-border-opacity: 1;border-color:rgb(0 186 199 / var(--tw-border-opacity, 1))}.border-\\[\\#170F4F\\],.border-\\[\\#170f4f\\]{--tw-border-opacity: 1;border-color:rgb(23 15 79 / var(--tw-border-opacity, 1))}.border-\\[\\#30aab3\\]{--tw-border-opacity: 1;border-color:rgb(48 170 179 / var(--tw-border-opacity, 1))}.border-\\[\\#3B82F6\\]{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-\\[\\#D1D5DB\\]{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-\\[\\#E8E7EE\\]{--tw-border-opacity: 1;border-color:rgb(232 231 238 / var(--tw-border-opacity, 1))}.border-\\[\\#dce7fe\\]{--tw-border-opacity: 1;border-color:rgb(220 231 254 / var(--tw-border-opacity, 1))}.border-\\[\\#e8e7ee\\]{--tw-border-opacity: 1;border-color:rgb(232 231 238 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-\\[\\#00BAC7\\]{--tw-bg-opacity: 1;background-color:rgb(0 186 199 / var(--tw-bg-opacity, 1))}.bg-\\[\\#170F4F\\]{--tw-bg-opacity: 1;background-color:rgb(23 15 79 / var(--tw-bg-opacity, 1))}.bg-\\[\\#170F4F\\]\\/10{background-color:#170f4f1a}.bg-\\[\\#170f4f\\]{--tw-bg-opacity: 1;background-color:rgb(23 15 79 / var(--tw-bg-opacity, 1))}.bg-\\[\\#181c24\\]{--tw-bg-opacity: 1;background-color:rgb(24 28 36 / var(--tw-bg-opacity, 1))}.bg-\\[\\#23272f\\]{--tw-bg-opacity: 1;background-color:rgb(35 39 47 / var(--tw-bg-opacity, 1))}.bg-\\[\\#CCF1F4\\]{--tw-bg-opacity: 1;background-color:rgb(204 241 244 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E8E7EE\\]{--tw-bg-opacity: 1;background-color:rgb(232 231 238 / var(--tw-bg-opacity, 1))}.bg-\\[\\#EFF6FF\\]{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F5F5F7\\]{--tw-bg-opacity: 1;background-color:rgb(245 245 247 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F9F8FE\\]{--tw-bg-opacity: 1;background-color:rgb(249 248 254 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F9FAFB\\]{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-50\\/50{background-color:#f9fafb80}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-opacity-40{--tw-bg-opacity: .4}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\\[\\#F9F8FE\\]{--tw-gradient-from: #F9F8FE var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 248 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-100{--tw-gradient-from: #f3f4f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(243 244 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-gray-200{--tw-gradient-to: #e5e7eb var(--tw-gradient-to-position)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0\\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-8{padding-bottom:2rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-3{padding-right:.75rem}.pr-9{padding-right:2.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:2px}.text-\\[\\#00BAC7\\]{--tw-text-opacity: 1;color:rgb(0 186 199 / var(--tw-text-opacity, 1))}.text-\\[\\#170F4F\\],.text-\\[\\#170f4f\\]{--tw-text-opacity: 1;color:rgb(23 15 79 / var(--tw-text-opacity, 1))}.text-\\[\\#3B82F6\\]{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-\\[\\#6B7280\\]{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-\\[\\#A29FB9\\]{--tw-text-opacity: 1;color:rgb(162 159 185 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-800{--tw-text-opacity: 1;color:rgb(107 33 168 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(113 63 18 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow-lg{--tw-shadow: 0 10px 15px rgba(0, 0, 0, .15);--tw-shadow-colored: 0 10px 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px rgba(0, 0, 0, .1);--tw-shadow-colored: 0 4px 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px rgba(0, 0, 0, .05);--tw-shadow-colored: 0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-yellow-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 224 71 / var(--tw-ring-opacity, 1))}.ring-yellow-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 204 21 / var(--tw-ring-opacity, 1))}.ring-opacity-50{--tw-ring-opacity: .5}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.avoid-transition,.avoid-transition *{transition:none!important}#canvas,#canvas *{transition:width .3s ease-in-out,height .3s ease-in-out,max-width .3s ease-in-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes slideDown{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUpOut{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-20px)}}@keyframes slideDownOut{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(20px)}}@keyframes slideInRight{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}@keyframes slideOutRight{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(100%)}}.last\\:mb-0:last-child{margin-bottom:0}.hover\\:border-\\[\\#00BAC7\\]:hover{--tw-border-opacity: 1;border-color:rgb(0 186 199 / var(--tw-border-opacity, 1))}.hover\\:border-\\[\\#170F4F\\]:hover{--tw-border-opacity: 1;border-color:rgb(23 15 79 / var(--tw-border-opacity, 1))}.hover\\:border-\\[\\#170F4F\\]\\/30:hover{border-color:#170f4f4d}.hover\\:border-\\[\\#30aab3\\]:hover{--tw-border-opacity: 1;border-color:rgb(48 170 179 / var(--tw-border-opacity, 1))}.hover\\:border-red-300:hover{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.hover\\:bg-\\[\\#009CA8\\]:hover{--tw-bg-opacity: 1;background-color:rgb(0 156 168 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#00BAC7\\]:hover{--tw-bg-opacity: 1;background-color:rgb(0 186 199 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#170F4F\\]\\/15:hover{background-color:#170f4f26}.hover\\:bg-\\[\\#30aab3\\]:hover{--tw-bg-opacity: 1;background-color:rgb(48 170 179 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#CCF1F4\\]:hover{--tw-bg-opacity: 1;background-color:rgb(204 241 244 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#F5F5F7\\]:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 247 / var(--tw-bg-opacity, 1))}.hover\\:bg-\\[\\#F9F8FE\\]:hover{--tw-bg-opacity: 1;background-color:rgb(249 248 254 / var(--tw-bg-opacity, 1))}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\\:text-\\[\\#00BAC7\\]:hover{--tw-text-opacity: 1;color:rgb(0 186 199 / var(--tw-text-opacity, 1))}.hover\\:text-\\[\\#170F4F\\]:hover,.hover\\:text-\\[\\#170f4f\\]:hover{--tw-text-opacity: 1;color:rgb(23 15 79 / var(--tw-text-opacity, 1))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.hover\\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\\:shadow-md:hover{--tw-shadow: 0 4px 6px rgba(0, 0, 0, .1);--tw-shadow-colored: 0 4px 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-sm:hover{--tw-shadow: 0 1px 2px rgba(0, 0, 0, .05);--tw-shadow-colored: 0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:ring-2:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\\:ring-gray-300:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1))}.hover\\:ring-yellow-300:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 224 71 / var(--tw-ring-opacity, 1))}.hover\\:ring-opacity-50:hover{--tw-ring-opacity: .5}.focus\\:border-\\[\\#170F4F\\]:focus{--tw-border-opacity: 1;border-color:rgb(23 15 79 / var(--tw-border-opacity, 1))}.focus\\:bg-\\[\\#F9F8FE\\]:focus{--tw-bg-opacity: 1;background-color:rgb(249 248 254 / var(--tw-bg-opacity, 1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-inset:focus{--tw-ring-inset: inset}.focus\\:ring-\\[\\#170F4F\\]:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(23 15 79 / var(--tw-ring-opacity, 1))}.focus\\:ring-\\[\\#170F4F\\]\\/20:focus{--tw-ring-color: rgb(23 15 79 / .2)}.focus\\:ring-\\[\\#30aab3\\]:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(48 170 179 / var(--tw-ring-opacity, 1))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-gray-50:disabled{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.disabled\\:text-gray-400:disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.disabled\\:text-gray-600:disabled{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:hover\\:bg-\\[\\#170F4F\\]:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(23 15 79 / var(--tw-bg-opacity, 1))}.disabled\\:hover\\:shadow-sm:hover:disabled{--tw-shadow: 0 1px 2px rgba(0, 0, 0, .05);--tw-shadow-colored: 0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group:hover .group-hover\\:text-\\[\\#170F4F\\]{--tw-text-opacity: 1;color:rgb(23 15 79 / var(--tw-text-opacity, 1))}.group:hover .group-hover\\:opacity-100{opacity:1}@media (min-width: 768px){.sm\\:inline{display:inline}.sm\\:hidden{display:none}.sm\\:px-8{padding-left:2rem;padding-right:2rem}}';function bi({templateId:e,placeholders:r={},placeholderSchema:a=[],sdk:s={baseUrl:"",workspace:""},width:l="100%",height:u="100%"}){return o.jsxs(Td.default.div,{className:"bolttech-template-editor",style:{height:u,width:l},children:[o.jsx("style",{type:"text/css",children:Fg}),o.jsx(hg,{templateId:e,baseUrl:s.baseUrl,workspace:s.workspace,children:o.jsx(Cg,{placeholders:r,placeholderSchema:a})})]})}const gn=({name:e,value:r,path:a,onSelect:s,isSelected:l})=>{const u=typeof r=="object"&&r!==null&&!Array.isArray(r),d=Array.isArray(r),p=()=>r===null?"null":r===void 0?"undefined":typeof r=="string"?`"${r}"`:typeof r=="number"||typeof r=="boolean"?String(r):d?`Array(${r.length})`:u?`Object(${Object.keys(r).length})`:String(r),f=()=>r===null?"null":r===void 0?"undefined":typeof r=="string"?"string":typeof r=="number"?"number":typeof r=="boolean"?"boolean":d?"array":u?"object":typeof r;return o.jsxs("button",{onClick:()=>s(a,r),className:`flex min-w-[120px] flex-col items-center gap-1 rounded-none border border-[#e8e7ee] p-3 transition-all duration-200 ${l?"border-[#30aab3] bg-[#170f4f] text-white":"bg-white text-[#170f4f] hover:border-[#30aab3] hover:bg-gray-50"}`,children:[o.jsx("div",{className:"text-xs font-medium",children:e}),o.jsx("div",{className:`text-xs ${f()==="string"?"text-green-600":f()==="number"?"text-blue-600":f()==="boolean"?"text-purple-600":f()==="null"?"text-gray-500":"text-orange-600"} ${l?"text-white":""}`,children:p()}),o.jsxs("div",{className:`text-xs ${l?"text-gray-300":"text-gray-400"}`,children:["(",f(),")"]})]})},xi=({data:e,onPathSelect:r})=>{const[a,s]=S.useState([]),[l,u]=S.useState(null),[d,p]=S.useState(!1),f=(v,E)=>E.reduce((C,x)=>{if(C!=null){if(x.startsWith("[")&&x.endsWith("]")){const k=parseInt(x.slice(1,-1),10);return C[k]}return C[x]}},v),g=(()=>{const v=[];let E=[],C=e;v.push({path:[],value:e,isRoot:!0});for(const x of a)E=[...E,x],C=f(e,E),C!=null&&typeof C=="object"&&v.push({path:[...E],value:C,isRoot:!1});return v})(),w=(v,E,C)=>{if(typeof C=="object"&&C!==null&&(s(x=>[...x.slice(0,v),E]),r)){const x=[...g[v].path,E];r(x.join("."))}},D=(v,E,C)=>{if(typeof C!="object"||C===null){if(u({path:[...g[v].path,E],value:C}),r){const x=[...g[v].path,E];r(x.join("."))}}else u(null)},y=(v,E)=>{const C=v.value;return v.isRoot?o.jsx("div",{className:"flex min-w-[140px] flex-col gap-2",children:Object.entries(e).map(([x,k])=>o.jsx(gn,{name:x,value:k,path:x,onSelect:(j,N)=>typeof N=="object"&&N!==null?w(0,x,N):D(0,x,N),isSelected:a.length===0},x))},E):Array.isArray(C)?o.jsx("div",{className:"flex min-w-[140px] flex-col gap-2",children:C.map((x,k)=>o.jsx(gn,{name:`[${k}]`,value:x,path:`[${k}]`,onSelect:(j,N)=>typeof N=="object"&&N!==null?w(E,`[${k}]`,N):D(E,`[${k}]`,N),isSelected:!1},k))},E):typeof C=="object"&&C!==null?o.jsx("div",{className:"flex min-w-[140px] flex-col gap-2",children:Object.entries(C).map(([x,k])=>o.jsx(gn,{name:x,value:k,path:x,onSelect:(j,N)=>typeof N=="object"&&N!==null?w(E,x,N):D(E,x,N),isSelected:!1},x))},E):null};return o.jsxs("div",{className:"overflow-x-auto rounded-none border border-[#e8e7ee] bg-white",children:[o.jsx("div",{className:"border-b border-[#e8e7ee] bg-gray-50 px-4 py-2",children:o.jsx("h3",{className:"text-sm font-medium text-[#170f4f]",children:"Data Structure"})}),o.jsxs("div",{className:"flex gap-6 overflow-x-auto p-4",children:[g.map((v,E)=>y(v,E)),l&&o.jsx("div",{className:"flex min-w-[180px] flex-col gap-2",children:o.jsxs("div",{className:"mt-2 rounded-none border border-[#e8e7ee] bg-gray-50 p-3",children:[o.jsx("h4",{className:"mb-1 text-xs font-medium text-gray-600",children:"Selected Value"}),o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx("span",{className:"font-medium",children:"Path:"})," ",l.path.join("."),o.jsx("button",{className:"ml-1 text-gray-400 hover:text-gray-600",onClick:()=>{navigator.clipboard.writeText(l.path.join(".")),p(!0),setTimeout(()=>p(!1),2e3)},title:"Copy path",children:d?o.jsx(T.FiCheck,{size:14}):o.jsx(T.FiCopy,{size:14})})]}),o.jsxs("div",{className:"text-sm",children:[o.jsx("span",{className:"font-medium",children:"Value:"})," ",String(l.value)]}),o.jsxs("div",{className:"text-sm",children:[o.jsx("span",{className:"font-medium",children:"Type:"})," ",typeof l.value]})]})})]})]})},Eg=({isOpen:e,onClose:r,onDataImport:a})=>{const[s,l]=S.useState("url"),[u,d]=S.useState(""),[p,f]=S.useState(""),[m,g]=S.useState(""),[w,D]=S.useState(!1),[y,v]=S.useState(""),[E,C]=S.useState(!1),[x,k]=S.useState(null);S.useEffect(()=>{if(e){const L=localStorage.getItem("bolttech_datasource");if(L)try{const W=JSON.parse(L);W&&typeof W=="object"&&W.data&&(k(W.data),W.url&&f(W.url))}catch{}}},[e]);const j=L=>{const W=L.target.files?.[0];if(!W)return;if(!W.name.endsWith(".json")){v("Please select a JSON file");return}const ue=new FileReader;ue.onload=pe=>{try{const ee=pe.target?.result,Re=JSON.parse(ee);d(ee),k(Re),v("")}catch{v("Invalid JSON file"),d(""),k(null)}},ue.readAsText(W)},N=async()=>{if(!p.trim()){v("Please enter a URL");return}D(!0),v("");try{const L=await fetch(p);if(!L.ok)throw new Error("Failed to fetch data");const W=await L.json();g(JSON.stringify(W,null,2)),k(W),v("")}catch{v("Failed to fetch data from URL")}finally{D(!1)}},P=L=>{g(L),v("");try{if(L.trim()){const W=JSON.parse(L);k(W)}else k(null)}catch{v("Invalid JSON format"),k(null)}},R=()=>{let L;try{switch(s){case"file":if(!u){v("Please select a file");return}L=JSON.parse(u);break;case"url":if(!m){v("Please fetch data from URL first");return}L=JSON.parse(m);break;case"code":if(!m.trim()){v("Please enter JSON data");return}L=JSON.parse(m);break}s==="url"?localStorage.setItem("bolttech_datasource",JSON.stringify({from:s,data:L,url:p})):localStorage.setItem("bolttech_datasource",JSON.stringify({from:s,data:L})),a(L),r()}catch{v("Invalid JSON data")}},_=()=>{navigator.clipboard.writeText(m),C(!0),setTimeout(()=>C(!1),2e3)},O=()=>{try{return m.trim()?(JSON.parse(m),!0):!1}catch{return!1}};return e?o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:L=>{L.target===L.currentTarget&&r()},children:o.jsxs("div",{className:"flex h-[90vh] w-full max-w-6xl flex-col rounded-none bg-white shadow-xl",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-[#e8e7ee] bg-white p-6",children:[o.jsx("h2",{className:"text-lg font-bold tracking-wide text-[#170f4f]",children:"DataSource"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>{localStorage.removeItem("bolttech_datasource"),k(null),d(""),f(""),g("")},className:"rounded-none p-2 text-gray-400 transition-colors duration-200 hover:bg-red-50 hover:text-red-600",title:"Clean Data",children:"🧹"}),o.jsx("button",{onClick:r,className:"rounded-none p-2 text-gray-400 transition-colors duration-200 hover:bg-gray-50 hover:text-gray-600",children:o.jsx(T.FiX,{size:18})})]})]}),o.jsx("div",{className:"max-h-[42vh] overflow-y-auto border-b border-[#e8e7ee] px-6 py-4",children:o.jsx(xi,{data:{root:x||{}}})}),o.jsxs("div",{className:"flex border-b border-[#e8e7ee]",children:[o.jsxs("button",{onClick:()=>l("url"),className:`flex items-center gap-2 px-6 py-3 text-sm font-medium transition-colors duration-200 ${s==="url"?"border-b-2 border-[#30aab3] text-[#170f4f]":"text-gray-500 hover:text-[#170f4f]"}`,children:[o.jsx(T.FiLink,{size:16}),"URL"]}),o.jsxs("button",{onClick:()=>l("file"),className:`flex items-center gap-2 px-6 py-3 text-sm font-medium transition-colors duration-200 ${s==="file"?"border-b-2 border-[#30aab3] text-[#170f4f]":"text-gray-500 hover:text-[#170f4f]"}`,children:[o.jsx(T.FiUpload,{size:16}),"Import File"]}),o.jsxs("button",{onClick:()=>l("code"),className:`flex items-center gap-2 px-6 py-3 text-sm font-medium transition-colors duration-200 ${s==="code"?"border-b-2 border-[#30aab3] text-[#170f4f]":"text-gray-500 hover:text-[#170f4f]"}`,children:[o.jsx(T.FiCode,{size:16}),"Custom Code"]})]}),o.jsxs("div",{className:"flex-1 overflow-hidden p-6",children:[s==="code"&&o.jsxs("div",{className:"flex h-full flex-col",children:[o.jsx("div",{className:"mb-4",children:o.jsx("p",{className:"mb-1 text-sm text-gray-500",children:"Enter your JSON data below"})}),o.jsxs("div",{className:"flex-1 overflow-hidden rounded-none bg-gray-900",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-gray-700 bg-gray-800 px-4 py-2",children:[o.jsx("span",{className:"text-sm font-medium text-gray-300",children:"JSON Editor"}),m&&o.jsxs("button",{onClick:_,className:"flex items-center gap-1 text-xs text-gray-400 hover:text-gray-300",children:[E?o.jsx(T.FiCheck,{size:12}):o.jsx(T.FiCopy,{size:12}),E?"Copied!":"Copy"]})]}),o.jsx("div",{className:"h-full overflow-auto pb-8",children:o.jsx("textarea",{value:m,onChange:L=>P(L.target.value),placeholder:'{"name": "John", "age": 30, "city": "New York"}',className:"h-full w-full resize-none border-none bg-transparent p-4 font-mono text-sm text-gray-300 outline-none"})})]})]}),s==="url"&&o.jsx("div",{className:"bte:flex bte:h-full bte:flex-col",children:o.jsxs("div",{className:"bte:mb-4",children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"JSON URL"}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{type:"url",value:p,onChange:L=>f(L.target.value),placeholder:"https://api.example.com/data.json",className:"flex-1 rounded-none border border-[#e8e7ee] px-3 py-2 focus:outline-none focus:ring-2 focus:ring-[#30aab3]"}),o.jsx("button",{onClick:N,disabled:w||!p.trim(),className:"rounded-none bg-[#170f4f] px-4 py-2 text-white transition-colors duration-200 hover:bg-[#30aab3] disabled:cursor-not-allowed disabled:opacity-50",children:w?"Loading...":"Fetch"})]})]})}),s==="file"&&o.jsxs("div",{className:"bte:flex bte:h-full bte:flex-col",children:[o.jsxs("div",{className:"bte:mb-4",children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700",children:"Select JSON File"}),o.jsxs("div",{className:"rounded-none border-2 border-dashed border-[#e8e7ee] p-8 text-center transition-colors duration-200 hover:border-[#30aab3]",children:[o.jsx("input",{type:"file",accept:".json",onChange:j,className:"hidden",id:"file-upload"}),o.jsxs("label",{htmlFor:"file-upload",className:"flex cursor-pointer flex-col items-center",children:[o.jsx(T.FiUpload,{size:48,className:"mb-4 text-gray-400"}),o.jsx(T.FiUpload,{size:48,className:"mb-4 text-gray-400"}),o.jsx("span",{className:"text-lg font-medium text-gray-700",children:"Click to upload JSON file"}),o.jsx("span",{className:"mt-1 text-sm text-gray-500",children:"or drag and drop"})]})]})]}),u&&o.jsxs("div",{className:"flex-1 overflow-hidden rounded-none bg-gray-900",children:[o.jsx("div",{className:"flex items-center justify-between border-b border-gray-700 bg-gray-800 px-4 py-2",children:o.jsx("span",{className:"text-sm font-medium text-gray-300",children:"File Preview"})}),o.jsx("div",{className:"h-32 overflow-auto",children:o.jsx("pre",{className:"whitespace-pre-wrap p-4 font-mono text-sm text-gray-300",children:o.jsx("code",{children:u})})})]})]}),y&&o.jsx("div",{className:"mt-4 rounded-none border border-red-200 bg-red-50 p-3",children:o.jsx("p",{className:"text-sm text-red-600",children:y})})]}),o.jsxs("div",{className:"flex items-center justify-end gap-3 border-t border-[#e8e7ee] p-6",children:[o.jsx("button",{onClick:r,className:"rounded-none bg-gray-100 px-4 py-2 text-gray-700 transition-colors duration-200 hover:bg-gray-200",children:"Cancel"}),o.jsx("button",{onClick:R,disabled:s==="file"&&!u||s==="url"&&!m||s==="code"&&!m||!O(),className:"rounded-none bg-[#170f4f] px-4 py-2 text-white transition-colors duration-200 hover:bg-[#30aab3] disabled:cursor-not-allowed disabled:opacity-50",children:"Import Data"})]})]})}):null},Sg=Object.freeze({__proto__:null,DataSourceModal:Eg,HorizontalDataView:xi});exports.TemplateEditor=bi;exports.default=bi;
|