E.preventDefault()})})]},M)})})]},L)}):e.jsx("div",{className:"border rounded-md mb-4 p-4 text-center text-gray-500 text-xs",children:"No nodes selected. Please select a node in the workflow to configure parameters."}),e.jsxs("div",{className:"mt-6 flex justify-between",children:[e.jsx("button",{onClick:k=>o(k),className:"px-3 py-1.5 text-xs bg-gray-100 text-gray-800 rounded-md hover:bg-gray-200 transition-colors",children:"Previous"}),e.jsx("button",{onClick:k=>C(k),className:`px-3 py-1.5 text-xs rounded-md transition-colors ${d.length>1&&!u?"bg-gray-200 text-gray-500 cursor-not-allowed":"bg-pink-200 text-pink-700 hover:bg-pink-300"}`,disabled:d.length>1&&!u,children:"Generate & Compare"})]})]})},Nt=({selectedNodes:t,paramTestValues:r,selectedParams:s,totalCount:l,completedCount:a,errorMessage:o,handleClose:n,setIsProcessing:i,setCurrentScreen:d,cleanupPolling:m})=>{const u=x=>{x.preventDefault(),x.stopPropagation(),gt({clear:!0}),pt(),m&&m(),i(!1),d(2)};return e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-4 relative",children:[e.jsx("div",{className:"absolute inset-0 bg-gray-500 bg-opacity-30 flex flex-col items-center justify-center z-10",children:e.jsxs("div",{className:"text-center text-gray-800 bg-white p-4 rounded-lg shadow-lg",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"Processing..."}),e.jsxs("div",{className:"text-xs mb-3",children:["Completed ",a," of ",l," runs"]}),e.jsx("div",{className:"w-48 h-2 bg-gray-200 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-pink-500 transition-all duration-200",style:{width:`${a/l*100}%`}})}),e.jsxs("div",{className:"mt-2 text-xs text-gray-600",children:["Already generated ",a," images"]}),e.jsx("button",{onClick:u,className:"mt-4 px-3 py-1.5 text-xs bg-gray-200 text-gray-800 rounded-md hover:bg-gray-300 transition-colors",children:"Cancel"})]})}),e.jsxs("div",{className:"mb-4 border-b pb-2 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium text-gray-800",children:"Confirm Test Configuration"}),e.jsxs("p",{className:"text-xs text-gray-500",children:["In the selected parameter combinations, there are ",l," total runs. Each run will generate a separate image."]})]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:n,children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),o&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md text-red-600 text-xs",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:e.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsx("div",{className:"ml-2",children:o})]})}),t.length>0?t.map((x,g)=>{const f=x.type||"Unknown Node",b=x.widgets||[],C=x.id;return e.jsxs("div",{className:"border rounded-md mb-4 overflow-hidden",children:[e.jsxs("div",{className:"bg-gray-50 px-3 py-2 text-xs font-medium text-gray-700 border-b",children:[f," (ID: ",C,")"]}),e.jsx("div",{className:"p-4 space-y-3",children:b.map((k,L)=>{const P=k.name;if(!s[P])return null;const j=r[C]?.[P]||[],N=Array.isArray(j)?`[${j.join(", ")}]`:JSON.stringify(j);return e.jsxs("div",{className:Lp.preventDefault()})})]},L)})})]},g)}):e.jsx("div",{className:"border rounded-md mb-4 p-4 text-center text-gray-500",children:"No nodes selected. Please select a node in the workflow to configure parameters."})]})},te=({visible:t,imageUrl:r,params:s,onClose:l})=>{if(!t)return null;const a=()=>{if(!s||!s.nodeParams)return null;const o=Object.entries(s.nodeParams).map(([n,i])=>{const d=s.nodeNames?.[n]||s.selectedNodeInfoMap&&s.selectedNodeInfoMap[n]||(n.includes("text")?"Text Node":`Node ${n}`),m=Object.entries(i).filter(([u,x])=>typeof x!="object"||x===null).map(([u,x])=>e.jsxs("div",{className:"pl-4 text-sm py-1 flex",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400 mr-2",children:"-"}),e.jsxs("span",{className:"font-medium mr-1",children:[u,":"]}),e.jsx("span",{className:"text-gray-700 dark:text-gray-300 break-all",children:String(x)})]},u));return e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"font-semibold text-pink-600 dark:text-pink-400 text-base py-1 border-b border-gray-200 dark:border-gray-700 mb-2",children:d}),m.length>0?m:e.jsx("div",{className:"pl-4 text-sm text-gray-500 italic",children:"nodeParams is null"})]},n)});return e.jsx("div",{className:"overflow-y-auto max-h-full",children:o.length>0?o:e.jsx("div",{className:"text-sm text-gray-500 italic",children:"nodeParams is null"})})};return e.jsx("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-50",onClick:l,children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl flex flex-row w-[90%] max-w-6xl max-h-[90vh] relative m-4 overflow-hidden",onClick:o=>o.stopPropagation(),style:{display:"flex",flexDirection:"row"},children:[e.jsx("button",{className:"absolute top-2 right-2 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 p-1 z-10",onClick:l,children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),e.jsx("div",{className:"w-[65%] border-r border-gray-200 dark:border-gray-700",children:e.jsx("div",{className:"p-4 h-full flex items-center justify-center",children:e.jsx("img",{src:r,alt:"Enlarged image",className:"max-w-full max-h-[calc(90vh-2rem)] object-contain"})})}),e.jsx("div",{className:"w-[35%] h-full overflow-hidden flex flex-col",children:e.jsxs("div",{className:"p-4 flex-1 overflow-y-auto",children:[e.jsx("h3",{className:"text-lg font-medium text-gray-800 dark:text-gray-200 mb-4",children:"Parameters"}),s&&!s.nodeParams&&Object.entries(s).filter(([o,n])=>o!=="nodeParams"&&typeof n!="object").map(([o,n])=>e.jsxs("div",{className:"py-1 text-sm text-gray-600 dark:text-gray-300",children:[e.jsxs("span",{className:"font-medium",children:[o,":"]})," ",String(n)]},o)),e.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-300",children:a()})]})})]})})},wt=({generatedImages:t,selectedImageIndex:r,handleSelectImage:s,handleApplySelected:l,handlePrevious:a,handleClose:o,currentPage:n,handlePageChange:i,imagesPerPage:d,notificationVisible:m,modalVisible:u,modalImageUrl:x,modalImageParams:g,openImageModal:f,closeImageModal:b})=>{const C=Math.ceil(t.length/d),k=(n-1)*d,L=Math.min(k+d,t.length),P=t.slice(k,L);return e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:[e.jsxs("div",{className:"mb-4 border-b pb-2 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium text-gray-800",children:"Generation Complete"}),e.jsxs("p",{className:"text-xs text-gray-500",children:["All ",t.length," images have been generated."]})]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:o,children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),m&&e.jsx("div",{className:"fixed top-4 right-4 bg-green-100 border-l-4 border-green-500 text-green-700 p-3 shadow-md rounded animate-fade-in-out z-50",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"py-1",children:e.jsx("svg",{className:"h-4 w-4 text-green-500 mr-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),e.jsx("p",{className:"text-xs",children:"Parameters has been applied."})]})}),e.jsx(te,{visible:u,imageUrl:x,params:g||{},onClose:b}),e.jsx("div",{className:"grid grid-cols-3 gap-4 mb-6",children:P.map((j,N)=>{const p=k+N;return e.jsxs("div",{className:`relative rounded-lg overflow-hidden border ${r===p?"border-pink-500 ring-2 ring-pink-300":"border-gray-200"}`,onClick:M=>s(p,M),children:[e.jsx("button",{className:"absolute top-2 right-2 bg-white bg-opacity-75 rounded-full p-0.5 text-gray-600 hover:text-gray-900 shadow-sm z-10",onClick:M=>f(j.url,j.params,M),children:e.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5v-4m0 4h-4m4 0l-5-5"})})}),e.jsx("div",{className:"aspect-square",children:e.jsx("img",{src:j.url,alt:`Generated image ${p+1}`,className:"w-full h-full object-cover"})})]},p)})}),C>1&&e.jsxs("div",{className:"flex justify-center items-center space-x-2 mt-4 mb-4",children:[e.jsx("button",{onClick:j=>i(1,j),disabled:n===1,className:`px-2 py-1 rounded ${n===1?"text-gray-400 cursor-not-allowed":"text-gray-700 hover:bg-gray-100"}`,children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[e.jsx("path",{fillRule:"evenodd",d:"M15.707 15.707a1 1 0 01-1.414 0l-5-5a1 1 0 010-1.414l5-5a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"}),e.jsx("path",{fillRule:"evenodd",d:"M8.707 15.707a1 1 0 01-1.414 0l-5-5a1 1 0 010-1.414l5-5a1 1 0 111.414 1.414L4.414 10l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"})]})}),e.jsx("button",{onClick:j=>i(n-1,j),disabled:n===1,className:`px-2 py-1 rounded ${n===1?"text-gray-400 cursor-not-allowed":"text-gray-700 hover:bg-gray-100"}`,children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"})})}),e.jsxs("div",{className:"px-2 py-1 text-xs text-gray-800",children:["Page ",n," of ",C]}),e.jsx("button",{onClick:j=>i(n+1,j),disabled:n===C,className:`px-2 py-1 rounded ${n===C?"text-gray-400 cursor-not-allowed":"text-gray-700 hover:bg-gray-100"}`,children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})})}),e.jsx("button",{onClick:j=>i(C,j),disabled:n===C,className:`px-2 py-1 rounded ${n===C?"text-gray-400 cursor-not-allowed":"text-gray-700 hover:bg-gray-100"}`,children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[e.jsx("path",{fillRule:"evenodd",d:"M4.293 15.707a1 1 0 001.414 0l5-5a1 1 0 000-1.414l-5-5a1 1 0 00-1.414 1.414L8.586 10 4.293 14.293a1 1 0 000 1.414z",clipRule:"evenodd"}),e.jsx("path",{fillRule:"evenodd",d:"M11.293 15.707a1 1 0 001.414 0l5-5a1 1 0 000-1.414l-5-5a1 1 0 00-1.414 1.414L15.586 10l-4.293 4.293a1 1 0 000 1.414z",clipRule:"evenodd"})]})})]}),e.jsx("div",{className:"mt-6 flex justify-end",children:e.jsx("button",{onClick:j=>l(j),className:"px-3 py-1.5 text-xs bg-pink-200 text-pink-700 rounded-md hover:bg-pink-300 transition-colors",disabled:r===null,children:"Apply Selected"})})]})},kt=({visible:t,aiWritingModalText:r,setAiWritingModalText:s,aiGeneratedTexts:l,aiSelectedTexts:a,aiWritingLoading:o,aiWritingError:n,handleAiWriting:i,toggleTextSelection:d,addSelectedTexts:m,onClose:u})=>t?e.jsx("div",{className:"fixed inset-0 bg-black flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] flex flex-col",children:[e.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 flex justify-between items-center",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"AI Writing Assistant"}),e.jsx("button",{className:"text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200",onClick:u,children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsxs("div",{className:"p-4 overflow-y-auto flex-1",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("p",{className:"text-sm text-gray-700 dark:text-gray-300 mb-2",children:"Enter text and AI will generate variations"}),e.jsx("textarea",{className:`w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-lg text-gray-900 dark:text-white
+import{j as e}from"./vendor-markdown-Dek94WS0.js";import{r as w}from"./vendor-react-V04_Axys.js";import{u as ve,a as V,g as ie,W as se}from"./message-components-DetBDgrq.js";import{m as gt,i as pt,r as ft,g as bt}from"./workflowChat-BBtXRGQg.js";import"./input.js";/* empty css */const yt=({selectedNodes:t,handleParamSelect:r,selectedParams:s,handleNext:l,handleClose:a})=>{const n=t.flatMap(i=>(i.widgets||[]).map(d=>d.name)).some(i=>s[i]===!0);return e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:[e.jsxs("div",{className:"mb-4 border-b pb-2 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium text-gray-800",children:"Select parameters"}),e.jsx("p",{className:"text-xs text-gray-500",children:"multiple selections supported"})]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:a,children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),t.map((i,d)=>{const m=i.title||"Unknown Node",u=i.widgets||[];return e.jsxs("div",{className:"border rounded-md mb-4 overflow-hidden",children:[e.jsx("div",{className:"bg-gray-50 px-3 py-2 text-sm font-medium text-gray-700 border-b",children:m}),e.jsx("div",{className:"p-4 space-y-3",children:e.jsx("div",{className:"flex items-center gap-3 flex-wrap",children:u.map((x,g)=>{const f=x.name;return e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:`w-5 h-5 rounded-full border flex items-center justify-center ${s[f]?"border-red-500 bg-red-100":"border-gray-300"}`,onClick:b=>r(f,b),children:s[f]&&e.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500"})}),e.jsx("span",{className:"ml-2 text-gray-700 text-xs",children:f})]},`widget-${g}`)})})})]},`node-${d}`)}),e.jsx("div",{className:"mt-6 flex justify-center",children:e.jsx("button",{onClick:i=>l(i),disabled:!n,className:`px-3 py-1.5 text-xs ${n?"bg-pink-200 text-pink-700 hover:bg-pink-300":"bg-gray-200 text-gray-500 cursor-not-allowed"} rounded-md transition-colors`,children:"Next"})})]})},jt=({selectedNodes:t,paramTestValues:r,selectedParams:s,updateParamTestValues:l,toggleDropdown:a,openDropdowns:o,handleTestValueSelect:n,searchTerms:i,handleSearch:d,handleSelectAll:m,handleNext:u,handlePrevious:x,handleClose:g,inputValues:f,setInputValues:b,textInputs:C,handleTextInputChange:k,handleAddTextInput:L,handleRemoveTextInput:P,openAiWritingModal:j})=>{const N=(p,M,D,G=0)=>{if(p=isNaN(p)?0:p,M=isNaN(M)?100:M,D=isNaN(D)||D<=0?1:D,M{!t||t.length===0||t.forEach(p=>{const M=p.id.toString(),D=p.widgets||{};Object.values(D).forEach(y=>{const E=y.name;if(!s[E])return;if(!(r[M]?.[E]?.length>0)&&y.type==="number"){const v=y.options?.min||0,T=y.options?.max||100;let I=(y.options?.step||10)/10;I<.1&&(I=.1);const _=y.options?.precision||0,B=N(v,T,I,_);if(B.length>0){l(M,E,B);const z=`${M}_${E}`;b(S=>({...S,[z]:{min:v.toString(),max:T.toString(),step:I.toString()}}))}}if(y.type==="customtext"||y.type.toLowerCase().includes("text")){const v=`${M}_${E}`,T=C[v]||[""];JSON.stringify(T)!==JSON.stringify(r[M]?.[E]||[""])&&l(M,E,T)}})})},[t,s,r,C,l,b,N]),e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:[e.jsxs("div",{className:"mb-4 border-b pb-2 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium text-gray-800",children:"Set test values"}),e.jsx("p",{className:"text-xs text-gray-500",children:"Configure the test values for each parameter"})]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:g,children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),t.length>0?t.map((p,M)=>{const D=p.widgets||{},G=Object.values(D),y=p.id;return e.jsxs("div",{className:"border rounded-md mb-4 overflow-hidden",children:[e.jsxs("div",{className:"bg-gray-50 px-3 py-2 text-xs font-medium text-gray-700 border-b flex justify-between items-center",children:[e.jsxs("span",{children:[p.type," (ID: ",y,")"]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:E=>g(E,M),children:e.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsx("div",{className:"p-4 space-y-4",children:G.map((E,R)=>{const v=E.name;if(!s[v])return null;const T=`${y}_${v}`;if(E.type==="customtext"||E.type.toLowerCase().includes("text")){const I=C[T]||[""];return e.jsxs("div",{className:"border-b pb-3",children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsxs("label",{className:"text-xs font-medium text-gray-700",children:[v,":"]}),e.jsxs("button",{className:"px-2 py-1 bg-blue-100 text-blue-700 rounded text-xs flex items-center hover:bg-blue-200 transition-colors",onClick:()=>j(y,v),children:[e.jsx("svg",{className:"w-3 h-3 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})}),"AI Writing"]})]}),e.jsx("div",{className:"space-y-2",children:I.map((_,B)=>e.jsxs("div",{className:"flex items-start",children:[e.jsx("textarea",{className:`flex-1 border ${_?"border-gray-300":"border-red-500"} rounded p-2 text-xs resize-y`,rows:2,placeholder:"Enter text...",value:_,onChange:z=>k(y,v,B,z.target.value),required:!0}),e.jsx("button",{className:"ml-2 text-red-500 hover:text-red-700",onClick:()=>P(y,v,B),title:"Remove",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},B))}),e.jsxs("button",{className:"mt-2 px-2 py-1 border border-dashed border-gray-300 rounded text-xs text-gray-600 hover:bg-gray-50 flex items-center",onClick:()=>L(y,v),children:[e.jsx("svg",{className:"w-3 h-3 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),"Add Text"]})]},R)}if(E.type==="number"){const I=E.options?.min||0,_=E.options?.max||100,B=(E.options?.step||10)/10,z=E.options?.precision||0,S=N(I,_,B,z),F=f[T]||{min:I.toString(),max:_.toString(),step:B.toString()};return e.jsxs("div",{className:"border-b pb-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("label",{className:"text-xs font-medium text-gray-700",children:[v,":"]}),e.jsx("div",{className:"w-4"})]}),e.jsxs("div",{className:"flex space-x-2 items-center",children:[e.jsx("label",{className:"text-xs text-gray-600",children:"Min"}),e.jsx("input",{type:"text",className:"w-12 h-6 border border-gray-300 rounded text-xs px-2",value:F.min,required:!0,onClick:$=>{$.preventDefault(),$.stopPropagation()},onChange:$=>{$.preventDefault(),$.stopPropagation();const O=$.target.value;if(b(A=>({...A,[T]:{...A[T],min:O}})),O===""||!isNaN(parseFloat(O))){const A=O===""?0:parseFloat(O),H=parseFloat(F.max||_.toString()),U=parseFloat(F.step||B.toString()),J=N(A,H,U,z);l(y,v,J)}}}),e.jsx("label",{className:"text-xs text-gray-600",children:"Max"}),e.jsx("input",{type:"text",className:"w-12 h-6 border border-gray-300 rounded text-xs px-2",value:F.max,onClick:$=>{$.preventDefault(),$.stopPropagation()},required:!0,onChange:$=>{$.preventDefault(),$.stopPropagation();const O=$.target.value;if(b(A=>({...A,[T]:{...A[T],max:O}})),O===""||!isNaN(parseFloat(O))){const A=parseFloat(F.min||I.toString()),H=O===""?A:parseFloat(O),U=parseFloat(F.step||B.toString()),J=N(A,H,U,z);l(y,v,J)}}}),e.jsx("label",{className:"text-xs text-gray-600",children:"Step"}),e.jsx("input",{type:"text",className:"w-12 h-6 border border-gray-300 rounded text-xs px-2",value:F.step,required:!0,onClick:$=>{$.preventDefault(),$.stopPropagation()},onChange:$=>{$.preventDefault(),$.stopPropagation();const O=$.target.value;if(b(A=>({...A,[T]:{...A[T],step:O}})),O===""||!isNaN(parseFloat(O))&&parseFloat(O)>0){const A=parseFloat(F.min||I.toString()),H=parseFloat(F.max||_.toString());let U=O===""?1:parseFloat(O);U<.1&&(U=.1);const J=N(A,H,U,z);l(y,v,J)}}})]}),e.jsxs("div",{className:"mt-1",children:[e.jsx("label",{className:"text-xs text-gray-600",children:"Test values"}),e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:(()=>{const $=r[y]?.[v]||S;if($.length<=10)return $.map((O,A)=>e.jsxs("div",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded-md flex items-center text-xs cursor-pointer hover:bg-blue-200",onClick:H=>{H.stopPropagation(),n(y,v,O,H)},children:[e.jsx("span",{children:O}),e.jsx("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]},A));{const O=$.slice(0,5),A=$.slice($.length-5);return e.jsxs(e.Fragment,{children:[O.map((H,U)=>e.jsxs("div",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded-md flex items-center text-xs cursor-pointer hover:bg-blue-200",onClick:J=>{J.stopPropagation(),n(y,v,H,J)},children:[e.jsx("span",{children:H}),e.jsx("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]},`first-${U}`)),e.jsx("div",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 rounded-md flex items-center text-xs",children:"..."}),A.map((H,U)=>e.jsxs("div",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded-md flex items-center text-xs cursor-pointer hover:bg-blue-200",onClick:J=>{J.stopPropagation(),n(y,v,H,J)},children:[e.jsx("span",{children:H}),e.jsx("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]},`last-${U}`))]})}})()})]}),e.jsx("div",{className:"mt-1",children:e.jsx("p",{className:"text-xs text-gray-500",children:"Values are distributed evenly between Min and Max"})})]},R)}else if(E.type==="combo"){const I=E.options?.values||[],_=`${y}_${v}`,B=S=>typeof S=="string"?S:S&&typeof S=="object"&&"name"in S?S.name:String(S),z=S=>typeof S=="object"&&S!==null&&"name"in S?S.name:S;return e.jsxs("div",{className:"border-b pb-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("label",{className:"text-xs font-medium text-gray-700",children:v}),e.jsxs("div",{className:"relative dropdown-container",children:[e.jsxs("button",{className:`appearance-none border ${(r[y]?.[v]||[]).length===0?"border-red-500":"border-gray-300"} rounded px-2 py-0.5 pr-6 text-xs flex items-center bg-white text-gray-700`,onClick:S=>{S.preventDefault(),S.stopPropagation(),a(y,v,S)},"data-dropdown":_,children:[e.jsx("span",{children:(r[y]?.[v]||[]).length>0?`${v}: ${(r[y]?.[v]||[]).length} selected`:`Select ${v}`}),e.jsx("div",{className:"ml-2",children:e.jsx("svg",{className:"fill-current h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"})})})]}),o[_]&&e.jsxs("div",{className:"absolute z-[9999] mt-1 w-64 bg-white border border-gray-300 rounded-md shadow-lg dropdown-menu",style:{position:"fixed",top:typeof o[_]=="object"?`${o[_].y}px`:"0px",left:typeof o[_]=="object"?`${o[_].x}px`:"0px",maxHeight:"300px",overflowY:"auto"},children:[e.jsx("div",{className:"p-2 border-b sticky top-0 bg-white",children:e.jsx("input",{type:"text",className:"w-full px-2 py-0.5 text-xs border border-gray-300 rounded",placeholder:"Search...",value:i[_]||"",onChange:S=>{S.preventDefault(),S.stopPropagation(),d(y,v,S.target.value)},onClick:S=>{S.preventDefault(),S.stopPropagation()},autoFocus:!0})}),e.jsxs("div",{className:"px-3 py-1.5 bg-gray-50 border-b cursor-pointer text-xs flex items-center text-gray-700 hover:bg-gray-100",onClick:S=>{S.preventDefault(),S.stopPropagation();const $=I.filter(O=>!i[_]||B(O).toLowerCase().includes((i[_]||"").toLowerCase())).map(z);m(y,v,$)},children:[e.jsx("div",{className:`w-4 h-4 mr-2 border rounded-sm flex items-center justify-center ${I.length>0&&(r[y]?.[v]||[]).length===I.length?"bg-blue-500 border-blue-500":(r[y]?.[v]||[]).length>0?"bg-blue-500 border-blue-500 opacity-50":"border-gray-300"}`,children:(r[y]?.[v]||[]).length>0&&e.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),e.jsx("span",{className:"font-medium",children:I.length>0&&(r[y]?.[v]||[]).length===I.length?"Deselect All":"Select All"})]}),e.jsxs("div",{className:"max-h-60 overflow-y-auto",children:[I.filter(S=>!i[_]||B(S).toLowerCase().includes((i[_]||"").toLowerCase())).map((S,F)=>e.jsxs("div",{className:"px-3 py-1.5 hover:bg-gray-100 cursor-pointer text-xs flex items-center text-gray-700",onClick:$=>{$.preventDefault(),$.stopPropagation(),n(y,v,z(S),$)},children:[e.jsx("div",{className:`w-4 h-4 mr-2 border rounded-sm flex items-center justify-center ${(r[y]?.[v]||[]).includes(z(S))?"bg-blue-500 border-blue-500":"border-gray-300"}`,children:(r[y]?.[v]||[]).includes(z(S))&&e.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),e.jsx("span",{className:"whitespace-normal overflow-hidden text-ellipsis",children:B(S)})]},F)),I.filter(S=>!i[_]||B(S).toLowerCase().includes((i[_]||"").toLowerCase())).length===0&&e.jsx("div",{className:"px-3 py-4 text-sm text-gray-500 text-center",children:"No matching options"})]})]})]})]}),e.jsxs("div",{className:"mt-2",children:[e.jsx("label",{className:"text-xs text-gray-600",children:"Test values"}),(r[y]?.[v]||[]).length===0&&e.jsx("div",{className:"text-xs text-red-500 mt-1",children:"Please select at least one value"}),e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:(r[y]?.[v]||[]).map((S,F)=>e.jsxs("div",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded-md flex items-center text-xs",children:[e.jsx("span",{children:S}),e.jsx("svg",{className:"w-4 h-4 ml-1 cursor-pointer hover:text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",onClick:$=>{$.preventDefault(),$.stopPropagation(),n(y,v,S,$)},children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]},F))})]})]},R)}else return e.jsxs("div",{className:"border-b pb-3",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("label",{className:"text-xs font-medium text-gray-700",children:v})}),e.jsxs("div",{className:"mt-2",children:[e.jsx("label",{className:"text-xs text-gray-600",children:"Test values"}),e.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[(r[y]?.[v]||[]).map((I,_)=>e.jsxs("div",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded-md flex items-center text-xs",children:[e.jsx("span",{children:I}),e.jsx("svg",{className:"w-4 h-4 ml-1 cursor-pointer hover:text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",onClick:B=>{B.preventDefault(),B.stopPropagation(),n(y,v,I,B)},children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]},_)),e.jsxs("button",{className:"px-2 py-0.5 border border-dashed border-blue-300 text-blue-600 rounded-md text-xs flex items-center hover:bg-blue-50",onClick:I=>{I.preventDefault(),I.stopPropagation();const _=`${v}${(r[y]?.[v]||[]).length+1}`;l(y,v,[...r[y]?.[v]||[],_])},children:[e.jsx("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),e.jsx("span",{children:"Add"})]})]})]})]},R)})})]},M)}):e.jsx("div",{className:"border rounded-md mb-4 p-4 text-center text-gray-500",children:"No nodes selected. Please select a node in the workflow to configure parameters."}),e.jsxs("div",{className:"mt-6 flex justify-between",children:[e.jsx("button",{onClick:p=>x(p),className:"px-3 py-1.5 text-xs bg-gray-100 text-gray-800 rounded-md hover:bg-gray-200 transition-colors",children:"Previous"}),e.jsx("button",{onClick:p=>u(p),className:"px-3 py-1.5 text-xs bg-pink-200 text-pink-700 rounded-md hover:bg-pink-300 transition-colors",children:"Next"})]})]})},vt=({selectedNodes:t,paramTestValues:r,selectedParams:s,totalCount:l,errorMessage:a,handlePrevious:o,handleStartGeneration:n,handleClose:i})=>{const[d,m]=w.useState([]),[u,x]=w.useState(null),[g,f]=w.useState(!1);ve();const b=()=>{const k=Object.values(V.graph._nodes_by_id),L=[],P=[];for(const N of k)N.type==="SaveImage"?L.push(N.id):N.type==="PreviewImage"&&P.push(N.id);const j=[...L,...P];m(j),j.length===1?x(j[0]):j.length>1&&(f(!0),x(null))};w.useEffect(()=>{b()},[]),w.useEffect(()=>{const k=()=>{if(!V.canvas.selected_nodes)return;const L=Object.values(V.canvas.selected_nodes);if(L.length===0)return;const P=L[0];P&&(P.type==="SaveImage"||P.type==="PreviewImage")&&(console.log("Selected image node:",P.id),x(P.id))};return document.addEventListener("click",k),()=>{document.removeEventListener("click",k)}},[]);const C=k=>{if(k&&(k.preventDefault(),k.stopPropagation()),d.length>1&&!u){f(!0);return}n(k,u||void 0)};return e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:[e.jsxs("div",{className:"mb-4 border-b pb-2 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium text-gray-800",children:"Conform combinations"}),e.jsxs("p",{className:"text-xs text-gray-500",children:["In the selected parameter combinations, there are ",l," total runs. Each run will generate a separate image."]})]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:i,children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),g&&d.length>1&&e.jsx("div",{className:"mb-4 p-3 bg-yellow-50 border border-yellow-200 rounded-md text-amber-600 text-xs",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:e.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsx("div",{className:"ml-2",children:u===null?`Multiple SaveImage and PreviewImage nodes detected with IDs ${d.join(",")}. Please click the node on canvas.`:`Current node ID is ${u}, please click Start Generation again`})]})}),a&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md text-red-600 text-xs",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:e.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsx("div",{className:"ml-2",children:a})]})}),t.length>0?t.map((k,L)=>{const P=k.type||"Unknown Node",j=k.widgets||[],N=k.id;return e.jsxs("div",{className:"border rounded-md mb-4 overflow-hidden",children:[e.jsxs("div",{className:"bg-gray-50 px-3 py-2 text-xs font-medium text-gray-700 border-b",children:[P," (ID: ",N,")"]}),e.jsx("div",{className:"p-4 space-y-3",children:j.map((p,M)=>{const D=p.name;if(!s[D])return null;const G=r[N]?.[D]||[],y=Array.isArray(G)?`[${G.join(", ")}]`:JSON.stringify(G);return e.jsxs("div",{className:ME.preventDefault()})})]},M)})})]},L)}):e.jsx("div",{className:"border rounded-md mb-4 p-4 text-center text-gray-500 text-xs",children:"No nodes selected. Please select a node in the workflow to configure parameters."}),e.jsxs("div",{className:"mt-6 flex justify-between",children:[e.jsx("button",{onClick:k=>o(k),className:"px-3 py-1.5 text-xs bg-gray-100 text-gray-800 rounded-md hover:bg-gray-200 transition-colors",children:"Previous"}),e.jsx("button",{onClick:k=>C(k),className:`px-3 py-1.5 text-xs rounded-md transition-colors ${d.length>1&&!u?"bg-gray-200 text-gray-500 cursor-not-allowed":"bg-pink-200 text-pink-700 hover:bg-pink-300"}`,disabled:d.length>1&&!u,children:"Generate & Compare"})]})]})},Nt=({selectedNodes:t,paramTestValues:r,selectedParams:s,totalCount:l,completedCount:a,errorMessage:o,handleClose:n,setIsProcessing:i,setCurrentScreen:d,cleanupPolling:m})=>{const u=x=>{x.preventDefault(),x.stopPropagation(),gt({clear:!0}),pt(),m&&m(),i(!1),d(2)};return e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-4 relative",children:[e.jsx("div",{className:"absolute inset-0 bg-gray-500 bg-opacity-30 flex flex-col items-center justify-center z-10",children:e.jsxs("div",{className:"text-center text-gray-800 bg-white p-4 rounded-lg shadow-lg",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"Processing..."}),e.jsxs("div",{className:"text-xs mb-3",children:["Completed ",a," of ",l," runs"]}),e.jsx("div",{className:"w-48 h-2 bg-gray-200 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-pink-500 transition-all duration-200",style:{width:`${a/l*100}%`}})}),e.jsxs("div",{className:"mt-2 text-xs text-gray-600",children:["Already generated ",a," images"]}),e.jsx("button",{onClick:u,className:"mt-4 px-3 py-1.5 text-xs bg-gray-200 text-gray-800 rounded-md hover:bg-gray-300 transition-colors",children:"Cancel"})]})}),e.jsxs("div",{className:"mb-4 border-b pb-2 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium text-gray-800",children:"Confirm Test Configuration"}),e.jsxs("p",{className:"text-xs text-gray-500",children:["In the selected parameter combinations, there are ",l," total runs. Each run will generate a separate image."]})]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:n,children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),o&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md text-red-600 text-xs",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:e.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsx("div",{className:"ml-2",children:o})]})}),t.length>0?t.map((x,g)=>{const f=x.type||"Unknown Node",b=x.widgets||[],C=x.id;return e.jsxs("div",{className:"border rounded-md mb-4 overflow-hidden",children:[e.jsxs("div",{className:"bg-gray-50 px-3 py-2 text-xs font-medium text-gray-700 border-b",children:[f," (ID: ",C,")"]}),e.jsx("div",{className:"p-4 space-y-3",children:b.map((k,L)=>{const P=k.name;if(!s[P])return null;const j=r[C]?.[P]||[],N=Array.isArray(j)?`[${j.join(", ")}]`:JSON.stringify(j);return e.jsxs("div",{className:Lp.preventDefault()})})]},L)})})]},g)}):e.jsx("div",{className:"border rounded-md mb-4 p-4 text-center text-gray-500",children:"No nodes selected. Please select a node in the workflow to configure parameters."})]})},te=({visible:t,imageUrl:r,params:s,onClose:l})=>{if(!t)return null;const a=()=>{if(!s||!s.nodeParams)return null;const o=Object.entries(s.nodeParams).map(([n,i])=>{const d=s.nodeNames?.[n]||s.selectedNodeInfoMap&&s.selectedNodeInfoMap[n]||(n.includes("text")?"Text Node":`Node ${n}`),m=Object.entries(i).filter(([u,x])=>typeof x!="object"||x===null).map(([u,x])=>e.jsxs("div",{className:"pl-4 text-sm py-1 flex",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400 mr-2",children:"-"}),e.jsxs("span",{className:"font-medium mr-1",children:[u,":"]}),e.jsx("span",{className:"text-gray-700 dark:text-gray-300 break-all",children:String(x)})]},u));return e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"font-semibold text-pink-600 dark:text-pink-400 text-base py-1 border-b border-gray-200 dark:border-gray-700 mb-2",children:d}),m.length>0?m:e.jsx("div",{className:"pl-4 text-sm text-gray-500 italic",children:"nodeParams is null"})]},n)});return e.jsx("div",{className:"overflow-y-auto max-h-full",children:o.length>0?o:e.jsx("div",{className:"text-sm text-gray-500 italic",children:"nodeParams is null"})})};return e.jsx("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-50",onClick:l,children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl flex flex-row w-[90%] max-w-6xl max-h-[90vh] relative m-4 overflow-hidden",onClick:o=>o.stopPropagation(),style:{display:"flex",flexDirection:"row"},children:[e.jsx("button",{className:"absolute top-2 right-2 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 p-1 z-10",onClick:l,children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),e.jsx("div",{className:"w-[65%] border-r border-gray-200 dark:border-gray-700",children:e.jsx("div",{className:"p-4 h-full flex items-center justify-center",children:e.jsx("img",{src:r,alt:"Enlarged image",className:"max-w-full max-h-[calc(90vh-2rem)] object-contain"})})}),e.jsx("div",{className:"w-[35%] h-full overflow-hidden flex flex-col",children:e.jsxs("div",{className:"p-4 flex-1 overflow-y-auto",children:[e.jsx("h3",{className:"text-lg font-medium text-gray-800 dark:text-gray-200 mb-4",children:"Parameters"}),s&&!s.nodeParams&&Object.entries(s).filter(([o,n])=>o!=="nodeParams"&&typeof n!="object").map(([o,n])=>e.jsxs("div",{className:"py-1 text-sm text-gray-600 dark:text-gray-300",children:[e.jsxs("span",{className:"font-medium",children:[o,":"]})," ",String(n)]},o)),e.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-300",children:a()})]})})]})})},wt=({generatedImages:t,selectedImageIndex:r,handleSelectImage:s,handleApplySelected:l,handlePrevious:a,handleClose:o,currentPage:n,handlePageChange:i,imagesPerPage:d,notificationVisible:m,modalVisible:u,modalImageUrl:x,modalImageParams:g,openImageModal:f,closeImageModal:b})=>{const C=Math.ceil(t.length/d),k=(n-1)*d,L=Math.min(k+d,t.length),P=t.slice(k,L);return e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:[e.jsxs("div",{className:"mb-4 border-b pb-2 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium text-gray-800",children:"Generation Complete"}),e.jsxs("p",{className:"text-xs text-gray-500",children:["All ",t.length," images have been generated."]})]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:o,children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),m&&e.jsx("div",{className:"fixed top-4 right-4 bg-green-100 border-l-4 border-green-500 text-green-700 p-3 shadow-md rounded animate-fade-in-out z-50",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"py-1",children:e.jsx("svg",{className:"h-4 w-4 text-green-500 mr-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),e.jsx("p",{className:"text-xs",children:"Parameters has been applied."})]})}),e.jsx(te,{visible:u,imageUrl:x,params:g||{},onClose:b}),e.jsx("div",{className:"grid grid-cols-3 gap-4 mb-6",children:P.map((j,N)=>{const p=k+N;return e.jsxs("div",{className:`relative rounded-lg overflow-hidden border ${r===p?"border-pink-500 ring-2 ring-pink-300":"border-gray-200"}`,onClick:M=>s(p,M),children:[e.jsx("button",{className:"absolute top-2 right-2 bg-white bg-opacity-75 rounded-full p-0.5 text-gray-600 hover:text-gray-900 shadow-sm z-10",onClick:M=>f(j.url,j.params,M),children:e.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5v-4m0 4h-4m4 0l-5-5"})})}),e.jsx("div",{className:"aspect-square",children:e.jsx("img",{src:j.url,alt:`Generated image ${p+1}`,className:"w-full h-full object-cover"})})]},p)})}),C>1&&e.jsxs("div",{className:"flex justify-center items-center space-x-2 mt-4 mb-4",children:[e.jsx("button",{onClick:j=>i(1,j),disabled:n===1,className:`px-2 py-1 rounded ${n===1?"text-gray-400 cursor-not-allowed":"text-gray-700 hover:bg-gray-100"}`,children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[e.jsx("path",{fillRule:"evenodd",d:"M15.707 15.707a1 1 0 01-1.414 0l-5-5a1 1 0 010-1.414l5-5a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"}),e.jsx("path",{fillRule:"evenodd",d:"M8.707 15.707a1 1 0 01-1.414 0l-5-5a1 1 0 010-1.414l5-5a1 1 0 111.414 1.414L4.414 10l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"})]})}),e.jsx("button",{onClick:j=>i(n-1,j),disabled:n===1,className:`px-2 py-1 rounded ${n===1?"text-gray-400 cursor-not-allowed":"text-gray-700 hover:bg-gray-100"}`,children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"})})}),e.jsxs("div",{className:"px-2 py-1 text-xs text-gray-800",children:["Page ",n," of ",C]}),e.jsx("button",{onClick:j=>i(n+1,j),disabled:n===C,className:`px-2 py-1 rounded ${n===C?"text-gray-400 cursor-not-allowed":"text-gray-700 hover:bg-gray-100"}`,children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})})}),e.jsx("button",{onClick:j=>i(C,j),disabled:n===C,className:`px-2 py-1 rounded ${n===C?"text-gray-400 cursor-not-allowed":"text-gray-700 hover:bg-gray-100"}`,children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[e.jsx("path",{fillRule:"evenodd",d:"M4.293 15.707a1 1 0 001.414 0l5-5a1 1 0 000-1.414l-5-5a1 1 0 00-1.414 1.414L8.586 10 4.293 14.293a1 1 0 000 1.414z",clipRule:"evenodd"}),e.jsx("path",{fillRule:"evenodd",d:"M11.293 15.707a1 1 0 001.414 0l5-5a1 1 0 000-1.414l-5-5a1 1 0 00-1.414 1.414L15.586 10l-4.293 4.293a1 1 0 000 1.414z",clipRule:"evenodd"})]})})]}),e.jsx("div",{className:"mt-6 flex justify-end",children:e.jsx("button",{onClick:j=>l(j),className:"px-3 py-1.5 text-xs bg-pink-200 text-pink-700 rounded-md hover:bg-pink-300 transition-colors",disabled:r===null,children:"Apply Selected"})})]})},kt=({visible:t,aiWritingModalText:r,setAiWritingModalText:s,aiGeneratedTexts:l,aiSelectedTexts:a,aiWritingLoading:o,aiWritingError:n,handleAiWriting:i,toggleTextSelection:d,addSelectedTexts:m,onClose:u})=>t?e.jsx("div",{className:"fixed inset-0 bg-black flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] flex flex-col",children:[e.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 flex justify-between items-center",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"AI Writing Assistant"}),e.jsx("button",{className:"text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200",onClick:u,children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsxs("div",{className:"p-4 overflow-y-auto flex-1",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("p",{className:"text-sm text-gray-700 dark:text-gray-300 mb-2",children:"Enter text and AI will generate variations"}),e.jsx("textarea",{className:`w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-lg text-gray-900 dark:text-white
bg-gray-50 dark:bg-gray-700
placeholder-gray-500 dark:placeholder-gray-400
focus:border-blue-500 dark:focus:border-blue-400
diff --git a/dist/copilot_web/WorkflowOption-Bee-YmQA.js b/dist/copilot_web/WorkflowOption-EBexRuvI.js
similarity index 98%
rename from dist/copilot_web/WorkflowOption-Bee-YmQA.js
rename to dist/copilot_web/WorkflowOption-EBexRuvI.js
index 34bdce0..963e134 100644
--- a/dist/copilot_web/WorkflowOption-Bee-YmQA.js
+++ b/dist/copilot_web/WorkflowOption-EBexRuvI.js
@@ -1 +1 @@
-import{j as t}from"./vendor-markdown-Dek94WS0.js";import{W as p,g as u,a as d}from"./message-components-DHkIj9qD.js";import{r as N}from"./vendor-react-V04_Axys.js";function O({content:v,name:C="Assistant",avatar:_,latestInput:y,installedNodes:k,onAddMessage:g}){const h=JSON.parse(v),w=h.ext?.find(e=>e.type==="workflow")?.data||[],[i,c]=N.useState({}),b=async e=>{if(!e.id){console.error("No workflow id provided");return}const r=String(e.id);if(!i[r]){c(o=>({...o,[r]:!0})),p.trackEvent({event_type:"workflow_accept",message_type:"workflow",message_id:h.message_id,data:{workflow_id:e.id,workflow_name:e.name}});try{const o=await p.getOptimizedWorkflow(e.id,y);if(o.workflow){const a=new Set;if(o.workflow.nodes)for(const s of o.workflow.nodes)a.add(s.type);else for(const s of Object.values(o.workflow))a.add(s.class_type);const n=Array.from(a).filter(s=>!k.includes(s));if(console.log("[WorkflowOption] Missing node types:",n),n.length>0){try{console.log("[WorkflowOption] Fetching info for missing nodes");const s=await p.batchGetNodeInfo(n);console.log("[WorkflowOption] Received node infos:",s);const m={text:"",ext:[{type:"node_install_guide",data:s.map(l=>({name:l.name,repository_url:l.github_url}))}]},f={id:u(),role:"ai",content:JSON.stringify(m),format:"markdown",name:"Assistant",metadata:{pendingWorkflow:o.workflow,optimizedParams:o.optimized_params}};g?.(f)}catch(s){console.error("[WorkflowOption] Error fetching node info:",s),alert("Error checking required nodes. Please try again.")}finally{c(s=>({...s,[r]:!1}))}return}j(o.workflow,o.optimized_params)}}catch(o){console.error("Failed to optimize workflow:",o),alert("Failed to optimize workflow. Please try again.")}finally{c(o=>({...o,[r]:!1}))}}},j=(e,r)=>{e.nodes?d.loadGraphData(e):d.loadApiJson(e);for(const[a,n,s,m,f]of r){const l=d.graph._nodes_by_id[a].widgets;for(const x of l)x.name===m&&(x.value=f)}d.graph.setDirtyCanvas(!1,!0);const o={id:u(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};g?.(o)};return t.jsx("div",{className:"space-y-3",children:w.length>0&&t.jsx("div",{className:"flex flex-col space-y-4",children:w.map((e,r)=>{const o=e.id?String(e.id):"";return t.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg border border-gray-200 hover:bg-gray-50",children:[e.image&&t.jsx("img",{src:e.image,alt:e.name,className:"w-14 h-14 object-cover rounded-lg",onError:a=>{const n=a.target;n.onerror=null,n.src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56' fill='none'%3E%3Crect width='56' height='56' fill='%23F3F4F6'/%3E%3Cpath d='M28 28C30.2091 28 32 26.2091 32 24C32 21.7909 30.2091 20 28 20C25.7909 20 24 21.7909 24 24C24 26.2091 25.7909 28 28 28Z' fill='%239CA3AF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18.7253 37.6307C19.8278 35.1533 22.6897 33.6 26 33.6H30C33.3103 33.6 36.1722 35.1533 37.2747 37.6307C37.6419 38.4561 37.0611 39.2 36.1694 39.2H19.8306C18.9389 39.2 18.3581 38.4561 18.7253 37.6307Z' fill='%239CA3AF'/%3E%3C/svg%3E"}}),t.jsxs("div",{className:"flex-1 break-words flex flex-col h-[4.5rem] justify-between",children:[t.jsx("div",{children:t.jsx("h3",{className:"font-medium text-sm line-clamp-2 h-10 overflow-hidden",children:e.name})}),t.jsxs("div",{className:"flex justify-between items-center mt-1",children:[e.description&&t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"w-5 h-5 flex items-center justify-center text-gray-500 cursor-help",children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-4 h-4",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})})}),t.jsx("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block",children:t.jsx("div",{className:"bg-gray-900 text-white text-xs rounded-md py-2 px-3 min-w-[400px] whitespace-normal break-words",children:e.description})})]}),t.jsx("button",{onClick:()=>b(e),disabled:i[o],className:`px-3 py-1.5 ${i[o]?"bg-gray-400 cursor-not-allowed":"bg-blue-500 hover:bg-blue-600"} text-white rounded-md transition-colors text-xs`,children:i[o]?"Loading...":"Accept"})]})]})]},r)})})})}export{O as WorkflowOption};
+import{j as t}from"./vendor-markdown-Dek94WS0.js";import{W as p,g as u,a as d}from"./message-components-DetBDgrq.js";import{r as N}from"./vendor-react-V04_Axys.js";function O({content:v,name:C="Assistant",avatar:_,latestInput:y,installedNodes:k,onAddMessage:g}){const h=JSON.parse(v),w=h.ext?.find(e=>e.type==="workflow")?.data||[],[i,c]=N.useState({}),b=async e=>{if(!e.id){console.error("No workflow id provided");return}const r=String(e.id);if(!i[r]){c(o=>({...o,[r]:!0})),p.trackEvent({event_type:"workflow_accept",message_type:"workflow",message_id:h.message_id,data:{workflow_id:e.id,workflow_name:e.name}});try{const o=await p.getOptimizedWorkflow(e.id,y);if(o.workflow){const a=new Set;if(o.workflow.nodes)for(const s of o.workflow.nodes)a.add(s.type);else for(const s of Object.values(o.workflow))a.add(s.class_type);const n=Array.from(a).filter(s=>!k.includes(s));if(console.log("[WorkflowOption] Missing node types:",n),n.length>0){try{console.log("[WorkflowOption] Fetching info for missing nodes");const s=await p.batchGetNodeInfo(n);console.log("[WorkflowOption] Received node infos:",s);const m={text:"",ext:[{type:"node_install_guide",data:s.map(l=>({name:l.name,repository_url:l.github_url}))}]},f={id:u(),role:"ai",content:JSON.stringify(m),format:"markdown",name:"Assistant",metadata:{pendingWorkflow:o.workflow,optimizedParams:o.optimized_params}};g?.(f)}catch(s){console.error("[WorkflowOption] Error fetching node info:",s),alert("Error checking required nodes. Please try again.")}finally{c(s=>({...s,[r]:!1}))}return}j(o.workflow,o.optimized_params)}}catch(o){console.error("Failed to optimize workflow:",o),alert("Failed to optimize workflow. Please try again.")}finally{c(o=>({...o,[r]:!1}))}}},j=(e,r)=>{e.nodes?d.loadGraphData(e):d.loadApiJson(e);for(const[a,n,s,m,f]of r){const l=d.graph._nodes_by_id[a].widgets;for(const x of l)x.name===m&&(x.value=f)}d.graph.setDirtyCanvas(!1,!0);const o={id:u(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};g?.(o)};return t.jsx("div",{className:"space-y-3",children:w.length>0&&t.jsx("div",{className:"flex flex-col space-y-4",children:w.map((e,r)=>{const o=e.id?String(e.id):"";return t.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg border border-gray-200 hover:bg-gray-50",children:[e.image&&t.jsx("img",{src:e.image,alt:e.name,className:"w-14 h-14 object-cover rounded-lg",onError:a=>{const n=a.target;n.onerror=null,n.src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56' fill='none'%3E%3Crect width='56' height='56' fill='%23F3F4F6'/%3E%3Cpath d='M28 28C30.2091 28 32 26.2091 32 24C32 21.7909 30.2091 20 28 20C25.7909 20 24 21.7909 24 24C24 26.2091 25.7909 28 28 28Z' fill='%239CA3AF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18.7253 37.6307C19.8278 35.1533 22.6897 33.6 26 33.6H30C33.3103 33.6 36.1722 35.1533 37.2747 37.6307C37.6419 38.4561 37.0611 39.2 36.1694 39.2H19.8306C18.9389 39.2 18.3581 38.4561 18.7253 37.6307Z' fill='%239CA3AF'/%3E%3C/svg%3E"}}),t.jsxs("div",{className:"flex-1 break-words flex flex-col h-[4.5rem] justify-between",children:[t.jsx("div",{children:t.jsx("h3",{className:"font-medium text-sm line-clamp-2 h-10 overflow-hidden",children:e.name})}),t.jsxs("div",{className:"flex justify-between items-center mt-1",children:[e.description&&t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"w-5 h-5 flex items-center justify-center text-gray-500 cursor-help",children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-4 h-4",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})})}),t.jsx("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block",children:t.jsx("div",{className:"bg-gray-900 text-white text-xs rounded-md py-2 px-3 min-w-[400px] whitespace-normal break-words",children:e.description})})]}),t.jsx("button",{onClick:()=>b(e),disabled:i[o],className:`px-3 py-1.5 ${i[o]?"bg-gray-400 cursor-not-allowed":"bg-blue-500 hover:bg-blue-600"} text-white rounded-md transition-colors text-xs`,children:i[o]?"Loading...":"Accept"})]})]})]},r)})})})}export{O as WorkflowOption};
diff --git a/dist/copilot_web/input.js b/dist/copilot_web/input.js
index d68ced3..e9cc5c8 100644
--- a/dist/copilot_web/input.js
+++ b/dist/copilot_web/input.js
@@ -1,2 +1,2 @@
-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/App-B1wDjeqw.js","copilot_web/vendor-markdown-Dek94WS0.js","copilot_web/vendor-react-V04_Axys.js","copilot_web/message-components-DHkIj9qD.js","copilot_web/fonts.css"])))=>i.map(i=>d[i]);
-import{j as s}from"./vendor-markdown-Dek94WS0.js";import{a as w,R as p,r as x}from"./vendor-react-V04_Axys.js";import{w as v,a as g}from"./message-components-DHkIj9qD.js";/* empty css */const R="modulepreload",b=function(e){return"/"+e},m={},C=function(c,a,P){let d=Promise.resolve();if(a&&a.length>0){document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),t=r?.nonce||r?.getAttribute("nonce");d=Promise.allSettled(a.map(o=>{if(o=b(o),o in m)return;m[o]=!0;const i=o.endsWith(".css"),h=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${h}`))return;const n=document.createElement("link");if(n.rel=i?"stylesheet":R,i||(n.as="script"),n.crossOrigin="",n.href=o,t&&n.setAttribute("nonce",t),document.head.appendChild(n),i)return new Promise((y,E)=>{n.addEventListener("load",y),n.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${o}`)))})}))}function u(r){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=r,window.dispatchEvent(t),!t.defaultPrevented)throw r}return d.then(r=>{for(const t of r||[])t.status==="rejected"&&u(t.reason);return c().catch(u)})};var l={},f=w;l.createRoot=f.createRoot,l.hydrateRoot=f.hydrateRoot;const S=p.lazy(()=>C(async()=>{const{default:e}=await import("./App-B1wDjeqw.js");return{default:e}},__vite__mapDeps([0,1,2,3,4])).then(({default:e})=>({default:e})));function j(){return new Promise(e=>{if(document.body)return e(document.body);document.addEventListener("DOMContentLoaded",()=>{e(document.body)})})}j().then(()=>v()).then(()=>{g.extensionManager.registerSidebarTab({id:"comfyui-copilot",icon:"cc-icon-logo",title:"ComfyUI Copilot",tooltip:"ComfyUI Copilot",type:"custom",render:e=>{const c=document.createElement("div");c.id="comfyui-copilot-plugin",c.className="h-full w-full flex flex-col",e.style.height="100%",e.appendChild(c),l.createRoot(c).render(s.jsx(p.StrictMode,{children:s.jsx(x.Suspense,{fallback:s.jsx("div",{className:"h-full w-full flex items-center justify-center",children:"Loading..."}),children:s.jsx(S,{})})}))}})});export{C as _};
+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/App-BIRStlbS.js","copilot_web/vendor-markdown-Dek94WS0.js","copilot_web/vendor-react-V04_Axys.js","copilot_web/message-components-DetBDgrq.js","copilot_web/fonts.css"])))=>i.map(i=>d[i]);
+import{j as s}from"./vendor-markdown-Dek94WS0.js";import{a as w,R as p,r as x}from"./vendor-react-V04_Axys.js";import{w as v,a as g}from"./message-components-DetBDgrq.js";/* empty css */const R="modulepreload",b=function(e){return"/"+e},m={},C=function(c,a,P){let d=Promise.resolve();if(a&&a.length>0){document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),t=r?.nonce||r?.getAttribute("nonce");d=Promise.allSettled(a.map(o=>{if(o=b(o),o in m)return;m[o]=!0;const i=o.endsWith(".css"),h=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${h}`))return;const n=document.createElement("link");if(n.rel=i?"stylesheet":R,i||(n.as="script"),n.crossOrigin="",n.href=o,t&&n.setAttribute("nonce",t),document.head.appendChild(n),i)return new Promise((y,E)=>{n.addEventListener("load",y),n.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${o}`)))})}))}function u(r){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=r,window.dispatchEvent(t),!t.defaultPrevented)throw r}return d.then(r=>{for(const t of r||[])t.status==="rejected"&&u(t.reason);return c().catch(u)})};var l={},f=w;l.createRoot=f.createRoot,l.hydrateRoot=f.hydrateRoot;const S=p.lazy(()=>C(async()=>{const{default:e}=await import("./App-BIRStlbS.js");return{default:e}},__vite__mapDeps([0,1,2,3,4])).then(({default:e})=>({default:e})));function j(){return new Promise(e=>{if(document.body)return e(document.body);document.addEventListener("DOMContentLoaded",()=>{e(document.body)})})}j().then(()=>v()).then(()=>{g.extensionManager.registerSidebarTab({id:"comfyui-copilot",icon:"cc-icon-logo",title:"ComfyUI Copilot",tooltip:"ComfyUI Copilot",type:"custom",render:e=>{const c=document.createElement("div");c.id="comfyui-copilot-plugin",c.className="h-full w-full flex flex-col",e.style.height="100%",e.appendChild(c),l.createRoot(c).render(s.jsx(p.StrictMode,{children:s.jsx(x.Suspense,{fallback:s.jsx("div",{className:"h-full w-full flex items-center justify-center",children:"Loading..."}),children:s.jsx(S,{})})}))}})});export{C as _};
diff --git a/dist/copilot_web/message-components-DHkIj9qD.js b/dist/copilot_web/message-components-DetBDgrq.js
similarity index 89%
rename from dist/copilot_web/message-components-DHkIj9qD.js
rename to dist/copilot_web/message-components-DetBDgrq.js
index 0e21096..bc6123b 100644
--- a/dist/copilot_web/message-components-DHkIj9qD.js
+++ b/dist/copilot_web/message-components-DetBDgrq.js
@@ -1,30 +1,30 @@
-import{r as He,R as eI}from"./vendor-react-V04_Axys.js";import{j as S,M as tI,r as rI,a as iI,b as nI,c as aI}from"./vendor-markdown-Dek94WS0.js";let Mt=null;const mp=location.pathname.split("/").slice(0,-1).join("/");let oI=null;async function Mpe(){try{await Promise.all([import(mp+"/scripts/api.js").then(i=>{oI=i?.api}),import(mp+"/scripts/app.js").then(i=>{Mt=i?.app})])}catch(i){console.error("waitForApp error",i)}}const W$={messages:[],selectedNode:null,installedNodes:[],loading:!1,sessionId:null,showChat:!1,activeTab:"chat",screenState:null};function sI(i,r){switch(r.type){case"SET_MESSAGES":return{...i,messages:r.payload};case"ADD_MESSAGE":return{...i,messages:[...i.messages,r.payload]};case"UPDATE_MESSAGE":return{...i,messages:i.messages.map(e=>e.id===r.payload.id&&!e.finished?r.payload:e)};case"SET_SELECTED_NODE":return{...i,selectedNode:r.payload};case"SET_INSTALLED_NODES":return{...i,installedNodes:r.payload};case"SET_LOADING":return{...i,loading:r.payload};case"SET_SESSION_ID":return{...i,sessionId:r.payload};case"SET_SHOW_CHAT":return{...i,showChat:r.payload};case"SET_ACTIVE_TAB":return{...i,activeTab:r.payload};case"SET_SCREEN_STATE":return{...i,screenState:r.payload};case"CLEAR_MESSAGES":return{...i,messages:[]};default:return i}}const U$=He.createContext({state:W$,dispatch:()=>null});function Bpe({children:i}){const[r,e]=He.useReducer(sI,W$);return eI.useEffect(()=>{r.sessionId&&r.messages.length>0&&localStorage.setItem(`messages_${r.sessionId}`,JSON.stringify(r.messages))},[r.messages,r.sessionId]),S.jsx(U$.Provider,{value:{state:r,dispatch:e},children:i})}function uI(){const i=He.useContext(U$);if(!i)throw new Error("useChatContext must be used within a ChatProvider");return i}const Ff={apiBaseUrl:"https://comfyui-copilot-server-pre.onrender.com"};function Sr(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){const r=Math.random()*16|0;return(i==="x"?r:r&3|8).toString(16)})}var lI="0123456789abcdefghijklmnopqrstuvwxyz";function Or(i){return lI.charAt(i)}function hI(i,r){return i&r}function ys(i,r){return i|r}function bp(i,r){return i^r}function $p(i,r){return i&~r}function cI(i){if(i==0)return-1;var r=0;return i&65535||(i>>=16,r+=16),i&255||(i>>=8,r+=8),i&15||(i>>=4,r+=4),i&3||(i>>=2,r+=2),i&1||++r,r}function dI(i){for(var r=0;i!=0;)i&=i-1,++r;return r}var Pn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K$="=";function Iu(i){var r,e,t="";for(r=0;r+3<=i.length;r+=3)e=parseInt(i.substring(r,r+3),16),t+=Pn.charAt(e>>6)+Pn.charAt(e&63);for(r+1==i.length?(e=parseInt(i.substring(r,r+1),16),t+=Pn.charAt(e<<2)):r+2==i.length&&(e=parseInt(i.substring(r,r+2),16),t+=Pn.charAt(e>>2)+Pn.charAt((e&3)<<4));(t.length&3)>0;)t+=K$;return t}function wp(i){var r="",e,t=0,n=0;for(e=0;e>2),n=a&3,t=1):t==1?(r+=Or(n<<2|a>>4),n=a&15,t=2):t==2?(r+=Or(n),r+=Or(a>>2),n=a&3,t=3):(r+=Or(n<<2|a>>4),r+=Or(a&15),t=0))}return t==1&&(r+=Or(n<<2)),r}var pn,fI={decode:function(i){var r;if(pn===void 0){var e="0123456789ABCDEF",t=` \f
+import{r as Ve,R as eI}from"./vendor-react-V04_Axys.js";import{j as S,M as tI,r as rI,a as iI,b as nI,c as aI}from"./vendor-markdown-Dek94WS0.js";let Mt=null;const mp=location.pathname.split("/").slice(0,-1).join("/");let oI=null;async function Mpe(){try{await Promise.all([import(mp+"/scripts/api.js").then(i=>{oI=i?.api}),import(mp+"/scripts/app.js").then(i=>{Mt=i?.app})])}catch(i){console.error("waitForApp error",i)}}const W$={messages:[],selectedNode:null,installedNodes:[],loading:!1,sessionId:null,showChat:!1,activeTab:"chat",screenState:null};function sI(i,r){switch(r.type){case"SET_MESSAGES":return{...i,messages:r.payload};case"ADD_MESSAGE":return{...i,messages:[...i.messages,r.payload]};case"UPDATE_MESSAGE":return{...i,messages:i.messages.map(e=>e.id===r.payload.id&&!e.finished?r.payload:e)};case"SET_SELECTED_NODE":return{...i,selectedNode:r.payload};case"SET_INSTALLED_NODES":return{...i,installedNodes:r.payload};case"SET_LOADING":return{...i,loading:r.payload};case"SET_SESSION_ID":return{...i,sessionId:r.payload};case"SET_SHOW_CHAT":return{...i,showChat:r.payload};case"SET_ACTIVE_TAB":return{...i,activeTab:r.payload};case"SET_SCREEN_STATE":return{...i,screenState:r.payload};case"CLEAR_MESSAGES":return{...i,messages:[]};default:return i}}const U$=Ve.createContext({state:W$,dispatch:()=>null});function Bpe({children:i}){const[r,e]=Ve.useReducer(sI,W$);return eI.useEffect(()=>{r.sessionId&&r.messages.length>0&&localStorage.setItem(`messages_${r.sessionId}`,JSON.stringify(r.messages))},[r.messages,r.sessionId]),S.jsx(U$.Provider,{value:{state:r,dispatch:e},children:i})}function uI(){const i=Ve.useContext(U$);if(!i)throw new Error("useChatContext must be used within a ChatProvider");return i}const Ff={apiBaseUrl:"https://comfyui-copilot-server-pre.onrender.com"};function Sr(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){const r=Math.random()*16|0;return(i==="x"?r:r&3|8).toString(16)})}var lI="0123456789abcdefghijklmnopqrstuvwxyz";function Or(i){return lI.charAt(i)}function hI(i,r){return i&r}function ys(i,r){return i|r}function bp(i,r){return i^r}function $p(i,r){return i&~r}function cI(i){if(i==0)return-1;var r=0;return i&65535||(i>>=16,r+=16),i&255||(i>>=8,r+=8),i&15||(i>>=4,r+=4),i&3||(i>>=2,r+=2),i&1||++r,r}function dI(i){for(var r=0;i!=0;)i&=i-1,++r;return r}var Pn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K$="=";function Iu(i){var r,e,t="";for(r=0;r+3<=i.length;r+=3)e=parseInt(i.substring(r,r+3),16),t+=Pn.charAt(e>>6)+Pn.charAt(e&63);for(r+1==i.length?(e=parseInt(i.substring(r,r+1),16),t+=Pn.charAt(e<<2)):r+2==i.length&&(e=parseInt(i.substring(r,r+2),16),t+=Pn.charAt(e>>2)+Pn.charAt((e&3)<<4));(t.length&3)>0;)t+=K$;return t}function wp(i){var r="",e,t=0,n=0;for(e=0;e>2),n=a&3,t=1):t==1?(r+=Or(n<<2|a>>4),n=a&15,t=2):t==2?(r+=Or(n),r+=Or(a>>2),n=a&3,t=3):(r+=Or(n<<2|a>>4),r+=Or(a&15),t=0))}return t==1&&(r+=Or(n<<2)),r}var pn,fI={decode:function(i){var r;if(pn===void 0){var e="0123456789ABCDEF",t=` \f
\r \u2028\u2029`;for(pn={},r=0;r<16;++r)pn[e.charAt(r)]=r;for(e=e.toLowerCase(),r=10;r<16;++r)pn[e.charAt(r)]=r;for(r=0;r=2?(n[n.length]=a,a=0,o=0):a<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return n}},Si,wd={decode:function(i){var r;if(Si===void 0){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=`= \f
\r \u2028\u2029`;for(Si=Object.create(null),r=0;r<64;++r)Si[e.charAt(r)]=r;for(Si["-"]=62,Si._=63,r=0;r=4?(n[n.length]=a>>16,n[n.length]=a>>8&255,n[n.length]=a&255,a=0,o=0):a<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=a>>10;break;case 3:n[n.length]=a>>16,n[n.length]=a>>8&255;break}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(i){var r=wd.re.exec(i);if(r)if(r[1])i=r[1];else if(r[2])i=r[2];else throw new Error("RegExp out of sync");return wd.decode(i)}},gn=1e13,Ua=function(){function i(r){this.buf=[+r||0]}return i.prototype.mulAdd=function(r,e){var t=this.buf,n=t.length,a,o;for(a=0;a0&&(t[a]=e)},i.prototype.sub=function(r){var e=this.buf,t=e.length,n,a;for(n=0;n=0;--n)t+=(gn+e[n]).toString().substring(1);return t},i.prototype.valueOf=function(){for(var r=this.buf,e=0,t=r.length-1;t>=0;--t)e=e*gn+r[t];return e},i.prototype.simplify=function(){var r=this.buf;return r.length==1?r[0]:this},i}(),G$="…",vI=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,pI=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function Wn(i,r){return i.length>r&&(i=i.substring(0,r)+G$),i}var nh=function(){function i(r,e){this.hexDigits="0123456789ABCDEF",r instanceof i?(this.enc=r.enc,this.pos=r.pos):(this.enc=r,this.pos=e)}return i.prototype.get=function(r){if(r===void 0&&(r=this.pos++),r>=this.enc.length)throw new Error("Requesting byte offset ".concat(r," on a stream of length ").concat(this.enc.length));return typeof this.enc=="string"?this.enc.charCodeAt(r):this.enc[r]},i.prototype.hexByte=function(r){return this.hexDigits.charAt(r>>4&15)+this.hexDigits.charAt(r&15)},i.prototype.hexDump=function(r,e,t){for(var n="",a=r;a176)return!1}return!0},i.prototype.parseStringISO=function(r,e){for(var t="",n=r;n191&&a<224?t+=String.fromCharCode((a&31)<<6|this.get(n++)&63):t+=String.fromCharCode((a&15)<<12|(this.get(n++)&63)<<6|this.get(n++)&63)}return t},i.prototype.parseStringBMP=function(r,e){for(var t="",n,a,o=r;o127,a=n?255:0,o,s="";t==a&&++r4){for(s=t,o<<=3;!((+s^a)&128);)s=+s<<1,--o;s="("+o+` bit)
`}n&&(t=t-256);for(var u=new Ua(t),l=r+1;l=h;--d)s+=l>>d&1?"1":"0";if(s.length>t)return o+Wn(s,t)}return o+s},i.prototype.parseOctetString=function(r,e,t){if(this.isASCII(r,e))return Wn(this.parseStringISO(r,e),t);var n=e-r,a="("+n+` byte)
`;t/=2,n>t&&(e=r+t);for(var o=r;ot&&(a+=G$),a},i.prototype.parseOID=function(r,e,t){for(var n="",a=new Ua,o=0,s=r;st)return Wn(n,t);a=new Ua,o=0}}return o>0&&(n+=".incomplete"),n},i}(),gI=function(){function i(r,e,t,n,a){if(!(n instanceof _p))throw new Error("Invalid tag value.");this.stream=r,this.header=e,this.length=t,this.tag=n,this.sub=a}return i.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},i.prototype.content=function(r){if(this.tag===void 0)return null;r===void 0&&(r=1/0);var e=this.posContent(),t=Math.abs(this.length);if(!this.tag.isUniversal())return this.sub!==null?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+t,r);switch(this.tag.tagNumber){case 1:return this.stream.get(e)===0?"false":"true";case 2:return this.stream.parseInteger(e,e+t);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+t,r);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+t,r);case 6:return this.stream.parseOID(e,e+t,r);case 16:case 17:return this.sub!==null?"("+this.sub.length+" elem)":"(no elem)";case 12:return Wn(this.stream.parseStringUTF(e,e+t),r);case 18:case 19:case 20:case 21:case 22:case 26:return Wn(this.stream.parseStringISO(e,e+t),r);case 30:return Wn(this.stream.parseStringBMP(e,e+t),r);case 23:case 24:return this.stream.parseTime(e,e+t,this.tag.tagNumber==23)}return null},i.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(this.sub===null?"null":this.sub.length)+"]"},i.prototype.toPrettyString=function(r){r===void 0&&(r="");var e=r+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":this.tag.isUniversal()&&(this.tag.tagNumber==3||this.tag.tagNumber==4)&&this.sub!==null&&(e+=" (encapsulates)"),e+=`
-`,this.sub!==null){r+=" ";for(var t=0,n=this.sub.length;t6)throw new Error("Length over 48 bits not supported at position "+(r.pos-1));if(t===0)return null;e=0;for(var n=0;n>6,this.tagConstructed=(e&32)!==0,this.tagNumber=e&31,this.tagNumber==31){var t=new Ua;do e=r.get(),t.mulAdd(128,e&127);while(e&128);this.tagNumber=t.simplify()}}return i.prototype.isUniversal=function(){return this.tagClass===0},i.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},i}(),ti,yI=0xdeadbeefcafe,Ep=(yI&16777215)==15715070,ct=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],mI=(1<<26)/ct[ct.length-1],Q=function(){function i(r,e,t){r!=null&&(typeof r=="number"?this.fromNumber(r,e,t):e==null&&typeof r!="string"?this.fromString(r,256):this.fromString(r,e))}return i.prototype.toString=function(r){if(this.s<0)return"-"+this.negate().toString(r);var e;if(r==16)e=4;else if(r==8)e=3;else if(r==2)e=1;else if(r==32)e=5;else if(r==4)e=2;else return this.toRadix(r);var t=(1<0)for(u>u)>0&&(a=!0,o=Or(n));s>=0;)u>(u+=this.DB-e)):(n=this[s]>>(u-=e)&t,u<=0&&(u+=this.DB,--s)),n>0&&(a=!0),a&&(o+=Or(n));return a?o:"0"},i.prototype.negate=function(){var r=re();return i.ZERO.subTo(this,r),r},i.prototype.abs=function(){return this.s<0?this.negate():this},i.prototype.compareTo=function(r){var e=this.s-r.s;if(e!=0)return e;var t=this.t;if(e=t-r.t,e!=0)return this.s<0?-e:e;for(;--t>=0;)if((e=this[t]-r[t])!=0)return e;return 0},i.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+ms(this[this.t-1]^this.s&this.DM)},i.prototype.mod=function(r){var e=re();return this.abs().divRemTo(r,null,e),this.s<0&&e.compareTo(i.ZERO)>0&&r.subTo(e,e),e},i.prototype.modPowInt=function(r,e){var t;return r<256||e.isEven()?t=new Sp(e):t=new Op(e),this.exp(r,t)},i.prototype.clone=function(){var r=re();return this.copyTo(r),r},i.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<>24},i.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},i.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},i.prototype.toByteArray=function(){var r=this.t,e=[];e[0]=this.s;var t=this.DB-r*this.DB%8,n,a=0;if(r-- >0)for(t>t)!=(this.s&this.DM)>>t&&(e[a++]=n|this.s<=0;)t<8?(n=(this[r]&(1<>(t+=this.DB-8)):(n=this[r]>>(t-=8)&255,t<=0&&(t+=this.DB,--r)),n&128&&(n|=-256),a==0&&(this.s&128)!=(n&128)&&++a,(a>0||n!=this.s)&&(e[a++]=n);return e},i.prototype.equals=function(r){return this.compareTo(r)==0},i.prototype.min=function(r){return this.compareTo(r)<0?this:r},i.prototype.max=function(r){return this.compareTo(r)>0?this:r},i.prototype.and=function(r){var e=re();return this.bitwiseTo(r,hI,e),e},i.prototype.or=function(r){var e=re();return this.bitwiseTo(r,ys,e),e},i.prototype.xor=function(r){var e=re();return this.bitwiseTo(r,bp,e),e},i.prototype.andNot=function(r){var e=re();return this.bitwiseTo(r,$p,e),e},i.prototype.not=function(){for(var r=re(),e=0;e=this.t?this.s!=0:(this[e]&1<1){var d=re();for(o.sqrTo(s[1],d);u<=h;)s[u]=re(),o.mulTo(d,s[u-2],s[u]),u+=2}var c=r.t-1,f,v=!0,p=re(),g;for(t=ms(r[c])-1;c>=0;){for(t>=l?f=r[c]>>t-l&h:(f=(r[c]&(1<0&&(f|=r[c-1]>>this.DB+t-l)),u=n;!(f&1);)f>>=1,--u;if((t-=u)<0&&(t+=this.DB,--c),v)s[f].copyTo(a),v=!1;else{for(;u>1;)o.sqrTo(a,p),o.sqrTo(p,a),u-=2;u>0?o.sqrTo(a,p):(g=a,a=p,p=g),o.mulTo(p,s[f],a)}for(;c>=0&&!(r[c]&1<=0?(t.subTo(n,t),e&&a.subTo(s,a),o.subTo(u,o)):(n.subTo(t,n),e&&s.subTo(a,s),u.subTo(o,u))}if(n.compareTo(i.ONE)!=0)return i.ZERO;if(u.compareTo(r)>=0)return u.subtract(r);if(u.signum()<0)u.addTo(r,u);else return u;return u.signum()<0?u.add(r):u},i.prototype.pow=function(r){return this.exp(r,new bI)},i.prototype.gcd=function(r){var e=this.s<0?this.negate():this.clone(),t=r.s<0?r.negate():r.clone();if(e.compareTo(t)<0){var n=e;e=t,t=n}var a=e.getLowestSetBit(),o=t.getLowestSetBit();if(o<0)return e;for(a0&&(e.rShiftTo(o,e),t.rShiftTo(o,t));e.signum()>0;)(a=e.getLowestSetBit())>0&&e.rShiftTo(a,e),(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),e.compareTo(t)>=0?(e.subTo(t,e),e.rShiftTo(1,e)):(t.subTo(e,t),t.rShiftTo(1,t));return o>0&&t.lShiftTo(o,t),t},i.prototype.isProbablePrime=function(r){var e,t=this.abs();if(t.t==1&&t[0]<=ct[ct.length-1]){for(e=0;e=0;--e)r[e]=this[e];r.t=this.t,r.s=this.s},i.prototype.fromInt=function(r){this.t=1,this.s=r<0?-1:0,r>0?this[0]=r:r<-1?this[0]=r+this.DV:this.t=0},i.prototype.fromString=function(r,e){var t;if(e==16)t=4;else if(e==8)t=3;else if(e==256)t=8;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else{this.fromRadix(r,e);return}this.t=0,this.s=0;for(var n=r.length,a=!1,o=0;--n>=0;){var s=t==8?+r[n]&255:Ip(r,n);if(s<0){r.charAt(n)=="-"&&(a=!0);continue}a=!1,o==0?this[this.t++]=s:o+t>this.DB?(this[this.t-1]|=(s&(1<>this.DB-o):this[this.t-1]|=s<=this.DB&&(o-=this.DB)}t==8&&+r[0]&128&&(this.s=-1,o>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==r;)--this.t},i.prototype.dlShiftTo=function(r,e){var t;for(t=this.t-1;t>=0;--t)e[t+r]=this[t];for(t=r-1;t>=0;--t)e[t]=0;e.t=this.t+r,e.s=this.s},i.prototype.drShiftTo=function(r,e){for(var t=r;t=0;--u)e[u+o+1]=this[u]>>n|s,s=(this[u]&a)<=0;--u)e[u]=0;e[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},i.prototype.rShiftTo=function(r,e){e.s=this.s;var t=Math.floor(r/this.DB);if(t>=this.t){e.t=0;return}var n=r%this.DB,a=this.DB-n,o=(1<>n;for(var s=t+1;s>n;n>0&&(e[this.t-t-1]|=(this.s&o)<>=this.DB;if(r.t>=this.DB;n+=this.s}else{for(n+=this.s;t>=this.DB;n-=r.s}e.s=n<0?-1:0,n<-1?e[t++]=this.DV+n:n>0&&(e[t++]=n),e.t=t,e.clamp()},i.prototype.multiplyTo=function(r,e){var t=this.abs(),n=r.abs(),a=t.t;for(e.t=a+n.t;--a>=0;)e[a]=0;for(a=0;a=0;)r[t]=0;for(t=0;t=e.DV&&(r[t+e.t]-=e.DV,r[t+e.t+1]=1)}r.t>0&&(r[r.t-1]+=e.am(t,e[t],r,2*t,0,1)),r.s=0,r.clamp()},i.prototype.divRemTo=function(r,e,t){var n=r.abs();if(!(n.t<=0)){var a=this.abs();if(a.t0?(n.lShiftTo(l,o),a.lShiftTo(l,t)):(n.copyTo(o),a.copyTo(t));var h=o.t,d=o[h-1];if(d!=0){var c=d*(1<1?o[h-2]>>this.F2:0),f=this.FV/c,v=(1<=0&&(t[t.t++]=1,t.subTo(m,t)),i.ONE.dlShiftTo(h,m),m.subTo(o,o);o.t=0;){var b=t[--g]==d?this.DM:Math.floor(t[g]*f+(t[g-1]+p)*v);if((t[g]+=o.am(0,b,t,y,0,h))0&&t.rShiftTo(l,t),s<0&&i.ZERO.subTo(t,t)}}},i.prototype.invDigit=function(){if(this.t<1)return 0;var r=this[0];if(!(r&1))return 0;var e=r&3;return e=e*(2-(r&15)*e)&15,e=e*(2-(r&255)*e)&255,e=e*(2-((r&65535)*e&65535))&65535,e=e*(2-r*e%this.DV)%this.DV,e>0?this.DV-e:-e},i.prototype.isEven=function(){return(this.t>0?this[0]&1:this.s)==0},i.prototype.exp=function(r,e){if(r>4294967295||r<1)return i.ONE;var t=re(),n=re(),a=e.convert(this),o=ms(r)-1;for(a.copyTo(t);--o>=0;)if(e.sqrTo(t,n),(r&1<0)e.mulTo(n,a,t);else{var s=t;t=n,n=s}return e.revert(t)},i.prototype.chunkSize=function(r){return Math.floor(Math.LN2*this.DB/Math.log(r))},i.prototype.toRadix=function(r){if(r==null&&(r=10),this.signum()==0||r<2||r>36)return"0";var e=this.chunkSize(r),t=Math.pow(r,e),n=qr(t),a=re(),o=re(),s="";for(this.divRemTo(n,a,o);a.signum()>0;)s=(t+o.intValue()).toString(r).substr(1)+s,a.divRemTo(n,a,o);return o.intValue().toString(r)+s},i.prototype.fromRadix=function(r,e){this.fromInt(0),e==null&&(e=10);for(var t=this.chunkSize(e),n=Math.pow(e,t),a=!1,o=0,s=0,u=0;u=t&&(this.dMultiply(n),this.dAddOffset(s,0),o=0,s=0)}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),a&&i.ZERO.subTo(this,this)},i.prototype.fromNumber=function(r,e,t){if(typeof e=="number")if(r<2)this.fromInt(1);else for(this.fromNumber(r,t),this.testBit(r-1)||this.bitwiseTo(i.ONE.shiftLeft(r-1),ys,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>r&&this.subTo(i.ONE.shiftLeft(r-1),this);else{var n=[],a=r&7;n.length=(r>>3)+1,e.nextBytes(n),a>0?n[0]&=(1<>=this.DB;if(r.t>=this.DB;n+=this.s}else{for(n+=this.s;t>=this.DB;n+=r.s}e.s=n<0?-1:0,n>0?e[t++]=n:n<-1&&(e[t++]=this.DV+n),e.t=t,e.clamp()},i.prototype.dMultiply=function(r){this[this.t]=this.am(0,r-1,this,0,0,this.t),++this.t,this.clamp()},i.prototype.dAddOffset=function(r,e){if(r!=0){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=r;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},i.prototype.multiplyLowerTo=function(r,e,t){var n=Math.min(this.t+r.t,e);for(t.s=0,t.t=n;n>0;)t[--n]=0;for(var a=t.t-this.t;n=0;)t[n]=0;for(n=Math.max(e-this.t,0);n0)if(e==0)t=this[0]%r;else for(var n=this.t-1;n>=0;--n)t=(e*t+this[n])%r;return t},i.prototype.millerRabin=function(r){var e=this.subtract(i.ONE),t=e.getLowestSetBit();if(t<=0)return!1;var n=e.shiftRight(t);r=r+1>>1,r>ct.length&&(r=ct.length);for(var a=re(),o=0;o0&&(t.rShiftTo(s,t),n.rShiftTo(s,n));var u=function(){(o=t.getLowestSetBit())>0&&t.rShiftTo(o,t),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n)),t.signum()>0?setTimeout(u,0):(s>0&&n.lShiftTo(s,n),setTimeout(function(){e(n)},0))};setTimeout(u,10)},i.prototype.fromNumberAsync=function(r,e,t,n){if(typeof e=="number")if(r<2)this.fromInt(1);else{this.fromNumber(r,t),this.testBit(r-1)||this.bitwiseTo(i.ONE.shiftLeft(r-1),ys,this),this.isEven()&&this.dAddOffset(1,0);var a=this,o=function(){a.dAddOffset(2,0),a.bitLength()>r&&a.subTo(i.ONE.shiftLeft(r-1),a),a.isProbablePrime(e)?setTimeout(function(){n()},0):setTimeout(o,0)};setTimeout(o,0)}else{var s=[],u=r&7;s.length=(r>>3)+1,e.nextBytes(s),u>0?s[0]&=(1<=0?r.mod(this.m):r},i.prototype.revert=function(r){return r},i.prototype.reduce=function(r){r.divRemTo(this.m,null,r)},i.prototype.mulTo=function(r,e,t){r.multiplyTo(e,t),this.reduce(t)},i.prototype.sqrTo=function(r,e){r.squareTo(e),this.reduce(e)},i}(),Op=function(){function i(r){this.m=r,this.mp=r.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e},i.prototype.revert=function(r){var e=re();return r.copyTo(e),this.reduce(e),e},i.prototype.reduce=function(r){for(;r.t<=this.mt2;)r[r.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&r.DM;for(t=e+this.m.t,r[t]+=this.m.am(0,n,r,e,0,this.m.t);r[t]>=r.DV;)r[t]-=r.DV,r[++t]++}r.clamp(),r.drShiftTo(this.m.t,r),r.compareTo(this.m)>=0&&r.subTo(this.m,r)},i.prototype.mulTo=function(r,e,t){r.multiplyTo(e,t),this.reduce(t)},i.prototype.sqrTo=function(r,e){r.squareTo(e),this.reduce(e)},i}(),$I=function(){function i(r){this.m=r,this.r2=re(),this.q3=re(),Q.ONE.dlShiftTo(2*r.t,this.r2),this.mu=this.r2.divide(r)}return i.prototype.convert=function(r){if(r.s<0||r.t>2*this.m.t)return r.mod(this.m);if(r.compareTo(this.m)<0)return r;var e=re();return r.copyTo(e),this.reduce(e),e},i.prototype.revert=function(r){return r},i.prototype.reduce=function(r){for(r.drShiftTo(this.m.t-1,this.r2),r.t>this.m.t+1&&(r.t=this.m.t+1,r.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);r.compareTo(this.r2)<0;)r.dAddOffset(1,this.m.t+1);for(r.subTo(this.r2,r);r.compareTo(this.m)>=0;)r.subTo(this.m,r)},i.prototype.mulTo=function(r,e,t){r.multiplyTo(e,t),this.reduce(t)},i.prototype.sqrTo=function(r,e){r.squareTo(e),this.reduce(e)},i}();function re(){return new Q(null)}function _e(i,r){return new Q(i,r)}var Tp=typeof navigator<"u";Tp&&Ep&&navigator.appName=="Microsoft Internet Explorer"?(Q.prototype.am=function(r,e,t,n,a,o){for(var s=e&32767,u=e>>15;--o>=0;){var l=this[r]&32767,h=this[r++]>>15,d=u*l+h*s;l=s*l+((d&32767)<<15)+t[n]+(a&1073741823),a=(l>>>30)+(d>>>15)+u*h+(a>>>30),t[n++]=l&1073741823}return a},ti=30):Tp&&Ep&&navigator.appName!="Netscape"?(Q.prototype.am=function(r,e,t,n,a,o){for(;--o>=0;){var s=e*this[r++]+t[n]+a;a=Math.floor(s/67108864),t[n++]=s&67108863}return a},ti=26):(Q.prototype.am=function(r,e,t,n,a,o){for(var s=e&16383,u=e>>14;--o>=0;){var l=this[r]&16383,h=this[r++]>>14,d=u*l+h*s;l=s*l+((d&16383)<<14)+t[n]+a,a=(l>>28)+(d>>14)+u*h,t[n++]=l&268435455}return a},ti=28);Q.prototype.DB=ti;Q.prototype.DM=(1<>>16)!=0&&(i=e,r+=16),(e=i>>8)!=0&&(i=e,r+=8),(e=i>>4)!=0&&(i=e,r+=4),(e=i>>2)!=0&&(i=e,r+=2),(e=i>>1)!=0&&(i=e,r+=1),r}Q.ZERO=qr(0);Q.ONE=qr(1);var wI=function(){function i(){this.i=0,this.j=0,this.S=[]}return i.prototype.init=function(r){var e,t,n;for(e=0;e<256;++e)this.S[e]=e;for(t=0,e=0;e<256;++e)t=t+this.S[e]+r[e%r.length]&255,n=this.S[e],this.S[e]=this.S[t],this.S[t]=n;this.i=0,this.j=0},i.prototype.next=function(){var r;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,r=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=r,this.S[r+this.S[this.i]&255]},i}();function _I(){return new wI}var q$=256,bs,Jr=null,er;if(Jr==null){Jr=[],er=0;var $s=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var ah=new Uint32Array(256);for(window.crypto.getRandomValues(ah),$s=0;$s=256||er>=q$){window.removeEventListener?window.removeEventListener("mousemove",_s,!1):window.detachEvent&&window.detachEvent("onmousemove",_s);return}try{var r=i.x+i.y;Jr[er++]=r&255,ws+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",_s,!1):window.attachEvent&&window.attachEvent("onmousemove",_s))}function EI(){if(bs==null){for(bs=_I();er=0&&r>0;){var n=i.charCodeAt(t--);n<128?e[--r]=n:n>127&&n<2048?(e[--r]=n&63|128,e[--r]=n>>6|192):(e[--r]=n&63|128,e[--r]=n>>6&63|128,e[--r]=n>>12|224)}e[--r]=0;for(var a=new _d,o=[];r>2;){for(o[0]=0;o[0]==0;)a.nextBytes(o);e[--r]=o[0]}return e[--r]=2,e[--r]=0,new Q(e)}var TI=function(){function i(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return i.prototype.doPublic=function(r){return r.modPowInt(this.e,this.n)},i.prototype.doPrivate=function(r){if(this.p==null||this.q==null)return r.modPow(this.d,this.n);for(var e=r.mod(this.p).modPow(this.dmp1,this.p),t=r.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(t)<0;)e=e.add(this.p);return e.subtract(t).multiply(this.coeff).mod(this.p).multiply(this.q).add(t)},i.prototype.setPublic=function(r,e){r!=null&&e!=null&&r.length>0&&e.length>0?(this.n=_e(r,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},i.prototype.encrypt=function(r){var e=this.n.bitLength()+7>>3,t=OI(r,e);if(t==null)return null;var n=this.doPublic(t);if(n==null)return null;for(var a=n.toString(16),o=a.length,s=0;s0&&e.length>0?(this.n=_e(r,16),this.e=parseInt(e,16),this.d=_e(t,16)):console.error("Invalid RSA private key")},i.prototype.setPrivateEx=function(r,e,t,n,a,o,s,u){r!=null&&e!=null&&r.length>0&&e.length>0?(this.n=_e(r,16),this.e=parseInt(e,16),this.d=_e(t,16),this.p=_e(n,16),this.q=_e(a,16),this.dmp1=_e(o,16),this.dmq1=_e(s,16),this.coeff=_e(u,16)):console.error("Invalid RSA private key")},i.prototype.generate=function(r,e){var t=new _d,n=r>>1;this.e=parseInt(e,16);for(var a=new Q(e,16);;){for(;this.p=new Q(r-n,1,t),!(this.p.subtract(Q.ONE).gcd(a).compareTo(Q.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new Q(n,1,t),!(this.q.subtract(Q.ONE).gcd(a).compareTo(Q.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var s=this.p.subtract(Q.ONE),u=this.q.subtract(Q.ONE),l=s.multiply(u);if(l.gcd(a).compareTo(Q.ONE)==0){this.n=this.p.multiply(this.q),this.d=a.modInverse(l),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(u),this.coeff=this.q.modInverse(this.p);break}}},i.prototype.decrypt=function(r){var e=_e(r,16),t=this.doPrivate(e);return t==null?null:II(t,this.n.bitLength()+7>>3)},i.prototype.generateAsync=function(r,e,t){var n=new _d,a=r>>1;this.e=parseInt(e,16);var o=new Q(e,16),s=this,u=function(){var l=function(){if(s.p.compareTo(s.q)<=0){var c=s.p;s.p=s.q,s.q=c}var f=s.p.subtract(Q.ONE),v=s.q.subtract(Q.ONE),p=f.multiply(v);p.gcd(o).compareTo(Q.ONE)==0?(s.n=s.p.multiply(s.q),s.d=o.modInverse(p),s.dmp1=s.d.mod(f),s.dmq1=s.d.mod(v),s.coeff=s.q.modInverse(s.p),setTimeout(function(){t()},0)):setTimeout(u,0)},h=function(){s.q=re(),s.q.fromNumberAsync(a,1,n,function(){s.q.subtract(Q.ONE).gcda(o,function(c){c.compareTo(Q.ONE)==0&&s.q.isProbablePrime(10)?setTimeout(l,0):setTimeout(h,0)})})},d=function(){s.p=re(),s.p.fromNumberAsync(r-a,1,n,function(){s.p.subtract(Q.ONE).gcda(o,function(c){c.compareTo(Q.ONE)==0&&s.p.isProbablePrime(10)?setTimeout(h,0):setTimeout(d,0)})})};setTimeout(d,0)};setTimeout(u,0)},i.prototype.sign=function(r,e,t){var n=kI(t),a=n+e(r).toString(),o=SI(a,this.n.bitLength()/4);if(o==null)return null;var s=this.doPrivate(o);if(s==null)return null;var u=s.toString(16);return u.length&1?"0"+u:u},i.prototype.verify=function(r,e,t){var n=_e(e,16),a=this.doPublic(n);if(a==null)return null;var o=a.toString(16).replace(/^1f+00/,""),s=PI(o);return s==t(r).toString()},i}();function II(i,r){for(var e=i.toByteArray(),t=0;t=e.length)return null;for(var n="";++t191&&a<224?(n+=String.fromCharCode((a&31)<<6|e[t+1]&63),++t):(n+=String.fromCharCode((a&15)<<12|(e[t+1]&63)<<6|e[t+2]&63),t+=2)}return n}var uu={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function kI(i){return uu[i]||""}function PI(i){for(var r in uu)if(uu.hasOwnProperty(r)){var e=uu[r],t=e.length;if(i.substr(0,t)==e)return i.substr(t)}return i}/*!
+`,this.sub!==null){r+=" ";for(var t=0,n=this.sub.length;t6)throw new Error("Length over 48 bits not supported at position "+(r.pos-1));if(t===0)return null;e=0;for(var n=0;n>6,this.tagConstructed=(e&32)!==0,this.tagNumber=e&31,this.tagNumber==31){var t=new Ua;do e=r.get(),t.mulAdd(128,e&127);while(e&128);this.tagNumber=t.simplify()}}return i.prototype.isUniversal=function(){return this.tagClass===0},i.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},i}(),ti,yI=0xdeadbeefcafe,Ep=(yI&16777215)==15715070,ct=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],mI=(1<<26)/ct[ct.length-1],Q=function(){function i(r,e,t){r!=null&&(typeof r=="number"?this.fromNumber(r,e,t):e==null&&typeof r!="string"?this.fromString(r,256):this.fromString(r,e))}return i.prototype.toString=function(r){if(this.s<0)return"-"+this.negate().toString(r);var e;if(r==16)e=4;else if(r==8)e=3;else if(r==2)e=1;else if(r==32)e=5;else if(r==4)e=2;else return this.toRadix(r);var t=(1<0)for(u>u)>0&&(a=!0,o=Or(n));s>=0;)u>(u+=this.DB-e)):(n=this[s]>>(u-=e)&t,u<=0&&(u+=this.DB,--s)),n>0&&(a=!0),a&&(o+=Or(n));return a?o:"0"},i.prototype.negate=function(){var r=re();return i.ZERO.subTo(this,r),r},i.prototype.abs=function(){return this.s<0?this.negate():this},i.prototype.compareTo=function(r){var e=this.s-r.s;if(e!=0)return e;var t=this.t;if(e=t-r.t,e!=0)return this.s<0?-e:e;for(;--t>=0;)if((e=this[t]-r[t])!=0)return e;return 0},i.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+ms(this[this.t-1]^this.s&this.DM)},i.prototype.mod=function(r){var e=re();return this.abs().divRemTo(r,null,e),this.s<0&&e.compareTo(i.ZERO)>0&&r.subTo(e,e),e},i.prototype.modPowInt=function(r,e){var t;return r<256||e.isEven()?t=new Sp(e):t=new Op(e),this.exp(r,t)},i.prototype.clone=function(){var r=re();return this.copyTo(r),r},i.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<>24},i.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},i.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},i.prototype.toByteArray=function(){var r=this.t,e=[];e[0]=this.s;var t=this.DB-r*this.DB%8,n,a=0;if(r-- >0)for(t>t)!=(this.s&this.DM)>>t&&(e[a++]=n|this.s<=0;)t<8?(n=(this[r]&(1<>(t+=this.DB-8)):(n=this[r]>>(t-=8)&255,t<=0&&(t+=this.DB,--r)),n&128&&(n|=-256),a==0&&(this.s&128)!=(n&128)&&++a,(a>0||n!=this.s)&&(e[a++]=n);return e},i.prototype.equals=function(r){return this.compareTo(r)==0},i.prototype.min=function(r){return this.compareTo(r)<0?this:r},i.prototype.max=function(r){return this.compareTo(r)>0?this:r},i.prototype.and=function(r){var e=re();return this.bitwiseTo(r,hI,e),e},i.prototype.or=function(r){var e=re();return this.bitwiseTo(r,ys,e),e},i.prototype.xor=function(r){var e=re();return this.bitwiseTo(r,bp,e),e},i.prototype.andNot=function(r){var e=re();return this.bitwiseTo(r,$p,e),e},i.prototype.not=function(){for(var r=re(),e=0;e=this.t?this.s!=0:(this[e]&1<1){var d=re();for(o.sqrTo(s[1],d);u<=h;)s[u]=re(),o.mulTo(d,s[u-2],s[u]),u+=2}var c=r.t-1,f,v=!0,p=re(),g;for(t=ms(r[c])-1;c>=0;){for(t>=l?f=r[c]>>t-l&h:(f=(r[c]&(1<0&&(f|=r[c-1]>>this.DB+t-l)),u=n;!(f&1);)f>>=1,--u;if((t-=u)<0&&(t+=this.DB,--c),v)s[f].copyTo(a),v=!1;else{for(;u>1;)o.sqrTo(a,p),o.sqrTo(p,a),u-=2;u>0?o.sqrTo(a,p):(g=a,a=p,p=g),o.mulTo(p,s[f],a)}for(;c>=0&&!(r[c]&1<=0?(t.subTo(n,t),e&&a.subTo(s,a),o.subTo(u,o)):(n.subTo(t,n),e&&s.subTo(a,s),u.subTo(o,u))}if(n.compareTo(i.ONE)!=0)return i.ZERO;if(u.compareTo(r)>=0)return u.subtract(r);if(u.signum()<0)u.addTo(r,u);else return u;return u.signum()<0?u.add(r):u},i.prototype.pow=function(r){return this.exp(r,new bI)},i.prototype.gcd=function(r){var e=this.s<0?this.negate():this.clone(),t=r.s<0?r.negate():r.clone();if(e.compareTo(t)<0){var n=e;e=t,t=n}var a=e.getLowestSetBit(),o=t.getLowestSetBit();if(o<0)return e;for(a0&&(e.rShiftTo(o,e),t.rShiftTo(o,t));e.signum()>0;)(a=e.getLowestSetBit())>0&&e.rShiftTo(a,e),(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),e.compareTo(t)>=0?(e.subTo(t,e),e.rShiftTo(1,e)):(t.subTo(e,t),t.rShiftTo(1,t));return o>0&&t.lShiftTo(o,t),t},i.prototype.isProbablePrime=function(r){var e,t=this.abs();if(t.t==1&&t[0]<=ct[ct.length-1]){for(e=0;e=0;--e)r[e]=this[e];r.t=this.t,r.s=this.s},i.prototype.fromInt=function(r){this.t=1,this.s=r<0?-1:0,r>0?this[0]=r:r<-1?this[0]=r+this.DV:this.t=0},i.prototype.fromString=function(r,e){var t;if(e==16)t=4;else if(e==8)t=3;else if(e==256)t=8;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else{this.fromRadix(r,e);return}this.t=0,this.s=0;for(var n=r.length,a=!1,o=0;--n>=0;){var s=t==8?+r[n]&255:Ip(r,n);if(s<0){r.charAt(n)=="-"&&(a=!0);continue}a=!1,o==0?this[this.t++]=s:o+t>this.DB?(this[this.t-1]|=(s&(1<>this.DB-o):this[this.t-1]|=s<=this.DB&&(o-=this.DB)}t==8&&+r[0]&128&&(this.s=-1,o>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==r;)--this.t},i.prototype.dlShiftTo=function(r,e){var t;for(t=this.t-1;t>=0;--t)e[t+r]=this[t];for(t=r-1;t>=0;--t)e[t]=0;e.t=this.t+r,e.s=this.s},i.prototype.drShiftTo=function(r,e){for(var t=r;t=0;--u)e[u+o+1]=this[u]>>n|s,s=(this[u]&a)<=0;--u)e[u]=0;e[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},i.prototype.rShiftTo=function(r,e){e.s=this.s;var t=Math.floor(r/this.DB);if(t>=this.t){e.t=0;return}var n=r%this.DB,a=this.DB-n,o=(1<>n;for(var s=t+1;s>n;n>0&&(e[this.t-t-1]|=(this.s&o)<>=this.DB;if(r.t>=this.DB;n+=this.s}else{for(n+=this.s;t>=this.DB;n-=r.s}e.s=n<0?-1:0,n<-1?e[t++]=this.DV+n:n>0&&(e[t++]=n),e.t=t,e.clamp()},i.prototype.multiplyTo=function(r,e){var t=this.abs(),n=r.abs(),a=t.t;for(e.t=a+n.t;--a>=0;)e[a]=0;for(a=0;a=0;)r[t]=0;for(t=0;t=e.DV&&(r[t+e.t]-=e.DV,r[t+e.t+1]=1)}r.t>0&&(r[r.t-1]+=e.am(t,e[t],r,2*t,0,1)),r.s=0,r.clamp()},i.prototype.divRemTo=function(r,e,t){var n=r.abs();if(!(n.t<=0)){var a=this.abs();if(a.t0?(n.lShiftTo(l,o),a.lShiftTo(l,t)):(n.copyTo(o),a.copyTo(t));var h=o.t,d=o[h-1];if(d!=0){var c=d*(1<1?o[h-2]>>this.F2:0),f=this.FV/c,v=(1<=0&&(t[t.t++]=1,t.subTo(m,t)),i.ONE.dlShiftTo(h,m),m.subTo(o,o);o.t=0;){var b=t[--g]==d?this.DM:Math.floor(t[g]*f+(t[g-1]+p)*v);if((t[g]+=o.am(0,b,t,y,0,h))0&&t.rShiftTo(l,t),s<0&&i.ZERO.subTo(t,t)}}},i.prototype.invDigit=function(){if(this.t<1)return 0;var r=this[0];if(!(r&1))return 0;var e=r&3;return e=e*(2-(r&15)*e)&15,e=e*(2-(r&255)*e)&255,e=e*(2-((r&65535)*e&65535))&65535,e=e*(2-r*e%this.DV)%this.DV,e>0?this.DV-e:-e},i.prototype.isEven=function(){return(this.t>0?this[0]&1:this.s)==0},i.prototype.exp=function(r,e){if(r>4294967295||r<1)return i.ONE;var t=re(),n=re(),a=e.convert(this),o=ms(r)-1;for(a.copyTo(t);--o>=0;)if(e.sqrTo(t,n),(r&1<0)e.mulTo(n,a,t);else{var s=t;t=n,n=s}return e.revert(t)},i.prototype.chunkSize=function(r){return Math.floor(Math.LN2*this.DB/Math.log(r))},i.prototype.toRadix=function(r){if(r==null&&(r=10),this.signum()==0||r<2||r>36)return"0";var e=this.chunkSize(r),t=Math.pow(r,e),n=qr(t),a=re(),o=re(),s="";for(this.divRemTo(n,a,o);a.signum()>0;)s=(t+o.intValue()).toString(r).substr(1)+s,a.divRemTo(n,a,o);return o.intValue().toString(r)+s},i.prototype.fromRadix=function(r,e){this.fromInt(0),e==null&&(e=10);for(var t=this.chunkSize(e),n=Math.pow(e,t),a=!1,o=0,s=0,u=0;u=t&&(this.dMultiply(n),this.dAddOffset(s,0),o=0,s=0)}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),a&&i.ZERO.subTo(this,this)},i.prototype.fromNumber=function(r,e,t){if(typeof e=="number")if(r<2)this.fromInt(1);else for(this.fromNumber(r,t),this.testBit(r-1)||this.bitwiseTo(i.ONE.shiftLeft(r-1),ys,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>r&&this.subTo(i.ONE.shiftLeft(r-1),this);else{var n=[],a=r&7;n.length=(r>>3)+1,e.nextBytes(n),a>0?n[0]&=(1<>=this.DB;if(r.t>=this.DB;n+=this.s}else{for(n+=this.s;t>=this.DB;n+=r.s}e.s=n<0?-1:0,n>0?e[t++]=n:n<-1&&(e[t++]=this.DV+n),e.t=t,e.clamp()},i.prototype.dMultiply=function(r){this[this.t]=this.am(0,r-1,this,0,0,this.t),++this.t,this.clamp()},i.prototype.dAddOffset=function(r,e){if(r!=0){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=r;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},i.prototype.multiplyLowerTo=function(r,e,t){var n=Math.min(this.t+r.t,e);for(t.s=0,t.t=n;n>0;)t[--n]=0;for(var a=t.t-this.t;n=0;)t[n]=0;for(n=Math.max(e-this.t,0);n0)if(e==0)t=this[0]%r;else for(var n=this.t-1;n>=0;--n)t=(e*t+this[n])%r;return t},i.prototype.millerRabin=function(r){var e=this.subtract(i.ONE),t=e.getLowestSetBit();if(t<=0)return!1;var n=e.shiftRight(t);r=r+1>>1,r>ct.length&&(r=ct.length);for(var a=re(),o=0;o0&&(t.rShiftTo(s,t),n.rShiftTo(s,n));var u=function(){(o=t.getLowestSetBit())>0&&t.rShiftTo(o,t),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n)),t.signum()>0?setTimeout(u,0):(s>0&&n.lShiftTo(s,n),setTimeout(function(){e(n)},0))};setTimeout(u,10)},i.prototype.fromNumberAsync=function(r,e,t,n){if(typeof e=="number")if(r<2)this.fromInt(1);else{this.fromNumber(r,t),this.testBit(r-1)||this.bitwiseTo(i.ONE.shiftLeft(r-1),ys,this),this.isEven()&&this.dAddOffset(1,0);var a=this,o=function(){a.dAddOffset(2,0),a.bitLength()>r&&a.subTo(i.ONE.shiftLeft(r-1),a),a.isProbablePrime(e)?setTimeout(function(){n()},0):setTimeout(o,0)};setTimeout(o,0)}else{var s=[],u=r&7;s.length=(r>>3)+1,e.nextBytes(s),u>0?s[0]&=(1<=0?r.mod(this.m):r},i.prototype.revert=function(r){return r},i.prototype.reduce=function(r){r.divRemTo(this.m,null,r)},i.prototype.mulTo=function(r,e,t){r.multiplyTo(e,t),this.reduce(t)},i.prototype.sqrTo=function(r,e){r.squareTo(e),this.reduce(e)},i}(),Op=function(){function i(r){this.m=r,this.mp=r.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e},i.prototype.revert=function(r){var e=re();return r.copyTo(e),this.reduce(e),e},i.prototype.reduce=function(r){for(;r.t<=this.mt2;)r[r.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&r.DM;for(t=e+this.m.t,r[t]+=this.m.am(0,n,r,e,0,this.m.t);r[t]>=r.DV;)r[t]-=r.DV,r[++t]++}r.clamp(),r.drShiftTo(this.m.t,r),r.compareTo(this.m)>=0&&r.subTo(this.m,r)},i.prototype.mulTo=function(r,e,t){r.multiplyTo(e,t),this.reduce(t)},i.prototype.sqrTo=function(r,e){r.squareTo(e),this.reduce(e)},i}(),$I=function(){function i(r){this.m=r,this.r2=re(),this.q3=re(),Q.ONE.dlShiftTo(2*r.t,this.r2),this.mu=this.r2.divide(r)}return i.prototype.convert=function(r){if(r.s<0||r.t>2*this.m.t)return r.mod(this.m);if(r.compareTo(this.m)<0)return r;var e=re();return r.copyTo(e),this.reduce(e),e},i.prototype.revert=function(r){return r},i.prototype.reduce=function(r){for(r.drShiftTo(this.m.t-1,this.r2),r.t>this.m.t+1&&(r.t=this.m.t+1,r.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);r.compareTo(this.r2)<0;)r.dAddOffset(1,this.m.t+1);for(r.subTo(this.r2,r);r.compareTo(this.m)>=0;)r.subTo(this.m,r)},i.prototype.mulTo=function(r,e,t){r.multiplyTo(e,t),this.reduce(t)},i.prototype.sqrTo=function(r,e){r.squareTo(e),this.reduce(e)},i}();function re(){return new Q(null)}function Se(i,r){return new Q(i,r)}var Tp=typeof navigator<"u";Tp&&Ep&&navigator.appName=="Microsoft Internet Explorer"?(Q.prototype.am=function(r,e,t,n,a,o){for(var s=e&32767,u=e>>15;--o>=0;){var l=this[r]&32767,h=this[r++]>>15,d=u*l+h*s;l=s*l+((d&32767)<<15)+t[n]+(a&1073741823),a=(l>>>30)+(d>>>15)+u*h+(a>>>30),t[n++]=l&1073741823}return a},ti=30):Tp&&Ep&&navigator.appName!="Netscape"?(Q.prototype.am=function(r,e,t,n,a,o){for(;--o>=0;){var s=e*this[r++]+t[n]+a;a=Math.floor(s/67108864),t[n++]=s&67108863}return a},ti=26):(Q.prototype.am=function(r,e,t,n,a,o){for(var s=e&16383,u=e>>14;--o>=0;){var l=this[r]&16383,h=this[r++]>>14,d=u*l+h*s;l=s*l+((d&16383)<<14)+t[n]+a,a=(l>>28)+(d>>14)+u*h,t[n++]=l&268435455}return a},ti=28);Q.prototype.DB=ti;Q.prototype.DM=(1<>>16)!=0&&(i=e,r+=16),(e=i>>8)!=0&&(i=e,r+=8),(e=i>>4)!=0&&(i=e,r+=4),(e=i>>2)!=0&&(i=e,r+=2),(e=i>>1)!=0&&(i=e,r+=1),r}Q.ZERO=qr(0);Q.ONE=qr(1);var wI=function(){function i(){this.i=0,this.j=0,this.S=[]}return i.prototype.init=function(r){var e,t,n;for(e=0;e<256;++e)this.S[e]=e;for(t=0,e=0;e<256;++e)t=t+this.S[e]+r[e%r.length]&255,n=this.S[e],this.S[e]=this.S[t],this.S[t]=n;this.i=0,this.j=0},i.prototype.next=function(){var r;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,r=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=r,this.S[r+this.S[this.i]&255]},i}();function _I(){return new wI}var q$=256,bs,Jr=null,er;if(Jr==null){Jr=[],er=0;var $s=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var ah=new Uint32Array(256);for(window.crypto.getRandomValues(ah),$s=0;$s=256||er>=q$){window.removeEventListener?window.removeEventListener("mousemove",_s,!1):window.detachEvent&&window.detachEvent("onmousemove",_s);return}try{var r=i.x+i.y;Jr[er++]=r&255,ws+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",_s,!1):window.attachEvent&&window.attachEvent("onmousemove",_s))}function EI(){if(bs==null){for(bs=_I();er=0&&r>0;){var n=i.charCodeAt(t--);n<128?e[--r]=n:n>127&&n<2048?(e[--r]=n&63|128,e[--r]=n>>6|192):(e[--r]=n&63|128,e[--r]=n>>6&63|128,e[--r]=n>>12|224)}e[--r]=0;for(var a=new _d,o=[];r>2;){for(o[0]=0;o[0]==0;)a.nextBytes(o);e[--r]=o[0]}return e[--r]=2,e[--r]=0,new Q(e)}var TI=function(){function i(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return i.prototype.doPublic=function(r){return r.modPowInt(this.e,this.n)},i.prototype.doPrivate=function(r){if(this.p==null||this.q==null)return r.modPow(this.d,this.n);for(var e=r.mod(this.p).modPow(this.dmp1,this.p),t=r.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(t)<0;)e=e.add(this.p);return e.subtract(t).multiply(this.coeff).mod(this.p).multiply(this.q).add(t)},i.prototype.setPublic=function(r,e){r!=null&&e!=null&&r.length>0&&e.length>0?(this.n=Se(r,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},i.prototype.encrypt=function(r){var e=this.n.bitLength()+7>>3,t=OI(r,e);if(t==null)return null;var n=this.doPublic(t);if(n==null)return null;for(var a=n.toString(16),o=a.length,s=0;s0&&e.length>0?(this.n=Se(r,16),this.e=parseInt(e,16),this.d=Se(t,16)):console.error("Invalid RSA private key")},i.prototype.setPrivateEx=function(r,e,t,n,a,o,s,u){r!=null&&e!=null&&r.length>0&&e.length>0?(this.n=Se(r,16),this.e=parseInt(e,16),this.d=Se(t,16),this.p=Se(n,16),this.q=Se(a,16),this.dmp1=Se(o,16),this.dmq1=Se(s,16),this.coeff=Se(u,16)):console.error("Invalid RSA private key")},i.prototype.generate=function(r,e){var t=new _d,n=r>>1;this.e=parseInt(e,16);for(var a=new Q(e,16);;){for(;this.p=new Q(r-n,1,t),!(this.p.subtract(Q.ONE).gcd(a).compareTo(Q.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new Q(n,1,t),!(this.q.subtract(Q.ONE).gcd(a).compareTo(Q.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var s=this.p.subtract(Q.ONE),u=this.q.subtract(Q.ONE),l=s.multiply(u);if(l.gcd(a).compareTo(Q.ONE)==0){this.n=this.p.multiply(this.q),this.d=a.modInverse(l),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(u),this.coeff=this.q.modInverse(this.p);break}}},i.prototype.decrypt=function(r){var e=Se(r,16),t=this.doPrivate(e);return t==null?null:II(t,this.n.bitLength()+7>>3)},i.prototype.generateAsync=function(r,e,t){var n=new _d,a=r>>1;this.e=parseInt(e,16);var o=new Q(e,16),s=this,u=function(){var l=function(){if(s.p.compareTo(s.q)<=0){var c=s.p;s.p=s.q,s.q=c}var f=s.p.subtract(Q.ONE),v=s.q.subtract(Q.ONE),p=f.multiply(v);p.gcd(o).compareTo(Q.ONE)==0?(s.n=s.p.multiply(s.q),s.d=o.modInverse(p),s.dmp1=s.d.mod(f),s.dmq1=s.d.mod(v),s.coeff=s.q.modInverse(s.p),setTimeout(function(){t()},0)):setTimeout(u,0)},h=function(){s.q=re(),s.q.fromNumberAsync(a,1,n,function(){s.q.subtract(Q.ONE).gcda(o,function(c){c.compareTo(Q.ONE)==0&&s.q.isProbablePrime(10)?setTimeout(l,0):setTimeout(h,0)})})},d=function(){s.p=re(),s.p.fromNumberAsync(r-a,1,n,function(){s.p.subtract(Q.ONE).gcda(o,function(c){c.compareTo(Q.ONE)==0&&s.p.isProbablePrime(10)?setTimeout(h,0):setTimeout(d,0)})})};setTimeout(d,0)};setTimeout(u,0)},i.prototype.sign=function(r,e,t){var n=kI(t),a=n+e(r).toString(),o=SI(a,this.n.bitLength()/4);if(o==null)return null;var s=this.doPrivate(o);if(s==null)return null;var u=s.toString(16);return u.length&1?"0"+u:u},i.prototype.verify=function(r,e,t){var n=Se(e,16),a=this.doPublic(n);if(a==null)return null;var o=a.toString(16).replace(/^1f+00/,""),s=PI(o);return s==t(r).toString()},i}();function II(i,r){for(var e=i.toByteArray(),t=0;t=e.length)return null;for(var n="";++t191&&a<224?(n+=String.fromCharCode((a&31)<<6|e[t+1]&63),++t):(n+=String.fromCharCode((a&15)<<12|(e[t+1]&63)<<6|e[t+2]&63),t+=2)}return n}var uu={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function kI(i){return uu[i]||""}function PI(i){for(var r in uu)if(uu.hasOwnProperty(r)){var e=uu[r],t=e.length;if(i.substr(0,t)==e)return i.substr(t)}return i}/*!
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
-*/var De={};De.lang={extend:function(i,r,e){if(!r||!i)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var t=function(){};if(t.prototype=r.prototype,i.prototype=new t,i.prototype.constructor=i,i.superclass=r.prototype,r.prototype.constructor==Object.prototype.constructor&&(r.prototype.constructor=r),e){var n;for(n in e)i.prototype[n]=e[n];var a=function(){},o=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(a=function(s,u){for(n=0;nMIT License
- */var T={};(typeof T.asn1>"u"||!T.asn1)&&(T.asn1={});T.asn1.ASN1Util=new function(){this.integerToByteHex=function(i){var r=i.toString(16);return r.length%2==1&&(r="0"+r),r},this.bigIntToMinTwosComplementsHex=function(i){var r=i.toString(16);if(r.substr(0,1)!="-")r.length%2==1?r="0"+r:r.match(/^[0-7]/)||(r="00"+r);else{var e=r.substr(1),t=e.length;t%2==1?t+=1:r.match(/^[0-7]/)||(t+=2);for(var n="",a=0;a"u"||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+i.length+",v="+this.hV;var r=this.hV.length/2,e=r.toString(16);if(e.length%2==1&&(e="0"+e),r<128)return e;var t=e.length/2;if(t>15)throw"ASN.1 length too long to represent by 8x: n = "+r.toString(16);var n=128+t;return n.toString(16)+e},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}};T.asn1.DERAbstractString=function(i){T.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(r){this.hTLV=null,this.isModified=!0,this.s=r,this.hV=stohex(this.s)},this.setStringHex=function(r){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.getFreshValueHex=function(){return this.hV},typeof i<"u"&&(typeof i=="string"?this.setString(i):typeof i.str<"u"?this.setString(i.str):typeof i.hex<"u"&&this.setStringHex(i.hex))};De.lang.extend(T.asn1.DERAbstractString,T.asn1.ASN1Object);T.asn1.DERAbstractTime=function(i){T.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(r){utc=r.getTime()+r.getTimezoneOffset()*6e4;var e=new Date(utc);return e},this.formatDate=function(r,e,t){var n=this.zeroPadding,a=this.localDateToUTC(r),o=String(a.getFullYear());e=="utc"&&(o=o.substr(2,2));var s=n(String(a.getMonth()+1),2),u=n(String(a.getDate()),2),l=n(String(a.getHours()),2),h=n(String(a.getMinutes()),2),d=n(String(a.getSeconds()),2),c=o+s+u+l+h+d;if(t===!0){var f=a.getMilliseconds();if(f!=0){var v=n(String(f),3);v=v.replace(/[0]+$/,""),c=c+"."+v}}return c+"Z"},this.zeroPadding=function(r,e){return r.length>=e?r:new Array(e-r.length+1).join("0")+r},this.getString=function(){return this.s},this.setString=function(r){this.hTLV=null,this.isModified=!0,this.s=r,this.hV=stohex(r)},this.setByDateValue=function(r,e,t,n,a,o){var s=new Date(Date.UTC(r,e-1,t,n,a,o,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}};De.lang.extend(T.asn1.DERAbstractTime,T.asn1.ASN1Object);T.asn1.DERAbstractStructured=function(i){T.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(r){this.hTLV=null,this.isModified=!0,this.asn1Array=r},this.appendASN1Object=function(r){this.hTLV=null,this.isModified=!0,this.asn1Array.push(r)},this.asn1Array=new Array,typeof i<"u"&&typeof i.array<"u"&&(this.asn1Array=i.array)};De.lang.extend(T.asn1.DERAbstractStructured,T.asn1.ASN1Object);T.asn1.DERBoolean=function(){T.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"};De.lang.extend(T.asn1.DERBoolean,T.asn1.ASN1Object);T.asn1.DERInteger=function(i){T.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(r){this.hTLV=null,this.isModified=!0,this.hV=T.asn1.ASN1Util.bigIntToMinTwosComplementsHex(r)},this.setByInteger=function(r){var e=new Q(String(r),10);this.setByBigInteger(e)},this.setValueHex=function(r){this.hV=r},this.getFreshValueHex=function(){return this.hV},typeof i<"u"&&(typeof i.bigint<"u"?this.setByBigInteger(i.bigint):typeof i.int<"u"?this.setByInteger(i.int):typeof i=="number"?this.setByInteger(i):typeof i.hex<"u"&&this.setValueHex(i.hex))};De.lang.extend(T.asn1.DERInteger,T.asn1.ASN1Object);T.asn1.DERBitString=function(i){if(i!==void 0&&typeof i.obj<"u"){var r=T.asn1.ASN1Util.newObject(i.obj);i.hex="00"+r.getEncodedHex()}T.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7"u"&&typeof this.s>"u"&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},i!==void 0&&(i.str!==void 0?this.setString(i.str):typeof i=="string"&&i.match(/^[0-9]{12}Z$/)?this.setString(i):i.hex!==void 0?this.setStringHex(i.hex):i.date!==void 0&&this.setByDate(i.date))};De.lang.extend(T.asn1.DERUTCTime,T.asn1.DERAbstractTime);T.asn1.DERGeneralizedTime=function(i){T.asn1.DERGeneralizedTime.superclass.constructor.call(this,i),this.hT="18",this.withMillis=!1,this.setByDate=function(r){this.hTLV=null,this.isModified=!0,this.date=r,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},i!==void 0&&(i.str!==void 0?this.setString(i.str):typeof i=="string"&&i.match(/^[0-9]{14}Z$/)?this.setString(i):i.hex!==void 0?this.setStringHex(i.hex):i.date!==void 0&&this.setByDate(i.date),i.millis===!0&&(this.withMillis=!0))};De.lang.extend(T.asn1.DERGeneralizedTime,T.asn1.DERAbstractTime);T.asn1.DERSequence=function(i){T.asn1.DERSequence.superclass.constructor.call(this,i),this.hT="30",this.getFreshValueHex=function(){for(var r="",e=0;e"u"||!T.asn1)&&(T.asn1={});T.asn1.ASN1Util=new function(){this.integerToByteHex=function(i){var r=i.toString(16);return r.length%2==1&&(r="0"+r),r},this.bigIntToMinTwosComplementsHex=function(i){var r=i.toString(16);if(r.substr(0,1)!="-")r.length%2==1?r="0"+r:r.match(/^[0-7]/)||(r="00"+r);else{var e=r.substr(1),t=e.length;t%2==1?t+=1:r.match(/^[0-7]/)||(t+=2);for(var n="",a=0;a"u"||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+i.length+",v="+this.hV;var r=this.hV.length/2,e=r.toString(16);if(e.length%2==1&&(e="0"+e),r<128)return e;var t=e.length/2;if(t>15)throw"ASN.1 length too long to represent by 8x: n = "+r.toString(16);var n=128+t;return n.toString(16)+e},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}};T.asn1.DERAbstractString=function(i){T.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(r){this.hTLV=null,this.isModified=!0,this.s=r,this.hV=stohex(this.s)},this.setStringHex=function(r){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.getFreshValueHex=function(){return this.hV},typeof i<"u"&&(typeof i=="string"?this.setString(i):typeof i.str<"u"?this.setString(i.str):typeof i.hex<"u"&&this.setStringHex(i.hex))};Ne.lang.extend(T.asn1.DERAbstractString,T.asn1.ASN1Object);T.asn1.DERAbstractTime=function(i){T.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(r){utc=r.getTime()+r.getTimezoneOffset()*6e4;var e=new Date(utc);return e},this.formatDate=function(r,e,t){var n=this.zeroPadding,a=this.localDateToUTC(r),o=String(a.getFullYear());e=="utc"&&(o=o.substr(2,2));var s=n(String(a.getMonth()+1),2),u=n(String(a.getDate()),2),l=n(String(a.getHours()),2),h=n(String(a.getMinutes()),2),d=n(String(a.getSeconds()),2),c=o+s+u+l+h+d;if(t===!0){var f=a.getMilliseconds();if(f!=0){var v=n(String(f),3);v=v.replace(/[0]+$/,""),c=c+"."+v}}return c+"Z"},this.zeroPadding=function(r,e){return r.length>=e?r:new Array(e-r.length+1).join("0")+r},this.getString=function(){return this.s},this.setString=function(r){this.hTLV=null,this.isModified=!0,this.s=r,this.hV=stohex(r)},this.setByDateValue=function(r,e,t,n,a,o){var s=new Date(Date.UTC(r,e-1,t,n,a,o,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}};Ne.lang.extend(T.asn1.DERAbstractTime,T.asn1.ASN1Object);T.asn1.DERAbstractStructured=function(i){T.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(r){this.hTLV=null,this.isModified=!0,this.asn1Array=r},this.appendASN1Object=function(r){this.hTLV=null,this.isModified=!0,this.asn1Array.push(r)},this.asn1Array=new Array,typeof i<"u"&&typeof i.array<"u"&&(this.asn1Array=i.array)};Ne.lang.extend(T.asn1.DERAbstractStructured,T.asn1.ASN1Object);T.asn1.DERBoolean=function(){T.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"};Ne.lang.extend(T.asn1.DERBoolean,T.asn1.ASN1Object);T.asn1.DERInteger=function(i){T.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(r){this.hTLV=null,this.isModified=!0,this.hV=T.asn1.ASN1Util.bigIntToMinTwosComplementsHex(r)},this.setByInteger=function(r){var e=new Q(String(r),10);this.setByBigInteger(e)},this.setValueHex=function(r){this.hV=r},this.getFreshValueHex=function(){return this.hV},typeof i<"u"&&(typeof i.bigint<"u"?this.setByBigInteger(i.bigint):typeof i.int<"u"?this.setByInteger(i.int):typeof i=="number"?this.setByInteger(i):typeof i.hex<"u"&&this.setValueHex(i.hex))};Ne.lang.extend(T.asn1.DERInteger,T.asn1.ASN1Object);T.asn1.DERBitString=function(i){if(i!==void 0&&typeof i.obj<"u"){var r=T.asn1.ASN1Util.newObject(i.obj);i.hex="00"+r.getEncodedHex()}T.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7"u"&&typeof this.s>"u"&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},i!==void 0&&(i.str!==void 0?this.setString(i.str):typeof i=="string"&&i.match(/^[0-9]{12}Z$/)?this.setString(i):i.hex!==void 0?this.setStringHex(i.hex):i.date!==void 0&&this.setByDate(i.date))};Ne.lang.extend(T.asn1.DERUTCTime,T.asn1.DERAbstractTime);T.asn1.DERGeneralizedTime=function(i){T.asn1.DERGeneralizedTime.superclass.constructor.call(this,i),this.hT="18",this.withMillis=!1,this.setByDate=function(r){this.hTLV=null,this.isModified=!0,this.date=r,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},i!==void 0&&(i.str!==void 0?this.setString(i.str):typeof i=="string"&&i.match(/^[0-9]{14}Z$/)?this.setString(i):i.hex!==void 0?this.setStringHex(i.hex):i.date!==void 0&&this.setByDate(i.date),i.millis===!0&&(this.withMillis=!0))};Ne.lang.extend(T.asn1.DERGeneralizedTime,T.asn1.DERAbstractTime);T.asn1.DERSequence=function(i){T.asn1.DERSequence.superclass.constructor.call(this,i),this.hT="30",this.getFreshValueHex=function(){for(var r="",e=0;elocalStorage.getItem("chatApiKey"),Ba=()=>{const i=localStorage.getItem("openaiApiKey"),r=localStorage.getItem("openaiBaseUrl")||"https://api.openai.com/v1",e=localStorage.getItem("rsaPublicKey");return{openaiApiKey:i||"",openaiBaseUrl:r,rsaPublicKey:e}},Ii=()=>navigator.language||"zh-CN",yn=i=>{const r=i.headers.get("User-Api-Key");r&&!localStorage.getItem("chatApiKey")&&localStorage.setItem("chatApiKey",r)};var ri;(i=>{async function r(u){try{const l=Ti(),h=Ii();u.session_id=localStorage.getItem("sessionId")||null,fetch(`${Oi}/api/chat/track_event`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${l}`,"trace-id":Sr(),"Accept-Language":h},body:JSON.stringify(u)}).catch(d=>{console.warn("Track event failed:",d)})}catch(l){console.warn("Error preparing track event:",l)}return Promise.resolve()}i.trackEvent=r;async function*e(u,l,h=[],d=null,c=null,f){try{const v=Ti(),p=Ii(),{openaiApiKey:g,openaiBaseUrl:y,rsaPublicKey:m}=Ba(),b=Sr(),$=(h||[]).map(F=>new Promise((X,K)=>{const oe=new FileReader;oe.onloadend=()=>X(oe.result),oe.onerror=K,oe.readAsDataURL(F)})),O=await Promise.all($);let _=c?Array.isArray(c)?c:[c]:[];const C={"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${v}`,"trace-id":f||Sr(),"Accept-Language":p};if(g&&g.trim()!==""&&m)try{const F=await xn(g,m);C["Encrypted-Openai-Api-Key"]=F,C["Openai-Base-Url"]=y}catch(F){console.error("Error encrypting OpenAI API key:",F)}const R=await fetch(`${Oi}/api/chat/invoke`,{method:"POST",headers:C,body:JSON.stringify({session_id:u,prompt:l,mock:!1,intent:d,ext:_,images:O.map((F,X)=>({filename:h[X].name,data:F}))})});yn(R);const x=R.body.getReader();let B="";for(;;){const{done:F,value:X}=await x.read();if(F)break;B+=new TextDecoder().decode(X);const K=B.split(`
-`);B=K.pop()||"";for(const oe of K)oe.trim()&&(yield{...JSON.parse(oe),message_id:b})}B.trim()&&(yield{...JSON.parse(B),message_id:b})}catch(v){throw console.error("Error in streamInvokeServer:",v),alert(v instanceof Error?v.message:"An error occurred while streaming, please refresh the page and try again."),v}}i.streamInvokeServer=e;async function t(u,l){try{const h=Ti(),d=Ii(),{openaiApiKey:c,openaiBaseUrl:f,rsaPublicKey:v}=Ba(),p={"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${h}`,"trace-id":Sr(),"Accept-Language":d};if(c&&c.trim()!==""&&v)try{const m=await xn(c,v);p["Encrypted-Openai-Api-Key"]=m,p["Openai-Base-Url"]=f}catch(m){console.error("Error encrypting OpenAI API key:",m)}const g=await fetch(`${Oi}/api/chat/get_optimized_workflow`,{method:"POST",headers:p,body:JSON.stringify({workflow_id:u,prompt:l})});yn(g);const y=await g.json();if(!y.success){const m=y.message||"Failed to get optimized workflow";throw alert(m),new Error(m)}return y.data}catch(h){throw console.error("Error getting optimized workflow:",h),alert(h instanceof Error?h.message:"Failed to get optimized workflow"),h}}i.getOptimizedWorkflow=t;async function n(u){const l=Ti(),h=Ii(),{openaiApiKey:d,openaiBaseUrl:c,rsaPublicKey:f}=Ba(),v={"Content-Type":"application/json",Authorization:`Bearer ${l}`,"trace-id":Sr(),"Accept-Language":h};if(d&&d.trim()!==""&&f)try{const y=await xn(d,f);v["Encrypted-Openai-Api-Key"]=y,v["Openai-Base-Url"]=c}catch(y){console.error("Error encrypting OpenAI API key:",y)}const p=await fetch(`${Oi}/api/chat/get_node_info_by_types`,{method:"POST",headers:v,body:JSON.stringify({node_types:u})});yn(p);const g=await p.json();if(!g.success){const y=g.message||"Failed to get node info by types";throw alert(y),new Error(y)}return g.data}i.batchGetNodeInfo=n;async function a(u){try{const l=localStorage.getItem(`messages_${u}`);if(l)return console.log("Using cached messages from localStorage"),JSON.parse(l);const h=Ti(),d=Ii(),{openaiApiKey:c,openaiBaseUrl:f,rsaPublicKey:v}=Ba(),p={accept:"application/json",Authorization:`Bearer ${h}`,"trace-id":Sr(),"Accept-Language":d};if(c&&c.trim()!==""&&v)try{const b=await xn(c,v);p["Encrypted-Openai-Api-Key"]=b,p["Openai-Base-Url"]=f}catch(b){console.error("Error encrypting OpenAI API key:",b)}const g=await fetch(`${Oi}/api/chat/get_messages_by_session_id?session_id=${u}`,{method:"GET",headers:p});yn(g);const y=await g.json();if(!y.success){const b=y.message||"Failed to fetch messages";throw alert(b+", please refresh the page and try again."),new Error(b)}const m=y.data.map(b=>(console.log("msg.ext",b.ext),{id:b.id.toString(),content:b.role==="ai"?JSON.stringify({session_id:u,text:b.content,finished:b.finished||!1,format:b.format||"markdown",ext:b.ext}):b.content,role:b.role,name:b.role==="ai"?"Assistant":void 0,format:b.format||"markdown",finished:b.finished}));return localStorage.setItem(`messages_${u}`,JSON.stringify(m)),m}catch(l){throw console.error("Error fetching messages:",l),alert(l instanceof Error?l.message:"Failed to fetch messages, please refresh the page and try again."),l}}i.fetchMessages=a;async function o(){try{const u=Ti(),l=Ii(),{openaiApiKey:h,openaiBaseUrl:d,rsaPublicKey:c}=Ba(),f={accept:"application/json",Authorization:`Bearer ${u}`,"trace-id":Sr(),"Accept-Language":l};if(h&&h.trim()!==""&&c)try{const g=await xn(h,c);f["Encrypted-Openai-Api-Key"]=g,f["Openai-Base-Url"]=d}catch(g){console.error("Error encrypting OpenAI API key:",g)}const v=await fetch(`${Oi}/api/chat/announcement`,{method:"GET",headers:f});yn(v);const p=await v.json();if(!p.success){const g=p.message||"Failed to fetch announcement";return console.error(g),""}return p.data}catch(u){return console.error("Error fetching announcement:",u),""}}i.fetchAnnouncement=o;async function s(u){let h=0,d;for(;h<3;)try{const c=Ti(),f=Ii(),v={"Content-Type":"application/json",accept:"application/json",Authorization:`Bearer ${c}`,"trace-id":Sr(),"Accept-Language":f},p=await fetch(`${Oi}/api/param_debug/generate_sd_prompts`,{method:"POST",headers:v,body:JSON.stringify({text:u})});yn(p);const g=await p.json();if(!g.success){const y=g.message||"Failed to generate SD prompts";throw new Error(y)}return g.data}catch(c){if(d=c,h++,h>=3)throw console.error("Error generating SD prompts after 3 attempts:",c),c;console.warn(`Attempt ${h} failed, retrying... Error: ${c instanceof Error?c.message:"Unknown error"}`),await new Promise(f=>setTimeout(f,500*Math.pow(2,h-1)))}throw d}i.generateSDPrompts=s})(ri||(ri={}));function Y$({name:i,isUser:r=!1,children:e}){return S.jsx("div",{className:"flex flex-col w-full items-start gap-2 py-2 animate-fadeIn",children:S.jsx("div",{className:"w-full",children:e})})}function NI({title:i,titleId:r,...e},t){return He.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},e),i?He.createElement("title",{id:r},i):null,He.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const MI=He.forwardRef(NI);function Lpe({content:i,trace_id:r}){const[e,t]=He.useState(!1),[n,a]=He.useState(!1),o=async()=>{r&&(await navigator.clipboard.writeText(r),a(!0),setTimeout(()=>a(!1),2e3))};return S.jsx(Y$,{name:"User",isUser:!0,children:S.jsxs("div",{className:"w-full rounded-lg border border-gray-700 py-4 px-4 text-gray-700 text-sm break-words relative",children:[S.jsx("p",{className:"whitespace-pre-wrap leading-snug",children:i}),r&&S.jsxs("div",{className:"absolute bottom-1 right-1.5 cursor-pointer opacity-40 hover:opacity-100 transition-opacity",onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),onClick:o,children:[S.jsx(MI,{className:"h-3.5 w-3.5 text-gray-500 hover:text-gray-700"}),e&&S.jsx("div",{className:"absolute right-0 -top-6 bg-gray-700 text-white text-[10px] py-0.5 px-1.5 rounded shadow-sm whitespace-nowrap",children:n?"Copied!":"Copy trace ID"})]})]})})}const BI=He.memo(tI,(i,r)=>i.children===r.children&&i.className===r.className),FI=({content:i})=>S.jsxs("div",{className:"rounded-lg border border-blue-200 bg-blue-50 p-1 shadow-sm",children:[S.jsxs("div",{className:"flex items-center mb-1",children:[S.jsx("div",{className:"bg-blue-100 rounded-full p-1 mr-1",children:S.jsx("svg",{className:"h-4 w-4 text-blue-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),S.jsx("h3",{className:"text-sm font-medium text-blue-800",children:"Node Usage Guide"})]}),S.jsx("div",{className:"markdown-content text-blue-900",children:i})]}),jI=({content:i})=>S.jsxs("div",{className:"rounded-lg border border-green-200 bg-green-50 p-1 shadow-sm",children:[S.jsxs("div",{className:"flex items-center mb-1",children:[S.jsx("div",{className:"bg-green-100 rounded-full p-1 mr-1",children:S.jsxs("svg",{className:"h-4 w-4 text-green-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}),S.jsx("h3",{className:"text-sm font-medium text-green-800",children:"Node Parameter Reference"})]}),S.jsx("div",{className:"markdown-content text-green-900",children:i})]});function zpe({content:i,name:r="Assistant",avatar:e,format:t,onOptionClick:n,extComponent:a,metadata:o}){const s=He.useRef(),u=(h,d)=>S.jsx(BI,{rehypePlugins:[[rI,{target:"_blank"}],iI],remarkPlugins:[nI,aI],className:`prose prose-xs prose-neutral prose-a:text-accent-foreground/50 break-words [&>*]:!my-1 leading-relaxed text-xs text-gray-800
+`,e+="-----END PUBLIC KEY-----",e},r.hasPublicKeyProperty=function(e){return e=e||{},e.hasOwnProperty("n")&&e.hasOwnProperty("e")},r.hasPrivateKeyProperty=function(e){return e=e||{},e.hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},r.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},r}(TI),CI={},oh,AI=typeof process<"u"?(oh=CI)===null||oh===void 0?void 0:oh.npm_package_version:void 0,DI=function(){function i(r){r===void 0&&(r={}),r=r||{},this.default_key_size=r.default_key_size?parseInt(r.default_key_size,10):1024,this.default_public_exponent=r.default_public_exponent||"010001",this.log=r.log||!1,this.key=null}return i.prototype.setKey=function(r){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new kp(r)},i.prototype.setPrivateKey=function(r){this.setKey(r)},i.prototype.setPublicKey=function(r){this.setKey(r)},i.prototype.decrypt=function(r){try{return this.getKey().decrypt(wp(r))}catch{return!1}},i.prototype.encrypt=function(r){try{return Iu(this.getKey().encrypt(r))}catch{return!1}},i.prototype.sign=function(r,e,t){try{return Iu(this.getKey().sign(r,e,t))}catch{return!1}},i.prototype.verify=function(r,e,t){try{return this.getKey().verify(r,wp(e),t)}catch{return!1}},i.prototype.getKey=function(r){if(!this.key){if(this.key=new kp,r&&{}.toString.call(r)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,r);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},i.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},i.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},i.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},i.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},i.version=AI,i}();async function Fpe(){try{const r=await(await fetch(`${Ff.apiBaseUrl}/api/chat/rsa_public_key`)).json();if(!r.success)throw new Error(r.message||"Failed to fetch RSA public key");return r.data}catch(i){throw console.error("Error fetching RSA public key:",i),i}}async function xn(i,r){try{if(window.crypto&&window.crypto.subtle){const e="-----BEGIN PUBLIC KEY-----",n=r.substring(r.indexOf(e)+e.length,r.indexOf("-----END PUBLIC KEY-----")).replace(/\s/g,""),a=window.atob(n),o=new ArrayBuffer(a.length),s=new Uint8Array(o);for(let c=0;clocalStorage.getItem("chatApiKey"),Ba=()=>{const i=localStorage.getItem("openaiApiKey"),r=localStorage.getItem("openaiBaseUrl")||"https://api.openai.com/v1",e=localStorage.getItem("rsaPublicKey");return{openaiApiKey:i||"",openaiBaseUrl:r,rsaPublicKey:e}},Ii=()=>navigator.language||"zh-CN",yn=i=>{const r=i.headers.get("User-Api-Key");r&&!localStorage.getItem("chatApiKey")&&localStorage.setItem("chatApiKey",r)};var ri;(i=>{async function r(u){try{const l=Ti(),h=Ii();u.session_id=localStorage.getItem("sessionId")||null,fetch(`${Oi}/api/chat/track_event`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${l}`,"trace-id":Sr(),"Accept-Language":h},body:JSON.stringify(u)}).catch(d=>{console.warn("Track event failed:",d)})}catch(l){console.warn("Error preparing track event:",l)}return Promise.resolve()}i.trackEvent=r;async function*e(u,l,h=[],d=null,c=null,f){try{const v=Ti(),p=Ii(),{openaiApiKey:g,openaiBaseUrl:y,rsaPublicKey:m}=Ba(),b=Sr(),$=(h||[]).map(W=>new Promise((le,Ee)=>{const de=new FileReader;de.onloadend=()=>le(de.result),de.onerror=Ee,de.readAsDataURL(W)})),O=await Promise.all($);let _=c?Array.isArray(c)?c:[c]:[];const C={"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${v}`,"trace-id":f||Sr(),"Accept-Language":p};if(g&&g.trim()!==""&&m)try{const W=await xn(g,m);C["Encrypted-Openai-Api-Key"]=W,C["Openai-Base-Url"]=y}catch(W){console.error("Error encrypting OpenAI API key:",W)}const R=new AbortController,x=setTimeout(()=>R.abort(),12e4),B=await fetch(`${Oi}/api/chat/invoke`,{method:"POST",headers:C,body:JSON.stringify({session_id:u,prompt:l,mock:!1,intent:d,ext:_,images:O.map((W,le)=>({filename:h[le].name,data:W}))}),signal:R.signal});clearTimeout(x),yn(B);const j=B.body.getReader();let X="";for(;;){const{done:W,value:le}=await j.read();if(W)break;X+=new TextDecoder().decode(le);const Ee=X.split(`
+`);X=Ee.pop()||"";for(const de of Ee)de.trim()&&(yield{...JSON.parse(de),message_id:b})}X.trim()&&(yield{...JSON.parse(X),message_id:b})}catch(v){throw console.error("Error in streamInvokeServer:",v),v.name==="AbortError"?alert("Request timed out after 2 minutes. Please try again."):alert(v instanceof Error?v.message:"An error occurred while streaming, please refresh the page and try again."),v}}i.streamInvokeServer=e;async function t(u,l){try{const h=Ti(),d=Ii(),{openaiApiKey:c,openaiBaseUrl:f,rsaPublicKey:v}=Ba(),p={"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${h}`,"trace-id":Sr(),"Accept-Language":d};if(c&&c.trim()!==""&&v)try{const m=await xn(c,v);p["Encrypted-Openai-Api-Key"]=m,p["Openai-Base-Url"]=f}catch(m){console.error("Error encrypting OpenAI API key:",m)}const g=await fetch(`${Oi}/api/chat/get_optimized_workflow`,{method:"POST",headers:p,body:JSON.stringify({workflow_id:u,prompt:l})});yn(g);const y=await g.json();if(!y.success){const m=y.message||"Failed to get optimized workflow";throw alert(m),new Error(m)}return y.data}catch(h){throw console.error("Error getting optimized workflow:",h),alert(h instanceof Error?h.message:"Failed to get optimized workflow"),h}}i.getOptimizedWorkflow=t;async function n(u){const l=Ti(),h=Ii(),{openaiApiKey:d,openaiBaseUrl:c,rsaPublicKey:f}=Ba(),v={"Content-Type":"application/json",Authorization:`Bearer ${l}`,"trace-id":Sr(),"Accept-Language":h};if(d&&d.trim()!==""&&f)try{const y=await xn(d,f);v["Encrypted-Openai-Api-Key"]=y,v["Openai-Base-Url"]=c}catch(y){console.error("Error encrypting OpenAI API key:",y)}const p=await fetch(`${Oi}/api/chat/get_node_info_by_types`,{method:"POST",headers:v,body:JSON.stringify({node_types:u})});yn(p);const g=await p.json();if(!g.success){const y=g.message||"Failed to get node info by types";throw alert(y),new Error(y)}return g.data}i.batchGetNodeInfo=n;async function a(u){try{const l=localStorage.getItem(`messages_${u}`);if(l)return console.log("Using cached messages from localStorage"),JSON.parse(l);const h=Ti(),d=Ii(),{openaiApiKey:c,openaiBaseUrl:f,rsaPublicKey:v}=Ba(),p={accept:"application/json",Authorization:`Bearer ${h}`,"trace-id":Sr(),"Accept-Language":d};if(c&&c.trim()!==""&&v)try{const b=await xn(c,v);p["Encrypted-Openai-Api-Key"]=b,p["Openai-Base-Url"]=f}catch(b){console.error("Error encrypting OpenAI API key:",b)}const g=await fetch(`${Oi}/api/chat/get_messages_by_session_id?session_id=${u}`,{method:"GET",headers:p});yn(g);const y=await g.json();if(!y.success){const b=y.message||"Failed to fetch messages";throw alert(b+", please refresh the page and try again."),new Error(b)}const m=y.data.map(b=>(console.log("msg.ext",b.ext),{id:b.id.toString(),content:b.role==="ai"?JSON.stringify({session_id:u,text:b.content,finished:b.finished||!1,format:b.format||"markdown",ext:b.ext}):b.content,role:b.role,name:b.role==="ai"?"Assistant":void 0,format:b.format||"markdown",finished:b.finished}));return localStorage.setItem(`messages_${u}`,JSON.stringify(m)),m}catch(l){throw console.error("Error fetching messages:",l),alert(l instanceof Error?l.message:"Failed to fetch messages, please refresh the page and try again."),l}}i.fetchMessages=a;async function o(){try{const u=Ti(),l=Ii(),{openaiApiKey:h,openaiBaseUrl:d,rsaPublicKey:c}=Ba(),f={accept:"application/json",Authorization:`Bearer ${u}`,"trace-id":Sr(),"Accept-Language":l};if(h&&h.trim()!==""&&c)try{const g=await xn(h,c);f["Encrypted-Openai-Api-Key"]=g,f["Openai-Base-Url"]=d}catch(g){console.error("Error encrypting OpenAI API key:",g)}const v=await fetch(`${Oi}/api/chat/announcement`,{method:"GET",headers:f});yn(v);const p=await v.json();if(!p.success){const g=p.message||"Failed to fetch announcement";return console.error(g),""}return p.data}catch(u){return console.error("Error fetching announcement:",u),""}}i.fetchAnnouncement=o;async function s(u){let h=0,d;for(;h<3;)try{const c=Ti(),f=Ii(),v={"Content-Type":"application/json",accept:"application/json",Authorization:`Bearer ${c}`,"trace-id":Sr(),"Accept-Language":f},p=await fetch(`${Oi}/api/param_debug/generate_sd_prompts`,{method:"POST",headers:v,body:JSON.stringify({text:u})});yn(p);const g=await p.json();if(!g.success){const y=g.message||"Failed to generate SD prompts";throw new Error(y)}return g.data}catch(c){if(d=c,h++,h>=3)throw console.error("Error generating SD prompts after 3 attempts:",c),c;console.warn(`Attempt ${h} failed, retrying... Error: ${c instanceof Error?c.message:"Unknown error"}`),await new Promise(f=>setTimeout(f,500*Math.pow(2,h-1)))}throw d}i.generateSDPrompts=s})(ri||(ri={}));function Y$({name:i,isUser:r=!1,children:e}){return S.jsx("div",{className:"flex flex-col w-full items-start gap-2 py-2 animate-fadeIn",children:S.jsx("div",{className:"w-full",children:e})})}function NI({title:i,titleId:r,...e},t){return Ve.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},e),i?Ve.createElement("title",{id:r},i):null,Ve.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const MI=Ve.forwardRef(NI);function Lpe({content:i,trace_id:r}){const[e,t]=Ve.useState(!1),[n,a]=Ve.useState(!1),o=async()=>{r&&(await navigator.clipboard.writeText(r),a(!0),setTimeout(()=>a(!1),2e3))};return S.jsx(Y$,{name:"User",isUser:!0,children:S.jsxs("div",{className:"w-full rounded-lg border border-gray-700 py-4 px-4 text-gray-700 text-sm break-words relative",children:[S.jsx("p",{className:"whitespace-pre-wrap leading-snug",children:i}),r&&S.jsxs("div",{className:"absolute bottom-1 right-1.5 cursor-pointer opacity-40 hover:opacity-100 transition-opacity",onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),onClick:o,children:[S.jsx(MI,{className:"h-3.5 w-3.5 text-gray-500 hover:text-gray-700"}),e&&S.jsx("div",{className:"absolute right-0 -top-6 bg-gray-700 text-white text-[10px] py-0.5 px-1.5 rounded shadow-sm whitespace-nowrap",children:n?"Copied!":"Copy trace ID"})]})]})})}const BI=Ve.memo(tI,(i,r)=>i.children===r.children&&i.className===r.className),FI=({content:i})=>S.jsxs("div",{className:"rounded-lg border border-blue-200 bg-blue-50 p-1 shadow-sm",children:[S.jsxs("div",{className:"flex items-center mb-1",children:[S.jsx("div",{className:"bg-blue-100 rounded-full p-1 mr-1",children:S.jsx("svg",{className:"h-4 w-4 text-blue-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),S.jsx("h3",{className:"text-sm font-medium text-blue-800",children:"Node Usage Guide"})]}),S.jsx("div",{className:"markdown-content text-blue-900",children:i})]}),jI=({content:i})=>S.jsxs("div",{className:"rounded-lg border border-green-200 bg-green-50 p-1 shadow-sm",children:[S.jsxs("div",{className:"flex items-center mb-1",children:[S.jsx("div",{className:"bg-green-100 rounded-full p-1 mr-1",children:S.jsxs("svg",{className:"h-4 w-4 text-green-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}),S.jsx("h3",{className:"text-sm font-medium text-green-800",children:"Node Parameter Reference"})]}),S.jsx("div",{className:"markdown-content text-green-900",children:i})]});function zpe({content:i,name:r="Assistant",avatar:e,format:t,onOptionClick:n,extComponent:a,metadata:o}){const s=Ve.useRef(),u=(h,d)=>S.jsx(BI,{rehypePlugins:[[rI,{target:"_blank"}],iI],remarkPlugins:[nI,aI],className:`prose prose-xs prose-neutral prose-a:text-accent-foreground/50 break-words [&>*]:!my-1 leading-relaxed text-xs text-gray-800
prose-headings:font-semibold
prose-h1:text-base
prose-h2:text-sm
@@ -36,7 +36,7 @@ version: 2.9.0
prose-li:text-xs
prose-code:text-xs
prose-pre:text-xs
- `,components:{p:({children:c})=>S.jsx("p",{className:"!my-0.5 leading-relaxed text-xs",children:c}),strong:({children:c})=>S.jsx("strong",{className:"text-gray-900",children:c}),h1:({children:c})=>S.jsx("h1",{className:"text-base font-semibold !my-1",children:c}),h2:({children:c})=>S.jsx("h2",{className:"text-sm font-semibold !my-1",children:c}),h3:({children:c})=>S.jsx("h3",{className:"text-xs font-semibold !my-1",children:c}),h4:({children:c})=>S.jsx("h4",{className:"text-xs font-semibold !my-1",children:c}),table:({children:c})=>S.jsx("table",{className:"border-solid border w-[100%] text-xs",children:c}),th:({children:c})=>S.jsx("th",{className:"border-solid border text-center pt-2 text-xs",children:c}),td:({children:c})=>{if(Array.isArray(c)&&c?.length>0){const f=[],v=c.length;for(let p=0;p"?f.push(S.jsx("br",{})):f.push(c[p]);c=f}return S.jsx("td",{className:"border-solid border border-[#979797] text-center text-xs",children:c})},code:({children:c})=>{const[f,v]=He.useState(!1),p=async()=>{try{await navigator.clipboard.writeText(c),v(!0),setTimeout(()=>v(!1),2e3)}catch(g){console.error("Failed to copy text:",g)}};return S.jsxs("span",{className:"relative group inline-flex items-center",children:[S.jsx("code",{className:"text-xs bg-gray-100 text-gray-900 rounded px-1",children:c}),S.jsx("button",{onClick:p,className:"absolute top-0 right-0 bg-gray-200 rounded p-1 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-gray-300 z-10","aria-label":"Copy code",children:f?S.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:S.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):S.jsxs("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:[S.jsx("path",{d:"M8 2a1 1 0 000 2h2a1 1 0 100-2H8z"}),S.jsx("path",{d:"M3 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v6h-4.586l1.293-1.293a1 1 0 00-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L10.414 13H15v3a2 2 0 01-2 2H5a2 2 0 01-2-2V5z"})]})})]})},pre:({children:c})=>S.jsx("pre",{className:"text-xs bg-gray-100 text-gray-800 rounded p-2 overflow-x-auto",children:c}),img:({node:c,...f})=>S.jsx("div",{className:"w-1/2 mx-auto",children:S.jsx("img",{...f,loading:"lazy",className:"w-full h-auto block",onError:v=>{console.warn("Image failed to load:",f.src,"Error:",v),v.currentTarget.style.opacity="0"}})}),a:({href:c,children:f})=>{let v="markdown",p=null;try{const g=JSON.parse(i);v=g.ext?.[0]?.type||"markdown",p=g?.message_id}catch(g){console.error("Error parsing content:",g)}return S.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",onClick:()=>{ri.trackEvent({event_type:"markdown_link_click",message_type:v,message_id:p,data:{link_url:c,link_text:f}})},children:f})}},children:h}),l=()=>{try{const h=JSON.parse(i),d=h.ext?.find(c=>c.type==="guides")?.data||[];if(o?.intent){const c=o.intent;if(c==="node_explain")return S.jsx(FI,{content:u(h.text||"")});if(c==="node_params")return S.jsx(jI,{content:u(h.text||"")})}return S.jsxs("div",{className:"space-y-3",children:[t==="markdown"&&h.text?S.jsx("div",{ref:s,children:u(h.text)}):h.text?S.jsx("p",{className:"whitespace-pre-wrap text-left",children:h.text}):null,d.length>0&&S.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:d.map((c,f)=>S.jsx("button",{className:"px-3 py-1.5 text-gray-700 rounded-md hover:bg-gray-50 transition-colors text-[12px] w-[calc(50%-0.25rem)]",onClick:()=>n?.(c),children:c},f))}),a]})}catch{return S.jsx("p",{className:"whitespace-pre-wrap text-left",children:i})}};return S.jsx(Y$,{name:r,children:S.jsx("div",{className:"w-full rounded-lg bg-gray-50 p-4 text-gray-900 text-sm break-words overflow-hidden",children:l()})})}const LI=LiteGraph;function X$(i,r={}){const e=LI.createNode(i,"",r);if(!r.pos){const t=Mt.canvas.canvas.getBoundingClientRect(),n=t.width/2/Mt.canvas.ds.scale+-Mt.canvas.ds.offset[0]/Mt.canvas.ds.scale,a=t.height/2/Mt.canvas.ds.scale+-Mt.canvas.ds.offset[1]/Mt.canvas.ds.scale;e.pos=[n-e.size[0]/2,a-e.size[1]/2]}return Mt.graph.add(e),e}function zI({content:i,name:r="Assistant",avatar:e,installedNodes:t}){const n=JSON.parse(i),[a,o]=He.useState(null),[s,u]=He.useState(null),l=n.ext?.find(g=>g.type==="node")?.data||[],h=g=>t.some(y=>y===g),d=l.filter(g=>h(g.name)),c=l.filter(g=>!h(g.name)),f=g=>g>=1e4?`${(g/1e4).toFixed(1)}w`:g>=1e3?`${(g/1e3).toFixed(1)}k`:g.toString(),v=g=>{o(g.name),u(g)},p=()=>{o(null),u(null)};return S.jsxs("div",{className:"rounded-lg bg-gray-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[d.length>0&&S.jsxs("div",{className:"space-y-3",children:[S.jsx("p",{className:"text-xs font-medium",children:"Installed nodes:"}),S.jsx("div",{className:"grid grid-cols-2 gap-3",children:d.map(g=>S.jsxs("div",{className:`w-full p-3 rounded-lg border border-gray-200
+ `,components:{p:({children:c})=>S.jsx("p",{className:"!my-0.5 leading-relaxed text-xs",children:c}),strong:({children:c})=>S.jsx("strong",{className:"text-gray-900",children:c}),h1:({children:c})=>S.jsx("h1",{className:"text-base font-semibold !my-1",children:c}),h2:({children:c})=>S.jsx("h2",{className:"text-sm font-semibold !my-1",children:c}),h3:({children:c})=>S.jsx("h3",{className:"text-xs font-semibold !my-1",children:c}),h4:({children:c})=>S.jsx("h4",{className:"text-xs font-semibold !my-1",children:c}),table:({children:c})=>S.jsx("table",{className:"border-solid border w-[100%] text-xs",children:c}),th:({children:c})=>S.jsx("th",{className:"border-solid border text-center pt-2 text-xs",children:c}),td:({children:c})=>{if(Array.isArray(c)&&c?.length>0){const f=[],v=c.length;for(let p=0;p"?f.push(S.jsx("br",{})):f.push(c[p]);c=f}return S.jsx("td",{className:"border-solid border border-[#979797] text-center text-xs",children:c})},code:({children:c})=>{const[f,v]=Ve.useState(!1),p=async()=>{try{await navigator.clipboard.writeText(c),v(!0),setTimeout(()=>v(!1),2e3)}catch(g){console.error("Failed to copy text:",g)}};return S.jsxs("span",{className:"relative group inline-flex items-center",children:[S.jsx("code",{className:"text-xs bg-gray-100 text-gray-900 rounded px-1",children:c}),S.jsx("button",{onClick:p,className:"absolute top-0 right-0 bg-gray-200 rounded p-1 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-gray-300 z-10","aria-label":"Copy code",children:f?S.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:S.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):S.jsxs("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:[S.jsx("path",{d:"M8 2a1 1 0 000 2h2a1 1 0 100-2H8z"}),S.jsx("path",{d:"M3 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v6h-4.586l1.293-1.293a1 1 0 00-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L10.414 13H15v3a2 2 0 01-2 2H5a2 2 0 01-2-2V5z"})]})})]})},pre:({children:c})=>S.jsx("pre",{className:"text-xs bg-gray-100 text-gray-800 rounded p-2 overflow-x-auto",children:c}),img:({node:c,...f})=>S.jsx("div",{className:"w-1/2 mx-auto",children:S.jsx("img",{...f,loading:"lazy",className:"w-full h-auto block",onError:v=>{console.warn("Image failed to load:",f.src,"Error:",v),v.currentTarget.style.opacity="0"}})}),a:({href:c,children:f})=>{let v="markdown",p=null;try{const g=JSON.parse(i);v=g.ext?.[0]?.type||"markdown",p=g?.message_id}catch(g){console.error("Error parsing content:",g)}return S.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",onClick:()=>{ri.trackEvent({event_type:"markdown_link_click",message_type:v,message_id:p,data:{link_url:c,link_text:f}})},children:f})}},children:h}),l=()=>{try{const h=JSON.parse(i),d=h.ext?.find(c=>c.type==="guides")?.data||[];if(o?.intent){const c=o.intent;if(c==="node_explain")return S.jsx(FI,{content:u(h.text||"")});if(c==="node_params")return S.jsx(jI,{content:u(h.text||"")})}return S.jsxs("div",{className:"space-y-3",children:[t==="markdown"&&h.text?S.jsx("div",{ref:s,children:u(h.text)}):h.text?S.jsx("p",{className:"whitespace-pre-wrap text-left",children:h.text}):null,d.length>0&&S.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:d.map((c,f)=>S.jsx("button",{className:"px-3 py-1.5 text-gray-700 rounded-md hover:bg-gray-50 transition-colors text-[12px] w-[calc(50%-0.25rem)]",onClick:()=>n?.(c),children:c},f))}),a]})}catch{return S.jsx("p",{className:"whitespace-pre-wrap text-left",children:i})}};return S.jsx(Y$,{name:r,children:S.jsx("div",{className:"w-full rounded-lg bg-gray-50 p-4 text-gray-900 text-sm break-words overflow-hidden",children:l()})})}const LI=LiteGraph;function X$(i,r={}){const e=LI.createNode(i,"",r);if(!r.pos){const t=Mt.canvas.canvas.getBoundingClientRect(),n=t.width/2/Mt.canvas.ds.scale+-Mt.canvas.ds.offset[0]/Mt.canvas.ds.scale,a=t.height/2/Mt.canvas.ds.scale+-Mt.canvas.ds.offset[1]/Mt.canvas.ds.scale;e.pos=[n-e.size[0]/2,a-e.size[1]/2]}return Mt.graph.add(e),e}function zI({content:i,name:r="Assistant",avatar:e,installedNodes:t}){const n=JSON.parse(i),[a,o]=Ve.useState(null),[s,u]=Ve.useState(null),l=n.ext?.find(g=>g.type==="node")?.data||[],h=g=>t.some(y=>y===g),d=l.filter(g=>h(g.name)),c=l.filter(g=>!h(g.name)),f=g=>g>=1e4?`${(g/1e4).toFixed(1)}w`:g>=1e3?`${(g/1e3).toFixed(1)}k`:g.toString(),v=g=>{o(g.name),u(g)},p=()=>{o(null),u(null)};return S.jsxs("div",{className:"rounded-lg bg-gray-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[d.length>0&&S.jsxs("div",{className:"space-y-3",children:[S.jsx("p",{className:"text-xs font-medium",children:"Installed nodes:"}),S.jsx("div",{className:"grid grid-cols-2 gap-3",children:d.map(g=>S.jsxs("div",{className:`w-full p-3 rounded-lg border border-gray-200
hover:shadow-sm transition-all duration-200 relative group`,onMouseEnter:()=>v(g),onMouseLeave:p,children:[S.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:g.name}),S.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[S.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[S.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:S.jsx("path",{d:"M12 .25a.75.75 0 0 1 .673.418l3.058 6.197 6.839.994a.75.75 0 0 1 .415 1.279l-4.948 4.823 1.168 6.811a.75.75 0 0 1-1.088.791L12 18.347l-6.117 3.216a.75.75 0 0 1-1.088-.79l1.168-6.812-4.948-4.823a.75.75 0 0 1 .416-1.28l6.838-.993L11.327.668A.75.75 0 0 1 12 .25z"})}),S.jsx("span",{children:f(g.github_stars||0)})]}),S.jsxs("button",{className:`px-2 py-1 bg-blue-500 text-white rounded-md
hover:bg-blue-600 transition-colors text-[10px] flex items-center gap-1`,onClick:()=>{const y=X$(g.name);y&&(y.connect(g.from_index,y,g.to_index),ri.trackEvent({event_type:"node_add_to_canvas",message_type:"node",message_id:n.message_id,data:{node_name:g.name}}))},children:[S.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add to Canvas"]})]})]},g.name))})]}),c.length>0&&S.jsxs("div",{className:`space-y-3 ${d.length>0?"mt-4":""}`,children:[S.jsx("p",{className:"text-xs font-medium",children:"Uninstalled nodes:"}),S.jsx("div",{className:"grid grid-cols-2 gap-3",children:c.map(g=>S.jsxs("div",{className:`w-full p-3 rounded-lg border border-gray-200
hover:shadow-sm transition-all duration-200 relative group`,onMouseEnter:()=>v(g),onMouseLeave:p,children:[S.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:g.name}),S.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[S.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[S.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:S.jsx("path",{d:"M12 .25a.75.75 0 0 1 .673.418l3.058 6.197 6.839.994a.75.75 0 0 1 .415 1.279l-4.948 4.823 1.168 6.811a.75.75 0 0 1-1.088.791L12 18.347l-6.117 3.216a.75.75 0 0 1-1.088-.79l1.168-6.812-4.948-4.823a.75.75 0 0 1 .416-1.28l6.838-.993L11.327.668A.75.75 0 0 1 12 .25z"})}),S.jsx("span",{children:f(g.github_stars||0)})]}),g.github_url?S.jsxs("a",{href:g.github_url,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 text-gray-900 rounded-md
@@ -68,19 +68,19 @@ version: 2.9.0
* http://opensource.org/licenses/MIT
*
* vis.js may be distributed under either license.
- */function tl(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")}var sh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Y(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var J$={exports:{}},Es=function(i){return i&&i.Math===Math&&i},be=Es(typeof globalThis=="object"&&globalThis)||Es(typeof window=="object"&&window)||Es(typeof self=="object"&&self)||Es(typeof sh=="object"&&sh)||function(){return this}()||sh||Function("return this")(),le=function(i){try{return!!i()}catch{return!0}},HI=le,Oo=!HI(function(){var i=function(){}.bind();return typeof i!="function"||i.hasOwnProperty("prototype")}),VI=Oo,Z$=Function.prototype,Pp=Z$.apply,xp=Z$.call,ha=typeof Reflect=="object"&&Reflect.apply||(VI?xp.bind(Pp):function(){return xp.apply(Pp,arguments)}),Q$=Oo,e0=Function.prototype,Ed=e0.call,WI=Q$&&e0.bind.bind(Ed,Ed),me=Q$?WI:function(i){return function(){return Ed.apply(i,arguments)}},t0=me,UI=t0({}.toString),KI=t0("".slice),vi=function(i){return KI(UI(i),8,-1)},GI=vi,qI=me,r0=function(i){if(GI(i)==="Function")return qI(i)},Sd=typeof document=="object"&&document.all,YI=typeof Sd>"u"&&Sd!==void 0,i0={all:Sd,IS_HTMLDDA:YI},n0=i0,XI=n0.all,Oe=n0.IS_HTMLDDA?function(i){return typeof i=="function"||i===XI}:function(i){return typeof i=="function"},Qi={},JI=le,Ke=!JI(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ZI=Oo,Ss=Function.prototype.call,Ge=ZI?Ss.bind(Ss):function(){return Ss.apply(Ss,arguments)},rl={},a0={}.propertyIsEnumerable,o0=Object.getOwnPropertyDescriptor,QI=o0&&!a0.call({1:2},1);rl.f=QI?function(r){var e=o0(this,r);return!!e&&e.enumerable}:a0;var en=function(i,r){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:r}},ek=me,tk=le,rk=vi,uh=Object,ik=ek("".split),il=tk(function(){return!uh("z").propertyIsEnumerable(0)})?function(i){return rk(i)==="String"?ik(i,""):uh(i)}:uh,ca=function(i){return i==null},nk=ca,ak=TypeError,Lf=function(i){if(nk(i))throw new ak("Can't call method on "+i);return i},ok=il,sk=Lf,br=function(i){return ok(sk(i))},Cp=Oe,s0=i0,uk=s0.all,it=s0.IS_HTMLDDA?function(i){return typeof i=="object"?i!==null:Cp(i)||i===uk}:function(i){return typeof i=="object"?i!==null:Cp(i)},$e={},lh=$e,hh=be,lk=Oe,Ap=function(i){return lk(i)?i:void 0},yt=function(i,r){return arguments.length<2?Ap(lh[i])||Ap(hh[i]):lh[i]&&lh[i][r]||hh[i]&&hh[i][r]},hk=me,Le=hk({}.isPrototypeOf),pi=typeof navigator<"u"&&String(navigator.userAgent)||"",u0=be,ch=pi,Dp=u0.process,Rp=u0.Deno,Np=Dp&&Dp.versions||Rp&&Rp.version,Mp=Np&&Np.v8,tr,ku;Mp&&(tr=Mp.split("."),ku=tr[0]>0&&tr[0]<4?1:+(tr[0]+tr[1]));!ku&&ch&&(tr=ch.match(/Edge\/(\d+)/),(!tr||tr[1]>=74)&&(tr=ch.match(/Chrome\/(\d+)/),tr&&(ku=+tr[1])));var da=ku,Bp=da,ck=le,dk=be,fk=dk.String,fa=!!Object.getOwnPropertySymbols&&!ck(function(){var i=Symbol("symbol detection");return!fk(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&Bp&&Bp<41}),vk=fa,l0=vk&&!Symbol.sham&&typeof Symbol.iterator=="symbol",pk=yt,gk=Oe,yk=Le,mk=l0,bk=Object,To=mk?function(i){return typeof i=="symbol"}:function(i){var r=pk("Symbol");return gk(r)&&yk(r.prototype,bk(i))},$k=String,va=function(i){try{return $k(i)}catch{return"Object"}},wk=Oe,_k=va,Ek=TypeError,kt=function(i){if(wk(i))return i;throw new Ek(_k(i)+" is not a function")},Sk=kt,Ok=ca,zf=function(i,r){var e=i[r];return Ok(e)?void 0:Sk(e)},dh=Ge,fh=Oe,vh=it,Tk=TypeError,Ik=function(i,r){var e,t;if(r==="string"&&fh(e=i.toString)&&!vh(t=dh(e,i))||fh(e=i.valueOf)&&!vh(t=dh(e,i))||r!=="string"&&fh(e=i.toString)&&!vh(t=dh(e,i)))return t;throw new Tk("Can't convert object to primitive value")},h0={exports:{}},kk=!0,Fp=be,Pk=Object.defineProperty,xk=function(i,r){try{Pk(Fp,i,{value:r,configurable:!0,writable:!0})}catch{Fp[i]=r}return r},Ck=be,Ak=xk,jp="__core-js_shared__",Dk=Ck[jp]||Ak(jp,{}),Hf=Dk,Lp=Hf;(h0.exports=function(i,r){return Lp[i]||(Lp[i]=r!==void 0?r:{})})("versions",[]).push({version:"3.33.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var pa=h0.exports,Rk=Lf,Nk=Object,Pt=function(i){return Nk(Rk(i))},Mk=me,Bk=Pt,Fk=Mk({}.hasOwnProperty),ze=Object.hasOwn||function(r,e){return Fk(Bk(r),e)},jk=me,Lk=0,zk=Math.random(),Hk=jk(1 .toString),nl=function(i){return"Symbol("+(i===void 0?"":i)+")_"+Hk(++Lk+zk,36)},Vk=be,Wk=pa,zp=ze,Uk=nl,Kk=fa,Gk=l0,An=Vk.Symbol,ph=Wk("wks"),qk=Gk?An.for||An:An&&An.withoutSetter||Uk,we=function(i){return zp(ph,i)||(ph[i]=Kk&&zp(An,i)?An[i]:qk("Symbol."+i)),ph[i]},Yk=Ge,Hp=it,Vp=To,Xk=zf,Jk=Ik,Zk=we,Qk=TypeError,eP=Zk("toPrimitive"),tP=function(i,r){if(!Hp(i)||Vp(i))return i;var e=Xk(i,eP),t;if(e){if(r===void 0&&(r="default"),t=Yk(e,i,r),!Hp(t)||Vp(t))return t;throw new Qk("Can't convert object to primitive value")}return r===void 0&&(r="number"),Jk(i,r)},rP=tP,iP=To,al=function(i){var r=rP(i,"string");return iP(r)?r:r+""},nP=be,Wp=it,Od=nP.document,aP=Wp(Od)&&Wp(Od.createElement),Vf=function(i){return aP?Od.createElement(i):{}},oP=Ke,sP=le,uP=Vf,c0=!oP&&!sP(function(){return Object.defineProperty(uP("div"),"a",{get:function(){return 7}}).a!==7}),lP=Ke,hP=Ge,cP=rl,dP=en,fP=br,vP=al,pP=ze,gP=c0,Up=Object.getOwnPropertyDescriptor;Qi.f=lP?Up:function(r,e){if(r=fP(r),e=vP(e),gP)try{return Up(r,e)}catch{}if(pP(r,e))return dP(!hP(cP.f,r,e),r[e])};var yP=le,mP=Oe,bP=/#|\.prototype\./,Io=function(i,r){var e=wP[$P(i)];return e===EP?!0:e===_P?!1:mP(r)?yP(r):!!r},$P=Io.normalize=function(i){return String(i).replace(bP,".").toLowerCase()},wP=Io.data={},_P=Io.NATIVE="N",EP=Io.POLYFILL="P",d0=Io,Kp=r0,SP=kt,OP=Oo,TP=Kp(Kp.bind),gi=function(i,r){return SP(i),r===void 0?i:OP?TP(i,r):function(){return i.apply(r,arguments)}},xt={},IP=Ke,kP=le,f0=IP&&kP(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),PP=it,xP=String,CP=TypeError,jt=function(i){if(PP(i))return i;throw new CP(xP(i)+" is not an object")},AP=Ke,DP=c0,RP=f0,Os=jt,Gp=al,NP=TypeError,gh=Object.defineProperty,MP=Object.getOwnPropertyDescriptor,yh="enumerable",mh="configurable",bh="writable";xt.f=AP?RP?function(r,e,t){if(Os(r),e=Gp(e),Os(t),typeof r=="function"&&e==="prototype"&&"value"in t&&bh in t&&!t[bh]){var n=MP(r,e);n&&n[bh]&&(r[e]=t.value,t={configurable:mh in t?t[mh]:n[mh],enumerable:yh in t?t[yh]:n[yh],writable:!1})}return gh(r,e,t)}:gh:function(r,e,t){if(Os(r),e=Gp(e),Os(t),DP)try{return gh(r,e,t)}catch{}if("get"in t||"set"in t)throw new NP("Accessors not supported");return"value"in t&&(r[e]=t.value),r};var BP=Ke,FP=xt,jP=en,Lr=BP?function(i,r,e){return FP.f(i,r,jP(1,e))}:function(i,r,e){return i[r]=e,i},Ts=be,LP=ha,zP=r0,HP=Oe,VP=Qi.f,WP=d0,mn=$e,UP=gi,bn=Lr,qp=ze,KP=function(i){var r=function(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new i;case 1:return new i(e);case 2:return new i(e,t)}return new i(e,t,n)}return LP(i,this,arguments)};return r.prototype=i.prototype,r},U=function(i,r){var e=i.target,t=i.global,n=i.stat,a=i.proto,o=t?Ts:n?Ts[e]:(Ts[e]||{}).prototype,s=t?mn:mn[e]||bn(mn,e,{})[e],u=s.prototype,l,h,d,c,f,v,p,g,y;for(c in r)l=WP(t?c:e+(n?".":"#")+c,i.forced),h=!l&&o&&qp(o,c),v=s[c],h&&(i.dontCallGetSet?(y=VP(o,c),p=y&&y.value):p=o[c]),f=h&&p?p:r[c],!(h&&typeof v==typeof f)&&(i.bind&&h?g=UP(f,Ts):i.wrap&&h?g=KP(f):a&&HP(f)?g=zP(f):g=f,(i.sham||f&&f.sham||v&&v.sham)&&bn(g,"sham",!0),bn(s,c,g),a&&(d=e+"Prototype",qp(mn,d)||bn(mn,d,{}),bn(mn[d],c,f),i.real&&u&&(l||!u[c])&&bn(u,c,f)))},GP=U,qP=Ke,Yp=xt.f;GP({target:"Object",stat:!0,forced:Object.defineProperty!==Yp,sham:!qP},{defineProperty:Yp});var YP=$e,v0=YP.Object,XP=J$.exports=function(r,e,t){return v0.defineProperty(r,e,t)};v0.defineProperty.sham&&(XP.sham=!0);var JP=J$.exports,ZP=JP,p0=ZP,QP=p0,ex=QP,tx=ex,rx=tx,g0=rx,ol=Y(g0),ix=vi,yi=Array.isArray||function(r){return ix(r)==="Array"},nx=Math.ceil,ax=Math.floor,ox=Math.trunc||function(r){var e=+r;return(e>0?ax:nx)(e)},sx=ox,sl=function(i){var r=+i;return r!==r||r===0?0:sx(r)},ux=sl,lx=Math.min,hx=function(i){return i>0?lx(ux(i),9007199254740991):0},cx=hx,Lt=function(i){return cx(i.length)},dx=TypeError,fx=9007199254740991,ul=function(i){if(i>fx)throw dx("Maximum allowed index exceeded");return i},vx=al,px=xt,gx=en,ga=function(i,r,e){var t=vx(r);t in i?px.f(i,t,gx(0,e)):i[t]=e},yx=we,mx=yx("toStringTag"),y0={};y0[mx]="z";var Wf=String(y0)==="[object z]",bx=Wf,$x=Oe,lu=vi,wx=we,_x=wx("toStringTag"),Ex=Object,Sx=lu(function(){return arguments}())==="Arguments",Ox=function(i,r){try{return i[r]}catch{}},zr=bx?lu:function(i){var r,e,t;return i===void 0?"Undefined":i===null?"Null":typeof(e=Ox(r=Ex(i),_x))=="string"?e:Sx?lu(r):(t=lu(r))==="Object"&&$x(r.callee)?"Arguments":t},Tx=me,Ix=Oe,Td=Hf,kx=Tx(Function.toString);Ix(Td.inspectSource)||(Td.inspectSource=function(i){return kx(i)});var m0=Td.inspectSource,Px=me,xx=le,b0=Oe,Cx=zr,Ax=yt,Dx=m0,$0=function(){},Rx=[],w0=Ax("Reflect","construct"),Uf=/^\s*(?:class|function)\b/,Nx=Px(Uf.exec),Mx=!Uf.test($0),Fa=function(r){if(!b0(r))return!1;try{return w0($0,Rx,r),!0}catch{return!1}},_0=function(r){if(!b0(r))return!1;switch(Cx(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Mx||!!Nx(Uf,Dx(r))}catch{return!0}};_0.sham=!0;var ll=!w0||xx(function(){var i;return Fa(Fa.call)||!Fa(Object)||!Fa(function(){i=!0})||i})?_0:Fa,Xp=yi,Bx=ll,Fx=it,jx=we,Lx=jx("species"),Jp=Array,zx=function(i){var r;return Xp(i)&&(r=i.constructor,Bx(r)&&(r===Jp||Xp(r.prototype))?r=void 0:Fx(r)&&(r=r[Lx],r===null&&(r=void 0))),r===void 0?Jp:r},Hx=zx,hl=function(i,r){return new(Hx(i))(r===0?0:r)},Vx=le,Wx=we,Ux=da,Kx=Wx("species"),ko=function(i){return Ux>=51||!Vx(function(){var r=[],e=r.constructor={};return e[Kx]=function(){return{foo:1}},r[i](Boolean).foo!==1})},Gx=U,qx=le,Yx=yi,Xx=it,Jx=Pt,Zx=Lt,Zp=ul,Qp=ga,Qx=hl,eC=ko,tC=we,rC=da,E0=tC("isConcatSpreadable"),iC=rC>=51||!qx(function(){var i=[];return i[E0]=!1,i.concat()[0]!==i}),nC=function(i){if(!Xx(i))return!1;var r=i[E0];return r!==void 0?!!r:Yx(i)},aC=!iC||!eC("concat");Gx({target:"Array",proto:!0,arity:1,forced:aC},{concat:function(r){var e=Jx(this),t=Qx(e,0),n=0,a,o,s,u,l;for(a=-1,s=arguments.length;ao;)if(s=n[o++],s!==s)return!0}else for(;a>o;o++)if((i||o in n)&&n[o]===e)return i||o||0;return!i&&-1}},vC={includes:eg(!0),indexOf:eg(!1)},Po={},pC=me,$h=ze,gC=br,yC=vC.indexOf,mC=Po,tg=pC([].push),S0=function(i,r){var e=gC(i),t=0,n=[],a;for(a in e)!$h(mC,a)&&$h(e,a)&&tg(n,a);for(;r.length>t;)$h(e,a=r[t++])&&(~yC(n,a)||tg(n,a));return n},Kf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bC=S0,$C=Kf,fl=Object.keys||function(r){return bC(r,$C)},wC=Ke,_C=f0,EC=xt,SC=jt,OC=br,TC=fl;cl.f=wC&&!_C?Object.defineProperties:function(r,e){SC(r);for(var t=OC(e),n=TC(e),a=n.length,o=0,s;a>o;)EC.f(r,s=n[o++],t[s]);return r};var IC=yt,O0=IC("document","documentElement"),kC=pa,PC=nl,rg=kC("keys"),vl=function(i){return rg[i]||(rg[i]=PC(i))},xC=jt,CC=cl,ig=Kf,AC=Po,DC=O0,RC=Vf,NC=vl,ng=">",ag="<",Id="prototype",kd="script",T0=NC("IE_PROTO"),wh=function(){},I0=function(i){return ag+kd+ng+i+ag+"/"+kd+ng},og=function(i){i.write(I0("")),i.close();var r=i.parentWindow.Object;return i=null,r},MC=function(){var i=RC("iframe"),r="java"+kd+":",e;return i.style.display="none",DC.appendChild(i),i.src=String(r),e=i.contentWindow.document,e.open(),e.write(I0("document.F=Object")),e.close(),e.F},Is,hu=function(){try{Is=new ActiveXObject("htmlfile")}catch{}hu=typeof document<"u"?document.domain&&Is?og(Is):MC():og(Is);for(var i=ig.length;i--;)delete hu[Id][ig[i]];return hu()};AC[T0]=!0;var rn=Object.create||function(r,e){var t;return r!==null?(wh[Id]=xC(r),t=new wh,wh[Id]=null,t[T0]=r):t=hu(),e===void 0?t:CC.f(t,e)},xo={},BC=S0,FC=Kf,jC=FC.concat("length","prototype");xo.f=Object.getOwnPropertyNames||function(r){return BC(r,jC)};var Gf={},sg=dl,LC=Lt,zC=ga,HC=Array,VC=Math.max,k0=function(i,r,e){for(var t=LC(i),n=sg(r,t),a=sg(e===void 0?t:e,t),o=HC(VC(a-n,0)),s=0;ng;g++)if((s||g in f)&&(b=f[g],$=v(b,g,c),i))if(r)m[g]=$;else if($)switch(i){case 3:return!0;case 5:return b;case 6:return g;case 2:dg(m,b)}else switch(i){case 4:return!1;case 7:dg(m,b)}return a?-1:t||n?n:m}},ba={forEach:Wr(0),map:Wr(1),filter:Wr(2),some:Wr(3),every:Wr(4),find:Wr(5),findIndex:Wr(6),filterReject:Wr(7)},pl=U,Do=be,Yf=Ge,x2=me,Yn=Ke,Xn=fa,C2=le,We=ze,A2=Le,xd=jt,gl=br,Xf=al,D2=tn,Cd=en,uo=rn,D0=fl,R2=xo,R0=Gf,N2=Co,N0=Qi,M0=xt,M2=cl,B0=rl,fg=ya,B2=qf,Jf=pa,F2=vl,F0=Po,vg=nl,j2=we,L2=Ao,z2=Te,H2=C0,V2=nn,j0=ma,yl=ba.forEach,_t=F2("hidden"),ml="Symbol",lo="prototype",W2=j0.set,pg=j0.getterFor(ml),ar=Object[lo],Ri=Do.Symbol,Ka=Ri&&Ri[lo],U2=Do.RangeError,K2=Do.TypeError,Sh=Do.QObject,L0=N0.f,Ni=M0.f,z0=R0.f,G2=B0.f,H0=x2([].push),Mr=Jf("symbols"),Ro=Jf("op-symbols"),q2=Jf("wks"),Ad=!Sh||!Sh[lo]||!Sh[lo].findChild,V0=function(i,r,e){var t=L0(ar,r);t&&delete ar[r],Ni(i,r,e),t&&i!==ar&&Ni(ar,r,t)},Dd=Yn&&C2(function(){return uo(Ni({},"a",{get:function(){return Ni(this,"a",{value:7}).a}})).a!==7})?V0:Ni,Oh=function(i,r){var e=Mr[i]=uo(Ka);return W2(e,{type:ml,tag:i,description:r}),Yn||(e.description=r),e},bl=function(r,e,t){r===ar&&bl(Ro,e,t),xd(r);var n=Xf(e);return xd(t),We(Mr,n)?(t.enumerable?(We(r,_t)&&r[_t][n]&&(r[_t][n]=!1),t=uo(t,{enumerable:Cd(0,!1)})):(We(r,_t)||Ni(r,_t,Cd(1,{})),r[_t][n]=!0),Dd(r,n,t)):Ni(r,n,t)},Zf=function(r,e){xd(r);var t=gl(e),n=D0(t).concat(G0(t));return yl(n,function(a){(!Yn||Yf(W0,t,a))&&bl(r,a,t[a])}),r},Y2=function(r,e){return e===void 0?uo(r):Zf(uo(r),e)},W0=function(r){var e=Xf(r),t=Yf(G2,this,e);return this===ar&&We(Mr,e)&&!We(Ro,e)?!1:t||!We(this,e)||!We(Mr,e)||We(this,_t)&&this[_t][e]?t:!0},U0=function(r,e){var t=gl(r),n=Xf(e);if(!(t===ar&&We(Mr,n)&&!We(Ro,n))){var a=L0(t,n);return a&&We(Mr,n)&&!(We(t,_t)&&t[_t][n])&&(a.enumerable=!0),a}},K0=function(r){var e=z0(gl(r)),t=[];return yl(e,function(n){!We(Mr,n)&&!We(F0,n)&&H0(t,n)}),t},G0=function(i){var r=i===ar,e=z0(r?Ro:gl(i)),t=[];return yl(e,function(n){We(Mr,n)&&(!r||We(ar,n))&&H0(t,Mr[n])}),t};Xn||(Ri=function(){if(A2(Ka,this))throw new K2("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:D2(arguments[0]),e=vg(r),t=function(n){var a=this===void 0?Do:this;a===ar&&Yf(t,Ro,n),We(a,_t)&&We(a[_t],e)&&(a[_t][e]=!1);var o=Cd(1,n);try{Dd(a,e,o)}catch(s){if(!(s instanceof U2))throw s;V0(a,e,o)}};return Yn&&Ad&&Dd(ar,e,{configurable:!0,set:t}),Oh(e,r)},Ka=Ri[lo],fg(Ka,"toString",function(){return pg(this).tag}),fg(Ri,"withoutSetter",function(i){return Oh(vg(i),i)}),B0.f=W0,M0.f=bl,M2.f=Zf,N0.f=U0,R2.f=R0.f=K0,N2.f=G0,L2.f=function(i){return Oh(j2(i),i)},Yn&&B2(Ka,"description",{configurable:!0,get:function(){return pg(this).description}}));pl({global:!0,constructor:!0,wrap:!0,forced:!Xn,sham:!Xn},{Symbol:Ri});yl(D0(q2),function(i){z2(i)});pl({target:ml,stat:!0,forced:!Xn},{useSetter:function(){Ad=!0},useSimple:function(){Ad=!1}});pl({target:"Object",stat:!0,forced:!Xn,sham:!Yn},{create:Y2,defineProperty:bl,defineProperties:Zf,getOwnPropertyDescriptor:U0});pl({target:"Object",stat:!0,forced:!Xn},{getOwnPropertyNames:K0});H2();V2(Ri,ml);F0[_t]=!0;var X2=fa,q0=X2&&!!Symbol.for&&!!Symbol.keyFor,J2=U,Z2=yt,Q2=ze,eA=tn,Y0=pa,tA=q0,Th=Y0("string-to-symbol-registry"),rA=Y0("symbol-to-string-registry");J2({target:"Symbol",stat:!0,forced:!tA},{for:function(i){var r=eA(i);if(Q2(Th,r))return Th[r];var e=Z2("Symbol")(r);return Th[r]=e,rA[e]=r,e}});var iA=U,nA=ze,aA=To,oA=va,sA=pa,uA=q0,gg=sA("symbol-to-string-registry");iA({target:"Symbol",stat:!0,forced:!uA},{keyFor:function(r){if(!aA(r))throw new TypeError(oA(r)+" is not a symbol");if(nA(gg,r))return gg[r]}});var lA=me,No=lA([].slice),hA=me,yg=yi,cA=Oe,mg=vi,dA=tn,bg=hA([].push),fA=function(i){if(cA(i))return i;if(yg(i)){for(var r=i.length,e=[],t=0;t=r.length)return i.target=void 0,Cs(void 0,!0);switch(i.kind){case"keys":return Cs(e,!1);case"values":return Cs(r[e],!1)}return Cs([e,r[e]],!1)},"values");Dg.Arguments=Dg.Array;var KD={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},GD=KD,qD=be,YD=zr,XD=Lr,Rg=$a,JD=we,Ng=JD("toStringTag");for(var xh in GD){var Mg=qD[xh],Ch=Mg&&Mg.prototype;Ch&&YD(Ch)!==Ng&&XD(Ch,Ng,xh),Rg[xh]=Rg.Array}var ZD=YA,uw=ZD,QD=we,eR=xt.f,Bg=QD("metadata"),Fg=Function.prototype;Fg[Bg]===void 0&&eR(Fg,Bg,{value:null});var tR=Te;tR("asyncDispose");var rR=Te;rR("dispose");var iR=Te;iR("metadata");var nR=uw,aR=nR,oR=yt,sR=me,rv=oR("Symbol"),uR=rv.keyFor,lR=sR(rv.prototype.valueOf),lw=rv.isRegisteredSymbol||function(r){try{return uR(lR(r))!==void 0}catch{return!1}},hR=U,cR=lw;hR({target:"Symbol",stat:!0},{isRegisteredSymbol:cR});var dR=pa,hw=yt,fR=me,vR=To,pR=we,Cu=hw("Symbol"),jg=Cu.isWellKnownSymbol,cw=hw("Object","getOwnPropertyNames"),gR=fR(Cu.prototype.valueOf),Lg=dR("wks");for(var Ah=0,zg=cw(Cu),yR=zg.length;Ah=a?i?"":void 0:(o=Vg(t,n),o<55296||o>56319||n+1===a||(s=Vg(t,n+1))<56320||s>57343?i?RR(t,n):o:i?NR(t,n,n+2):(o-55296<<10)+(s-56320)+65536)}},MR={codeAt:Wg(!1),charAt:Wg(!0)},BR=MR.charAt,FR=tn,fw=ma,jR=ev,Ug=tv,vw="String Iterator",LR=fw.set,zR=fw.getterFor(vw);jR(String,"String",function(i){LR(this,{type:vw,string:FR(i),index:0})},function(){var r=zR(this),e=r.string,t=r.index,n;return t>=e.length?Ug(void 0,!0):(n=BR(e,t),r.index+=n.length,Ug(n,!1))});var HR=Ao,VR=HR.f("iterator"),WR=VR,pw=WR,UR=pw,KR=UR,GR=KR,qR=GR,gw=qR,YR=Y(gw);function Jn(i){"@babel/helpers - typeof";return Jn=typeof Dn=="function"&&typeof YR=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Dn=="function"&&r.constructor===Dn&&r!==Dn.prototype?"symbol":typeof r},Jn(i)}var XR=Ao,JR=XR.f("toPrimitive"),ZR=JR,QR=ZR,eN=QR,tN=eN,rN=tN,iN=rN,nN=iN,aN=Y(nN);function oN(i,r){if(Jn(i)!=="object"||i===null)return i;var e=i[aN];if(e!==void 0){var t=e.call(i,r||"default");if(Jn(t)!=="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(i)}function yw(i){var r=oN(i,"string");return Jn(r)==="symbol"?r:String(r)}function Kg(i,r){for(var e=0;e=0:s>u;u+=l)u in o&&(n=e(n,o[u],u,a));return n}},PN={left:Yg(!1),right:Yg(!0)},xN=le,_l=function(i,r){var e=[][i];return!!e&&xN(function(){e.call(null,r||function(){return 1},1)})},CN=be,AN=vi,Bo=AN(CN.process)==="process",DN=U,RN=PN.left,NN=_l,Xg=da,MN=Bo,BN=!MN&&Xg>79&&Xg<83,FN=BN||!NN("reduce");DN({target:"Array",proto:!0,forced:FN},{reduce:function(r){var e=arguments.length;return RN(this,r,e,e>1?arguments[1]:void 0)}});var jN=ut,LN=jN("Array","reduce"),zN=Le,HN=LN,Nh=Array.prototype,VN=function(i){var r=i.reduce;return i===Nh||zN(Nh,i)&&r===Nh.reduce?HN:r},WN=VN,UN=WN,KN=UN,GN=Y(KN),qN=U,YN=ba.filter,XN=ko,JN=XN("filter");qN({target:"Array",proto:!0,forced:!JN},{filter:function(r){return YN(this,r,arguments.length>1?arguments[1]:void 0)}});var ZN=ut,QN=ZN("Array","filter"),eM=Le,tM=QN,Mh=Array.prototype,rM=function(i){var r=i.filter;return i===Mh||eM(Mh,i)&&r===Mh.filter?tM:r},iM=rM,nM=iM,aM=nM,Rn=Y(aM),oM=U,sM=ba.map,uM=ko,lM=uM("map");oM({target:"Array",proto:!0,forced:!lM},{map:function(r){return sM(this,r,arguments.length>1?arguments[1]:void 0)}});var hM=ut,cM=hM("Array","map"),dM=Le,fM=cM,Bh=Array.prototype,vM=function(i){var r=i.map;return i===Bh||dM(Bh,i)&&r===Bh.map?fM:r},pM=vM,gM=pM,yM=gM,rr=Y(yM),mM=yi,bM=Lt,$M=ul,wM=gi,Ew=function(i,r,e,t,n,a,o,s){for(var u=n,l=0,h=o?wM(o,s):!1,d,c;l0&&mM(d)?(c=bM(d),u=Ew(i,r,d,c,u,a-1)-1):($M(u+1),i[u]=d),u++),l++;return u},_M=Ew,EM=U,SM=_M,OM=kt,TM=Pt,IM=Lt,kM=hl;EM({target:"Array",proto:!0},{flatMap:function(r){var e=TM(this),t=IM(e),n;return OM(r),n=kM(e,0),n.length=SM(n,e,e,t,0,1,r,arguments.length>1?arguments[1]:void 0),n}});var PM=ut;PM("Array","flatMap");var xM=Ge,Jg=jt,CM=zf,Sw=function(i,r,e){var t,n;Jg(i);try{if(t=CM(i,"return"),!t){if(r==="throw")throw e;return e}t=xM(t,i)}catch(a){n=!0,t=a}if(r==="throw")throw e;if(n)throw t;return Jg(t),e},AM=jt,DM=Sw,RM=function(i,r,e,t){try{return t?r(AM(e)[0],e[1]):r(e)}catch(n){DM(i,"throw",n)}},NM=we,MM=$a,BM=NM("iterator"),FM=Array.prototype,Ow=function(i){return i!==void 0&&(MM.Array===i||FM[BM]===i)},jM=zr,Zg=zf,LM=ca,zM=$a,HM=we,VM=HM("iterator"),El=function(i){if(!LM(i))return Zg(i,VM)||Zg(i,"@@iterator")||zM[jM(i)]},WM=Ge,UM=kt,KM=jt,GM=va,qM=El,YM=TypeError,av=function(i,r){var e=arguments.length<2?qM(i):r;if(UM(e))return KM(WM(e,i));throw new YM(GM(i)+" is not iterable")},XM=gi,JM=Ge,ZM=Pt,QM=RM,eB=Ow,tB=ll,rB=Lt,Qg=ga,iB=av,nB=El,ey=Array,aB=function(r){var e=ZM(r),t=tB(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=XM(a,n>2?arguments[2]:void 0));var s=nB(e),u=0,l,h,d,c,f,v;if(s&&!(this===ey&&eB(s)))for(c=iB(e,s),f=c.next,h=t?new this:[];!(d=JM(f,c)).done;u++)v=o?QM(c,a,[d.value,u],!0):d.value,Qg(h,u,v);else for(l=rB(e),h=t?new this(l):ey(l);l>u;u++)v=o?a(e[u],u):e[u],Qg(h,u,v);return h.length=u,h},oB=we,Tw=oB("iterator"),Iw=!1;try{var sB=0,ty={next:function(){return{done:!!sB++}},return:function(){Iw=!0}};ty[Tw]=function(){return this},Array.from(ty,function(){throw 2})}catch{}var kw=function(i,r){try{if(!r&&!Iw)return!1}catch{return!1}var e=!1;try{var t={};t[Tw]=function(){return{next:function(){return{done:e=!0}}}},i(t)}catch{}return e},uB=U,lB=aB,hB=kw,cB=!hB(function(i){Array.from(i)});uB({target:"Array",stat:!0,forced:cB},{from:lB});var dB=$e,fB=dB.Array.from,vB=fB,Pw=vB,pB=Pw,ov=Y(pB),gB=El,yB=gB,mB=yB,bB=mB,$B=bB,wB=$B,_B=wB,EB=_B,xw=EB,Cw=Y(xw),SB=xw,sv=Y(SB),OB=U,TB=yi;OB({target:"Array",stat:!0},{isArray:TB});var IB=$e,kB=IB.Array.isArray,PB=kB,Aw=PB,xB=Aw,CB=xB,AB=CB,DB=AB,RB=DB,Dw=Y(RB);function NB(i){if(Dw(i))return i}var MB=Ke,BB=yi,FB=TypeError,jB=Object.getOwnPropertyDescriptor,LB=MB&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(i){return i instanceof TypeError}}(),Rw=LB?function(i,r){if(BB(i)&&!jB(i,"length").writable)throw new FB("Cannot set read only .length");return i.length=r}:function(i,r){return i.length=r},zB=U,HB=Pt,VB=Lt,WB=Rw,UB=ul,KB=le,GB=KB(function(){return[].push.call({length:4294967296},1)!==4294967297}),qB=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(i){return i instanceof TypeError}},YB=GB||!qB();zB({target:"Array",proto:!0,arity:1,forced:YB},{push:function(r){var e=HB(this),t=VB(e),n=arguments.length;UB(t+n);for(var a=0;ai.length)&&(r=i.length);for(var e=0,t=new Array(r);e"u"&&Sd!==void 0,i0={all:Sd,IS_HTMLDDA:YI},n0=i0,XI=n0.all,Ie=n0.IS_HTMLDDA?function(i){return typeof i=="function"||i===XI}:function(i){return typeof i=="function"},Qi={},JI=ue,Ge=!JI(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ZI=Oo,Ss=Function.prototype.call,qe=ZI?Ss.bind(Ss):function(){return Ss.apply(Ss,arguments)},rl={},a0={}.propertyIsEnumerable,o0=Object.getOwnPropertyDescriptor,QI=o0&&!a0.call({1:2},1);rl.f=QI?function(r){var e=o0(this,r);return!!e&&e.enumerable}:a0;var en=function(i,r){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:r}},ek=be,tk=ue,rk=vi,uh=Object,ik=ek("".split),il=tk(function(){return!uh("z").propertyIsEnumerable(0)})?function(i){return rk(i)==="String"?ik(i,""):uh(i)}:uh,ca=function(i){return i==null},nk=ca,ak=TypeError,Lf=function(i){if(nk(i))throw new ak("Can't call method on "+i);return i},ok=il,sk=Lf,br=function(i){return ok(sk(i))},Cp=Ie,s0=i0,uk=s0.all,it=s0.IS_HTMLDDA?function(i){return typeof i=="object"?i!==null:Cp(i)||i===uk}:function(i){return typeof i=="object"?i!==null:Cp(i)},we={},lh=we,hh=$e,lk=Ie,Ap=function(i){return lk(i)?i:void 0},yt=function(i,r){return arguments.length<2?Ap(lh[i])||Ap(hh[i]):lh[i]&&lh[i][r]||hh[i]&&hh[i][r]},hk=be,ze=hk({}.isPrototypeOf),pi=typeof navigator<"u"&&String(navigator.userAgent)||"",u0=$e,ch=pi,Dp=u0.process,Rp=u0.Deno,Np=Dp&&Dp.versions||Rp&&Rp.version,Mp=Np&&Np.v8,tr,ku;Mp&&(tr=Mp.split("."),ku=tr[0]>0&&tr[0]<4?1:+(tr[0]+tr[1]));!ku&&ch&&(tr=ch.match(/Edge\/(\d+)/),(!tr||tr[1]>=74)&&(tr=ch.match(/Chrome\/(\d+)/),tr&&(ku=+tr[1])));var da=ku,Bp=da,ck=ue,dk=$e,fk=dk.String,fa=!!Object.getOwnPropertySymbols&&!ck(function(){var i=Symbol("symbol detection");return!fk(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&Bp&&Bp<41}),vk=fa,l0=vk&&!Symbol.sham&&typeof Symbol.iterator=="symbol",pk=yt,gk=Ie,yk=ze,mk=l0,bk=Object,To=mk?function(i){return typeof i=="symbol"}:function(i){var r=pk("Symbol");return gk(r)&&yk(r.prototype,bk(i))},$k=String,va=function(i){try{return $k(i)}catch{return"Object"}},wk=Ie,_k=va,Ek=TypeError,kt=function(i){if(wk(i))return i;throw new Ek(_k(i)+" is not a function")},Sk=kt,Ok=ca,zf=function(i,r){var e=i[r];return Ok(e)?void 0:Sk(e)},dh=qe,fh=Ie,vh=it,Tk=TypeError,Ik=function(i,r){var e,t;if(r==="string"&&fh(e=i.toString)&&!vh(t=dh(e,i))||fh(e=i.valueOf)&&!vh(t=dh(e,i))||r!=="string"&&fh(e=i.toString)&&!vh(t=dh(e,i)))return t;throw new Tk("Can't convert object to primitive value")},h0={exports:{}},kk=!0,Fp=$e,Pk=Object.defineProperty,xk=function(i,r){try{Pk(Fp,i,{value:r,configurable:!0,writable:!0})}catch{Fp[i]=r}return r},Ck=$e,Ak=xk,jp="__core-js_shared__",Dk=Ck[jp]||Ak(jp,{}),Hf=Dk,Lp=Hf;(h0.exports=function(i,r){return Lp[i]||(Lp[i]=r!==void 0?r:{})})("versions",[]).push({version:"3.33.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var pa=h0.exports,Rk=Lf,Nk=Object,Pt=function(i){return Nk(Rk(i))},Mk=be,Bk=Pt,Fk=Mk({}.hasOwnProperty),He=Object.hasOwn||function(r,e){return Fk(Bk(r),e)},jk=be,Lk=0,zk=Math.random(),Hk=jk(1 .toString),nl=function(i){return"Symbol("+(i===void 0?"":i)+")_"+Hk(++Lk+zk,36)},Vk=$e,Wk=pa,zp=He,Uk=nl,Kk=fa,Gk=l0,An=Vk.Symbol,ph=Wk("wks"),qk=Gk?An.for||An:An&&An.withoutSetter||Uk,_e=function(i){return zp(ph,i)||(ph[i]=Kk&&zp(An,i)?An[i]:qk("Symbol."+i)),ph[i]},Yk=qe,Hp=it,Vp=To,Xk=zf,Jk=Ik,Zk=_e,Qk=TypeError,eP=Zk("toPrimitive"),tP=function(i,r){if(!Hp(i)||Vp(i))return i;var e=Xk(i,eP),t;if(e){if(r===void 0&&(r="default"),t=Yk(e,i,r),!Hp(t)||Vp(t))return t;throw new Qk("Can't convert object to primitive value")}return r===void 0&&(r="number"),Jk(i,r)},rP=tP,iP=To,al=function(i){var r=rP(i,"string");return iP(r)?r:r+""},nP=$e,Wp=it,Od=nP.document,aP=Wp(Od)&&Wp(Od.createElement),Vf=function(i){return aP?Od.createElement(i):{}},oP=Ge,sP=ue,uP=Vf,c0=!oP&&!sP(function(){return Object.defineProperty(uP("div"),"a",{get:function(){return 7}}).a!==7}),lP=Ge,hP=qe,cP=rl,dP=en,fP=br,vP=al,pP=He,gP=c0,Up=Object.getOwnPropertyDescriptor;Qi.f=lP?Up:function(r,e){if(r=fP(r),e=vP(e),gP)try{return Up(r,e)}catch{}if(pP(r,e))return dP(!hP(cP.f,r,e),r[e])};var yP=ue,mP=Ie,bP=/#|\.prototype\./,Io=function(i,r){var e=wP[$P(i)];return e===EP?!0:e===_P?!1:mP(r)?yP(r):!!r},$P=Io.normalize=function(i){return String(i).replace(bP,".").toLowerCase()},wP=Io.data={},_P=Io.NATIVE="N",EP=Io.POLYFILL="P",d0=Io,Kp=r0,SP=kt,OP=Oo,TP=Kp(Kp.bind),gi=function(i,r){return SP(i),r===void 0?i:OP?TP(i,r):function(){return i.apply(r,arguments)}},xt={},IP=Ge,kP=ue,f0=IP&&kP(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),PP=it,xP=String,CP=TypeError,jt=function(i){if(PP(i))return i;throw new CP(xP(i)+" is not an object")},AP=Ge,DP=c0,RP=f0,Os=jt,Gp=al,NP=TypeError,gh=Object.defineProperty,MP=Object.getOwnPropertyDescriptor,yh="enumerable",mh="configurable",bh="writable";xt.f=AP?RP?function(r,e,t){if(Os(r),e=Gp(e),Os(t),typeof r=="function"&&e==="prototype"&&"value"in t&&bh in t&&!t[bh]){var n=MP(r,e);n&&n[bh]&&(r[e]=t.value,t={configurable:mh in t?t[mh]:n[mh],enumerable:yh in t?t[yh]:n[yh],writable:!1})}return gh(r,e,t)}:gh:function(r,e,t){if(Os(r),e=Gp(e),Os(t),DP)try{return gh(r,e,t)}catch{}if("get"in t||"set"in t)throw new NP("Accessors not supported");return"value"in t&&(r[e]=t.value),r};var BP=Ge,FP=xt,jP=en,Lr=BP?function(i,r,e){return FP.f(i,r,jP(1,e))}:function(i,r,e){return i[r]=e,i},Ts=$e,LP=ha,zP=r0,HP=Ie,VP=Qi.f,WP=d0,mn=we,UP=gi,bn=Lr,qp=He,KP=function(i){var r=function(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new i;case 1:return new i(e);case 2:return new i(e,t)}return new i(e,t,n)}return LP(i,this,arguments)};return r.prototype=i.prototype,r},K=function(i,r){var e=i.target,t=i.global,n=i.stat,a=i.proto,o=t?Ts:n?Ts[e]:(Ts[e]||{}).prototype,s=t?mn:mn[e]||bn(mn,e,{})[e],u=s.prototype,l,h,d,c,f,v,p,g,y;for(c in r)l=WP(t?c:e+(n?".":"#")+c,i.forced),h=!l&&o&&qp(o,c),v=s[c],h&&(i.dontCallGetSet?(y=VP(o,c),p=y&&y.value):p=o[c]),f=h&&p?p:r[c],!(h&&typeof v==typeof f)&&(i.bind&&h?g=UP(f,Ts):i.wrap&&h?g=KP(f):a&&HP(f)?g=zP(f):g=f,(i.sham||f&&f.sham||v&&v.sham)&&bn(g,"sham",!0),bn(s,c,g),a&&(d=e+"Prototype",qp(mn,d)||bn(mn,d,{}),bn(mn[d],c,f),i.real&&u&&(l||!u[c])&&bn(u,c,f)))},GP=K,qP=Ge,Yp=xt.f;GP({target:"Object",stat:!0,forced:Object.defineProperty!==Yp,sham:!qP},{defineProperty:Yp});var YP=we,v0=YP.Object,XP=J$.exports=function(r,e,t){return v0.defineProperty(r,e,t)};v0.defineProperty.sham&&(XP.sham=!0);var JP=J$.exports,ZP=JP,p0=ZP,QP=p0,ex=QP,tx=ex,rx=tx,g0=rx,ol=Y(g0),ix=vi,yi=Array.isArray||function(r){return ix(r)==="Array"},nx=Math.ceil,ax=Math.floor,ox=Math.trunc||function(r){var e=+r;return(e>0?ax:nx)(e)},sx=ox,sl=function(i){var r=+i;return r!==r||r===0?0:sx(r)},ux=sl,lx=Math.min,hx=function(i){return i>0?lx(ux(i),9007199254740991):0},cx=hx,Lt=function(i){return cx(i.length)},dx=TypeError,fx=9007199254740991,ul=function(i){if(i>fx)throw dx("Maximum allowed index exceeded");return i},vx=al,px=xt,gx=en,ga=function(i,r,e){var t=vx(r);t in i?px.f(i,t,gx(0,e)):i[t]=e},yx=_e,mx=yx("toStringTag"),y0={};y0[mx]="z";var Wf=String(y0)==="[object z]",bx=Wf,$x=Ie,lu=vi,wx=_e,_x=wx("toStringTag"),Ex=Object,Sx=lu(function(){return arguments}())==="Arguments",Ox=function(i,r){try{return i[r]}catch{}},zr=bx?lu:function(i){var r,e,t;return i===void 0?"Undefined":i===null?"Null":typeof(e=Ox(r=Ex(i),_x))=="string"?e:Sx?lu(r):(t=lu(r))==="Object"&&$x(r.callee)?"Arguments":t},Tx=be,Ix=Ie,Td=Hf,kx=Tx(Function.toString);Ix(Td.inspectSource)||(Td.inspectSource=function(i){return kx(i)});var m0=Td.inspectSource,Px=be,xx=ue,b0=Ie,Cx=zr,Ax=yt,Dx=m0,$0=function(){},Rx=[],w0=Ax("Reflect","construct"),Uf=/^\s*(?:class|function)\b/,Nx=Px(Uf.exec),Mx=!Uf.test($0),Fa=function(r){if(!b0(r))return!1;try{return w0($0,Rx,r),!0}catch{return!1}},_0=function(r){if(!b0(r))return!1;switch(Cx(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Mx||!!Nx(Uf,Dx(r))}catch{return!0}};_0.sham=!0;var ll=!w0||xx(function(){var i;return Fa(Fa.call)||!Fa(Object)||!Fa(function(){i=!0})||i})?_0:Fa,Xp=yi,Bx=ll,Fx=it,jx=_e,Lx=jx("species"),Jp=Array,zx=function(i){var r;return Xp(i)&&(r=i.constructor,Bx(r)&&(r===Jp||Xp(r.prototype))?r=void 0:Fx(r)&&(r=r[Lx],r===null&&(r=void 0))),r===void 0?Jp:r},Hx=zx,hl=function(i,r){return new(Hx(i))(r===0?0:r)},Vx=ue,Wx=_e,Ux=da,Kx=Wx("species"),ko=function(i){return Ux>=51||!Vx(function(){var r=[],e=r.constructor={};return e[Kx]=function(){return{foo:1}},r[i](Boolean).foo!==1})},Gx=K,qx=ue,Yx=yi,Xx=it,Jx=Pt,Zx=Lt,Zp=ul,Qp=ga,Qx=hl,eC=ko,tC=_e,rC=da,E0=tC("isConcatSpreadable"),iC=rC>=51||!qx(function(){var i=[];return i[E0]=!1,i.concat()[0]!==i}),nC=function(i){if(!Xx(i))return!1;var r=i[E0];return r!==void 0?!!r:Yx(i)},aC=!iC||!eC("concat");Gx({target:"Array",proto:!0,arity:1,forced:aC},{concat:function(r){var e=Jx(this),t=Qx(e,0),n=0,a,o,s,u,l;for(a=-1,s=arguments.length;ao;)if(s=n[o++],s!==s)return!0}else for(;a>o;o++)if((i||o in n)&&n[o]===e)return i||o||0;return!i&&-1}},vC={includes:eg(!0),indexOf:eg(!1)},Po={},pC=be,$h=He,gC=br,yC=vC.indexOf,mC=Po,tg=pC([].push),S0=function(i,r){var e=gC(i),t=0,n=[],a;for(a in e)!$h(mC,a)&&$h(e,a)&&tg(n,a);for(;r.length>t;)$h(e,a=r[t++])&&(~yC(n,a)||tg(n,a));return n},Kf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bC=S0,$C=Kf,fl=Object.keys||function(r){return bC(r,$C)},wC=Ge,_C=f0,EC=xt,SC=jt,OC=br,TC=fl;cl.f=wC&&!_C?Object.defineProperties:function(r,e){SC(r);for(var t=OC(e),n=TC(e),a=n.length,o=0,s;a>o;)EC.f(r,s=n[o++],t[s]);return r};var IC=yt,O0=IC("document","documentElement"),kC=pa,PC=nl,rg=kC("keys"),vl=function(i){return rg[i]||(rg[i]=PC(i))},xC=jt,CC=cl,ig=Kf,AC=Po,DC=O0,RC=Vf,NC=vl,ng=">",ag="<",Id="prototype",kd="script",T0=NC("IE_PROTO"),wh=function(){},I0=function(i){return ag+kd+ng+i+ag+"/"+kd+ng},og=function(i){i.write(I0("")),i.close();var r=i.parentWindow.Object;return i=null,r},MC=function(){var i=RC("iframe"),r="java"+kd+":",e;return i.style.display="none",DC.appendChild(i),i.src=String(r),e=i.contentWindow.document,e.open(),e.write(I0("document.F=Object")),e.close(),e.F},Is,hu=function(){try{Is=new ActiveXObject("htmlfile")}catch{}hu=typeof document<"u"?document.domain&&Is?og(Is):MC():og(Is);for(var i=ig.length;i--;)delete hu[Id][ig[i]];return hu()};AC[T0]=!0;var rn=Object.create||function(r,e){var t;return r!==null?(wh[Id]=xC(r),t=new wh,wh[Id]=null,t[T0]=r):t=hu(),e===void 0?t:CC.f(t,e)},xo={},BC=S0,FC=Kf,jC=FC.concat("length","prototype");xo.f=Object.getOwnPropertyNames||function(r){return BC(r,jC)};var Gf={},sg=dl,LC=Lt,zC=ga,HC=Array,VC=Math.max,k0=function(i,r,e){for(var t=LC(i),n=sg(r,t),a=sg(e===void 0?t:e,t),o=HC(VC(a-n,0)),s=0;ng;g++)if((s||g in f)&&(b=f[g],$=v(b,g,c),i))if(r)m[g]=$;else if($)switch(i){case 3:return!0;case 5:return b;case 6:return g;case 2:dg(m,b)}else switch(i){case 4:return!1;case 7:dg(m,b)}return a?-1:t||n?n:m}},ba={forEach:Wr(0),map:Wr(1),filter:Wr(2),some:Wr(3),every:Wr(4),find:Wr(5),findIndex:Wr(6),filterReject:Wr(7)},pl=K,Do=$e,Yf=qe,x2=be,Yn=Ge,Xn=fa,C2=ue,Ue=He,A2=ze,xd=jt,gl=br,Xf=al,D2=tn,Cd=en,uo=rn,D0=fl,R2=xo,R0=Gf,N2=Co,N0=Qi,M0=xt,M2=cl,B0=rl,fg=ya,B2=qf,Jf=pa,F2=vl,F0=Po,vg=nl,j2=_e,L2=Ao,z2=ke,H2=C0,V2=nn,j0=ma,yl=ba.forEach,_t=F2("hidden"),ml="Symbol",lo="prototype",W2=j0.set,pg=j0.getterFor(ml),ar=Object[lo],Ri=Do.Symbol,Ka=Ri&&Ri[lo],U2=Do.RangeError,K2=Do.TypeError,Sh=Do.QObject,L0=N0.f,Ni=M0.f,z0=R0.f,G2=B0.f,H0=x2([].push),Mr=Jf("symbols"),Ro=Jf("op-symbols"),q2=Jf("wks"),Ad=!Sh||!Sh[lo]||!Sh[lo].findChild,V0=function(i,r,e){var t=L0(ar,r);t&&delete ar[r],Ni(i,r,e),t&&i!==ar&&Ni(ar,r,t)},Dd=Yn&&C2(function(){return uo(Ni({},"a",{get:function(){return Ni(this,"a",{value:7}).a}})).a!==7})?V0:Ni,Oh=function(i,r){var e=Mr[i]=uo(Ka);return W2(e,{type:ml,tag:i,description:r}),Yn||(e.description=r),e},bl=function(r,e,t){r===ar&&bl(Ro,e,t),xd(r);var n=Xf(e);return xd(t),Ue(Mr,n)?(t.enumerable?(Ue(r,_t)&&r[_t][n]&&(r[_t][n]=!1),t=uo(t,{enumerable:Cd(0,!1)})):(Ue(r,_t)||Ni(r,_t,Cd(1,{})),r[_t][n]=!0),Dd(r,n,t)):Ni(r,n,t)},Zf=function(r,e){xd(r);var t=gl(e),n=D0(t).concat(G0(t));return yl(n,function(a){(!Yn||Yf(W0,t,a))&&bl(r,a,t[a])}),r},Y2=function(r,e){return e===void 0?uo(r):Zf(uo(r),e)},W0=function(r){var e=Xf(r),t=Yf(G2,this,e);return this===ar&&Ue(Mr,e)&&!Ue(Ro,e)?!1:t||!Ue(this,e)||!Ue(Mr,e)||Ue(this,_t)&&this[_t][e]?t:!0},U0=function(r,e){var t=gl(r),n=Xf(e);if(!(t===ar&&Ue(Mr,n)&&!Ue(Ro,n))){var a=L0(t,n);return a&&Ue(Mr,n)&&!(Ue(t,_t)&&t[_t][n])&&(a.enumerable=!0),a}},K0=function(r){var e=z0(gl(r)),t=[];return yl(e,function(n){!Ue(Mr,n)&&!Ue(F0,n)&&H0(t,n)}),t},G0=function(i){var r=i===ar,e=z0(r?Ro:gl(i)),t=[];return yl(e,function(n){Ue(Mr,n)&&(!r||Ue(ar,n))&&H0(t,Mr[n])}),t};Xn||(Ri=function(){if(A2(Ka,this))throw new K2("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:D2(arguments[0]),e=vg(r),t=function(n){var a=this===void 0?Do:this;a===ar&&Yf(t,Ro,n),Ue(a,_t)&&Ue(a[_t],e)&&(a[_t][e]=!1);var o=Cd(1,n);try{Dd(a,e,o)}catch(s){if(!(s instanceof U2))throw s;V0(a,e,o)}};return Yn&&Ad&&Dd(ar,e,{configurable:!0,set:t}),Oh(e,r)},Ka=Ri[lo],fg(Ka,"toString",function(){return pg(this).tag}),fg(Ri,"withoutSetter",function(i){return Oh(vg(i),i)}),B0.f=W0,M0.f=bl,M2.f=Zf,N0.f=U0,R2.f=R0.f=K0,N2.f=G0,L2.f=function(i){return Oh(j2(i),i)},Yn&&B2(Ka,"description",{configurable:!0,get:function(){return pg(this).description}}));pl({global:!0,constructor:!0,wrap:!0,forced:!Xn,sham:!Xn},{Symbol:Ri});yl(D0(q2),function(i){z2(i)});pl({target:ml,stat:!0,forced:!Xn},{useSetter:function(){Ad=!0},useSimple:function(){Ad=!1}});pl({target:"Object",stat:!0,forced:!Xn,sham:!Yn},{create:Y2,defineProperty:bl,defineProperties:Zf,getOwnPropertyDescriptor:U0});pl({target:"Object",stat:!0,forced:!Xn},{getOwnPropertyNames:K0});H2();V2(Ri,ml);F0[_t]=!0;var X2=fa,q0=X2&&!!Symbol.for&&!!Symbol.keyFor,J2=K,Z2=yt,Q2=He,eA=tn,Y0=pa,tA=q0,Th=Y0("string-to-symbol-registry"),rA=Y0("symbol-to-string-registry");J2({target:"Symbol",stat:!0,forced:!tA},{for:function(i){var r=eA(i);if(Q2(Th,r))return Th[r];var e=Z2("Symbol")(r);return Th[r]=e,rA[e]=r,e}});var iA=K,nA=He,aA=To,oA=va,sA=pa,uA=q0,gg=sA("symbol-to-string-registry");iA({target:"Symbol",stat:!0,forced:!uA},{keyFor:function(r){if(!aA(r))throw new TypeError(oA(r)+" is not a symbol");if(nA(gg,r))return gg[r]}});var lA=be,No=lA([].slice),hA=be,yg=yi,cA=Ie,mg=vi,dA=tn,bg=hA([].push),fA=function(i){if(cA(i))return i;if(yg(i)){for(var r=i.length,e=[],t=0;t=r.length)return i.target=void 0,Cs(void 0,!0);switch(i.kind){case"keys":return Cs(e,!1);case"values":return Cs(r[e],!1)}return Cs([e,r[e]],!1)},"values");Dg.Arguments=Dg.Array;var KD={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},GD=KD,qD=$e,YD=zr,XD=Lr,Rg=$a,JD=_e,Ng=JD("toStringTag");for(var xh in GD){var Mg=qD[xh],Ch=Mg&&Mg.prototype;Ch&&YD(Ch)!==Ng&&XD(Ch,Ng,xh),Rg[xh]=Rg.Array}var ZD=YA,uw=ZD,QD=_e,eR=xt.f,Bg=QD("metadata"),Fg=Function.prototype;Fg[Bg]===void 0&&eR(Fg,Bg,{value:null});var tR=ke;tR("asyncDispose");var rR=ke;rR("dispose");var iR=ke;iR("metadata");var nR=uw,aR=nR,oR=yt,sR=be,rv=oR("Symbol"),uR=rv.keyFor,lR=sR(rv.prototype.valueOf),lw=rv.isRegisteredSymbol||function(r){try{return uR(lR(r))!==void 0}catch{return!1}},hR=K,cR=lw;hR({target:"Symbol",stat:!0},{isRegisteredSymbol:cR});var dR=pa,hw=yt,fR=be,vR=To,pR=_e,Cu=hw("Symbol"),jg=Cu.isWellKnownSymbol,cw=hw("Object","getOwnPropertyNames"),gR=fR(Cu.prototype.valueOf),Lg=dR("wks");for(var Ah=0,zg=cw(Cu),yR=zg.length;Ah=a?i?"":void 0:(o=Vg(t,n),o<55296||o>56319||n+1===a||(s=Vg(t,n+1))<56320||s>57343?i?RR(t,n):o:i?NR(t,n,n+2):(o-55296<<10)+(s-56320)+65536)}},MR={codeAt:Wg(!1),charAt:Wg(!0)},BR=MR.charAt,FR=tn,fw=ma,jR=ev,Ug=tv,vw="String Iterator",LR=fw.set,zR=fw.getterFor(vw);jR(String,"String",function(i){LR(this,{type:vw,string:FR(i),index:0})},function(){var r=zR(this),e=r.string,t=r.index,n;return t>=e.length?Ug(void 0,!0):(n=BR(e,t),r.index+=n.length,Ug(n,!1))});var HR=Ao,VR=HR.f("iterator"),WR=VR,pw=WR,UR=pw,KR=UR,GR=KR,qR=GR,gw=qR,YR=Y(gw);function Jn(i){"@babel/helpers - typeof";return Jn=typeof Dn=="function"&&typeof YR=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Dn=="function"&&r.constructor===Dn&&r!==Dn.prototype?"symbol":typeof r},Jn(i)}var XR=Ao,JR=XR.f("toPrimitive"),ZR=JR,QR=ZR,eN=QR,tN=eN,rN=tN,iN=rN,nN=iN,aN=Y(nN);function oN(i,r){if(Jn(i)!=="object"||i===null)return i;var e=i[aN];if(e!==void 0){var t=e.call(i,r||"default");if(Jn(t)!=="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(i)}function yw(i){var r=oN(i,"string");return Jn(r)==="symbol"?r:String(r)}function Kg(i,r){for(var e=0;e=0:s>u;u+=l)u in o&&(n=e(n,o[u],u,a));return n}},PN={left:Yg(!1),right:Yg(!0)},xN=ue,_l=function(i,r){var e=[][i];return!!e&&xN(function(){e.call(null,r||function(){return 1},1)})},CN=$e,AN=vi,Bo=AN(CN.process)==="process",DN=K,RN=PN.left,NN=_l,Xg=da,MN=Bo,BN=!MN&&Xg>79&&Xg<83,FN=BN||!NN("reduce");DN({target:"Array",proto:!0,forced:FN},{reduce:function(r){var e=arguments.length;return RN(this,r,e,e>1?arguments[1]:void 0)}});var jN=ut,LN=jN("Array","reduce"),zN=ze,HN=LN,Nh=Array.prototype,VN=function(i){var r=i.reduce;return i===Nh||zN(Nh,i)&&r===Nh.reduce?HN:r},WN=VN,UN=WN,KN=UN,GN=Y(KN),qN=K,YN=ba.filter,XN=ko,JN=XN("filter");qN({target:"Array",proto:!0,forced:!JN},{filter:function(r){return YN(this,r,arguments.length>1?arguments[1]:void 0)}});var ZN=ut,QN=ZN("Array","filter"),eM=ze,tM=QN,Mh=Array.prototype,rM=function(i){var r=i.filter;return i===Mh||eM(Mh,i)&&r===Mh.filter?tM:r},iM=rM,nM=iM,aM=nM,Rn=Y(aM),oM=K,sM=ba.map,uM=ko,lM=uM("map");oM({target:"Array",proto:!0,forced:!lM},{map:function(r){return sM(this,r,arguments.length>1?arguments[1]:void 0)}});var hM=ut,cM=hM("Array","map"),dM=ze,fM=cM,Bh=Array.prototype,vM=function(i){var r=i.map;return i===Bh||dM(Bh,i)&&r===Bh.map?fM:r},pM=vM,gM=pM,yM=gM,rr=Y(yM),mM=yi,bM=Lt,$M=ul,wM=gi,Ew=function(i,r,e,t,n,a,o,s){for(var u=n,l=0,h=o?wM(o,s):!1,d,c;l0&&mM(d)?(c=bM(d),u=Ew(i,r,d,c,u,a-1)-1):($M(u+1),i[u]=d),u++),l++;return u},_M=Ew,EM=K,SM=_M,OM=kt,TM=Pt,IM=Lt,kM=hl;EM({target:"Array",proto:!0},{flatMap:function(r){var e=TM(this),t=IM(e),n;return OM(r),n=kM(e,0),n.length=SM(n,e,e,t,0,1,r,arguments.length>1?arguments[1]:void 0),n}});var PM=ut;PM("Array","flatMap");var xM=qe,Jg=jt,CM=zf,Sw=function(i,r,e){var t,n;Jg(i);try{if(t=CM(i,"return"),!t){if(r==="throw")throw e;return e}t=xM(t,i)}catch(a){n=!0,t=a}if(r==="throw")throw e;if(n)throw t;return Jg(t),e},AM=jt,DM=Sw,RM=function(i,r,e,t){try{return t?r(AM(e)[0],e[1]):r(e)}catch(n){DM(i,"throw",n)}},NM=_e,MM=$a,BM=NM("iterator"),FM=Array.prototype,Ow=function(i){return i!==void 0&&(MM.Array===i||FM[BM]===i)},jM=zr,Zg=zf,LM=ca,zM=$a,HM=_e,VM=HM("iterator"),El=function(i){if(!LM(i))return Zg(i,VM)||Zg(i,"@@iterator")||zM[jM(i)]},WM=qe,UM=kt,KM=jt,GM=va,qM=El,YM=TypeError,av=function(i,r){var e=arguments.length<2?qM(i):r;if(UM(e))return KM(WM(e,i));throw new YM(GM(i)+" is not iterable")},XM=gi,JM=qe,ZM=Pt,QM=RM,eB=Ow,tB=ll,rB=Lt,Qg=ga,iB=av,nB=El,ey=Array,aB=function(r){var e=ZM(r),t=tB(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=XM(a,n>2?arguments[2]:void 0));var s=nB(e),u=0,l,h,d,c,f,v;if(s&&!(this===ey&&eB(s)))for(c=iB(e,s),f=c.next,h=t?new this:[];!(d=JM(f,c)).done;u++)v=o?QM(c,a,[d.value,u],!0):d.value,Qg(h,u,v);else for(l=rB(e),h=t?new this(l):ey(l);l>u;u++)v=o?a(e[u],u):e[u],Qg(h,u,v);return h.length=u,h},oB=_e,Tw=oB("iterator"),Iw=!1;try{var sB=0,ty={next:function(){return{done:!!sB++}},return:function(){Iw=!0}};ty[Tw]=function(){return this},Array.from(ty,function(){throw 2})}catch{}var kw=function(i,r){try{if(!r&&!Iw)return!1}catch{return!1}var e=!1;try{var t={};t[Tw]=function(){return{next:function(){return{done:e=!0}}}},i(t)}catch{}return e},uB=K,lB=aB,hB=kw,cB=!hB(function(i){Array.from(i)});uB({target:"Array",stat:!0,forced:cB},{from:lB});var dB=we,fB=dB.Array.from,vB=fB,Pw=vB,pB=Pw,ov=Y(pB),gB=El,yB=gB,mB=yB,bB=mB,$B=bB,wB=$B,_B=wB,EB=_B,xw=EB,Cw=Y(xw),SB=xw,sv=Y(SB),OB=K,TB=yi;OB({target:"Array",stat:!0},{isArray:TB});var IB=we,kB=IB.Array.isArray,PB=kB,Aw=PB,xB=Aw,CB=xB,AB=CB,DB=AB,RB=DB,Dw=Y(RB);function NB(i){if(Dw(i))return i}var MB=Ge,BB=yi,FB=TypeError,jB=Object.getOwnPropertyDescriptor,LB=MB&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(i){return i instanceof TypeError}}(),Rw=LB?function(i,r){if(BB(i)&&!jB(i,"length").writable)throw new FB("Cannot set read only .length");return i.length=r}:function(i,r){return i.length=r},zB=K,HB=Pt,VB=Lt,WB=Rw,UB=ul,KB=ue,GB=KB(function(){return[].push.call({length:4294967296},1)!==4294967297}),qB=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(i){return i instanceof TypeError}},YB=GB||!qB();zB({target:"Array",proto:!0,arity:1,forced:YB},{push:function(r){var e=HB(this),t=VB(e),n=arguments.length;UB(t+n);for(var a=0;ai.length)&&(r=i.length);for(var e=0,t=new Array(r);e1?arguments[1]:void 0)},Oj=U,ny=Sj;Oj({target:"Array",proto:!0,forced:[].forEach!==ny},{forEach:ny});var Tj=ut,Ij=Tj("Array","forEach"),kj=Ij,Pj=kj,xj=zr,Cj=ze,Aj=Le,Dj=Pj,Hh=Array.prototype,Rj={DOMTokenList:!0,NodeList:!0},zw=function(i){var r=i.forEach;return i===Hh||Aj(Hh,i)&&r===Hh.forEach||Cj(Rj,xj(i))?Dj:r},Nj=zw,Wi=Y(Nj),Mj=U,Bj=me,Fj=yi,jj=Bj([].reverse),ay=[1,2];Mj({target:"Array",proto:!0,forced:String(ay)===String(ay.reverse())},{reverse:function(){return Fj(this)&&(this.length=this.length),jj(this)}});var Lj=ut,zj=Lj("Array","reverse"),Hj=Le,Vj=zj,Vh=Array.prototype,Wj=function(i){var r=i.reverse;return i===Vh||Hj(Vh,i)&&r===Vh.reverse?Vj:r},Uj=Wj,Hw=Uj,Kj=Hw,Gj=Y(Kj),oy=va,qj=TypeError,Vw=function(i,r){if(!delete i[r])throw new qj("Cannot delete property "+oy(r)+" of "+oy(i))},Yj=U,Xj=Pt,Jj=dl,Zj=sl,Qj=Lt,e3=Rw,t3=ul,r3=hl,i3=ga,Wh=Vw,n3=ko,a3=n3("splice"),o3=Math.max,s3=Math.min;Yj({target:"Array",proto:!0,forced:!a3},{splice:function(r,e){var t=Xj(this),n=Qj(t),a=Jj(r,n),o=arguments.length,s,u,l,h,d,c;for(o===0?s=u=0:o===1?(s=0,u=n-a):(s=o-2,u=s3(o3(Zj(e),0),n-a)),t3(n+s-u),l=r3(t,u),h=0;hn-u+s;h--)Wh(t,h-1)}else if(s>u)for(h=n-u;h>a;h--)d=h+u-1,c=h+s-1,d in t?t[c]=t[d]:Wh(t,c);for(h=0;ha;)for(var u=_3(arguments[a++]),l=o?E3(Kh(u),o(u)):Kh(u),h=l.length,d=0,c;h>d;)c=l[d++],(!sy||y3(s,u,c))&&(t[c]=u[c]);return t}:wn,O3=U,ly=S3;O3({target:"Object",stat:!0,arity:2,forced:Object.assign!==ly},{assign:ly});var T3=$e,I3=T3.Object.assign,k3=I3,P3=k3,x3=P3,C3=Y(x3),A3=U,D3=le,R3=Pt,Uw=$l,N3=rw,M3=D3(function(){Uw(1)});A3({target:"Object",stat:!0,forced:M3,sham:!N3},{getPrototypeOf:function(r){return Uw(R3(r))}});var B3=$e,F3=B3.Object.getPrototypeOf,j3=F3,L3=j3,z3=U,H3=Ke,V3=rn;z3({target:"Object",stat:!0,sham:!H3},{create:V3});var W3=$e,U3=W3.Object,K3=function(r,e){return U3.create(r,e)},G3=K3,Kw=G3,q3=Kw,Y3=Y(q3),Fd=$e,X3=ha;Fd.JSON||(Fd.JSON={stringify:JSON.stringify});var J3=function(r,e,t){return X3(Fd.JSON.stringify,null,arguments)},Z3=J3,Q3=Z3,eL=Q3,tL=Y(eL),rL=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",iL=TypeError,Gw=function(i,r){if(ie,o=aL(t)?t:hL(t),s=a?uL(arguments,e):[],u=a?function(){nL(o,this,s)}:o;return r?i(u,n):i(u)}:i},dL=U,Xw=be,fL=Yw,hy=fL(Xw.setInterval,!0);dL({global:!0,bind:!0,forced:Xw.setInterval!==hy},{setInterval:hy});var vL=U,Jw=be,pL=Yw,cy=pL(Jw.setTimeout,!0);vL({global:!0,bind:!0,forced:Jw.setTimeout!==cy},{setTimeout:cy});var gL=$e,yL=gL.setTimeout,mL=yL,bL=Y(mL),Zw={exports:{}};(function(i){function r(t){if(t)return e(t);this._callbacks=new Map}function e(t){return Object.assign(t,r.prototype),t._callbacks=new Map,t}r.prototype.on=function(t,n){const a=this._callbacks.get(t)??[];return a.push(n),this._callbacks.set(t,a),this},r.prototype.once=function(t,n){const a=(...o)=>{this.off(t,a),n.apply(this,o)};return a.fn=n,this.on(t,a),this},r.prototype.off=function(t,n){if(t===void 0&&n===void 0)return this._callbacks.clear(),this;if(n===void 0)return this._callbacks.delete(t),this;const a=this._callbacks.get(t);if(a){for(const[o,s]of a.entries())if(s===n||s.fn===n){a.splice(o,1);break}a.length===0?this._callbacks.delete(t):this._callbacks.set(t,a)}return this},r.prototype.emit=function(t,...n){const a=this._callbacks.get(t);if(a){const o=[...a];for(const s of o)s.apply(this,n)}return this},r.prototype.listeners=function(t){return this._callbacks.get(t)??[]},r.prototype.listenerCount=function(t){if(t)return this.listeners(t).length;let n=0;for(const a of this._callbacks.values())n+=a.length;return n},r.prototype.hasListeners=function(t){return this.listenerCount(t)>0},r.prototype.addEventListener=r.prototype.on,r.prototype.removeListener=r.prototype.off,r.prototype.removeEventListener=r.prototype.off,r.prototype.removeAllListeners=r.prototype.off,i.exports=r})(Zw);var $L=Zw.exports,wL=Y($L);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Et(i){return FF(i)||jF(i)||jw(i)||LF()}var zF=uw,Sl=Y(zF),HF=ut,VF=HF("Array","concat"),WF=ze,UF=VF,zh=Array.prototype,KF=function(i){var r=i.concat;return i===zh||WF(zh,i)&&r===zh.concat?UF:r},GF=KF,qF=GF,YF=qF,Ol=Y(YF),XF=Mw,Tl=Y(XF),JF=yt,ZF=be,QF=xo,ej=Co,tj=jt,rj=ZF([].concat),uv=JF("Reflect","ownKeys")||function(r){var e=QF.f(tj(r)),t=ej.f;return t?rj(e,t(r)):e},ij=K,nj=uv;ij({target:"Reflect",stat:!0},{ownKeys:nj});var aj=we,oj=aj.Reflect.ownKeys,sj=oj,uj=sj,lj=uj,hj=Y(lj),cj=Aw,Bt=Y(cj),dj=K,fj=Pt,Lw=fl,vj=ue,pj=vj(function(){Lw(1)});dj({target:"Object",stat:!0,forced:pj},{keys:function(r){return Lw(fj(r))}});var gj=we,yj=gj.Object.keys,mj=yj,bj=mj,$j=bj,lv=Y($j),wj=ba.forEach,_j=_l,Ej=_j("forEach"),Sj=Ej?[].forEach:function(r){return wj(this,r,arguments.length>1?arguments[1]:void 0)},Oj=K,ny=Sj;Oj({target:"Array",proto:!0,forced:[].forEach!==ny},{forEach:ny});var Tj=ut,Ij=Tj("Array","forEach"),kj=Ij,Pj=kj,xj=zr,Cj=He,Aj=ze,Dj=Pj,Hh=Array.prototype,Rj={DOMTokenList:!0,NodeList:!0},zw=function(i){var r=i.forEach;return i===Hh||Aj(Hh,i)&&r===Hh.forEach||Cj(Rj,xj(i))?Dj:r},Nj=zw,Wi=Y(Nj),Mj=K,Bj=be,Fj=yi,jj=Bj([].reverse),ay=[1,2];Mj({target:"Array",proto:!0,forced:String(ay)===String(ay.reverse())},{reverse:function(){return Fj(this)&&(this.length=this.length),jj(this)}});var Lj=ut,zj=Lj("Array","reverse"),Hj=ze,Vj=zj,Vh=Array.prototype,Wj=function(i){var r=i.reverse;return i===Vh||Hj(Vh,i)&&r===Vh.reverse?Vj:r},Uj=Wj,Hw=Uj,Kj=Hw,Gj=Y(Kj),oy=va,qj=TypeError,Vw=function(i,r){if(!delete i[r])throw new qj("Cannot delete property "+oy(r)+" of "+oy(i))},Yj=K,Xj=Pt,Jj=dl,Zj=sl,Qj=Lt,e3=Rw,t3=ul,r3=hl,i3=ga,Wh=Vw,n3=ko,a3=n3("splice"),o3=Math.max,s3=Math.min;Yj({target:"Array",proto:!0,forced:!a3},{splice:function(r,e){var t=Xj(this),n=Qj(t),a=Jj(r,n),o=arguments.length,s,u,l,h,d,c;for(o===0?s=u=0:o===1?(s=0,u=n-a):(s=o-2,u=s3(o3(Zj(e),0),n-a)),t3(n+s-u),l=r3(t,u),h=0;hn-u+s;h--)Wh(t,h-1)}else if(s>u)for(h=n-u;h>a;h--)d=h+u-1,c=h+s-1,d in t?t[c]=t[d]:Wh(t,c);for(h=0;ha;)for(var u=_3(arguments[a++]),l=o?E3(Kh(u),o(u)):Kh(u),h=l.length,d=0,c;h>d;)c=l[d++],(!sy||y3(s,u,c))&&(t[c]=u[c]);return t}:wn,O3=K,ly=S3;O3({target:"Object",stat:!0,arity:2,forced:Object.assign!==ly},{assign:ly});var T3=we,I3=T3.Object.assign,k3=I3,P3=k3,x3=P3,C3=Y(x3),A3=K,D3=ue,R3=Pt,Uw=$l,N3=rw,M3=D3(function(){Uw(1)});A3({target:"Object",stat:!0,forced:M3,sham:!N3},{getPrototypeOf:function(r){return Uw(R3(r))}});var B3=we,F3=B3.Object.getPrototypeOf,j3=F3,L3=j3,z3=K,H3=Ge,V3=rn;z3({target:"Object",stat:!0,sham:!H3},{create:V3});var W3=we,U3=W3.Object,K3=function(r,e){return U3.create(r,e)},G3=K3,Kw=G3,q3=Kw,Y3=Y(q3),Fd=we,X3=ha;Fd.JSON||(Fd.JSON={stringify:JSON.stringify});var J3=function(r,e,t){return X3(Fd.JSON.stringify,null,arguments)},Z3=J3,Q3=Z3,eL=Q3,tL=Y(eL),rL=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",iL=TypeError,Gw=function(i,r){if(ie,o=aL(t)?t:hL(t),s=a?uL(arguments,e):[],u=a?function(){nL(o,this,s)}:o;return r?i(u,n):i(u)}:i},dL=K,Xw=$e,fL=Yw,hy=fL(Xw.setInterval,!0);dL({global:!0,bind:!0,forced:Xw.setInterval!==hy},{setInterval:hy});var vL=K,Jw=$e,pL=Yw,cy=pL(Jw.setTimeout,!0);vL({global:!0,bind:!0,forced:Jw.setTimeout!==cy},{setTimeout:cy});var gL=we,yL=gL.setTimeout,mL=yL,bL=Y(mL),Zw={exports:{}};(function(i){function r(t){if(t)return e(t);this._callbacks=new Map}function e(t){return Object.assign(t,r.prototype),t._callbacks=new Map,t}r.prototype.on=function(t,n){const a=this._callbacks.get(t)??[];return a.push(n),this._callbacks.set(t,a),this},r.prototype.once=function(t,n){const a=(...o)=>{this.off(t,a),n.apply(this,o)};return a.fn=n,this.on(t,a),this},r.prototype.off=function(t,n){if(t===void 0&&n===void 0)return this._callbacks.clear(),this;if(n===void 0)return this._callbacks.delete(t),this;const a=this._callbacks.get(t);if(a){for(const[o,s]of a.entries())if(s===n||s.fn===n){a.splice(o,1);break}a.length===0?this._callbacks.delete(t):this._callbacks.set(t,a)}return this},r.prototype.emit=function(t,...n){const a=this._callbacks.get(t);if(a){const o=[...a];for(const s of o)s.apply(this,n)}return this},r.prototype.listeners=function(t){return this._callbacks.get(t)??[]},r.prototype.listenerCount=function(t){if(t)return this.listeners(t).length;let n=0;for(const a of this._callbacks.values())n+=a.length;return n},r.prototype.hasListeners=function(t){return this.listenerCount(t)>0},r.prototype.addEventListener=r.prototype.on,r.prototype.removeListener=r.prototype.off,r.prototype.removeEventListener=r.prototype.off,r.prototype.removeAllListeners=r.prototype.off,i.exports=r})(Zw);var $L=Zw.exports,wL=Y($L);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
* http://naver.github.io/egjs
*
* Forked By Naver egjs
* Copyright (c) hammerjs
- * Licensed under the MIT license */function sr(){return sr=Object.assign||function(i){for(var r=1;r"u"?{style:{}}:document.createElement("div"),EL="function",Nn=Math.round,Ki=Math.abs,hv=Date.now;function Il(i,r){for(var e,t,n=r[0].toUpperCase()+r.slice(1),a=0;a"u"?kr={}:kr=window;var Qw=Il(_L.style,"touchAction"),e_=Qw!==void 0;function SL(){if(!e_)return!1;var i={},r=kr.CSS&&kr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return i[e]=r?kr.CSS.supports("touch-action",e):!0}),i}var t_="compute",r_="auto",Ld="manipulation",Mi="none",ho="pan-x",co="pan-y",Ds=SL(),OL=/mobile|tablet|ip(ad|hone|od)|android/i,i_="ontouchstart"in kr,TL=Il(kr,"PointerEvent")!==void 0,IL=i_&&OL.test(navigator.userAgent),Fo="touch",kL="pen",cv="mouse",PL="kinect",xL=25,pt=1,an=2,Be=4,Tt=8,Au=1,jo=2,Lo=4,zo=8,Zn=16,gr=jo|Lo,Bi=zo|Zn,n_=gr|Bi,a_=["x","y"],Du=["clientX","clientY"];function Pr(i,r,e){var t;if(i)if(i.forEach)i.forEach(r,e);else if(i.length!==void 0)for(t=0;t-1}function CL(i){if(Ci(i,Mi))return Mi;var r=Ci(i,ho),e=Ci(i,co);return r&&e?Mi:r||e?r?ho:co:Ci(i,Ld)?Ld:r_}var o_=function(){function i(e,t){this.manager=e,this.set(t)}var r=i.prototype;return r.set=function(t){t===t_&&(t=this.compute()),e_&&this.manager.element.style&&Ds[t]&&(this.manager.element.style[Qw]=t),this.actions=t.toLowerCase().trim()},r.update=function(){this.set(this.manager.options.touchAction)},r.compute=function(){var t=[];return Pr(this.manager.recognizers,function(n){kl(n.options.enable,[n])&&(t=t.concat(n.getTouchAction()))}),CL(t.join(" "))},r.preventDefaults=function(t){var n=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=Ci(o,Mi)&&!Ds[Mi],u=Ci(o,co)&&!Ds[co],l=Ci(o,ho)&&!Ds[ho];if(s){var h=t.pointers.length===1,d=t.distance<2,c=t.deltaTime<250;if(h&&d&&c)return}if(!(l&&u)&&(s||u&&a&gr||l&&a&Bi))return this.preventSrc(n)},r.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},i}();function dv(i,r){for(;i;){if(i===r)return!0;i=i.parentNode}return!1}function s_(i){var r=i.length;if(r===1)return{x:Nn(i[0].clientX),y:Nn(i[0].clientY)};for(var e=0,t=0,n=0;n=Ki(r)?i<0?jo:Lo:r<0?zo:Zn}function AL(i,r){var e=r.center,t=i.offsetDelta||{},n=i.prevDelta||{},a=i.prevInput||{};(r.eventType===pt||a.eventType===Be)&&(n=i.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=i.offsetDelta={x:e.x,y:e.y}),r.deltaX=n.x+(e.x-t.x),r.deltaY=n.y+(e.y-t.y)}function l_(i,r,e){return{x:r/i||0,y:e/i||0}}function DL(i,r){return Ru(r[0],r[1],Du)/Ru(i[0],i[1],Du)}function RL(i,r){return zd(r[1],r[0],Du)+zd(i[1],i[0],Du)}function NL(i,r){var e=i.lastInterval||r,t=r.timeStamp-e.timeStamp,n,a,o,s;if(r.eventType!==Tt&&(t>xL||e.velocity===void 0)){var u=r.deltaX-e.deltaX,l=r.deltaY-e.deltaY,h=l_(t,u,l);a=h.x,o=h.y,n=Ki(h.x)>Ki(h.y)?h.x:h.y,s=u_(u,l),i.lastInterval=r}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;r.velocity=n,r.velocityX=a,r.velocityY=o,r.direction=s}function ML(i,r){var e=i.session,t=r.pointers,n=t.length;e.firstInput||(e.firstInput=fy(r)),n>1&&!e.firstMultiple?e.firstMultiple=fy(r):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=r.center=s_(t);r.timeStamp=hv(),r.deltaTime=r.timeStamp-a.timeStamp,r.angle=zd(s,u),r.distance=Ru(s,u),AL(e,r),r.offsetDirection=u_(r.deltaX,r.deltaY);var l=l_(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=l.x,r.overallVelocityY=l.y,r.overallVelocity=Ki(l.x)>Ki(l.y)?l.x:l.y,r.scale=o?DL(o.pointers,t):1,r.rotation=o?RL(o.pointers,t):0,r.maxPointers=e.prevInput?r.pointers.length>e.prevInput.maxPointers?r.pointers.length:e.prevInput.maxPointers:r.pointers.length,NL(e,r);var h=i.element,d=r.srcEvent,c;d.composedPath?c=d.composedPath()[0]:d.path?c=d.path[0]:c=d.target,dv(c,h)&&(h=c),r.target=h}function BL(i,r,e){var t=e.pointers.length,n=e.changedPointers.length,a=r&pt&&t-n===0,o=r&(Be|Tt)&&t-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(i.session={}),e.eventType=r,ML(i,e),i.emit("hammer.input",e),i.recognize(e),i.session.prevInput=e}function fo(i){return i.trim().split(/\s+/g)}function Xa(i,r,e){Pr(fo(r),function(t){i.addEventListener(t,e,!1)})}function Ja(i,r,e){Pr(fo(r),function(t){i.removeEventListener(t,e,!1)})}function vy(i){var r=i.ownerDocument||i;return r.defaultView||r.parentWindow||window}var wa=function(){function i(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){kl(e.options.enable,[e])&&n.handler(a)},this.init()}var r=i.prototype;return r.handler=function(){},r.init=function(){this.evEl&&Xa(this.element,this.evEl,this.domHandler),this.evTarget&&Xa(this.target,this.evTarget,this.domHandler),this.evWin&&Xa(vy(this.element),this.evWin,this.domHandler)},r.destroy=function(){this.evEl&&Ja(this.element,this.evEl,this.domHandler),this.evTarget&&Ja(this.target,this.evTarget,this.domHandler),this.evWin&&Ja(vy(this.element),this.evWin,this.domHandler)},i}();function Gi(i,r,e){if(i.indexOf&&!e)return i.indexOf(r);for(var t=0;tu[r]}):t=t.sort()),t}var LL={touchstart:pt,touchmove:an,touchend:Be,touchcancel:Tt},zL="touchstart touchmove touchend touchcancel",vv=function(i){Xt(r,i);function r(){var t;return r.prototype.evTarget=zL,t=i.apply(this,arguments)||this,t.targetIds={},t}var e=r.prototype;return e.handler=function(n){var a=LL[n.type],o=HL.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Fo,srcEvent:n})},r}(wa);function HL(i,r){var e=vo(i.touches),t=this.targetIds;if(r&(pt|an)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var n,a,o=vo(i.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return dv(l.target,u)}),r===pt)for(n=0;n-1&&n.splice(s,1)};setTimeout(a,KL)}}function GL(i,r){i&pt?(this.primaryTouch=r.changedPointers[0].identifier,gy.call(this,r)):i&(Be|Tt)&&gy.call(this,r)}function qL(i){for(var r=i.srcEvent.clientX,e=i.srcEvent.clientY,t=0;t-1&&this.requireFail.splice(n,1),this},r.hasRequireFailures=function(){return this.requireFail.length>0},r.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},r.emit=function(t){var n=this,a=this.state;function o(s){n.manager.emit(s,t)}a=ai&&o(n.options.event+yy(a))},r.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=fr},r.canEmit=function(){for(var t=0;ta.threshold&&u&a.direction},e.attrTest=function(n){return ea.prototype.attrTest.call(this,n)&&(this.state&qt||!(this.state&qt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=v_(n.direction);a&&(n.additionalEvent=this.options.event+a),i.prototype.emit.call(this,n)},r}(ea),p_=function(i){Xt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,sr({event:"swipe",threshold:10,velocity:.3,direction:gr|Bi,pointers:1},t))||this}var e=r.prototype;return e.getTouchAction=function(){return gv.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(gr|Bi)?o=n.overallVelocity:a&gr?o=n.overallVelocityX:a&Bi&&(o=n.overallVelocityY),i.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Ki(o)>this.options.velocity&&n.eventType&Be},e.emit=function(n){var a=v_(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},r}(ea),g_=function(i){Xt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,sr({event:"pinch",threshold:0,pointers:2},t))||this}var e=r.prototype;return e.getTouchAction=function(){return[Mi]},e.attrTest=function(n){return i.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&qt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}i.prototype.emit.call(this,n)},r}(ea),y_=function(i){Xt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,sr({event:"rotate",threshold:0,pointers:2},t))||this}var e=r.prototype;return e.getTouchAction=function(){return[Mi]},e.attrTest=function(n){return i.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&qt)},r}(ea),m_=function(i){Xt(r,i);function r(t){var n;return t===void 0&&(t={}),n=i.call(this,sr({event:"press",pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var e=r.prototype;return e.getTouchAction=function(){return[r_]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!s||n.eventType&(Be|Tt)&&!l)this.reset();else if(n.eventType&pt)this.reset(),this._timer=setTimeout(function(){a.state=xr,a.tryEmit()},o.time);else if(n.eventType&Be)return xr;return fr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===xr&&(n&&n.eventType&Be?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=hv(),this.manager.emit(this.options.event,this._input)))},r}(Ho),b_={domEvents:!1,touchAction:t_,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},my=[[y_,{enable:!1}],[g_,{enable:!1},["rotate"]],[p_,{direction:gr}],[gv,{direction:gr},["swipe"]],[Hd],[Hd,{event:"doubletap",taps:2},["tap"]],[m_]],ZL=1,by=2;function $y(i,r){var e=i.element;if(e.style){var t;Pr(i.options.cssProps,function(n,a){t=Il(e.style,a),r?(i.oldCssProps[t]=e.style[t],e.style[t]=n):e.style[t]=i.oldCssProps[t]||""}),r||(i.oldCssProps={})}}function QL(i,r){var e=document.createEvent("Event");e.initEvent(i,!0,!0),e.gesture=r,r.target.dispatchEvent(e)}var wy=function(){function i(e,t){var n=this;this.options=Ui({},b_,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=YL(this),this.touchAction=new o_(this,this.options.touchAction),$y(this,!0),Pr(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var r=i.prototype;return r.set=function(t){return Ui(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},r.stop=function(t){this.session.stopped=t?by:ZL},r.recognize=function(t){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&xr)&&(n.curRecognizer=null,s=null);for(var u=0;u"u"?{style:{}}:document.createElement("div"),EL="function",Nn=Math.round,Ki=Math.abs,hv=Date.now;function Il(i,r){for(var e,t,n=r[0].toUpperCase()+r.slice(1),a=0;a"u"?kr={}:kr=window;var Qw=Il(_L.style,"touchAction"),e_=Qw!==void 0;function SL(){if(!e_)return!1;var i={},r=kr.CSS&&kr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return i[e]=r?kr.CSS.supports("touch-action",e):!0}),i}var t_="compute",r_="auto",Ld="manipulation",Mi="none",ho="pan-x",co="pan-y",Ds=SL(),OL=/mobile|tablet|ip(ad|hone|od)|android/i,i_="ontouchstart"in kr,TL=Il(kr,"PointerEvent")!==void 0,IL=i_&&OL.test(navigator.userAgent),Fo="touch",kL="pen",cv="mouse",PL="kinect",xL=25,pt=1,an=2,Fe=4,Tt=8,Au=1,jo=2,Lo=4,zo=8,Zn=16,gr=jo|Lo,Bi=zo|Zn,n_=gr|Bi,a_=["x","y"],Du=["clientX","clientY"];function Pr(i,r,e){var t;if(i)if(i.forEach)i.forEach(r,e);else if(i.length!==void 0)for(t=0;t-1}function CL(i){if(Ci(i,Mi))return Mi;var r=Ci(i,ho),e=Ci(i,co);return r&&e?Mi:r||e?r?ho:co:Ci(i,Ld)?Ld:r_}var o_=function(){function i(e,t){this.manager=e,this.set(t)}var r=i.prototype;return r.set=function(t){t===t_&&(t=this.compute()),e_&&this.manager.element.style&&Ds[t]&&(this.manager.element.style[Qw]=t),this.actions=t.toLowerCase().trim()},r.update=function(){this.set(this.manager.options.touchAction)},r.compute=function(){var t=[];return Pr(this.manager.recognizers,function(n){kl(n.options.enable,[n])&&(t=t.concat(n.getTouchAction()))}),CL(t.join(" "))},r.preventDefaults=function(t){var n=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=Ci(o,Mi)&&!Ds[Mi],u=Ci(o,co)&&!Ds[co],l=Ci(o,ho)&&!Ds[ho];if(s){var h=t.pointers.length===1,d=t.distance<2,c=t.deltaTime<250;if(h&&d&&c)return}if(!(l&&u)&&(s||u&&a&gr||l&&a&Bi))return this.preventSrc(n)},r.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},i}();function dv(i,r){for(;i;){if(i===r)return!0;i=i.parentNode}return!1}function s_(i){var r=i.length;if(r===1)return{x:Nn(i[0].clientX),y:Nn(i[0].clientY)};for(var e=0,t=0,n=0;n=Ki(r)?i<0?jo:Lo:r<0?zo:Zn}function AL(i,r){var e=r.center,t=i.offsetDelta||{},n=i.prevDelta||{},a=i.prevInput||{};(r.eventType===pt||a.eventType===Fe)&&(n=i.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=i.offsetDelta={x:e.x,y:e.y}),r.deltaX=n.x+(e.x-t.x),r.deltaY=n.y+(e.y-t.y)}function l_(i,r,e){return{x:r/i||0,y:e/i||0}}function DL(i,r){return Ru(r[0],r[1],Du)/Ru(i[0],i[1],Du)}function RL(i,r){return zd(r[1],r[0],Du)+zd(i[1],i[0],Du)}function NL(i,r){var e=i.lastInterval||r,t=r.timeStamp-e.timeStamp,n,a,o,s;if(r.eventType!==Tt&&(t>xL||e.velocity===void 0)){var u=r.deltaX-e.deltaX,l=r.deltaY-e.deltaY,h=l_(t,u,l);a=h.x,o=h.y,n=Ki(h.x)>Ki(h.y)?h.x:h.y,s=u_(u,l),i.lastInterval=r}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;r.velocity=n,r.velocityX=a,r.velocityY=o,r.direction=s}function ML(i,r){var e=i.session,t=r.pointers,n=t.length;e.firstInput||(e.firstInput=fy(r)),n>1&&!e.firstMultiple?e.firstMultiple=fy(r):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=r.center=s_(t);r.timeStamp=hv(),r.deltaTime=r.timeStamp-a.timeStamp,r.angle=zd(s,u),r.distance=Ru(s,u),AL(e,r),r.offsetDirection=u_(r.deltaX,r.deltaY);var l=l_(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=l.x,r.overallVelocityY=l.y,r.overallVelocity=Ki(l.x)>Ki(l.y)?l.x:l.y,r.scale=o?DL(o.pointers,t):1,r.rotation=o?RL(o.pointers,t):0,r.maxPointers=e.prevInput?r.pointers.length>e.prevInput.maxPointers?r.pointers.length:e.prevInput.maxPointers:r.pointers.length,NL(e,r);var h=i.element,d=r.srcEvent,c;d.composedPath?c=d.composedPath()[0]:d.path?c=d.path[0]:c=d.target,dv(c,h)&&(h=c),r.target=h}function BL(i,r,e){var t=e.pointers.length,n=e.changedPointers.length,a=r&pt&&t-n===0,o=r&(Fe|Tt)&&t-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(i.session={}),e.eventType=r,ML(i,e),i.emit("hammer.input",e),i.recognize(e),i.session.prevInput=e}function fo(i){return i.trim().split(/\s+/g)}function Xa(i,r,e){Pr(fo(r),function(t){i.addEventListener(t,e,!1)})}function Ja(i,r,e){Pr(fo(r),function(t){i.removeEventListener(t,e,!1)})}function vy(i){var r=i.ownerDocument||i;return r.defaultView||r.parentWindow||window}var wa=function(){function i(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){kl(e.options.enable,[e])&&n.handler(a)},this.init()}var r=i.prototype;return r.handler=function(){},r.init=function(){this.evEl&&Xa(this.element,this.evEl,this.domHandler),this.evTarget&&Xa(this.target,this.evTarget,this.domHandler),this.evWin&&Xa(vy(this.element),this.evWin,this.domHandler)},r.destroy=function(){this.evEl&&Ja(this.element,this.evEl,this.domHandler),this.evTarget&&Ja(this.target,this.evTarget,this.domHandler),this.evWin&&Ja(vy(this.element),this.evWin,this.domHandler)},i}();function Gi(i,r,e){if(i.indexOf&&!e)return i.indexOf(r);for(var t=0;tu[r]}):t=t.sort()),t}var LL={touchstart:pt,touchmove:an,touchend:Fe,touchcancel:Tt},zL="touchstart touchmove touchend touchcancel",vv=function(i){Xt(r,i);function r(){var t;return r.prototype.evTarget=zL,t=i.apply(this,arguments)||this,t.targetIds={},t}var e=r.prototype;return e.handler=function(n){var a=LL[n.type],o=HL.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Fo,srcEvent:n})},r}(wa);function HL(i,r){var e=vo(i.touches),t=this.targetIds;if(r&(pt|an)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var n,a,o=vo(i.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return dv(l.target,u)}),r===pt)for(n=0;n-1&&n.splice(s,1)};setTimeout(a,KL)}}function GL(i,r){i&pt?(this.primaryTouch=r.changedPointers[0].identifier,gy.call(this,r)):i&(Fe|Tt)&&gy.call(this,r)}function qL(i){for(var r=i.srcEvent.clientX,e=i.srcEvent.clientY,t=0;t-1&&this.requireFail.splice(n,1),this},r.hasRequireFailures=function(){return this.requireFail.length>0},r.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},r.emit=function(t){var n=this,a=this.state;function o(s){n.manager.emit(s,t)}a=ai&&o(n.options.event+yy(a))},r.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=fr},r.canEmit=function(){for(var t=0;ta.threshold&&u&a.direction},e.attrTest=function(n){return ea.prototype.attrTest.call(this,n)&&(this.state&qt||!(this.state&qt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=v_(n.direction);a&&(n.additionalEvent=this.options.event+a),i.prototype.emit.call(this,n)},r}(ea),p_=function(i){Xt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,sr({event:"swipe",threshold:10,velocity:.3,direction:gr|Bi,pointers:1},t))||this}var e=r.prototype;return e.getTouchAction=function(){return gv.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(gr|Bi)?o=n.overallVelocity:a&gr?o=n.overallVelocityX:a&Bi&&(o=n.overallVelocityY),i.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Ki(o)>this.options.velocity&&n.eventType&Fe},e.emit=function(n){var a=v_(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},r}(ea),g_=function(i){Xt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,sr({event:"pinch",threshold:0,pointers:2},t))||this}var e=r.prototype;return e.getTouchAction=function(){return[Mi]},e.attrTest=function(n){return i.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&qt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}i.prototype.emit.call(this,n)},r}(ea),y_=function(i){Xt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,sr({event:"rotate",threshold:0,pointers:2},t))||this}var e=r.prototype;return e.getTouchAction=function(){return[Mi]},e.attrTest=function(n){return i.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&qt)},r}(ea),m_=function(i){Xt(r,i);function r(t){var n;return t===void 0&&(t={}),n=i.call(this,sr({event:"press",pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var e=r.prototype;return e.getTouchAction=function(){return[r_]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!s||n.eventType&(Fe|Tt)&&!l)this.reset();else if(n.eventType&pt)this.reset(),this._timer=setTimeout(function(){a.state=xr,a.tryEmit()},o.time);else if(n.eventType&Fe)return xr;return fr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===xr&&(n&&n.eventType&Fe?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=hv(),this.manager.emit(this.options.event,this._input)))},r}(Ho),b_={domEvents:!1,touchAction:t_,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},my=[[y_,{enable:!1}],[g_,{enable:!1},["rotate"]],[p_,{direction:gr}],[gv,{direction:gr},["swipe"]],[Hd],[Hd,{event:"doubletap",taps:2},["tap"]],[m_]],ZL=1,by=2;function $y(i,r){var e=i.element;if(e.style){var t;Pr(i.options.cssProps,function(n,a){t=Il(e.style,a),r?(i.oldCssProps[t]=e.style[t],e.style[t]=n):e.style[t]=i.oldCssProps[t]||""}),r||(i.oldCssProps={})}}function QL(i,r){var e=document.createEvent("Event");e.initEvent(i,!0,!0),e.gesture=r,r.target.dispatchEvent(e)}var wy=function(){function i(e,t){var n=this;this.options=Ui({},b_,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=YL(this),this.touchAction=new o_(this,this.options.touchAction),$y(this,!0),Pr(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var r=i.prototype;return r.set=function(t){return Ui(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},r.stop=function(t){this.session.stopped=t?by:ZL},r.recognize=function(t){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&xr)&&(n.curRecognizer=null,s=null);for(var u=0;u\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),i.apply(this,arguments)}}var w_=$_(function(i,r,e){for(var t=Object.keys(r),n=0;n=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function l5(i,r){var e;if(i){if(typeof i=="string")return Ey(i,r);var t=Tl(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return ov(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ey(i,r)}}function Ey(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e1?e-1:0),n=1;n2){var t;return Nu.apply(void 0,Ol(t=[S_(r[0],r[1])]).call(t,Et(Tl(r).call(r,2))))}var n=r[0],a=r[1];if(n instanceof Date&&a instanceof Date)return n.setTime(a.getTime()),n;var o=__(hj(a)),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===E_?delete n[u]:n[u]!==null&&a[u]!==null&&typeof n[u]=="object"&&typeof a[u]=="object"&&!Bt(n[u])&&!Bt(a[u])?n[u]=Nu(n[u],a[u]):n[u]=O_(a[u]))}}catch(l){o.e(l)}finally{o.f()}return n}function O_(i){return Bt(i)?rr(i).call(i,function(r){return O_(r)}):typeof i=="object"&&i!==null?i instanceof Date?new Date(i.getTime()):Nu({},i):i}function T_(i){for(var r=0,e=lv(i);ro;)u=t(e,s=n[o++]),u!==void 0&&Y5(a,s,u);return a}});var X5=$e,J5=X5.Object.getOwnPropertyDescriptors,Z5=J5,Q5=Z5,ez=Q5,ky=Y(ez),M_={exports:{}},tz=U,rz=Ke,Py=cl.f;tz({target:"Object",stat:!0,forced:Object.defineProperties!==Py,sham:!rz},{defineProperties:Py});var iz=$e,B_=iz.Object,nz=M_.exports=function(r,e){return B_.defineProperties(r,e)};B_.defineProperties.sham&&(nz.sham=!0);var az=M_.exports,oz=az,sz=oz,uz=sz,lz=Y(uz),hz=p0,cz=Y(hz);function F_(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}var dz=Kw,fz=dz,vz=fz,pz=vz,j_=pz,gz=Y(j_),yz=U,mz=aw;yz({target:"Object",stat:!0},{setPrototypeOf:mz});var bz=$e,$z=bz.Object.setPrototypeOf,wz=$z,_z=wz,Ez=_z,Sz=Ez,Oz=Sz,Tz=Oz,L_=Tz,Vd=Y(L_),Iz=ww,kz=Iz,Pz=kz,xz=Pz,Cz=xz,z_=Y(Cz);function Wd(i,r){var e;return Wd=Vd?z_(e=Vd).call(e):function(n,a){return n.__proto__=a,n},Wd(i,r)}function Az(i,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=gz(r.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),ol(i,"prototype",{writable:!1}),Wd(i,r)}function Dz(i,r){if(r&&(Jn(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F_(i)}var Rz=L3,Nz=Rz,Mz=Nz,Bz=Mz,H_=Bz,xy=Y(H_);function Mu(i){var r;return Mu=Vd?z_(r=xy).call(r):function(t){return t.__proto__||xy(t)},Mu(i)}var V_={exports:{}},W_={exports:{}};(function(i){var r=iv,e=gw;function t(n){"@babel/helpers - typeof";return i.exports=t=typeof r=="function"&&typeof e=="symbol"?function(a){return typeof a}:function(a){return a&&typeof r=="function"&&a.constructor===r&&a!==r.prototype?"symbol":typeof a},i.exports.__esModule=!0,i.exports.default=i.exports,t(n)}i.exports=t,i.exports.__esModule=!0,i.exports.default=i.exports})(W_);var Fz=W_.exports,jz=zw,Lz=jz,zz=Lz,Hz=zz,Vz=Hz,Cy=ze,Wz=uv,Uz=Qi,Kz=xt,Gz=function(i,r,e){for(var t=Wz(r),n=Kz.f,a=Uz.f,o=0;od;d++)if(f=y(i[d]),f&&Dy(Ny,f))return f;return new fu(!1)}l=p4(i,h)}for(v=a?i.next:l.next;!(p=h4(v,l)).done;){try{f=y(p.value)}catch(m){Ry(l,"throw",m)}if(typeof f=="object"&&f&&Dy(Ny,f))return f}return new fu(!1)},m4=tn,b4=function(i,r){return i===void 0?arguments.length<2?"":r:m4(i)},$4=U,w4=Le,_4=$l,Bu=aw,E4=Gz,G_=rn,qh=Lr,Yh=en,S4=Xz,O4=u4,T4=on,I4=b4,k4=we,P4=k4("toStringTag"),Fu=Error,x4=[].push,ta=function(r,e){var t=w4(Xh,this),n;Bu?n=Bu(new Fu,t?_4(this):Xh):(n=t?this:G_(Xh),qh(n,P4,"Error")),e!==void 0&&qh(n,"message",I4(e)),O4(n,ta,n.stack,1),arguments.length>2&&S4(n,arguments[2]);var a=[];return T4(r,x4,{that:a}),qh(n,"errors",a),n};Bu?Bu(ta,Fu):E4(ta,Fu,{name:!0});var Xh=ta.prototype=G_(Fu.prototype,{constructor:Yh(1,ta),message:Yh(1,""),name:Yh(1,"AggregateError")});$4({global:!0,constructor:!0,arity:2},{AggregateError:ta});var C4=yt,A4=qf,D4=we,R4=Ke,My=D4("species"),q_=function(i){var r=C4(i);R4&&r&&!r[My]&&A4(r,My,{configurable:!0,get:function(){return this}})},N4=Le,M4=TypeError,mv=function(i,r){if(N4(r,i))return i;throw new M4("Incorrect invocation")},By=jt,B4=I_,F4=ca,j4=we,L4=j4("species"),Y_=function(i,r){var e=By(i).constructor,t;return e===void 0||F4(t=By(e)[L4])?r:B4(t)},z4=pi,X_=/(?:ipad|iphone|ipod).*applewebkit/i.test(z4),Ft=be,H4=ha,V4=gi,Fy=Oe,W4=ze,J_=le,jy=O0,U4=No,Ly=Vf,K4=Gw,G4=X_,q4=Bo,Ud=Ft.setImmediate,Kd=Ft.clearImmediate,Y4=Ft.process,Jh=Ft.Dispatch,X4=Ft.Function,zy=Ft.MessageChannel,J4=Ft.String,Zh=0,Za={},Hy="onreadystatechange",go,ki,Qh,ec;J_(function(){go=Ft.location});var bv=function(i){if(W4(Za,i)){var r=Za[i];delete Za[i],r()}},tc=function(i){return function(){bv(i)}},Vy=function(i){bv(i.data)},Wy=function(i){Ft.postMessage(J4(i),go.protocol+"//"+go.host)};(!Ud||!Kd)&&(Ud=function(r){K4(arguments.length,1);var e=Fy(r)?r:X4(r),t=U4(arguments,1);return Za[++Zh]=function(){H4(e,void 0,t)},ki(Zh),Zh},Kd=function(r){delete Za[r]},q4?ki=function(i){Y4.nextTick(tc(i))}:Jh&&Jh.now?ki=function(i){Jh.now(tc(i))}:zy&&!G4?(Qh=new zy,ec=Qh.port2,Qh.port1.onmessage=Vy,ki=V4(ec.postMessage,ec)):Ft.addEventListener&&Fy(Ft.postMessage)&&!Ft.importScripts&&go&&go.protocol!=="file:"&&!J_(Wy)?(ki=Wy,Ft.addEventListener("message",Vy,!1)):Hy in Ly("script")?ki=function(i){jy.appendChild(Ly("script"))[Hy]=function(){jy.removeChild(this),bv(i)}}:ki=function(i){setTimeout(tc(i),0)});var Z_={set:Ud,clear:Kd},Q_=function(){this.head=null,this.tail=null};Q_.prototype={add:function(i){var r={item:i,next:null},e=this.tail;e?e.next=r:this.head=r,this.tail=r},get:function(){var i=this.head;if(i){var r=this.head=i.next;return r===null&&(this.tail=null),i.item}}};var eE=Q_,Z4=pi,Q4=/ipad|iphone|ipod/i.test(Z4)&&typeof Pebble<"u",e6=pi,t6=/web0s(?!.*chrome)/i.test(e6),qi=be,Uy=gi,r6=Qi.f,rc=Z_.set,i6=eE,n6=X_,a6=Q4,o6=t6,ic=Bo,Ky=qi.MutationObserver||qi.WebKitMutationObserver,Gy=qi.document,qy=qi.process,Ns=qi.Promise,Yy=r6(qi,"queueMicrotask"),Gd=Yy&&Yy.value,_n,nc,ac,Ms,Xy;if(!Gd){var Bs=new i6,Fs=function(){var i,r;for(ic&&(i=qy.domain)&&i.exit();r=Bs.get();)try{r()}catch(e){throw Bs.head&&_n(),e}i&&i.enter()};!n6&&!ic&&!o6&&Ky&&Gy?(nc=!0,ac=Gy.createTextNode(""),new Ky(Fs).observe(ac,{characterData:!0}),_n=function(){ac.data=nc=!nc}):!a6&&Ns&&Ns.resolve?(Ms=Ns.resolve(void 0),Ms.constructor=Ns,Xy=Uy(Ms.then,Ms),_n=function(){Xy(Fs)}):ic?_n=function(){qy.nextTick(Fs)}:(rc=Uy(rc,qi),_n=function(){rc(Fs)}),Gd=function(i){Bs.head||_n(),Bs.add(i)}}var s6=Gd,u6=function(i,r){try{arguments.length===1?console.error(i):console.error(i,r)}catch{}},_a=function(i){try{return{error:!1,value:i()}}catch(r){return{error:!0,value:r}}},l6=be,Ea=l6.Promise,tE=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",h6=tE,c6=Bo,d6=!h6&&!c6&&typeof window=="object"&&typeof document=="object",f6=be,Qa=Ea,v6=Oe,p6=d0,g6=m0,y6=we,m6=d6,b6=tE,oc=da,Jy=Qa&&Qa.prototype,$6=y6("species"),qd=!1,rE=v6(f6.PromiseRejectionEvent),w6=p6("Promise",function(){var i=g6(Qa),r=i!==String(Qa);if(!r&&oc===66||!(Jy.catch&&Jy.finally))return!0;if(!oc||oc<51||!/native code/.test(i)){var e=new Qa(function(a){a(1)}),t=function(a){a(function(){},function(){})},n=e.constructor={};if(n[$6]=t,qd=e.then(function(){})instanceof t,!qd)return!0}return!r&&(m6||b6)&&!rE}),Vo={CONSTRUCTOR:w6,REJECTION_EVENT:rE,SUBCLASSING:qd},$r={},Zy=kt,_6=TypeError,E6=function(i){var r,e;this.promise=new i(function(t,n){if(r!==void 0||e!==void 0)throw new _6("Bad Promise constructor");r=t,e=n}),this.resolve=Zy(r),this.reject=Zy(e)};$r.f=function(i){return new E6(i)};var S6=U,ju=Bo,hi=be,Wo=Ge,O6=ya,T6=nn,I6=q_,k6=kt,Yd=Oe,P6=it,x6=mv,C6=Y_,iE=Z_.set,$v=s6,A6=u6,D6=_a,R6=eE,nE=ma,Xd=Ea,aE=Vo,oE=$r,Pl="Promise",sE=aE.CONSTRUCTOR,N6=aE.REJECTION_EVENT,sc=nE.getterFor(Pl),M6=nE.set,B6=Xd&&Xd.prototype,Bn=Xd,uc=B6,uE=hi.TypeError,Jd=hi.document,wv=hi.process,Zd=oE.f,F6=Zd,j6=!!(Jd&&Jd.createEvent&&hi.dispatchEvent),lE="unhandledrejection",L6="rejectionhandled",Qy=0,hE=1,z6=2,_v=1,cE=2,js,em,H6,dE=function(i){var r;return P6(i)&&Yd(r=i.then)?r:!1},fE=function(i,r){var e=r.value,t=r.state===hE,n=t?i.ok:i.fail,a=i.resolve,o=i.reject,s=i.domain,u,l,h;try{n?(t||(r.rejection===cE&&W6(r),r.rejection=_v),n===!0?u=e:(s&&s.enter(),u=n(e),s&&(s.exit(),h=!0)),u===i.promise?o(new uE("Promise-chain cycle")):(l=dE(u))?Wo(l,u,a,o):a(u)):o(e)}catch(d){s&&!h&&s.exit(),o(d)}},vE=function(i,r){i.notified||(i.notified=!0,$v(function(){for(var e=i.reactions,t;t=e.get();)fE(t,i);i.notified=!1,r&&!i.rejection&&V6(i)}))},pE=function(i,r,e){var t,n;j6?(t=Jd.createEvent("Event"),t.promise=r,t.reason=e,t.initEvent(i,!1,!0),hi.dispatchEvent(t)):t={promise:r,reason:e},!N6&&(n=hi["on"+i])?n(t):i===lE&&A6("Unhandled promise rejection",e)},V6=function(i){Wo(iE,hi,function(){var r=i.facade,e=i.value,t=tm(i),n;if(t&&(n=D6(function(){ju?wv.emit("unhandledRejection",e,r):pE(lE,r,e)}),i.rejection=ju||tm(i)?cE:_v,n.error))throw n.value})},tm=function(i){return i.rejection!==_v&&!i.parent},W6=function(i){Wo(iE,hi,function(){var r=i.facade;ju?wv.emit("rejectionHandled",r):pE(L6,r,i.value)})},Fn=function(i,r,e){return function(t){i(r,t,e)}},Un=function(i,r,e){i.done||(i.done=!0,e&&(i=e),i.value=r,i.state=z6,vE(i,!0))},Qd=function(i,r,e){if(!i.done){i.done=!0,e&&(i=e);try{if(i.facade===r)throw new uE("Promise can't be resolved itself");var t=dE(r);t?$v(function(){var n={done:!1};try{Wo(t,r,Fn(Qd,n,i),Fn(Un,n,i))}catch(a){Un(n,a,i)}}):(i.value=r,i.state=hE,vE(i,!1))}catch(n){Un({done:!1},n,i)}}};sE&&(Bn=function(r){x6(this,uc),k6(r),Wo(js,this);var e=sc(this);try{r(Fn(Qd,e),Fn(Un,e))}catch(t){Un(e,t)}},uc=Bn.prototype,js=function(r){M6(this,{type:Pl,done:!1,notified:!1,parent:!1,reactions:new R6,rejection:!1,state:Qy,value:void 0})},js.prototype=O6(uc,"then",function(r,e){var t=sc(this),n=Zd(C6(this,Bn));return t.parent=!0,n.ok=Yd(r)?r:!0,n.fail=Yd(e)&&e,n.domain=ju?wv.domain:void 0,t.state===Qy?t.reactions.add(n):$v(function(){fE(n,t)}),n.promise}),em=function(){var i=new js,r=sc(i);this.promise=i,this.resolve=Fn(Qd,r),this.reject=Fn(Un,r)},oE.f=Zd=function(i){return i===Bn||i===H6?new em(i):F6(i)});S6({global:!0,constructor:!0,wrap:!0,forced:sE},{Promise:Bn});T6(Bn,Pl,!1,!0);I6(Pl);var U6=Ea,K6=kw,G6=Vo.CONSTRUCTOR,xl=G6||!K6(function(i){U6.all(i).then(void 0,function(){})}),q6=U,Y6=Ge,X6=kt,J6=$r,Z6=_a,Q6=on,eH=xl;q6({target:"Promise",stat:!0,forced:eH},{all:function(r){var e=this,t=J6.f(e),n=t.resolve,a=t.reject,o=Z6(function(){var s=X6(e.resolve),u=[],l=0,h=1;Q6(r,function(d){var c=l++,f=!1;h++,Y6(s,e,d).then(function(v){f||(f=!0,u[c]=v,--h||n(u))},a)}),--h||n(u)});return o.error&&a(o.value),t.promise}});var tH=U,rH=Vo.CONSTRUCTOR,rm=Ea;rm&&rm.prototype;tH({target:"Promise",proto:!0,forced:rH,real:!0},{catch:function(i){return this.then(void 0,i)}});var iH=U,nH=Ge,aH=kt,oH=$r,sH=_a,uH=on,lH=xl;iH({target:"Promise",stat:!0,forced:lH},{race:function(r){var e=this,t=oH.f(e),n=t.reject,a=sH(function(){var o=aH(e.resolve);uH(r,function(s){nH(o,e,s).then(t.resolve,n)})});return a.error&&n(a.value),t.promise}});var hH=U,cH=Ge,dH=$r,fH=Vo.CONSTRUCTOR;hH({target:"Promise",stat:!0,forced:fH},{reject:function(r){var e=dH.f(this);return cH(e.reject,void 0,r),e.promise}});var vH=jt,pH=it,gH=$r,gE=function(i,r){if(vH(i),pH(r)&&r.constructor===i)return r;var e=gH.f(i),t=e.resolve;return t(r),e.promise},yH=U,mH=yt,bH=kk,$H=Ea,wH=Vo.CONSTRUCTOR,_H=gE,EH=mH("Promise"),SH=!wH;yH({target:"Promise",stat:!0,forced:bH},{resolve:function(r){return _H(SH&&this===EH?$H:this,r)}});var OH=U,TH=Ge,IH=kt,kH=$r,PH=_a,xH=on,CH=xl;OH({target:"Promise",stat:!0,forced:CH},{allSettled:function(r){var e=this,t=kH.f(e),n=t.resolve,a=t.reject,o=PH(function(){var s=IH(e.resolve),u=[],l=0,h=1;xH(r,function(d){var c=l++,f=!1;h++,TH(s,e,d).then(function(v){f||(f=!0,u[c]={status:"fulfilled",value:v},--h||n(u))},function(v){f||(f=!0,u[c]={status:"rejected",reason:v},--h||n(u))})}),--h||n(u)});return o.error&&a(o.value),t.promise}});var AH=U,DH=Ge,RH=kt,NH=yt,MH=$r,BH=_a,FH=on,jH=xl,im="No one promise resolved";AH({target:"Promise",stat:!0,forced:jH},{any:function(r){var e=this,t=NH("AggregateError"),n=MH.f(e),a=n.resolve,o=n.reject,s=BH(function(){var u=RH(e.resolve),l=[],h=0,d=1,c=!1;FH(r,function(f){var v=h++,p=!1;d++,DH(u,e,f).then(function(g){p||c||(c=!0,a(g))},function(g){p||c||(p=!0,l[v]=g,--d||o(new t(l,im)))})}),--d||o(new t(l,im))});return s.error&&o(s.value),n.promise}});var LH=U,ef=Ea,zH=le,HH=yt,VH=Oe,WH=Y_,nm=gE,UH=ef&&ef.prototype,KH=!!ef&&zH(function(){UH.finally.call({then:function(){}},function(){})});LH({target:"Promise",proto:!0,real:!0,forced:KH},{finally:function(i){var r=WH(this,HH("Promise")),e=VH(i);return this.then(e?function(t){return nm(r,i()).then(function(){return t})}:i,e?function(t){return nm(r,i()).then(function(){throw t})}:i)}});var GH=$e,qH=GH.Promise,YH=qH,XH=YH,JH=U,ZH=$r;JH({target:"Promise",stat:!0},{withResolvers:function(){var r=ZH.f(this);return{promise:r.promise,resolve:r.resolve,reject:r.reject}}});var QH=XH,e8=QH,t8=U,r8=$r,i8=_a;t8({target:"Promise",stat:!0,forced:!0},{try:function(i){var r=r8.f(this),e=i8(i);return(e.error?r.reject:r.resolve)(e.value),r.promise}});var n8=e8,a8=n8,o8=a8,s8=Hw,u8=s8,l8=u8,h8=l8,c8=h8;(function(i){var r=Fz.default,e=g0,t=iv,n=j_,a=H_,o=Vz,s=Nw,u=L_,l=o8,h=c8,d=Bw;function c(){i.exports=c=function(){return v},i.exports.__esModule=!0,i.exports.default=i.exports;var f,v={},p=Object.prototype,g=p.hasOwnProperty,y=e||function(j,P,A){j[P]=A.value},m=typeof t=="function"?t:{},b=m.iterator||"@@iterator",$=m.asyncIterator||"@@asyncIterator",O=m.toStringTag||"@@toStringTag";function _(j,P,A){return e(j,P,{value:A,enumerable:!0,configurable:!0,writable:!0}),j[P]}try{_({},"")}catch{_=function(A,W,Z){return A[W]=Z}}function C(j,P,A,W){var Z=P&&P.prototype instanceof oe?P:oe,J=n(Z.prototype),Ce=new Rt(W||[]);return y(J,"_invoke",{value:Me(j,A,Ce)}),J}function R(j,P,A){try{return{type:"normal",arg:j.call(P,A)}}catch(W){return{type:"throw",arg:W}}}v.wrap=C;var x="suspendedStart",B="suspendedYield",F="executing",X="completed",K={};function oe(){}function Qe(){}function Ne(){}var At={};_(At,b,function(){return this});var lt=a,nt=lt&<(lt(st([])));nt&&nt!==p&&g.call(nt,b)&&(At=nt);var Dt=Ne.prototype=oe.prototype=n(At);function at(j){var P;o(P=["next","throw","return"]).call(P,function(A){_(j,A,function(W){return this._invoke(A,W)})})}function ye(j,P){function A(Z,J,Ce,ht){var mt=R(j[Z],j,J);if(mt.type!=="throw"){var _i=mt.arg,Vr=_i.value;return Vr&&r(Vr)=="object"&&g.call(Vr,"__await")?P.resolve(Vr.__await).then(function(Ei){A("next",Ei,Ce,ht)},function(Ei){A("throw",Ei,Ce,ht)}):P.resolve(Vr).then(function(Ei){_i.value=Ei,Ce(_i)},function(Ei){return A("throw",Ei,Ce,ht)})}ht(mt.arg)}var W;y(this,"_invoke",{value:function(J,Ce){function ht(){return new P(function(mt,_i){A(J,Ce,mt,_i)})}return W=W?W.then(ht,ht):ht()}})}function Me(j,P,A){var W=x;return function(Z,J){if(W===F)throw new Error("Generator is already running");if(W===X){if(Z==="throw")throw J;return{value:f,done:!0}}for(A.method=Z,A.arg=J;;){var Ce=A.delegate;if(Ce){var ht=xe(Ce,A);if(ht){if(ht===K)continue;return ht}}if(A.method==="next")A.sent=A._sent=A.arg;else if(A.method==="throw"){if(W===x)throw W=X,A.arg;A.dispatchException(A.arg)}else A.method==="return"&&A.abrupt("return",A.arg);W=F;var mt=R(j,P,A);if(mt.type==="normal"){if(W=A.done?X:B,mt.arg===K)continue;return{value:mt.arg,done:A.done}}mt.type==="throw"&&(W=X,A.method="throw",A.arg=mt.arg)}}}function xe(j,P){var A=P.method,W=j.iterator[A];if(W===f)return P.delegate=null,A==="throw"&&j.iterator.return&&(P.method="return",P.arg=f,xe(j,P),P.method==="throw")||A!=="return"&&(P.method="throw",P.arg=new TypeError("The iterator does not provide a '"+A+"' method")),K;var Z=R(W,j.iterator,P.arg);if(Z.type==="throw")return P.method="throw",P.arg=Z.arg,P.delegate=null,K;var J=Z.arg;return J?J.done?(P[j.resultName]=J.value,P.next=j.nextLoc,P.method!=="return"&&(P.method="next",P.arg=f),P.delegate=null,K):J:(P.method="throw",P.arg=new TypeError("iterator result is not an object"),P.delegate=null,K)}function ot(j){var P,A={tryLoc:j[0]};1 in j&&(A.catchLoc=j[1]),2 in j&&(A.finallyLoc=j[2],A.afterLoc=j[3]),s(P=this.tryEntries).call(P,A)}function Er(j){var P=j.completion||{};P.type="normal",delete P.arg,j.completion=P}function Rt(j){this.tryEntries=[{tryLoc:"root"}],o(j).call(j,ot,this),this.reset(!0)}function st(j){if(j||j===""){var P=j[b];if(P)return P.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length)){var A=-1,W=function Z(){for(;++A=0;--Z){var J=this.tryEntries[Z],Ce=J.completion;if(J.tryLoc==="root")return W("end");if(J.tryLoc<=this.prev){var ht=g.call(J,"catchLoc"),mt=g.call(J,"finallyLoc");if(ht&&mt){if(this.prev=0;--W){var Z=this.tryEntries[W];if(Z.tryLoc<=this.prev&&g.call(Z,"finallyLoc")&&this.prev=0;--A){var W=this.tryEntries[A];if(W.finallyLoc===P)return this.complete(W.completion,W.afterLoc),Er(W),K}},catch:function(P){for(var A=this.tryEntries.length-1;A>=0;--A){var W=this.tryEntries[A];if(W.tryLoc===P){var Z=W.completion;if(Z.type==="throw"){var J=Z.arg;Er(W)}return J}}throw new Error("illegal catch attempt")},delegateYield:function(P,A,W){return this.delegate={iterator:st(P),resultName:A,nextLoc:W},this.method==="next"&&(this.arg=f),K}},v}i.exports=c,i.exports.__esModule=!0,i.exports.default=i.exports})(V_);var d8=V_.exports,vu=d8(),f8=vu;try{regeneratorRuntime=vu}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=vu:Function("r","regeneratorRuntime = r")(vu)}var $t=Y(f8),yE={exports:{}},v8=le,p8=v8(function(){if(typeof ArrayBuffer=="function"){var i=new ArrayBuffer(8);Object.isExtensible(i)&&Object.defineProperty(i,"a",{value:8})}}),g8=le,y8=it,m8=vi,am=p8,pu=Object.isExtensible,b8=g8(function(){pu(1)}),$8=b8||am?function(r){return!y8(r)||am&&m8(r)==="ArrayBuffer"?!1:pu?pu(r):!0}:pu,w8=le,_8=!w8(function(){return Object.isExtensible(Object.preventExtensions({}))}),E8=U,S8=me,O8=Po,T8=it,Ev=ze,I8=xt.f,om=xo,k8=Gf,Sv=$8,P8=nl,x8=_8,mE=!1,Br=P8("meta"),C8=0,Ov=function(i){I8(i,Br,{value:{objectID:"O"+C8++,weakData:{}}})},A8=function(i,r){if(!T8(i))return typeof i=="symbol"?i:(typeof i=="string"?"S":"P")+i;if(!Ev(i,Br)){if(!Sv(i))return"F";if(!r)return"E";Ov(i)}return i[Br].objectID},D8=function(i,r){if(!Ev(i,Br)){if(!Sv(i))return!0;if(!r)return!1;Ov(i)}return i[Br].weakData},R8=function(i){return x8&&mE&&Sv(i)&&!Ev(i,Br)&&Ov(i),i},N8=function(){M8.enable=function(){},mE=!0;var i=om.f,r=S8([].splice),e={};e[Br]=1,i(e).length&&(om.f=function(t){for(var n=i(t),a=0,o=n.length;a1?arguments[1]:void 0),f;f=f?f.next:d.first;)for(c(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(h){return!!u(this,h)}}),sm(a,e?{get:function(h){var d=u(this,h);return d&&d.value},set:function(h,d){return s(this,h===0?0:h,d)}}:{add:function(h){return s(this,h=h===0?0:h,h)}}),ja&&r7(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(i,r,e){var t=r+" Iterator",n=lc(r),a=lc(t);s7(i,r,function(o,s){lm(this,{type:t,target:o,state:n(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,u=o.last;u&&u.removed;)u=u.previous;return!o.target||!(o.last=u=u?u.next:o.state.first)?(o.target=void 0,Ls(void 0,!0)):Ls(s==="keys"?u.key:s==="values"?u.value:[u.key,u.value],!1)},e?"entries":"values",!e,!0),u7(r)}},l7=wE,h7=EE;l7("Map",function(i){return function(){return i(this,arguments.length?arguments[0]:void 0)}},h7);var c7=$e,d7=c7.Map,f7=d7,v7=f7,p7=v7,SE=Y(p7),g7=U,y7=ba.some,m7=_l,b7=m7("some");g7({target:"Array",proto:!0,forced:!b7},{some:function(r){return y7(this,r,arguments.length>1?arguments[1]:void 0)}});var $7=ut,w7=$7("Array","some"),_7=Le,E7=w7,hc=Array.prototype,S7=function(i){var r=i.some;return i===hc||_7(hc,i)&&r===hc.some?E7:r},O7=S7,T7=O7,I7=T7,k7=Y(I7),P7=ut,x7=P7("Array","keys"),C7=x7,A7=C7,D7=zr,R7=ze,N7=Le,M7=A7,cc=Array.prototype,B7={DOMTokenList:!0,NodeList:!0},F7=function(i){var r=i.keys;return i===cc||N7(cc,i)&&r===cc.keys||R7(B7,D7(i))?M7:r},j7=F7,En=Y(j7),hm=k0,L7=Math.floor,tf=function(i,r){var e=i.length,t=L7(e/2);return e<8?z7(i,r):H7(i,tf(hm(i,0,t),r),tf(hm(i,t),r),r)},z7=function(i,r){for(var e=i.length,t=1,n,a;t0;)i[a]=i[--a];a!==t++&&(i[a]=n)}return i},H7=function(i,r,e,t){for(var n=r.length,a=e.length,o=0,s=0;o3)){if(rV)return!0;if(ym)return ym<603;var i="",r,e,t,n;for(r=65;r<76;r++){switch(e=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)Zr.push({k:e+n,v:t})}for(Zr.sort(function(a,o){return o.v-a.v}),n=0;nvm(e)?1:-1}};X7({target:"Array",proto:!0,forced:sV},{sort:function(r){r!==void 0&&J7(r);var e=Z7(this);if(TE)return r===void 0?mm(e):mm(e,r);var t=[],n=fm(e),a,o;for(o=0;othis.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=bL(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,t;Wi(e=Ww(t=this._queue).call(t,0)).call(e,function(n){n.fn.apply(n.context||n.fn,n.args||[])})}}],[{key:"extend",value:function(e,t){var n=new i(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){n.flush()};var a=[{name:"flush",original:void 0}];if(t&&t.replace)for(var o=0;o=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
+`;return function(){var n=new Error("get-stack-trace"),a=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),i.apply(this,arguments)}}var w_=$_(function(i,r,e){for(var t=Object.keys(r),n=0;n=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function l5(i,r){var e;if(i){if(typeof i=="string")return Ey(i,r);var t=Tl(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return ov(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ey(i,r)}}function Ey(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e1?e-1:0),n=1;n2){var t;return Nu.apply(void 0,Ol(t=[S_(r[0],r[1])]).call(t,Et(Tl(r).call(r,2))))}var n=r[0],a=r[1];if(n instanceof Date&&a instanceof Date)return n.setTime(a.getTime()),n;var o=__(hj(a)),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===E_?delete n[u]:n[u]!==null&&a[u]!==null&&typeof n[u]=="object"&&typeof a[u]=="object"&&!Bt(n[u])&&!Bt(a[u])?n[u]=Nu(n[u],a[u]):n[u]=O_(a[u]))}}catch(l){o.e(l)}finally{o.f()}return n}function O_(i){return Bt(i)?rr(i).call(i,function(r){return O_(r)}):typeof i=="object"&&i!==null?i instanceof Date?new Date(i.getTime()):Nu({},i):i}function T_(i){for(var r=0,e=lv(i);ro;)u=t(e,s=n[o++]),u!==void 0&&Y5(a,s,u);return a}});var X5=we,J5=X5.Object.getOwnPropertyDescriptors,Z5=J5,Q5=Z5,ez=Q5,ky=Y(ez),M_={exports:{}},tz=K,rz=Ge,Py=cl.f;tz({target:"Object",stat:!0,forced:Object.defineProperties!==Py,sham:!rz},{defineProperties:Py});var iz=we,B_=iz.Object,nz=M_.exports=function(r,e){return B_.defineProperties(r,e)};B_.defineProperties.sham&&(nz.sham=!0);var az=M_.exports,oz=az,sz=oz,uz=sz,lz=Y(uz),hz=p0,cz=Y(hz);function F_(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}var dz=Kw,fz=dz,vz=fz,pz=vz,j_=pz,gz=Y(j_),yz=K,mz=aw;yz({target:"Object",stat:!0},{setPrototypeOf:mz});var bz=we,$z=bz.Object.setPrototypeOf,wz=$z,_z=wz,Ez=_z,Sz=Ez,Oz=Sz,Tz=Oz,L_=Tz,Vd=Y(L_),Iz=ww,kz=Iz,Pz=kz,xz=Pz,Cz=xz,z_=Y(Cz);function Wd(i,r){var e;return Wd=Vd?z_(e=Vd).call(e):function(n,a){return n.__proto__=a,n},Wd(i,r)}function Az(i,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=gz(r.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),ol(i,"prototype",{writable:!1}),Wd(i,r)}function Dz(i,r){if(r&&(Jn(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F_(i)}var Rz=L3,Nz=Rz,Mz=Nz,Bz=Mz,H_=Bz,xy=Y(H_);function Mu(i){var r;return Mu=Vd?z_(r=xy).call(r):function(t){return t.__proto__||xy(t)},Mu(i)}var V_={exports:{}},W_={exports:{}};(function(i){var r=iv,e=gw;function t(n){"@babel/helpers - typeof";return i.exports=t=typeof r=="function"&&typeof e=="symbol"?function(a){return typeof a}:function(a){return a&&typeof r=="function"&&a.constructor===r&&a!==r.prototype?"symbol":typeof a},i.exports.__esModule=!0,i.exports.default=i.exports,t(n)}i.exports=t,i.exports.__esModule=!0,i.exports.default=i.exports})(W_);var Fz=W_.exports,jz=zw,Lz=jz,zz=Lz,Hz=zz,Vz=Hz,Cy=He,Wz=uv,Uz=Qi,Kz=xt,Gz=function(i,r,e){for(var t=Wz(r),n=Kz.f,a=Uz.f,o=0;od;d++)if(f=y(i[d]),f&&Dy(Ny,f))return f;return new fu(!1)}l=p4(i,h)}for(v=a?i.next:l.next;!(p=h4(v,l)).done;){try{f=y(p.value)}catch(m){Ry(l,"throw",m)}if(typeof f=="object"&&f&&Dy(Ny,f))return f}return new fu(!1)},m4=tn,b4=function(i,r){return i===void 0?arguments.length<2?"":r:m4(i)},$4=K,w4=ze,_4=$l,Bu=aw,E4=Gz,G_=rn,qh=Lr,Yh=en,S4=Xz,O4=u4,T4=on,I4=b4,k4=_e,P4=k4("toStringTag"),Fu=Error,x4=[].push,ta=function(r,e){var t=w4(Xh,this),n;Bu?n=Bu(new Fu,t?_4(this):Xh):(n=t?this:G_(Xh),qh(n,P4,"Error")),e!==void 0&&qh(n,"message",I4(e)),O4(n,ta,n.stack,1),arguments.length>2&&S4(n,arguments[2]);var a=[];return T4(r,x4,{that:a}),qh(n,"errors",a),n};Bu?Bu(ta,Fu):E4(ta,Fu,{name:!0});var Xh=ta.prototype=G_(Fu.prototype,{constructor:Yh(1,ta),message:Yh(1,""),name:Yh(1,"AggregateError")});$4({global:!0,constructor:!0,arity:2},{AggregateError:ta});var C4=yt,A4=qf,D4=_e,R4=Ge,My=D4("species"),q_=function(i){var r=C4(i);R4&&r&&!r[My]&&A4(r,My,{configurable:!0,get:function(){return this}})},N4=ze,M4=TypeError,mv=function(i,r){if(N4(r,i))return i;throw new M4("Incorrect invocation")},By=jt,B4=I_,F4=ca,j4=_e,L4=j4("species"),Y_=function(i,r){var e=By(i).constructor,t;return e===void 0||F4(t=By(e)[L4])?r:B4(t)},z4=pi,X_=/(?:ipad|iphone|ipod).*applewebkit/i.test(z4),Ft=$e,H4=ha,V4=gi,Fy=Ie,W4=He,J_=ue,jy=O0,U4=No,Ly=Vf,K4=Gw,G4=X_,q4=Bo,Ud=Ft.setImmediate,Kd=Ft.clearImmediate,Y4=Ft.process,Jh=Ft.Dispatch,X4=Ft.Function,zy=Ft.MessageChannel,J4=Ft.String,Zh=0,Za={},Hy="onreadystatechange",go,ki,Qh,ec;J_(function(){go=Ft.location});var bv=function(i){if(W4(Za,i)){var r=Za[i];delete Za[i],r()}},tc=function(i){return function(){bv(i)}},Vy=function(i){bv(i.data)},Wy=function(i){Ft.postMessage(J4(i),go.protocol+"//"+go.host)};(!Ud||!Kd)&&(Ud=function(r){K4(arguments.length,1);var e=Fy(r)?r:X4(r),t=U4(arguments,1);return Za[++Zh]=function(){H4(e,void 0,t)},ki(Zh),Zh},Kd=function(r){delete Za[r]},q4?ki=function(i){Y4.nextTick(tc(i))}:Jh&&Jh.now?ki=function(i){Jh.now(tc(i))}:zy&&!G4?(Qh=new zy,ec=Qh.port2,Qh.port1.onmessage=Vy,ki=V4(ec.postMessage,ec)):Ft.addEventListener&&Fy(Ft.postMessage)&&!Ft.importScripts&&go&&go.protocol!=="file:"&&!J_(Wy)?(ki=Wy,Ft.addEventListener("message",Vy,!1)):Hy in Ly("script")?ki=function(i){jy.appendChild(Ly("script"))[Hy]=function(){jy.removeChild(this),bv(i)}}:ki=function(i){setTimeout(tc(i),0)});var Z_={set:Ud,clear:Kd},Q_=function(){this.head=null,this.tail=null};Q_.prototype={add:function(i){var r={item:i,next:null},e=this.tail;e?e.next=r:this.head=r,this.tail=r},get:function(){var i=this.head;if(i){var r=this.head=i.next;return r===null&&(this.tail=null),i.item}}};var eE=Q_,Z4=pi,Q4=/ipad|iphone|ipod/i.test(Z4)&&typeof Pebble<"u",e6=pi,t6=/web0s(?!.*chrome)/i.test(e6),qi=$e,Uy=gi,r6=Qi.f,rc=Z_.set,i6=eE,n6=X_,a6=Q4,o6=t6,ic=Bo,Ky=qi.MutationObserver||qi.WebKitMutationObserver,Gy=qi.document,qy=qi.process,Ns=qi.Promise,Yy=r6(qi,"queueMicrotask"),Gd=Yy&&Yy.value,_n,nc,ac,Ms,Xy;if(!Gd){var Bs=new i6,Fs=function(){var i,r;for(ic&&(i=qy.domain)&&i.exit();r=Bs.get();)try{r()}catch(e){throw Bs.head&&_n(),e}i&&i.enter()};!n6&&!ic&&!o6&&Ky&&Gy?(nc=!0,ac=Gy.createTextNode(""),new Ky(Fs).observe(ac,{characterData:!0}),_n=function(){ac.data=nc=!nc}):!a6&&Ns&&Ns.resolve?(Ms=Ns.resolve(void 0),Ms.constructor=Ns,Xy=Uy(Ms.then,Ms),_n=function(){Xy(Fs)}):ic?_n=function(){qy.nextTick(Fs)}:(rc=Uy(rc,qi),_n=function(){rc(Fs)}),Gd=function(i){Bs.head||_n(),Bs.add(i)}}var s6=Gd,u6=function(i,r){try{arguments.length===1?console.error(i):console.error(i,r)}catch{}},_a=function(i){try{return{error:!1,value:i()}}catch(r){return{error:!0,value:r}}},l6=$e,Ea=l6.Promise,tE=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",h6=tE,c6=Bo,d6=!h6&&!c6&&typeof window=="object"&&typeof document=="object",f6=$e,Qa=Ea,v6=Ie,p6=d0,g6=m0,y6=_e,m6=d6,b6=tE,oc=da,Jy=Qa&&Qa.prototype,$6=y6("species"),qd=!1,rE=v6(f6.PromiseRejectionEvent),w6=p6("Promise",function(){var i=g6(Qa),r=i!==String(Qa);if(!r&&oc===66||!(Jy.catch&&Jy.finally))return!0;if(!oc||oc<51||!/native code/.test(i)){var e=new Qa(function(a){a(1)}),t=function(a){a(function(){},function(){})},n=e.constructor={};if(n[$6]=t,qd=e.then(function(){})instanceof t,!qd)return!0}return!r&&(m6||b6)&&!rE}),Vo={CONSTRUCTOR:w6,REJECTION_EVENT:rE,SUBCLASSING:qd},$r={},Zy=kt,_6=TypeError,E6=function(i){var r,e;this.promise=new i(function(t,n){if(r!==void 0||e!==void 0)throw new _6("Bad Promise constructor");r=t,e=n}),this.resolve=Zy(r),this.reject=Zy(e)};$r.f=function(i){return new E6(i)};var S6=K,ju=Bo,hi=$e,Wo=qe,O6=ya,T6=nn,I6=q_,k6=kt,Yd=Ie,P6=it,x6=mv,C6=Y_,iE=Z_.set,$v=s6,A6=u6,D6=_a,R6=eE,nE=ma,Xd=Ea,aE=Vo,oE=$r,Pl="Promise",sE=aE.CONSTRUCTOR,N6=aE.REJECTION_EVENT,sc=nE.getterFor(Pl),M6=nE.set,B6=Xd&&Xd.prototype,Bn=Xd,uc=B6,uE=hi.TypeError,Jd=hi.document,wv=hi.process,Zd=oE.f,F6=Zd,j6=!!(Jd&&Jd.createEvent&&hi.dispatchEvent),lE="unhandledrejection",L6="rejectionhandled",Qy=0,hE=1,z6=2,_v=1,cE=2,js,em,H6,dE=function(i){var r;return P6(i)&&Yd(r=i.then)?r:!1},fE=function(i,r){var e=r.value,t=r.state===hE,n=t?i.ok:i.fail,a=i.resolve,o=i.reject,s=i.domain,u,l,h;try{n?(t||(r.rejection===cE&&W6(r),r.rejection=_v),n===!0?u=e:(s&&s.enter(),u=n(e),s&&(s.exit(),h=!0)),u===i.promise?o(new uE("Promise-chain cycle")):(l=dE(u))?Wo(l,u,a,o):a(u)):o(e)}catch(d){s&&!h&&s.exit(),o(d)}},vE=function(i,r){i.notified||(i.notified=!0,$v(function(){for(var e=i.reactions,t;t=e.get();)fE(t,i);i.notified=!1,r&&!i.rejection&&V6(i)}))},pE=function(i,r,e){var t,n;j6?(t=Jd.createEvent("Event"),t.promise=r,t.reason=e,t.initEvent(i,!1,!0),hi.dispatchEvent(t)):t={promise:r,reason:e},!N6&&(n=hi["on"+i])?n(t):i===lE&&A6("Unhandled promise rejection",e)},V6=function(i){Wo(iE,hi,function(){var r=i.facade,e=i.value,t=tm(i),n;if(t&&(n=D6(function(){ju?wv.emit("unhandledRejection",e,r):pE(lE,r,e)}),i.rejection=ju||tm(i)?cE:_v,n.error))throw n.value})},tm=function(i){return i.rejection!==_v&&!i.parent},W6=function(i){Wo(iE,hi,function(){var r=i.facade;ju?wv.emit("rejectionHandled",r):pE(L6,r,i.value)})},Fn=function(i,r,e){return function(t){i(r,t,e)}},Un=function(i,r,e){i.done||(i.done=!0,e&&(i=e),i.value=r,i.state=z6,vE(i,!0))},Qd=function(i,r,e){if(!i.done){i.done=!0,e&&(i=e);try{if(i.facade===r)throw new uE("Promise can't be resolved itself");var t=dE(r);t?$v(function(){var n={done:!1};try{Wo(t,r,Fn(Qd,n,i),Fn(Un,n,i))}catch(a){Un(n,a,i)}}):(i.value=r,i.state=hE,vE(i,!1))}catch(n){Un({done:!1},n,i)}}};sE&&(Bn=function(r){x6(this,uc),k6(r),Wo(js,this);var e=sc(this);try{r(Fn(Qd,e),Fn(Un,e))}catch(t){Un(e,t)}},uc=Bn.prototype,js=function(r){M6(this,{type:Pl,done:!1,notified:!1,parent:!1,reactions:new R6,rejection:!1,state:Qy,value:void 0})},js.prototype=O6(uc,"then",function(r,e){var t=sc(this),n=Zd(C6(this,Bn));return t.parent=!0,n.ok=Yd(r)?r:!0,n.fail=Yd(e)&&e,n.domain=ju?wv.domain:void 0,t.state===Qy?t.reactions.add(n):$v(function(){fE(n,t)}),n.promise}),em=function(){var i=new js,r=sc(i);this.promise=i,this.resolve=Fn(Qd,r),this.reject=Fn(Un,r)},oE.f=Zd=function(i){return i===Bn||i===H6?new em(i):F6(i)});S6({global:!0,constructor:!0,wrap:!0,forced:sE},{Promise:Bn});T6(Bn,Pl,!1,!0);I6(Pl);var U6=Ea,K6=kw,G6=Vo.CONSTRUCTOR,xl=G6||!K6(function(i){U6.all(i).then(void 0,function(){})}),q6=K,Y6=qe,X6=kt,J6=$r,Z6=_a,Q6=on,eH=xl;q6({target:"Promise",stat:!0,forced:eH},{all:function(r){var e=this,t=J6.f(e),n=t.resolve,a=t.reject,o=Z6(function(){var s=X6(e.resolve),u=[],l=0,h=1;Q6(r,function(d){var c=l++,f=!1;h++,Y6(s,e,d).then(function(v){f||(f=!0,u[c]=v,--h||n(u))},a)}),--h||n(u)});return o.error&&a(o.value),t.promise}});var tH=K,rH=Vo.CONSTRUCTOR,rm=Ea;rm&&rm.prototype;tH({target:"Promise",proto:!0,forced:rH,real:!0},{catch:function(i){return this.then(void 0,i)}});var iH=K,nH=qe,aH=kt,oH=$r,sH=_a,uH=on,lH=xl;iH({target:"Promise",stat:!0,forced:lH},{race:function(r){var e=this,t=oH.f(e),n=t.reject,a=sH(function(){var o=aH(e.resolve);uH(r,function(s){nH(o,e,s).then(t.resolve,n)})});return a.error&&n(a.value),t.promise}});var hH=K,cH=qe,dH=$r,fH=Vo.CONSTRUCTOR;hH({target:"Promise",stat:!0,forced:fH},{reject:function(r){var e=dH.f(this);return cH(e.reject,void 0,r),e.promise}});var vH=jt,pH=it,gH=$r,gE=function(i,r){if(vH(i),pH(r)&&r.constructor===i)return r;var e=gH.f(i),t=e.resolve;return t(r),e.promise},yH=K,mH=yt,bH=kk,$H=Ea,wH=Vo.CONSTRUCTOR,_H=gE,EH=mH("Promise"),SH=!wH;yH({target:"Promise",stat:!0,forced:bH},{resolve:function(r){return _H(SH&&this===EH?$H:this,r)}});var OH=K,TH=qe,IH=kt,kH=$r,PH=_a,xH=on,CH=xl;OH({target:"Promise",stat:!0,forced:CH},{allSettled:function(r){var e=this,t=kH.f(e),n=t.resolve,a=t.reject,o=PH(function(){var s=IH(e.resolve),u=[],l=0,h=1;xH(r,function(d){var c=l++,f=!1;h++,TH(s,e,d).then(function(v){f||(f=!0,u[c]={status:"fulfilled",value:v},--h||n(u))},function(v){f||(f=!0,u[c]={status:"rejected",reason:v},--h||n(u))})}),--h||n(u)});return o.error&&a(o.value),t.promise}});var AH=K,DH=qe,RH=kt,NH=yt,MH=$r,BH=_a,FH=on,jH=xl,im="No one promise resolved";AH({target:"Promise",stat:!0,forced:jH},{any:function(r){var e=this,t=NH("AggregateError"),n=MH.f(e),a=n.resolve,o=n.reject,s=BH(function(){var u=RH(e.resolve),l=[],h=0,d=1,c=!1;FH(r,function(f){var v=h++,p=!1;d++,DH(u,e,f).then(function(g){p||c||(c=!0,a(g))},function(g){p||c||(p=!0,l[v]=g,--d||o(new t(l,im)))})}),--d||o(new t(l,im))});return s.error&&o(s.value),n.promise}});var LH=K,ef=Ea,zH=ue,HH=yt,VH=Ie,WH=Y_,nm=gE,UH=ef&&ef.prototype,KH=!!ef&&zH(function(){UH.finally.call({then:function(){}},function(){})});LH({target:"Promise",proto:!0,real:!0,forced:KH},{finally:function(i){var r=WH(this,HH("Promise")),e=VH(i);return this.then(e?function(t){return nm(r,i()).then(function(){return t})}:i,e?function(t){return nm(r,i()).then(function(){throw t})}:i)}});var GH=we,qH=GH.Promise,YH=qH,XH=YH,JH=K,ZH=$r;JH({target:"Promise",stat:!0},{withResolvers:function(){var r=ZH.f(this);return{promise:r.promise,resolve:r.resolve,reject:r.reject}}});var QH=XH,e8=QH,t8=K,r8=$r,i8=_a;t8({target:"Promise",stat:!0,forced:!0},{try:function(i){var r=r8.f(this),e=i8(i);return(e.error?r.reject:r.resolve)(e.value),r.promise}});var n8=e8,a8=n8,o8=a8,s8=Hw,u8=s8,l8=u8,h8=l8,c8=h8;(function(i){var r=Fz.default,e=g0,t=iv,n=j_,a=H_,o=Vz,s=Nw,u=L_,l=o8,h=c8,d=Bw;function c(){i.exports=c=function(){return v},i.exports.__esModule=!0,i.exports.default=i.exports;var f,v={},p=Object.prototype,g=p.hasOwnProperty,y=e||function(F,P,A){F[P]=A.value},m=typeof t=="function"?t:{},b=m.iterator||"@@iterator",$=m.asyncIterator||"@@asyncIterator",O=m.toStringTag||"@@toStringTag";function _(F,P,A){return e(F,P,{value:A,enumerable:!0,configurable:!0,writable:!0}),F[P]}try{_({},"")}catch{_=function(A,U,Z){return A[U]=Z}}function C(F,P,A,U){var Z=P&&P.prototype instanceof le?P:le,J=n(Z.prototype),De=new Rt(U||[]);return y(J,"_invoke",{value:Be(F,A,De)}),J}function R(F,P,A){try{return{type:"normal",arg:F.call(P,A)}}catch(U){return{type:"throw",arg:U}}}v.wrap=C;var x="suspendedStart",B="suspendedYield",j="executing",X="completed",W={};function le(){}function Ee(){}function de(){}var At={};_(At,b,function(){return this});var lt=a,nt=lt&<(lt(st([])));nt&&nt!==p&&g.call(nt,b)&&(At=nt);var Dt=de.prototype=le.prototype=n(At);function at(F){var P;o(P=["next","throw","return"]).call(P,function(A){_(F,A,function(U){return this._invoke(A,U)})})}function me(F,P){function A(Z,J,De,ht){var mt=R(F[Z],F,J);if(mt.type!=="throw"){var _i=mt.arg,Vr=_i.value;return Vr&&r(Vr)=="object"&&g.call(Vr,"__await")?P.resolve(Vr.__await).then(function(Ei){A("next",Ei,De,ht)},function(Ei){A("throw",Ei,De,ht)}):P.resolve(Vr).then(function(Ei){_i.value=Ei,De(_i)},function(Ei){return A("throw",Ei,De,ht)})}ht(mt.arg)}var U;y(this,"_invoke",{value:function(J,De){function ht(){return new P(function(mt,_i){A(J,De,mt,_i)})}return U=U?U.then(ht,ht):ht()}})}function Be(F,P,A){var U=x;return function(Z,J){if(U===j)throw new Error("Generator is already running");if(U===X){if(Z==="throw")throw J;return{value:f,done:!0}}for(A.method=Z,A.arg=J;;){var De=A.delegate;if(De){var ht=Ae(De,A);if(ht){if(ht===W)continue;return ht}}if(A.method==="next")A.sent=A._sent=A.arg;else if(A.method==="throw"){if(U===x)throw U=X,A.arg;A.dispatchException(A.arg)}else A.method==="return"&&A.abrupt("return",A.arg);U=j;var mt=R(F,P,A);if(mt.type==="normal"){if(U=A.done?X:B,mt.arg===W)continue;return{value:mt.arg,done:A.done}}mt.type==="throw"&&(U=X,A.method="throw",A.arg=mt.arg)}}}function Ae(F,P){var A=P.method,U=F.iterator[A];if(U===f)return P.delegate=null,A==="throw"&&F.iterator.return&&(P.method="return",P.arg=f,Ae(F,P),P.method==="throw")||A!=="return"&&(P.method="throw",P.arg=new TypeError("The iterator does not provide a '"+A+"' method")),W;var Z=R(U,F.iterator,P.arg);if(Z.type==="throw")return P.method="throw",P.arg=Z.arg,P.delegate=null,W;var J=Z.arg;return J?J.done?(P[F.resultName]=J.value,P.next=F.nextLoc,P.method!=="return"&&(P.method="next",P.arg=f),P.delegate=null,W):J:(P.method="throw",P.arg=new TypeError("iterator result is not an object"),P.delegate=null,W)}function ot(F){var P,A={tryLoc:F[0]};1 in F&&(A.catchLoc=F[1]),2 in F&&(A.finallyLoc=F[2],A.afterLoc=F[3]),s(P=this.tryEntries).call(P,A)}function Er(F){var P=F.completion||{};P.type="normal",delete P.arg,F.completion=P}function Rt(F){this.tryEntries=[{tryLoc:"root"}],o(F).call(F,ot,this),this.reset(!0)}function st(F){if(F||F===""){var P=F[b];if(P)return P.call(F);if(typeof F.next=="function")return F;if(!isNaN(F.length)){var A=-1,U=function Z(){for(;++A=0;--Z){var J=this.tryEntries[Z],De=J.completion;if(J.tryLoc==="root")return U("end");if(J.tryLoc<=this.prev){var ht=g.call(J,"catchLoc"),mt=g.call(J,"finallyLoc");if(ht&&mt){if(this.prev=0;--U){var Z=this.tryEntries[U];if(Z.tryLoc<=this.prev&&g.call(Z,"finallyLoc")&&this.prev=0;--A){var U=this.tryEntries[A];if(U.finallyLoc===P)return this.complete(U.completion,U.afterLoc),Er(U),W}},catch:function(P){for(var A=this.tryEntries.length-1;A>=0;--A){var U=this.tryEntries[A];if(U.tryLoc===P){var Z=U.completion;if(Z.type==="throw"){var J=Z.arg;Er(U)}return J}}throw new Error("illegal catch attempt")},delegateYield:function(P,A,U){return this.delegate={iterator:st(P),resultName:A,nextLoc:U},this.method==="next"&&(this.arg=f),W}},v}i.exports=c,i.exports.__esModule=!0,i.exports.default=i.exports})(V_);var d8=V_.exports,vu=d8(),f8=vu;try{regeneratorRuntime=vu}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=vu:Function("r","regeneratorRuntime = r")(vu)}var $t=Y(f8),yE={exports:{}},v8=ue,p8=v8(function(){if(typeof ArrayBuffer=="function"){var i=new ArrayBuffer(8);Object.isExtensible(i)&&Object.defineProperty(i,"a",{value:8})}}),g8=ue,y8=it,m8=vi,am=p8,pu=Object.isExtensible,b8=g8(function(){pu(1)}),$8=b8||am?function(r){return!y8(r)||am&&m8(r)==="ArrayBuffer"?!1:pu?pu(r):!0}:pu,w8=ue,_8=!w8(function(){return Object.isExtensible(Object.preventExtensions({}))}),E8=K,S8=be,O8=Po,T8=it,Ev=He,I8=xt.f,om=xo,k8=Gf,Sv=$8,P8=nl,x8=_8,mE=!1,Br=P8("meta"),C8=0,Ov=function(i){I8(i,Br,{value:{objectID:"O"+C8++,weakData:{}}})},A8=function(i,r){if(!T8(i))return typeof i=="symbol"?i:(typeof i=="string"?"S":"P")+i;if(!Ev(i,Br)){if(!Sv(i))return"F";if(!r)return"E";Ov(i)}return i[Br].objectID},D8=function(i,r){if(!Ev(i,Br)){if(!Sv(i))return!0;if(!r)return!1;Ov(i)}return i[Br].weakData},R8=function(i){return x8&&mE&&Sv(i)&&!Ev(i,Br)&&Ov(i),i},N8=function(){M8.enable=function(){},mE=!0;var i=om.f,r=S8([].splice),e={};e[Br]=1,i(e).length&&(om.f=function(t){for(var n=i(t),a=0,o=n.length;a1?arguments[1]:void 0),f;f=f?f.next:d.first;)for(c(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(h){return!!u(this,h)}}),sm(a,e?{get:function(h){var d=u(this,h);return d&&d.value},set:function(h,d){return s(this,h===0?0:h,d)}}:{add:function(h){return s(this,h=h===0?0:h,h)}}),ja&&r7(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(i,r,e){var t=r+" Iterator",n=lc(r),a=lc(t);s7(i,r,function(o,s){lm(this,{type:t,target:o,state:n(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,u=o.last;u&&u.removed;)u=u.previous;return!o.target||!(o.last=u=u?u.next:o.state.first)?(o.target=void 0,Ls(void 0,!0)):Ls(s==="keys"?u.key:s==="values"?u.value:[u.key,u.value],!1)},e?"entries":"values",!e,!0),u7(r)}},l7=wE,h7=EE;l7("Map",function(i){return function(){return i(this,arguments.length?arguments[0]:void 0)}},h7);var c7=we,d7=c7.Map,f7=d7,v7=f7,p7=v7,SE=Y(p7),g7=K,y7=ba.some,m7=_l,b7=m7("some");g7({target:"Array",proto:!0,forced:!b7},{some:function(r){return y7(this,r,arguments.length>1?arguments[1]:void 0)}});var $7=ut,w7=$7("Array","some"),_7=ze,E7=w7,hc=Array.prototype,S7=function(i){var r=i.some;return i===hc||_7(hc,i)&&r===hc.some?E7:r},O7=S7,T7=O7,I7=T7,k7=Y(I7),P7=ut,x7=P7("Array","keys"),C7=x7,A7=C7,D7=zr,R7=He,N7=ze,M7=A7,cc=Array.prototype,B7={DOMTokenList:!0,NodeList:!0},F7=function(i){var r=i.keys;return i===cc||N7(cc,i)&&r===cc.keys||R7(B7,D7(i))?M7:r},j7=F7,En=Y(j7),hm=k0,L7=Math.floor,tf=function(i,r){var e=i.length,t=L7(e/2);return e<8?z7(i,r):H7(i,tf(hm(i,0,t),r),tf(hm(i,t),r),r)},z7=function(i,r){for(var e=i.length,t=1,n,a;t0;)i[a]=i[--a];a!==t++&&(i[a]=n)}return i},H7=function(i,r,e,t){for(var n=r.length,a=e.length,o=0,s=0;o3)){if(rV)return!0;if(ym)return ym<603;var i="",r,e,t,n;for(r=65;r<76;r++){switch(e=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)Zr.push({k:e+n,v:t})}for(Zr.sort(function(a,o){return o.v-a.v}),n=0;nvm(e)?1:-1}};X7({target:"Array",proto:!0,forced:sV},{sort:function(r){r!==void 0&&J7(r);var e=Z7(this);if(TE)return r===void 0?mm(e):mm(e,r);var t=[],n=fm(e),a,o;for(o=0;othis.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=bL(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,t;Wi(e=Ww(t=this._queue).call(t,0)).call(e,function(n){n.fn.apply(n.context||n.fn,n.args||[])})}}],[{key:"extend",value:function(e,t){var n=new i(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){n.flush()};var a=[{name:"flush",original:void 0}];if(t&&t.replace)for(var o=0;o=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function cW(i,r){var e;if(i){if(typeof i=="string")return _m(i,r);var t=Tl(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return ov(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _m(i,r)}}function _m(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);es&&(s=d,o=h)}return o}},{key:"min",value:function(t){var n=gc(this._pairs),a=n.next();if(a.done)return null;for(var o=a.value[1],s=t(a.value[1],a.value[0]);!(a=n.next()).done;){var u=bt(a.value,2),l=u[0],h=u[1],d=t(h,l);d=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function dW(i,r){var e;if(i){if(typeof i=="string")return Tm(i,r);var t=Tl(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return ov(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Tm(i,r)}}function Tm(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e"u"||!du||du.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(du(Boolean,[],function(){})),!0}catch{return!1}}function pW(i,r){return i[r]==null&&(i[r]=UV()),i}var Lu=function(i){Az(e,i);var r=fW(e);function e(t,n){var a;return tl(this,e),a=r.call(this),ni(F_(a),"_queue",null),t&&!Bt(t)&&(n=t,t=[]),a._options=n||{},a._data=new SE,a.length=0,a._idProp=a._options.fieldId||"id",t&&t.length&&a.add(t),a.setOptions(n),a}return wl(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(n){n&&n.queue!==void 0&&(n.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=KV.extend(this,{replace:["add","update","remove"]})),n.queue&&typeof n.queue=="object"&&this._queue.setOptions(n.queue)))}},{key:"add",value:function(n,a){var o=this,s=[],u;if(Bt(n)){var l=rr(n).call(n,function(c){return c[o._idProp]});if(k7(l).call(l,function(c){return o._data.has(c)}))throw new Error("A duplicate id was found in the parameter array.");for(var h=0,d=n.length;hh?1:ls)&&(o=h,s=d)}}catch(c){u.e(c)}finally{u.f()}return o||null}},{key:"min",value:function(n){var a,o=null,s=null,u=yc(bm(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var h=l.value,d=h[n];typeof d=="number"&&(s==null||di.length)&&(r=i.length);for(var e=0,t=new Array(r);e"u"||!du||du.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(du(Boolean,[],function(){})),!0}catch{return!1}}function pW(i,r){return i[r]==null&&(i[r]=UV()),i}var Lu=function(i){Az(e,i);var r=fW(e);function e(t,n){var a;return tl(this,e),a=r.call(this),ni(F_(a),"_queue",null),t&&!Bt(t)&&(n=t,t=[]),a._options=n||{},a._data=new SE,a.length=0,a._idProp=a._options.fieldId||"id",t&&t.length&&a.add(t),a.setOptions(n),a}return wl(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(n){n&&n.queue!==void 0&&(n.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=KV.extend(this,{replace:["add","update","remove"]})),n.queue&&typeof n.queue=="object"&&this._queue.setOptions(n.queue)))}},{key:"add",value:function(n,a){var o=this,s=[],u;if(Bt(n)){var l=rr(n).call(n,function(c){return c[o._idProp]});if(k7(l).call(l,function(c){return o._data.has(c)}))throw new Error("A duplicate id was found in the parameter array.");for(var h=0,d=n.length;hh?1:ls)&&(o=h,s=d)}}catch(c){u.e(c)}finally{u.f()}return o||null}},{key:"min",value:function(n){var a,o=null,s=null,u=yc(bm(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var h=l.value,d=h[n];typeof d=="number"&&(s==null||d"u"&&af!==void 0,AE={all:af,IS_HTMLDDA:SW},DE=AE,OW=DE.all,qe=DE.IS_HTMLDDA?function(i){return typeof i=="function"||i===OW}:function(i){return typeof i=="function"},Sa={},TW=ne,Ye=!TW(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),IW=Uo,Vs=Function.prototype.call,zt=IW?Vs.bind(Vs):function(){return Vs.apply(Vs,arguments)},Cl={},RE={}.propertyIsEnumerable,NE=Object.getOwnPropertyDescriptor,kW=NE&&!RE.call({1:2},1);Cl.f=kW?function(r){var e=NE(this,r);return!!e&&e.enumerable}:RE;var Go=function(i,r){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:r}},PW=se,xW=ne,CW=Hr,bc=Object,AW=PW("".split),Al=xW(function(){return!bc("z").propertyIsEnumerable(0)})?function(i){return CW(i)==="String"?AW(i,""):bc(i)}:bc,Oa=function(i){return i==null},DW=Oa,RW=TypeError,qo=function(i){if(DW(i))throw new RW("Can't call method on "+i);return i},NW=Al,MW=qo,wr=function(i){return NW(MW(i))},Pm=qe,ME=AE,BW=ME.all,Xe=ME.IS_HTMLDDA?function(i){return typeof i=="object"?i!==null:Pm(i)||i===BW}:function(i){return typeof i=="object"?i!==null:Pm(i)},ae={},$c=ae,wc=Ie,FW=qe,xm=function(i){return FW(i)?i:void 0},Jt=function(i,r){return arguments.length<2?xm($c[i])||xm(wc[i]):$c[i]&&$c[i][r]||wc[i]&&wc[i][r]},jW=se,Re=jW({}.isPrototypeOf),Yo=typeof navigator<"u"&&String(navigator.userAgent)||"",BE=Ie,_c=Yo,Cm=BE.process,Am=BE.Deno,Dm=Cm&&Cm.versions||Am&&Am.version,Rm=Dm&&Dm.v8,ir,zu;Rm&&(ir=Rm.split("."),zu=ir[0]>0&&ir[0]<4?1:+(ir[0]+ir[1]));!zu&&_c&&(ir=_c.match(/Edge\/(\d+)/),(!ir||ir[1]>=74)&&(ir=_c.match(/Chrome\/(\d+)/),ir&&(zu=+ir[1])));var Xo=zu,Nm=Xo,LW=ne,zW=Ie,HW=zW.String,Ta=!!Object.getOwnPropertySymbols&&!LW(function(){var i=Symbol("symbol detection");return!HW(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&Nm&&Nm<41}),VW=Ta,FE=VW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",WW=Jt,UW=qe,KW=Re,GW=FE,qW=Object,Jo=GW?function(i){return typeof i=="symbol"}:function(i){var r=WW("Symbol");return UW(r)&&KW(r.prototype,qW(i))},YW=String,Ia=function(i){try{return YW(i)}catch{return"Object"}},XW=qe,JW=Ia,ZW=TypeError,sn=function(i){if(XW(i))return i;throw new ZW(JW(i)+" is not a function")},QW=sn,e9=Oa,kv=function(i,r){var e=i[r];return e9(e)?void 0:QW(e)},Ec=zt,Sc=qe,Oc=Xe,t9=TypeError,r9=function(i,r){var e,t;if(r==="string"&&Sc(e=i.toString)&&!Oc(t=Ec(e,i))||Sc(e=i.valueOf)&&!Oc(t=Ec(e,i))||r!=="string"&&Sc(e=i.toString)&&!Oc(t=Ec(e,i)))return t;throw new t9("Can't convert object to primitive value")},jE={exports:{}},Mm=Ie,i9=Object.defineProperty,n9=function(i,r){try{i9(Mm,i,{value:r,configurable:!0,writable:!0})}catch{Mm[i]=r}return r},a9=Ie,o9=n9,Bm="__core-js_shared__",s9=a9[Bm]||o9(Bm,{}),Pv=s9,Fm=Pv;(jE.exports=function(i,r){return Fm[i]||(Fm[i]=r!==void 0?r:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var ka=jE.exports,u9=qo,l9=Object,Ct=function(i){return l9(u9(i))},h9=se,c9=Ct,d9=h9({}.hasOwnProperty),Je=Object.hasOwn||function(r,e){return d9(c9(r),e)},f9=se,v9=0,p9=Math.random(),g9=f9(1 .toString),Dl=function(i){return"Symbol("+(i===void 0?"":i)+")_"+g9(++v9+p9,36)},y9=Ie,m9=ka,jm=Je,b9=Dl,$9=Ta,w9=FE,Ln=y9.Symbol,Tc=m9("wks"),_9=w9?Ln.for||Ln:Ln&&Ln.withoutSetter||b9,ke=function(i){return jm(Tc,i)||(Tc[i]=$9&&jm(Ln,i)?Ln[i]:_9("Symbol."+i)),Tc[i]},E9=zt,Lm=Xe,zm=Jo,S9=kv,O9=r9,T9=ke,I9=TypeError,k9=T9("toPrimitive"),P9=function(i,r){if(!Lm(i)||zm(i))return i;var e=S9(i,k9),t;if(e){if(r===void 0&&(r="default"),t=E9(e,i,r),!Lm(t)||zm(t))return t;throw new I9("Can't convert object to primitive value")}return r===void 0&&(r="number"),O9(i,r)},x9=P9,C9=Jo,Rl=function(i){var r=x9(i,"string");return C9(r)?r:r+""},A9=Ie,Hm=Xe,of=A9.document,D9=Hm(of)&&Hm(of.createElement),LE=function(i){return D9?of.createElement(i):{}},R9=Ye,N9=ne,M9=LE,zE=!R9&&!N9(function(){return Object.defineProperty(M9("div"),"a",{get:function(){return 7}}).a!==7}),B9=Ye,F9=zt,j9=Cl,L9=Go,z9=wr,H9=Rl,V9=Je,W9=zE,Vm=Object.getOwnPropertyDescriptor;Sa.f=B9?Vm:function(r,e){if(r=z9(r),e=H9(e),W9)try{return Vm(r,e)}catch{}if(V9(r,e))return L9(!F9(j9.f,r,e),r[e])};var U9=ne,K9=qe,G9=/#|\.prototype\./,Zo=function(i,r){var e=Y9[q9(i)];return e===J9?!0:e===X9?!1:K9(r)?U9(r):!!r},q9=Zo.normalize=function(i){return String(i).replace(G9,".").toLowerCase()},Y9=Zo.data={},X9=Zo.NATIVE="N",J9=Zo.POLYFILL="P",Z9=Zo,Wm=Iv,Q9=sn,eU=Uo,tU=Wm(Wm.bind),Qo=function(i,r){return Q9(i),r===void 0?i:eU?tU(i,r):function(){return i.apply(r,arguments)}},Ht={},rU=Ye,iU=ne,HE=rU&&iU(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),nU=Xe,aU=String,oU=TypeError,Vt=function(i){if(nU(i))return i;throw new oU(aU(i)+" is not an object")},sU=Ye,uU=zE,lU=HE,Ws=Vt,Um=Rl,hU=TypeError,Ic=Object.defineProperty,cU=Object.getOwnPropertyDescriptor,kc="enumerable",Pc="configurable",xc="writable";Ht.f=sU?lU?function(r,e,t){if(Ws(r),e=Um(e),Ws(t),typeof r=="function"&&e==="prototype"&&"value"in t&&xc in t&&!t[xc]){var n=cU(r,e);n&&n[xc]&&(r[e]=t.value,t={configurable:Pc in t?t[Pc]:n[Pc],enumerable:kc in t?t[kc]:n[kc],writable:!1})}return Ic(r,e,t)}:Ic:function(r,e,t){if(Ws(r),e=Um(e),Ws(t),uU)try{return Ic(r,e,t)}catch{}if("get"in t||"set"in t)throw new hU("Accessors not supported");return"value"in t&&(r[e]=t.value),r};var dU=Ye,fU=Ht,vU=Go,Pa=dU?function(i,r,e){return fU.f(i,r,vU(1,e))}:function(i,r,e){return i[r]=e,i},Us=Ie,pU=Ko,gU=Iv,yU=qe,mU=Sa.f,bU=Z9,Sn=ae,$U=Qo,On=Pa,Km=Je,wU=function(i){var r=function(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new i;case 1:return new i(e);case 2:return new i(e,t)}return new i(e,t,n)}return pU(i,this,arguments)};return r.prototype=i.prototype,r},q=function(i,r){var e=i.target,t=i.global,n=i.stat,a=i.proto,o=t?Us:n?Us[e]:(Us[e]||{}).prototype,s=t?Sn:Sn[e]||On(Sn,e,{})[e],u=s.prototype,l,h,d,c,f,v,p,g,y;for(c in r)l=bU(t?c:e+(n?".":"#")+c,i.forced),h=!l&&o&&Km(o,c),v=s[c],h&&(i.dontCallGetSet?(y=mU(o,c),p=y&&y.value):p=o[c]),f=h&&p?p:r[c],!(h&&typeof v==typeof f)&&(i.bind&&h?g=$U(f,Us):i.wrap&&h?g=wU(f):a&&yU(f)?g=gU(f):g=f,(i.sham||f&&f.sham||v&&v.sham)&&On(g,"sham",!0),On(s,c,g),a&&(d=e+"Prototype",Km(Sn,d)||On(Sn,d,{}),On(Sn[d],c,f),i.real&&u&&(l||!u[c])&&On(u,c,f)))},_U=Math.ceil,EU=Math.floor,SU=Math.trunc||function(r){var e=+r;return(e>0?EU:_U)(e)},OU=SU,Nl=function(i){var r=+i;return r!==r||r===0?0:OU(r)},TU=Nl,IU=Math.max,kU=Math.min,es=function(i,r){var e=TU(i);return e<0?IU(e+r,0):kU(e,r)},PU=Nl,xU=Math.min,CU=function(i){return i>0?xU(PU(i),9007199254740991):0},AU=CU,Zt=function(i){return AU(i.length)},DU=wr,RU=es,NU=Zt,Gm=function(i){return function(r,e,t){var n=DU(r),a=NU(n),o=RU(t,a),s;if(i&&e!==e){for(;a>o;)if(s=n[o++],s!==s)return!0}else for(;a>o;o++)if((i||o in n)&&n[o]===e)return i||o||0;return!i&&-1}},xv={includes:Gm(!0),indexOf:Gm(!1)},ts={},MU=se,Cc=Je,BU=wr,FU=xv.indexOf,jU=ts,qm=MU([].push),VE=function(i,r){var e=BU(i),t=0,n=[],a;for(a in e)!Cc(jU,a)&&Cc(e,a)&&qm(n,a);for(;r.length>t;)Cc(e,a=r[t++])&&(~FU(n,a)||qm(n,a));return n},Cv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],LU=VE,zU=Cv,Ml=Object.keys||function(r){return LU(r,zU)},rs={};rs.f=Object.getOwnPropertySymbols;var Ym=Ye,HU=se,VU=zt,WU=ne,Ac=Ml,UU=rs,KU=Cl,GU=Ct,qU=Al,Tn=Object.assign,Xm=Object.defineProperty,YU=HU([].concat),XU=!Tn||WU(function(){if(Ym&&Tn({b:1},Tn(Xm({},"a",{enumerable:!0,get:function(){Xm(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var i={},r={},e=Symbol("assign detection"),t="abcdefghijklmnopqrst";return i[e]=7,t.split("").forEach(function(n){r[n]=n}),Tn({},i)[e]!==7||Ac(Tn({},r)).join("")!==t})?function(r,e){for(var t=GU(r),n=arguments.length,a=1,o=UU.f,s=KU.f;n>a;)for(var u=qU(arguments[a++]),l=o?YU(Ac(u),o(u)):Ac(u),h=l.length,d=0,c;h>d;)c=l[d++],(!Ym||VU(s,u,c))&&(t[c]=u[c]);return t}:Tn,JU=q,Jm=XU;JU({target:"Object",stat:!0,arity:2,forced:Object.assign!==Jm},{assign:Jm});var ZU=ae,QU=ZU.Object.assign,eK=QU,tK=eK,rK=tK,Fe=V(rK),iK=se,Bl=iK([].slice),WE=se,nK=sn,aK=Xe,oK=Je,Zm=Bl,sK=Uo,UE=Function,uK=WE([].concat),lK=WE([].join),Dc={},hK=function(i,r,e){if(!oK(Dc,r)){for(var t=[],n=0;n=.1;)v=+a[d++%o],v>h&&(v=h),f=Math.sqrt(v*v/(1+l*l)),f=s<0?-f:f,r+=f,e+=l*f,c===!0?i.lineTo(r,e):i.moveTo(r,e),h-=v,c=!c}function OK(i,r,e,t){i.beginPath();var n=6,a=Math.PI*2/n;i.moveTo(r+t,e);for(var o=1;o1?e-1:0),n=1;n=a?i?"":void 0:(o=tb(t,n),o<55296||o>56319||n+1===a||(s=tb(t,n+1))<56320||s>57343?i?HK(t,n):o:i?VK(t,n,n+2):(o-55296<<10)+(s-56320)+65536)}},WK={codeAt:rb(!1),charAt:rb(!0)},UK=Ie,KK=qe,ib=UK.WeakMap,eS=KK(ib)&&/native code/.test(String(ib)),GK=ka,qK=Dl,nb=GK("keys"),Fl=function(i){return nb[i]||(nb[i]=qK(i))},YK=eS,tS=Ie,XK=Xe,JK=Pa,Nc=Je,Mc=Pv,ZK=Fl,QK=ts,ab="Object already initialized",uf=tS.TypeError,eG=tS.WeakMap,Hu,yo,Vu,tG=function(i){return Vu(i)?yo(i):Hu(i,{})},rG=function(i){return function(r){var e;if(!XK(r)||(e=yo(r)).type!==i)throw new uf("Incompatible receiver, "+i+" required");return e}};if(YK||Mc.state){var cr=Mc.state||(Mc.state=new eG);cr.get=cr.get,cr.has=cr.has,cr.set=cr.set,Hu=function(i,r){if(cr.has(i))throw new uf(ab);return r.facade=i,cr.set(i,r),r},yo=function(i){return cr.get(i)||{}},Vu=function(i){return cr.has(i)}}else{var In=ZK("state");QK[In]=!0,Hu=function(i,r){if(Nc(i,In))throw new uf(ab);return r.facade=i,JK(i,In,r),r},yo=function(i){return Nc(i,In)?i[In]:{}},Vu=function(i){return Nc(i,In)}}var ln={set:Hu,get:yo,has:Vu,enforce:tG,getterFor:rG},lf=Ye,iG=Je,rS=Function.prototype,nG=lf&&Object.getOwnPropertyDescriptor,Nv=iG(rS,"name"),aG=Nv&&function(){}.name==="something",oG=Nv&&(!lf||lf&&nG(rS,"name").configurable),sG={EXISTS:Nv,PROPER:aG,CONFIGURABLE:oG},jl={},uG=Ye,lG=HE,hG=Ht,cG=Vt,dG=wr,fG=Ml;jl.f=uG&&!lG?Object.defineProperties:function(r,e){cG(r);for(var t=dG(e),n=fG(e),a=n.length,o=0,s;a>o;)hG.f(r,s=n[o++],t[s]);return r};var vG=Jt,pG=vG("document","documentElement"),gG=Vt,yG=jl,ob=Cv,mG=ts,bG=pG,$G=LE,wG=Fl,sb=">",ub="<",hf="prototype",cf="script",iS=wG("IE_PROTO"),Bc=function(){},nS=function(i){return ub+cf+sb+i+ub+"/"+cf+sb},lb=function(i){i.write(nS("")),i.close();var r=i.parentWindow.Object;return i=null,r},_G=function(){var i=$G("iframe"),r="java"+cf+":",e;return i.style.display="none",bG.appendChild(i),i.src=String(r),e=i.contentWindow.document,e.open(),e.write(nS("document.F=Object")),e.close(),e.F},Ks,yu=function(){try{Ks=new ActiveXObject("htmlfile")}catch{}yu=typeof document<"u"?document.domain&&Ks?lb(Ks):_G():lb(Ks);for(var i=ob.length;i--;)delete yu[hf][ob[i]];return yu()};mG[iS]=!0;var xa=Object.create||function(r,e){var t;return r!==null?(Bc[hf]=gG(r),t=new Bc,Bc[hf]=null,t[iS]=r):t=yu(),e===void 0?t:yG.f(t,e)},EG=ne,aS=!EG(function(){function i(){}return i.prototype.constructor=null,Object.getPrototypeOf(new i)!==i.prototype}),SG=Je,OG=qe,TG=Ct,IG=Fl,kG=aS,hb=IG("IE_PROTO"),df=Object,PG=df.prototype,Ll=kG?df.getPrototypeOf:function(i){var r=TG(i);if(SG(r,hb))return r[hb];var e=r.constructor;return OG(e)&&r instanceof e?e.prototype:r instanceof df?PG:null},xG=Pa,is=function(i,r,e,t){return t&&t.enumerable?i[r]=e:xG(i,r,e),i},CG=ne,AG=qe,DG=Xe,RG=xa,cb=Ll,NG=is,MG=ke,ff=MG("iterator"),oS=!1,Cr,Fc,jc;[].keys&&(jc=[].keys(),"next"in jc?(Fc=cb(cb(jc)),Fc!==Object.prototype&&(Cr=Fc)):oS=!0);var BG=!DG(Cr)||CG(function(){var i={};return Cr[ff].call(i)!==i});BG?Cr={}:Cr=RG(Cr);AG(Cr[ff])||NG(Cr,ff,function(){return this});var sS={IteratorPrototype:Cr,BUGGY_SAFARI_ITERATORS:oS},FG=Dv,jG=un,LG=FG?{}.toString:function(){return"[object "+jG(this)+"]"},zG=Dv,HG=Ht.f,VG=Pa,WG=Je,UG=LG,KG=ke,db=KG("toStringTag"),Ca=function(i,r,e,t){if(i){var n=e?i:i.prototype;WG(n,db)||HG(n,db,{configurable:!0,value:r}),t&&!zG&&VG(n,"toString",UG)}},Aa={},GG=sS.IteratorPrototype,qG=xa,YG=Go,XG=Ca,JG=Aa,ZG=function(){return this},QG=function(i,r,e,t){var n=r+" Iterator";return i.prototype=qG(GG,{next:YG(+!t,e)}),XG(i,n,!1,!0),JG[n]=ZG,i},eq=se,tq=sn,rq=function(i,r,e){try{return eq(tq(Object.getOwnPropertyDescriptor(i,r)[e]))}catch{}},iq=qe,nq=String,aq=TypeError,oq=function(i){if(typeof i=="object"||iq(i))return i;throw new aq("Can't set "+nq(i)+" as a prototype")},sq=rq,uq=Vt,lq=oq,hq=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,r={},e;try{e=sq(Object.prototype,"__proto__","set"),e(r,[]),i=r instanceof Array}catch{}return function(n,a){return uq(n),lq(a),i?e(n,a):n.__proto__=a,n}}():void 0),cq=q,dq=zt,fq=sG,vq=QG,pq=Ll,gq=Ca,fb=is,yq=ke,vb=Aa,mq=sS,bq=fq.PROPER,Gs=mq.BUGGY_SAFARI_ITERATORS,Lc=yq("iterator"),pb="keys",qs="values",gb="entries",$q=function(){return this},Mv=function(i,r,e,t,n,a,o){vq(e,r,t);var s=function(y){if(y===n&&c)return c;if(!Gs&&y&&y in h)return h[y];switch(y){case pb:return function(){return new e(this,y)};case qs:return function(){return new e(this,y)};case gb:return function(){return new e(this,y)}}return function(){return new e(this)}},u=r+" Iterator",l=!1,h=i.prototype,d=h[Lc]||h["@@iterator"]||n&&h[n],c=!Gs&&d||s(n),f=r==="Array"&&h.entries||d,v,p,g;if(f&&(v=pq(f.call(new i)),v!==Object.prototype&&v.next&&(gq(v,u,!0,!0),vb[u]=$q)),bq&&n===qs&&d&&d.name!==qs&&(l=!0,c=function(){return dq(d,this)}),n)if(p={values:s(qs),keys:a?c:s(pb),entries:s(gb)},o)for(g in p)(Gs||l||!(g in h))&&fb(h,g,p[g]);else cq({target:r,proto:!0,forced:Gs||l},p);return o&&h[Lc]!==c&&fb(h,Lc,c,{name:n}),vb[r]=c,p},Bv=function(i,r){return{value:i,done:r}},wq=WK.charAt,_q=_r,uS=ln,Eq=Mv,yb=Bv,lS="String Iterator",Sq=uS.set,Oq=uS.getterFor(lS);Eq(String,"String",function(i){Sq(this,{type:lS,string:_q(i),index:0})},function(){var r=Oq(this),e=r.string,t=r.index,n;return t>=e.length?yb(void 0,!0):(n=wq(e,t),r.index+=n.length,yb(n,!1))});var Tq=zt,mb=Vt,Iq=kv,hS=function(i,r,e){var t,n;mb(i);try{if(t=Iq(i,"return"),!t){if(r==="throw")throw e;return e}t=Tq(t,i)}catch(a){n=!0,t=a}if(r==="throw")throw e;if(n)throw t;return mb(t),e},kq=Vt,Pq=hS,xq=function(i,r,e,t){try{return t?r(kq(e)[0],e[1]):r(e)}catch(n){Pq(i,"throw",n)}},Cq=ke,Aq=Aa,Dq=Cq("iterator"),Rq=Array.prototype,cS=function(i){return i!==void 0&&(Aq.Array===i||Rq[Dq]===i)},Nq=se,Mq=qe,vf=Pv,Bq=Nq(Function.toString);Mq(vf.inspectSource)||(vf.inspectSource=function(i){return Bq(i)});var Fq=vf.inspectSource,jq=se,Lq=ne,dS=qe,zq=un,Hq=Jt,Vq=Fq,fS=function(){},Wq=[],vS=Hq("Reflect","construct"),Fv=/^\s*(?:class|function)\b/,Uq=jq(Fv.exec),Kq=!Fv.test(fS),La=function(r){if(!dS(r))return!1;try{return vS(fS,Wq,r),!0}catch{return!1}},pS=function(r){if(!dS(r))return!1;switch(zq(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Kq||!!Uq(Fv,Vq(r))}catch{return!0}};pS.sham=!0;var zl=!vS||Lq(function(){var i;return La(La.call)||!La(Object)||!La(function(){i=!0})||i})?pS:La,Gq=Rl,qq=Ht,Yq=Go,Da=function(i,r,e){var t=Gq(r);t in i?qq.f(i,t,Yq(0,e)):i[t]=e},Xq=un,bb=kv,Jq=Oa,Zq=Aa,Qq=ke,eY=Qq("iterator"),Hl=function(i){if(!Jq(i))return bb(i,eY)||bb(i,"@@iterator")||Zq[Xq(i)]},tY=zt,rY=sn,iY=Vt,nY=Ia,aY=Hl,oY=TypeError,gS=function(i,r){var e=arguments.length<2?aY(i):r;if(rY(e))return iY(tY(e,i));throw new oY(nY(i)+" is not iterable")},sY=Qo,uY=zt,lY=Ct,hY=xq,cY=cS,dY=zl,fY=Zt,$b=Da,vY=gS,pY=Hl,wb=Array,gY=function(r){var e=lY(r),t=dY(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=sY(a,n>2?arguments[2]:void 0));var s=pY(e),u=0,l,h,d,c,f,v;if(s&&!(this===wb&&cY(s)))for(c=vY(e,s),f=c.next,h=t?new this:[];!(d=uY(f,c)).done;u++)v=o?hY(c,a,[d.value,u],!0):d.value,$b(h,u,v);else for(l=fY(e),h=t?new this(l):wb(l);l>u;u++)v=o?a(e[u],u):e[u],$b(h,u,v);return h.length=u,h},yY=ke,yS=yY("iterator"),mS=!1;try{var mY=0,_b={next:function(){return{done:!!mY++}},return:function(){mS=!0}};_b[yS]=function(){return this},Array.from(_b,function(){throw 2})}catch{}var bY=function(i,r){try{if(!r&&!mS)return!1}catch{return!1}var e=!1;try{var t={};t[yS]=function(){return{next:function(){return{done:e=!0}}}},i(t)}catch{}return e},$Y=q,wY=gY,_Y=bY,EY=!_Y(function(i){Array.from(i)});$Y({target:"Array",stat:!0,forced:EY},{from:wY});var SY=ae,OY=SY.Array.from,TY=OY,bS=TY,IY=bS,hn=V(IY),kY=wr,Eb=Aa,$S=ln;Ht.f;var PY=Mv,Ys=Bv,wS="Array Iterator",xY=$S.set,CY=$S.getterFor(wS);PY(Array,"Array",function(i,r){xY(this,{type:wS,target:kY(i),index:0,kind:r})},function(){var i=CY(this),r=i.target,e=i.kind,t=i.index++;if(!r||t>=r.length)return i.target=void 0,Ys(void 0,!0);switch(e){case"keys":return Ys(t,!1);case"values":return Ys(r[t],!1)}return Ys([t,r[t]],!1)},"values");Eb.Arguments=Eb.Array;var AY=Hl,DY=AY,RY={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},NY=RY,MY=Ie,BY=un,FY=Pa,Sb=Aa,jY=ke,Ob=jY("toStringTag");for(var zc in NY){var Tb=MY[zc],Hc=Tb&&Tb.prototype;Hc&&BY(Hc)!==Ob&&FY(Hc,Ob,zc),Sb[zc]=Sb.Array}var LY=DY,zY=LY,HY=zY,VY=HY,WY=VY,UY=WY,_S=UY,ES=V(_S),KY=_S,cn=V(KY);function N(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")}var SS={exports:{}},GY=q,qY=Ye,Ib=Ht.f;GY({target:"Object",stat:!0,forced:Object.defineProperty!==Ib,sham:!qY},{defineProperty:Ib});var YY=ae,OS=YY.Object,XY=SS.exports=function(r,e,t){return OS.defineProperty(r,e,t)};OS.defineProperty.sham&&(XY.sham=!0);var JY=SS.exports,ZY=JY,TS=ZY,QY=TS,eX=QY,tX=eX,rX=tX,iX=rX,Vl=V(iX),nX=Hr,dn=Array.isArray||function(r){return nX(r)==="Array"},aX=TypeError,oX=9007199254740991,jv=function(i){if(i>oX)throw aX("Maximum allowed index exceeded");return i},kb=dn,sX=zl,uX=Xe,lX=ke,hX=lX("species"),Pb=Array,cX=function(i){var r;return kb(i)&&(r=i.constructor,sX(r)&&(r===Pb||kb(r.prototype))?r=void 0:uX(r)&&(r=r[hX],r===null&&(r=void 0))),r===void 0?Pb:r},dX=cX,Lv=function(i,r){return new(dX(i))(r===0?0:r)},fX=ne,vX=ke,pX=Xo,gX=vX("species"),ns=function(i){return pX>=51||!fX(function(){var r=[],e=r.constructor={};return e[gX]=function(){return{foo:1}},r[i](Boolean).foo!==1})},yX=q,mX=ne,bX=dn,$X=Xe,wX=Ct,_X=Zt,xb=jv,Cb=Da,EX=Lv,SX=ns,OX=ke,TX=Xo,IS=OX("isConcatSpreadable"),IX=TX>=51||!mX(function(){var i=[];return i[IS]=!1,i.concat()[0]!==i}),kX=function(i){if(!$X(i))return!1;var r=i[IS];return r!==void 0?!!r:bX(i)},PX=!IX||!SX("concat");yX({target:"Array",proto:!0,arity:1,forced:PX},{concat:function(r){var e=wX(this),t=EX(e,0),n=0,a,o,s,u,l;for(a=-1,s=arguments.length;ag;g++)if((s||g in f)&&(b=f[g],$=v(b,g,c),i))if(r)m[g]=$;else if($)switch(i){case 3:return!0;case 5:return b;case 6:return g;case 2:Rb(m,b)}else switch(i){case 4:return!1;case 7:Rb(m,b)}return a?-1:t||n?n:m}},mi={forEach:Ur(0),map:Ur(1),filter:Ur(2),some:Ur(3),every:Ur(4),find:Ur(5),findIndex:Ur(6),filterReject:Ur(7)},Ul=q,Kl=Ie,Hv=zt,rJ=se,ra=Ye,ia=Ta,iJ=ne,Ue=Je,nJ=Re,pf=Vt,Gl=wr,Vv=Rl,aJ=_r,gf=Go,mo=xa,AS=Ml,oJ=as,DS=Wl,sJ=rs,RS=Sa,NS=Ht,uJ=jl,MS=Cl,Nb=is,lJ=zv,Wv=ka,hJ=Fl,BS=ts,Mb=Dl,cJ=ke,dJ=os,fJ=Pe,vJ=CS,pJ=Ca,FS=ln,ql=mi.forEach,St=hJ("hidden"),Yl="Symbol",bo="prototype",gJ=FS.set,Bb=FS.getterFor(Yl),or=Object[bo],Fi=Kl.Symbol,Ga=Fi&&Fi[bo],yJ=Kl.RangeError,mJ=Kl.TypeError,Vc=Kl.QObject,jS=RS.f,ji=NS.f,LS=DS.f,bJ=MS.f,zS=rJ([].push),Fr=Wv("symbols"),ss=Wv("op-symbols"),$J=Wv("wks"),yf=!Vc||!Vc[bo]||!Vc[bo].findChild,HS=function(i,r,e){var t=jS(or,r);t&&delete or[r],ji(i,r,e),t&&i!==or&&ji(or,r,t)},mf=ra&&iJ(function(){return mo(ji({},"a",{get:function(){return ji(this,"a",{value:7}).a}})).a!==7})?HS:ji,Wc=function(i,r){var e=Fr[i]=mo(Ga);return gJ(e,{type:Yl,tag:i,description:r}),ra||(e.description=r),e},Xl=function(r,e,t){r===or&&Xl(ss,e,t),pf(r);var n=Vv(e);return pf(t),Ue(Fr,n)?(t.enumerable?(Ue(r,St)&&r[St][n]&&(r[St][n]=!1),t=mo(t,{enumerable:gf(0,!1)})):(Ue(r,St)||ji(r,St,gf(1,{})),r[St][n]=!0),mf(r,n,t)):ji(r,n,t)},Uv=function(r,e){pf(r);var t=Gl(e),n=AS(t).concat(KS(t));return ql(n,function(a){(!ra||Hv(VS,t,a))&&Xl(r,a,t[a])}),r},wJ=function(r,e){return e===void 0?mo(r):Uv(mo(r),e)},VS=function(r){var e=Vv(r),t=Hv(bJ,this,e);return this===or&&Ue(Fr,e)&&!Ue(ss,e)?!1:t||!Ue(this,e)||!Ue(Fr,e)||Ue(this,St)&&this[St][e]?t:!0},WS=function(r,e){var t=Gl(r),n=Vv(e);if(!(t===or&&Ue(Fr,n)&&!Ue(ss,n))){var a=jS(t,n);return a&&Ue(Fr,n)&&!(Ue(t,St)&&t[St][n])&&(a.enumerable=!0),a}},US=function(r){var e=LS(Gl(r)),t=[];return ql(e,function(n){!Ue(Fr,n)&&!Ue(BS,n)&&zS(t,n)}),t},KS=function(i){var r=i===or,e=LS(r?ss:Gl(i)),t=[];return ql(e,function(n){Ue(Fr,n)&&(!r||Ue(or,n))&&zS(t,Fr[n])}),t};ia||(Fi=function(){if(nJ(Ga,this))throw new mJ("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:aJ(arguments[0]),e=Mb(r),t=function(n){this===or&&Hv(t,ss,n),Ue(this,St)&&Ue(this[St],e)&&(this[St][e]=!1);var a=gf(1,n);try{mf(this,e,a)}catch(o){if(!(o instanceof yJ))throw o;HS(this,e,a)}};return ra&&yf&&mf(or,e,{configurable:!0,set:t}),Wc(e,r)},Ga=Fi[bo],Nb(Ga,"toString",function(){return Bb(this).tag}),Nb(Fi,"withoutSetter",function(i){return Wc(Mb(i),i)}),MS.f=VS,NS.f=Xl,uJ.f=Uv,RS.f=WS,oJ.f=DS.f=US,sJ.f=KS,dJ.f=function(i){return Wc(cJ(i),i)},ra&&lJ(Ga,"description",{configurable:!0,get:function(){return Bb(this).description}}));Ul({global:!0,constructor:!0,wrap:!0,forced:!ia,sham:!ia},{Symbol:Fi});ql(AS($J),function(i){fJ(i)});Ul({target:Yl,stat:!0,forced:!ia},{useSetter:function(){yf=!0},useSimple:function(){yf=!1}});Ul({target:"Object",stat:!0,forced:!ia,sham:!ra},{create:wJ,defineProperty:Xl,defineProperties:Uv,getOwnPropertyDescriptor:WS});Ul({target:"Object",stat:!0,forced:!ia},{getOwnPropertyNames:US});vJ();pJ(Fi,Yl);BS[St]=!0;var _J=Ta,GS=_J&&!!Symbol.for&&!!Symbol.keyFor,EJ=q,SJ=Jt,OJ=Je,TJ=_r,qS=ka,IJ=GS,Uc=qS("string-to-symbol-registry"),kJ=qS("symbol-to-string-registry");EJ({target:"Symbol",stat:!0,forced:!IJ},{for:function(i){var r=TJ(i);if(OJ(Uc,r))return Uc[r];var e=SJ("Symbol")(r);return Uc[r]=e,kJ[e]=r,e}});var PJ=q,xJ=Je,CJ=Jo,AJ=Ia,DJ=ka,RJ=GS,Fb=DJ("symbol-to-string-registry");PJ({target:"Symbol",stat:!0,forced:!RJ},{keyFor:function(r){if(!CJ(r))throw new TypeError(AJ(r)+" is not a symbol");if(xJ(Fb,r))return Fb[r]}});var NJ=se,jb=dn,MJ=qe,Lb=Hr,BJ=_r,zb=NJ([].push),FJ=function(i){if(MJ(i))return i;if(jb(i)){for(var r=i.length,e=[],t=0;ti.length)&&(r=i.length);for(var e=0,t=new Array(r);e1?arguments[1]:void 0)}});var ute=Ze,lte=ute("Array").map,hte=Re,cte=lte,Jc=Array.prototype,dte=function(i){var r=i.map;return i===Jc||hte(Jc,i)&&r===Jc.map?cte:r},fte=dte,vte=fte,pte=vte,na=V(pte),gte=q,yte=Ct,dO=Ml,mte=ne,bte=mte(function(){dO(1)});gte({target:"Object",stat:!0,forced:bte},{keys:function(r){return dO(yte(r))}});var $te=ae,wte=$te.Object.keys,_te=wte,Ete=_te,Ste=Ete,Ee=V(Ste),Ote=q,Tte=se,fO=Date,Ite=Tte(fO.prototype.getTime);Ote({target:"Date",stat:!0},{now:function(){return Ite(new fO)}});var kte=ae,Pte=kte.Date.now,xte=Pte,Cte=xte,Ate=Cte,Uu=V(Ate),Dte=ne,Ra=function(i,r){var e=[][i];return!!e&&Dte(function(){e.call(null,r||function(){return 1},1)})},Rte=mi.forEach,Nte=Ra,Mte=Nte("forEach"),Bte=Mte?[].forEach:function(r){return Rte(this,r,arguments.length>1?arguments[1]:void 0)},Fte=q,n1=Bte;Fte({target:"Array",proto:!0,forced:[].forEach!==n1},{forEach:n1});var jte=Ze,Lte=jte("Array").forEach,zte=Lte,Hte=zte,Vte=un,Wte=Je,Ute=Re,Kte=Hte,Zc=Array.prototype,Gte={DOMTokenList:!0,NodeList:!0},qte=function(i){var r=i.forEach;return i===Zc||Ute(Zc,i)&&r===Zc.forEach||Wte(Gte,Vte(i))?Kte:r},Yte=qte,fe=V(Yte),Xte=q,Jte=se,Zte=dn,Qte=Jte([].reverse),a1=[1,2];Xte({target:"Array",proto:!0,forced:String(a1)===String(a1.reverse())},{reverse:function(){return Zte(this)&&(this.length=this.length),Qte(this)}});var ere=Ze,tre=ere("Array").reverse,rre=Re,ire=tre,Qc=Array.prototype,nre=function(i){var r=i.reverse;return i===Qc||rre(Qc,i)&&r===Qc.reverse?ire:r},are=nre,ore=are,sre=ore,Li=V(sre),o1=Ia,ure=TypeError,vO=function(i,r){if(!delete i[r])throw new ure("Cannot delete property "+o1(r)+" of "+o1(i))},lre=q,hre=Ct,cre=es,dre=Nl,fre=Zt,vre=uO,pre=jv,gre=Lv,yre=Da,ed=vO,mre=ns,bre=mre("splice"),$re=Math.max,wre=Math.min;lre({target:"Array",proto:!0,forced:!bre},{splice:function(r,e){var t=hre(this),n=fre(t),a=cre(r,n),o=arguments.length,s,u,l,h,d,c;for(o===0?s=u=0:o===1?(s=0,u=n-a):(s=o-2,u=wre($re(dre(e),0),n-a)),pre(n+s-u),l=gre(t,u),h=0;hn-u+s;h--)ed(t,h-1)}else if(s>u)for(h=n-u;h>a;h--)d=h+u-1,c=h+s-1,d in t?t[c]=t[d]:ed(t,c);for(h=0;h1?arguments[1]:void 0)}});var Rre=Ze,Nre=Rre("Array").includes,Mre=Xe,Bre=Hr,Fre=ke,jre=Fre("match"),Lre=function(i){var r;return Mre(i)&&((r=i[jre])!==void 0?!!r:Bre(i)==="RegExp")},zre=Lre,Hre=TypeError,Vre=function(i){if(zre(i))throw new Hre("The method doesn't accept regular expressions");return i},Wre=ke,Ure=Wre("match"),Kre=function(i){var r=/./;try{"/./"[i](r)}catch{try{return r[Ure]=!1,"/./"[i](r)}catch{}}return!1},Gre=q,qre=se,Yre=Vre,Xre=qo,s1=_r,Jre=Kre,Zre=qre("".indexOf);Gre({target:"String",proto:!0,forced:!Jre("includes")},{includes:function(r){return!!~Zre(s1(Xre(this)),s1(Yre(r)),arguments.length>1?arguments[1]:void 0)}});var Qre=Ze,eie=Qre("String").includes,u1=Re,tie=Nre,rie=eie,rd=Array.prototype,id=String.prototype,iie=function(i){var r=i.includes;return i===rd||u1(rd,i)&&r===rd.includes?tie:typeof i=="string"||i===id||u1(id,i)&&r===id.includes?rie:r},nie=iie,aie=nie,oie=aie,si=V(oie),sie=q,uie=ne,lie=Ct,pO=Ll,hie=aS,cie=uie(function(){pO(1)});sie({target:"Object",stat:!0,forced:cie,sham:!hie},{getPrototypeOf:function(r){return pO(lie(r))}});var die=ae,fie=die.Object.getPrototypeOf,vie=fie,gO=vie,pie=gO,l1=V(pie),gie=q,yie=mi.filter,mie=ns,bie=mie("filter");gie({target:"Array",proto:!0,forced:!bie},{filter:function(r){return yie(this,r,arguments.length>1?arguments[1]:void 0)}});var $ie=Ze,wie=$ie("Array").filter,_ie=Re,Eie=wie,nd=Array.prototype,Sie=function(i){var r=i.filter;return i===nd||_ie(nd,i)&&r===nd.filter?Eie:r},Oie=Sie,Tie=Oie,Iie=Tie,Ot=V(Iie),qv=`
-\v\f\r \u2028\u2029\uFEFF`,kie=se,Pie=qo,xie=_r,$f=qv,h1=kie("".replace),Cie=RegExp("^["+$f+"]+"),Aie=RegExp("(^|[^"+$f+"])["+$f+"]+$"),ad=function(i){return function(r){var e=xie(Pie(r));return i&1&&(e=h1(e,Cie,"")),i&2&&(e=h1(e,Aie,"$1")),e}},yO={start:ad(1),end:ad(2),trim:ad(3)},mO=Ie,Die=ne,Rie=se,Nie=_r,Mie=yO.trim,c1=qv,eo=mO.parseInt,d1=mO.Symbol,f1=d1&&d1.iterator,bO=/^[+-]?0x/i,Bie=Rie(bO.exec),Fie=eo(c1+"08")!==8||eo(c1+"0x16")!==22||f1&&!Die(function(){eo(Object(f1))}),jie=Fie?function(r,e){var t=Mie(Nie(r));return eo(t,e>>>0||(Bie(bO,t)?16:10))}:eo,Lie=q,v1=jie;Lie({global:!0,forced:parseInt!==v1},{parseInt:v1});var zie=ae,Hie=zie.parseInt,Vie=Hie,Wie=Vie,Uie=Wie,nr=V(Uie),Kie=q,Gie=Iv,qie=xv.indexOf,Yie=Ra,wf=Gie([].indexOf),$O=!!wf&&1/wf([1],1,-0)<0,Xie=$O||!Yie("indexOf");Kie({target:"Array",proto:!0,forced:Xie},{indexOf:function(r){var e=arguments.length>1?arguments[1]:void 0;return $O?wf(this,r,e)||0:qie(this,r,e)}});var Jie=Ze,Zie=Jie("Array").indexOf,Qie=Re,ene=Zie,od=Array.prototype,tne=function(i){var r=i.indexOf;return i===od||Qie(od,i)&&r===od.indexOf?ene:r},rne=tne,ine=rne,nne=ine,ie=V(nne),ane=q,one=Ye,sne=xa;ane({target:"Object",stat:!0,sham:!one},{create:sne});var une=ae,lne=une.Object,hne=function(r,e){return lne.create(r,e)},cne=hne,wO=cne,dne=wO,zi=V(dne),_f=ae,fne=Ko;_f.JSON||(_f.JSON={stringify:JSON.stringify});var vne=function(r,e,t){return fne(_f.JSON.stringify,null,arguments)},pne=vne,gne=pne,yne=gne,ls=V(yne),mne=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",bne=TypeError,$ne=function(i,r){if(ie,o=_ne(t)?t:Ine(t),s=a?One(arguments,e):[],u=a?function(){wne(o,this,s)}:o;return r?i(u,n):i(u)}:i},Pne=q,SO=Ie,xne=EO,p1=xne(SO.setInterval,!0);Pne({global:!0,bind:!0,forced:SO.setInterval!==p1},{setInterval:p1});var Cne=q,OO=Ie,Ane=EO,g1=Ane(OO.setTimeout,!0);Cne({global:!0,bind:!0,forced:OO.setTimeout!==g1},{setTimeout:g1});var Dne=ae,Rne=Dne.setTimeout,Nne=Rne,yr=V(Nne),Mne=Ct,y1=es,Bne=Zt,Fne=function(r){for(var e=Mne(this),t=Bne(e),n=arguments.length,a=y1(n>1?arguments[1]:void 0,t),o=n>2?arguments[2]:void 0,s=o===void 0?t:y1(o,t);s>a;)e[a++]=r;return e},jne=q,Lne=Fne;jne({target:"Array",proto:!0},{fill:Lne});var zne=Ze,Hne=zne("Array").fill,Vne=Re,Wne=Hne,sd=Array.prototype,Une=function(i){var r=i.fill;return i===sd||Vne(sd,i)&&r===sd.fill?Wne:r},Kne=Une,Gne=Kne,qne=Gne,hs=V(qne);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
+ */var mc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function V(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Hs=function(i){return i&&i.Math===Math&&i},Pe=Hs(typeof globalThis=="object"&&globalThis)||Hs(typeof window=="object"&&window)||Hs(typeof self=="object"&&self)||Hs(typeof mc=="object"&&mc)||function(){return this}()||mc||Function("return this")(),ne=function(i){try{return!!i()}catch{return!0}},yW=ne,Uo=!yW(function(){var i=function(){}.bind();return typeof i!="function"||i.hasOwnProperty("prototype")}),mW=Uo,kE=Function.prototype,Im=kE.apply,km=kE.call,Ko=typeof Reflect=="object"&&Reflect.apply||(mW?km.bind(Im):function(){return km.apply(Im,arguments)}),PE=Uo,xE=Function.prototype,nf=xE.call,bW=PE&&xE.bind.bind(nf,nf),oe=PE?bW:function(i){return function(){return nf.apply(i,arguments)}},CE=oe,$W=CE({}.toString),wW=CE("".slice),Hr=function(i){return wW($W(i),8,-1)},_W=Hr,EW=oe,Iv=function(i){if(_W(i)==="Function")return EW(i)},af=typeof document=="object"&&document.all,SW=typeof af>"u"&&af!==void 0,AE={all:af,IS_HTMLDDA:SW},DE=AE,OW=DE.all,Ye=DE.IS_HTMLDDA?function(i){return typeof i=="function"||i===OW}:function(i){return typeof i=="function"},Sa={},TW=ne,Xe=!TW(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),IW=Uo,Vs=Function.prototype.call,zt=IW?Vs.bind(Vs):function(){return Vs.apply(Vs,arguments)},Cl={},RE={}.propertyIsEnumerable,NE=Object.getOwnPropertyDescriptor,kW=NE&&!RE.call({1:2},1);Cl.f=kW?function(r){var e=NE(this,r);return!!e&&e.enumerable}:RE;var Go=function(i,r){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:r}},PW=oe,xW=ne,CW=Hr,bc=Object,AW=PW("".split),Al=xW(function(){return!bc("z").propertyIsEnumerable(0)})?function(i){return CW(i)==="String"?AW(i,""):bc(i)}:bc,Oa=function(i){return i==null},DW=Oa,RW=TypeError,qo=function(i){if(DW(i))throw new RW("Can't call method on "+i);return i},NW=Al,MW=qo,wr=function(i){return NW(MW(i))},Pm=Ye,ME=AE,BW=ME.all,Je=ME.IS_HTMLDDA?function(i){return typeof i=="object"?i!==null:Pm(i)||i===BW}:function(i){return typeof i=="object"?i!==null:Pm(i)},ae={},$c=ae,wc=Pe,FW=Ye,xm=function(i){return FW(i)?i:void 0},Jt=function(i,r){return arguments.length<2?xm($c[i])||xm(wc[i]):$c[i]&&$c[i][r]||wc[i]&&wc[i][r]},jW=oe,Me=jW({}.isPrototypeOf),Yo=typeof navigator<"u"&&String(navigator.userAgent)||"",BE=Pe,_c=Yo,Cm=BE.process,Am=BE.Deno,Dm=Cm&&Cm.versions||Am&&Am.version,Rm=Dm&&Dm.v8,ir,zu;Rm&&(ir=Rm.split("."),zu=ir[0]>0&&ir[0]<4?1:+(ir[0]+ir[1]));!zu&&_c&&(ir=_c.match(/Edge\/(\d+)/),(!ir||ir[1]>=74)&&(ir=_c.match(/Chrome\/(\d+)/),ir&&(zu=+ir[1])));var Xo=zu,Nm=Xo,LW=ne,zW=Pe,HW=zW.String,Ta=!!Object.getOwnPropertySymbols&&!LW(function(){var i=Symbol("symbol detection");return!HW(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&Nm&&Nm<41}),VW=Ta,FE=VW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",WW=Jt,UW=Ye,KW=Me,GW=FE,qW=Object,Jo=GW?function(i){return typeof i=="symbol"}:function(i){var r=WW("Symbol");return UW(r)&&KW(r.prototype,qW(i))},YW=String,Ia=function(i){try{return YW(i)}catch{return"Object"}},XW=Ye,JW=Ia,ZW=TypeError,sn=function(i){if(XW(i))return i;throw new ZW(JW(i)+" is not a function")},QW=sn,e9=Oa,kv=function(i,r){var e=i[r];return e9(e)?void 0:QW(e)},Ec=zt,Sc=Ye,Oc=Je,t9=TypeError,r9=function(i,r){var e,t;if(r==="string"&&Sc(e=i.toString)&&!Oc(t=Ec(e,i))||Sc(e=i.valueOf)&&!Oc(t=Ec(e,i))||r!=="string"&&Sc(e=i.toString)&&!Oc(t=Ec(e,i)))return t;throw new t9("Can't convert object to primitive value")},jE={exports:{}},Mm=Pe,i9=Object.defineProperty,n9=function(i,r){try{i9(Mm,i,{value:r,configurable:!0,writable:!0})}catch{Mm[i]=r}return r},a9=Pe,o9=n9,Bm="__core-js_shared__",s9=a9[Bm]||o9(Bm,{}),Pv=s9,Fm=Pv;(jE.exports=function(i,r){return Fm[i]||(Fm[i]=r!==void 0?r:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var ka=jE.exports,u9=qo,l9=Object,Ct=function(i){return l9(u9(i))},h9=oe,c9=Ct,d9=h9({}.hasOwnProperty),Ze=Object.hasOwn||function(r,e){return d9(c9(r),e)},f9=oe,v9=0,p9=Math.random(),g9=f9(1 .toString),Dl=function(i){return"Symbol("+(i===void 0?"":i)+")_"+g9(++v9+p9,36)},y9=Pe,m9=ka,jm=Ze,b9=Dl,$9=Ta,w9=FE,Ln=y9.Symbol,Tc=m9("wks"),_9=w9?Ln.for||Ln:Ln&&Ln.withoutSetter||b9,xe=function(i){return jm(Tc,i)||(Tc[i]=$9&&jm(Ln,i)?Ln[i]:_9("Symbol."+i)),Tc[i]},E9=zt,Lm=Je,zm=Jo,S9=kv,O9=r9,T9=xe,I9=TypeError,k9=T9("toPrimitive"),P9=function(i,r){if(!Lm(i)||zm(i))return i;var e=S9(i,k9),t;if(e){if(r===void 0&&(r="default"),t=E9(e,i,r),!Lm(t)||zm(t))return t;throw new I9("Can't convert object to primitive value")}return r===void 0&&(r="number"),O9(i,r)},x9=P9,C9=Jo,Rl=function(i){var r=x9(i,"string");return C9(r)?r:r+""},A9=Pe,Hm=Je,of=A9.document,D9=Hm(of)&&Hm(of.createElement),LE=function(i){return D9?of.createElement(i):{}},R9=Xe,N9=ne,M9=LE,zE=!R9&&!N9(function(){return Object.defineProperty(M9("div"),"a",{get:function(){return 7}}).a!==7}),B9=Xe,F9=zt,j9=Cl,L9=Go,z9=wr,H9=Rl,V9=Ze,W9=zE,Vm=Object.getOwnPropertyDescriptor;Sa.f=B9?Vm:function(r,e){if(r=z9(r),e=H9(e),W9)try{return Vm(r,e)}catch{}if(V9(r,e))return L9(!F9(j9.f,r,e),r[e])};var U9=ne,K9=Ye,G9=/#|\.prototype\./,Zo=function(i,r){var e=Y9[q9(i)];return e===J9?!0:e===X9?!1:K9(r)?U9(r):!!r},q9=Zo.normalize=function(i){return String(i).replace(G9,".").toLowerCase()},Y9=Zo.data={},X9=Zo.NATIVE="N",J9=Zo.POLYFILL="P",Z9=Zo,Wm=Iv,Q9=sn,eU=Uo,tU=Wm(Wm.bind),Qo=function(i,r){return Q9(i),r===void 0?i:eU?tU(i,r):function(){return i.apply(r,arguments)}},Ht={},rU=Xe,iU=ne,HE=rU&&iU(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),nU=Je,aU=String,oU=TypeError,Vt=function(i){if(nU(i))return i;throw new oU(aU(i)+" is not an object")},sU=Xe,uU=zE,lU=HE,Ws=Vt,Um=Rl,hU=TypeError,Ic=Object.defineProperty,cU=Object.getOwnPropertyDescriptor,kc="enumerable",Pc="configurable",xc="writable";Ht.f=sU?lU?function(r,e,t){if(Ws(r),e=Um(e),Ws(t),typeof r=="function"&&e==="prototype"&&"value"in t&&xc in t&&!t[xc]){var n=cU(r,e);n&&n[xc]&&(r[e]=t.value,t={configurable:Pc in t?t[Pc]:n[Pc],enumerable:kc in t?t[kc]:n[kc],writable:!1})}return Ic(r,e,t)}:Ic:function(r,e,t){if(Ws(r),e=Um(e),Ws(t),uU)try{return Ic(r,e,t)}catch{}if("get"in t||"set"in t)throw new hU("Accessors not supported");return"value"in t&&(r[e]=t.value),r};var dU=Xe,fU=Ht,vU=Go,Pa=dU?function(i,r,e){return fU.f(i,r,vU(1,e))}:function(i,r,e){return i[r]=e,i},Us=Pe,pU=Ko,gU=Iv,yU=Ye,mU=Sa.f,bU=Z9,Sn=ae,$U=Qo,On=Pa,Km=Ze,wU=function(i){var r=function(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new i;case 1:return new i(e);case 2:return new i(e,t)}return new i(e,t,n)}return pU(i,this,arguments)};return r.prototype=i.prototype,r},q=function(i,r){var e=i.target,t=i.global,n=i.stat,a=i.proto,o=t?Us:n?Us[e]:(Us[e]||{}).prototype,s=t?Sn:Sn[e]||On(Sn,e,{})[e],u=s.prototype,l,h,d,c,f,v,p,g,y;for(c in r)l=bU(t?c:e+(n?".":"#")+c,i.forced),h=!l&&o&&Km(o,c),v=s[c],h&&(i.dontCallGetSet?(y=mU(o,c),p=y&&y.value):p=o[c]),f=h&&p?p:r[c],!(h&&typeof v==typeof f)&&(i.bind&&h?g=$U(f,Us):i.wrap&&h?g=wU(f):a&&yU(f)?g=gU(f):g=f,(i.sham||f&&f.sham||v&&v.sham)&&On(g,"sham",!0),On(s,c,g),a&&(d=e+"Prototype",Km(Sn,d)||On(Sn,d,{}),On(Sn[d],c,f),i.real&&u&&(l||!u[c])&&On(u,c,f)))},_U=Math.ceil,EU=Math.floor,SU=Math.trunc||function(r){var e=+r;return(e>0?EU:_U)(e)},OU=SU,Nl=function(i){var r=+i;return r!==r||r===0?0:OU(r)},TU=Nl,IU=Math.max,kU=Math.min,es=function(i,r){var e=TU(i);return e<0?IU(e+r,0):kU(e,r)},PU=Nl,xU=Math.min,CU=function(i){return i>0?xU(PU(i),9007199254740991):0},AU=CU,Zt=function(i){return AU(i.length)},DU=wr,RU=es,NU=Zt,Gm=function(i){return function(r,e,t){var n=DU(r),a=NU(n),o=RU(t,a),s;if(i&&e!==e){for(;a>o;)if(s=n[o++],s!==s)return!0}else for(;a>o;o++)if((i||o in n)&&n[o]===e)return i||o||0;return!i&&-1}},xv={includes:Gm(!0),indexOf:Gm(!1)},ts={},MU=oe,Cc=Ze,BU=wr,FU=xv.indexOf,jU=ts,qm=MU([].push),VE=function(i,r){var e=BU(i),t=0,n=[],a;for(a in e)!Cc(jU,a)&&Cc(e,a)&&qm(n,a);for(;r.length>t;)Cc(e,a=r[t++])&&(~FU(n,a)||qm(n,a));return n},Cv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],LU=VE,zU=Cv,Ml=Object.keys||function(r){return LU(r,zU)},rs={};rs.f=Object.getOwnPropertySymbols;var Ym=Xe,HU=oe,VU=zt,WU=ne,Ac=Ml,UU=rs,KU=Cl,GU=Ct,qU=Al,Tn=Object.assign,Xm=Object.defineProperty,YU=HU([].concat),XU=!Tn||WU(function(){if(Ym&&Tn({b:1},Tn(Xm({},"a",{enumerable:!0,get:function(){Xm(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var i={},r={},e=Symbol("assign detection"),t="abcdefghijklmnopqrst";return i[e]=7,t.split("").forEach(function(n){r[n]=n}),Tn({},i)[e]!==7||Ac(Tn({},r)).join("")!==t})?function(r,e){for(var t=GU(r),n=arguments.length,a=1,o=UU.f,s=KU.f;n>a;)for(var u=qU(arguments[a++]),l=o?YU(Ac(u),o(u)):Ac(u),h=l.length,d=0,c;h>d;)c=l[d++],(!Ym||VU(s,u,c))&&(t[c]=u[c]);return t}:Tn,JU=q,Jm=XU;JU({target:"Object",stat:!0,arity:2,forced:Object.assign!==Jm},{assign:Jm});var ZU=ae,QU=ZU.Object.assign,eK=QU,tK=eK,rK=tK,je=V(rK),iK=oe,Bl=iK([].slice),WE=oe,nK=sn,aK=Je,oK=Ze,Zm=Bl,sK=Uo,UE=Function,uK=WE([].concat),lK=WE([].join),Dc={},hK=function(i,r,e){if(!oK(Dc,r)){for(var t=[],n=0;n=.1;)v=+a[d++%o],v>h&&(v=h),f=Math.sqrt(v*v/(1+l*l)),f=s<0?-f:f,r+=f,e+=l*f,c===!0?i.lineTo(r,e):i.moveTo(r,e),h-=v,c=!c}function OK(i,r,e,t){i.beginPath();var n=6,a=Math.PI*2/n;i.moveTo(r+t,e);for(var o=1;o1?e-1:0),n=1;n=a?i?"":void 0:(o=tb(t,n),o<55296||o>56319||n+1===a||(s=tb(t,n+1))<56320||s>57343?i?HK(t,n):o:i?VK(t,n,n+2):(o-55296<<10)+(s-56320)+65536)}},WK={codeAt:rb(!1),charAt:rb(!0)},UK=Pe,KK=Ye,ib=UK.WeakMap,eS=KK(ib)&&/native code/.test(String(ib)),GK=ka,qK=Dl,nb=GK("keys"),Fl=function(i){return nb[i]||(nb[i]=qK(i))},YK=eS,tS=Pe,XK=Je,JK=Pa,Nc=Ze,Mc=Pv,ZK=Fl,QK=ts,ab="Object already initialized",uf=tS.TypeError,eG=tS.WeakMap,Hu,yo,Vu,tG=function(i){return Vu(i)?yo(i):Hu(i,{})},rG=function(i){return function(r){var e;if(!XK(r)||(e=yo(r)).type!==i)throw new uf("Incompatible receiver, "+i+" required");return e}};if(YK||Mc.state){var cr=Mc.state||(Mc.state=new eG);cr.get=cr.get,cr.has=cr.has,cr.set=cr.set,Hu=function(i,r){if(cr.has(i))throw new uf(ab);return r.facade=i,cr.set(i,r),r},yo=function(i){return cr.get(i)||{}},Vu=function(i){return cr.has(i)}}else{var In=ZK("state");QK[In]=!0,Hu=function(i,r){if(Nc(i,In))throw new uf(ab);return r.facade=i,JK(i,In,r),r},yo=function(i){return Nc(i,In)?i[In]:{}},Vu=function(i){return Nc(i,In)}}var ln={set:Hu,get:yo,has:Vu,enforce:tG,getterFor:rG},lf=Xe,iG=Ze,rS=Function.prototype,nG=lf&&Object.getOwnPropertyDescriptor,Nv=iG(rS,"name"),aG=Nv&&function(){}.name==="something",oG=Nv&&(!lf||lf&&nG(rS,"name").configurable),sG={EXISTS:Nv,PROPER:aG,CONFIGURABLE:oG},jl={},uG=Xe,lG=HE,hG=Ht,cG=Vt,dG=wr,fG=Ml;jl.f=uG&&!lG?Object.defineProperties:function(r,e){cG(r);for(var t=dG(e),n=fG(e),a=n.length,o=0,s;a>o;)hG.f(r,s=n[o++],t[s]);return r};var vG=Jt,pG=vG("document","documentElement"),gG=Vt,yG=jl,ob=Cv,mG=ts,bG=pG,$G=LE,wG=Fl,sb=">",ub="<",hf="prototype",cf="script",iS=wG("IE_PROTO"),Bc=function(){},nS=function(i){return ub+cf+sb+i+ub+"/"+cf+sb},lb=function(i){i.write(nS("")),i.close();var r=i.parentWindow.Object;return i=null,r},_G=function(){var i=$G("iframe"),r="java"+cf+":",e;return i.style.display="none",bG.appendChild(i),i.src=String(r),e=i.contentWindow.document,e.open(),e.write(nS("document.F=Object")),e.close(),e.F},Ks,yu=function(){try{Ks=new ActiveXObject("htmlfile")}catch{}yu=typeof document<"u"?document.domain&&Ks?lb(Ks):_G():lb(Ks);for(var i=ob.length;i--;)delete yu[hf][ob[i]];return yu()};mG[iS]=!0;var xa=Object.create||function(r,e){var t;return r!==null?(Bc[hf]=gG(r),t=new Bc,Bc[hf]=null,t[iS]=r):t=yu(),e===void 0?t:yG.f(t,e)},EG=ne,aS=!EG(function(){function i(){}return i.prototype.constructor=null,Object.getPrototypeOf(new i)!==i.prototype}),SG=Ze,OG=Ye,TG=Ct,IG=Fl,kG=aS,hb=IG("IE_PROTO"),df=Object,PG=df.prototype,Ll=kG?df.getPrototypeOf:function(i){var r=TG(i);if(SG(r,hb))return r[hb];var e=r.constructor;return OG(e)&&r instanceof e?e.prototype:r instanceof df?PG:null},xG=Pa,is=function(i,r,e,t){return t&&t.enumerable?i[r]=e:xG(i,r,e),i},CG=ne,AG=Ye,DG=Je,RG=xa,cb=Ll,NG=is,MG=xe,ff=MG("iterator"),oS=!1,Cr,Fc,jc;[].keys&&(jc=[].keys(),"next"in jc?(Fc=cb(cb(jc)),Fc!==Object.prototype&&(Cr=Fc)):oS=!0);var BG=!DG(Cr)||CG(function(){var i={};return Cr[ff].call(i)!==i});BG?Cr={}:Cr=RG(Cr);AG(Cr[ff])||NG(Cr,ff,function(){return this});var sS={IteratorPrototype:Cr,BUGGY_SAFARI_ITERATORS:oS},FG=Dv,jG=un,LG=FG?{}.toString:function(){return"[object "+jG(this)+"]"},zG=Dv,HG=Ht.f,VG=Pa,WG=Ze,UG=LG,KG=xe,db=KG("toStringTag"),Ca=function(i,r,e,t){if(i){var n=e?i:i.prototype;WG(n,db)||HG(n,db,{configurable:!0,value:r}),t&&!zG&&VG(n,"toString",UG)}},Aa={},GG=sS.IteratorPrototype,qG=xa,YG=Go,XG=Ca,JG=Aa,ZG=function(){return this},QG=function(i,r,e,t){var n=r+" Iterator";return i.prototype=qG(GG,{next:YG(+!t,e)}),XG(i,n,!1,!0),JG[n]=ZG,i},eq=oe,tq=sn,rq=function(i,r,e){try{return eq(tq(Object.getOwnPropertyDescriptor(i,r)[e]))}catch{}},iq=Ye,nq=String,aq=TypeError,oq=function(i){if(typeof i=="object"||iq(i))return i;throw new aq("Can't set "+nq(i)+" as a prototype")},sq=rq,uq=Vt,lq=oq,hq=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,r={},e;try{e=sq(Object.prototype,"__proto__","set"),e(r,[]),i=r instanceof Array}catch{}return function(n,a){return uq(n),lq(a),i?e(n,a):n.__proto__=a,n}}():void 0),cq=q,dq=zt,fq=sG,vq=QG,pq=Ll,gq=Ca,fb=is,yq=xe,vb=Aa,mq=sS,bq=fq.PROPER,Gs=mq.BUGGY_SAFARI_ITERATORS,Lc=yq("iterator"),pb="keys",qs="values",gb="entries",$q=function(){return this},Mv=function(i,r,e,t,n,a,o){vq(e,r,t);var s=function(y){if(y===n&&c)return c;if(!Gs&&y&&y in h)return h[y];switch(y){case pb:return function(){return new e(this,y)};case qs:return function(){return new e(this,y)};case gb:return function(){return new e(this,y)}}return function(){return new e(this)}},u=r+" Iterator",l=!1,h=i.prototype,d=h[Lc]||h["@@iterator"]||n&&h[n],c=!Gs&&d||s(n),f=r==="Array"&&h.entries||d,v,p,g;if(f&&(v=pq(f.call(new i)),v!==Object.prototype&&v.next&&(gq(v,u,!0,!0),vb[u]=$q)),bq&&n===qs&&d&&d.name!==qs&&(l=!0,c=function(){return dq(d,this)}),n)if(p={values:s(qs),keys:a?c:s(pb),entries:s(gb)},o)for(g in p)(Gs||l||!(g in h))&&fb(h,g,p[g]);else cq({target:r,proto:!0,forced:Gs||l},p);return o&&h[Lc]!==c&&fb(h,Lc,c,{name:n}),vb[r]=c,p},Bv=function(i,r){return{value:i,done:r}},wq=WK.charAt,_q=_r,uS=ln,Eq=Mv,yb=Bv,lS="String Iterator",Sq=uS.set,Oq=uS.getterFor(lS);Eq(String,"String",function(i){Sq(this,{type:lS,string:_q(i),index:0})},function(){var r=Oq(this),e=r.string,t=r.index,n;return t>=e.length?yb(void 0,!0):(n=wq(e,t),r.index+=n.length,yb(n,!1))});var Tq=zt,mb=Vt,Iq=kv,hS=function(i,r,e){var t,n;mb(i);try{if(t=Iq(i,"return"),!t){if(r==="throw")throw e;return e}t=Tq(t,i)}catch(a){n=!0,t=a}if(r==="throw")throw e;if(n)throw t;return mb(t),e},kq=Vt,Pq=hS,xq=function(i,r,e,t){try{return t?r(kq(e)[0],e[1]):r(e)}catch(n){Pq(i,"throw",n)}},Cq=xe,Aq=Aa,Dq=Cq("iterator"),Rq=Array.prototype,cS=function(i){return i!==void 0&&(Aq.Array===i||Rq[Dq]===i)},Nq=oe,Mq=Ye,vf=Pv,Bq=Nq(Function.toString);Mq(vf.inspectSource)||(vf.inspectSource=function(i){return Bq(i)});var Fq=vf.inspectSource,jq=oe,Lq=ne,dS=Ye,zq=un,Hq=Jt,Vq=Fq,fS=function(){},Wq=[],vS=Hq("Reflect","construct"),Fv=/^\s*(?:class|function)\b/,Uq=jq(Fv.exec),Kq=!Fv.test(fS),La=function(r){if(!dS(r))return!1;try{return vS(fS,Wq,r),!0}catch{return!1}},pS=function(r){if(!dS(r))return!1;switch(zq(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Kq||!!Uq(Fv,Vq(r))}catch{return!0}};pS.sham=!0;var zl=!vS||Lq(function(){var i;return La(La.call)||!La(Object)||!La(function(){i=!0})||i})?pS:La,Gq=Rl,qq=Ht,Yq=Go,Da=function(i,r,e){var t=Gq(r);t in i?qq.f(i,t,Yq(0,e)):i[t]=e},Xq=un,bb=kv,Jq=Oa,Zq=Aa,Qq=xe,eY=Qq("iterator"),Hl=function(i){if(!Jq(i))return bb(i,eY)||bb(i,"@@iterator")||Zq[Xq(i)]},tY=zt,rY=sn,iY=Vt,nY=Ia,aY=Hl,oY=TypeError,gS=function(i,r){var e=arguments.length<2?aY(i):r;if(rY(e))return iY(tY(e,i));throw new oY(nY(i)+" is not iterable")},sY=Qo,uY=zt,lY=Ct,hY=xq,cY=cS,dY=zl,fY=Zt,$b=Da,vY=gS,pY=Hl,wb=Array,gY=function(r){var e=lY(r),t=dY(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=sY(a,n>2?arguments[2]:void 0));var s=pY(e),u=0,l,h,d,c,f,v;if(s&&!(this===wb&&cY(s)))for(c=vY(e,s),f=c.next,h=t?new this:[];!(d=uY(f,c)).done;u++)v=o?hY(c,a,[d.value,u],!0):d.value,$b(h,u,v);else for(l=fY(e),h=t?new this(l):wb(l);l>u;u++)v=o?a(e[u],u):e[u],$b(h,u,v);return h.length=u,h},yY=xe,yS=yY("iterator"),mS=!1;try{var mY=0,_b={next:function(){return{done:!!mY++}},return:function(){mS=!0}};_b[yS]=function(){return this},Array.from(_b,function(){throw 2})}catch{}var bY=function(i,r){try{if(!r&&!mS)return!1}catch{return!1}var e=!1;try{var t={};t[yS]=function(){return{next:function(){return{done:e=!0}}}},i(t)}catch{}return e},$Y=q,wY=gY,_Y=bY,EY=!_Y(function(i){Array.from(i)});$Y({target:"Array",stat:!0,forced:EY},{from:wY});var SY=ae,OY=SY.Array.from,TY=OY,bS=TY,IY=bS,hn=V(IY),kY=wr,Eb=Aa,$S=ln;Ht.f;var PY=Mv,Ys=Bv,wS="Array Iterator",xY=$S.set,CY=$S.getterFor(wS);PY(Array,"Array",function(i,r){xY(this,{type:wS,target:kY(i),index:0,kind:r})},function(){var i=CY(this),r=i.target,e=i.kind,t=i.index++;if(!r||t>=r.length)return i.target=void 0,Ys(void 0,!0);switch(e){case"keys":return Ys(t,!1);case"values":return Ys(r[t],!1)}return Ys([t,r[t]],!1)},"values");Eb.Arguments=Eb.Array;var AY=Hl,DY=AY,RY={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},NY=RY,MY=Pe,BY=un,FY=Pa,Sb=Aa,jY=xe,Ob=jY("toStringTag");for(var zc in NY){var Tb=MY[zc],Hc=Tb&&Tb.prototype;Hc&&BY(Hc)!==Ob&&FY(Hc,Ob,zc),Sb[zc]=Sb.Array}var LY=DY,zY=LY,HY=zY,VY=HY,WY=VY,UY=WY,_S=UY,ES=V(_S),KY=_S,cn=V(KY);function N(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")}var SS={exports:{}},GY=q,qY=Xe,Ib=Ht.f;GY({target:"Object",stat:!0,forced:Object.defineProperty!==Ib,sham:!qY},{defineProperty:Ib});var YY=ae,OS=YY.Object,XY=SS.exports=function(r,e,t){return OS.defineProperty(r,e,t)};OS.defineProperty.sham&&(XY.sham=!0);var JY=SS.exports,ZY=JY,TS=ZY,QY=TS,eX=QY,tX=eX,rX=tX,iX=rX,Vl=V(iX),nX=Hr,dn=Array.isArray||function(r){return nX(r)==="Array"},aX=TypeError,oX=9007199254740991,jv=function(i){if(i>oX)throw aX("Maximum allowed index exceeded");return i},kb=dn,sX=zl,uX=Je,lX=xe,hX=lX("species"),Pb=Array,cX=function(i){var r;return kb(i)&&(r=i.constructor,sX(r)&&(r===Pb||kb(r.prototype))?r=void 0:uX(r)&&(r=r[hX],r===null&&(r=void 0))),r===void 0?Pb:r},dX=cX,Lv=function(i,r){return new(dX(i))(r===0?0:r)},fX=ne,vX=xe,pX=Xo,gX=vX("species"),ns=function(i){return pX>=51||!fX(function(){var r=[],e=r.constructor={};return e[gX]=function(){return{foo:1}},r[i](Boolean).foo!==1})},yX=q,mX=ne,bX=dn,$X=Je,wX=Ct,_X=Zt,xb=jv,Cb=Da,EX=Lv,SX=ns,OX=xe,TX=Xo,IS=OX("isConcatSpreadable"),IX=TX>=51||!mX(function(){var i=[];return i[IS]=!1,i.concat()[0]!==i}),kX=function(i){if(!$X(i))return!1;var r=i[IS];return r!==void 0?!!r:bX(i)},PX=!IX||!SX("concat");yX({target:"Array",proto:!0,arity:1,forced:PX},{concat:function(r){var e=wX(this),t=EX(e,0),n=0,a,o,s,u,l;for(a=-1,s=arguments.length;ag;g++)if((s||g in f)&&(b=f[g],$=v(b,g,c),i))if(r)m[g]=$;else if($)switch(i){case 3:return!0;case 5:return b;case 6:return g;case 2:Rb(m,b)}else switch(i){case 4:return!1;case 7:Rb(m,b)}return a?-1:t||n?n:m}},mi={forEach:Ur(0),map:Ur(1),filter:Ur(2),some:Ur(3),every:Ur(4),find:Ur(5),findIndex:Ur(6),filterReject:Ur(7)},Ul=q,Kl=Pe,Hv=zt,rJ=oe,ra=Xe,ia=Ta,iJ=ne,Ke=Ze,nJ=Me,pf=Vt,Gl=wr,Vv=Rl,aJ=_r,gf=Go,mo=xa,AS=Ml,oJ=as,DS=Wl,sJ=rs,RS=Sa,NS=Ht,uJ=jl,MS=Cl,Nb=is,lJ=zv,Wv=ka,hJ=Fl,BS=ts,Mb=Dl,cJ=xe,dJ=os,fJ=Ce,vJ=CS,pJ=Ca,FS=ln,ql=mi.forEach,St=hJ("hidden"),Yl="Symbol",bo="prototype",gJ=FS.set,Bb=FS.getterFor(Yl),or=Object[bo],Fi=Kl.Symbol,Ga=Fi&&Fi[bo],yJ=Kl.RangeError,mJ=Kl.TypeError,Vc=Kl.QObject,jS=RS.f,ji=NS.f,LS=DS.f,bJ=MS.f,zS=rJ([].push),Fr=Wv("symbols"),ss=Wv("op-symbols"),$J=Wv("wks"),yf=!Vc||!Vc[bo]||!Vc[bo].findChild,HS=function(i,r,e){var t=jS(or,r);t&&delete or[r],ji(i,r,e),t&&i!==or&&ji(or,r,t)},mf=ra&&iJ(function(){return mo(ji({},"a",{get:function(){return ji(this,"a",{value:7}).a}})).a!==7})?HS:ji,Wc=function(i,r){var e=Fr[i]=mo(Ga);return gJ(e,{type:Yl,tag:i,description:r}),ra||(e.description=r),e},Xl=function(r,e,t){r===or&&Xl(ss,e,t),pf(r);var n=Vv(e);return pf(t),Ke(Fr,n)?(t.enumerable?(Ke(r,St)&&r[St][n]&&(r[St][n]=!1),t=mo(t,{enumerable:gf(0,!1)})):(Ke(r,St)||ji(r,St,gf(1,{})),r[St][n]=!0),mf(r,n,t)):ji(r,n,t)},Uv=function(r,e){pf(r);var t=Gl(e),n=AS(t).concat(KS(t));return ql(n,function(a){(!ra||Hv(VS,t,a))&&Xl(r,a,t[a])}),r},wJ=function(r,e){return e===void 0?mo(r):Uv(mo(r),e)},VS=function(r){var e=Vv(r),t=Hv(bJ,this,e);return this===or&&Ke(Fr,e)&&!Ke(ss,e)?!1:t||!Ke(this,e)||!Ke(Fr,e)||Ke(this,St)&&this[St][e]?t:!0},WS=function(r,e){var t=Gl(r),n=Vv(e);if(!(t===or&&Ke(Fr,n)&&!Ke(ss,n))){var a=jS(t,n);return a&&Ke(Fr,n)&&!(Ke(t,St)&&t[St][n])&&(a.enumerable=!0),a}},US=function(r){var e=LS(Gl(r)),t=[];return ql(e,function(n){!Ke(Fr,n)&&!Ke(BS,n)&&zS(t,n)}),t},KS=function(i){var r=i===or,e=LS(r?ss:Gl(i)),t=[];return ql(e,function(n){Ke(Fr,n)&&(!r||Ke(or,n))&&zS(t,Fr[n])}),t};ia||(Fi=function(){if(nJ(Ga,this))throw new mJ("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:aJ(arguments[0]),e=Mb(r),t=function(n){this===or&&Hv(t,ss,n),Ke(this,St)&&Ke(this[St],e)&&(this[St][e]=!1);var a=gf(1,n);try{mf(this,e,a)}catch(o){if(!(o instanceof yJ))throw o;HS(this,e,a)}};return ra&&yf&&mf(or,e,{configurable:!0,set:t}),Wc(e,r)},Ga=Fi[bo],Nb(Ga,"toString",function(){return Bb(this).tag}),Nb(Fi,"withoutSetter",function(i){return Wc(Mb(i),i)}),MS.f=VS,NS.f=Xl,uJ.f=Uv,RS.f=WS,oJ.f=DS.f=US,sJ.f=KS,dJ.f=function(i){return Wc(cJ(i),i)},ra&&lJ(Ga,"description",{configurable:!0,get:function(){return Bb(this).description}}));Ul({global:!0,constructor:!0,wrap:!0,forced:!ia,sham:!ia},{Symbol:Fi});ql(AS($J),function(i){fJ(i)});Ul({target:Yl,stat:!0,forced:!ia},{useSetter:function(){yf=!0},useSimple:function(){yf=!1}});Ul({target:"Object",stat:!0,forced:!ia,sham:!ra},{create:wJ,defineProperty:Xl,defineProperties:Uv,getOwnPropertyDescriptor:WS});Ul({target:"Object",stat:!0,forced:!ia},{getOwnPropertyNames:US});vJ();pJ(Fi,Yl);BS[St]=!0;var _J=Ta,GS=_J&&!!Symbol.for&&!!Symbol.keyFor,EJ=q,SJ=Jt,OJ=Ze,TJ=_r,qS=ka,IJ=GS,Uc=qS("string-to-symbol-registry"),kJ=qS("symbol-to-string-registry");EJ({target:"Symbol",stat:!0,forced:!IJ},{for:function(i){var r=TJ(i);if(OJ(Uc,r))return Uc[r];var e=SJ("Symbol")(r);return Uc[r]=e,kJ[e]=r,e}});var PJ=q,xJ=Ze,CJ=Jo,AJ=Ia,DJ=ka,RJ=GS,Fb=DJ("symbol-to-string-registry");PJ({target:"Symbol",stat:!0,forced:!RJ},{keyFor:function(r){if(!CJ(r))throw new TypeError(AJ(r)+" is not a symbol");if(xJ(Fb,r))return Fb[r]}});var NJ=oe,jb=dn,MJ=Ye,Lb=Hr,BJ=_r,zb=NJ([].push),FJ=function(i){if(MJ(i))return i;if(jb(i)){for(var r=i.length,e=[],t=0;ti.length)&&(r=i.length);for(var e=0,t=new Array(r);e1?arguments[1]:void 0)}});var ute=Qe,lte=ute("Array").map,hte=Me,cte=lte,Jc=Array.prototype,dte=function(i){var r=i.map;return i===Jc||hte(Jc,i)&&r===Jc.map?cte:r},fte=dte,vte=fte,pte=vte,na=V(pte),gte=q,yte=Ct,dO=Ml,mte=ne,bte=mte(function(){dO(1)});gte({target:"Object",stat:!0,forced:bte},{keys:function(r){return dO(yte(r))}});var $te=ae,wte=$te.Object.keys,_te=wte,Ete=_te,Ste=Ete,Oe=V(Ste),Ote=q,Tte=oe,fO=Date,Ite=Tte(fO.prototype.getTime);Ote({target:"Date",stat:!0},{now:function(){return Ite(new fO)}});var kte=ae,Pte=kte.Date.now,xte=Pte,Cte=xte,Ate=Cte,Uu=V(Ate),Dte=ne,Ra=function(i,r){var e=[][i];return!!e&&Dte(function(){e.call(null,r||function(){return 1},1)})},Rte=mi.forEach,Nte=Ra,Mte=Nte("forEach"),Bte=Mte?[].forEach:function(r){return Rte(this,r,arguments.length>1?arguments[1]:void 0)},Fte=q,n1=Bte;Fte({target:"Array",proto:!0,forced:[].forEach!==n1},{forEach:n1});var jte=Qe,Lte=jte("Array").forEach,zte=Lte,Hte=zte,Vte=un,Wte=Ze,Ute=Me,Kte=Hte,Zc=Array.prototype,Gte={DOMTokenList:!0,NodeList:!0},qte=function(i){var r=i.forEach;return i===Zc||Ute(Zc,i)&&r===Zc.forEach||Wte(Gte,Vte(i))?Kte:r},Yte=qte,ve=V(Yte),Xte=q,Jte=oe,Zte=dn,Qte=Jte([].reverse),a1=[1,2];Xte({target:"Array",proto:!0,forced:String(a1)===String(a1.reverse())},{reverse:function(){return Zte(this)&&(this.length=this.length),Qte(this)}});var ere=Qe,tre=ere("Array").reverse,rre=Me,ire=tre,Qc=Array.prototype,nre=function(i){var r=i.reverse;return i===Qc||rre(Qc,i)&&r===Qc.reverse?ire:r},are=nre,ore=are,sre=ore,Li=V(sre),o1=Ia,ure=TypeError,vO=function(i,r){if(!delete i[r])throw new ure("Cannot delete property "+o1(r)+" of "+o1(i))},lre=q,hre=Ct,cre=es,dre=Nl,fre=Zt,vre=uO,pre=jv,gre=Lv,yre=Da,ed=vO,mre=ns,bre=mre("splice"),$re=Math.max,wre=Math.min;lre({target:"Array",proto:!0,forced:!bre},{splice:function(r,e){var t=hre(this),n=fre(t),a=cre(r,n),o=arguments.length,s,u,l,h,d,c;for(o===0?s=u=0:o===1?(s=0,u=n-a):(s=o-2,u=wre($re(dre(e),0),n-a)),pre(n+s-u),l=gre(t,u),h=0;hn-u+s;h--)ed(t,h-1)}else if(s>u)for(h=n-u;h>a;h--)d=h+u-1,c=h+s-1,d in t?t[c]=t[d]:ed(t,c);for(h=0;h1?arguments[1]:void 0)}});var Rre=Qe,Nre=Rre("Array").includes,Mre=Je,Bre=Hr,Fre=xe,jre=Fre("match"),Lre=function(i){var r;return Mre(i)&&((r=i[jre])!==void 0?!!r:Bre(i)==="RegExp")},zre=Lre,Hre=TypeError,Vre=function(i){if(zre(i))throw new Hre("The method doesn't accept regular expressions");return i},Wre=xe,Ure=Wre("match"),Kre=function(i){var r=/./;try{"/./"[i](r)}catch{try{return r[Ure]=!1,"/./"[i](r)}catch{}}return!1},Gre=q,qre=oe,Yre=Vre,Xre=qo,s1=_r,Jre=Kre,Zre=qre("".indexOf);Gre({target:"String",proto:!0,forced:!Jre("includes")},{includes:function(r){return!!~Zre(s1(Xre(this)),s1(Yre(r)),arguments.length>1?arguments[1]:void 0)}});var Qre=Qe,eie=Qre("String").includes,u1=Me,tie=Nre,rie=eie,rd=Array.prototype,id=String.prototype,iie=function(i){var r=i.includes;return i===rd||u1(rd,i)&&r===rd.includes?tie:typeof i=="string"||i===id||u1(id,i)&&r===id.includes?rie:r},nie=iie,aie=nie,oie=aie,si=V(oie),sie=q,uie=ne,lie=Ct,pO=Ll,hie=aS,cie=uie(function(){pO(1)});sie({target:"Object",stat:!0,forced:cie,sham:!hie},{getPrototypeOf:function(r){return pO(lie(r))}});var die=ae,fie=die.Object.getPrototypeOf,vie=fie,gO=vie,pie=gO,l1=V(pie),gie=q,yie=mi.filter,mie=ns,bie=mie("filter");gie({target:"Array",proto:!0,forced:!bie},{filter:function(r){return yie(this,r,arguments.length>1?arguments[1]:void 0)}});var $ie=Qe,wie=$ie("Array").filter,_ie=Me,Eie=wie,nd=Array.prototype,Sie=function(i){var r=i.filter;return i===nd||_ie(nd,i)&&r===nd.filter?Eie:r},Oie=Sie,Tie=Oie,Iie=Tie,Ot=V(Iie),qv=`
+\v\f\r \u2028\u2029\uFEFF`,kie=oe,Pie=qo,xie=_r,$f=qv,h1=kie("".replace),Cie=RegExp("^["+$f+"]+"),Aie=RegExp("(^|[^"+$f+"])["+$f+"]+$"),ad=function(i){return function(r){var e=xie(Pie(r));return i&1&&(e=h1(e,Cie,"")),i&2&&(e=h1(e,Aie,"$1")),e}},yO={start:ad(1),end:ad(2),trim:ad(3)},mO=Pe,Die=ne,Rie=oe,Nie=_r,Mie=yO.trim,c1=qv,eo=mO.parseInt,d1=mO.Symbol,f1=d1&&d1.iterator,bO=/^[+-]?0x/i,Bie=Rie(bO.exec),Fie=eo(c1+"08")!==8||eo(c1+"0x16")!==22||f1&&!Die(function(){eo(Object(f1))}),jie=Fie?function(r,e){var t=Mie(Nie(r));return eo(t,e>>>0||(Bie(bO,t)?16:10))}:eo,Lie=q,v1=jie;Lie({global:!0,forced:parseInt!==v1},{parseInt:v1});var zie=ae,Hie=zie.parseInt,Vie=Hie,Wie=Vie,Uie=Wie,nr=V(Uie),Kie=q,Gie=Iv,qie=xv.indexOf,Yie=Ra,wf=Gie([].indexOf),$O=!!wf&&1/wf([1],1,-0)<0,Xie=$O||!Yie("indexOf");Kie({target:"Array",proto:!0,forced:Xie},{indexOf:function(r){var e=arguments.length>1?arguments[1]:void 0;return $O?wf(this,r,e)||0:qie(this,r,e)}});var Jie=Qe,Zie=Jie("Array").indexOf,Qie=Me,ene=Zie,od=Array.prototype,tne=function(i){var r=i.indexOf;return i===od||Qie(od,i)&&r===od.indexOf?ene:r},rne=tne,ine=rne,nne=ine,ie=V(nne),ane=q,one=Xe,sne=xa;ane({target:"Object",stat:!0,sham:!one},{create:sne});var une=ae,lne=une.Object,hne=function(r,e){return lne.create(r,e)},cne=hne,wO=cne,dne=wO,zi=V(dne),_f=ae,fne=Ko;_f.JSON||(_f.JSON={stringify:JSON.stringify});var vne=function(r,e,t){return fne(_f.JSON.stringify,null,arguments)},pne=vne,gne=pne,yne=gne,ls=V(yne),mne=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",bne=TypeError,$ne=function(i,r){if(ie,o=_ne(t)?t:Ine(t),s=a?One(arguments,e):[],u=a?function(){wne(o,this,s)}:o;return r?i(u,n):i(u)}:i},Pne=q,SO=Pe,xne=EO,p1=xne(SO.setInterval,!0);Pne({global:!0,bind:!0,forced:SO.setInterval!==p1},{setInterval:p1});var Cne=q,OO=Pe,Ane=EO,g1=Ane(OO.setTimeout,!0);Cne({global:!0,bind:!0,forced:OO.setTimeout!==g1},{setTimeout:g1});var Dne=ae,Rne=Dne.setTimeout,Nne=Rne,yr=V(Nne),Mne=Ct,y1=es,Bne=Zt,Fne=function(r){for(var e=Mne(this),t=Bne(e),n=arguments.length,a=y1(n>1?arguments[1]:void 0,t),o=n>2?arguments[2]:void 0,s=o===void 0?t:y1(o,t);s>a;)e[a++]=r;return e},jne=q,Lne=Fne;jne({target:"Array",proto:!0},{fill:Lne});var zne=Qe,Hne=zne("Array").fill,Vne=Me,Wne=Hne,sd=Array.prototype,Une=function(i){var r=i.fill;return i===sd||Vne(sd,i)&&r===sd.fill?Wne:r},Kne=Une,Gne=Kne,qne=Gne,hs=V(qne);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
* http://naver.github.io/egjs
*
* Forked By Naver egjs
* Copyright (c) hammerjs
- * Licensed under the MIT license */function ur(){return ur=Object.assign||function(i){for(var r=1;r"u"?{style:{}}:document.createElement("div"),Xne="function",Hn=Math.round,Xi=Math.abs,Yv=Date.now;function Jl(i,r){for(var e,t,n=r[0].toUpperCase()+r.slice(1),a=0;a"u"?Dr={}:Dr=window;var TO=Jl(Yne.style,"touchAction"),IO=TO!==void 0;function Jne(){if(!IO)return!1;var i={},r=Dr.CSS&&Dr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return i[e]=r?Dr.CSS.supports("touch-action",e):!0}),i}var kO="compute",PO="auto",Sf="manipulation",Hi="none",$o="pan-x",wo="pan-y",Zs=Jne(),Zne=/mobile|tablet|ip(ad|hone|od)|android/i,xO="ontouchstart"in Dr,Qne=Jl(Dr,"PointerEvent")!==void 0,eae=xO&&Zne.test(navigator.userAgent),cs="touch",tae="pen",Xv="mouse",rae="kinect",iae=25,gt=1,fn=2,je=4,It=8,Ku=1,ds=2,fs=4,vs=8,aa=16,mr=ds|fs,Vi=vs|aa,CO=mr|Vi,AO=["x","y"],Gu=["clientX","clientY"];function Rr(i,r,e){var t;if(i)if(i.forEach)i.forEach(r,e);else if(i.length!==void 0)for(t=0;t-1}function nae(i){if(Ai(i,Hi))return Hi;var r=Ai(i,$o),e=Ai(i,wo);return r&&e?Hi:r||e?r?$o:wo:Ai(i,Sf)?Sf:PO}var DO=function(){function i(e,t){this.manager=e,this.set(t)}var r=i.prototype;return r.set=function(t){t===kO&&(t=this.compute()),IO&&this.manager.element.style&&Zs[t]&&(this.manager.element.style[TO]=t),this.actions=t.toLowerCase().trim()},r.update=function(){this.set(this.manager.options.touchAction)},r.compute=function(){var t=[];return Rr(this.manager.recognizers,function(n){Zl(n.options.enable,[n])&&(t=t.concat(n.getTouchAction()))}),nae(t.join(" "))},r.preventDefaults=function(t){var n=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=Ai(o,Hi)&&!Zs[Hi],u=Ai(o,wo)&&!Zs[wo],l=Ai(o,$o)&&!Zs[$o];if(s){var h=t.pointers.length===1,d=t.distance<2,c=t.deltaTime<250;if(h&&d&&c)return}if(!(l&&u)&&(s||u&&a&mr||l&&a&Vi))return this.preventSrc(n)},r.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},i}();function Jv(i,r){for(;i;){if(i===r)return!0;i=i.parentNode}return!1}function RO(i){var r=i.length;if(r===1)return{x:Hn(i[0].clientX),y:Hn(i[0].clientY)};for(var e=0,t=0,n=0;n=Xi(r)?i<0?ds:fs:r<0?vs:aa}function aae(i,r){var e=r.center,t=i.offsetDelta||{},n=i.prevDelta||{},a=i.prevInput||{};(r.eventType===gt||a.eventType===je)&&(n=i.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=i.offsetDelta={x:e.x,y:e.y}),r.deltaX=n.x+(e.x-t.x),r.deltaY=n.y+(e.y-t.y)}function MO(i,r,e){return{x:r/i||0,y:e/i||0}}function oae(i,r){return qu(r[0],r[1],Gu)/qu(i[0],i[1],Gu)}function sae(i,r){return Of(r[1],r[0],Gu)+Of(i[1],i[0],Gu)}function uae(i,r){var e=i.lastInterval||r,t=r.timeStamp-e.timeStamp,n,a,o,s;if(r.eventType!==It&&(t>iae||e.velocity===void 0)){var u=r.deltaX-e.deltaX,l=r.deltaY-e.deltaY,h=MO(t,u,l);a=h.x,o=h.y,n=Xi(h.x)>Xi(h.y)?h.x:h.y,s=NO(u,l),i.lastInterval=r}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;r.velocity=n,r.velocityX=a,r.velocityY=o,r.direction=s}function lae(i,r){var e=i.session,t=r.pointers,n=t.length;e.firstInput||(e.firstInput=b1(r)),n>1&&!e.firstMultiple?e.firstMultiple=b1(r):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=r.center=RO(t);r.timeStamp=Yv(),r.deltaTime=r.timeStamp-a.timeStamp,r.angle=Of(s,u),r.distance=qu(s,u),aae(e,r),r.offsetDirection=NO(r.deltaX,r.deltaY);var l=MO(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=l.x,r.overallVelocityY=l.y,r.overallVelocity=Xi(l.x)>Xi(l.y)?l.x:l.y,r.scale=o?oae(o.pointers,t):1,r.rotation=o?sae(o.pointers,t):0,r.maxPointers=e.prevInput?r.pointers.length>e.prevInput.maxPointers?r.pointers.length:e.prevInput.maxPointers:r.pointers.length,uae(e,r);var h=i.element,d=r.srcEvent,c;d.composedPath?c=d.composedPath()[0]:d.path?c=d.path[0]:c=d.target,Jv(c,h)&&(h=c),r.target=h}function hae(i,r,e){var t=e.pointers.length,n=e.changedPointers.length,a=r>&&t-n===0,o=r&(je|It)&&t-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(i.session={}),e.eventType=r,lae(i,e),i.emit("hammer.input",e),i.recognize(e),i.session.prevInput=e}function _o(i){return i.trim().split(/\s+/g)}function to(i,r,e){Rr(_o(r),function(t){i.addEventListener(t,e,!1)})}function ro(i,r,e){Rr(_o(r),function(t){i.removeEventListener(t,e,!1)})}function $1(i){var r=i.ownerDocument||i;return r.defaultView||r.parentWindow||window}var Na=function(){function i(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){Zl(e.options.enable,[e])&&n.handler(a)},this.init()}var r=i.prototype;return r.handler=function(){},r.init=function(){this.evEl&&to(this.element,this.evEl,this.domHandler),this.evTarget&&to(this.target,this.evTarget,this.domHandler),this.evWin&&to($1(this.element),this.evWin,this.domHandler)},r.destroy=function(){this.evEl&&ro(this.element,this.evEl,this.domHandler),this.evTarget&&ro(this.target,this.evTarget,this.domHandler),this.evWin&&ro($1(this.element),this.evWin,this.domHandler)},i}();function Ji(i,r,e){if(i.indexOf&&!e)return i.indexOf(r);for(var t=0;tu[r]}):t=t.sort()),t}var fae={touchstart:gt,touchmove:fn,touchend:je,touchcancel:It},vae="touchstart touchmove touchend touchcancel",Qv=function(i){Qt(r,i);function r(){var t;return r.prototype.evTarget=vae,t=i.apply(this,arguments)||this,t.targetIds={},t}var e=r.prototype;return e.handler=function(n){var a=fae[n.type],o=pae.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:cs,srcEvent:n})},r}(Na);function pae(i,r){var e=Eo(i.touches),t=this.targetIds;if(r&(gt|fn)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var n,a,o=Eo(i.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return Jv(l.target,u)}),r===gt)for(n=0;n-1&&n.splice(s,1)};setTimeout(a,bae)}}function $ae(i,r){i>?(this.primaryTouch=r.changedPointers[0].identifier,_1.call(this,r)):i&(je|It)&&_1.call(this,r)}function wae(i){for(var r=i.srcEvent.clientX,e=i.srcEvent.clientY,t=0;t-1&&this.requireFail.splice(n,1),this},r.hasRequireFailures=function(){return this.requireFail.length>0},r.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},r.emit=function(t){var n=this,a=this.state;function o(s){n.manager.emit(s,t)}a=ui&&o(n.options.event+E1(a))},r.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=vr},r.canEmit=function(){for(var t=0;ta.threshold&&u&a.direction},e.attrTest=function(n){return sa.prototype.attrTest.call(this,n)&&(this.state&Yt||!(this.state&Yt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=zO(n.direction);a&&(n.additionalEvent=this.options.event+a),i.prototype.emit.call(this,n)},r}(sa),HO=function(i){Qt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,ur({event:"swipe",threshold:10,velocity:.3,direction:mr|Vi,pointers:1},t))||this}var e=r.prototype;return e.getTouchAction=function(){return tp.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(mr|Vi)?o=n.overallVelocity:a&mr?o=n.overallVelocityX:a&Vi&&(o=n.overallVelocityY),i.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Xi(o)>this.options.velocity&&n.eventType&je},e.emit=function(n){var a=zO(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},r}(sa),VO=function(i){Qt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,ur({event:"pinch",threshold:0,pointers:2},t))||this}var e=r.prototype;return e.getTouchAction=function(){return[Hi]},e.attrTest=function(n){return i.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&Yt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}i.prototype.emit.call(this,n)},r}(sa),WO=function(i){Qt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,ur({event:"rotate",threshold:0,pointers:2},t))||this}var e=r.prototype;return e.getTouchAction=function(){return[Hi]},e.attrTest=function(n){return i.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&Yt)},r}(sa),UO=function(i){Qt(r,i);function r(t){var n;return t===void 0&&(t={}),n=i.call(this,ur({event:"press",pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var e=r.prototype;return e.getTouchAction=function(){return[PO]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!s||n.eventType&(je|It)&&!l)this.reset();else if(n.eventType>)this.reset(),this._timer=setTimeout(function(){a.state=Nr,a.tryEmit()},o.time);else if(n.eventType&je)return Nr;return vr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Nr&&(n&&n.eventType&je?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Yv(),this.manager.emit(this.options.event,this._input)))},r}(ps),KO={domEvents:!1,touchAction:kO,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},S1=[[WO,{enable:!1}],[VO,{enable:!1},["rotate"]],[HO,{direction:mr}],[tp,{direction:mr},["swipe"]],[Tf],[Tf,{event:"doubletap",taps:2},["tap"]],[UO]],Oae=1,O1=2;function T1(i,r){var e=i.element;if(e.style){var t;Rr(i.options.cssProps,function(n,a){t=Jl(e.style,a),r?(i.oldCssProps[t]=e.style[t],e.style[t]=n):e.style[t]=i.oldCssProps[t]||""}),r||(i.oldCssProps={})}}function Tae(i,r){var e=document.createEvent("Event");e.initEvent(i,!0,!0),e.gesture=r,r.target.dispatchEvent(e)}var I1=function(){function i(e,t){var n=this;this.options=Yi({},KO,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=_ae(this),this.touchAction=new DO(this,this.options.touchAction),T1(this,!0),Rr(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var r=i.prototype;return r.set=function(t){return Yi(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},r.stop=function(t){this.session.stopped=t?O1:Oae},r.recognize=function(t){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&Nr)&&(n.curRecognizer=null,s=null);for(var u=0;u"u"?{style:{}}:document.createElement("div"),Xne="function",Hn=Math.round,Xi=Math.abs,Yv=Date.now;function Jl(i,r){for(var e,t,n=r[0].toUpperCase()+r.slice(1),a=0;a"u"?Dr={}:Dr=window;var TO=Jl(Yne.style,"touchAction"),IO=TO!==void 0;function Jne(){if(!IO)return!1;var i={},r=Dr.CSS&&Dr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return i[e]=r?Dr.CSS.supports("touch-action",e):!0}),i}var kO="compute",PO="auto",Sf="manipulation",Hi="none",$o="pan-x",wo="pan-y",Zs=Jne(),Zne=/mobile|tablet|ip(ad|hone|od)|android/i,xO="ontouchstart"in Dr,Qne=Jl(Dr,"PointerEvent")!==void 0,eae=xO&&Zne.test(navigator.userAgent),cs="touch",tae="pen",Xv="mouse",rae="kinect",iae=25,gt=1,fn=2,Le=4,It=8,Ku=1,ds=2,fs=4,vs=8,aa=16,mr=ds|fs,Vi=vs|aa,CO=mr|Vi,AO=["x","y"],Gu=["clientX","clientY"];function Rr(i,r,e){var t;if(i)if(i.forEach)i.forEach(r,e);else if(i.length!==void 0)for(t=0;t-1}function nae(i){if(Ai(i,Hi))return Hi;var r=Ai(i,$o),e=Ai(i,wo);return r&&e?Hi:r||e?r?$o:wo:Ai(i,Sf)?Sf:PO}var DO=function(){function i(e,t){this.manager=e,this.set(t)}var r=i.prototype;return r.set=function(t){t===kO&&(t=this.compute()),IO&&this.manager.element.style&&Zs[t]&&(this.manager.element.style[TO]=t),this.actions=t.toLowerCase().trim()},r.update=function(){this.set(this.manager.options.touchAction)},r.compute=function(){var t=[];return Rr(this.manager.recognizers,function(n){Zl(n.options.enable,[n])&&(t=t.concat(n.getTouchAction()))}),nae(t.join(" "))},r.preventDefaults=function(t){var n=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=Ai(o,Hi)&&!Zs[Hi],u=Ai(o,wo)&&!Zs[wo],l=Ai(o,$o)&&!Zs[$o];if(s){var h=t.pointers.length===1,d=t.distance<2,c=t.deltaTime<250;if(h&&d&&c)return}if(!(l&&u)&&(s||u&&a&mr||l&&a&Vi))return this.preventSrc(n)},r.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},i}();function Jv(i,r){for(;i;){if(i===r)return!0;i=i.parentNode}return!1}function RO(i){var r=i.length;if(r===1)return{x:Hn(i[0].clientX),y:Hn(i[0].clientY)};for(var e=0,t=0,n=0;n=Xi(r)?i<0?ds:fs:r<0?vs:aa}function aae(i,r){var e=r.center,t=i.offsetDelta||{},n=i.prevDelta||{},a=i.prevInput||{};(r.eventType===gt||a.eventType===Le)&&(n=i.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=i.offsetDelta={x:e.x,y:e.y}),r.deltaX=n.x+(e.x-t.x),r.deltaY=n.y+(e.y-t.y)}function MO(i,r,e){return{x:r/i||0,y:e/i||0}}function oae(i,r){return qu(r[0],r[1],Gu)/qu(i[0],i[1],Gu)}function sae(i,r){return Of(r[1],r[0],Gu)+Of(i[1],i[0],Gu)}function uae(i,r){var e=i.lastInterval||r,t=r.timeStamp-e.timeStamp,n,a,o,s;if(r.eventType!==It&&(t>iae||e.velocity===void 0)){var u=r.deltaX-e.deltaX,l=r.deltaY-e.deltaY,h=MO(t,u,l);a=h.x,o=h.y,n=Xi(h.x)>Xi(h.y)?h.x:h.y,s=NO(u,l),i.lastInterval=r}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;r.velocity=n,r.velocityX=a,r.velocityY=o,r.direction=s}function lae(i,r){var e=i.session,t=r.pointers,n=t.length;e.firstInput||(e.firstInput=b1(r)),n>1&&!e.firstMultiple?e.firstMultiple=b1(r):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=r.center=RO(t);r.timeStamp=Yv(),r.deltaTime=r.timeStamp-a.timeStamp,r.angle=Of(s,u),r.distance=qu(s,u),aae(e,r),r.offsetDirection=NO(r.deltaX,r.deltaY);var l=MO(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=l.x,r.overallVelocityY=l.y,r.overallVelocity=Xi(l.x)>Xi(l.y)?l.x:l.y,r.scale=o?oae(o.pointers,t):1,r.rotation=o?sae(o.pointers,t):0,r.maxPointers=e.prevInput?r.pointers.length>e.prevInput.maxPointers?r.pointers.length:e.prevInput.maxPointers:r.pointers.length,uae(e,r);var h=i.element,d=r.srcEvent,c;d.composedPath?c=d.composedPath()[0]:d.path?c=d.path[0]:c=d.target,Jv(c,h)&&(h=c),r.target=h}function hae(i,r,e){var t=e.pointers.length,n=e.changedPointers.length,a=r>&&t-n===0,o=r&(Le|It)&&t-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(i.session={}),e.eventType=r,lae(i,e),i.emit("hammer.input",e),i.recognize(e),i.session.prevInput=e}function _o(i){return i.trim().split(/\s+/g)}function to(i,r,e){Rr(_o(r),function(t){i.addEventListener(t,e,!1)})}function ro(i,r,e){Rr(_o(r),function(t){i.removeEventListener(t,e,!1)})}function $1(i){var r=i.ownerDocument||i;return r.defaultView||r.parentWindow||window}var Na=function(){function i(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){Zl(e.options.enable,[e])&&n.handler(a)},this.init()}var r=i.prototype;return r.handler=function(){},r.init=function(){this.evEl&&to(this.element,this.evEl,this.domHandler),this.evTarget&&to(this.target,this.evTarget,this.domHandler),this.evWin&&to($1(this.element),this.evWin,this.domHandler)},r.destroy=function(){this.evEl&&ro(this.element,this.evEl,this.domHandler),this.evTarget&&ro(this.target,this.evTarget,this.domHandler),this.evWin&&ro($1(this.element),this.evWin,this.domHandler)},i}();function Ji(i,r,e){if(i.indexOf&&!e)return i.indexOf(r);for(var t=0;tu[r]}):t=t.sort()),t}var fae={touchstart:gt,touchmove:fn,touchend:Le,touchcancel:It},vae="touchstart touchmove touchend touchcancel",Qv=function(i){Qt(r,i);function r(){var t;return r.prototype.evTarget=vae,t=i.apply(this,arguments)||this,t.targetIds={},t}var e=r.prototype;return e.handler=function(n){var a=fae[n.type],o=pae.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:cs,srcEvent:n})},r}(Na);function pae(i,r){var e=Eo(i.touches),t=this.targetIds;if(r&(gt|fn)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var n,a,o=Eo(i.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return Jv(l.target,u)}),r===gt)for(n=0;n-1&&n.splice(s,1)};setTimeout(a,bae)}}function $ae(i,r){i>?(this.primaryTouch=r.changedPointers[0].identifier,_1.call(this,r)):i&(Le|It)&&_1.call(this,r)}function wae(i){for(var r=i.srcEvent.clientX,e=i.srcEvent.clientY,t=0;t-1&&this.requireFail.splice(n,1),this},r.hasRequireFailures=function(){return this.requireFail.length>0},r.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},r.emit=function(t){var n=this,a=this.state;function o(s){n.manager.emit(s,t)}a=ui&&o(n.options.event+E1(a))},r.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=vr},r.canEmit=function(){for(var t=0;ta.threshold&&u&a.direction},e.attrTest=function(n){return sa.prototype.attrTest.call(this,n)&&(this.state&Yt||!(this.state&Yt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=zO(n.direction);a&&(n.additionalEvent=this.options.event+a),i.prototype.emit.call(this,n)},r}(sa),HO=function(i){Qt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,ur({event:"swipe",threshold:10,velocity:.3,direction:mr|Vi,pointers:1},t))||this}var e=r.prototype;return e.getTouchAction=function(){return tp.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(mr|Vi)?o=n.overallVelocity:a&mr?o=n.overallVelocityX:a&Vi&&(o=n.overallVelocityY),i.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Xi(o)>this.options.velocity&&n.eventType&Le},e.emit=function(n){var a=zO(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},r}(sa),VO=function(i){Qt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,ur({event:"pinch",threshold:0,pointers:2},t))||this}var e=r.prototype;return e.getTouchAction=function(){return[Hi]},e.attrTest=function(n){return i.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&Yt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}i.prototype.emit.call(this,n)},r}(sa),WO=function(i){Qt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,ur({event:"rotate",threshold:0,pointers:2},t))||this}var e=r.prototype;return e.getTouchAction=function(){return[Hi]},e.attrTest=function(n){return i.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&Yt)},r}(sa),UO=function(i){Qt(r,i);function r(t){var n;return t===void 0&&(t={}),n=i.call(this,ur({event:"press",pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var e=r.prototype;return e.getTouchAction=function(){return[PO]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!s||n.eventType&(Le|It)&&!l)this.reset();else if(n.eventType>)this.reset(),this._timer=setTimeout(function(){a.state=Nr,a.tryEmit()},o.time);else if(n.eventType&Le)return Nr;return vr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Nr&&(n&&n.eventType&Le?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Yv(),this.manager.emit(this.options.event,this._input)))},r}(ps),KO={domEvents:!1,touchAction:kO,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},S1=[[WO,{enable:!1}],[VO,{enable:!1},["rotate"]],[HO,{direction:mr}],[tp,{direction:mr},["swipe"]],[Tf],[Tf,{event:"doubletap",taps:2},["tap"]],[UO]],Oae=1,O1=2;function T1(i,r){var e=i.element;if(e.style){var t;Rr(i.options.cssProps,function(n,a){t=Jl(e.style,a),r?(i.oldCssProps[t]=e.style[t],e.style[t]=n):e.style[t]=i.oldCssProps[t]||""}),r||(i.oldCssProps={})}}function Tae(i,r){var e=document.createEvent("Event");e.initEvent(i,!0,!0),e.gesture=r,r.target.dispatchEvent(e)}var I1=function(){function i(e,t){var n=this;this.options=Yi({},KO,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=_ae(this),this.touchAction=new DO(this,this.options.touchAction),T1(this,!0),Rr(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var r=i.prototype;return r.set=function(t){return Yi(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},r.stop=function(t){this.session.stopped=t?O1:Oae},r.recognize=function(t){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&Nr)&&(n.curRecognizer=null,s=null);for(var u=0;u\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),i.apply(this,arguments)}}var qO=GO(function(i,r,e){for(var t=Object.keys(r),n=0;n=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Nae(i,r){var e;if(i){if(typeof i=="string")return P1(i,r);var t=rt(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return hn(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return P1(i,r)}}function P1(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e>>0,n-=i,n*=i,i=n>>>0,n-=i,i+=n*4294967296}return(i>>>0)*23283064365386963e-26}}function jae(){var i=function(){};return{on:i,off:i,destroy:i,emit:i,get:function(){return{set:i}}}}var rp=typeof window<"u"?window.Hammer||Rae:function(){return jae()};function pr(i){var r=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:i,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){r._dom.overlay.parentNode.removeChild(r._dom.overlay)});var t=rp(this._dom.overlay);t.on("tap",k(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];fe(n).call(n,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){Lae(a.target,i)||r.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",r._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&r.deactivate()}}ZE(pr.prototype);pr.current=null;pr.prototype.destroy=function(){var i,r;this.deactivate();var e=XO(Li(i=Ar(r=this._cleanupQueue).call(r,0)).call(i)),t;try{for(e.s();!(t=e.n()).done;){var n=t.value;n()}}catch(a){e.e(a)}finally{e.f()}};pr.prototype.activate=function(){pr.current&&pr.current.deactivate(),pr.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};pr.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};pr.prototype._onTapOverlay=function(i){this.activate(),i.srcEvent.stopPropagation()};function Lae(i,r){for(;i;){if(i===r)return!0;i=i.parentNode}return!1}var zae=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Hae=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Vae=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,Wae=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function Yr(i){if(i)for(;i.hasChildNodes()===!0;){var r=i.firstChild;r&&(Yr(r),i.removeChild(r))}}function Kn(i){return i instanceof String||typeof i=="string"}function x1(i){return de(i)==="object"&&i!==null}function Zi(i,r,e,t){var n=!1;t===!0&&(n=r[e]===null&&i[e]!==void 0),n?delete i[e]:i[e]=r[e]}function JO(i,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var t in i)if(r[t]!==void 0)if(r[t]===null||de(r[t])!=="object")Zi(i,r,t,e);else{var n=i[t],a=r[t];x1(n)&&x1(a)&&JO(n,a,e)}}function Ma(i,r,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(he(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!1;if(he(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!si(i).call(i,n))if(e[n]&&e[n].constructor===Object)r[n]===void 0&&(r[n]={}),r[n].constructor===Object?pe(r[n],e[n]):Zi(r,e,n,t);else if(he(e[n])){r[n]=[];for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:!1,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)||e===!0)if(de(r[n])==="object"&&r[n]!==null&&l1(r[n])===Object.prototype)i[n]===void 0?i[n]=pe({},r[n],e):de(i[n])==="object"&&i[n]!==null&&l1(i[n])===Object.prototype?pe(i[n],r[n],e):Zi(i,r,n,t);else if(he(r[n])){var a;i[n]=rt(a=r[n]).call(a)}else Zi(i,r,n,t);return i}function Xu(i,r){var e;return Gv(e=[]).call(e,dr(i),[r])}function Uae(i){return rt(i).call(i)}function Kae(i){return i.getBoundingClientRect().left}function Gae(i){return i.getBoundingClientRect().top}function te(i,r){if(he(i))for(var e=i.length,t=0;t3&&arguments[3]!==void 0?arguments[3]:{},n=function(v){return v!=null},a=function(v){return v!==null&&de(v)==="object"},o=function(v){for(var p in v)if(Object.prototype.hasOwnProperty.call(v,p))return!1;return!0};if(!a(i))throw new Error("Parameter mergeTarget must be an object");if(!a(r))throw new Error("Parameter options must be an object");if(!n(e))throw new Error("Parameter option must have a value");if(!a(t))throw new Error("Parameter globalOptions must be an object");var s=function(v,p,g){a(v[g])||(v[g]={});var y=p[g],m=v[g];for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(m[b]=y[b])},u=r[e],l=a(t)&&!o(t),h=l?t[e]:void 0,d=h?h.enabled:void 0;if(u!==void 0){if(typeof u=="boolean"){a(i[e])||(i[e]={}),i[e].enabled=u;return}if(u===null&&!a(i[e]))if(n(h))i[e]=zi(h);else return;if(a(u)){var c=!0;u.enabled!==void 0?c=u.enabled:d!==void 0&&(c=h.enabled),s(i,r,e),i[e].enabled=c}}}var Xae={linear:function(r){return r},easeInQuad:function(r){return r*r},easeOutQuad:function(r){return r*(2-r)},easeInOutQuad:function(r){return r<.5?2*r*r:-1+(4-2*r)*r},easeInCubic:function(r){return r*r*r},easeOutCubic:function(r){return--r*r*r+1},easeInOutCubic:function(r){return r<.5?4*r*r*r:(r-1)*(2*r-2)*(2*r-2)+1},easeInQuart:function(r){return r*r*r*r},easeOutQuart:function(r){return 1- --r*r*r*r},easeInOutQuart:function(r){return r<.5?8*r*r*r*r:1-8*--r*r*r*r},easeInQuint:function(r){return r*r*r*r*r},easeOutQuint:function(r){return 1+--r*r*r*r*r},easeInOutQuint:function(r){return r<.5?16*r*r*r*r*r:1+16*--r*r*r*r*r}};function Xr(i,r){var e;he(r)||(r=[r]);var t=XO(i),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;if(a){e=a[r[0]];for(var o=1;o0&&arguments[0]!==void 0?arguments[0]:1;N(this,i),this.pixelRatio=r,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return M(i,[{key:"insertTo",value:function(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}},{key:"setCloseCallback",value:function(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}},{key:"_isColorString",value:function(e){if(typeof e=="string")return Jae[e]}},{key:"setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var n,a=this._isColorString(e);if(a!==void 0&&(e=a),Kn(e)===!0){if(eT(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",");n={r:o[0],g:o[1],b:o[2],a:1}}else if(Yae(e)===!0){var s=e.substr(5).substr(0,e.length-6).split(",");n={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(QO(e)===!0){var u=ip(e);n={r:u.r,g:u.g,b:u.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){var l=e.a!==void 0?e.a:"1.0";n={r:e.r,g:e.g,b:e.b,a:l}}if(n===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+ls(e));this._setColor(n,t)}}},{key:"show",value:function(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t===!0&&(this.previousColor=Fe({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",yr(function(){e.closeCallback!==void 0&&(e.closeCallback(),e.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;t===!0&&(this.initialColor=Fe({},e)),this.color=e;var n=qa(e.r,e.g,e.b),a=2*Math.PI,o=this.r*n.s,s=this.centerCoordinates.x+o*Math.sin(a*n.h),u=this.centerCoordinates.y+o*Math.cos(a*n.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}},{key:"_setOpacity",value:function(e){this.color.a=e/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(e){var t=qa(this.color.r,this.color.g,this.color.b);t.v=e/100;var n=bu(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=qa(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,a,o),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-t.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),hs(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var e,t,n,a;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var s=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var u=this;this.opacityRange.onchange=function(){u._setOpacity(this.value)},this.opacityRange.oninput=function(){u._setOpacity(this.value)},this.brightnessRange.onchange=function(){u._setBrightness(this.value)},this.brightnessRange.oninput=function(){u._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=k(e=this._hide).call(e,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=k(t=this._apply).call(t,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=k(n=this._save).call(n,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=k(a=this._loadLast).call(a,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var e=this;this.drag={},this.pinch={},this.hammer=new rp(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",function(t){t.isFirst&&e._moveSelector(t)}),this.hammer.on("tap",function(t){e._moveSelector(t)}),this.hammer.on("panstart",function(t){e._moveSelector(t)}),this.hammer.on("panmove",function(t){e._moveSelector(t)}),this.hammer.on("panend",function(t){e._moveSelector(t)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);var a,o,s,u;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;var l=2*Math.PI/360,h=1/360,d=1/this.r,c;for(s=0;s<360;s++)for(u=0;u3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return!1};N(this,i),this.parent=r,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=a,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Fe(this.options,this.defaultOptions),this.configureOptions=t,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Zae(n),this.wrapper=void 0}return M(i,[{key:"setOptions",value:function(e){if(e!==void 0){this.popupHistory={},this._removePopup();var t=!0;if(typeof e=="string")this.options.filter=e;else if(he(e))this.options.filter=e.join();else if(de(e)==="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),Ot(e)!==void 0&&(this.options.filter=Ot(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,t=e):typeof e=="function"&&(this.options.filter=e,t=!0);Ot(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}},{key:"setModuleOptions",value:function(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var e=Ot(this.options),t=0,n=!1;for(var a in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,a)&&(this.allowCreation=!1,n=!1,typeof e=="function"?(n=e(a,[]),n=n||this._handleObject(this.configureOptions[a],[a],!0)):(e===!0||ie(e).call(e,a)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(a),this._handleObject(this.configureOptions[a],[a])),t++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var e=0;e1?n-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:!1,a=document.createElement("div");if(a.className="vis-configuration vis-config-label vis-config-s"+t.length,n===!0){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(Pf("i","b",e))}else a.innerText=e+":";return a}},{key:"_makeDropdown",value:function(e,t,n){var a=document.createElement("select");a.className="vis-configuration vis-config-select";var o=0;t!==void 0&&ie(e).call(e,t)!==-1&&(o=ie(e).call(e,t));for(var s=0;ss&&s!==1&&(l.max=Math.ceil(t*c),d=l.max,h="range increased"),l.value=t}else l.value=a;var f=document.createElement("input");f.className="vis-configuration vis-config-rangeinput",f.value=l.value;var v=this;l.onchange=function(){f.value=this.value,v._update(Number(this.value),n)},l.oninput=function(){f.value=this.value};var p=this._makeLabel(n[n.length-1],n),g=this._makeItem(n,p,l,f);h!==""&&this.popupHistory[g]!==d&&(this.popupHistory[g]=d,this._setupPopup(h,g))}},{key:"_makeButton",value:function(){var e=this;if(this.options.showButton===!0){var t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerText="generate options",t.onclick=function(){e._printOptions()},t.onmouseover=function(){t.className="vis-configuration vis-config-button hover"},t.onmouseout=function(){t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}},{key:"_setupPopup",value:function(e,t){var n=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,o=Ot(this.options),s=!1;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){a=!0;var l=e[u],h=Xu(t,u);if(typeof o=="function"&&(a=o(u,t),a===!1&&!he(l)&&typeof l!="string"&&typeof l!="boolean"&&l instanceof Object&&(this.allowCreation=!1,a=this._handleObject(l,h,!0),this.allowCreation=n===!1)),a!==!1){s=!0;var d=this._getValue(h);if(he(l))this._handleArray(l,d,h);else if(typeof l=="string")this._makeTextInput(l,d,h);else if(typeof l=="boolean")this._makeCheckbox(l,d,h);else if(l instanceof Object){if(!this.hideOption(t,u,this.moduleOptions))if(l.enabled!==void 0){var c=Xu(h,"enabled"),f=this._getValue(c);if(f===!0){var v=this._makeLabel(u,h,!0);this._makeItem(h,v),s=this._handleObject(l,h)||s}else this._makeCheckbox(l,f,h)}else{var p=this._makeLabel(u,h,!0);this._makeItem(h,p),s=this._handleObject(l,h)||s}}else console.error("dont know how to handle",l,u,h)}}return s}},{key:"_handleArray",value:function(e,t,n){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}},{key:"_update",value:function(e,t){var n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",n),this.initialized=!0,this.parent.setOptions(n)}},{key:"_constructOptions",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n;e=e==="true"?!0:e,e=e==="false"?!1:e;for(var o=0;oo-this.padding&&(l=!0),l?s=this.x-n:s=this.x,h?u=this.y-t:u=this.y}else u=this.y-t,u+t+this.padding>a&&(u=a-t-this.padding),uo&&(s=o-n-this.padding),s\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),i.apply(this,arguments)}}var qO=GO(function(i,r,e){for(var t=Object.keys(r),n=0;n=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Nae(i,r){var e;if(i){if(typeof i=="string")return P1(i,r);var t=rt(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return hn(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return P1(i,r)}}function P1(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e>>0,n-=i,n*=i,i=n>>>0,n-=i,i+=n*4294967296}return(i>>>0)*23283064365386963e-26}}function jae(){var i=function(){};return{on:i,off:i,destroy:i,emit:i,get:function(){return{set:i}}}}var rp=typeof window<"u"?window.Hammer||Rae:function(){return jae()};function pr(i){var r=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:i,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){r._dom.overlay.parentNode.removeChild(r._dom.overlay)});var t=rp(this._dom.overlay);t.on("tap",k(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];ve(n).call(n,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){Lae(a.target,i)||r.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",r._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&r.deactivate()}}ZE(pr.prototype);pr.current=null;pr.prototype.destroy=function(){var i,r;this.deactivate();var e=XO(Li(i=Ar(r=this._cleanupQueue).call(r,0)).call(i)),t;try{for(e.s();!(t=e.n()).done;){var n=t.value;n()}}catch(a){e.e(a)}finally{e.f()}};pr.prototype.activate=function(){pr.current&&pr.current.deactivate(),pr.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};pr.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};pr.prototype._onTapOverlay=function(i){this.activate(),i.srcEvent.stopPropagation()};function Lae(i,r){for(;i;){if(i===r)return!0;i=i.parentNode}return!1}var zae=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Hae=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Vae=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,Wae=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function Yr(i){if(i)for(;i.hasChildNodes()===!0;){var r=i.firstChild;r&&(Yr(r),i.removeChild(r))}}function Kn(i){return i instanceof String||typeof i=="string"}function x1(i){return fe(i)==="object"&&i!==null}function Zi(i,r,e,t){var n=!1;t===!0&&(n=r[e]===null&&i[e]!==void 0),n?delete i[e]:i[e]=r[e]}function JO(i,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var t in i)if(r[t]!==void 0)if(r[t]===null||fe(r[t])!=="object")Zi(i,r,t,e);else{var n=i[t],a=r[t];x1(n)&&x1(a)&&JO(n,a,e)}}function Ma(i,r,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(he(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!1;if(he(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!si(i).call(i,n))if(e[n]&&e[n].constructor===Object)r[n]===void 0&&(r[n]={}),r[n].constructor===Object?ge(r[n],e[n]):Zi(r,e,n,t);else if(he(e[n])){r[n]=[];for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:!1,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)||e===!0)if(fe(r[n])==="object"&&r[n]!==null&&l1(r[n])===Object.prototype)i[n]===void 0?i[n]=ge({},r[n],e):fe(i[n])==="object"&&i[n]!==null&&l1(i[n])===Object.prototype?ge(i[n],r[n],e):Zi(i,r,n,t);else if(he(r[n])){var a;i[n]=rt(a=r[n]).call(a)}else Zi(i,r,n,t);return i}function Xu(i,r){var e;return Gv(e=[]).call(e,dr(i),[r])}function Uae(i){return rt(i).call(i)}function Kae(i){return i.getBoundingClientRect().left}function Gae(i){return i.getBoundingClientRect().top}function te(i,r){if(he(i))for(var e=i.length,t=0;t3&&arguments[3]!==void 0?arguments[3]:{},n=function(v){return v!=null},a=function(v){return v!==null&&fe(v)==="object"},o=function(v){for(var p in v)if(Object.prototype.hasOwnProperty.call(v,p))return!1;return!0};if(!a(i))throw new Error("Parameter mergeTarget must be an object");if(!a(r))throw new Error("Parameter options must be an object");if(!n(e))throw new Error("Parameter option must have a value");if(!a(t))throw new Error("Parameter globalOptions must be an object");var s=function(v,p,g){a(v[g])||(v[g]={});var y=p[g],m=v[g];for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(m[b]=y[b])},u=r[e],l=a(t)&&!o(t),h=l?t[e]:void 0,d=h?h.enabled:void 0;if(u!==void 0){if(typeof u=="boolean"){a(i[e])||(i[e]={}),i[e].enabled=u;return}if(u===null&&!a(i[e]))if(n(h))i[e]=zi(h);else return;if(a(u)){var c=!0;u.enabled!==void 0?c=u.enabled:d!==void 0&&(c=h.enabled),s(i,r,e),i[e].enabled=c}}}var Xae={linear:function(r){return r},easeInQuad:function(r){return r*r},easeOutQuad:function(r){return r*(2-r)},easeInOutQuad:function(r){return r<.5?2*r*r:-1+(4-2*r)*r},easeInCubic:function(r){return r*r*r},easeOutCubic:function(r){return--r*r*r+1},easeInOutCubic:function(r){return r<.5?4*r*r*r:(r-1)*(2*r-2)*(2*r-2)+1},easeInQuart:function(r){return r*r*r*r},easeOutQuart:function(r){return 1- --r*r*r*r},easeInOutQuart:function(r){return r<.5?8*r*r*r*r:1-8*--r*r*r*r},easeInQuint:function(r){return r*r*r*r*r},easeOutQuint:function(r){return 1+--r*r*r*r*r},easeInOutQuint:function(r){return r<.5?16*r*r*r*r*r:1+16*--r*r*r*r*r}};function Xr(i,r){var e;he(r)||(r=[r]);var t=XO(i),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;if(a){e=a[r[0]];for(var o=1;o0&&arguments[0]!==void 0?arguments[0]:1;N(this,i),this.pixelRatio=r,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return M(i,[{key:"insertTo",value:function(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}},{key:"setCloseCallback",value:function(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}},{key:"_isColorString",value:function(e){if(typeof e=="string")return Jae[e]}},{key:"setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var n,a=this._isColorString(e);if(a!==void 0&&(e=a),Kn(e)===!0){if(eT(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",");n={r:o[0],g:o[1],b:o[2],a:1}}else if(Yae(e)===!0){var s=e.substr(5).substr(0,e.length-6).split(",");n={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(QO(e)===!0){var u=ip(e);n={r:u.r,g:u.g,b:u.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){var l=e.a!==void 0?e.a:"1.0";n={r:e.r,g:e.g,b:e.b,a:l}}if(n===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+ls(e));this._setColor(n,t)}}},{key:"show",value:function(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t===!0&&(this.previousColor=je({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",yr(function(){e.closeCallback!==void 0&&(e.closeCallback(),e.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;t===!0&&(this.initialColor=je({},e)),this.color=e;var n=qa(e.r,e.g,e.b),a=2*Math.PI,o=this.r*n.s,s=this.centerCoordinates.x+o*Math.sin(a*n.h),u=this.centerCoordinates.y+o*Math.cos(a*n.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}},{key:"_setOpacity",value:function(e){this.color.a=e/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(e){var t=qa(this.color.r,this.color.g,this.color.b);t.v=e/100;var n=bu(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=qa(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,a,o),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-t.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),hs(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var e,t,n,a;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var s=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var u=this;this.opacityRange.onchange=function(){u._setOpacity(this.value)},this.opacityRange.oninput=function(){u._setOpacity(this.value)},this.brightnessRange.onchange=function(){u._setBrightness(this.value)},this.brightnessRange.oninput=function(){u._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=k(e=this._hide).call(e,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=k(t=this._apply).call(t,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=k(n=this._save).call(n,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=k(a=this._loadLast).call(a,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var e=this;this.drag={},this.pinch={},this.hammer=new rp(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",function(t){t.isFirst&&e._moveSelector(t)}),this.hammer.on("tap",function(t){e._moveSelector(t)}),this.hammer.on("panstart",function(t){e._moveSelector(t)}),this.hammer.on("panmove",function(t){e._moveSelector(t)}),this.hammer.on("panend",function(t){e._moveSelector(t)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);var a,o,s,u;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;var l=2*Math.PI/360,h=1/360,d=1/this.r,c;for(s=0;s<360;s++)for(u=0;u