writer 0.8.3rc21__py3-none-any.whl → 1.25.1rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- writer/ai/__init__.py +277 -28
- writer/app_runner.py +236 -32
- writer/app_templates/default/.wf/components-blueprints_blueprint-0-0decp3w5erhvl0nw.jsonl +11 -0
- writer/app_templates/default/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl +22 -10
- writer/app_templates/default/.wf/components-root.jsonl +1 -1
- writer/app_templates/default/.wf/components-workflows_root.jsonl +1 -0
- writer/app_templates/default/.wf/components-workflows_workflow-0-lfltcky7l1fsm6j2.jsonl +1 -0
- writer/app_templates/default/.wf/metadata.json +1 -1
- writer/app_templates/default/README.md +3 -0
- writer/app_templates/default/main.py +8 -5
- writer/app_templates/default/requirements.txt +1 -0
- writer/app_templates/default/static/agent_builder_demo.png +0 -0
- writer/app_templates/hello/main.py +3 -0
- writer/auth.py +7 -2
- writer/autogen.py +26 -9
- writer/blocks/__init__.py +21 -1
- writer/blocks/addtostatelist.py +5 -4
- writer/blocks/apitrigger.py +45 -0
- writer/blocks/base_block.py +134 -14
- writer/blocks/changepage.py +1 -1
- writer/blocks/code.py +27 -11
- writer/blocks/crontrigger.py +49 -0
- writer/blocks/foreach.py +3 -3
- writer/blocks/httprequest.py +8 -24
- writer/blocks/ifelse.py +71 -0
- writer/blocks/logmessage.py +2 -2
- writer/blocks/returnvalue.py +2 -2
- writer/blocks/runblueprint.py +2 -2
- writer/blocks/setstate.py +5 -5
- writer/blocks/sharedblueprint.py +86 -0
- writer/blocks/writeraddchatmessage.py +45 -7
- writer/blocks/writeraddtokg.py +31 -4
- writer/blocks/writeraskkg.py +27 -34
- writer/blocks/writerchat.py +14 -9
- writer/blocks/writerchatreply.py +279 -0
- writer/blocks/writerchatreplywithtoolconfig.py +393 -0
- writer/blocks/writerclassification.py +42 -5
- writer/blocks/writercompletion.py +4 -4
- writer/blocks/writerfileapi.py +4 -4
- writer/blocks/writerinitchat.py +5 -4
- writer/blocks/writerkeyvaluestorage.py +106 -0
- writer/blocks/writernocodeapp.py +4 -4
- writer/blocks/writerparsepdf.py +8 -6
- writer/blocks/writerstructuredoutput.py +105 -0
- writer/blocks/writertoolcalling.py +106 -51
- writer/blocks/writervision.py +141 -0
- writer/blocks/writerwebsearch.py +175 -0
- writer/blueprints.py +715 -251
- writer/command_line.py +52 -16
- writer/core.py +200 -35
- writer/core_ui.py +4 -0
- writer/evaluator.py +38 -24
- writer/journal.py +227 -0
- writer/keyvalue_storage.py +93 -0
- writer/logs.py +277 -0
- writer/serve.py +402 -198
- writer/ss_types.py +41 -0
- writer/static/assets/BaseMarkdown-Wrvby5J8.js +1 -0
- writer/static/assets/BlueprintToolbar-BuXNRxWT.js +1 -0
- writer/static/assets/BlueprintToolbar-wpfX0jo_.css +1 -0
- writer/static/assets/BuilderApp-PTOI76jZ.js +8 -0
- writer/static/assets/BuilderApp-WimUfNZr.css +1 -0
- writer/static/assets/BuilderApplicationSelect-DXzy4e_h.js +7 -0
- writer/static/assets/BuilderApplicationSelect-XaM1D5fv.css +1 -0
- writer/static/assets/BuilderBlueprintLibraryPanel-Ckrhknlh.css +1 -0
- writer/static/assets/BuilderBlueprintLibraryPanel-DBDzhTlc.js +1 -0
- writer/static/assets/{BuilderEmbeddedCodeEditor-DiDqfWdt.css → BuilderEmbeddedCodeEditor-B0bcjlhk.css} +1 -1
- writer/static/assets/{BuilderEmbeddedCodeEditor-CbK-r9w6.js → BuilderEmbeddedCodeEditor-Dn7eDICN.js} +7 -7
- writer/static/assets/BuilderGraphSelect-C-LRsO8W.js +7 -0
- writer/static/assets/BuilderGraphSelect-D7B61d5s.css +1 -0
- writer/static/assets/{BuilderInsertionLabel-CDlWX-mE.js → BuilderInsertionLabel-BhyL9wgn.js} +1 -1
- writer/static/assets/{BuilderInsertionOverlay-B7-TsHNC.js → BuilderInsertionOverlay-MkAIVruY.js} +1 -1
- writer/static/assets/BuilderJournal-A0LcEwGI.js +7 -0
- writer/static/assets/BuilderJournal-DHv3Pvvm.css +1 -0
- writer/static/assets/BuilderModelSelect-CdSo_sih.js +7 -0
- writer/static/assets/BuilderModelSelect-Dc4IPLp2.css +1 -0
- writer/static/assets/BuilderSettings-BDwZBveu.js +16 -0
- writer/static/assets/BuilderSettings-lZkOXEYw.css +1 -0
- writer/static/assets/BuilderSettingsArtifactAPITriggerDetails-3O6jKBXD.js +4 -0
- writer/static/assets/BuilderSettingsArtifactAPITriggerDetails-DnX66iRg.css +1 -0
- writer/static/assets/BuilderSettingsDeploySharedBlueprint-BR_3ptsd.js +1 -0
- writer/static/assets/BuilderSettingsDeploySharedBlueprint-KJTl8gxP.css +1 -0
- writer/static/assets/BuilderSettingsHandlers-CBtEQFSo.js +1 -0
- writer/static/assets/BuilderSettingsHandlers-DJPeASfz.css +1 -0
- writer/static/assets/BuilderSidebarComponentTree-DLltgas5.js +1 -0
- writer/static/assets/BuilderSidebarComponentTree-DYu1F793.css +1 -0
- writer/static/assets/BuilderSidebarToolkit-CApZNTAq.js +7 -0
- writer/static/assets/BuilderSidebarToolkit-CwqbjRv8.css +1 -0
- writer/static/assets/BuilderTemplateEditor-CYSDeWgV.css +1 -0
- writer/static/assets/BuilderTemplateEditor-DnRDRcA0.js +87 -0
- writer/static/assets/BuilderVault-2vGoV0sx.js +1 -0
- writer/static/assets/BuilderVault-Cx6oQSES.css +1 -0
- writer/static/assets/ComponentRenderer-72hqvEvI.css +1 -0
- writer/static/assets/ComponentRenderer-D4Pj1i3s.js +1 -0
- writer/static/assets/SharedCopyClipboardButton-BipJKGtz.css +1 -0
- writer/static/assets/SharedCopyClipboardButton-DNI9kLe6.js +1 -0
- writer/static/assets/WdsCheckbox-DKvpPA4D.css +1 -0
- writer/static/assets/WdsCheckbox-edQcn1cf.js +1 -0
- writer/static/assets/WdsDropdownMenu-CzzPN9Wg.css +1 -0
- writer/static/assets/WdsDropdownMenu-DQnrRBNV.js +1 -0
- writer/static/assets/WdsFieldWrapper-Cmufx5Nj.js +1 -0
- writer/static/assets/WdsFieldWrapper-CsemOh8D.css +1 -0
- writer/static/assets/WdsTabs-DKj7BqI0.css +1 -0
- writer/static/assets/WdsTabs-DcfY_zn5.js +1 -0
- writer/static/assets/{art-paper-WsD9P5Lu.svg → art-paper-D70v1WMA.svg} +0 -1
- writer/static/assets/{cssMode-6B7VrieQ.js → cssMode-BYq4oZGq.js} +1 -1
- writer/static/assets/{freemarker2-Dy54TNCQ.js → freemarker2-CnNourkO.js} +1 -1
- writer/static/assets/{handlebars-BnWqX2x5.js → handlebars-Bm22yapJ.js} +1 -1
- writer/static/assets/{html-CIuj_eOg.js → html-CAKAfoZF.js} +1 -1
- writer/static/assets/{htmlMode-5fUQN2xJ.js → htmlMode-BGZ97n-V.js} +1 -1
- writer/static/assets/index-BKNuk68o.css +1 -0
- writer/static/assets/index-BQNXU3IR.js +17 -0
- writer/static/assets/index-DHXAd5Yn.js +4 -0
- writer/static/assets/index-Zki-pfO-.js +8525 -0
- writer/static/assets/index.esm-B1ZQtduY.js +17 -0
- writer/static/assets/{javascript-PLzaI1wY.js → javascript-X1f02eyK.js} +1 -1
- writer/static/assets/{jsonMode-CzZfZ4-D.js → jsonMode-hT0bNgT8.js} +1 -1
- writer/static/assets/{liquid-Cy21vWLb.js → liquid-KmCCiJw2.js} +1 -1
- writer/static/assets/{mapbox-gl-BjXsUCYi.js → mapbox-gl-C0cyFYYW.js} +1 -1
- writer/static/assets/{mdx-Cgik3q5p.js → mdx-DtRFauUw.js} +1 -1
- writer/static/assets/pdf-B6-yWJ-Y.js +12 -0
- writer/static/assets/pdf.worker.min-CyUfim15.mjs +21 -0
- writer/static/assets/{plotly.min-Dk-1ahEu.js → plotly.min-DutuuatZ.js} +1 -1
- writer/static/assets/{python-h6gjz_bN.js → python-DVhxg746.js} +1 -1
- writer/static/assets/{razor-BQ1k9241.js → razor-DR5Ns_BC.js} +1 -1
- writer/static/assets/{tsMode-BaBWt05D.js → tsMode-BNUEZzir.js} +1 -1
- writer/static/assets/{typescript-B42-gYGT.js → typescript-CRVt7Hx0.js} +1 -1
- writer/static/assets/useBlueprintRun-C00bCxh-.js +1 -0
- writer/static/assets/useKeyValueEditor-nDmI7cTJ.js +1 -0
- writer/static/assets/useListResources-DLkZhRSJ.js +1 -0
- writer/static/assets/{xml-BOez4Prd.js → xml-C_6-t1tb.js} +1 -1
- writer/static/assets/{yaml-BQhoEOIz.js → yaml-DIw8G7jk.js} +1 -1
- writer/static/components/annotatedtext.svg +3 -3
- writer/static/components/avatar.svg +3 -3
- writer/static/components/blueprints_addtostatelist.svg +3 -3
- writer/static/components/blueprints_apitrigger.svg +4 -0
- writer/static/components/blueprints_category_Logic.svg +3 -3
- writer/static/components/blueprints_category_Other.svg +3 -3
- writer/static/components/blueprints_category_Writer.svg +24 -5
- writer/static/components/blueprints_code.svg +6 -6
- writer/static/components/blueprints_crontrigger.svg +6 -0
- writer/static/components/blueprints_foreach.svg +3 -3
- writer/static/components/blueprints_httprequest.svg +6 -6
- writer/static/components/blueprints_logmessage.svg +10 -3
- writer/static/components/blueprints_parsejson.svg +3 -3
- writer/static/components/blueprints_returnvalue.svg +3 -3
- writer/static/components/blueprints_runblueprint.svg +3 -3
- writer/static/components/blueprints_setstate.svg +3 -3
- writer/static/components/blueprints_writeraddchatmessage.svg +14 -6
- writer/static/components/blueprints_writeraddtokg.svg +14 -6
- writer/static/components/blueprints_writerchatreply.svg +19 -0
- writer/static/components/blueprints_writerclassification.svg +23 -8
- writer/static/components/blueprints_writercompletion.svg +13 -5
- writer/static/components/blueprints_writernocodeapp.svg +13 -3
- writer/static/components/button.svg +3 -3
- writer/static/components/category_Content.svg +3 -3
- writer/static/components/category_Embed.svg +3 -3
- writer/static/components/category_Input.svg +4 -4
- writer/static/components/category_Layout.svg +6 -6
- writer/static/components/category_Other.svg +3 -3
- writer/static/components/chatbot.svg +3 -3
- writer/static/components/checkboxinput.svg +3 -3
- writer/static/components/colorinput.svg +6 -6
- writer/static/components/column.svg +3 -3
- writer/static/components/columns.svg +3 -3
- writer/static/components/dataframe.svg +3 -3
- writer/static/components/dateinput.svg +3 -3
- writer/static/components/dropdowninput.svg +4 -4
- writer/static/components/fileinput.svg +3 -3
- writer/static/components/googlemaps.svg +3 -3
- writer/static/components/heading.svg +6 -6
- writer/static/components/horizontalstack.svg +3 -3
- writer/static/components/html.svg +6 -6
- writer/static/components/icon.svg +3 -3
- writer/static/components/iframe.svg +3 -3
- writer/static/components/image.svg +10 -3
- writer/static/components/jsonviewer.svg +3 -3
- writer/static/components/link.svg +7 -7
- writer/static/components/mapbox.svg +3 -3
- writer/static/components/message.svg +3 -3
- writer/static/components/metric.svg +3 -3
- writer/static/components/multiselectinput.svg +3 -3
- writer/static/components/numberinput.svg +3 -3
- writer/static/components/pagination.svg +3 -3
- writer/static/components/pdf.svg +3 -3
- writer/static/components/plotlygraph.svg +6 -6
- writer/static/components/progressbar.svg +4 -4
- writer/static/components/radioinput.svg +3 -3
- writer/static/components/rangeinput.svg +3 -3
- writer/static/components/ratinginput.svg +3 -3
- writer/static/components/repeater.svg +3 -3
- writer/static/components/reuse.svg +3 -3
- writer/static/components/section.svg +3 -3
- writer/static/components/selectinput.svg +4 -4
- writer/static/components/separator.svg +3 -3
- writer/static/components/sidebar.svg +3 -3
- writer/static/components/sliderinput.svg +3 -3
- writer/static/components/step.svg +3 -3
- writer/static/components/steps.svg +3 -3
- writer/static/components/switchinput.svg +3 -3
- writer/static/components/tab.svg +3 -3
- writer/static/components/tabs.svg +3 -3
- writer/static/components/tags.svg +10 -3
- writer/static/components/text.svg +3 -3
- writer/static/components/textareainput.svg +10 -3
- writer/static/components/textinput.svg +3 -3
- writer/static/components/timeinput.svg +3 -3
- writer/static/components/timer.svg +3 -3
- writer/static/components/videoplayer.svg +10 -3
- writer/static/components/webcamcapture.svg +3 -3
- writer/static/index.html +3 -11
- writer/static/status/cancelled.svg +5 -0
- writer/static/status/skipped.svg +4 -0
- writer/static/status/stopped.svg +4 -0
- writer/sync.py +431 -0
- writer/ui.py +49 -41
- writer/vault.py +48 -0
- writer/wf_project.py +5 -5
- writer-1.25.1rc1.dist-info/METADATA +92 -0
- writer-1.25.1rc1.dist-info/RECORD +382 -0
- {writer-0.8.3rc21.dist-info → writer-1.25.1rc1.dist-info}/WHEEL +1 -1
- writer/app_templates/default/.wf/components-blueprints_blueprint-0-t84xyhxau9ej3823.jsonl +0 -18
- writer/app_templates/default/static/welcome.svg +0 -40
- writer/static/assets/BaseMarkdown-BH_nSq9H.js +0 -1
- writer/static/assets/BlueprintToolbar-BO-WERxH.css +0 -1
- writer/static/assets/BlueprintToolbar-CHWL-rTm.js +0 -1
- writer/static/assets/BuilderApp-0XXiQ2l7.js +0 -7
- writer/static/assets/BuilderApp-CAhvLO4a.css +0 -1
- writer/static/assets/BuilderApplicationSelect-CwzU4F1-.js +0 -7
- writer/static/assets/BuilderApplicationSelect-DYYFtqjx.css +0 -1
- writer/static/assets/BuilderGraphSelect-CVO4gzts.css +0 -1
- writer/static/assets/BuilderGraphSelect-DV5Xy0HK.js +0 -7
- writer/static/assets/BuilderInstanceTracker-BECcXNnW.css +0 -1
- writer/static/assets/BuilderInstanceTracker-Dr0XhpSH.js +0 -1
- writer/static/assets/BuilderModelSelect-QHUGd86u.css +0 -1
- writer/static/assets/BuilderModelSelect-ow0XEf2t.js +0 -7
- writer/static/assets/BuilderSettings-C2WRfSor.css +0 -1
- writer/static/assets/BuilderSettings-D5bjbcWj.js +0 -24
- writer/static/assets/BuilderSettingsHandlers-1QLaHR8J.css +0 -1
- writer/static/assets/BuilderSettingsHandlers-j1aMAV4J.js +0 -1
- writer/static/assets/BuilderSidebarComponentTree-0YajaJke.css +0 -1
- writer/static/assets/BuilderSidebarComponentTree-CtaOZfpV.js +0 -1
- writer/static/assets/BuilderSidebarPanel-BMJVzhd3.js +0 -1
- writer/static/assets/BuilderSidebarPanel-BrLsNxVM.css +0 -1
- writer/static/assets/BuilderSidebarToolkit-BbjOOp8E.js +0 -1
- writer/static/assets/BuilderSidebarToolkit-BvZDShKD.css +0 -1
- writer/static/assets/ComponentRenderer-B76bKRZO.css +0 -1
- writer/static/assets/ComponentRenderer-CZs4z773.js +0 -1
- writer/static/assets/SharedMoreDropdown-BWKlox8E.css +0 -1
- writer/static/assets/SharedMoreDropdown-DKv_HNef.js +0 -7
- writer/static/assets/WdsDropdownMenu-C1UyKOJR.css +0 -1
- writer/static/assets/WdsDropdownMenu-CGiATY2E.js +0 -1
- writer/static/assets/WdsLoaderDots-qdyk2N-2.js +0 -1
- writer/static/assets/index-BJMAe9SN.js +0 -8
- writer/static/assets/index-CPCeQU9V.css +0 -1
- writer/static/assets/index-ChWW_c_j.js +0 -439
- writer/static/assets/instancePath-BsbOTTI8.js +0 -1
- writer/static/assets/material-symbols-outlined-latin-wght-normal-DuE-q1Ez.woff2 +0 -0
- writer/static/assets/useBlueprintRun-CBOvzWTA.js +0 -1
- writer/static/assets/useComponentDescription-FHKxu8gg.js +0 -1
- writer/static/assets/useListResources-BpMgq7XI.js +0 -1
- writer-0.8.3rc21.dist-info/METADATA +0 -117
- writer-0.8.3rc21.dist-info/RECORD +0 -342
- {writer-0.8.3rc21.dist-info → writer-1.25.1rc1.dist-info}/entry_points.txt +0 -0
- {writer-0.8.3rc21.dist-info → writer-1.25.1rc1.dist-info/licenses}/LICENSE.txt +0 -0
|
@@ -1,439 +0,0 @@
|
|
|
1
|
-
function __vite__mapDeps(indexes) {
|
|
2
|
-
if (!__vite__mapDeps.viteFileDeps) {
|
|
3
|
-
__vite__mapDeps.viteFileDeps = ["./SharedMoreDropdown-DKv_HNef.js","./SharedMoreDropdown-BWKlox8E.css","./index-5u5REPT4.js","./serialization-DJC7NP0N.js","./Arrow.dom-GBJpMYQS.js","./WdsDropdownMenu-CGiATY2E.js","./WdsDropdownMenu-C1UyKOJR.css","./BlueprintToolbar-CHWL-rTm.js","./useBlueprintRun-CBOvzWTA.js","./BlueprintToolbar-BO-WERxH.css","./ComponentRenderer-CZs4z773.js","./instancePath-BsbOTTI8.js","./ComponentRenderer-B76bKRZO.css","./BuilderApp-0XXiQ2l7.js","./marked.esm-273vDTCT.js","./BuilderApp-CAhvLO4a.css"]
|
|
4
|
-
}
|
|
5
|
-
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
6
|
-
}
|
|
7
|
-
var nh=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var er=(e,t,n)=>(nh(e,t,"read from private field"),n?n.call(e):t.get(e)),Xc=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Qc=(e,t,n,r)=>(nh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();const j1="modulepreload",V1=function(e,t){return new URL(e,t).href},rh={},en=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),i=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.all(n.map(l=>{if(l=V1(l,r),l in rh)return;rh[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(!!r)for(let m=a.length-1;m>=0;m--){const _=a[m];if(_.href===l&&(!u||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${c}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":j1,u||(h.as="script",h.crossOrigin=""),h.href=l,i&&h.setAttribute("nonce",i),document.head.appendChild(h),u)return new Promise((m,_)=>{h.addEventListener("load",m),h.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${l}`)))})}))}return o.then(()=>t()).catch(a=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a})};/**
|
|
8
|
-
* @vue/shared v3.5.13
|
|
9
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
10
|
-
* @license MIT
|
|
11
|
-
**//*! #__NO_SIDE_EFFECTS__ */function Kl(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const St={},Va=[],dr=()=>{},U1=()=>!1,di=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),dd=e=>e.startsWith("onUpdate:"),Ht=Object.assign,fd=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},H1=Object.prototype.hasOwnProperty,Ot=(e,t)=>H1.call(e,t),Ye=Array.isArray,Ua=e=>ss(e)==="[object Map]",ba=e=>ss(e)==="[object Set]",oh=e=>ss(e)==="[object Date]",z1=e=>ss(e)==="[object RegExp]",at=e=>typeof e=="function",Gt=e=>typeof e=="string",kr=e=>typeof e=="symbol",jt=e=>e!==null&&typeof e=="object",pd=e=>(jt(e)||at(e))&&at(e.then)&&at(e.catch),fv=Object.prototype.toString,ss=e=>fv.call(e),K1=e=>ss(e).slice(8,-1),Wl=e=>ss(e)==="[object Object]",hd=e=>Gt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ha=Kl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ql=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},W1=/-(\w)/g,kn=ql(e=>e.replace(W1,(t,n)=>n?n.toUpperCase():"")),q1=/\B([A-Z])/g,Jn=ql(e=>e.replace(q1,"-$1").toLowerCase()),fi=ql(e=>e.charAt(0).toUpperCase()+e.slice(1)),Fs=ql(e=>e?`on${fi(e)}`:""),Un=(e,t)=>!Object.is(e,t),za=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},pv=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},yl=e=>{const t=parseFloat(e);return isNaN(t)?e:t},_l=e=>{const t=Gt(e)?Number(e):NaN;return isNaN(t)?e:t};let ah;const Gl=()=>ah||(ah=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),G1="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",J1=Kl(G1);function _t(e){if(Ye(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Gt(r)?Z1(r):_t(r);if(o)for(const a in o)t[a]=o[a]}return t}else if(Gt(e)||jt(e))return e}const Y1=/;(?![^(]*\))/g,X1=/:([^]+)/,Q1=/\/\*[^]*?\*\//g;function Z1(e){const t={};return e.replace(Q1,"").split(Y1).forEach(n=>{if(n){const r=n.split(X1);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ut(e){let t="";if(Gt(e))t=e;else if(Ye(e))for(let n=0;n<e.length;n++){const r=ut(e[n]);r&&(t+=r+" ")}else if(jt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function eA(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Gt(t)&&(e.class=ut(t)),n&&(e.style=_t(n)),e}const tA="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",nA=Kl(tA);function hv(e){return!!e||e===""}function rA(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Vo(e[r],t[r]);return n}function Vo(e,t){if(e===t)return!0;let n=oh(e),r=oh(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=kr(e),r=kr(t),n||r)return e===t;if(n=Ye(e),r=Ye(t),n||r)return n&&r?rA(e,t):!1;if(n=jt(e),r=jt(t),n||r){if(!n||!r)return!1;const o=Object.keys(e).length,a=Object.keys(t).length;if(o!==a)return!1;for(const s in e){const i=e.hasOwnProperty(s),l=t.hasOwnProperty(s);if(i&&!l||!i&&l||!Vo(e[s],t[s]))return!1}}return String(e)===String(t)}function Jl(e,t){return e.findIndex(n=>Vo(n,t))}const mv=e=>!!(e&&e.__v_isRef===!0),Ee=e=>Gt(e)?e:e==null?"":Ye(e)||jt(e)&&(e.toString===fv||!at(e.toString))?mv(e)?Ee(e.value):JSON.stringify(e,vv,2):String(e),vv=(e,t)=>mv(t)?vv(e,t.value):Ua(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],a)=>(n[Zc(r,a)+" =>"]=o,n),{})}:ba(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Zc(n))}:kr(t)?Zc(t):jt(t)&&!Ye(t)&&!Wl(t)?String(t):t,Zc=(e,t="")=>{var n;return kr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
12
|
-
* @vue/reactivity v3.5.13
|
|
13
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
14
|
-
* @license MIT
|
|
15
|
-
**/let jn;class md{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=jn,!t&&jn&&(this.index=(jn.scopes||(jn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=jn;try{return jn=this,t()}finally{jn=n}}}on(){jn=this}off(){jn=this.parent}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function oA(e){return new md(e)}function vd(){return jn}function gv(e,t=!1){jn&&jn.cleanups.push(e)}let qt;const eu=new WeakSet;class Zs{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,jn&&jn.active&&jn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,eu.has(this)&&(eu.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||_v(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,sh(this),bv(this);const t=qt,n=Er;qt=this,Er=!0;try{return this.fn()}finally{wv(this),qt=t,Er=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)_d(t);this.deps=this.depsTail=void 0,sh(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?eu.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Tu(this)&&this.run()}get dirty(){return Tu(this)}}let yv=0,js,Vs;function _v(e,t=!1){if(e.flags|=8,t){e.next=Vs,Vs=e;return}e.next=js,js=e}function gd(){yv++}function yd(){if(--yv>0)return;if(Vs){let t=Vs;for(Vs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;js;){let t=js;for(js=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function bv(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function wv(e){let t,n=e.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),_d(r),aA(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function Tu(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Av(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Av(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ei))return;e.globalVersion=ei;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Tu(e)){e.flags&=-3;return}const n=qt,r=Er;qt=e,Er=!0;try{bv(e);const o=e.fn(e._value);(t.version===0||Un(o,e._value))&&(e._value=o,t.version++)}catch(o){throw t.version++,o}finally{qt=n,Er=r,wv(e),e.flags&=-3}}function _d(e,t=!1){const{dep:n,prevSub:r,nextSub:o}=e;if(r&&(r.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let a=n.computed.deps;a;a=a.nextDep)_d(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function aA(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function sA(e,t){e.effect instanceof Zs&&(e=e.effect.fn);const n=new Zs(e);t&&Ht(n,t);try{n.run()}catch(o){throw n.stop(),o}const r=n.run.bind(n);return r.effect=n,r}function iA(e){e.effect.stop()}let Er=!0;const Cv=[];function qo(){Cv.push(Er),Er=!1}function Go(){const e=Cv.pop();Er=e===void 0?!0:e}function sh(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=qt;qt=void 0;try{t()}finally{qt=n}}}let ei=0;class lA{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Yl{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!qt||!Er||qt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==qt)n=this.activeLink=new lA(qt,this),qt.deps?(n.prevDep=qt.depsTail,qt.depsTail.nextDep=n,qt.depsTail=n):qt.deps=qt.depsTail=n,$v(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=qt.depsTail,n.nextDep=void 0,qt.depsTail.nextDep=n,qt.depsTail=n,qt.deps===n&&(qt.deps=r)}return n}trigger(t){this.version++,ei++,this.notify(t)}notify(t){gd();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{yd()}}}function $v(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)$v(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const bl=new WeakMap,ua=Symbol(""),ku=Symbol(""),ti=Symbol("");function On(e,t,n){if(Er&&qt){let r=bl.get(e);r||bl.set(e,r=new Map);let o=r.get(n);o||(r.set(n,o=new Yl),o.map=r,o.key=n),o.track()}}function io(e,t,n,r,o,a){const s=bl.get(e);if(!s){ei++;return}const i=l=>{l&&l.trigger()};if(gd(),t==="clear")s.forEach(i);else{const l=Ye(e),u=l&&hd(n);if(l&&n==="length"){const c=Number(r);s.forEach((d,h)=>{(h==="length"||h===ti||!kr(h)&&h>=c)&&i(d)})}else switch((n!==void 0||s.has(void 0))&&i(s.get(n)),u&&i(s.get(ti)),t){case"add":l?u&&i(s.get("length")):(i(s.get(ua)),Ua(e)&&i(s.get(ku)));break;case"delete":l||(i(s.get(ua)),Ua(e)&&i(s.get(ku)));break;case"set":Ua(e)&&i(s.get(ua));break}}yd()}function cA(e,t){const n=bl.get(e);return n&&n.get(t)}function Oa(e){const t=vt(e);return t===e?t:(On(t,"iterate",ti),rr(e)?t:t.map(Nn))}function Xl(e){return On(e=vt(e),"iterate",ti),e}const uA={__proto__:null,[Symbol.iterator](){return tu(this,Symbol.iterator,Nn)},concat(...e){return Oa(this).concat(...e.map(t=>Ye(t)?Oa(t):t))},entries(){return tu(this,"entries",e=>(e[1]=Nn(e[1]),e))},every(e,t){return oo(this,"every",e,t,void 0,arguments)},filter(e,t){return oo(this,"filter",e,t,n=>n.map(Nn),arguments)},find(e,t){return oo(this,"find",e,t,Nn,arguments)},findIndex(e,t){return oo(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return oo(this,"findLast",e,t,Nn,arguments)},findLastIndex(e,t){return oo(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return oo(this,"forEach",e,t,void 0,arguments)},includes(...e){return nu(this,"includes",e)},indexOf(...e){return nu(this,"indexOf",e)},join(e){return Oa(this).join(e)},lastIndexOf(...e){return nu(this,"lastIndexOf",e)},map(e,t){return oo(this,"map",e,t,void 0,arguments)},pop(){return Cs(this,"pop")},push(...e){return Cs(this,"push",e)},reduce(e,...t){return ih(this,"reduce",e,t)},reduceRight(e,...t){return ih(this,"reduceRight",e,t)},shift(){return Cs(this,"shift")},some(e,t){return oo(this,"some",e,t,void 0,arguments)},splice(...e){return Cs(this,"splice",e)},toReversed(){return Oa(this).toReversed()},toSorted(e){return Oa(this).toSorted(e)},toSpliced(...e){return Oa(this).toSpliced(...e)},unshift(...e){return Cs(this,"unshift",e)},values(){return tu(this,"values",Nn)}};function tu(e,t,n){const r=Xl(e),o=r[t]();return r!==e&&!rr(e)&&(o._next=o.next,o.next=()=>{const a=o._next();return a.value&&(a.value=n(a.value)),a}),o}const dA=Array.prototype;function oo(e,t,n,r,o,a){const s=Xl(e),i=s!==e&&!rr(e),l=s[t];if(l!==dA[t]){const d=l.apply(e,a);return i?Nn(d):d}let u=n;s!==e&&(i?u=function(d,h){return n.call(this,Nn(d),h,e)}:n.length>2&&(u=function(d,h){return n.call(this,d,h,e)}));const c=l.call(s,u,r);return i&&o?o(c):c}function ih(e,t,n,r){const o=Xl(e);let a=n;return o!==e&&(rr(e)?n.length>3&&(a=function(s,i,l){return n.call(this,s,i,l,e)}):a=function(s,i,l){return n.call(this,s,Nn(i),l,e)}),o[t](a,...r)}function nu(e,t,n){const r=vt(e);On(r,"iterate",ti);const o=r[t](...n);return(o===-1||o===!1)&&tc(n[0])?(n[0]=vt(n[0]),r[t](...n)):o}function Cs(e,t,n=[]){qo(),gd();const r=vt(e)[t].apply(e,n);return yd(),Go(),r}const fA=Kl("__proto__,__v_isRef,__isVue"),Sv=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(kr));function pA(e){kr(e)||(e=String(e));const t=vt(this);return On(t,"has",e),t.hasOwnProperty(e)}class Iv{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,a=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return a;if(n==="__v_raw")return r===(o?a?Mv:Pv:a?xv:kv).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const s=Ye(t);if(!o){let l;if(s&&(l=uA[n]))return l;if(n==="hasOwnProperty")return pA}const i=Reflect.get(t,n,sn(t)?t:r);return(kr(n)?Sv.has(n):fA(n))||(o||On(t,"get",n),a)?i:sn(i)?s&&hd(n)?i:i.value:jt(i)?o?In(i):Zl(i):i}}class Ev extends Iv{constructor(t=!1){super(!1,t)}set(t,n,r,o){let a=t[n];if(!this._isShallow){const l=Uo(a);if(!rr(r)&&!Uo(r)&&(a=vt(a),r=vt(r)),!Ye(t)&&sn(a)&&!sn(r))return l?!1:(a.value=r,!0)}const s=Ye(t)&&hd(n)?Number(n)<t.length:Ot(t,n),i=Reflect.set(t,n,r,sn(t)?t:o);return t===vt(o)&&(s?Un(r,a)&&io(t,"set",n,r):io(t,"add",n,r)),i}deleteProperty(t,n){const r=Ot(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&r&&io(t,"delete",n,void 0),o}has(t,n){const r=Reflect.has(t,n);return(!kr(n)||!Sv.has(n))&&On(t,"has",n),r}ownKeys(t){return On(t,"iterate",Ye(t)?"length":ua),Reflect.ownKeys(t)}}class Tv extends Iv{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const hA=new Ev,mA=new Tv,vA=new Ev(!0),gA=new Tv(!0),xu=e=>e,Li=e=>Reflect.getPrototypeOf(e);function yA(e,t,n){return function(...r){const o=this.__v_raw,a=vt(o),s=Ua(a),i=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,u=o[e](...r),c=n?xu:t?Pu:Nn;return!t&&On(a,"iterate",l?ku:ua),{next(){const{value:d,done:h}=u.next();return h?{value:d,done:h}:{value:i?[c(d[0]),c(d[1])]:c(d),done:h}},[Symbol.iterator](){return this}}}}function Di(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function _A(e,t){const n={get(o){const a=this.__v_raw,s=vt(a),i=vt(o);e||(Un(o,i)&&On(s,"get",o),On(s,"get",i));const{has:l}=Li(s),u=t?xu:e?Pu:Nn;if(l.call(s,o))return u(a.get(o));if(l.call(s,i))return u(a.get(i));a!==s&&a.get(o)},get size(){const o=this.__v_raw;return!e&&On(vt(o),"iterate",ua),Reflect.get(o,"size",o)},has(o){const a=this.__v_raw,s=vt(a),i=vt(o);return e||(Un(o,i)&&On(s,"has",o),On(s,"has",i)),o===i?a.has(o):a.has(o)||a.has(i)},forEach(o,a){const s=this,i=s.__v_raw,l=vt(i),u=t?xu:e?Pu:Nn;return!e&&On(l,"iterate",ua),i.forEach((c,d)=>o.call(a,u(c),u(d),s))}};return Ht(n,e?{add:Di("add"),set:Di("set"),delete:Di("delete"),clear:Di("clear")}:{add(o){!t&&!rr(o)&&!Uo(o)&&(o=vt(o));const a=vt(this);return Li(a).has.call(a,o)||(a.add(o),io(a,"add",o,o)),this},set(o,a){!t&&!rr(a)&&!Uo(a)&&(a=vt(a));const s=vt(this),{has:i,get:l}=Li(s);let u=i.call(s,o);u||(o=vt(o),u=i.call(s,o));const c=l.call(s,o);return s.set(o,a),u?Un(a,c)&&io(s,"set",o,a):io(s,"add",o,a),this},delete(o){const a=vt(this),{has:s,get:i}=Li(a);let l=s.call(a,o);l||(o=vt(o),l=s.call(a,o)),i&&i.call(a,o);const u=a.delete(o);return l&&io(a,"delete",o,void 0),u},clear(){const o=vt(this),a=o.size!==0,s=o.clear();return a&&io(o,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=yA(o,e,t)}),n}function Ql(e,t){const n=_A(e,t);return(r,o,a)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Ot(n,o)&&o in r?n:r,o,a)}const bA={get:Ql(!1,!1)},wA={get:Ql(!1,!0)},AA={get:Ql(!0,!1)},CA={get:Ql(!0,!0)},kv=new WeakMap,xv=new WeakMap,Pv=new WeakMap,Mv=new WeakMap;function $A(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function SA(e){return e.__v_skip||!Object.isExtensible(e)?0:$A(K1(e))}function Zl(e){return Uo(e)?e:ec(e,!1,hA,bA,kv)}function Ov(e){return ec(e,!1,vA,wA,xv)}function In(e){return ec(e,!0,mA,AA,Pv)}function oa(e){return ec(e,!0,gA,CA,Mv)}function ec(e,t,n,r,o){if(!jt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=o.get(e);if(a)return a;const s=SA(e);if(s===0)return e;const i=new Proxy(e,s===2?r:n);return o.set(e,i),i}function Do(e){return Uo(e)?Do(e.__v_raw):!!(e&&e.__v_isReactive)}function Uo(e){return!!(e&&e.__v_isReadonly)}function rr(e){return!!(e&&e.__v_isShallow)}function tc(e){return e?!!e.__v_raw:!1}function vt(e){const t=e&&e.__v_raw;return t?vt(t):e}function Nv(e){return!Ot(e,"__v_skip")&&Object.isExtensible(e)&&pv(e,"__v_skip",!0),e}const Nn=e=>jt(e)?Zl(e):e,Pu=e=>jt(e)?In(e):e;function sn(e){return e?e.__v_isRef===!0:!1}function Ae(e){return Rv(e,!1)}function En(e){return Rv(e,!0)}function Rv(e,t){return sn(e)?e:new IA(e,t)}class IA{constructor(t,n){this.dep=new Yl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:vt(t),this._value=n?t:Nn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||rr(t)||Uo(t);t=r?t:vt(t),Un(t,n)&&(this._rawValue=t,this._value=r?t:Nn(t),this.dep.trigger())}}function EA(e){e.dep&&e.dep.trigger()}function O(e){return sn(e)?e.value:e}function TA(e){return at(e)?e():O(e)}const kA={get:(e,t,n)=>t==="__v_raw"?e:O(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return sn(o)&&!sn(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function bd(e){return Do(e)?e:new Proxy(e,kA)}class xA{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Yl,{get:r,set:o}=t(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=o}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Lv(e){return new xA(e)}function wd(e){const t=Ye(e)?new Array(e.length):{};for(const n in e)t[n]=Dv(e,n);return t}class PA{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return cA(vt(this._object),this._key)}}class MA{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function po(e,t,n){return sn(e)?e:at(e)?new MA(e):jt(e)&&arguments.length>1?Dv(e,t,n):Ae(e)}function Dv(e,t,n){const r=e[t];return sn(r)?r:new PA(e,t,n)}class OA{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Yl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ei-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&qt!==this)return _v(this,!0),!0}get value(){const t=this.dep.track();return Av(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function NA(e,t,n=!1){let r,o;return at(e)?r=e:(r=e.get,o=e.set),new OA(r,o,n)}const RA={GET:"get",HAS:"has",ITERATE:"iterate"},LA={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Bi={},wl=new WeakMap;let Mo;function DA(){return Mo}function Bv(e,t=!1,n=Mo){if(n){let r=wl.get(n);r||wl.set(n,r=[]),r.push(e)}}function BA(e,t,n=St){const{immediate:r,deep:o,once:a,scheduler:s,augmentJob:i,call:l}=n,u=p=>o?p:rr(p)||o===!1||o===0?lo(p,1):lo(p);let c,d,h,m,_=!1,v=!1;if(sn(e)?(d=()=>e.value,_=rr(e)):Do(e)?(d=()=>u(e),_=!0):Ye(e)?(v=!0,_=e.some(p=>Do(p)||rr(p)),d=()=>e.map(p=>{if(sn(p))return p.value;if(Do(p))return u(p);if(at(p))return l?l(p,2):p()})):at(e)?t?d=l?()=>l(e,2):e:d=()=>{if(h){qo();try{h()}finally{Go()}}const p=Mo;Mo=c;try{return l?l(e,3,[m]):e(m)}finally{Mo=p}}:d=dr,t&&o){const p=d,b=o===!0?1/0:o;d=()=>lo(p(),b)}const w=vd(),A=()=>{c.stop(),w&&w.active&&fd(w.effects,c)};if(a&&t){const p=t;t=(...b)=>{p(...b),A()}}let C=v?new Array(e.length).fill(Bi):Bi;const y=p=>{if(!(!(c.flags&1)||!c.dirty&&!p))if(t){const b=c.run();if(o||_||(v?b.some((I,D)=>Un(I,C[D])):Un(b,C))){h&&h();const I=Mo;Mo=c;try{const D=[b,C===Bi?void 0:v&&C[0]===Bi?[]:C,m];l?l(t,3,D):t(...D),C=b}finally{Mo=I}}}else c.run()};return i&&i(y),c=new Zs(d),c.scheduler=s?()=>s(y,!1):y,m=p=>Bv(p,!1,c),h=c.onStop=()=>{const p=wl.get(c);if(p){if(l)l(p,4);else for(const b of p)b();wl.delete(c)}},t?r?y(!0):C=c.run():s?s(y.bind(null,!0),!0):c.run(),A.pause=c.pause.bind(c),A.resume=c.resume.bind(c),A.stop=A,A}function lo(e,t=1/0,n){if(t<=0||!jt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,sn(e))lo(e.value,t,n);else if(Ye(e))for(let r=0;r<e.length;r++)lo(e[r],t,n);else if(ba(e)||Ua(e))e.forEach(r=>{lo(r,t,n)});else if(Wl(e)){for(const r in e)lo(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&lo(e[r],t,n)}return e}/**
|
|
16
|
-
* @vue/runtime-core v3.5.13
|
|
17
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
18
|
-
* @license MIT
|
|
19
|
-
**/const Fv=[];function FA(e){Fv.push(e)}function jA(){Fv.pop()}function VA(e,t){}const UA={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},HA={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function is(e,t,n,r){try{return r?e(...r):e()}catch(o){wa(o,t,n)}}function pr(e,t,n,r){if(at(e)){const o=is(e,t,n,r);return o&&pd(o)&&o.catch(a=>{wa(a,t,n)}),o}if(Ye(e)){const o=[];for(let a=0;a<e.length;a++)o.push(pr(e[a],t,n,r));return o}}function wa(e,t,n,r=!0){const o=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||St;if(t){let i=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;i;){const c=i.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}i=i.parent}if(a){qo(),is(a,null,10,[e,l,u]),Go();return}}zA(e,n,o,r,s)}function zA(e,t,n,r=!0,o=!1){if(o)throw e;console.error(e)}const Hn=[];let Dr=-1;const Ka=[];let Oo=null,Da=0;const jv=Promise.resolve();let Al=null;function ar(e){const t=Al||jv;return e?t.then(this?e.bind(this):e):t}function KA(e){let t=Dr+1,n=Hn.length;for(;t<n;){const r=t+n>>>1,o=Hn[r],a=ri(o);a<e||a===e&&o.flags&2?t=r+1:n=r}return t}function Ad(e){if(!(e.flags&1)){const t=ri(e),n=Hn[Hn.length-1];!n||!(e.flags&2)&&t>=ri(n)?Hn.push(e):Hn.splice(KA(t),0,e),e.flags|=1,Vv()}}function Vv(){Al||(Al=jv.then(Uv))}function ni(e){Ye(e)?Ka.push(...e):Oo&&e.id===-1?Oo.splice(Da+1,0,e):e.flags&1||(Ka.push(e),e.flags|=1),Vv()}function lh(e,t,n=Dr+1){for(;n<Hn.length;n++){const r=Hn[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;Hn.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Cl(e){if(Ka.length){const t=[...new Set(Ka)].sort((n,r)=>ri(n)-ri(r));if(Ka.length=0,Oo){Oo.push(...t);return}for(Oo=t,Da=0;Da<Oo.length;Da++){const n=Oo[Da];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Oo=null,Da=0}}const ri=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Uv(e){try{for(Dr=0;Dr<Hn.length;Dr++){const t=Hn[Dr];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),is(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Dr<Hn.length;Dr++){const t=Hn[Dr];t&&(t.flags&=-2)}Dr=-1,Hn.length=0,Cl(),Al=null,(Hn.length||Ka.length)&&Uv()}}let Ba,Fi=[];function Hv(e,t){var n,r;Ba=e,Ba?(Ba.enabled=!0,Fi.forEach(({event:o,args:a})=>Ba.emit(o,...a)),Fi=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(a=>{Hv(a,t)}),setTimeout(()=>{Ba||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Fi=[])},3e3)):Fi=[]}let mn=null,nc=null;function oi(e){const t=mn;return mn=e,nc=e&&e.type.__scopeId||null,t}function WA(e){nc=e}function qA(){nc=null}const GA=e=>Je;function Je(e,t=mn,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&Fu(-1);const a=oi(t);let s;try{s=e(...o)}finally{oi(a),r._d&&Fu(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function Dn(e,t){if(mn===null)return e;const n=mi(mn),r=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[a,s,i,l=St]=t[o];a&&(at(a)&&(a={mounted:a,updated:a}),a.deep&&lo(s),r.push({dir:a,instance:n,value:s,oldValue:void 0,arg:i,modifiers:l}))}return e}function Br(e,t,n,r){const o=e.dirs,a=t&&t.dirs;for(let s=0;s<o.length;s++){const i=o[s];a&&(i.oldValue=a[s].value);let l=i.dir[r];l&&(qo(),pr(l,n,8,[e.el,i,e,t]),Go())}}const zv=Symbol("_vte"),Kv=e=>e.__isTeleport,Us=e=>e&&(e.disabled||e.disabled===""),ch=e=>e&&(e.defer||e.defer===""),uh=e=>typeof SVGElement<"u"&&e instanceof SVGElement,dh=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Mu=(e,t)=>{const n=e&&e.to;return Gt(n)?t?t(n):null:n},Wv={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,a,s,i,l,u){const{mc:c,pc:d,pbc:h,o:{insert:m,querySelector:_,createText:v,createComment:w}}=u,A=Us(t.props);let{shapeFlag:C,children:y,dynamicChildren:p}=t;if(e==null){const b=t.el=v(""),I=t.anchor=v("");m(b,n,r),m(I,n,r);const D=(G,Z)=>{C&16&&(o&&o.isCE&&(o.ce._teleportTarget=G),c(y,G,Z,o,a,s,i,l))},K=()=>{const G=t.target=Mu(t.props,_),Z=Gv(G,t,v,m);G&&(s!=="svg"&&uh(G)?s="svg":s!=="mathml"&&dh(G)&&(s="mathml"),A||(D(G,Z),il(t,!1)))};A&&(D(n,I),il(t,!0)),ch(t.props)?fn(()=>{K(),t.el.__isMounted=!0},a):K()}else{if(ch(t.props)&&!e.el.__isMounted){fn(()=>{Wv.process(e,t,n,r,o,a,s,i,l,u),delete e.el.__isMounted},a);return}t.el=e.el,t.targetStart=e.targetStart;const b=t.anchor=e.anchor,I=t.target=e.target,D=t.targetAnchor=e.targetAnchor,K=Us(e.props),G=K?n:I,Z=K?b:D;if(s==="svg"||uh(I)?s="svg":(s==="mathml"||dh(I))&&(s="mathml"),p?(h(e.dynamicChildren,p,G,o,a,s,i),Md(e,t,!0)):l||d(e,t,G,Z,o,a,s,i,!1),A)K?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ji(t,n,b,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const be=t.target=Mu(t.props,_);be&&ji(t,be,null,u,0)}else K&&ji(t,I,D,u,1);il(t,A)}},remove(e,t,n,{um:r,o:{remove:o}},a){const{shapeFlag:s,children:i,anchor:l,targetStart:u,targetAnchor:c,target:d,props:h}=e;if(d&&(o(u),o(c)),a&&o(l),s&16){const m=a||!Us(h);for(let _=0;_<i.length;_++){const v=i[_];r(v,t,n,m,!!v.dynamicChildren)}}},move:ji,hydrate:JA};function ji(e,t,n,{o:{insert:r},m:o},a=2){a===0&&r(e.targetAnchor,t,n);const{el:s,anchor:i,shapeFlag:l,children:u,props:c}=e,d=a===2;if(d&&r(s,t,n),(!d||Us(c))&&l&16)for(let h=0;h<u.length;h++)o(u[h],t,n,2);d&&r(i,t,n)}function JA(e,t,n,r,o,a,{o:{nextSibling:s,parentNode:i,querySelector:l,insert:u,createText:c}},d){const h=t.target=Mu(t.props,l);if(h){const m=Us(t.props),_=h._lpa||h.firstChild;if(t.shapeFlag&16)if(m)t.anchor=d(s(e),t,i(e),n,r,o,a),t.targetStart=_,t.targetAnchor=_&&s(_);else{t.anchor=s(e);let v=_;for(;v;){if(v&&v.nodeType===8){if(v.data==="teleport start anchor")t.targetStart=v;else if(v.data==="teleport anchor"){t.targetAnchor=v,h._lpa=t.targetAnchor&&s(t.targetAnchor);break}}v=s(v)}t.targetAnchor||Gv(h,t,c,u),d(_&&s(_),t,h,n,r,o,a)}il(t,m)}return t.anchor&&s(t.anchor)}const qv=Wv;function il(e,t){const n=e.ctx;if(n&&n.ut){let r,o;for(t?(r=e.el,o=e.anchor):(r=e.targetStart,o=e.targetAnchor);r&&r!==o;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function Gv(e,t,n,r){const o=t.targetStart=n(""),a=t.targetAnchor=n("");return o[zv]=a,e&&(r(o,e),r(a,e)),a}const No=Symbol("_leaveCb"),Vi=Symbol("_enterCb");function Cd(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ln(()=>{e.isMounted=!0}),_o(()=>{e.isUnmounting=!0}),e}const ir=[Function,Array],$d={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ir,onEnter:ir,onAfterEnter:ir,onEnterCancelled:ir,onBeforeLeave:ir,onLeave:ir,onAfterLeave:ir,onLeaveCancelled:ir,onBeforeAppear:ir,onAppear:ir,onAfterAppear:ir,onAppearCancelled:ir},Jv=e=>{const t=e.subTree;return t.component?Jv(t.component):t},YA={name:"BaseTransition",props:$d,setup(e,{slots:t}){const n=hr(),r=Cd();return()=>{const o=t.default&&rc(t.default(),!0);if(!o||!o.length)return;const a=Yv(o),s=vt(e),{mode:i}=s;if(r.isLeaving)return ru(a);const l=fh(a);if(!l)return ru(a);let u=Xa(l,s,r,n,d=>u=d);l.type!==an&&ho(l,u);let c=n.subTree&&fh(n.subTree);if(c&&c.type!==an&&!Sr(l,c)&&Jv(n).type!==an){let d=Xa(c,s,r,n);if(ho(c,d),i==="out-in"&&l.type!==an)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},ru(a);i==="in-out"&&l.type!==an?d.delayLeave=(h,m,_)=>{const v=Qv(r,c);v[String(c.key)]=c,h[No]=()=>{m(),h[No]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{_(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return a}}};function Yv(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==an){t=n;break}}return t}const Xv=YA;function Qv(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Xa(e,t,n,r,o){const{appear:a,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:h,onLeave:m,onAfterLeave:_,onLeaveCancelled:v,onBeforeAppear:w,onAppear:A,onAfterAppear:C,onAppearCancelled:y}=t,p=String(e.key),b=Qv(n,e),I=(G,Z)=>{G&&pr(G,r,9,Z)},D=(G,Z)=>{const be=Z[1];I(G,Z),Ye(G)?G.every(ce=>ce.length<=1)&&be():G.length<=1&&be()},K={mode:s,persisted:i,beforeEnter(G){let Z=l;if(!n.isMounted)if(a)Z=w||l;else return;G[No]&&G[No](!0);const be=b[p];be&&Sr(e,be)&&be.el[No]&&be.el[No](),I(Z,[G])},enter(G){let Z=u,be=c,ce=d;if(!n.isMounted)if(a)Z=A||u,be=C||c,ce=y||d;else return;let ge=!1;const de=G[Vi]=He=>{ge||(ge=!0,He?I(ce,[G]):I(be,[G]),K.delayedLeave&&K.delayedLeave(),G[Vi]=void 0)};Z?D(Z,[G,de]):de()},leave(G,Z){const be=String(e.key);if(G[Vi]&&G[Vi](!0),n.isUnmounting)return Z();I(h,[G]);let ce=!1;const ge=G[No]=de=>{ce||(ce=!0,Z(),de?I(v,[G]):I(_,[G]),G[No]=void 0,b[be]===e&&delete b[be])};b[be]=e,m?D(m,[G,ge]):ge()},clone(G){const Z=Xa(G,t,n,r,o);return o&&o(Z),Z}};return K}function ru(e){if(pi(e))return e=qr(e),e.children=null,e}function fh(e){if(!pi(e))return Kv(e.type)&&e.children?Yv(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&at(n.default))return n.default()}}function ho(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ho(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function rc(e,t=!1,n){let r=[],o=0;for(let a=0;a<e.length;a++){let s=e[a];const i=n==null?s.key:String(n)+String(s.key!=null?s.key:a);s.type===We?(s.patchFlag&128&&o++,r=r.concat(rc(s.children,t,i))):(t||s.type!==an)&&r.push(i!=null?qr(s,{key:i}):s)}if(o>1)for(let a=0;a<r.length;a++)r[a].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function we(e,t){return at(e)?Ht({name:e.name},t,{setup:e}):e}function XA(){const e=hr();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function Sd(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ot(e){const t=hr(),n=En(null);if(t){const o=t.refs===St?t.refs={}:t.refs;Object.defineProperty(o,e,{enumerable:!0,get:()=>n.value,set:a=>n.value=a})}return n}function ai(e,t,n,r,o=!1){if(Ye(e)){e.forEach((_,v)=>ai(_,t&&(Ye(t)?t[v]:t),n,r,o));return}if(Bo(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&ai(e,t,n,r.component.subTree);return}const a=r.shapeFlag&4?mi(r.component):r.el,s=o?null:a,{i,r:l}=e,u=t&&t.r,c=i.refs===St?i.refs={}:i.refs,d=i.setupState,h=vt(d),m=d===St?()=>!1:_=>Ot(h,_);if(u!=null&&u!==l&&(Gt(u)?(c[u]=null,m(u)&&(d[u]=null)):sn(u)&&(u.value=null)),at(l))is(l,i,12,[s,c]);else{const _=Gt(l),v=sn(l);if(_||v){const w=()=>{if(e.f){const A=_?m(l)?d[l]:c[l]:l.value;o?Ye(A)&&fd(A,a):Ye(A)?A.includes(a)||A.push(a):_?(c[l]=[a],m(l)&&(d[l]=c[l])):(l.value=[a],e.k&&(c[e.k]=l.value))}else _?(c[l]=s,m(l)&&(d[l]=s)):v&&(l.value=s,e.k&&(c[e.k]=s))};s?(w.id=-1,fn(w,n)):w()}}}let ph=!1;const Na=()=>{ph||(console.error("Hydration completed but contains mismatches."),ph=!0)},QA=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",ZA=e=>e.namespaceURI.includes("MathML"),Ui=e=>{if(e.nodeType===1){if(QA(e))return"svg";if(ZA(e))return"mathml"}},ja=e=>e.nodeType===8;function eC(e){const{mt:t,p:n,o:{patchProp:r,createText:o,nextSibling:a,parentNode:s,remove:i,insert:l,createComment:u}}=e,c=(y,p)=>{if(!p.hasChildNodes()){n(null,y,p),Cl(),p._vnode=y;return}d(p.firstChild,y,null,null,null),Cl(),p._vnode=y},d=(y,p,b,I,D,K=!1)=>{K=K||!!p.dynamicChildren;const G=ja(y)&&y.data==="[",Z=()=>v(y,p,b,I,D,G),{type:be,ref:ce,shapeFlag:ge,patchFlag:de}=p;let He=y.nodeType;p.el=y,de===-2&&(K=!1,p.dynamicChildren=null);let Ce=null;switch(be){case Fo:He!==3?p.children===""?(l(p.el=o(""),s(y),y),Ce=y):Ce=Z():(y.data!==p.children&&(Na(),y.data=p.children),Ce=a(y));break;case an:C(y)?(Ce=a(y),A(p.el=y.content.firstChild,y,b)):He!==8||G?Ce=Z():Ce=a(y);break;case fa:if(G&&(y=a(y),He=y.nodeType),He===1||He===3){Ce=y;const fe=!p.children.length;for(let he=0;he<p.staticCount;he++)fe&&(p.children+=Ce.nodeType===1?Ce.outerHTML:Ce.data),he===p.staticCount-1&&(p.anchor=Ce),Ce=a(Ce);return G?a(Ce):Ce}else Z();break;case We:G?Ce=_(y,p,b,I,D,K):Ce=Z();break;default:if(ge&1)(He!==1||p.type.toLowerCase()!==y.tagName.toLowerCase())&&!C(y)?Ce=Z():Ce=h(y,p,b,I,D,K);else if(ge&6){p.slotScopeIds=D;const fe=s(y);if(G?Ce=w(y):ja(y)&&y.data==="teleport start"?Ce=w(y,y.data,"teleport end"):Ce=a(y),t(p,fe,null,b,I,Ui(fe),K),Bo(p)&&!p.type.__asyncResolved){let he;G?(he=Le(We),he.anchor=Ce?Ce.previousSibling:fe.lastChild):he=y.nodeType===3?tn(""):Le("div"),he.el=y,p.component.subTree=he}}else ge&64?He!==8?Ce=Z():Ce=p.type.hydrate(y,p,b,I,D,K,e,m):ge&128&&(Ce=p.type.hydrate(y,p,b,I,Ui(s(y)),D,K,e,d))}return ce!=null&&ai(ce,null,I,p),Ce},h=(y,p,b,I,D,K)=>{K=K||!!p.dynamicChildren;const{type:G,props:Z,patchFlag:be,shapeFlag:ce,dirs:ge,transition:de}=p,He=G==="input"||G==="option";if(He||be!==-1){ge&&Br(p,null,b,"created");let Ce=!1;if(C(y)){Ce=$g(null,de)&&b&&b.vnode.props&&b.vnode.props.appear;const he=y.content.firstChild;Ce&&de.beforeEnter(he),A(he,y,b),p.el=y=he}if(ce&16&&!(Z&&(Z.innerHTML||Z.textContent))){let he=m(y.firstChild,p,y,b,I,D,K);for(;he;){Hi(y,1)||Na();const Ne=he;he=he.nextSibling,i(Ne)}}else if(ce&8){let he=p.children;he[0]===`
|
|
20
|
-
`&&(y.tagName==="PRE"||y.tagName==="TEXTAREA")&&(he=he.slice(1)),y.textContent!==he&&(Hi(y,0)||Na(),y.textContent=p.children)}if(Z){if(He||!K||be&48){const he=y.tagName.includes("-");for(const Ne in Z)(He&&(Ne.endsWith("value")||Ne==="indeterminate")||di(Ne)&&!Ha(Ne)||Ne[0]==="."||he)&&r(y,Ne,null,Z[Ne],void 0,b)}else if(Z.onClick)r(y,"onClick",null,Z.onClick,void 0,b);else if(be&4&&Do(Z.style))for(const he in Z.style)Z.style[he]}let fe;(fe=Z&&Z.onVnodeBeforeMount)&&Wn(fe,b,p),ge&&Br(p,null,b,"beforeMount"),((fe=Z&&Z.onVnodeMounted)||ge||Ce)&&Og(()=>{fe&&Wn(fe,b,p),Ce&&de.enter(y),ge&&Br(p,null,b,"mounted")},I)}return y.nextSibling},m=(y,p,b,I,D,K,G)=>{G=G||!!p.dynamicChildren;const Z=p.children,be=Z.length;for(let ce=0;ce<be;ce++){const ge=G?Z[ce]:Z[ce]=Gn(Z[ce]),de=ge.type===Fo;y?(de&&!G&&ce+1<be&&Gn(Z[ce+1]).type===Fo&&(l(o(y.data.slice(ge.children.length)),b,a(y)),y.data=ge.children),y=d(y,ge,I,D,K,G)):de&&!ge.children?l(ge.el=o(""),b):(Hi(b,1)||Na(),n(null,ge,b,null,I,D,Ui(b),K))}return y},_=(y,p,b,I,D,K)=>{const{slotScopeIds:G}=p;G&&(D=D?D.concat(G):G);const Z=s(y),be=m(a(y),p,Z,b,I,D,K);return be&&ja(be)&&be.data==="]"?a(p.anchor=be):(Na(),l(p.anchor=u("]"),Z,be),be)},v=(y,p,b,I,D,K)=>{if(Hi(y.parentElement,1)||Na(),p.el=null,K){const be=w(y);for(;;){const ce=a(y);if(ce&&ce!==be)i(ce);else break}}const G=a(y),Z=s(y);return i(y),n(null,p,Z,G,b,I,Ui(Z),D),b&&(b.vnode.el=p.el,ic(b,p.el)),G},w=(y,p="[",b="]")=>{let I=0;for(;y;)if(y=a(y),y&&ja(y)&&(y.data===p&&I++,y.data===b)){if(I===0)return a(y);I--}return y},A=(y,p,b)=>{const I=p.parentNode;I&&I.replaceChild(y,p);let D=b;for(;D;)D.vnode.el===p&&(D.vnode.el=D.subTree.el=y),D=D.parent},C=y=>y.nodeType===1&&y.tagName==="TEMPLATE";return[c,d]}const hh="data-allow-mismatch",tC={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Hi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(hh);)e=e.parentElement;const n=e&&e.getAttribute(hh);if(n==null)return!1;if(n==="")return!0;{const r=n.split(",");return t===0&&r.includes("children")?!0:n.split(",").includes(tC[t])}}const nC=Gl().requestIdleCallback||(e=>setTimeout(e,1)),rC=Gl().cancelIdleCallback||(e=>clearTimeout(e)),oC=(e=1e4)=>t=>{const n=nC(t,{timeout:e});return()=>rC(n)};function aC(e){const{top:t,left:n,bottom:r,right:o}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:s}=window;return(t>0&&t<a||r>0&&r<a)&&(n>0&&n<s||o>0&&o<s)}const sC=e=>(t,n)=>{const r=new IntersectionObserver(o=>{for(const a of o)if(a.isIntersecting){r.disconnect(),t();break}},e);return n(o=>{if(o instanceof Element){if(aC(o))return t(),r.disconnect(),!1;r.observe(o)}}),()=>r.disconnect()},iC=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},lC=(e=[])=>(t,n)=>{Gt(e)&&(e=[e]);let r=!1;const o=s=>{r||(r=!0,a(),t(),s.target.dispatchEvent(new s.constructor(s.type,s)))},a=()=>{n(s=>{for(const i of e)s.removeEventListener(i,o)})};return n(s=>{for(const i of e)s.addEventListener(i,o,{once:!0})}),a};function cC(e,t){if(ja(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(ja(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}const Bo=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function pa(e){at(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,hydrate:a,timeout:s,suspensible:i=!0,onError:l}=e;let u=null,c,d=0;const h=()=>(d++,u=null,m()),m=()=>{let _;return u||(_=u=t().catch(v=>{if(v=v instanceof Error?v:new Error(String(v)),l)return new Promise((w,A)=>{l(v,()=>w(h()),()=>A(v),d+1)});throw v}).then(v=>_!==u&&u?u:(v&&(v.__esModule||v[Symbol.toStringTag]==="Module")&&(v=v.default),c=v,v)))};return we({name:"AsyncComponentWrapper",__asyncLoader:m,__asyncHydrate(_,v,w){const A=a?()=>{const C=a(w,y=>cC(_,y));C&&(v.bum||(v.bum=[])).push(C)}:w;c?A():m().then(()=>!v.isUnmounted&&A())},get __asyncResolved(){return c},setup(){const _=hn;if(Sd(_),c)return()=>ou(c,_);const v=y=>{u=null,wa(y,_,13,!r)};if(i&&_.suspense||Qa)return m().then(y=>()=>ou(y,_)).catch(y=>(v(y),()=>r?Le(r,{error:y}):null));const w=Ae(!1),A=Ae(),C=Ae(!!o);return o&&setTimeout(()=>{C.value=!1},o),s!=null&&setTimeout(()=>{if(!w.value&&!A.value){const y=new Error(`Async component timed out after ${s}ms.`);v(y),A.value=y}},s),m().then(()=>{w.value=!0,_.parent&&pi(_.parent.vnode)&&_.parent.update()}).catch(y=>{v(y),A.value=y}),()=>{if(w.value&&c)return ou(c,_);if(A.value&&r)return Le(r,{error:A.value});if(n&&!C.value)return Le(n)}}})}function ou(e,t){const{ref:n,props:r,children:o,ce:a}=t.vnode,s=Le(e,r,o);return s.ref=n,s.ce=a,delete t.vnode.ce,s}const pi=e=>e.type.__isKeepAlive,uC={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=hr(),r=n.ctx;if(!r.renderer)return()=>{const C=t.default&&t.default();return C&&C.length===1?C[0]:C};const o=new Map,a=new Set;let s=null;const i=n.suspense,{renderer:{p:l,m:u,um:c,o:{createElement:d}}}=r,h=d("div");r.activate=(C,y,p,b,I)=>{const D=C.component;u(C,y,p,0,i),l(D.vnode,C,y,p,D,i,b,C.slotScopeIds,I),fn(()=>{D.isDeactivated=!1,D.a&&za(D.a);const K=C.props&&C.props.onVnodeMounted;K&&Wn(K,D.parent,C)},i)},r.deactivate=C=>{const y=C.component;Sl(y.m),Sl(y.a),u(C,h,null,1,i),fn(()=>{y.da&&za(y.da);const p=C.props&&C.props.onVnodeUnmounted;p&&Wn(p,y.parent,C),y.isDeactivated=!0},i)};function m(C){au(C),c(C,n,i,!0)}function _(C){o.forEach((y,p)=>{const b=zu(y.type);b&&!C(b)&&v(p)})}function v(C){const y=o.get(C);y&&(!s||!Sr(y,s))?m(y):s&&au(s),o.delete(C),a.delete(C)}Ue(()=>[e.include,e.exclude],([C,y])=>{C&&_(p=>Ns(C,p)),y&&_(p=>!Ns(y,p))},{flush:"post",deep:!0});let w=null;const A=()=>{w!=null&&(Il(n.subTree.type)?fn(()=>{o.set(w,zi(n.subTree))},n.subTree.suspense):o.set(w,zi(n.subTree)))};return ln(A),ac(A),_o(()=>{o.forEach(C=>{const{subTree:y,suspense:p}=n,b=zi(y);if(C.type===b.type&&C.key===b.key){au(b);const I=b.component.da;I&&fn(I,p);return}m(C)})}),()=>{if(w=null,!t.default)return s=null;const C=t.default(),y=C[0];if(C.length>1)return s=null,C;if(!mo(y)||!(y.shapeFlag&4)&&!(y.shapeFlag&128))return s=null,y;let p=zi(y);if(p.type===an)return s=null,p;const b=p.type,I=zu(Bo(p)?p.type.__asyncResolved||{}:b),{include:D,exclude:K,max:G}=e;if(D&&(!I||!Ns(D,I))||K&&I&&Ns(K,I))return p.shapeFlag&=-257,s=p,y;const Z=p.key==null?b:p.key,be=o.get(Z);return p.el&&(p=qr(p),y.shapeFlag&128&&(y.ssContent=p)),w=Z,be?(p.el=be.el,p.component=be.component,p.transition&&ho(p,p.transition),p.shapeFlag|=512,a.delete(Z),a.add(Z)):(a.add(Z),G&&a.size>parseInt(G,10)&&v(a.values().next().value)),p.shapeFlag|=256,s=p,Il(y.type)?y:p}}},dC=uC;function Ns(e,t){return Ye(e)?e.some(n=>Ns(n,t)):Gt(e)?e.split(",").includes(t):z1(e)?(e.lastIndex=0,e.test(t)):!1}function Zv(e,t){tg(e,"a",t)}function eg(e,t){tg(e,"da",t)}function tg(e,t,n=hn){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(oc(t,r,n),n){let o=n.parent;for(;o&&o.parent;)pi(o.parent.vnode)&&fC(r,t,n,o),o=o.parent}}function fC(e,t,n,r){const o=oc(t,e,r,!0);Nr(()=>{fd(r[t],o)},n)}function au(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function zi(e){return e.shapeFlag&128?e.ssContent:e}function oc(e,t,n=hn,r=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...s)=>{qo();const i=ma(n),l=pr(t,n,e,s);return i(),Go(),l});return r?o.unshift(a):o.push(a),a}}const yo=e=>(t,n=hn)=>{(!Qa||e==="sp")&&oc(e,(...r)=>t(...r),n)},ls=yo("bm"),ln=yo("m"),Id=yo("bu"),ac=yo("u"),_o=yo("bum"),Nr=yo("um"),ng=yo("sp"),rg=yo("rtg"),og=yo("rtc");function ag(e,t=hn){oc("ec",e,t)}const Ed="components",pC="directives";function hC(e,t){return Td(Ed,e,!0,t)||e}const sg=Symbol.for("v-ndc");function cs(e){return Gt(e)?Td(Ed,e,!1)||e:e||sg}function ig(e){return Td(pC,e)}function Td(e,t,n=!0,r=!1){const o=mn||hn;if(o){const a=o.type;if(e===Ed){const i=zu(a,!1);if(i&&(i===t||i===kn(t)||i===fi(kn(t))))return a}const s=mh(o[e]||a[e],t)||mh(o.appContext[e],t);return!s&&r?a:s}}function mh(e,t){return e&&(e[t]||e[kn(t)]||e[fi(kn(t))])}function Pt(e,t,n,r){let o;const a=n&&n[r],s=Ye(e);if(s||Gt(e)){const i=s&&Do(e);let l=!1;i&&(l=!rr(e),e=Xl(e)),o=new Array(e.length);for(let u=0,c=e.length;u<c;u++)o[u]=t(l?Nn(e[u]):e[u],u,void 0,a&&a[u])}else if(typeof e=="number"){o=new Array(e);for(let i=0;i<e;i++)o[i]=t(i+1,i,void 0,a&&a[i])}else if(jt(e))if(e[Symbol.iterator])o=Array.from(e,(i,l)=>t(i,l,void 0,a&&a[l]));else{const i=Object.keys(e);o=new Array(i.length);for(let l=0,u=i.length;l<u;l++){const c=i[l];o[l]=t(e[c],c,l,a&&a[l])}}else o=[];return n&&(n[r]=o),o}function mC(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(Ye(r))for(let o=0;o<r.length;o++)e[r[o].name]=r[o].fn;else r&&(e[r.name]=r.key?(...o)=>{const a=r.fn(...o);return a&&(a.key=r.key),a}:r.fn)}return e}function Vt(e,t,n={},r,o){if(mn.ce||mn.parent&&Bo(mn.parent)&&mn.parent.ce)return t!=="default"&&(n.name=t),k(),Oe(We,null,[Le("slot",n,r&&r())],64);let a=e[t];a&&a._c&&(a._d=!1),k();const s=a&&kd(a(n)),i=n.key||s&&s.key,l=Oe(We,{key:(i&&!kr(i)?i:`_${t}`)+(!s&&r?"_fb":"")},s||(r?r():[]),s&&e._===1?64:-2);return!o&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),a&&a._c&&(a._d=!0),l}function kd(e){return e.some(t=>mo(t)?!(t.type===an||t.type===We&&!kd(t.children)):!0)?e:null}function vC(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:Fs(r)]=e[r];return n}const Ou=e=>e?Fg(e)?mi(e):Ou(e.parent):null,Hs=Ht(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ou(e.parent),$root:e=>Ou(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>xd(e),$forceUpdate:e=>e.f||(e.f=()=>{Ad(e.update)}),$nextTick:e=>e.n||(e.n=ar.bind(e.proxy)),$watch:e=>qC.bind(e)}),su=(e,t)=>e!==St&&!e.__isScriptSetup&&Ot(e,t),Nu={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:a,accessCache:s,type:i,appContext:l}=e;let u;if(t[0]!=="$"){const m=s[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(su(r,t))return s[t]=1,r[t];if(o!==St&&Ot(o,t))return s[t]=2,o[t];if((u=e.propsOptions[0])&&Ot(u,t))return s[t]=3,a[t];if(n!==St&&Ot(n,t))return s[t]=4,n[t];Ru&&(s[t]=0)}}const c=Hs[t];let d,h;if(c)return t==="$attrs"&&On(e.attrs,"get",""),c(e);if((d=i.__cssModules)&&(d=d[t]))return d;if(n!==St&&Ot(n,t))return s[t]=4,n[t];if(h=l.config.globalProperties,Ot(h,t))return h[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:a}=e;return su(o,t)?(o[t]=n,!0):r!==St&&Ot(r,t)?(r[t]=n,!0):Ot(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:a}},s){let i;return!!n[s]||e!==St&&Ot(e,s)||su(t,s)||(i=a[0])&&Ot(i,s)||Ot(r,s)||Ot(Hs,s)||Ot(o.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ot(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},gC=Ht({},Nu,{get(e,t){if(t!==Symbol.unscopables)return Nu.get(e,t,e)},has(e,t){return t[0]!=="_"&&!J1(t)}});function yC(){return null}function _C(){return null}function bC(e){}function wC(e){}function AC(){return null}function CC(){}function $C(e,t){return null}function SC(){return lg().slots}function IC(){return lg().attrs}function lg(){const e=hr();return e.setupContext||(e.setupContext=Ug(e))}function si(e){return Ye(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function EC(e,t){const n=si(e);for(const r in t){if(r.startsWith("__skip"))continue;let o=n[r];o?Ye(o)||at(o)?o=n[r]={type:o,default:t[r]}:o.default=t[r]:o===null&&(o=n[r]={default:t[r]}),o&&t[`__skip_${r}`]&&(o.skipFactory=!0)}return n}function Wr(e,t){return!e||!t?e||t:Ye(e)&&Ye(t)?e.concat(t):Ht({},si(e),si(t))}function TC(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function kC(e){const t=hr();let n=e();return Vu(),pd(n)&&(n=n.catch(r=>{throw ma(t),r})),[n,()=>ma(t)]}let Ru=!0;function xC(e){const t=xd(e),n=e.proxy,r=e.ctx;Ru=!1,t.beforeCreate&&vh(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:s,watch:i,provide:l,inject:u,created:c,beforeMount:d,mounted:h,beforeUpdate:m,updated:_,activated:v,deactivated:w,beforeDestroy:A,beforeUnmount:C,destroyed:y,unmounted:p,render:b,renderTracked:I,renderTriggered:D,errorCaptured:K,serverPrefetch:G,expose:Z,inheritAttrs:be,components:ce,directives:ge,filters:de}=t;if(u&&PC(u,r,null),s)for(const fe in s){const he=s[fe];at(he)&&(r[fe]=he.bind(n))}if(o){const fe=o.call(n,n);jt(fe)&&(e.data=Zl(fe))}if(Ru=!0,a)for(const fe in a){const he=a[fe],Ne=at(he)?he.bind(n,n):at(he.get)?he.get.bind(n,n):dr,me=!at(he)&&at(he.set)?he.set.bind(n):dr,z=H({get:Ne,set:me});Object.defineProperty(r,fe,{enumerable:!0,configurable:!0,get:()=>z.value,set:ue=>z.value=ue})}if(i)for(const fe in i)cg(i[fe],r,n,fe);if(l){const fe=at(l)?l.call(n):l;Reflect.ownKeys(fe).forEach(he=>{dg(he,fe[he])})}c&&vh(c,e,"c");function Ce(fe,he){Ye(he)?he.forEach(Ne=>fe(Ne.bind(n))):he&&fe(he.bind(n))}if(Ce(ls,d),Ce(ln,h),Ce(Id,m),Ce(ac,_),Ce(Zv,v),Ce(eg,w),Ce(ag,K),Ce(og,I),Ce(rg,D),Ce(_o,C),Ce(Nr,p),Ce(ng,G),Ye(Z))if(Z.length){const fe=e.exposed||(e.exposed={});Z.forEach(he=>{Object.defineProperty(fe,he,{get:()=>n[he],set:Ne=>n[he]=Ne})})}else e.exposed||(e.exposed={});b&&e.render===dr&&(e.render=b),be!=null&&(e.inheritAttrs=be),ce&&(e.components=ce),ge&&(e.directives=ge),G&&Sd(e)}function PC(e,t,n=dr){Ye(e)&&(e=Lu(e));for(const r in e){const o=e[r];let a;jt(o)?"default"in o?a=te(o.from||r,o.default,!0):a=te(o.from||r):a=te(o),sn(a)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>a.value,set:s=>a.value=s}):t[r]=a}}function vh(e,t,n){pr(Ye(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function cg(e,t,n,r){let o=r.includes(".")?kg(n,r):()=>n[r];if(Gt(e)){const a=t[e];at(a)&&Ue(o,a)}else if(at(e))Ue(o,e.bind(n));else if(jt(e))if(Ye(e))e.forEach(a=>cg(a,t,n,r));else{const a=at(e.handler)?e.handler.bind(n):t[e.handler];at(a)&&Ue(o,a,e)}}function xd(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:s}}=e.appContext,i=a.get(t);let l;return i?l=i:!o.length&&!n&&!r?l=t:(l={},o.length&&o.forEach(u=>$l(l,u,s,!0)),$l(l,t,s)),jt(t)&&a.set(t,l),l}function $l(e,t,n,r=!1){const{mixins:o,extends:a}=t;a&&$l(e,a,n,!0),o&&o.forEach(s=>$l(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const i=MC[s]||n&&n[s];e[s]=i?i(e[s],t[s]):t[s]}return e}const MC={data:gh,props:yh,emits:yh,methods:Rs,computed:Rs,beforeCreate:Fn,created:Fn,beforeMount:Fn,mounted:Fn,beforeUpdate:Fn,updated:Fn,beforeDestroy:Fn,beforeUnmount:Fn,destroyed:Fn,unmounted:Fn,activated:Fn,deactivated:Fn,errorCaptured:Fn,serverPrefetch:Fn,components:Rs,directives:Rs,watch:NC,provide:gh,inject:OC};function gh(e,t){return t?e?function(){return Ht(at(e)?e.call(this,this):e,at(t)?t.call(this,this):t)}:t:e}function OC(e,t){return Rs(Lu(e),Lu(t))}function Lu(e){if(Ye(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Fn(e,t){return e?[...new Set([].concat(e,t))]:t}function Rs(e,t){return e?Ht(Object.create(null),e,t):t}function yh(e,t){return e?Ye(e)&&Ye(t)?[...new Set([...e,...t])]:Ht(Object.create(null),si(e),si(t??{})):t}function NC(e,t){if(!e)return t;if(!t)return e;const n=Ht(Object.create(null),e);for(const r in t)n[r]=Fn(e[r],t[r]);return n}function ug(){return{app:null,config:{isNativeTag:U1,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let RC=0;function LC(e,t){return function(r,o=null){at(r)||(r=Ht({},r)),o!=null&&!jt(o)&&(o=null);const a=ug(),s=new WeakSet,i=[];let l=!1;const u=a.app={_uid:RC++,_component:r,_props:o,_container:null,_context:a,_instance:null,version:zg,get config(){return a.config},set config(c){},use(c,...d){return s.has(c)||(c&&at(c.install)?(s.add(c),c.install(u,...d)):at(c)&&(s.add(c),c(u,...d))),u},mixin(c){return a.mixins.includes(c)||a.mixins.push(c),u},component(c,d){return d?(a.components[c]=d,u):a.components[c]},directive(c,d){return d?(a.directives[c]=d,u):a.directives[c]},mount(c,d,h){if(!l){const m=u._ceVNode||Le(r,o);return m.appContext=a,h===!0?h="svg":h===!1&&(h=void 0),d&&t?t(m,c):e(m,c,h),l=!0,u._container=c,c.__vue_app__=u,mi(m.component)}},onUnmount(c){i.push(c)},unmount(){l&&(pr(i,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return a.provides[c]=d,u},runWithContext(c){const d=da;da=u;try{return c()}finally{da=d}}};return u}}let da=null;function dg(e,t){if(hn){let n=hn.provides;const r=hn.parent&&hn.parent.provides;r===n&&(n=hn.provides=Object.create(r)),n[e]=t}}function te(e,t,n=!1){const r=hn||mn;if(r||da){const o=da?da._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&at(t)?t.call(r&&r.proxy):t}}function DC(){return!!(hn||mn||da)}const fg={},pg=()=>Object.create(fg),hg=e=>Object.getPrototypeOf(e)===fg;function BC(e,t,n,r=!1){const o={},a=pg();e.propsDefaults=Object.create(null),mg(e,t,o,a);for(const s in e.propsOptions[0])s in o||(o[s]=void 0);n?e.props=r?o:Ov(o):e.type.props?e.props=o:e.props=a,e.attrs=a}function FC(e,t,n,r){const{props:o,attrs:a,vnode:{patchFlag:s}}=e,i=vt(o),[l]=e.propsOptions;let u=!1;if((r||s>0)&&!(s&16)){if(s&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let h=c[d];if(sc(e.emitsOptions,h))continue;const m=t[h];if(l)if(Ot(a,h))m!==a[h]&&(a[h]=m,u=!0);else{const _=kn(h);o[_]=Du(l,i,_,m,e,!1)}else m!==a[h]&&(a[h]=m,u=!0)}}}else{mg(e,t,o,a)&&(u=!0);let c;for(const d in i)(!t||!Ot(t,d)&&((c=Jn(d))===d||!Ot(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=Du(l,i,d,void 0,e,!0)):delete o[d]);if(a!==i)for(const d in a)(!t||!Ot(t,d))&&(delete a[d],u=!0)}u&&io(e.attrs,"set","")}function mg(e,t,n,r){const[o,a]=e.propsOptions;let s=!1,i;if(t)for(let l in t){if(Ha(l))continue;const u=t[l];let c;o&&Ot(o,c=kn(l))?!a||!a.includes(c)?n[c]=u:(i||(i={}))[c]=u:sc(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,s=!0)}if(a){const l=vt(n),u=i||St;for(let c=0;c<a.length;c++){const d=a[c];n[d]=Du(o,l,d,u[d],e,!Ot(u,d))}}return s}function Du(e,t,n,r,o,a){const s=e[n];if(s!=null){const i=Ot(s,"default");if(i&&r===void 0){const l=s.default;if(s.type!==Function&&!s.skipFactory&&at(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=ma(o);r=u[n]=l.call(null,t),c()}}else r=l;o.ce&&o.ce._setProp(n,r)}s[0]&&(a&&!i?r=!1:s[1]&&(r===""||r===Jn(n))&&(r=!0))}return r}const jC=new WeakMap;function vg(e,t,n=!1){const r=n?jC:t.propsCache,o=r.get(e);if(o)return o;const a=e.props,s={},i=[];let l=!1;if(!at(e)){const c=d=>{l=!0;const[h,m]=vg(d,t,!0);Ht(s,h),m&&i.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!a&&!l)return jt(e)&&r.set(e,Va),Va;if(Ye(a))for(let c=0;c<a.length;c++){const d=kn(a[c]);_h(d)&&(s[d]=St)}else if(a)for(const c in a){const d=kn(c);if(_h(d)){const h=a[c],m=s[d]=Ye(h)||at(h)?{type:h}:Ht({},h),_=m.type;let v=!1,w=!0;if(Ye(_))for(let A=0;A<_.length;++A){const C=_[A],y=at(C)&&C.name;if(y==="Boolean"){v=!0;break}else y==="String"&&(w=!1)}else v=at(_)&&_.name==="Boolean";m[0]=v,m[1]=w,(v||Ot(m,"default"))&&i.push(d)}}const u=[s,i];return jt(e)&&r.set(e,u),u}function _h(e){return e[0]!=="$"&&!Ha(e)}const gg=e=>e[0]==="_"||e==="$stable",Pd=e=>Ye(e)?e.map(Gn):[Gn(e)],VC=(e,t,n)=>{if(t._n)return t;const r=Je((...o)=>Pd(t(...o)),n);return r._c=!1,r},yg=(e,t,n)=>{const r=e._ctx;for(const o in e){if(gg(o))continue;const a=e[o];if(at(a))t[o]=VC(o,a,r);else if(a!=null){const s=Pd(a);t[o]=()=>s}}},_g=(e,t)=>{const n=Pd(t);e.slots.default=()=>n},bg=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},UC=(e,t,n)=>{const r=e.slots=pg();if(e.vnode.shapeFlag&32){const o=t._;o?(bg(r,t,n),n&&pv(r,"_",o,!0)):yg(t,r)}else t&&_g(e,t)},HC=(e,t,n)=>{const{vnode:r,slots:o}=e;let a=!0,s=St;if(r.shapeFlag&32){const i=t._;i?n&&i===1?a=!1:bg(o,t,n):(a=!t.$stable,yg(t,o)),s=t}else t&&(_g(e,t),s={default:1});if(a)for(const i in o)!gg(i)&&s[i]==null&&delete o[i]},fn=Og;function wg(e){return Cg(e)}function Ag(e){return Cg(e,eC)}function Cg(e,t){const n=Gl();n.__VUE__=!0;const{insert:r,remove:o,patchProp:a,createElement:s,createText:i,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:h,setScopeId:m=dr,insertStaticContent:_}=e,v=(N,j,ae,ye=null,U=null,J=null,x=void 0,S=null,E=!!j.dynamicChildren)=>{if(N===j)return;N&&!Sr(N,j)&&(ye=Re(N),ue(N,U,J,!0),N=null),j.patchFlag===-2&&(E=!1,j.dynamicChildren=null);const{type:P,ref:W,shapeFlag:re}=j;switch(P){case Fo:w(N,j,ae,ye);break;case an:A(N,j,ae,ye);break;case fa:N==null&&C(j,ae,ye,x);break;case We:ce(N,j,ae,ye,U,J,x,S,E);break;default:re&1?b(N,j,ae,ye,U,J,x,S,E):re&6?ge(N,j,ae,ye,U,J,x,S,E):(re&64||re&128)&&P.process(N,j,ae,ye,U,J,x,S,E,et)}W!=null&&U&&ai(W,N&&N.ref,J,j||N,!j)},w=(N,j,ae,ye)=>{if(N==null)r(j.el=i(j.children),ae,ye);else{const U=j.el=N.el;j.children!==N.children&&u(U,j.children)}},A=(N,j,ae,ye)=>{N==null?r(j.el=l(j.children||""),ae,ye):j.el=N.el},C=(N,j,ae,ye)=>{[N.el,N.anchor]=_(N.children,j,ae,ye,N.el,N.anchor)},y=({el:N,anchor:j},ae,ye)=>{let U;for(;N&&N!==j;)U=h(N),r(N,ae,ye),N=U;r(j,ae,ye)},p=({el:N,anchor:j})=>{let ae;for(;N&&N!==j;)ae=h(N),o(N),N=ae;o(j)},b=(N,j,ae,ye,U,J,x,S,E)=>{j.type==="svg"?x="svg":j.type==="math"&&(x="mathml"),N==null?I(j,ae,ye,U,J,x,S,E):G(N,j,U,J,x,S,E)},I=(N,j,ae,ye,U,J,x,S)=>{let E,P;const{props:W,shapeFlag:re,transition:ie,dirs:Pe}=N;if(E=N.el=s(N.type,J,W&&W.is,W),re&8?c(E,N.children):re&16&&K(N.children,E,null,ye,U,iu(N,J),x,S),Pe&&Br(N,null,ye,"created"),D(E,N,N.scopeId,x,ye),W){for(const lt in W)lt!=="value"&&!Ha(lt)&&a(E,lt,null,W[lt],J,ye);"value"in W&&a(E,"value",null,W.value,J),(P=W.onVnodeBeforeMount)&&Wn(P,ye,N)}Pe&&Br(N,null,ye,"beforeMount");const Xe=$g(U,ie);Xe&&ie.beforeEnter(E),r(E,j,ae),((P=W&&W.onVnodeMounted)||Xe||Pe)&&fn(()=>{P&&Wn(P,ye,N),Xe&&ie.enter(E),Pe&&Br(N,null,ye,"mounted")},U)},D=(N,j,ae,ye,U)=>{if(ae&&m(N,ae),ye)for(let J=0;J<ye.length;J++)m(N,ye[J]);if(U){let J=U.subTree;if(j===J||Il(J.type)&&(J.ssContent===j||J.ssFallback===j)){const x=U.vnode;D(N,x,x.scopeId,x.slotScopeIds,U.parent)}}},K=(N,j,ae,ye,U,J,x,S,E=0)=>{for(let P=E;P<N.length;P++){const W=N[P]=S?Ro(N[P]):Gn(N[P]);v(null,W,j,ae,ye,U,J,x,S)}},G=(N,j,ae,ye,U,J,x)=>{const S=j.el=N.el;let{patchFlag:E,dynamicChildren:P,dirs:W}=j;E|=N.patchFlag&16;const re=N.props||St,ie=j.props||St;let Pe;if(ae&&ta(ae,!1),(Pe=ie.onVnodeBeforeUpdate)&&Wn(Pe,ae,j,N),W&&Br(j,N,ae,"beforeUpdate"),ae&&ta(ae,!0),(re.innerHTML&&ie.innerHTML==null||re.textContent&&ie.textContent==null)&&c(S,""),P?Z(N.dynamicChildren,P,S,ae,ye,iu(j,U),J):x||he(N,j,S,null,ae,ye,iu(j,U),J,!1),E>0){if(E&16)be(S,re,ie,ae,U);else if(E&2&&re.class!==ie.class&&a(S,"class",null,ie.class,U),E&4&&a(S,"style",re.style,ie.style,U),E&8){const Xe=j.dynamicProps;for(let lt=0;lt<Xe.length;lt++){const st=Xe[lt],Nt=re[st],Tt=ie[st];(Tt!==Nt||st==="value")&&a(S,st,Nt,Tt,U,ae)}}E&1&&N.children!==j.children&&c(S,j.children)}else!x&&P==null&&be(S,re,ie,ae,U);((Pe=ie.onVnodeUpdated)||W)&&fn(()=>{Pe&&Wn(Pe,ae,j,N),W&&Br(j,N,ae,"updated")},ye)},Z=(N,j,ae,ye,U,J,x)=>{for(let S=0;S<j.length;S++){const E=N[S],P=j[S],W=E.el&&(E.type===We||!Sr(E,P)||E.shapeFlag&70)?d(E.el):ae;v(E,P,W,null,ye,U,J,x,!0)}},be=(N,j,ae,ye,U)=>{if(j!==ae){if(j!==St)for(const J in j)!Ha(J)&&!(J in ae)&&a(N,J,j[J],null,U,ye);for(const J in ae){if(Ha(J))continue;const x=ae[J],S=j[J];x!==S&&J!=="value"&&a(N,J,S,x,U,ye)}"value"in ae&&a(N,"value",j.value,ae.value,U)}},ce=(N,j,ae,ye,U,J,x,S,E)=>{const P=j.el=N?N.el:i(""),W=j.anchor=N?N.anchor:i("");let{patchFlag:re,dynamicChildren:ie,slotScopeIds:Pe}=j;Pe&&(S=S?S.concat(Pe):Pe),N==null?(r(P,ae,ye),r(W,ae,ye),K(j.children||[],ae,W,U,J,x,S,E)):re>0&&re&64&&ie&&N.dynamicChildren?(Z(N.dynamicChildren,ie,ae,U,J,x,S),(j.key!=null||U&&j===U.subTree)&&Md(N,j,!0)):he(N,j,ae,W,U,J,x,S,E)},ge=(N,j,ae,ye,U,J,x,S,E)=>{j.slotScopeIds=S,N==null?j.shapeFlag&512?U.ctx.activate(j,ae,ye,x,E):de(j,ae,ye,U,J,x,E):He(N,j,E)},de=(N,j,ae,ye,U,J,x)=>{const S=N.component=Bg(N,ye,U);if(pi(N)&&(S.ctx.renderer=et),jg(S,!1,x),S.asyncDep){if(U&&U.registerDep(S,Ce,x),!N.el){const E=S.subTree=Le(an);A(null,E,j,ae)}}else Ce(S,N,j,ae,U,J,x)},He=(N,j,ae)=>{const ye=j.component=N.component;if(QC(N,j,ae))if(ye.asyncDep&&!ye.asyncResolved){fe(ye,j,ae);return}else ye.next=j,ye.update();else j.el=N.el,ye.vnode=j},Ce=(N,j,ae,ye,U,J,x)=>{const S=()=>{if(N.isMounted){let{next:re,bu:ie,u:Pe,parent:Xe,vnode:lt}=N;{const Zt=Sg(N);if(Zt){re&&(re.el=lt.el,fe(N,re,x)),Zt.asyncDep.then(()=>{N.isUnmounted||S()});return}}let st=re,Nt;ta(N,!1),re?(re.el=lt.el,fe(N,re,x)):re=lt,ie&&za(ie),(Nt=re.props&&re.props.onVnodeBeforeUpdate)&&Wn(Nt,Xe,re,lt),ta(N,!0);const Tt=ll(N),nn=N.subTree;N.subTree=Tt,v(nn,Tt,d(nn.el),Re(nn),N,U,J),re.el=Tt.el,st===null&&ic(N,Tt.el),Pe&&fn(Pe,U),(Nt=re.props&&re.props.onVnodeUpdated)&&fn(()=>Wn(Nt,Xe,re,lt),U)}else{let re;const{el:ie,props:Pe}=j,{bm:Xe,m:lt,parent:st,root:Nt,type:Tt}=N,nn=Bo(j);if(ta(N,!1),Xe&&za(Xe),!nn&&(re=Pe&&Pe.onVnodeBeforeMount)&&Wn(re,st,j),ta(N,!0),ie&&zt){const Zt=()=>{N.subTree=ll(N),zt(ie,N.subTree,N,U,null)};nn&&Tt.__asyncHydrate?Tt.__asyncHydrate(ie,N,Zt):Zt()}else{Nt.ce&&Nt.ce._injectChildStyle(Tt);const Zt=N.subTree=ll(N);v(null,Zt,ae,ye,N,U,J),j.el=Zt.el}if(lt&&fn(lt,U),!nn&&(re=Pe&&Pe.onVnodeMounted)){const Zt=j;fn(()=>Wn(re,st,Zt),U)}(j.shapeFlag&256||st&&Bo(st.vnode)&&st.vnode.shapeFlag&256)&&N.a&&fn(N.a,U),N.isMounted=!0,j=ae=ye=null}};N.scope.on();const E=N.effect=new Zs(S);N.scope.off();const P=N.update=E.run.bind(E),W=N.job=E.runIfDirty.bind(E);W.i=N,W.id=N.uid,E.scheduler=()=>Ad(W),ta(N,!0),P()},fe=(N,j,ae)=>{j.component=N;const ye=N.vnode.props;N.vnode=j,N.next=null,FC(N,j.props,ye,ae),HC(N,j.children,ae),qo(),lh(N),Go()},he=(N,j,ae,ye,U,J,x,S,E=!1)=>{const P=N&&N.children,W=N?N.shapeFlag:0,re=j.children,{patchFlag:ie,shapeFlag:Pe}=j;if(ie>0){if(ie&128){me(P,re,ae,ye,U,J,x,S,E);return}else if(ie&256){Ne(P,re,ae,ye,U,J,x,S,E);return}}Pe&8?(W&16&&se(P,U,J),re!==P&&c(ae,re)):W&16?Pe&16?me(P,re,ae,ye,U,J,x,S,E):se(P,U,J,!0):(W&8&&c(ae,""),Pe&16&&K(re,ae,ye,U,J,x,S,E))},Ne=(N,j,ae,ye,U,J,x,S,E)=>{N=N||Va,j=j||Va;const P=N.length,W=j.length,re=Math.min(P,W);let ie;for(ie=0;ie<re;ie++){const Pe=j[ie]=E?Ro(j[ie]):Gn(j[ie]);v(N[ie],Pe,ae,null,U,J,x,S,E)}P>W?se(N,U,J,!0,!1,re):K(j,ae,ye,U,J,x,S,E,re)},me=(N,j,ae,ye,U,J,x,S,E)=>{let P=0;const W=j.length;let re=N.length-1,ie=W-1;for(;P<=re&&P<=ie;){const Pe=N[P],Xe=j[P]=E?Ro(j[P]):Gn(j[P]);if(Sr(Pe,Xe))v(Pe,Xe,ae,null,U,J,x,S,E);else break;P++}for(;P<=re&&P<=ie;){const Pe=N[re],Xe=j[ie]=E?Ro(j[ie]):Gn(j[ie]);if(Sr(Pe,Xe))v(Pe,Xe,ae,null,U,J,x,S,E);else break;re--,ie--}if(P>re){if(P<=ie){const Pe=ie+1,Xe=Pe<W?j[Pe].el:ye;for(;P<=ie;)v(null,j[P]=E?Ro(j[P]):Gn(j[P]),ae,Xe,U,J,x,S,E),P++}}else if(P>ie)for(;P<=re;)ue(N[P],U,J,!0),P++;else{const Pe=P,Xe=P,lt=new Map;for(P=Xe;P<=ie;P++){const _e=j[P]=E?Ro(j[P]):Gn(j[P]);_e.key!=null&<.set(_e.key,P)}let st,Nt=0;const Tt=ie-Xe+1;let nn=!1,Zt=0;const le=new Array(Tt);for(P=0;P<Tt;P++)le[P]=0;for(P=Pe;P<=re;P++){const _e=N[P];if(Nt>=Tt){ue(_e,U,J,!0);continue}let Se;if(_e.key!=null)Se=lt.get(_e.key);else for(st=Xe;st<=ie;st++)if(le[st-Xe]===0&&Sr(_e,j[st])){Se=st;break}Se===void 0?ue(_e,U,J,!0):(le[Se-Xe]=P+1,Se>=Zt?Zt=Se:nn=!0,v(_e,j[Se],ae,null,U,J,x,S,E),Nt++)}const Te=nn?zC(le):Va;for(st=Te.length-1,P=Tt-1;P>=0;P--){const _e=Xe+P,Se=j[_e],Be=_e+1<W?j[_e+1].el:ye;le[P]===0?v(null,Se,ae,Be,U,J,x,S,E):nn&&(st<0||P!==Te[st]?z(Se,ae,Be,2):st--)}}},z=(N,j,ae,ye,U=null)=>{const{el:J,type:x,transition:S,children:E,shapeFlag:P}=N;if(P&6){z(N.component.subTree,j,ae,ye);return}if(P&128){N.suspense.move(j,ae,ye);return}if(P&64){x.move(N,j,ae,et);return}if(x===We){r(J,j,ae);for(let re=0;re<E.length;re++)z(E[re],j,ae,ye);r(N.anchor,j,ae);return}if(x===fa){y(N,j,ae);return}if(ye!==2&&P&1&&S)if(ye===0)S.beforeEnter(J),r(J,j,ae),fn(()=>S.enter(J),U);else{const{leave:re,delayLeave:ie,afterLeave:Pe}=S,Xe=()=>r(J,j,ae),lt=()=>{re(J,()=>{Xe(),Pe&&Pe()})};ie?ie(J,Xe,lt):lt()}else r(J,j,ae)},ue=(N,j,ae,ye=!1,U=!1)=>{const{type:J,props:x,ref:S,children:E,dynamicChildren:P,shapeFlag:W,patchFlag:re,dirs:ie,cacheIndex:Pe}=N;if(re===-2&&(U=!1),S!=null&&ai(S,null,ae,N,!0),Pe!=null&&(j.renderCache[Pe]=void 0),W&256){j.ctx.deactivate(N);return}const Xe=W&1&&ie,lt=!Bo(N);let st;if(lt&&(st=x&&x.onVnodeBeforeUnmount)&&Wn(st,j,N),W&6)R(N.component,ae,ye);else{if(W&128){N.suspense.unmount(ae,ye);return}Xe&&Br(N,null,j,"beforeUnmount"),W&64?N.type.remove(N,j,ae,et,ye):P&&!P.hasOnce&&(J!==We||re>0&&re&64)?se(P,j,ae,!1,!0):(J===We&&re&384||!U&&W&16)&&se(E,j,ae),ye&&X(N)}(lt&&(st=x&&x.onVnodeUnmounted)||Xe)&&fn(()=>{st&&Wn(st,j,N),Xe&&Br(N,null,j,"unmounted")},ae)},X=N=>{const{type:j,el:ae,anchor:ye,transition:U}=N;if(j===We){T(ae,ye);return}if(j===fa){p(N);return}const J=()=>{o(ae),U&&!U.persisted&&U.afterLeave&&U.afterLeave()};if(N.shapeFlag&1&&U&&!U.persisted){const{leave:x,delayLeave:S}=U,E=()=>x(ae,J);S?S(N.el,J,E):E()}else J()},T=(N,j)=>{let ae;for(;N!==j;)ae=h(N),o(N),N=ae;o(j)},R=(N,j,ae)=>{const{bum:ye,scope:U,job:J,subTree:x,um:S,m:E,a:P}=N;Sl(E),Sl(P),ye&&za(ye),U.stop(),J&&(J.flags|=8,ue(x,N,j,ae)),S&&fn(S,j),fn(()=>{N.isUnmounted=!0},j),j&&j.pendingBranch&&!j.isUnmounted&&N.asyncDep&&!N.asyncResolved&&N.suspenseId===j.pendingId&&(j.deps--,j.deps===0&&j.resolve())},se=(N,j,ae,ye=!1,U=!1,J=0)=>{for(let x=J;x<N.length;x++)ue(N[x],j,ae,ye,U)},Re=N=>{if(N.shapeFlag&6)return Re(N.component.subTree);if(N.shapeFlag&128)return N.suspense.next();const j=h(N.anchor||N.el),ae=j&&j[zv];return ae?h(ae):j};let De=!1;const it=(N,j,ae)=>{N==null?j._vnode&&ue(j._vnode,null,null,!0):v(j._vnode||null,N,j,null,null,null,ae),j._vnode=N,De||(De=!0,lh(),Cl(),De=!1)},et={p:v,um:ue,m:z,r:X,mt:de,mc:K,pc:he,pbc:Z,n:Re,o:e};let dt,zt;return t&&([dt,zt]=t(et)),{render:it,hydrate:dt,createApp:LC(it,dt)}}function iu({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ta({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function $g(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Md(e,t,n=!1){const r=e.children,o=t.children;if(Ye(r)&&Ye(o))for(let a=0;a<r.length;a++){const s=r[a];let i=o[a];i.shapeFlag&1&&!i.dynamicChildren&&((i.patchFlag<=0||i.patchFlag===32)&&(i=o[a]=Ro(o[a]),i.el=s.el),!n&&i.patchFlag!==-2&&Md(s,i)),i.type===Fo&&(i.el=s.el)}}function zC(e){const t=e.slice(),n=[0];let r,o,a,s,i;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(o=n[n.length-1],e[o]<u){t[r]=o,n.push(r);continue}for(a=0,s=n.length-1;a<s;)i=a+s>>1,e[n[i]]<u?a=i+1:s=i;u<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,s=n[a-1];a-- >0;)n[a]=s,s=t[s];return n}function Sg(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Sg(t)}function Sl(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const Ig=Symbol.for("v-scx"),Eg=()=>te(Ig);function KC(e,t){return hi(e,null,t)}function WC(e,t){return hi(e,null,{flush:"post"})}function Tg(e,t){return hi(e,null,{flush:"sync"})}function Ue(e,t,n){return hi(e,t,n)}function hi(e,t,n=St){const{immediate:r,deep:o,flush:a,once:s}=n,i=Ht({},n),l=t&&r||!t&&a!=="post";let u;if(Qa){if(a==="sync"){const m=Eg();u=m.__watcherHandles||(m.__watcherHandles=[])}else if(!l){const m=()=>{};return m.stop=dr,m.resume=dr,m.pause=dr,m}}const c=hn;i.call=(m,_,v)=>pr(m,c,_,v);let d=!1;a==="post"?i.scheduler=m=>{fn(m,c&&c.suspense)}:a!=="sync"&&(d=!0,i.scheduler=(m,_)=>{_?m():Ad(m)}),i.augmentJob=m=>{t&&(m.flags|=4),d&&(m.flags|=2,c&&(m.id=c.uid,m.i=c))};const h=BA(e,t,i);return Qa&&(u?u.push(h):l&&h()),h}function qC(e,t,n){const r=this.proxy,o=Gt(e)?e.includes(".")?kg(r,e):()=>r[e]:e.bind(r,r);let a;at(t)?a=t:(a=t.handler,n=t);const s=ma(this),i=hi(o,a.bind(r),n);return s(),i}function kg(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}function Yr(e,t,n=St){const r=hr(),o=kn(t),a=Jn(t),s=xg(e,o),i=Lv((l,u)=>{let c,d=St,h;return Tg(()=>{const m=e[o];Un(c,m)&&(c=m,u())}),{get(){return l(),n.get?n.get(c):c},set(m){const _=n.set?n.set(m):m;if(!Un(_,c)&&!(d!==St&&Un(m,d)))return;const v=r.vnode.props;v&&(t in v||o in v||a in v)&&(`onUpdate:${t}`in v||`onUpdate:${o}`in v||`onUpdate:${a}`in v)||(c=m,u()),r.emit(`update:${t}`,_),Un(m,_)&&Un(m,d)&&!Un(_,h)&&u(),d=m,h=_}}});return i[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?s||St:i,done:!1}:{done:!0}}}},i}const xg=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${kn(t)}Modifiers`]||e[`${Jn(t)}Modifiers`];function GC(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||St;let o=n;const a=t.startsWith("update:"),s=a&&xg(r,t.slice(7));s&&(s.trim&&(o=n.map(c=>Gt(c)?c.trim():c)),s.number&&(o=n.map(yl)));let i,l=r[i=Fs(t)]||r[i=Fs(kn(t))];!l&&a&&(l=r[i=Fs(Jn(t))]),l&&pr(l,e,6,o);const u=r[i+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,pr(u,e,6,o)}}function Pg(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const a=e.emits;let s={},i=!1;if(!at(e)){const l=u=>{const c=Pg(u,t,!0);c&&(i=!0,Ht(s,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!a&&!i?(jt(e)&&r.set(e,null),null):(Ye(a)?a.forEach(l=>s[l]=null):Ht(s,a),jt(e)&&r.set(e,s),s)}function sc(e,t){return!e||!di(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ot(e,t[0].toLowerCase()+t.slice(1))||Ot(e,Jn(t))||Ot(e,t))}function ll(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[a],slots:s,attrs:i,emit:l,render:u,renderCache:c,props:d,data:h,setupState:m,ctx:_,inheritAttrs:v}=e,w=oi(e);let A,C;try{if(n.shapeFlag&4){const p=o||r,b=p;A=Gn(u.call(b,p,c,d,m,h,_)),C=i}else{const p=t;A=Gn(p.length>1?p(d,{attrs:i,slots:s,emit:l}):p(d,null)),C=t.props?i:YC(i)}}catch(p){zs.length=0,wa(p,e,1),A=Le(an)}let y=A;if(C&&v!==!1){const p=Object.keys(C),{shapeFlag:b}=y;p.length&&b&7&&(a&&p.some(dd)&&(C=XC(C,a)),y=qr(y,C,!1,!0))}return n.dirs&&(y=qr(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&ho(y,n.transition),A=y,oi(w),A}function JC(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(mo(o)){if(o.type!==an||o.children==="v-if"){if(n)return;n=o}}else return}return n}const YC=e=>{let t;for(const n in e)(n==="class"||n==="style"||di(n))&&((t||(t={}))[n]=e[n]);return t},XC=(e,t)=>{const n={};for(const r in e)(!dd(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function QC(e,t,n){const{props:r,children:o,component:a}=e,{props:s,children:i,patchFlag:l}=t,u=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?bh(r,s,u):!!s;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const h=c[d];if(s[h]!==r[h]&&!sc(u,h))return!0}}}else return(o||i)&&(!i||!i.$stable)?!0:r===s?!1:r?s?bh(r,s,u):!0:!!s;return!1}function bh(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const a=r[o];if(t[a]!==e[a]&&!sc(n,a))return!0}return!1}function ic({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const Il=e=>e.__isSuspense;let Bu=0;const ZC={name:"Suspense",__isSuspense:!0,process(e,t,n,r,o,a,s,i,l,u){if(e==null)t$(t,n,r,o,a,s,i,l,u);else{if(a&&a.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}n$(e,t,n,r,o,s,i,l,u)}},hydrate:r$,normalize:o$},e$=ZC;function ii(e,t){const n=e.props&&e.props[t];at(n)&&n()}function t$(e,t,n,r,o,a,s,i,l){const{p:u,o:{createElement:c}}=l,d=c("div"),h=e.suspense=Mg(e,o,r,t,d,n,a,s,i,l);u(null,h.pendingBranch=e.ssContent,d,null,r,h,a,s),h.deps>0?(ii(e,"onPending"),ii(e,"onFallback"),u(null,e.ssFallback,t,n,r,null,a,s),Wa(h,e.ssFallback)):h.resolve(!1,!0)}function n$(e,t,n,r,o,a,s,i,{p:l,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const h=t.ssContent,m=t.ssFallback,{activeBranch:_,pendingBranch:v,isInFallback:w,isHydrating:A}=d;if(v)d.pendingBranch=h,Sr(h,v)?(l(v,h,d.hiddenContainer,null,o,d,a,s,i),d.deps<=0?d.resolve():w&&(A||(l(_,m,n,r,o,null,a,s,i),Wa(d,m)))):(d.pendingId=Bu++,A?(d.isHydrating=!1,d.activeBranch=v):u(v,o,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),w?(l(null,h,d.hiddenContainer,null,o,d,a,s,i),d.deps<=0?d.resolve():(l(_,m,n,r,o,null,a,s,i),Wa(d,m))):_&&Sr(h,_)?(l(_,h,n,r,o,d,a,s,i),d.resolve(!0)):(l(null,h,d.hiddenContainer,null,o,d,a,s,i),d.deps<=0&&d.resolve()));else if(_&&Sr(h,_))l(_,h,n,r,o,d,a,s,i),Wa(d,h);else if(ii(t,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=Bu++,l(null,h,d.hiddenContainer,null,o,d,a,s,i),d.deps<=0)d.resolve();else{const{timeout:C,pendingId:y}=d;C>0?setTimeout(()=>{d.pendingId===y&&d.fallback(m)},C):C===0&&d.fallback(m)}}function Mg(e,t,n,r,o,a,s,i,l,u,c=!1){const{p:d,m:h,um:m,n:_,o:{parentNode:v,remove:w}}=u;let A;const C=a$(e);C&&t&&t.pendingBranch&&(A=t.pendingId,t.deps++);const y=e.props?_l(e.props.timeout):void 0,p=a,b={vnode:e,parent:t,parentComponent:n,namespace:s,container:r,hiddenContainer:o,deps:0,pendingId:Bu++,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(I=!1,D=!1){const{vnode:K,activeBranch:G,pendingBranch:Z,pendingId:be,effects:ce,parentComponent:ge,container:de}=b;let He=!1;b.isHydrating?b.isHydrating=!1:I||(He=G&&Z.transition&&Z.transition.mode==="out-in",He&&(G.transition.afterLeave=()=>{be===b.pendingId&&(h(Z,de,a===p?_(G):a,0),ni(ce))}),G&&(v(G.el)===de&&(a=_(G)),m(G,ge,b,!0)),He||h(Z,de,a,0)),Wa(b,Z),b.pendingBranch=null,b.isInFallback=!1;let Ce=b.parent,fe=!1;for(;Ce;){if(Ce.pendingBranch){Ce.effects.push(...ce),fe=!0;break}Ce=Ce.parent}!fe&&!He&&ni(ce),b.effects=[],C&&t&&t.pendingBranch&&A===t.pendingId&&(t.deps--,t.deps===0&&!D&&t.resolve()),ii(K,"onResolve")},fallback(I){if(!b.pendingBranch)return;const{vnode:D,activeBranch:K,parentComponent:G,container:Z,namespace:be}=b;ii(D,"onFallback");const ce=_(K),ge=()=>{b.isInFallback&&(d(null,I,Z,ce,G,null,be,i,l),Wa(b,I))},de=I.transition&&I.transition.mode==="out-in";de&&(K.transition.afterLeave=ge),b.isInFallback=!0,m(K,G,null,!0),de||ge()},move(I,D,K){b.activeBranch&&h(b.activeBranch,I,D,K),b.container=I},next(){return b.activeBranch&&_(b.activeBranch)},registerDep(I,D,K){const G=!!b.pendingBranch;G&&b.deps++;const Z=I.vnode.el;I.asyncDep.catch(be=>{wa(be,I,0)}).then(be=>{if(I.isUnmounted||b.isUnmounted||b.pendingId!==I.suspenseId)return;I.asyncResolved=!0;const{vnode:ce}=I;Uu(I,be,!1),Z&&(ce.el=Z);const ge=!Z&&I.subTree.el;D(I,ce,v(Z||I.subTree.el),Z?null:_(I.subTree),b,s,K),ge&&w(ge),ic(I,ce.el),G&&--b.deps===0&&b.resolve()})},unmount(I,D){b.isUnmounted=!0,b.activeBranch&&m(b.activeBranch,n,I,D),b.pendingBranch&&m(b.pendingBranch,n,I,D)}};return b}function r$(e,t,n,r,o,a,s,i,l){const u=t.suspense=Mg(t,r,n,e.parentNode,document.createElement("div"),null,o,a,s,i,!0),c=l(e,u.pendingBranch=t.ssContent,n,u,a,s);return u.deps===0&&u.resolve(!1,!0),c}function o$(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=wh(r?n.default:n),e.ssFallback=r?wh(n.fallback):Le(an)}function wh(e){let t;if(at(e)){const n=ha&&e._c;n&&(e._d=!1,k()),e=e(),n&&(e._d=!0,t=Ln,Ng())}return Ye(e)&&(e=JC(e)),e=Gn(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Og(e,t){t&&t.pendingBranch?Ye(e)?t.effects.push(...e):t.effects.push(e):ni(e)}function Wa(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let o=t.el;for(;!o&&t.component;)t=t.component.subTree,o=t.el;n.el=o,r&&r.subTree===n&&(r.vnode.el=o,ic(r,o))}function a$(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const We=Symbol.for("v-fgt"),Fo=Symbol.for("v-txt"),an=Symbol.for("v-cmt"),fa=Symbol.for("v-stc"),zs=[];let Ln=null;function k(e=!1){zs.push(Ln=e?null:[])}function Ng(){zs.pop(),Ln=zs[zs.length-1]||null}let ha=1;function Fu(e,t=!1){ha+=e,e<0&&Ln&&t&&(Ln.hasOnce=!0)}function Rg(e){return e.dynamicChildren=ha>0?Ln||Va:null,Ng(),ha>0&&Ln&&Ln.push(e),e}function L(e,t,n,r,o,a){return Rg(F(e,t,n,r,o,a,!0))}function Oe(e,t,n,r,o){return Rg(Le(e,t,n,r,o,!0))}function mo(e){return e?e.__v_isVNode===!0:!1}function Sr(e,t){return e.type===t.type&&e.key===t.key}function s$(e){}const Lg=({key:e})=>e??null,cl=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Gt(e)||sn(e)||at(e)?{i:mn,r:e,k:t,f:!!n}:e:null);function F(e,t=null,n=null,r=0,o=null,a=e===We?0:1,s=!1,i=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Lg(t),ref:t&&cl(t),scopeId:nc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:mn};return i?(Od(l,n),a&128&&e.normalize(l)):n&&(l.shapeFlag|=Gt(n)?8:16),ha>0&&!s&&Ln&&(l.patchFlag>0||a&6)&&l.patchFlag!==32&&Ln.push(l),l}const Le=i$;function i$(e,t=null,n=null,r=0,o=null,a=!1){if((!e||e===sg)&&(e=an),mo(e)){const i=qr(e,t,!0);return n&&Od(i,n),ha>0&&!a&&Ln&&(i.shapeFlag&6?Ln[Ln.indexOf(e)]=i:Ln.push(i)),i.patchFlag=-2,i}if(m$(e)&&(e=e.__vccOpts),t){t=Dg(t);let{class:i,style:l}=t;i&&!Gt(i)&&(t.class=ut(i)),jt(l)&&(tc(l)&&!Ye(l)&&(l=Ht({},l)),t.style=_t(l))}const s=Gt(e)?1:Il(e)?128:Kv(e)?64:jt(e)?4:at(e)?2:0;return F(e,t,n,r,o,s,a,!0)}function Dg(e){return e?tc(e)||hg(e)?Ht({},e):e:null}function qr(e,t,n=!1,r=!1){const{props:o,ref:a,patchFlag:s,children:i,transition:l}=e,u=t?qa(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Lg(u),ref:t&&t.ref?n&&a?Ye(a)?a.concat(cl(t)):[a,cl(t)]:cl(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==We?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&qr(e.ssContent),ssFallback:e.ssFallback&&qr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&ho(c,l.clone(c)),c}function tn(e=" ",t=0){return Le(Fo,null,e,t)}function l$(e,t){const n=Le(fa,null,e);return n.staticCount=t,n}function ve(e="",t=!1){return t?(k(),Oe(an,null,e)):Le(an,null,e)}function Gn(e){return e==null||typeof e=="boolean"?Le(an):Ye(e)?Le(We,null,e.slice()):mo(e)?Ro(e):Le(Fo,null,String(e))}function Ro(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:qr(e)}function Od(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ye(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Od(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!hg(t)?t._ctx=mn:o===3&&mn&&(mn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else at(t)?(t={default:t,_ctx:mn},n=32):(t=String(t),r&64?(n=16,t=[tn(t)]):n=8);e.children=t,e.shapeFlag|=n}function qa(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=ut([t.class,r.class]));else if(o==="style")t.style=_t([t.style,r.style]);else if(di(o)){const a=t[o],s=r[o];s&&a!==s&&!(Ye(a)&&a.includes(s))&&(t[o]=a?[].concat(a,s):s)}else o!==""&&(t[o]=r[o])}return t}function Wn(e,t,n,r=null){pr(e,t,7,[n,r])}const c$=ug();let u$=0;function Bg(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||c$,a={uid:u$++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new md(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:vg(r,o),emitsOptions:Pg(r,o),emit:null,emitted:null,propsDefaults:St,inheritAttrs:r.inheritAttrs,ctx:St,data:St,props:St,attrs:St,slots:St,refs:St,setupState:St,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=GC.bind(null,a),e.ce&&e.ce(a),a}let hn=null;const hr=()=>hn||mn;let El,ju;{const e=Gl(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),a=>{o.length>1?o.forEach(s=>s(a)):o[0](a)}};El=t("__VUE_INSTANCE_SETTERS__",n=>hn=n),ju=t("__VUE_SSR_SETTERS__",n=>Qa=n)}const ma=e=>{const t=hn;return El(e),e.scope.on(),()=>{e.scope.off(),El(t)}},Vu=()=>{hn&&hn.scope.off(),El(null)};function Fg(e){return e.vnode.shapeFlag&4}let Qa=!1;function jg(e,t=!1,n=!1){t&&ju(t);const{props:r,children:o}=e.vnode,a=Fg(e);BC(e,r,a,t),UC(e,o,n);const s=a?d$(e,t):void 0;return t&&ju(!1),s}function d$(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Nu);const{setup:r}=n;if(r){qo();const o=e.setupContext=r.length>1?Ug(e):null,a=ma(e),s=is(r,e,0,[e.props,o]),i=pd(s);if(Go(),a(),(i||e.sp)&&!Bo(e)&&Sd(e),i){if(s.then(Vu,Vu),t)return s.then(l=>{Uu(e,l,t)}).catch(l=>{wa(l,e,0)});e.asyncDep=s}else Uu(e,s,t)}else Vg(e,t)}function Uu(e,t,n){at(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:jt(t)&&(e.setupState=bd(t)),Vg(e,n)}let Tl,Hu;function f$(e){Tl=e,Hu=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,gC))}}const p$=()=>!Tl;function Vg(e,t,n){const r=e.type;if(!e.render){if(!t&&Tl&&!r.render){const o=r.template||xd(e).template;if(o){const{isCustomElement:a,compilerOptions:s}=e.appContext.config,{delimiters:i,compilerOptions:l}=r,u=Ht(Ht({isCustomElement:a,delimiters:i},s),l);r.render=Tl(o,u)}}e.render=r.render||dr,Hu&&Hu(e)}{const o=ma(e);qo();try{xC(e)}finally{Go(),o()}}}const h$={get(e,t){return On(e,"get",""),e[t]}};function Ug(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,h$),slots:e.slots,emit:e.emit,expose:t}}function mi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(bd(Nv(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Hs)return Hs[n](e)},has(t,n){return n in t||n in Hs}})):e.proxy}function zu(e,t=!0){return at(e)?e.displayName||e.name:e.name||t&&e.__name}function m$(e){return at(e)&&"__vccOpts"in e}const H=(e,t)=>NA(e,t,Qa);function Ho(e,t,n){const r=arguments.length;return r===2?jt(t)&&!Ye(t)?mo(t)?Le(e,null,[t]):Le(e,t):Le(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&mo(n)&&(n=[n]),Le(e,t,n))}function v$(){}function g$(e,t,n,r){const o=n[r];if(o&&Hg(o,e))return o;const a=t();return a.memo=e.slice(),a.cacheIndex=r,n[r]=a}function Hg(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r<n.length;r++)if(Un(n[r],t[r]))return!1;return ha>0&&Ln&&Ln.push(e),!0}const zg="3.5.13",y$=dr,_$=HA,b$=Ba,w$=Hv,A$={createComponentInstance:Bg,setupComponent:jg,renderComponentRoot:ll,setCurrentRenderingInstance:oi,isVNode:mo,normalizeVNode:Gn,getComponentPublicInstance:mi,ensureValidVNode:kd,pushWarningContext:FA,popWarningContext:jA},C$=A$,$$=null,S$=null,I$=null;/**
|
|
21
|
-
* @vue/runtime-dom v3.5.13
|
|
22
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
23
|
-
* @license MIT
|
|
24
|
-
**/let Ku;const Ah=typeof window<"u"&&window.trustedTypes;if(Ah)try{Ku=Ah.createPolicy("vue",{createHTML:e=>e})}catch{}const Kg=Ku?e=>Ku.createHTML(e):e=>e,E$="http://www.w3.org/2000/svg",T$="http://www.w3.org/1998/Math/MathML",so=typeof document<"u"?document:null,Ch=so&&so.createElement("template"),k$={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?so.createElementNS(E$,e):t==="mathml"?so.createElementNS(T$,e):n?so.createElement(e,{is:n}):so.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>so.createTextNode(e),createComment:e=>so.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>so.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,a){const s=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{Ch.innerHTML=Kg(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const i=Ch.content;if(r==="svg"||r==="mathml"){const l=i.firstChild;for(;l.firstChild;)i.appendChild(l.firstChild);i.removeChild(l)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},To="transition",$s="animation",Za=Symbol("_vtc"),Wg={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},qg=Ht({},$d,Wg),x$=e=>(e.displayName="Transition",e.props=qg,e),Nd=x$((e,{slots:t})=>Ho(Xv,Gg(e),t)),na=(e,t=[])=>{Ye(e)?e.forEach(n=>n(...t)):e&&e(...t)},$h=e=>e?Ye(e)?e.some(t=>t.length>1):e.length>1:!1;function Gg(e){const t={};for(const ce in e)ce in Wg||(t[ce]=e[ce]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:a=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:l=a,appearActiveClass:u=s,appearToClass:c=i,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,_=P$(o),v=_&&_[0],w=_&&_[1],{onBeforeEnter:A,onEnter:C,onEnterCancelled:y,onLeave:p,onLeaveCancelled:b,onBeforeAppear:I=A,onAppear:D=C,onAppearCancelled:K=y}=t,G=(ce,ge,de,He)=>{ce._enterCancelled=He,Po(ce,ge?c:i),Po(ce,ge?u:s),de&&de()},Z=(ce,ge)=>{ce._isLeaving=!1,Po(ce,d),Po(ce,m),Po(ce,h),ge&&ge()},be=ce=>(ge,de)=>{const He=ce?D:C,Ce=()=>G(ge,ce,de);na(He,[ge,Ce]),Sh(()=>{Po(ge,ce?l:a),Lr(ge,ce?c:i),$h(He)||Ih(ge,r,v,Ce)})};return Ht(t,{onBeforeEnter(ce){na(A,[ce]),Lr(ce,a),Lr(ce,s)},onBeforeAppear(ce){na(I,[ce]),Lr(ce,l),Lr(ce,u)},onEnter:be(!1),onAppear:be(!0),onLeave(ce,ge){ce._isLeaving=!0;const de=()=>Z(ce,ge);Lr(ce,d),ce._enterCancelled?(Lr(ce,h),Wu()):(Wu(),Lr(ce,h)),Sh(()=>{ce._isLeaving&&(Po(ce,d),Lr(ce,m),$h(p)||Ih(ce,r,w,de))}),na(p,[ce,de])},onEnterCancelled(ce){G(ce,!1,void 0,!0),na(y,[ce])},onAppearCancelled(ce){G(ce,!0,void 0,!0),na(K,[ce])},onLeaveCancelled(ce){Z(ce),na(b,[ce])}})}function P$(e){if(e==null)return null;if(jt(e))return[lu(e.enter),lu(e.leave)];{const t=lu(e);return[t,t]}}function lu(e){return _l(e)}function Lr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Za]||(e[Za]=new Set)).add(t)}function Po(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Za];n&&(n.delete(t),n.size||(e[Za]=void 0))}function Sh(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let M$=0;function Ih(e,t,n,r){const o=e._endId=++M$,a=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(a,n);const{type:s,timeout:i,propCount:l}=Jg(e,t);if(!s)return r();const u=s+"end";let c=0;const d=()=>{e.removeEventListener(u,h),a()},h=m=>{m.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},i+1),e.addEventListener(u,h)}function Jg(e,t){const n=window.getComputedStyle(e),r=_=>(n[_]||"").split(", "),o=r(`${To}Delay`),a=r(`${To}Duration`),s=Eh(o,a),i=r(`${$s}Delay`),l=r(`${$s}Duration`),u=Eh(i,l);let c=null,d=0,h=0;t===To?s>0&&(c=To,d=s,h=a.length):t===$s?u>0&&(c=$s,d=u,h=l.length):(d=Math.max(s,u),c=d>0?s>u?To:$s:null,h=c?c===To?a.length:l.length:0);const m=c===To&&/\b(transform|all)(,|$)/.test(r(`${To}Property`).toString());return{type:c,timeout:d,propCount:h,hasTransform:m}}function Eh(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Th(n)+Th(e[r])))}function Th(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Wu(){return document.body.offsetHeight}function O$(e,t,n){const r=e[Za];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const kl=Symbol("_vod"),Yg=Symbol("_vsh"),xr={beforeMount(e,{value:t},{transition:n}){e[kl]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ss(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Ss(e,!0),r.enter(e)):r.leave(e,()=>{Ss(e,!1)}):Ss(e,t))},beforeUnmount(e,{value:t}){Ss(e,t)}};function Ss(e,t){e.style.display=t?e[kl]:"none",e[Yg]=!t}function N$(){xr.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Xg=Symbol("");function vi(e){const t=hr();if(!t)return;const n=t.ut=(o=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(a=>xl(a,o))},r=()=>{const o=e(t.proxy);t.ce?xl(t.ce,o):qu(t.subTree,o),n(o)};Id(()=>{ni(r)}),ln(()=>{Ue(r,dr,{flush:"post"});const o=new MutationObserver(r);o.observe(t.subTree.el.parentNode,{childList:!0}),Nr(()=>o.disconnect())})}function qu(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{qu(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)xl(e.el,t);else if(e.type===We)e.children.forEach(n=>qu(n,t));else if(e.type===fa){let{el:n,anchor:r}=e;for(;n&&(xl(n,t),n!==r);)n=n.nextSibling}}function xl(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const o in t)n.setProperty(`--${o}`,t[o]),r+=`--${o}: ${t[o]};`;n[Xg]=r}}const R$=/(^|;)\s*display\s*:/;function L$(e,t,n){const r=e.style,o=Gt(n);let a=!1;if(n&&!o){if(t)if(Gt(t))for(const s of t.split(";")){const i=s.slice(0,s.indexOf(":")).trim();n[i]==null&&ul(r,i,"")}else for(const s in t)n[s]==null&&ul(r,s,"");for(const s in n)s==="display"&&(a=!0),ul(r,s,n[s])}else if(o){if(t!==n){const s=r[Xg];s&&(n+=";"+s),r.cssText=n,a=R$.test(n)}}else t&&e.removeAttribute("style");kl in e&&(e[kl]=a?r.display:"",e[Yg]&&(r.display="none"))}const kh=/\s*!important$/;function ul(e,t,n){if(Ye(n))n.forEach(r=>ul(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=D$(e,t);kh.test(n)?e.setProperty(Jn(r),n.replace(kh,""),"important"):e[r]=n}}const xh=["Webkit","Moz","ms"],cu={};function D$(e,t){const n=cu[t];if(n)return n;let r=kn(t);if(r!=="filter"&&r in e)return cu[t]=r;r=fi(r);for(let o=0;o<xh.length;o++){const a=xh[o]+r;if(a in e)return cu[t]=a}return t}const Ph="http://www.w3.org/1999/xlink";function Mh(e,t,n,r,o,a=nA(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Ph,t.slice(6,t.length)):e.setAttributeNS(Ph,t,n):n==null||a&&!hv(n)?e.removeAttribute(t):e.setAttribute(t,a?"":kr(n)?String(n):n)}function Oh(e,t,n,r,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Kg(n):n);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const i=a==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(i!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=hv(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(o||t)}function co(e,t,n,r){e.addEventListener(t,n,r)}function B$(e,t,n,r){e.removeEventListener(t,n,r)}const Nh=Symbol("_vei");function F$(e,t,n,r,o=null){const a=e[Nh]||(e[Nh]={}),s=a[t];if(r&&s)s.value=r;else{const[i,l]=j$(t);if(r){const u=a[t]=H$(r,o);co(e,i,u,l)}else s&&(B$(e,i,s,l),a[t]=void 0)}}const Rh=/(?:Once|Passive|Capture)$/;function j$(e){let t;if(Rh.test(e)){t={};let r;for(;r=e.match(Rh);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Jn(e.slice(2)),t]}let uu=0;const V$=Promise.resolve(),U$=()=>uu||(V$.then(()=>uu=0),uu=Date.now());function H$(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;pr(z$(r,n.value),t,5,[r])};return n.value=e,n.attached=U$(),n}function z$(e,t){if(Ye(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const Lh=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,K$=(e,t,n,r,o,a)=>{const s=o==="svg";t==="class"?O$(e,r,s):t==="style"?L$(e,n,r):di(t)?dd(t)||F$(e,t,n,r,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):W$(e,t,r,s))?(Oh(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Mh(e,t,r,s,a,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Gt(r))?Oh(e,kn(t),r,a,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Mh(e,t,r,s))};function W$(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Lh(t)&&at(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Lh(t)&&Gt(n)?!1:t in e}const Dh={};/*! #__NO_SIDE_EFFECTS__ */function Qg(e,t,n){const r=we(e,t);Wl(r)&&Ht(r,t);class o extends lc{constructor(s){super(r,s,n)}}return o.def=r,o}/*! #__NO_SIDE_EFFECTS__ */const q$=(e,t)=>Qg(e,t,ly),G$=typeof HTMLElement<"u"?HTMLElement:class{};class lc extends G${constructor(t,n={},r=Ol){super(),this._def=t,this._props=n,this._createApp=r,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&r!==Ol?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof lc){this._parent=t;break}this._instance||(this._resolved?(this._setParent(),this._update()):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._instance.provides=t._instance.provides)}disconnectedCallback(){this._connected=!1,ar(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let r=0;r<this.attributes.length;r++)this._setAttr(this.attributes[r].name);this._ob=new MutationObserver(r=>{for(const o of r)this._setAttr(o.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(r,o=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:a,styles:s}=r;let i;if(a&&!Ye(a))for(const l in a){const u=a[l];(u===Number||u&&u.type===Number)&&(l in this._props&&(this._props[l]=_l(this._props[l])),(i||(i=Object.create(null)))[kn(l)]=!0)}this._numberProps=i,o&&this._resolveProps(r),this.shadowRoot&&this._applyStyles(s),this._mount(r)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(r=>t(this._def=r,!0)):t(this._def)}_mount(t){this._app=this._createApp(t),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const r in n)Ot(this,r)||Object.defineProperty(this,r,{get:()=>O(n[r])})}_resolveProps(t){const{props:n}=t,r=Ye(n)?n:Object.keys(n||{});for(const o of Object.keys(this))o[0]!=="_"&&r.includes(o)&&this._setProp(o,this[o]);for(const o of r.map(kn))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(a){this._setProp(o,a,!0,!0)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let r=n?this.getAttribute(t):Dh;const o=kn(t);n&&this._numberProps&&this._numberProps[o]&&(r=_l(r)),this._setProp(o,r,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,o=!1){if(n!==this._props[t]&&(n===Dh?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),o&&this._instance&&this._update(),r)){const a=this._ob;a&&a.disconnect(),n===!0?this.setAttribute(Jn(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Jn(t),n+""):n||this.removeAttribute(Jn(t)),a&&a.observe(this,{attributes:!0})}}_update(){iy(this._createVNode(),this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=Le(this._def,Ht(t,this._props));return this._instance||(n.ce=r=>{this._instance=r,r.ce=this,r.isCE=!0;const o=(a,s)=>{this.dispatchEvent(new CustomEvent(a,Wl(s[0])?Ht({detail:s},s[0]):{detail:s}))};r.emit=(a,...s)=>{o(a,s),Jn(a)!==a&&o(Jn(a),s)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const r=this._nonce;for(let o=t.length-1;o>=0;o--){const a=document.createElement("style");r&&a.setAttribute("nonce",r),a.textContent=t[o],this.shadowRoot.prepend(a)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const r=n.nodeType===1&&n.getAttribute("slot")||"default";(t[r]||(t[r]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=(this._teleportTarget||this).querySelectorAll("slot"),n=this._instance.type.__scopeId;for(let r=0;r<t.length;r++){const o=t[r],a=o.getAttribute("name")||"default",s=this._slots[a],i=o.parentNode;if(s)for(const l of s){if(n&&l.nodeType===1){const u=n+"-s",c=document.createTreeWalker(l,1);l.setAttribute(u,"");let d;for(;d=c.nextNode();)d.setAttribute(u,"")}i.insertBefore(l,o)}else for(;o.firstChild;)i.insertBefore(o.firstChild,o);i.removeChild(o)}}_injectChildStyle(t){this._applyStyles(t.styles,t)}_removeChildStyle(t){}}function Zg(e){const t=hr(),n=t&&t.ce;return n||null}function J$(){const e=Zg();return e&&e.shadowRoot}function Y$(e="$style"){{const t=hr();if(!t)return St;const n=t.type.__cssModules;if(!n)return St;const r=n[e];return r||St}}const ey=new WeakMap,ty=new WeakMap,Pl=Symbol("_moveCb"),Bh=Symbol("_enterCb"),X$=e=>(delete e.props.mode,e),Q$=X$({name:"TransitionGroup",props:Ht({},qg,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=hr(),r=Cd();let o,a;return ac(()=>{if(!o.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!rS(o[0].el,n.vnode.el,s))return;o.forEach(eS),o.forEach(tS);const i=o.filter(nS);Wu(),i.forEach(l=>{const u=l.el,c=u.style;Lr(u,s),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Pl]=h=>{h&&h.target!==u||(!h||/transform$/.test(h.propertyName))&&(u.removeEventListener("transitionend",d),u[Pl]=null,Po(u,s))};u.addEventListener("transitionend",d)})}),()=>{const s=vt(e),i=Gg(s);let l=s.tag||We;if(o=[],a)for(let u=0;u<a.length;u++){const c=a[u];c.el&&c.el instanceof Element&&(o.push(c),ho(c,Xa(c,i,r,n)),ey.set(c,c.el.getBoundingClientRect()))}a=t.default?rc(t.default()):[];for(let u=0;u<a.length;u++){const c=a[u];c.key!=null&&ho(c,Xa(c,i,r,n))}return Le(l,null,a)}}}),Z$=Q$;function eS(e){const t=e.el;t[Pl]&&t[Pl](),t[Bh]&&t[Bh]()}function tS(e){ty.set(e,e.el.getBoundingClientRect())}function nS(e){const t=ey.get(e),n=ty.get(e),r=t.left-n.left,o=t.top-n.top;if(r||o){const a=e.el.style;return a.transform=a.webkitTransform=`translate(${r}px,${o}px)`,a.transitionDuration="0s",e}}function rS(e,t,n){const r=e.cloneNode(),o=e[Za];o&&o.forEach(i=>{i.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(i=>i&&r.classList.add(i)),r.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(r);const{hasTransform:s}=Jg(r);return a.removeChild(r),s}const zo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ye(t)?n=>za(t,n):t};function oS(e){e.target.composing=!0}function Fh(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const fr=Symbol("_assign"),es={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e[fr]=zo(o);const a=r||o.props&&o.props.type==="number";co(e,t?"change":"input",s=>{if(s.target.composing)return;let i=e.value;n&&(i=i.trim()),a&&(i=yl(i)),e[fr](i)}),n&&co(e,"change",()=>{e.value=e.value.trim()}),t||(co(e,"compositionstart",oS),co(e,"compositionend",Fh),co(e,"change",Fh))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:o,number:a}},s){if(e[fr]=zo(s),e.composing)return;const i=(a||e.type==="number")&&!/^0\d/.test(e.value)?yl(e.value):e.value,l=t??"";i!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||o&&e.value.trim()===l)||(e.value=l))}},Rd={deep:!0,created(e,t,n){e[fr]=zo(n),co(e,"change",()=>{const r=e._modelValue,o=ts(e),a=e.checked,s=e[fr];if(Ye(r)){const i=Jl(r,o),l=i!==-1;if(a&&!l)s(r.concat(o));else if(!a&&l){const u=[...r];u.splice(i,1),s(u)}}else if(ba(r)){const i=new Set(r);a?i.add(o):i.delete(o),s(i)}else s(ny(e,a))})},mounted:jh,beforeUpdate(e,t,n){e[fr]=zo(n),jh(e,t,n)}};function jh(e,{value:t,oldValue:n},r){e._modelValue=t;let o;if(Ye(t))o=Jl(t,r.props.value)>-1;else if(ba(t))o=t.has(r.props.value);else{if(t===n)return;o=Vo(t,ny(e,!0))}e.checked!==o&&(e.checked=o)}const Ld={created(e,{value:t},n){e.checked=Vo(t,n.props.value),e[fr]=zo(n),co(e,"change",()=>{e[fr](ts(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[fr]=zo(r),t!==n&&(e.checked=Vo(t,r.props.value))}},Dd={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const o=ba(t);co(e,"change",()=>{const a=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?yl(ts(s)):ts(s));e[fr](e.multiple?o?new Set(a):a:a[0]),e._assigning=!0,ar(()=>{e._assigning=!1})}),e[fr]=zo(r)},mounted(e,{value:t}){Vh(e,t)},beforeUpdate(e,t,n){e[fr]=zo(n)},updated(e,{value:t}){e._assigning||Vh(e,t)}};function Vh(e,t){const n=e.multiple,r=Ye(t);if(!(n&&!r&&!ba(t))){for(let o=0,a=e.options.length;o<a;o++){const s=e.options[o],i=ts(s);if(n)if(r){const l=typeof i;l==="string"||l==="number"?s.selected=t.some(u=>String(u)===String(i)):s.selected=Jl(t,i)>-1}else s.selected=t.has(i);else if(Vo(ts(s),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ts(e){return"_value"in e?e._value:e.value}function ny(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Ml={created(e,t,n){Ki(e,t,n,null,"created")},mounted(e,t,n){Ki(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){Ki(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){Ki(e,t,n,r,"updated")}};function ry(e,t){switch(e){case"SELECT":return Dd;case"TEXTAREA":return es;default:switch(t){case"checkbox":return Rd;case"radio":return Ld;default:return es}}}function Ki(e,t,n,r,o){const s=ry(e.tagName,n.props&&n.props.type)[o];s&&s(e,t,n,r)}function aS(){es.getSSRProps=({value:e})=>({value:e}),Ld.getSSRProps=({value:e},t)=>{if(t.props&&Vo(t.props.value,e))return{checked:!0}},Rd.getSSRProps=({value:e},t)=>{if(Ye(e)){if(t.props&&Jl(e,t.props.value)>-1)return{checked:!0}}else if(ba(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Ml.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=ry(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const sS=["ctrl","shift","alt","meta"],iS={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>sS.some(n=>e[`${n}Key`]&&!t.includes(n))},cr=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...a)=>{for(let s=0;s<t.length;s++){const i=iS[t[s]];if(i&&i(o,t))return}return e(o,...a)})},lS={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},vo=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const a=Jn(o.key);if(t.some(s=>s===a||lS[s]===a))return e(o)})},oy=Ht({patchProp:K$},k$);let Ks,Uh=!1;function ay(){return Ks||(Ks=wg(oy))}function sy(){return Ks=Uh?Ks:Ag(oy),Uh=!0,Ks}const iy=(...e)=>{ay().render(...e)},cS=(...e)=>{sy().hydrate(...e)},Ol=(...e)=>{const t=ay().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=uy(r);if(!o)return;const a=t._component;!at(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const s=n(o,!1,cy(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},ly=(...e)=>{const t=sy().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=uy(r);if(o)return n(o,!0,cy(o))},t};function cy(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function uy(e){return Gt(e)?document.querySelector(e):e}let Hh=!1;const uS=()=>{Hh||(Hh=!0,aS(),N$())};/**
|
|
25
|
-
* vue v3.5.13
|
|
26
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
27
|
-
* @license MIT
|
|
28
|
-
**/const dS=()=>{},fS=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Xv,BaseTransitionPropsValidators:$d,Comment:an,DeprecationTypes:I$,EffectScope:md,ErrorCodes:UA,ErrorTypeStrings:_$,Fragment:We,KeepAlive:dC,ReactiveEffect:Zs,Static:fa,Suspense:e$,Teleport:qv,Text:Fo,TrackOpTypes:RA,Transition:Nd,TransitionGroup:Z$,TriggerOpTypes:LA,VueElement:lc,assertNumber:VA,callWithAsyncErrorHandling:pr,callWithErrorHandling:is,camelize:kn,capitalize:fi,cloneVNode:qr,compatUtils:S$,compile:dS,computed:H,createApp:Ol,createBlock:Oe,createCommentVNode:ve,createElementBlock:L,createElementVNode:F,createHydrationRenderer:Ag,createPropsRestProxy:TC,createRenderer:wg,createSSRApp:ly,createSlots:mC,createStaticVNode:l$,createTextVNode:tn,createVNode:Le,customRef:Lv,defineAsyncComponent:pa,defineComponent:we,defineCustomElement:Qg,defineEmits:_C,defineExpose:bC,defineModel:CC,defineOptions:wC,defineProps:yC,defineSSRCustomElement:q$,defineSlots:AC,devtools:b$,effect:sA,effectScope:oA,getCurrentInstance:hr,getCurrentScope:vd,getCurrentWatcher:DA,getTransitionRawChildren:rc,guardReactiveProps:Dg,h:Ho,handleError:wa,hasInjectionContext:DC,hydrate:cS,hydrateOnIdle:oC,hydrateOnInteraction:lC,hydrateOnMediaQuery:iC,hydrateOnVisible:sC,initCustomFormatter:v$,initDirectivesForSSR:uS,inject:te,isMemoSame:Hg,isProxy:tc,isReactive:Do,isReadonly:Uo,isRef:sn,isRuntimeOnly:p$,isShallow:rr,isVNode:mo,markRaw:Nv,mergeDefaults:EC,mergeModels:Wr,mergeProps:qa,nextTick:ar,normalizeClass:ut,normalizeProps:eA,normalizeStyle:_t,onActivated:Zv,onBeforeMount:ls,onBeforeUnmount:_o,onBeforeUpdate:Id,onDeactivated:eg,onErrorCaptured:ag,onMounted:ln,onRenderTracked:og,onRenderTriggered:rg,onScopeDispose:gv,onServerPrefetch:ng,onUnmounted:Nr,onUpdated:ac,onWatcherCleanup:Bv,openBlock:k,popScopeId:qA,provide:dg,proxyRefs:bd,pushScopeId:WA,queuePostFlushCb:ni,reactive:Zl,readonly:In,ref:Ae,registerRuntimeCompiler:f$,render:iy,renderList:Pt,renderSlot:Vt,resolveComponent:hC,resolveDirective:ig,resolveDynamicComponent:cs,resolveFilter:$$,resolveTransitionHooks:Xa,setBlockTracking:Fu,setDevtoolsHook:w$,setTransitionHooks:ho,shallowReactive:Ov,shallowReadonly:oa,shallowRef:En,ssrContextKey:Ig,ssrUtils:C$,stop:iA,toDisplayString:Ee,toHandlerKey:Fs,toHandlers:vC,toRaw:vt,toRef:po,toRefs:wd,toValue:TA,transformVNodeArgs:s$,triggerRef:EA,unref:O,useAttrs:IC,useCssModule:Y$,useCssVars:vi,useHost:Zg,useId:XA,useModel:Yr,useSSRContext:Eg,useShadowRoot:J$,useSlots:SC,useTemplateRef:ot,useTransitionState:Cd,vModelCheckbox:Rd,vModelDynamic:Ml,vModelRadio:Ld,vModelSelect:Dd,vModelText:es,vShow:xr,version:zg,warn:y$,watch:Ue,watchEffect:KC,watchPostEffect:WC,watchSyncEffect:Tg,withAsyncContext:kC,withCtx:Je,withDefaults:$C,withDirectives:Dn,withKeys:vo,withMemo:g$,withModifiers:cr,withScopeId:GA},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */const{entries:dy,setPrototypeOf:zh,isFrozen:pS,getPrototypeOf:hS,getOwnPropertyDescriptor:mS}=Object;let{freeze:zn,seal:Pr,create:fy}=Object,{apply:Gu,construct:Ju}=typeof Reflect<"u"&&Reflect;zn||(zn=function(t){return t});Pr||(Pr=function(t){return t});Gu||(Gu=function(t,n,r){return t.apply(n,r)});Ju||(Ju=function(t,n){return new t(...n)});const Wi=sr(Array.prototype.forEach),Kh=sr(Array.prototype.pop),Is=sr(Array.prototype.push),dl=sr(String.prototype.toLowerCase),du=sr(String.prototype.toString),vS=sr(String.prototype.match),Es=sr(String.prototype.replace),gS=sr(String.prototype.indexOf),yS=sr(String.prototype.trim),Cr=sr(Object.prototype.hasOwnProperty),tr=sr(RegExp.prototype.test),Ts=_S(TypeError);function sr(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Gu(e,t,r)}}function _S(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ju(e,n)}}function At(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:dl;zh&&zh(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const a=n(o);a!==o&&(pS(t)||(t[r]=a),o=a)}e[o]=!0}return e}function bS(e){for(let t=0;t<e.length;t++)Cr(e,t)||(e[t]=null);return e}function aa(e){const t=fy(null);for(const[n,r]of dy(e))Cr(e,n)&&(Array.isArray(r)?t[n]=bS(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=aa(r):t[n]=r);return t}function qi(e,t){for(;e!==null;){const r=mS(e,t);if(r){if(r.get)return sr(r.get);if(typeof r.value=="function")return sr(r.value)}e=hS(e)}function n(){return null}return n}const Wh=zn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),fu=zn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pu=zn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),wS=zn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),hu=zn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),AS=zn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qh=zn(["#text"]),Gh=zn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),mu=zn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Jh=zn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Gi=zn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),CS=Pr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$S=Pr(/<%[\w\W]*|[\w\W]*%>/gm),SS=Pr(/\${[\w\W]*}/gm),IS=Pr(/^data-[\-\w.\u00B7-\uFFFF]/),ES=Pr(/^aria-[\-\w]+$/),py=Pr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),TS=Pr(/^(?:\w+script|data):/i),kS=Pr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hy=Pr(/^html$/i);var Yh=Object.freeze({__proto__:null,MUSTACHE_EXPR:CS,ERB_EXPR:$S,TMPLIT_EXPR:SS,DATA_ATTR:IS,ARIA_ATTR:ES,IS_ALLOWED_URI:py,IS_SCRIPT_OR_DATA:TS,ATTR_WHITESPACE:kS,DOCTYPE_NAME:hy});const xS=function(){return typeof window>"u"?null:window},PS=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function my(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xS();const t=Qe=>my(Qe);if(t.version="3.0.9",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:i,Element:l,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:m}=e,_=l.prototype,v=qi(_,"cloneNode"),w=qi(_,"nextSibling"),A=qi(_,"childNodes"),C=qi(_,"parentNode");if(typeof s=="function"){const Qe=n.createElement("template");Qe.content&&Qe.content.ownerDocument&&(n=Qe.content.ownerDocument)}let y,p="";const{implementation:b,createNodeIterator:I,createDocumentFragment:D,getElementsByTagName:K}=n,{importNode:G}=r;let Z={};t.isSupported=typeof dy=="function"&&typeof C=="function"&&b&&b.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:be,ERB_EXPR:ce,TMPLIT_EXPR:ge,DATA_ATTR:de,ARIA_ATTR:He,IS_SCRIPT_OR_DATA:Ce,ATTR_WHITESPACE:fe}=Yh;let{IS_ALLOWED_URI:he}=Yh,Ne=null;const me=At({},[...Wh,...fu,...pu,...hu,...qh]);let z=null;const ue=At({},[...Gh,...mu,...Jh,...Gi]);let X=Object.seal(fy(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),T=null,R=null,se=!0,Re=!0,De=!1,it=!0,et=!1,dt=!1,zt=!1,N=!1,j=!1,ae=!1,ye=!1,U=!0,J=!1;const x="user-content-";let S=!0,E=!1,P={},W=null;const re=At({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ie=null;const Pe=At({},["audio","video","img","source","image","track"]);let Xe=null;const lt=At({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),st="http://www.w3.org/1998/Math/MathML",Nt="http://www.w3.org/2000/svg",Tt="http://www.w3.org/1999/xhtml";let nn=Tt,Zt=!1,le=null;const Te=At({},[st,Nt,Tt],du);let _e=null;const Se=["application/xhtml+xml","text/html"],Be="text/html";let je=null,nt=null;const kt=n.createElement("form"),pt=function(Q){return Q instanceof RegExp||Q instanceof Function},Dt=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(nt&&nt===Q)){if((!Q||typeof Q!="object")&&(Q={}),Q=aa(Q),_e=Se.indexOf(Q.PARSER_MEDIA_TYPE)===-1?Be:Q.PARSER_MEDIA_TYPE,je=_e==="application/xhtml+xml"?du:dl,Ne=Cr(Q,"ALLOWED_TAGS")?At({},Q.ALLOWED_TAGS,je):me,z=Cr(Q,"ALLOWED_ATTR")?At({},Q.ALLOWED_ATTR,je):ue,le=Cr(Q,"ALLOWED_NAMESPACES")?At({},Q.ALLOWED_NAMESPACES,du):Te,Xe=Cr(Q,"ADD_URI_SAFE_ATTR")?At(aa(lt),Q.ADD_URI_SAFE_ATTR,je):lt,ie=Cr(Q,"ADD_DATA_URI_TAGS")?At(aa(Pe),Q.ADD_DATA_URI_TAGS,je):Pe,W=Cr(Q,"FORBID_CONTENTS")?At({},Q.FORBID_CONTENTS,je):re,T=Cr(Q,"FORBID_TAGS")?At({},Q.FORBID_TAGS,je):{},R=Cr(Q,"FORBID_ATTR")?At({},Q.FORBID_ATTR,je):{},P=Cr(Q,"USE_PROFILES")?Q.USE_PROFILES:!1,se=Q.ALLOW_ARIA_ATTR!==!1,Re=Q.ALLOW_DATA_ATTR!==!1,De=Q.ALLOW_UNKNOWN_PROTOCOLS||!1,it=Q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,et=Q.SAFE_FOR_TEMPLATES||!1,dt=Q.WHOLE_DOCUMENT||!1,j=Q.RETURN_DOM||!1,ae=Q.RETURN_DOM_FRAGMENT||!1,ye=Q.RETURN_TRUSTED_TYPE||!1,N=Q.FORCE_BODY||!1,U=Q.SANITIZE_DOM!==!1,J=Q.SANITIZE_NAMED_PROPS||!1,S=Q.KEEP_CONTENT!==!1,E=Q.IN_PLACE||!1,he=Q.ALLOWED_URI_REGEXP||py,nn=Q.NAMESPACE||Tt,X=Q.CUSTOM_ELEMENT_HANDLING||{},Q.CUSTOM_ELEMENT_HANDLING&&pt(Q.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(X.tagNameCheck=Q.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Q.CUSTOM_ELEMENT_HANDLING&&pt(Q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(X.attributeNameCheck=Q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Q.CUSTOM_ELEMENT_HANDLING&&typeof Q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(X.allowCustomizedBuiltInElements=Q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),et&&(Re=!1),ae&&(j=!0),P&&(Ne=At({},qh),z=[],P.html===!0&&(At(Ne,Wh),At(z,Gh)),P.svg===!0&&(At(Ne,fu),At(z,mu),At(z,Gi)),P.svgFilters===!0&&(At(Ne,pu),At(z,mu),At(z,Gi)),P.mathMl===!0&&(At(Ne,hu),At(z,Jh),At(z,Gi))),Q.ADD_TAGS&&(Ne===me&&(Ne=aa(Ne)),At(Ne,Q.ADD_TAGS,je)),Q.ADD_ATTR&&(z===ue&&(z=aa(z)),At(z,Q.ADD_ATTR,je)),Q.ADD_URI_SAFE_ATTR&&At(Xe,Q.ADD_URI_SAFE_ATTR,je),Q.FORBID_CONTENTS&&(W===re&&(W=aa(W)),At(W,Q.FORBID_CONTENTS,je)),S&&(Ne["#text"]=!0),dt&&At(Ne,["html","head","body"]),Ne.table&&(At(Ne,["tbody"]),delete T.tbody),Q.TRUSTED_TYPES_POLICY){if(typeof Q.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ts('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ts('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=Q.TRUSTED_TYPES_POLICY,p=y.createHTML("")}else y===void 0&&(y=PS(m,o)),y!==null&&typeof p=="string"&&(p=y.createHTML(""));zn&&zn(Q),nt=Q}},Jt=At({},["mi","mo","mn","ms","mtext"]),Kt=At({},["foreignobject","desc","title","annotation-xml"]),Yt=At({},["title","style","font","a","script"]),gn=At({},[...fu,...pu,...wS]),wo=At({},[...hu,...AS]),ys=function(Q){let Me=C(Q);(!Me||!Me.tagName)&&(Me={namespaceURI:nn,tagName:"template"});const Ge=dl(Q.tagName),Ft=dl(Me.tagName);return le[Q.namespaceURI]?Q.namespaceURI===Nt?Me.namespaceURI===Tt?Ge==="svg":Me.namespaceURI===st?Ge==="svg"&&(Ft==="annotation-xml"||Jt[Ft]):!!gn[Ge]:Q.namespaceURI===st?Me.namespaceURI===Tt?Ge==="math":Me.namespaceURI===Nt?Ge==="math"&&Kt[Ft]:!!wo[Ge]:Q.namespaceURI===Tt?Me.namespaceURI===Nt&&!Kt[Ft]||Me.namespaceURI===st&&!Jt[Ft]?!1:!wo[Ge]&&(Yt[Ge]||!gn[Ge]):!!(_e==="application/xhtml+xml"&&le[Q.namespaceURI]):!1},vr=function(Q){Is(t.removed,{element:Q});try{Q.parentNode.removeChild(Q)}catch{Q.remove()}},Ao=function(Q,Me){try{Is(t.removed,{attribute:Me.getAttributeNode(Q),from:Me})}catch{Is(t.removed,{attribute:null,from:Me})}if(Me.removeAttribute(Q),Q==="is"&&!z[Q])if(j||ae)try{vr(Me)}catch{}else try{Me.setAttribute(Q,"")}catch{}},Co=function(Q){let Me=null,Ge=null;if(N)Q="<remove></remove>"+Q;else{const yn=vS(Q,/^[\r\n\t ]+/);Ge=yn&&yn[0]}_e==="application/xhtml+xml"&&nn===Tt&&(Q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Q+"</body></html>");const Ft=y?y.createHTML(Q):Q;if(nn===Tt)try{Me=new h().parseFromString(Ft,_e)}catch{}if(!Me||!Me.documentElement){Me=b.createDocument(nn,"template",null);try{Me.documentElement.innerHTML=Zt?p:Ft}catch{}}const un=Me.body||Me.documentElement;return Q&&Ge&&un.insertBefore(n.createTextNode(Ge),un.childNodes[0]||null),nn===Tt?K.call(Me,dt?"html":"body")[0]:dt?Me.documentElement:un},to=function(Q){return I.call(Q.ownerDocument||Q,Q,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},Ac=function(Q){return Q instanceof d&&(typeof Q.nodeName!="string"||typeof Q.textContent!="string"||typeof Q.removeChild!="function"||!(Q.attributes instanceof c)||typeof Q.removeAttribute!="function"||typeof Q.setAttribute!="function"||typeof Q.namespaceURI!="string"||typeof Q.insertBefore!="function"||typeof Q.hasChildNodes!="function")},Ci=function(Q){return typeof i=="function"&&Q instanceof i},gr=function(Q,Me,Ge){Z[Q]&&Wi(Z[Q],Ft=>{Ft.call(t,Me,Ge,nt)})},Yo=function(Q){let Me=null;if(gr("beforeSanitizeElements",Q,null),Ac(Q))return vr(Q),!0;const Ge=je(Q.nodeName);if(gr("uponSanitizeElement",Q,{tagName:Ge,allowedTags:Ne}),Q.hasChildNodes()&&!Ci(Q.firstElementChild)&&tr(/<[/\w]/g,Q.innerHTML)&&tr(/<[/\w]/g,Q.textContent))return vr(Q),!0;if(!Ne[Ge]||T[Ge]){if(!T[Ge]&&_s(Ge)&&(X.tagNameCheck instanceof RegExp&&tr(X.tagNameCheck,Ge)||X.tagNameCheck instanceof Function&&X.tagNameCheck(Ge)))return!1;if(S&&!W[Ge]){const Ft=C(Q)||Q.parentNode,un=A(Q)||Q.childNodes;if(un&&Ft){const yn=un.length;for(let xn=yn-1;xn>=0;--xn)Ft.insertBefore(v(un[xn],!0),w(Q))}}return vr(Q),!0}return Q instanceof l&&!ys(Q)||(Ge==="noscript"||Ge==="noembed"||Ge==="noframes")&&tr(/<\/no(script|embed|frames)/i,Q.innerHTML)?(vr(Q),!0):(et&&Q.nodeType===3&&(Me=Q.textContent,Wi([be,ce,ge],Ft=>{Me=Es(Me,Ft," ")}),Q.textContent!==Me&&(Is(t.removed,{element:Q.cloneNode()}),Q.textContent=Me)),gr("afterSanitizeElements",Q,null),!1)},$i=function(Q,Me,Ge){if(U&&(Me==="id"||Me==="name")&&(Ge in n||Ge in kt))return!1;if(!(Re&&!R[Me]&&tr(de,Me))){if(!(se&&tr(He,Me))){if(!z[Me]||R[Me]){if(!(_s(Q)&&(X.tagNameCheck instanceof RegExp&&tr(X.tagNameCheck,Q)||X.tagNameCheck instanceof Function&&X.tagNameCheck(Q))&&(X.attributeNameCheck instanceof RegExp&&tr(X.attributeNameCheck,Me)||X.attributeNameCheck instanceof Function&&X.attributeNameCheck(Me))||Me==="is"&&X.allowCustomizedBuiltInElements&&(X.tagNameCheck instanceof RegExp&&tr(X.tagNameCheck,Ge)||X.tagNameCheck instanceof Function&&X.tagNameCheck(Ge))))return!1}else if(!Xe[Me]){if(!tr(he,Es(Ge,fe,""))){if(!((Me==="src"||Me==="xlink:href"||Me==="href")&&Q!=="script"&&gS(Ge,"data:")===0&&ie[Q])){if(!(De&&!tr(Ce,Es(Ge,fe,"")))){if(Ge)return!1}}}}}}return!0},_s=function(Q){return Q!=="annotation-xml"&&Q.indexOf("-")>0},Si=function(Q){gr("beforeSanitizeAttributes",Q,null);const{attributes:Me}=Q;if(!Me)return;const Ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z};let Ft=Me.length;for(;Ft--;){const un=Me[Ft],{name:yn,namespaceURI:xn,value:Rr}=un,Xo=je(yn);let Pn=yn==="value"?Rr:yS(Rr);if(Ge.attrName=Xo,Ge.attrValue=Pn,Ge.keepAttr=!0,Ge.forceKeepAttr=void 0,gr("uponSanitizeAttribute",Q,Ge),Pn=Ge.attrValue,Ge.forceKeepAttr||(Ao(yn,Q),!Ge.keepAttr))continue;if(!it&&tr(/\/>/i,Pn)){Ao(yn,Q);continue}et&&Wi([be,ce,ge],Ei=>{Pn=Es(Pn,Ei," ")});const Ii=je(Q.nodeName);if($i(Ii,Xo,Pn)){if(J&&(Xo==="id"||Xo==="name")&&(Ao(yn,Q),Pn=x+Pn),y&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!xn)switch(m.getAttributeType(Ii,Xo)){case"TrustedHTML":{Pn=y.createHTML(Pn);break}case"TrustedScriptURL":{Pn=y.createScriptURL(Pn);break}}try{xn?Q.setAttributeNS(xn,yn,Pn):Q.setAttribute(yn,Pn),Kh(t.removed)}catch{}}}gr("afterSanitizeAttributes",Q,null)},Cc=function Qe(Q){let Me=null;const Ge=to(Q);for(gr("beforeSanitizeShadowDOM",Q,null);Me=Ge.nextNode();)gr("uponSanitizeShadowNode",Me,null),!Yo(Me)&&(Me.content instanceof a&&Qe(Me.content),Si(Me));gr("afterSanitizeShadowDOM",Q,null)};return t.sanitize=function(Qe){let Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Me=null,Ge=null,Ft=null,un=null;if(Zt=!Qe,Zt&&(Qe="<!-->"),typeof Qe!="string"&&!Ci(Qe))if(typeof Qe.toString=="function"){if(Qe=Qe.toString(),typeof Qe!="string")throw Ts("dirty is not a string, aborting")}else throw Ts("toString is not a function");if(!t.isSupported)return Qe;if(zt||Dt(Q),t.removed=[],typeof Qe=="string"&&(E=!1),E){if(Qe.nodeName){const Rr=je(Qe.nodeName);if(!Ne[Rr]||T[Rr])throw Ts("root node is forbidden and cannot be sanitized in-place")}}else if(Qe instanceof i)Me=Co("<!---->"),Ge=Me.ownerDocument.importNode(Qe,!0),Ge.nodeType===1&&Ge.nodeName==="BODY"||Ge.nodeName==="HTML"?Me=Ge:Me.appendChild(Ge);else{if(!j&&!et&&!dt&&Qe.indexOf("<")===-1)return y&&ye?y.createHTML(Qe):Qe;if(Me=Co(Qe),!Me)return j?null:ye?p:""}Me&&N&&vr(Me.firstChild);const yn=to(E?Qe:Me);for(;Ft=yn.nextNode();)Yo(Ft)||(Ft.content instanceof a&&Cc(Ft.content),Si(Ft));if(E)return Qe;if(j){if(ae)for(un=D.call(Me.ownerDocument);Me.firstChild;)un.appendChild(Me.firstChild);else un=Me;return(z.shadowroot||z.shadowrootmode)&&(un=G.call(r,un,!0)),un}let xn=dt?Me.outerHTML:Me.innerHTML;return dt&&Ne["!doctype"]&&Me.ownerDocument&&Me.ownerDocument.doctype&&Me.ownerDocument.doctype.name&&tr(hy,Me.ownerDocument.doctype.name)&&(xn="<!DOCTYPE "+Me.ownerDocument.doctype.name+`>
|
|
29
|
-
`+xn),et&&Wi([be,ce,ge],Rr=>{xn=Es(xn,Rr," ")}),y&&ye?y.createHTML(xn):xn},t.setConfig=function(){let Qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Dt(Qe),zt=!0},t.clearConfig=function(){nt=null,zt=!1},t.isValidAttribute=function(Qe,Q,Me){nt||Dt({});const Ge=je(Qe),Ft=je(Q);return $i(Ge,Ft,Me)},t.addHook=function(Qe,Q){typeof Q=="function"&&(Z[Qe]=Z[Qe]||[],Is(Z[Qe],Q))},t.removeHook=function(Qe){if(Z[Qe])return Kh(Z[Qe])},t.removeHooks=function(Qe){Z[Qe]&&(Z[Qe]=[])},t.removeAllHooks=function(){Z={}},t}var MS=my();function OS(e,t){const n=e.hooks??{};let r;for(r in n){const o=n[r];o!==void 0&&t.addHook(r,o)}}function vy(){return MS()}function NS(e={},t=vy){const n=t();OS(e,n);const r=function(o,a){const s=a.value;if(a.oldValue===s)return;const i=`${s}`,l=a.arg,u=e.namedConfigurations,c=e.default??{};if(u&&l!==void 0){o.innerHTML=n.sanitize(i,u[l]??c);return}o.innerHTML=n.sanitize(i,c)};return{mounted:r,updated:r}}const RS={install(e,t={},n=vy){e.directive("dompurify-html",NS(t,n))}};function LS(e,t){return H({get(){const n=localStorage.getItem(e);if(n)try{const r=JSON.parse(n);if((t==null?void 0:t(r))===!1){localStorage.removeItem(e);return}return r}catch{localStorage.removeItem(e);return}},set(n){n===void 0?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(n))}})}function wn(){return{log:console.log,warn:console.warn,info:console.info,error:console.error}}const DS=1500,BS=1e3,FS=100,jS=wn();var VS=(e=>(e[e.None=0]="None",e[e.Single=1]="Single",e[e.Multiple=2]="Multiple",e))(VS||{});function US(){const e=LS("generateBuilderManager__mode"),t={mode:e.value??"ui",selection:[],mutationTransactionsSnapshot:{undo:null,redo:null},logEntries:[]},n=Ae(t);let r=null,o=0;const a=[],s=fe=>{l.value=fe},i=()=>n.value.mode,l=H({get:()=>n.value.mode,set(fe){n.value.mode=fe,e.value=fe}}),u=H(()=>l.value=="blueprints"?"blueprints_root":"root"),c=(fe,he,Ne)=>{if(fe===null){n.value.selection=[];return}n.value.selection.length!==0&&(n.value.selection=[]),d(fe,he,Ne)},d=(fe,he,Ne)=>{let me=he;if(typeof me>"u"){const z=document.querySelector(`.ComponentRenderer [data-writer-id="${fe}"]`);me=z==null?void 0:z.dataset.writerInstancePath}n.value.selection.push({componentId:fe,instancePath:me,source:Ne})},h=(fe,he,Ne,me)=>{if(!fe.shiftKey&&!fe.ctrlKey&&!fe.metaKey)return c(he,Ne,me);m(he)?_(he):d(he,Ne,me)},m=fe=>n.value.selection.some(he=>he.componentId===fe),_=fe=>{const he=n.value.selection.filter(Ne=>Ne.componentId!==fe);he.length!==n.value.selection.length&&(n.value.selection=he)},v=H(()=>n.value.selection.length===0?0:n.value.selection.length===1?1:2),w=H(()=>v.value===1),A=H(()=>n.value.selection[0]),C=H(()=>{var fe;return(fe=n.value.selection[0])==null?void 0:fe.componentId}),y=(fe,he,Ne=!1)=>{if(r!==null)return;o<0&&(a.splice(o),o=0);const me=a[a.length-1],z=Date.now()-(me==null?void 0:me.timestamp);if(me!=null&&me.enableDebounce&&(me==null?void 0:me.id)==fe&&z<BS){r=a.pop();return}r={id:fe,desc:he,timestamp:null,enableDebounce:Ne,mutations:{}}},p=fe=>{r.mutations[fe.id]||(r.mutations[fe.id]={jsonPre:fe?JSON.stringify(fe):void 0})},b=fe=>{r.mutations[fe.id]||(r.mutations[fe.id]={}),r.mutations[fe.id].jsonPost=fe?JSON.stringify(fe):void 0},I=fe=>{if(r.id!==fe){jS.warn("Mutation transaction mismatch.",fe,r.id);return}r.timestamp=Date.now(),a.push(r),r=null,G()},D=()=>{const fe=a.length-1+o,he=a[fe];return he&&o--,G(),he},K=()=>{const fe=a.length+o,he=a[fe];return he&&o++,G(),he},G=()=>{const fe=a.length-1+o,he=a[fe],Ne=a.length+o,me=a[Ne];n.value.mutationTransactionsSnapshot={undo:he,redo:me}},Z=()=>n.value.mutationTransactionsSnapshot;async function be(fe){const he=JSON.stringify(fe);let Ne=5981;for(let z=0;z<he.length;z++)Ne=(Ne<<5)+Ne+he.charCodeAt(z);return Ne.toString(16).padStart(2,"0")}const ce=async fe=>{const{type:he,title:Ne,message:me,code:z,blueprintExecution:ue,id:X}=fe,T=await be(fe);if(X){const R=n.value.logEntries.findIndex(se=>se.id===X);R!==-1&&n.value.logEntries.splice(R,1)}else{const R=n.value.logEntries.find(se=>se.fingerprint===T);if(R){R.repeated++,R.timestampReceived=new Date,n.value.logEntries.sort((se,Re)=>se.timestampReceived<Re.timestampReceived?1:-1);return}}n.value.logEntries.unshift({id:X,type:he,title:Ne,message:me,code:z,blueprintExecution:ue,timestampReceived:new Date,fingerprint:T,repeated:0}),n.value.logEntries.splice(FS)},ge=()=>n.value.logEntries.length,de=()=>{n.value.logEntries=[]},He=()=>n.value.logEntries;return{setMode:s,getMode:i,mode:l,activeRootId:u,openPanels:Ae(new Set),isSettingsBarCollapsed:Ae(!1),isComponentIdSelected:m,selectionStatus:v,isSingleSelectionActive:w,firstSelectedId:C,firstSelectedItem:A,removeSelectedComponentId:_,setSelection:c,appendSelection:d,handleSelectionFromEvent:h,selection:H(()=>n.value.selection),mutationTransactions:In(a),openMutationTransaction:y,registerPreMutation:p,registerPostMutation:b,closeMutationTransaction:I,consumeUndoTransaction:D,consumeRedoTransaction:K,getMutationTransactionsSnapshot:Z,handleLogEntry:ce,getLogEntryCount:ge,clearLogEntries:de,getLogEntries:He}}const ne={core:Symbol(),builderManager:Symbol(),evaluatedFields:Symbol(),componentId:Symbol(),isBeingEdited:Symbol(),isDisabled:Symbol(),getChildrenVNodes:Symbol(),renderProxiedComponent:Symbol(),instancePath:Symbol(),flattenedInstancePath:Symbol(),instanceData:Symbol()};function HS(e){var n;const t=(n=e.split(","))==null?void 0:n[1];if(!t)throw Error(`Could not extract base64 from data url: ${e}`);return t}function zS(e){const t=window.atob(e),n=t.length,r=new Uint8Array(n);for(let o=0;o<n;o++)r[o]=t.charCodeAt(o);return r.buffer}var Y=(e=>(e.Text="Text",e.Boolean="Boolean",e.KeyValue="Key-Value",e.Color="Color",e.Shadow="Shadow",e.Number="Number",e.Object="Object",e.IdKey="Identifying Key",e.Width="Width",e.HAlign="Align (H)",e.VAlign="Align (V)",e.Padding="Padding",e.Tools="Tools",e.ComponentPicker="Component",e.Code="Code",e.BlueprintKey="Blueprint Key",e.Handler="Handler",e.WriterGraphId="Graph Id",e.WriterAppId="App Id",e.WriterModelId="Model Id",e.ComponentId="Component Id",e.ComponentEventType="Component Event Type",e))(Y||{}),ze=(e=>(e.General="General",e.Style="Style",e.Tools="Tools",e))(ze||{}),cc=(e=>(e.Text="Text",e.Textarea="Textarea",e))(cc||{});const KS={class:"WdsNumberInput__right"},WS=we({inheritAttrs:!1,__name:"WdsNumberInput",props:Wr({step:{type:Number,default:1},class:{type:String,default:void 0}},{modelValue:{type:Number,required:!1,default:void 0},modelModifiers:{}}),emits:Wr({focusout:e=>typeof e=="number"},["update:modelValue"]),setup(e,{expose:t}){const n=Yr(e,"modelValue"),r=e;t({focus:s});const o=Ae();function a(i){n.value=(n.value??0)+i,s()}function s(){var i;(i=o.value)==null||i.focus()}return(i,l)=>(k(),L("div",{class:ut(["WdsNumberInput colorTransformer",r.class])},[Dn(F("input",qa({ref_key:"input",ref:o,"onUpdate:modelValue":l[0]||(l[0]=u=>n.value=u),class:"WdsNumberInput__input"},i.$attrs,{type:"number",onFocusout:l[1]||(l[1]=u=>i.$emit("focusout",n.value))}),null,16),[[es,n.value]]),F("div",KS,[F("button",{class:"WdsNumberInput__right__arrow",type:"button",onClick:l[2]||(l[2]=cr(u=>a(e.step),["prevent"])),onPointerdown:l[3]||(l[3]=cr(()=>{},["prevent"]))},l[6]||(l[6]=[F("span",{class:"WdsNumberInput__right__arrow__up"},null,-1)]),32),F("button",{class:"WdsNumberInput__right__arrow",type:"button",onClick:l[4]||(l[4]=cr(u=>a(-e.step),["prevent"])),onPointerdown:l[5]||(l[5]=cr(()=>{},["prevent"]))},l[7]||(l[7]=[F("span",{class:"WdsNumberInput__right__arrow__down"},null,-1)]),32)])],2))}}),Ie=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},qS=Ie(WS,[["__scopeId","data-v-e225ba84"]]),GS={key:1,class:"CoreDataframeCellNumber--text"},JS=we({__name:"CoreDataframeCellNumber",props:{value:{validator:e=>typeof e=="number"||typeof e=="bigint",required:!0},editable:{type:Boolean,required:!1}},emits:{change:e=>typeof e=="number"},setup(e,{emit:t}){const n=e,r=t;function o(a){a!==n.value&&r("change",a)}return(a,s)=>e.editable?(k(),Oe(qS,{key:0,class:"CoreDataframeCellNumber--input","model-value":Number(e.value),onFocusout:s[0]||(s[0]=i=>o(i))},null,8,["model-value"])):(k(),L("div",GS,Ee(e.value),1))}}),YS=Ie(JS,[["__scopeId","data-v-76f0032c"]]),XS={class:"markdown"},QS=we({__name:"BaseMarkdownRaw",props:{rawMarkdown:{type:String,required:!0}},setup(e){return(t,n)=>{const r=ig("dompurify-html");return Dn((k(),L("div",XS,null,512)),[[r,e.rawMarkdown]])}}}),gy=Ie(QS,[["__scopeId","data-v-2220bc7a"]]),yy=we({__name:"BaseMarkdown",props:{rawText:{}},setup(e){let t;const n=Ae(!1),r=e;return ls(async()=>{t=await en(()=>import("./marked.esm-273vDTCT.js"),[],import.meta.url),n.value=!0}),(o,a)=>n.value?(k(),Oe(gy,{key:0,"raw-markdown":String(O(t).parse(r.rawText)).trim(),class:"BaseMarkdown"},null,8,["raw-markdown"])):ve("",!0)}}),ZS=["aria-invalid"],eI=we({__name:"WdsTextareaInput",props:Wr({invalid:{type:Boolean,required:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const n=Yr(e,"modelValue");t({focus:i,getSelection:s,value:n,setSelectionEnd:a,setSelectionStart:o});const r=ot("input");function o(l){r.value&&(r.value.selectionStart=l)}function a(l){r.value&&(r.value.selectionEnd=l)}function s(){var l,u;return{selectionStart:(l=r.value)==null?void 0:l.selectionStart,selectionEnd:(u=r.value)==null?void 0:u.selectionEnd}}function i(){var l;(l=r.value)==null||l.focus()}return(l,u)=>Dn((k(),L("textarea",{ref_key:"input",ref:r,"onUpdate:modelValue":u[0]||(u[0]=c=>n.value=c),"aria-invalid":e.invalid},null,8,ZS)),[[es,n.value]])}}),Bd=Ie(eI,[["__scopeId","data-v-4c9293dd"]]),tI={key:2,class:"CoreDataframeCellText--text"},nI=we({__name:"CoreDataframeCellText",props:{value:{validator:()=>!0,required:!0},useMarkdown:{type:Boolean,required:!1},editable:{type:Boolean,required:!1},wrapText:{type:Boolean,required:!1}},emits:{change:e=>typeof e=="string"},setup(e,{emit:t}){const n=e,r=t,o=ot("textarea");function a(){o.value.value!==n.value&&r("change",o.value.value)}return(s,i)=>e.editable?(k(),Oe(Bd,{key:0,ref_key:"textarea",ref:o,class:"CoreDataframeCellText--textarea",rows:"1","model-value":String(e.value),onFocusout:a},null,8,["model-value"])):e.useMarkdown?(k(),Oe(yy,{key:1,"raw-text":String(e.value)},null,8,["raw-text"])):(k(),L("div",tI,[F("p",{class:ut({"CoreDataframeCellText__content--noWrap":!e.wrapText})},Ee(e.value),3)]))}}),rI=Ie(nI,[["__scopeId","data-v-992ae253"]]),oI=["checked","readonly","tabindex"],aI=we({__name:"CoreDataframeCellBoolean",props:{value:{type:Boolean,required:!0},editable:{type:Boolean,required:!1}},emits:{change:e=>typeof e=="boolean"},setup(e,{emit:t}){const n=e,r=t;function o(a){if(!n.editable){a.preventDefault(),a.stopPropagation();return}r("change",a.target.checked)}return(a,s)=>(k(),L("div",{class:ut(["CoreDataframeCellBoolean",{"CoreDataframeCellBoolean--disabled":!e.editable}])},[F("input",{type:"checkbox",checked:e.value,readonly:!e.editable,tabindex:e.editable?0:-1,onChange:o},null,40,oI)],2))}}),sI=Ie(aI,[["__scopeId","data-v-2d30bc74"]]);function _y(e,t){return typeof t=="bigint"?t.toString()+"n":t}const iI={class:"CoreDataframeCellUnknown"},lI=we({__name:"CoreDataframeCellUnknown",props:{value:{validator:()=>!0,required:!0},wrapText:{type:Boolean,required:!1}},setup(e){const t=e,n=H(()=>JSON.stringify(t.value,_y));return(r,o)=>(k(),L("div",iI,[F("p",{class:ut({"CoreDataframeCellUnknown__content--noWrap":!e.wrapText})},Ee(n.value),3)]))}}),cI=Ie(lI,[["__scopeId","data-v-06d2511b"]]),uI=we({__name:"CoreDataframeCell",props:{value:{validator:()=>!0,required:!0},useMarkdown:{type:Boolean,required:!1},editable:{type:Boolean,required:!1},wrapText:{type:Boolean,required:!1}},emits:{change:e=>e!==void 0},setup(e){const t=e,n=H(()=>{switch(typeof t.value){case"number":case"bigint":return YS;case"boolean":return sI;case"string":return rI;default:return cI}});return(r,o)=>(k(),Oe(cs(n.value),{value:e.value,"use-markdown":e.useMarkdown,editable:e.editable,"wrap-text":e.wrapText,onChange:o[0]||(o[0]=a=>r.$emit("change",a))},null,40,["value","use-markdown","editable","wrap-text"]))}}),ur="__internal_arquero_id",dI="data:application/vnd.apache.arrow.file;base64,QVJST1cxAAD/////iAMAABAAAAAAAAoADgAGAAUACAAKAAAAAAEEABAAAAAAAAoADAAAAAQACAAKAAAAlAIAAAQAAAABAAAADAAAAAgADAAEAAgACAAAAGwCAAAEAAAAXwIAAHsiaW5kZXhfY29sdW1ucyI6IFsiX19pbmRleF9sZXZlbF8wX18iXSwgImNvbHVtbl9pbmRleGVzIjogW3sibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogbnVsbCwgInBhbmRhc190eXBlIjogInVuaWNvZGUiLCAibnVtcHlfdHlwZSI6ICJvYmplY3QiLCAibWV0YWRhdGEiOiB7ImVuY29kaW5nIjogIlVURi04In19XSwgImNvbHVtbnMiOiBbeyJuYW1lIjogImNvbF9hIiwgImZpZWxkX25hbWUiOiAiY29sX2EiLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9LCB7Im5hbWUiOiAiY29sX2IiLCAiZmllbGRfbmFtZSI6ICJjb2xfYiIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogIl9faW5kZXhfbGV2ZWxfMF9fIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfV0sICJjcmVhdG9yIjogeyJsaWJyYXJ5IjogInB5YXJyb3ciLCAidmVyc2lvbiI6ICIxMi4wLjAifSwgInBhbmRhc192ZXJzaW9uIjogIjEuNS4zIn0ABgAAAHBhbmRhcwAAAwAAAIgAAABEAAAABAAAAJT///8AAAECEAAAACQAAAAEAAAAAAAAABEAAABfX2luZGV4X2xldmVsXzBfXwAAAJD///8AAAABQAAAAND///8AAAECEAAAABgAAAAEAAAAAAAAAAUAAABjb2xfYgAAAMD///8AAAABQAAAABAAFAAIAAYABwAMAAAAEAAQAAAAAAABAhAAAAAgAAAABAAAAAAAAAAFAAAAY29sX2EAAAAIAAwACAAHAAgAAAAAAAABQAAAAAAAAAD/////6AAAABQAAAAAAAAADAAWAAYABQAIAAwADAAAAAADBAAYAAAAMAAAAAAAAAAAAAoAGAAMAAQACAAKAAAAfAAAABAAAAACAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAAAAAAAwAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAD/////AAAAABAAAAAMABQABgAIAAwAEAAMAAAAAAAEADwAAAAoAAAABAAAAAEAAACYAwAAAAAAAPAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAACgAMAAAABAAIAAoAAACUAgAABAAAAAEAAAAMAAAACAAMAAQACAAIAAAAbAIAAAQAAABfAgAAeyJpbmRleF9jb2x1bW5zIjogWyJfX2luZGV4X2xldmVsXzBfXyJdLCAiY29sdW1uX2luZGV4ZXMiOiBbeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiBudWxsLCAicGFuZGFzX3R5cGUiOiAidW5pY29kZSIsICJudW1weV90eXBlIjogIm9iamVjdCIsICJtZXRhZGF0YSI6IHsiZW5jb2RpbmciOiAiVVRGLTgifX1dLCAiY29sdW1ucyI6IFt7Im5hbWUiOiAiY29sX2EiLCAiZmllbGRfbmFtZSI6ICJjb2xfYSIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6ICJjb2xfYiIsICJmaWVsZF9uYW1lIjogImNvbF9iIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfSwgeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiAiX19pbmRleF9sZXZlbF8wX18iLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9XSwgImNyZWF0b3IiOiB7ImxpYnJhcnkiOiAicHlhcnJvdyIsICJ2ZXJzaW9uIjogIjEyLjAuMCJ9LCAicGFuZGFzX3ZlcnNpb24iOiAiMS41LjMifQAGAAAAcGFuZGFzAAADAAAAiAAAAEQAAAAEAAAAlP///wAAAQIQAAAAJAAAAAQAAAAAAAAAEQAAAF9faW5kZXhfbGV2ZWxfMF9fAAAAkP///wAAAAFAAAAA0P///wAAAQIQAAAAGAAAAAQAAAAAAAAABQAAAGNvbF9iAAAAwP///wAAAAFAAAAAEAAUAAgABgAHAAwAAAAQABAAAAAAAAECEAAAACAAAAAEAAAAAAAAAAUAAABjb2xfYQAAAAgADAAIAAcACAAAAAAAAAFAAAAAsAMAAEFSUk9XMQ==",by=/^__index_level_[0-9]+__$/;function wy(e){const t=Ae(!1),n=new AbortController;function r(){t.value=!0}function o(a){const s=a.currentTarget;document.hasFocus()?s.contains(a.relatedTarget)||(t.value=!1):window.addEventListener("focus",function i(){window.removeEventListener("focus",i),s.isConnected&&!s.contains(document.activeElement)&&(t.value=!1)},{signal:n.signal})}return Ue(e,(a,s)=>{s&&(s.removeEventListener("focusin",r),s.removeEventListener("focusout",o)),e&&(e.value.addEventListener("focusin",r,{signal:n.signal}),e.value.addEventListener("focusout",o,{signal:n.signal}))}),_o(()=>{n.abort()}),In(t)}const fI=["top","right","bottom","left"],Xh=["start","end"],Qh=fI.reduce((e,t)=>e.concat(t,t+"-"+Xh[0],t+"-"+Xh[1]),[]),ns=Math.min,nr=Math.max,Nl=Math.round,Ji=Math.floor,zr=e=>({x:e,y:e}),pI={left:"right",right:"left",bottom:"top",top:"bottom"},hI={start:"end",end:"start"};function Zh(e,t,n){return nr(e,ns(t,n))}function us(e,t){return typeof e=="function"?e(t):e}function Gr(e){return e.split("-")[0]}function Kr(e){return e.split("-")[1]}function Ay(e){return e==="x"?"y":"x"}function Cy(e){return e==="y"?"height":"width"}function va(e){return["top","bottom"].includes(Gr(e))?"y":"x"}function $y(e){return Ay(va(e))}function Sy(e,t,n){n===void 0&&(n=!1);const r=Kr(e),o=$y(e),a=Cy(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Ll(s)),[s,Ll(s)]}function mI(e){const t=Ll(e);return[Rl(e),t,Rl(t)]}function Rl(e){return e.replace(/start|end/g,t=>hI[t])}function vI(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:s;default:return[]}}function gI(e,t,n,r){const o=Kr(e);let a=vI(Gr(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Rl)))),a}function Ll(e){return e.replace(/left|right|bottom|top/g,t=>pI[t])}function yI(e){return{top:0,right:0,bottom:0,left:0,...e}}function _I(e){return typeof e!="number"?yI(e):{top:e,right:e,bottom:e,left:e}}function Dl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function em(e,t,n){let{reference:r,floating:o}=e;const a=va(t),s=$y(t),i=Cy(s),l=Gr(t),u=a==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[i]/2-o[i]/2;let m;switch(l){case"top":m={x:c,y:r.y-o.height};break;case"bottom":m={x:c,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(Kr(t)){case"start":m[s]-=h*(n&&u?-1:1);break;case"end":m[s]+=h*(n&&u?-1:1);break}return m}const bI=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=em(u,r,l),h=r,m={},_=0;for(let v=0;v<i.length;v++){const{name:w,fn:A}=i[v],{x:C,y,data:p,reset:b}=await A({x:c,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});c=C??c,d=y??d,m={...m,[w]:{...m[w],...p}},b&&_<=50&&(_++,typeof b=="object"&&(b.placement&&(h=b.placement),b.rects&&(u=b.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:c,y:d}=em(u,h,l)),v=-1)}return{x:c,y:d,placement:h,strategy:o,middlewareData:m}};async function uc(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=us(t,e),_=_I(m),w=i[h?d==="floating"?"reference":"floating":d],A=Dl(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(w)))==null||n?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:c,strategy:l})),C=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),p=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},b=Dl(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:C,offsetParent:y,strategy:l}):C);return{top:(A.top-b.top+_.top)/p.y,bottom:(b.bottom-A.bottom+_.bottom)/p.y,left:(A.left-b.left+_.left)/p.x,right:(b.right-A.right+_.right)/p.x}}function wI(e,t,n){return(e?[...n.filter(o=>Kr(o)===e),...n.filter(o=>Kr(o)!==e)]:n.filter(o=>Gr(o)===o)).filter(o=>e?Kr(o)===e||(t?Rl(o)!==o:!1):!0)}const AI=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:a,middlewareData:s,placement:i,platform:l,elements:u}=t,{crossAxis:c=!1,alignment:d,allowedPlacements:h=Qh,autoAlignment:m=!0,..._}=us(e,t),v=d!==void 0||h===Qh?wI(d||null,m,h):h,w=await uc(t,_),A=((n=s.autoPlacement)==null?void 0:n.index)||0,C=v[A];if(C==null)return{};const y=Sy(C,a,await(l.isRTL==null?void 0:l.isRTL(u.floating)));if(i!==C)return{reset:{placement:v[0]}};const p=[w[Gr(C)],w[y[0]],w[y[1]]],b=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:C,overflows:p}],I=v[A+1];if(I)return{data:{index:A+1,overflows:b},reset:{placement:I}};const D=b.map(Z=>{const be=Kr(Z.placement);return[Z.placement,be&&c?Z.overflows.slice(0,2).reduce((ce,ge)=>ce+ge,0):Z.overflows[0],Z.overflows]}).sort((Z,be)=>Z[1]-be[1]),G=((o=D.filter(Z=>Z[2].slice(0,Kr(Z[0])?2:3).every(be=>be<=0))[0])==null?void 0:o[0])||D[0][0];return G!==i?{data:{index:A+1,overflows:b},reset:{placement:G}}:{}}}},CI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:v=!0,...w}=us(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const A=Gr(o),C=va(i),y=Gr(i)===i,p=await(l.isRTL==null?void 0:l.isRTL(u.floating)),b=h||(y||!v?[Ll(i)]:mI(i)),I=_!=="none";!h&&I&&b.push(...gI(i,v,_,p));const D=[i,...b],K=await uc(t,w),G=[];let Z=((r=a.flip)==null?void 0:r.overflows)||[];if(c&&G.push(K[A]),d){const de=Sy(o,s,p);G.push(K[de[0]],K[de[1]])}if(Z=[...Z,{placement:o,overflows:G}],!G.every(de=>de<=0)){var be,ce;const de=(((be=a.flip)==null?void 0:be.index)||0)+1,He=D[de];if(He)return{data:{index:de,overflows:Z},reset:{placement:He}};let Ce=(ce=Z.filter(fe=>fe.overflows[0]<=0).sort((fe,he)=>fe.overflows[1]-he.overflows[1])[0])==null?void 0:ce.placement;if(!Ce)switch(m){case"bestFit":{var ge;const fe=(ge=Z.filter(he=>{if(I){const Ne=va(he.placement);return Ne===C||Ne==="y"}return!0}).map(he=>[he.placement,he.overflows.filter(Ne=>Ne>0).reduce((Ne,me)=>Ne+me,0)]).sort((he,Ne)=>he[1]-Ne[1])[0])==null?void 0:ge[0];fe&&(Ce=fe);break}case"initialPlacement":Ce=i;break}if(o!==Ce)return{reset:{placement:Ce}}}return{}}}};async function $I(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Gr(n),i=Kr(n),l=va(n)==="y",u=["left","top"].includes(s)?-1:1,c=a&&l?-1:1,d=us(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:_}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof _=="number"&&(m=i==="end"?_*-1:_),l?{x:m*c,y:h*u}:{x:h*u,y:m*c}}const SI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await $I(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},II=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:w=>{let{x:A,y:C}=w;return{x:A,y:C}}},...l}=us(e,t),u={x:n,y:r},c=await uc(t,l),d=va(Gr(o)),h=Ay(d);let m=u[h],_=u[d];if(a){const w=h==="y"?"top":"left",A=h==="y"?"bottom":"right",C=m+c[w],y=m-c[A];m=Zh(C,m,y)}if(s){const w=d==="y"?"top":"left",A=d==="y"?"bottom":"right",C=_+c[w],y=_-c[A];_=Zh(C,_,y)}const v=i.fn({...t,[h]:m,[d]:_});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:a,[d]:s}}}}}},EI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=us(e,t),c=await uc(t,u),d=Gr(o),h=Kr(o),m=va(o)==="y",{width:_,height:v}=a.floating;let w,A;d==="top"||d==="bottom"?(w=d,A=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(A=d,w=h==="end"?"top":"bottom");const C=v-c.top-c.bottom,y=_-c.left-c.right,p=ns(v-c[w],C),b=ns(_-c[A],y),I=!t.middlewareData.shift;let D=p,K=b;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(K=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(D=C),I&&!h){const Z=nr(c.left,0),be=nr(c.right,0),ce=nr(c.top,0),ge=nr(c.bottom,0);m?K=_-2*(Z!==0||be!==0?Z+be:nr(c.left,c.right)):D=v-2*(ce!==0||ge!==0?ce+ge:nr(c.top,c.bottom))}await l({...t,availableWidth:K,availableHeight:D});const G=await s.getDimensions(i.floating);return _!==G.width||v!==G.height?{reset:{rects:!0}}:{}}}};function dc(){return typeof window<"u"}function Aa(e){return Fd(e)?(e.nodeName||"").toLowerCase():"#document"}function or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xr(e){var t;return(t=(Fd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fd(e){return dc()?e instanceof Node||e instanceof or(e).Node:!1}function Mr(e){return dc()?e instanceof Element||e instanceof or(e).Element:!1}function Jr(e){return dc()?e instanceof HTMLElement||e instanceof or(e).HTMLElement:!1}function tm(e){return!dc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof or(e).ShadowRoot}function gi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Or(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function TI(e){return["table","td","th"].includes(Aa(e))}function fc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function jd(e){const t=Vd(),n=Mr(e)?Or(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function kI(e){let t=Ko(e);for(;Jr(t)&&!rs(t);){if(jd(t))return t;if(fc(t))return null;t=Ko(t)}return null}function Vd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function rs(e){return["html","body","#document"].includes(Aa(e))}function Or(e){return or(e).getComputedStyle(e)}function pc(e){return Mr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ko(e){if(Aa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||tm(e)&&e.host||Xr(e);return tm(t)?t.host:t}function Iy(e){const t=Ko(e);return rs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jr(t)&&gi(t)?t:Iy(t)}function li(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Iy(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=or(o);if(a){const i=Yu(s);return t.concat(s,s.visualViewport||[],gi(o)?o:[],i&&n?li(i):[])}return t.concat(o,li(o,[],n))}function Yu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ey(e){const t=Or(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Jr(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=Nl(n)!==a||Nl(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Ud(e){return Mr(e)?e:e.contextElement}function Ga(e){const t=Ud(e);if(!Jr(t))return zr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Ey(t);let s=(a?Nl(n.width):n.width)/r,i=(a?Nl(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const xI=zr(0);function Ty(e){const t=or(e);return!Vd()||!t.visualViewport?xI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function PI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==or(e)?!1:t}function ga(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ud(e);let s=zr(1);t&&(r?Mr(r)&&(s=Ga(r)):s=Ga(e));const i=PI(a,n,r)?Ty(a):zr(0);let l=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(a){const h=or(a),m=r&&Mr(r)?or(r):r;let _=h,v=Yu(_);for(;v&&r&&m!==_;){const w=Ga(v),A=v.getBoundingClientRect(),C=Or(v),y=A.left+(v.clientLeft+parseFloat(C.paddingLeft))*w.x,p=A.top+(v.clientTop+parseFloat(C.paddingTop))*w.y;l*=w.x,u*=w.y,c*=w.x,d*=w.y,l+=y,u+=p,_=or(v),v=Yu(_)}}return Dl({width:c,height:d,x:l,y:u})}function Hd(e,t){const n=pc(e).scrollLeft;return t?t.left+n:ga(Xr(e)).left+n}function ky(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Hd(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function MI(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=Xr(r),i=t?fc(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},u=zr(1);const c=zr(0),d=Jr(r);if((d||!d&&!a)&&((Aa(r)!=="body"||gi(s))&&(l=pc(r)),Jr(r))){const m=ga(r);u=Ga(r),c.x=m.x+r.clientLeft,c.y=m.y+r.clientTop}const h=s&&!d&&!a?ky(s,l,!0):zr(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}}function OI(e){return Array.from(e.getClientRects())}function NI(e){const t=Xr(e),n=pc(e),r=e.ownerDocument.body,o=nr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=nr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Hd(e);const i=-n.scrollTop;return Or(r).direction==="rtl"&&(s+=nr(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function RI(e,t){const n=or(e),r=Xr(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const u=Vd();(!u||u&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}function LI(e,t){const n=ga(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Jr(e)?Ga(e):zr(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,u=r*a.y;return{width:s,height:i,x:l,y:u}}function nm(e,t,n){let r;if(t==="viewport")r=RI(e,n);else if(t==="document")r=NI(Xr(e));else if(Mr(t))r=LI(t,n);else{const o=Ty(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Dl(r)}function xy(e,t){const n=Ko(e);return n===t||!Mr(n)||rs(n)?!1:Or(n).position==="fixed"||xy(n,t)}function DI(e,t){const n=t.get(e);if(n)return n;let r=li(e,[],!1).filter(i=>Mr(i)&&Aa(i)!=="body"),o=null;const a=Or(e).position==="fixed";let s=a?Ko(e):e;for(;Mr(s)&&!rs(s);){const i=Or(s),l=jd(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||gi(s)&&!l&&xy(e,s))?r=r.filter(c=>c!==s):o=i,s=Ko(s)}return t.set(e,r),r}function BI(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?fc(t)?[]:DI(t,this._c):[].concat(n),r],i=s[0],l=s.reduce((u,c)=>{const d=nm(t,c,o);return u.top=nr(d.top,u.top),u.right=ns(d.right,u.right),u.bottom=ns(d.bottom,u.bottom),u.left=nr(d.left,u.left),u},nm(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function FI(e){const{width:t,height:n}=Ey(e);return{width:t,height:n}}function jI(e,t,n){const r=Jr(t),o=Xr(t),a=n==="fixed",s=ga(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=zr(0);if(r||!r&&!a)if((Aa(t)!=="body"||gi(o))&&(i=pc(t)),r){const h=ga(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=Hd(o));const u=o&&!r&&!a?ky(o,i):zr(0),c=s.left+i.scrollLeft-l.x-u.x,d=s.top+i.scrollTop-l.y-u.y;return{x:c,y:d,width:s.width,height:s.height}}function vu(e){return Or(e).position==="static"}function rm(e,t){if(!Jr(e)||Or(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Xr(e)===n&&(n=n.ownerDocument.body),n}function Py(e,t){const n=or(e);if(fc(e))return n;if(!Jr(e)){let o=Ko(e);for(;o&&!rs(o);){if(Mr(o)&&!vu(o))return o;o=Ko(o)}return n}let r=rm(e,t);for(;r&&TI(r)&&vu(r);)r=rm(r,t);return r&&rs(r)&&vu(r)&&!jd(r)?n:r||kI(e)||n}const VI=async function(e){const t=this.getOffsetParent||Py,n=this.getDimensions,r=await n(e.floating);return{reference:jI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function UI(e){return Or(e).direction==="rtl"}const HI={convertOffsetParentRelativeRectToViewportRelativeRect:MI,getDocumentElement:Xr,getClippingRect:BI,getOffsetParent:Py,getElementRects:VI,getClientRects:OI,getDimensions:FI,getScale:Ga,isElement:Mr,isRTL:UI};function zI(e,t){let n=null,r;const o=Xr(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const{left:u,top:c,width:d,height:h}=e.getBoundingClientRect();if(i||t(),!d||!h)return;const m=Ji(c),_=Ji(o.clientWidth-(u+d)),v=Ji(o.clientHeight-(c+h)),w=Ji(u),C={rootMargin:-m+"px "+-_+"px "+-v+"px "+-w+"px",threshold:nr(0,ns(1,l))||1};let y=!0;function p(b){const I=b[0].intersectionRatio;if(I!==l){if(!y)return s();I?s(!1,I):r=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(p,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(p,C)}n.observe(e)}return s(!0),a}function tF(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ud(e),c=o||a?[...u?li(u):[],...li(t)]:[];c.forEach(A=>{o&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const d=u&&i?zI(u,n):null;let h=-1,m=null;s&&(m=new ResizeObserver(A=>{let[C]=A;C&&C.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let _,v=l?ga(e):null;l&&w();function w(){const A=ga(e);v&&(A.x!==v.x||A.y!==v.y||A.width!==v.width||A.height!==v.height)&&n(),v=A,_=requestAnimationFrame(w)}return n(),()=>{var A;c.forEach(C=>{o&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),d==null||d(),(A=m)==null||A.disconnect(),m=null,l&&cancelAnimationFrame(_)}}const KI=SI,WI=AI,qI=II,nF=CI,rF=EI,GI=(e,t,n)=>{const r=new Map,o={platform:HI,...n},a={...o.platform,_c:r};return bI(e,t,{...o,platform:a})};function JI(e){return e!=null&&typeof e=="object"&&"$el"in e}function om(e){if(JI(e)){const t=e.$el;return Fd(t)&&Aa(t)==="#comment"?null:t}return e}function ks(e){return typeof e=="function"?e():O(e)}function My(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function am(e,t){const n=My(e);return Math.round(t*n)/n}function YI(e,t,n){n===void 0&&(n={});const r=n.whileElementsMounted,o=H(()=>{var D;return(D=ks(n.open))!=null?D:!0}),a=H(()=>ks(n.middleware)),s=H(()=>{var D;return(D=ks(n.placement))!=null?D:"bottom"}),i=H(()=>{var D;return(D=ks(n.strategy))!=null?D:"absolute"}),l=H(()=>{var D;return(D=ks(n.transform))!=null?D:!0}),u=H(()=>om(e.value)),c=H(()=>om(t.value)),d=Ae(0),h=Ae(0),m=Ae(i.value),_=Ae(s.value),v=En({}),w=Ae(!1),A=H(()=>{const D={position:m.value,left:"0",top:"0"};if(!c.value)return D;const K=am(c.value,d.value),G=am(c.value,h.value);return l.value?{...D,transform:"translate("+K+"px, "+G+"px)",...My(c.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:K+"px",top:G+"px"}});let C;function y(){if(u.value==null||c.value==null)return;const D=o.value;GI(u.value,c.value,{middleware:a.value,placement:s.value,strategy:i.value}).then(K=>{d.value=K.x,h.value=K.y,m.value=K.strategy,_.value=K.placement,v.value=K.middlewareData,w.value=D!==!1})}function p(){typeof C=="function"&&(C(),C=void 0)}function b(){if(p(),r===void 0){y();return}if(u.value!=null&&c.value!=null){C=r(u.value,c.value,y);return}}function I(){o.value||(w.value=!1)}return Ue([a,s,i,o],y,{flush:"sync"}),Ue([u,c],b,{flush:"sync"}),Ue(o,I,{flush:"sync"}),vd()&&gv(p),{x:oa(d),y:oa(h),strategy:oa(m),placement:oa(_),middlewareData:oa(v),isPositioned:oa(w),floatingStyles:A,update:y}}const XI={key:0,class:"CoreDataframeRow__cell CoreDataframeRow__cell--index"},QI=we({__name:"CoreDataframeRow",props:{showIndex:{type:Boolean,required:!1},wrapText:{type:Boolean,required:!1},indexText:{type:[Number,String],required:!0},columns:{type:Array,required:!0},row:{type:Object,required:!0},useMarkdown:{type:Boolean,required:!1},editable:{type:Boolean,required:!1},actions:{type:Object,required:!0},displayShadowOnSticky:{type:Boolean}},emits:{change:(e,t,n)=>typeof e=="string"&&typeof t=="number"&&n!==void 0,action:(e,t)=>typeof t=="number"&&typeof e=="string"},setup(e){const t=pa(()=>en(()=>import("./SharedMoreDropdown-DKv_HNef.js"),__vite__mapDeps([0,1]),import.meta.url)),n=[KI(16),qI()],r=e,o=Ae(),a=wy(o),s=Ae(!1),i=H(()=>Object.keys(r.actions||{}).length>0),l=H(()=>Object.entries(r.actions||{}).map(([u,c])=>({value:u,label:c})));return(u,c)=>(k(),L("div",{ref_key:"root",ref:o,class:"CoreDataframeRow",tabindex:"0",onMouseover:c[1]||(c[1]=d=>s.value=!0),onMouseleave:c[2]||(c[2]=d=>s.value=!1),onFocusin:c[3]||(c[3]=d=>s.value=!0)},[c[4]||(c[4]=F("div",{class:"CoreDataframeRow__spacer"},null,-1)),e.showIndex?(k(),L("div",XI,Ee(e.indexText),1)):ve("",!0),(k(!0),L(We,null,Pt(e.columns,d=>(k(),L("div",{key:`${e.row[O(ur)]}_${d}`,class:"CoreDataframeRow__cell"},[Le(uI,{value:e.row[d],"use-markdown":e.useMarkdown,editable:e.editable&&(s.value||O(a)),"wrap-text":e.wrapText,class:"CoreDataframeRow__cell__content",onChange:h=>u.$emit("change",d,e.row[O(ur)],h)},null,8,["value","use-markdown","editable","wrap-text","onChange"])]))),128)),i.value?(k(),L("div",{key:1,class:ut(["CoreDataframeRow__options",{"CoreDataframeRow__options--shadow":e.displayShadowOnSticky}])},[Le(O(t),{options:l.value,"hide-icons":"","dropdown-placement":"left","floating-middleware":n,onSelect:c[0]||(c[0]=d=>u.$emit("action",d,e.row[O(ur)]))},null,8,["options"])],2)):ve("",!0)],544))}}),ZI=Ie(QI,[["__scopeId","data-v-8f242726"]]);var eE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function oF(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Xu={exports:{}},Ny={},Tr={},os={},yi={},bt={},ci={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(C){if(super(),!e.IDENTIFIER.test(C))throw new Error("CodeGen: name must be a valid identifier");this.str=C}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(C){super(),this._items=typeof C=="string"?[C]:C}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const C=this._items[0];return C===""||C==='""'}get str(){var C;return(C=this._str)!==null&&C!==void 0?C:this._str=this._items.reduce((y,p)=>`${y}${p}`,"")}get names(){var C;return(C=this._names)!==null&&C!==void 0?C:this._names=this._items.reduce((y,p)=>(p instanceof n&&(y[p.str]=(y[p.str]||0)+1),y),{})}}e._Code=r,e.nil=new r("");function o(A,...C){const y=[A[0]];let p=0;for(;p<C.length;)i(y,C[p]),y.push(A[++p]);return new r(y)}e._=o;const a=new r("+");function s(A,...C){const y=[m(A[0])];let p=0;for(;p<C.length;)y.push(a),i(y,C[p]),y.push(a,m(A[++p]));return l(y),new r(y)}e.str=s;function i(A,C){C instanceof r?A.push(...C._items):C instanceof n?A.push(C):A.push(d(C))}e.addCodeArg=i;function l(A){let C=1;for(;C<A.length-1;){if(A[C]===a){const y=u(A[C-1],A[C+1]);if(y!==void 0){A.splice(C-1,3,y);continue}A[C++]="+"}C++}}function u(A,C){if(C==='""')return A;if(A==='""')return C;if(typeof A=="string")return C instanceof n||A[A.length-1]!=='"'?void 0:typeof C!="string"?`${A.slice(0,-1)}${C}"`:C[0]==='"'?A.slice(0,-1)+C.slice(1):void 0;if(typeof C=="string"&&C[0]==='"'&&!(A instanceof n))return`"${A}${C.slice(1)}`}function c(A,C){return C.emptyStr()?A:A.emptyStr()?C:s`${A}${C}`}e.strConcat=c;function d(A){return typeof A=="number"||typeof A=="boolean"||A===null?A:m(Array.isArray(A)?A.join(","):A)}function h(A){return new r(m(A))}e.stringify=h;function m(A){return JSON.stringify(A).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=m;function _(A){return typeof A=="string"&&e.IDENTIFIER.test(A)?new r(`.${A}`):o`[${A}]`}e.getProperty=_;function v(A){if(typeof A=="string"&&e.IDENTIFIER.test(A))return new r(`${A}`);throw new Error(`CodeGen: invalid export name: ${A}, use explicit $id name mapping`)}e.getEsmExportName=v;function w(A){return new r(A.toString())}e.regexpCode=w})(ci);var Qu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=ci;class n extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var r;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:u,parent:c}={}){this._names={},this._prefixes=u,this._parent=c}toName(u){return u instanceof t.Name?u:this.name(u)}name(u){return new t.Name(this._newName(u))}_newName(u){const c=this._names[u]||this._nameGroup(u);return`${u}${c.index++}`}_nameGroup(u){var c,d;if(!((d=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||d===void 0)&&d.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}e.Scope=o;class a extends t.Name{constructor(u,c){super(c),this.prefix=u}setValue(u,{property:c,itemIndex:d}){this.value=u,this.scopePath=(0,t._)`.${new t.Name(c)}[${d}]`}}e.ValueScopeName=a;const s=(0,t._)`\n`;class i extends o{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?s:t.nil}}get(){return this._scope}name(u){return new a(u,this._newName(u))}value(u,c){var d;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const h=this.toName(u),{prefix:m}=h,_=(d=c.key)!==null&&d!==void 0?d:c.ref;let v=this._values[m];if(v){const C=v.get(_);if(C)return C}else v=this._values[m]=new Map;v.set(_,h);const w=this._scope[m]||(this._scope[m]=[]),A=w.length;return w[A]=c.ref,h.setValue(c,{property:m,itemIndex:A}),h}getValue(u,c){const d=this._values[u];if(d)return d.get(c)}scopeRefs(u,c=this._values){return this._reduceValues(c,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${u}${d.scopePath}`})}scopeCode(u=this._values,c,d){return this._reduceValues(u,h=>{if(h.value===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return h.value.code},c,d)}_reduceValues(u,c,d={},h){let m=t.nil;for(const _ in u){const v=u[_];if(!v)continue;const w=d[_]=d[_]||new Map;v.forEach(A=>{if(w.has(A))return;w.set(A,r.Started);let C=c(A);if(C){const y=this.opts.es5?e.varKinds.var:e.varKinds.const;m=(0,t._)`${m}${y} ${A} = ${C};${this.opts._n}`}else if(C=h==null?void 0:h(A))m=(0,t._)`${m}${C}${this.opts._n}`;else throw new n(A);w.set(A,r.Completed)})}return m}}e.ValueScope=i})(Qu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=ci,n=Qu;var r=ci;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var o=Qu;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class a{optimizeNodes(){return this}optimizeNames(T,R){return this}}class s extends a{constructor(T,R,se){super(),this.varKind=T,this.name=R,this.rhs=se}render({es5:T,_n:R}){const se=T?n.varKinds.var:this.varKind,Re=this.rhs===void 0?"":` = ${this.rhs}`;return`${se} ${this.name}${Re};`+R}optimizeNames(T,R){if(T[this.name.str])return this.rhs&&(this.rhs=de(this.rhs,T,R)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends a{constructor(T,R,se){super(),this.lhs=T,this.rhs=R,this.sideEffects=se}render({_n:T}){return`${this.lhs} = ${this.rhs};`+T}optimizeNames(T,R){if(!(this.lhs instanceof t.Name&&!T[this.lhs.str]&&!this.sideEffects))return this.rhs=de(this.rhs,T,R),this}get names(){const T=this.lhs instanceof t.Name?{}:{...this.lhs.names};return ge(T,this.rhs)}}class l extends i{constructor(T,R,se,Re){super(T,se,Re),this.op=R}render({_n:T}){return`${this.lhs} ${this.op}= ${this.rhs};`+T}}class u extends a{constructor(T){super(),this.label=T,this.names={}}render({_n:T}){return`${this.label}:`+T}}class c extends a{constructor(T){super(),this.label=T,this.names={}}render({_n:T}){return`break${this.label?` ${this.label}`:""};`+T}}class d extends a{constructor(T){super(),this.error=T}render({_n:T}){return`throw ${this.error};`+T}get names(){return this.error.names}}class h extends a{constructor(T){super(),this.code=T}render({_n:T}){return`${this.code};`+T}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(T,R){return this.code=de(this.code,T,R),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class m extends a{constructor(T=[]){super(),this.nodes=T}render(T){return this.nodes.reduce((R,se)=>R+se.render(T),"")}optimizeNodes(){const{nodes:T}=this;let R=T.length;for(;R--;){const se=T[R].optimizeNodes();Array.isArray(se)?T.splice(R,1,...se):se?T[R]=se:T.splice(R,1)}return T.length>0?this:void 0}optimizeNames(T,R){const{nodes:se}=this;let Re=se.length;for(;Re--;){const De=se[Re];De.optimizeNames(T,R)||(He(T,De.names),se.splice(Re,1))}return se.length>0?this:void 0}get names(){return this.nodes.reduce((T,R)=>ce(T,R.names),{})}}class _ extends m{render(T){return"{"+T._n+super.render(T)+"}"+T._n}}class v extends m{}class w extends _{}w.kind="else";class A extends _{constructor(T,R){super(R),this.condition=T}render(T){let R=`if(${this.condition})`+super.render(T);return this.else&&(R+="else "+this.else.render(T)),R}optimizeNodes(){super.optimizeNodes();const T=this.condition;if(T===!0)return this.nodes;let R=this.else;if(R){const se=R.optimizeNodes();R=this.else=Array.isArray(se)?new w(se):se}if(R)return T===!1?R instanceof A?R:R.nodes:this.nodes.length?this:new A(Ce(T),R instanceof A?[R]:R.nodes);if(!(T===!1||!this.nodes.length))return this}optimizeNames(T,R){var se;if(this.else=(se=this.else)===null||se===void 0?void 0:se.optimizeNames(T,R),!!(super.optimizeNames(T,R)||this.else))return this.condition=de(this.condition,T,R),this}get names(){const T=super.names;return ge(T,this.condition),this.else&&ce(T,this.else.names),T}}A.kind="if";class C extends _{}C.kind="for";class y extends C{constructor(T){super(),this.iteration=T}render(T){return`for(${this.iteration})`+super.render(T)}optimizeNames(T,R){if(super.optimizeNames(T,R))return this.iteration=de(this.iteration,T,R),this}get names(){return ce(super.names,this.iteration.names)}}class p extends C{constructor(T,R,se,Re){super(),this.varKind=T,this.name=R,this.from=se,this.to=Re}render(T){const R=T.es5?n.varKinds.var:this.varKind,{name:se,from:Re,to:De}=this;return`for(${R} ${se}=${Re}; ${se}<${De}; ${se}++)`+super.render(T)}get names(){const T=ge(super.names,this.from);return ge(T,this.to)}}class b extends C{constructor(T,R,se,Re){super(),this.loop=T,this.varKind=R,this.name=se,this.iterable=Re}render(T){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(T)}optimizeNames(T,R){if(super.optimizeNames(T,R))return this.iterable=de(this.iterable,T,R),this}get names(){return ce(super.names,this.iterable.names)}}class I extends _{constructor(T,R,se){super(),this.name=T,this.args=R,this.async=se}render(T){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(T)}}I.kind="func";class D extends m{render(T){return"return "+super.render(T)}}D.kind="return";class K extends _{render(T){let R="try"+super.render(T);return this.catch&&(R+=this.catch.render(T)),this.finally&&(R+=this.finally.render(T)),R}optimizeNodes(){var T,R;return super.optimizeNodes(),(T=this.catch)===null||T===void 0||T.optimizeNodes(),(R=this.finally)===null||R===void 0||R.optimizeNodes(),this}optimizeNames(T,R){var se,Re;return super.optimizeNames(T,R),(se=this.catch)===null||se===void 0||se.optimizeNames(T,R),(Re=this.finally)===null||Re===void 0||Re.optimizeNames(T,R),this}get names(){const T=super.names;return this.catch&&ce(T,this.catch.names),this.finally&&ce(T,this.finally.names),T}}class G extends _{constructor(T){super(),this.error=T}render(T){return`catch(${this.error})`+super.render(T)}}G.kind="catch";class Z extends _{render(T){return"finally"+super.render(T)}}Z.kind="finally";class be{constructor(T,R={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...R,_n:R.lines?`
|
|
30
|
-
`:""},this._extScope=T,this._scope=new n.Scope({parent:T}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(T){return this._scope.name(T)}scopeName(T){return this._extScope.name(T)}scopeValue(T,R){const se=this._extScope.value(T,R);return(this._values[se.prefix]||(this._values[se.prefix]=new Set)).add(se),se}getScopeValue(T,R){return this._extScope.getValue(T,R)}scopeRefs(T){return this._extScope.scopeRefs(T,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(T,R,se,Re){const De=this._scope.toName(R);return se!==void 0&&Re&&(this._constants[De.str]=se),this._leafNode(new s(T,De,se)),De}const(T,R,se){return this._def(n.varKinds.const,T,R,se)}let(T,R,se){return this._def(n.varKinds.let,T,R,se)}var(T,R,se){return this._def(n.varKinds.var,T,R,se)}assign(T,R,se){return this._leafNode(new i(T,R,se))}add(T,R){return this._leafNode(new l(T,e.operators.ADD,R))}code(T){return typeof T=="function"?T():T!==t.nil&&this._leafNode(new h(T)),this}object(...T){const R=["{"];for(const[se,Re]of T)R.length>1&&R.push(","),R.push(se),(se!==Re||this.opts.es5)&&(R.push(":"),(0,t.addCodeArg)(R,Re));return R.push("}"),new t._Code(R)}if(T,R,se){if(this._blockNode(new A(T)),R&&se)this.code(R).else().code(se).endIf();else if(R)this.code(R).endIf();else if(se)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(T){return this._elseNode(new A(T))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(A,w)}_for(T,R){return this._blockNode(T),R&&this.code(R).endFor(),this}for(T,R){return this._for(new y(T),R)}forRange(T,R,se,Re,De=this.opts.es5?n.varKinds.var:n.varKinds.let){const it=this._scope.toName(T);return this._for(new p(De,it,R,se),()=>Re(it))}forOf(T,R,se,Re=n.varKinds.const){const De=this._scope.toName(T);if(this.opts.es5){const it=R instanceof t.Name?R:this.var("_arr",R);return this.forRange("_i",0,(0,t._)`${it}.length`,et=>{this.var(De,(0,t._)`${it}[${et}]`),se(De)})}return this._for(new b("of",Re,De,R),()=>se(De))}forIn(T,R,se,Re=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(T,(0,t._)`Object.keys(${R})`,se);const De=this._scope.toName(T);return this._for(new b("in",Re,De,R),()=>se(De))}endFor(){return this._endBlockNode(C)}label(T){return this._leafNode(new u(T))}break(T){return this._leafNode(new c(T))}return(T){const R=new D;if(this._blockNode(R),this.code(T),R.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(D)}try(T,R,se){if(!R&&!se)throw new Error('CodeGen: "try" without "catch" and "finally"');const Re=new K;if(this._blockNode(Re),this.code(T),R){const De=this.name("e");this._currNode=Re.catch=new G(De),R(De)}return se&&(this._currNode=Re.finally=new Z,this.code(se)),this._endBlockNode(G,Z)}throw(T){return this._leafNode(new d(T))}block(T,R){return this._blockStarts.push(this._nodes.length),T&&this.code(T).endBlock(R),this}endBlock(T){const R=this._blockStarts.pop();if(R===void 0)throw new Error("CodeGen: not in self-balancing block");const se=this._nodes.length-R;if(se<0||T!==void 0&&se!==T)throw new Error(`CodeGen: wrong number of nodes: ${se} vs ${T} expected`);return this._nodes.length=R,this}func(T,R=t.nil,se,Re){return this._blockNode(new I(T,R,se)),Re&&this.code(Re).endFunc(),this}endFunc(){return this._endBlockNode(I)}optimize(T=1){for(;T-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(T){return this._currNode.nodes.push(T),this}_blockNode(T){this._currNode.nodes.push(T),this._nodes.push(T)}_endBlockNode(T,R){const se=this._currNode;if(se instanceof T||R&&se instanceof R)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${R?`${T.kind}/${R.kind}`:T.kind}"`)}_elseNode(T){const R=this._currNode;if(!(R instanceof A))throw new Error('CodeGen: "else" without "if"');return this._currNode=R.else=T,this}get _root(){return this._nodes[0]}get _currNode(){const T=this._nodes;return T[T.length-1]}set _currNode(T){const R=this._nodes;R[R.length-1]=T}}e.CodeGen=be;function ce(X,T){for(const R in T)X[R]=(X[R]||0)+(T[R]||0);return X}function ge(X,T){return T instanceof t._CodeOrName?ce(X,T.names):X}function de(X,T,R){if(X instanceof t.Name)return se(X);if(!Re(X))return X;return new t._Code(X._items.reduce((De,it)=>(it instanceof t.Name&&(it=se(it)),it instanceof t._Code?De.push(...it._items):De.push(it),De),[]));function se(De){const it=R[De.str];return it===void 0||T[De.str]!==1?De:(delete T[De.str],it)}function Re(De){return De instanceof t._Code&&De._items.some(it=>it instanceof t.Name&&T[it.str]===1&&R[it.str]!==void 0)}}function He(X,T){for(const R in T)X[R]=(X[R]||0)-(T[R]||0)}function Ce(X){return typeof X=="boolean"||typeof X=="number"||X===null?!X:(0,t._)`!${ue(X)}`}e.not=Ce;const fe=z(e.operators.AND);function he(...X){return X.reduce(fe)}e.and=he;const Ne=z(e.operators.OR);function me(...X){return X.reduce(Ne)}e.or=me;function z(X){return(T,R)=>T===t.nil?R:R===t.nil?T:(0,t._)`${ue(T)} ${X} ${ue(R)}`}function ue(X){return X instanceof t.Name?X:(0,t._)`(${X})`}})(bt);var Ve={};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.checkStrictMode=Ve.getErrorPath=Ve.Type=Ve.useFunc=Ve.setEvaluated=Ve.evaluatedPropsToName=Ve.mergeEvaluated=Ve.eachItem=Ve.unescapeJsonPointer=Ve.escapeJsonPointer=Ve.escapeFragment=Ve.unescapeFragment=Ve.schemaRefOrVal=Ve.schemaHasRulesButRef=Ve.schemaHasRules=Ve.checkUnknownRules=Ve.alwaysValidSchema=Ve.toHash=void 0;const Ut=bt,tE=ci;function nE(e){const t={};for(const n of e)t[n]=!0;return t}Ve.toHash=nE;function rE(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Ry(e,t),!Ly(t,e.self.RULES.all))}Ve.alwaysValidSchema=rE;function Ry(e,t=e.schema){const{opts:n,self:r}=e;if(!n.strictSchema||typeof t=="boolean")return;const o=r.RULES.keywords;for(const a in t)o[a]||Fy(e,`unknown keyword: "${a}"`)}Ve.checkUnknownRules=Ry;function Ly(e,t){if(typeof e=="boolean")return!e;for(const n in e)if(t[n])return!0;return!1}Ve.schemaHasRules=Ly;function oE(e,t){if(typeof e=="boolean")return!e;for(const n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}Ve.schemaHasRulesButRef=oE;function aE({topSchemaRef:e,schemaPath:t},n,r,o){if(!o){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,Ut._)`${n}`}return(0,Ut._)`${e}${t}${(0,Ut.getProperty)(r)}`}Ve.schemaRefOrVal=aE;function sE(e){return Dy(decodeURIComponent(e))}Ve.unescapeFragment=sE;function iE(e){return encodeURIComponent(zd(e))}Ve.escapeFragment=iE;function zd(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Ve.escapeJsonPointer=zd;function Dy(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Ve.unescapeJsonPointer=Dy;function lE(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)}Ve.eachItem=lE;function sm({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:r}){return(o,a,s,i)=>{const l=s===void 0?a:s instanceof Ut.Name?(a instanceof Ut.Name?e(o,a,s):t(o,a,s),s):a instanceof Ut.Name?(t(o,s,a),a):n(a,s);return i===Ut.Name&&!(l instanceof Ut.Name)?r(o,l):l}}Ve.mergeEvaluated={props:sm({mergeNames:(e,t,n)=>e.if((0,Ut._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,Ut._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,Ut._)`${n} || {}`).code((0,Ut._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,Ut._)`${n} !== true`,()=>{t===!0?e.assign(n,!0):(e.assign(n,(0,Ut._)`${n} || {}`),Kd(e,n,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:By}),items:sm({mergeNames:(e,t,n)=>e.if((0,Ut._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,Ut._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,Ut._)`${n} !== true`,()=>e.assign(n,t===!0?!0:(0,Ut._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function By(e,t){if(t===!0)return e.var("props",!0);const n=e.var("props",(0,Ut._)`{}`);return t!==void 0&&Kd(e,n,t),n}Ve.evaluatedPropsToName=By;function Kd(e,t,n){Object.keys(n).forEach(r=>e.assign((0,Ut._)`${t}${(0,Ut.getProperty)(r)}`,!0))}Ve.setEvaluated=Kd;const im={};function cE(e,t){return e.scopeValue("func",{ref:t,code:im[t.code]||(im[t.code]=new tE._Code(t.code))})}Ve.useFunc=cE;var Zu;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Zu||(Ve.Type=Zu={}));function uE(e,t,n){if(e instanceof Ut.Name){const r=t===Zu.Num;return n?r?(0,Ut._)`"[" + ${e} + "]"`:(0,Ut._)`"['" + ${e} + "']"`:r?(0,Ut._)`"/" + ${e}`:(0,Ut._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,Ut.getProperty)(e).toString():"/"+zd(e)}Ve.getErrorPath=uE;function Fy(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw new Error(t);e.self.logger.warn(t)}}Ve.checkStrictMode=Fy;var Qr={};Object.defineProperty(Qr,"__esModule",{value:!0});const Mn=bt,dE={data:new Mn.Name("data"),valCxt:new Mn.Name("valCxt"),instancePath:new Mn.Name("instancePath"),parentData:new Mn.Name("parentData"),parentDataProperty:new Mn.Name("parentDataProperty"),rootData:new Mn.Name("rootData"),dynamicAnchors:new Mn.Name("dynamicAnchors"),vErrors:new Mn.Name("vErrors"),errors:new Mn.Name("errors"),this:new Mn.Name("this"),self:new Mn.Name("self"),scope:new Mn.Name("scope"),json:new Mn.Name("json"),jsonPos:new Mn.Name("jsonPos"),jsonLen:new Mn.Name("jsonLen"),jsonPart:new Mn.Name("jsonPart")};Qr.default=dE;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=bt,n=Ve,r=Qr;e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:A})=>A?(0,t.str)`"${w}" keyword must be ${A} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function o(w,A=e.keywordError,C,y){const{it:p}=w,{gen:b,compositeRule:I,allErrors:D}=p,K=d(w,A,C);y??(I||D)?l(b,K):u(p,(0,t._)`[${K}]`)}e.reportError=o;function a(w,A=e.keywordError,C){const{it:y}=w,{gen:p,compositeRule:b,allErrors:I}=y,D=d(w,A,C);l(p,D),b||I||u(y,r.default.vErrors)}e.reportExtraError=a;function s(w,A){w.assign(r.default.errors,A),w.if((0,t._)`${r.default.vErrors} !== null`,()=>w.if(A,()=>w.assign((0,t._)`${r.default.vErrors}.length`,A),()=>w.assign(r.default.vErrors,null)))}e.resetErrorsCount=s;function i({gen:w,keyword:A,schemaValue:C,data:y,errsCount:p,it:b}){if(p===void 0)throw new Error("ajv implementation error");const I=w.name("err");w.forRange("i",p,r.default.errors,D=>{w.const(I,(0,t._)`${r.default.vErrors}[${D}]`),w.if((0,t._)`${I}.instancePath === undefined`,()=>w.assign((0,t._)`${I}.instancePath`,(0,t.strConcat)(r.default.instancePath,b.errorPath))),w.assign((0,t._)`${I}.schemaPath`,(0,t.str)`${b.errSchemaPath}/${A}`),b.opts.verbose&&(w.assign((0,t._)`${I}.schema`,C),w.assign((0,t._)`${I}.data`,y))})}e.extendErrors=i;function l(w,A){const C=w.const("err",A);w.if((0,t._)`${r.default.vErrors} === null`,()=>w.assign(r.default.vErrors,(0,t._)`[${C}]`),(0,t._)`${r.default.vErrors}.push(${C})`),w.code((0,t._)`${r.default.errors}++`)}function u(w,A){const{gen:C,validateName:y,schemaEnv:p}=w;p.$async?C.throw((0,t._)`new ${w.ValidationError}(${A})`):(C.assign((0,t._)`${y}.errors`,A),C.return(!1))}const c={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d(w,A,C){const{createErrors:y}=w.it;return y===!1?(0,t._)`{}`:h(w,A,C)}function h(w,A,C={}){const{gen:y,it:p}=w,b=[m(p,C),_(w,C)];return v(w,A,b),y.object(...b)}function m({errorPath:w},{instancePath:A}){const C=A?(0,t.str)`${w}${(0,n.getErrorPath)(A,n.Type.Str)}`:w;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,C)]}function _({keyword:w,it:{errSchemaPath:A}},{schemaPath:C,parentSchema:y}){let p=y?A:(0,t.str)`${A}/${w}`;return C&&(p=(0,t.str)`${p}${(0,n.getErrorPath)(C,n.Type.Str)}`),[c.schemaPath,p]}function v(w,{params:A,message:C},y){const{keyword:p,data:b,schemaValue:I,it:D}=w,{opts:K,propertyName:G,topSchemaRef:Z,schemaPath:be}=D;y.push([c.keyword,p],[c.params,typeof A=="function"?A(w):A||(0,t._)`{}`]),K.messages&&y.push([c.message,typeof C=="function"?C(w):C]),K.verbose&&y.push([c.schema,I],[c.parentSchema,(0,t._)`${Z}${be}`],[r.default.data,b]),G&&y.push([c.propertyName,G])}})(yi);Object.defineProperty(os,"__esModule",{value:!0});os.boolOrEmptySchema=os.topBoolOrEmptySchema=void 0;const fE=yi,pE=bt,hE=Qr,mE={message:"boolean schema is false"};function vE(e){const{gen:t,schema:n,validateName:r}=e;n===!1?jy(e,!1):typeof n=="object"&&n.$async===!0?t.return(hE.default.data):(t.assign((0,pE._)`${r}.errors`,null),t.return(!0))}os.topBoolOrEmptySchema=vE;function gE(e,t){const{gen:n,schema:r}=e;r===!1?(n.var(t,!1),jy(e)):n.var(t,!0)}os.boolOrEmptySchema=gE;function jy(e,t){const{gen:n,data:r}=e,o={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,fE.reportError)(o,mE,void 0,t)}var pn={},ya={};Object.defineProperty(ya,"__esModule",{value:!0});ya.getRules=ya.isJSONType=void 0;const yE=["string","number","integer","boolean","null","object","array"],_E=new Set(yE);function bE(e){return typeof e=="string"&&_E.has(e)}ya.isJSONType=bE;function wE(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}ya.getRules=wE;var uo={};Object.defineProperty(uo,"__esModule",{value:!0});uo.shouldUseRule=uo.shouldUseGroup=uo.schemaHasRulesForType=void 0;function AE({schema:e,self:t},n){const r=t.RULES.types[n];return r&&r!==!0&&Vy(e,r)}uo.schemaHasRulesForType=AE;function Vy(e,t){return t.rules.some(n=>Uy(e,n))}uo.shouldUseGroup=Vy;function Uy(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some(r=>e[r]!==void 0))}uo.shouldUseRule=Uy;Object.defineProperty(pn,"__esModule",{value:!0});pn.reportTypeError=pn.checkDataTypes=pn.checkDataType=pn.coerceAndCheckDataType=pn.getJSONTypes=pn.getSchemaTypes=pn.DataType=void 0;const CE=ya,$E=uo,SE=yi,ft=bt,Hy=Ve;var Ja;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ja||(pn.DataType=Ja={}));function IE(e){const t=zy(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}pn.getSchemaTypes=IE;function zy(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(CE.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}pn.getJSONTypes=zy;function EE(e,t){const{gen:n,data:r,opts:o}=e,a=TE(t,o.coerceTypes),s=t.length>0&&!(a.length===0&&t.length===1&&(0,$E.schemaHasRulesForType)(e,t[0]));if(s){const i=Wd(t,r,o.strictNumbers,Ja.Wrong);n.if(i,()=>{a.length?kE(e,t,a):qd(e)})}return s}pn.coerceAndCheckDataType=EE;const Ky=new Set(["string","number","integer","boolean","null"]);function TE(e,t){return t?e.filter(n=>Ky.has(n)||t==="array"&&n==="array"):[]}function kE(e,t,n){const{gen:r,data:o,opts:a}=e,s=r.let("dataType",(0,ft._)`typeof ${o}`),i=r.let("coerced",(0,ft._)`undefined`);a.coerceTypes==="array"&&r.if((0,ft._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>r.assign(o,(0,ft._)`${o}[0]`).assign(s,(0,ft._)`typeof ${o}`).if(Wd(t,o,a.strictNumbers),()=>r.assign(i,o))),r.if((0,ft._)`${i} !== undefined`);for(const u of n)(Ky.has(u)||u==="array"&&a.coerceTypes==="array")&&l(u);r.else(),qd(e),r.endIf(),r.if((0,ft._)`${i} !== undefined`,()=>{r.assign(o,i),xE(e,i)});function l(u){switch(u){case"string":r.elseIf((0,ft._)`${s} == "number" || ${s} == "boolean"`).assign(i,(0,ft._)`"" + ${o}`).elseIf((0,ft._)`${o} === null`).assign(i,(0,ft._)`""`);return;case"number":r.elseIf((0,ft._)`${s} == "boolean" || ${o} === null
|
|
31
|
-
|| (${s} == "string" && ${o} && ${o} == +${o})`).assign(i,(0,ft._)`+${o}`);return;case"integer":r.elseIf((0,ft._)`${s} === "boolean" || ${o} === null
|
|
32
|
-
|| (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(i,(0,ft._)`+${o}`);return;case"boolean":r.elseIf((0,ft._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(i,!1).elseIf((0,ft._)`${o} === "true" || ${o} === 1`).assign(i,!0);return;case"null":r.elseIf((0,ft._)`${o} === "" || ${o} === 0 || ${o} === false`),r.assign(i,null);return;case"array":r.elseIf((0,ft._)`${s} === "string" || ${s} === "number"
|
|
33
|
-
|| ${s} === "boolean" || ${o} === null`).assign(i,(0,ft._)`[${o}]`)}}}function xE({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,ft._)`${t} !== undefined`,()=>e.assign((0,ft._)`${t}[${n}]`,r))}function ed(e,t,n,r=Ja.Correct){const o=r===Ja.Correct?ft.operators.EQ:ft.operators.NEQ;let a;switch(e){case"null":return(0,ft._)`${t} ${o} null`;case"array":a=(0,ft._)`Array.isArray(${t})`;break;case"object":a=(0,ft._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=s((0,ft._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=s();break;default:return(0,ft._)`typeof ${t} ${o} ${e}`}return r===Ja.Correct?a:(0,ft.not)(a);function s(i=ft.nil){return(0,ft.and)((0,ft._)`typeof ${t} == "number"`,i,n?(0,ft._)`isFinite(${t})`:ft.nil)}}pn.checkDataType=ed;function Wd(e,t,n,r){if(e.length===1)return ed(e[0],t,n,r);let o;const a=(0,Hy.toHash)(e);if(a.array&&a.object){const s=(0,ft._)`typeof ${t} != "object"`;o=a.null?s:(0,ft._)`!${t} || ${s}`,delete a.null,delete a.array,delete a.object}else o=ft.nil;a.number&&delete a.integer;for(const s in a)o=(0,ft.and)(o,ed(s,t,n,r));return o}pn.checkDataTypes=Wd;const PE={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,ft._)`{type: ${e}}`:(0,ft._)`{type: ${t}}`};function qd(e){const t=ME(e);(0,SE.reportError)(t,PE)}pn.reportTypeError=qd;function ME(e){const{gen:t,data:n,schema:r}=e,o=(0,Hy.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:o,schemaValue:o,parentSchema:r,params:{},it:e}}var hc={};Object.defineProperty(hc,"__esModule",{value:!0});hc.assignDefaults=void 0;const Ra=bt,OE=Ve;function NE(e,t){const{properties:n,items:r}=e.schema;if(t==="object"&&n)for(const o in n)lm(e,o,n[o].default);else t==="array"&&Array.isArray(r)&&r.forEach((o,a)=>lm(e,a,o.default))}hc.assignDefaults=NE;function lm(e,t,n){const{gen:r,compositeRule:o,data:a,opts:s}=e;if(n===void 0)return;const i=(0,Ra._)`${a}${(0,Ra.getProperty)(t)}`;if(o){(0,OE.checkStrictMode)(e,`default is ignored for: ${i}`);return}let l=(0,Ra._)`${i} === undefined`;s.useDefaults==="empty"&&(l=(0,Ra._)`${l} || ${i} === null || ${i} === ""`),r.if(l,(0,Ra._)`${i} = ${(0,Ra.stringify)(n)}`)}var Ur={},yt={};Object.defineProperty(yt,"__esModule",{value:!0});yt.validateUnion=yt.validateArray=yt.usePattern=yt.callValidateCode=yt.schemaProperties=yt.allSchemaProperties=yt.noPropertyInData=yt.propertyInData=yt.isOwnProperty=yt.hasPropFunc=yt.reportMissingProp=yt.checkMissingProp=yt.checkReportMissingProp=void 0;const Xt=bt,Gd=Ve,ko=Qr,RE=Ve;function LE(e,t){const{gen:n,data:r,it:o}=e;n.if(Yd(n,r,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Xt._)`${t}`},!0),e.error()})}yt.checkReportMissingProp=LE;function DE({gen:e,data:t,it:{opts:n}},r,o){return(0,Xt.or)(...r.map(a=>(0,Xt.and)(Yd(e,t,a,n.ownProperties),(0,Xt._)`${o} = ${a}`)))}yt.checkMissingProp=DE;function BE(e,t){e.setParams({missingProperty:t},!0),e.error()}yt.reportMissingProp=BE;function Wy(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Xt._)`Object.prototype.hasOwnProperty`})}yt.hasPropFunc=Wy;function Jd(e,t,n){return(0,Xt._)`${Wy(e)}.call(${t}, ${n})`}yt.isOwnProperty=Jd;function FE(e,t,n,r){const o=(0,Xt._)`${t}${(0,Xt.getProperty)(n)} !== undefined`;return r?(0,Xt._)`${o} && ${Jd(e,t,n)}`:o}yt.propertyInData=FE;function Yd(e,t,n,r){const o=(0,Xt._)`${t}${(0,Xt.getProperty)(n)} === undefined`;return r?(0,Xt.or)(o,(0,Xt.not)(Jd(e,t,n))):o}yt.noPropertyInData=Yd;function qy(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}yt.allSchemaProperties=qy;function jE(e,t){return qy(t).filter(n=>!(0,Gd.alwaysValidSchema)(e,t[n]))}yt.schemaProperties=jE;function VE({schemaCode:e,data:t,it:{gen:n,topSchemaRef:r,schemaPath:o,errorPath:a},it:s},i,l,u){const c=u?(0,Xt._)`${e}, ${t}, ${r}${o}`:t,d=[[ko.default.instancePath,(0,Xt.strConcat)(ko.default.instancePath,a)],[ko.default.parentData,s.parentData],[ko.default.parentDataProperty,s.parentDataProperty],[ko.default.rootData,ko.default.rootData]];s.opts.dynamicRef&&d.push([ko.default.dynamicAnchors,ko.default.dynamicAnchors]);const h=(0,Xt._)`${c}, ${n.object(...d)}`;return l!==Xt.nil?(0,Xt._)`${i}.call(${l}, ${h})`:(0,Xt._)`${i}(${h})`}yt.callValidateCode=VE;const UE=(0,Xt._)`new RegExp`;function HE({gen:e,it:{opts:t}},n){const r=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(n,r);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,Xt._)`${o.code==="new RegExp"?UE:(0,RE.useFunc)(e,o)}(${n}, ${r})`})}yt.usePattern=HE;function zE(e){const{gen:t,data:n,keyword:r,it:o}=e,a=t.name("valid");if(o.allErrors){const i=t.let("valid",!0);return s(()=>t.assign(i,!1)),i}return t.var(a,!0),s(()=>t.break()),a;function s(i){const l=t.const("len",(0,Xt._)`${n}.length`);t.forRange("i",0,l,u=>{e.subschema({keyword:r,dataProp:u,dataPropType:Gd.Type.Num},a),t.if((0,Xt.not)(a),i)})}}yt.validateArray=zE;function KE(e){const{gen:t,schema:n,keyword:r,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(l=>(0,Gd.alwaysValidSchema)(o,l))&&!o.opts.unevaluated)return;const s=t.let("valid",!1),i=t.name("_valid");t.block(()=>n.forEach((l,u)=>{const c=e.subschema({keyword:r,schemaProp:u,compositeRule:!0},i);t.assign(s,(0,Xt._)`${s} || ${i}`),e.mergeValidEvaluated(c,i)||t.if((0,Xt.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}yt.validateUnion=KE;Object.defineProperty(Ur,"__esModule",{value:!0});Ur.validateKeywordUsage=Ur.validSchemaType=Ur.funcKeywordCode=Ur.macroKeywordCode=void 0;const Vn=bt,sa=Qr,WE=yt,qE=yi;function GE(e,t){const{gen:n,keyword:r,schema:o,parentSchema:a,it:s}=e,i=t.macro.call(s.self,o,a,s),l=Gy(n,r,i);s.opts.validateSchema!==!1&&s.self.validateSchema(i,!0);const u=n.name("valid");e.subschema({schema:i,schemaPath:Vn.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:l,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}Ur.macroKeywordCode=GE;function JE(e,t){var n;const{gen:r,keyword:o,schema:a,parentSchema:s,$data:i,it:l}=e;XE(l,t);const u=!i&&t.compile?t.compile.call(l.self,a,s,l):t.validate,c=Gy(r,o,u),d=r.let("valid");e.block$data(d,h),e.ok((n=t.valid)!==null&&n!==void 0?n:d);function h(){if(t.errors===!1)v(),t.modifying&&cm(e),w(()=>e.error());else{const A=t.async?m():_();t.modifying&&cm(e),w(()=>YE(e,A))}}function m(){const A=r.let("ruleErrs",null);return r.try(()=>v((0,Vn._)`await `),C=>r.assign(d,!1).if((0,Vn._)`${C} instanceof ${l.ValidationError}`,()=>r.assign(A,(0,Vn._)`${C}.errors`),()=>r.throw(C))),A}function _(){const A=(0,Vn._)`${c}.errors`;return r.assign(A,null),v(Vn.nil),A}function v(A=t.async?(0,Vn._)`await `:Vn.nil){const C=l.opts.passContext?sa.default.this:sa.default.self,y=!("compile"in t&&!i||t.schema===!1);r.assign(d,(0,Vn._)`${A}${(0,WE.callValidateCode)(e,c,C,y)}`,t.modifying)}function w(A){var C;r.if((0,Vn.not)((C=t.valid)!==null&&C!==void 0?C:d),A)}}Ur.funcKeywordCode=JE;function cm(e){const{gen:t,data:n,it:r}=e;t.if(r.parentData,()=>t.assign(n,(0,Vn._)`${r.parentData}[${r.parentDataProperty}]`))}function YE(e,t){const{gen:n}=e;n.if((0,Vn._)`Array.isArray(${t})`,()=>{n.assign(sa.default.vErrors,(0,Vn._)`${sa.default.vErrors} === null ? ${t} : ${sa.default.vErrors}.concat(${t})`).assign(sa.default.errors,(0,Vn._)`${sa.default.vErrors}.length`),(0,qE.extendErrors)(e)},()=>e.error())}function XE({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Gy(e,t,n){if(n===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,Vn.stringify)(n)})}function QE(e,t,n=!1){return!t.length||t.some(r=>r==="array"?Array.isArray(e):r==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==r||n&&typeof e>"u")}Ur.validSchemaType=QE;function ZE({schema:e,opts:t,self:n,errSchemaPath:r},o,a){if(Array.isArray(o.keyword)?!o.keyword.includes(a):o.keyword!==a)throw new Error("ajv implementation error");const s=o.dependencies;if(s!=null&&s.some(i=>!Object.prototype.hasOwnProperty.call(e,i)))throw new Error(`parent schema must have dependencies of ${a}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[a])){const l=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")n.logger.error(l);else throw new Error(l)}}Ur.validateKeywordUsage=ZE;var jo={};Object.defineProperty(jo,"__esModule",{value:!0});jo.extendSubschemaMode=jo.extendSubschemaData=jo.getSubschema=void 0;const Vr=bt,Jy=Ve;function eT(e,{keyword:t,schemaProp:n,schema:r,schemaPath:o,errSchemaPath:a,topSchemaRef:s}){if(t!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const i=e.schema[t];return n===void 0?{schema:i,schemaPath:(0,Vr._)`${e.schemaPath}${(0,Vr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[n],schemaPath:(0,Vr._)`${e.schemaPath}${(0,Vr.getProperty)(t)}${(0,Vr.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Jy.escapeFragment)(n)}`}}if(r!==void 0){if(o===void 0||a===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:o,topSchemaRef:s,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}jo.getSubschema=eT;function tT(e,t,{dataProp:n,dataPropType:r,data:o,dataTypes:a,propertyName:s}){if(o!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:i}=t;if(n!==void 0){const{errorPath:u,dataPathArr:c,opts:d}=t,h=i.let("data",(0,Vr._)`${t.data}${(0,Vr.getProperty)(n)}`,!0);l(h),e.errorPath=(0,Vr.str)`${u}${(0,Jy.getErrorPath)(n,r,d.jsPropertySyntax)}`,e.parentDataProperty=(0,Vr._)`${n}`,e.dataPathArr=[...c,e.parentDataProperty]}if(o!==void 0){const u=o instanceof Vr.Name?o:i.let("data",o,!0);l(u),s!==void 0&&(e.propertyName=s)}a&&(e.dataTypes=a);function l(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}jo.extendSubschemaData=tT;function nT(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:o,allErrors:a}){r!==void 0&&(e.compositeRule=r),o!==void 0&&(e.createErrors=o),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}jo.extendSubschemaMode=nT;var Tn={},Yy=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=r;o--!==0;){var s=a[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n},Xy={exports:{}},Lo=Xy.exports=function(e,t,n){typeof t=="function"&&(n=t,t={}),n=t.cb||n;var r=typeof n=="function"?n:n.pre||function(){},o=n.post||function(){};fl(t,r,o,e,"",e)};Lo.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Lo.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Lo.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Lo.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function fl(e,t,n,r,o,a,s,i,l,u){if(r&&typeof r=="object"&&!Array.isArray(r)){t(r,o,a,s,i,l,u);for(var c in r){var d=r[c];if(Array.isArray(d)){if(c in Lo.arrayKeywords)for(var h=0;h<d.length;h++)fl(e,t,n,d[h],o+"/"+c+"/"+h,a,o,c,r,h)}else if(c in Lo.propsKeywords){if(d&&typeof d=="object")for(var m in d)fl(e,t,n,d[m],o+"/"+c+"/"+rT(m),a,o,c,r,m)}else(c in Lo.keywords||e.allKeys&&!(c in Lo.skipKeywords))&&fl(e,t,n,d,o+"/"+c,a,o,c,r)}n(r,o,a,s,i,l,u)}}function rT(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var oT=Xy.exports;Object.defineProperty(Tn,"__esModule",{value:!0});Tn.getSchemaRefs=Tn.resolveUrl=Tn.normalizeId=Tn._getFullPath=Tn.getFullPath=Tn.inlineRef=void 0;const aT=Ve,sT=Yy,iT=oT,lT=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function cT(e,t=!0){return typeof e=="boolean"?!0:t===!0?!td(e):t?Qy(e)<=t:!1}Tn.inlineRef=cT;const uT=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function td(e){for(const t in e){if(uT.has(t))return!0;const n=e[t];if(Array.isArray(n)&&n.some(td)||typeof n=="object"&&td(n))return!0}return!1}function Qy(e){let t=0;for(const n in e){if(n==="$ref")return 1/0;if(t++,!lT.has(n)&&(typeof e[n]=="object"&&(0,aT.eachItem)(e[n],r=>t+=Qy(r)),t===1/0))return 1/0}return t}function Zy(e,t="",n){n!==!1&&(t=Ya(t));const r=e.parse(t);return e_(e,r)}Tn.getFullPath=Zy;function e_(e,t){return e.serialize(t).split("#")[0]+"#"}Tn._getFullPath=e_;const dT=/#\/?$/;function Ya(e){return e?e.replace(dT,""):""}Tn.normalizeId=Ya;function fT(e,t,n){return n=Ya(n),e.resolve(t,n)}Tn.resolveUrl=fT;const pT=/^[a-z_][-a-z0-9._]*$/i;function hT(e,t){if(typeof e=="boolean")return{};const{schemaId:n,uriResolver:r}=this.opts,o=Ya(e[n]||t),a={"":o},s=Zy(r,o,!1),i={},l=new Set;return iT(e,{allKeys:!0},(d,h,m,_)=>{if(_===void 0)return;const v=s+h;let w=a[_];typeof d[n]=="string"&&(w=A.call(this,d[n])),C.call(this,d.$anchor),C.call(this,d.$dynamicAnchor),a[h]=w;function A(y){const p=this.opts.uriResolver.resolve;if(y=Ya(w?p(w,y):y),l.has(y))throw c(y);l.add(y);let b=this.refs[y];return typeof b=="string"&&(b=this.refs[b]),typeof b=="object"?u(d,b.schema,y):y!==Ya(v)&&(y[0]==="#"?(u(d,i[y],y),i[y]=d):this.refs[y]=v),y}function C(y){if(typeof y=="string"){if(!pT.test(y))throw new Error(`invalid anchor "${y}"`);A.call(this,`#${y}`)}}}),i;function u(d,h,m){if(h!==void 0&&!sT(d,h))throw c(m)}function c(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Tn.getSchemaRefs=hT;Object.defineProperty(Tr,"__esModule",{value:!0});Tr.getData=Tr.KeywordCxt=Tr.validateFunctionCode=void 0;const t_=os,um=pn,Xd=uo,Bl=pn,mT=hc,Ws=Ur,gu=jo,Ze=bt,ct=Qr,vT=Tn,fo=Ve,xs=yi;function gT(e){if(o_(e)&&(a_(e),r_(e))){bT(e);return}n_(e,()=>(0,t_.topBoolOrEmptySchema)(e))}Tr.validateFunctionCode=gT;function n_({gen:e,validateName:t,schema:n,schemaEnv:r,opts:o},a){o.code.es5?e.func(t,(0,Ze._)`${ct.default.data}, ${ct.default.valCxt}`,r.$async,()=>{e.code((0,Ze._)`"use strict"; ${dm(n,o)}`),_T(e,o),e.code(a)}):e.func(t,(0,Ze._)`${ct.default.data}, ${yT(o)}`,r.$async,()=>e.code(dm(n,o)).code(a))}function yT(e){return(0,Ze._)`{${ct.default.instancePath}="", ${ct.default.parentData}, ${ct.default.parentDataProperty}, ${ct.default.rootData}=${ct.default.data}${e.dynamicRef?(0,Ze._)`, ${ct.default.dynamicAnchors}={}`:Ze.nil}}={}`}function _T(e,t){e.if(ct.default.valCxt,()=>{e.var(ct.default.instancePath,(0,Ze._)`${ct.default.valCxt}.${ct.default.instancePath}`),e.var(ct.default.parentData,(0,Ze._)`${ct.default.valCxt}.${ct.default.parentData}`),e.var(ct.default.parentDataProperty,(0,Ze._)`${ct.default.valCxt}.${ct.default.parentDataProperty}`),e.var(ct.default.rootData,(0,Ze._)`${ct.default.valCxt}.${ct.default.rootData}`),t.dynamicRef&&e.var(ct.default.dynamicAnchors,(0,Ze._)`${ct.default.valCxt}.${ct.default.dynamicAnchors}`)},()=>{e.var(ct.default.instancePath,(0,Ze._)`""`),e.var(ct.default.parentData,(0,Ze._)`undefined`),e.var(ct.default.parentDataProperty,(0,Ze._)`undefined`),e.var(ct.default.rootData,ct.default.data),t.dynamicRef&&e.var(ct.default.dynamicAnchors,(0,Ze._)`{}`)})}function bT(e){const{schema:t,opts:n,gen:r}=e;n_(e,()=>{n.$comment&&t.$comment&&i_(e),ST(e),r.let(ct.default.vErrors,null),r.let(ct.default.errors,0),n.unevaluated&&wT(e),s_(e),TT(e)})}function wT(e){const{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",(0,Ze._)`${n}.evaluated`),t.if((0,Ze._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,Ze._)`${e.evaluated}.props`,(0,Ze._)`undefined`)),t.if((0,Ze._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,Ze._)`${e.evaluated}.items`,(0,Ze._)`undefined`))}function dm(e,t){const n=typeof e=="object"&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,Ze._)`/*# sourceURL=${n} */`:Ze.nil}function AT(e,t){if(o_(e)&&(a_(e),r_(e))){CT(e,t);return}(0,t_.boolOrEmptySchema)(e,t)}function r_({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function o_(e){return typeof e.schema!="boolean"}function CT(e,t){const{schema:n,gen:r,opts:o}=e;o.$comment&&n.$comment&&i_(e),IT(e),ET(e);const a=r.const("_errs",ct.default.errors);s_(e,a),r.var(t,(0,Ze._)`${a} === ${ct.default.errors}`)}function a_(e){(0,fo.checkUnknownRules)(e),$T(e)}function s_(e,t){if(e.opts.jtd)return fm(e,[],!1,t);const n=(0,um.getSchemaTypes)(e.schema),r=(0,um.coerceAndCheckDataType)(e,n);fm(e,n,!r,t)}function $T(e){const{schema:t,errSchemaPath:n,opts:r,self:o}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,fo.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function ST(e){const{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,fo.checkStrictMode)(e,"default is ignored in the schema root")}function IT(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,vT.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function ET(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function i_({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:o}){const a=n.$comment;if(o.$comment===!0)e.code((0,Ze._)`${ct.default.self}.logger.log(${a})`);else if(typeof o.$comment=="function"){const s=(0,Ze.str)`${r}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code((0,Ze._)`${ct.default.self}.opts.$comment(${a}, ${s}, ${i}.schema)`)}}function TT(e){const{gen:t,schemaEnv:n,validateName:r,ValidationError:o,opts:a}=e;n.$async?t.if((0,Ze._)`${ct.default.errors} === 0`,()=>t.return(ct.default.data),()=>t.throw((0,Ze._)`new ${o}(${ct.default.vErrors})`)):(t.assign((0,Ze._)`${r}.errors`,ct.default.vErrors),a.unevaluated&&kT(e),t.return((0,Ze._)`${ct.default.errors} === 0`))}function kT({gen:e,evaluated:t,props:n,items:r}){n instanceof Ze.Name&&e.assign((0,Ze._)`${t}.props`,n),r instanceof Ze.Name&&e.assign((0,Ze._)`${t}.items`,r)}function fm(e,t,n,r){const{gen:o,schema:a,data:s,allErrors:i,opts:l,self:u}=e,{RULES:c}=u;if(a.$ref&&(l.ignoreKeywordsWithRef||!(0,fo.schemaHasRulesButRef)(a,c))){o.block(()=>u_(e,"$ref",c.all.$ref.definition));return}l.jtd||xT(e,t),o.block(()=>{for(const h of c.rules)d(h);d(c.post)});function d(h){(0,Xd.shouldUseGroup)(a,h)&&(h.type?(o.if((0,Bl.checkDataType)(h.type,s,l.strictNumbers)),pm(e,h),t.length===1&&t[0]===h.type&&n&&(o.else(),(0,Bl.reportTypeError)(e)),o.endIf()):pm(e,h),i||o.if((0,Ze._)`${ct.default.errors} === ${r||0}`))}}function pm(e,t){const{gen:n,schema:r,opts:{useDefaults:o}}=e;o&&(0,mT.assignDefaults)(e,t.type),n.block(()=>{for(const a of t.rules)(0,Xd.shouldUseRule)(r,a)&&u_(e,a.keyword,a.definition,t.type)})}function xT(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(PT(e,t),e.opts.allowUnionTypes||MT(e,t),OT(e,e.dataTypes))}function PT(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(n=>{l_(e.dataTypes,n)||Qd(e,`type "${n}" not allowed by context "${e.dataTypes.join(",")}"`)}),RT(e,t)}}function MT(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Qd(e,"use allowUnionTypes to allow union type keyword")}function OT(e,t){const n=e.self.RULES.all;for(const r in n){const o=n[r];if(typeof o=="object"&&(0,Xd.shouldUseRule)(e.schema,o)){const{type:a}=o.definition;a.length&&!a.some(s=>NT(t,s))&&Qd(e,`missing type "${a.join(",")}" for keyword "${r}"`)}}}function NT(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function l_(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function RT(e,t){const n=[];for(const r of e.dataTypes)l_(t,r)?n.push(r):t.includes("integer")&&r==="number"&&n.push("integer");e.dataTypes=n}function Qd(e,t){const n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,fo.checkStrictMode)(e,t,e.opts.strictTypes)}class c_{constructor(t,n,r){if((0,Ws.validateKeywordUsage)(t,n,r),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=r,this.data=t.data,this.schema=t.schema[r],this.$data=n.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,fo.schemaRefOrVal)(t,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=n,this.$data)this.schemaCode=t.gen.const("vSchema",d_(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ws.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=t.gen.const("_errs",ct.default.errors))}result(t,n,r){this.failResult((0,Ze.not)(t),n,r)}failResult(t,n,r){this.gen.if(t),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,n){this.failResult((0,Ze.not)(t),void 0,n)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:n}=this;this.fail((0,Ze._)`${n} !== undefined && (${(0,Ze.or)(this.invalid$data(),t)})`)}error(t,n,r){if(n){this.setParams(n),this._error(t,r),this.setParams({});return}this._error(t,r)}_error(t,n){(t?xs.reportExtraError:xs.reportError)(this,this.def.error,n)}$dataError(){(0,xs.reportError)(this,this.def.$dataError||xs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,xs.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,n){n?Object.assign(this.params,t):this.params=t}block$data(t,n,r=Ze.nil){this.gen.block(()=>{this.check$data(t,r),n()})}check$data(t=Ze.nil,n=Ze.nil){if(!this.$data)return;const{gen:r,schemaCode:o,schemaType:a,def:s}=this;r.if((0,Ze.or)((0,Ze._)`${o} === undefined`,n)),t!==Ze.nil&&r.assign(t,!0),(a.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),t!==Ze.nil&&r.assign(t,!1)),r.else()}invalid$data(){const{gen:t,schemaCode:n,schemaType:r,def:o,it:a}=this;return(0,Ze.or)(s(),i());function s(){if(r.length){if(!(n instanceof Ze.Name))throw new Error("ajv implementation error");const l=Array.isArray(r)?r:[r];return(0,Ze._)`${(0,Bl.checkDataTypes)(l,n,a.opts.strictNumbers,Bl.DataType.Wrong)}`}return Ze.nil}function i(){if(o.validateSchema){const l=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,Ze._)`!${l}(${n})`}return Ze.nil}}subschema(t,n){const r=(0,gu.getSubschema)(this.it,t);(0,gu.extendSubschemaData)(r,this.it,t),(0,gu.extendSubschemaMode)(r,t);const o={...this.it,...r,items:void 0,props:void 0};return AT(o,n),o}mergeEvaluated(t,n){const{it:r,gen:o}=this;r.opts.unevaluated&&(r.props!==!0&&t.props!==void 0&&(r.props=fo.mergeEvaluated.props(o,t.props,r.props,n)),r.items!==!0&&t.items!==void 0&&(r.items=fo.mergeEvaluated.items(o,t.items,r.items,n)))}mergeValidEvaluated(t,n){const{it:r,gen:o}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return o.if(n,()=>this.mergeEvaluated(t,Ze.Name)),!0}}Tr.KeywordCxt=c_;function u_(e,t,n,r){const o=new c_(e,n,t);"code"in n?n.code(o,r):o.$data&&n.validate?(0,Ws.funcKeywordCode)(o,n):"macro"in n?(0,Ws.macroKeywordCode)(o,n):(n.compile||n.validate)&&(0,Ws.funcKeywordCode)(o,n)}const LT=/^\/(?:[^~]|~0|~1)*$/,DT=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function d_(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let o,a;if(e==="")return ct.default.rootData;if(e[0]==="/"){if(!LT.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,a=ct.default.rootData}else{const u=DT.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);const c=+u[1];if(o=u[2],o==="#"){if(c>=t)throw new Error(l("property/index",c));return r[t-c]}if(c>t)throw new Error(l("data",c));if(a=n[t-c],!o)return a}let s=a;const i=o.split("/");for(const u of i)u&&(a=(0,Ze._)`${a}${(0,Ze.getProperty)((0,fo.unescapeJsonPointer)(u))}`,s=(0,Ze._)`${s} && ${a}`);return s;function l(u,c){return`Cannot access ${u} ${c} levels up, current level is ${t}`}}Tr.getData=d_;var _i={};Object.defineProperty(_i,"__esModule",{value:!0});class BT extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}_i.default=BT;var ds={};Object.defineProperty(ds,"__esModule",{value:!0});const yu=Tn;class FT extends Error{constructor(t,n,r,o){super(o||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,yu.resolveUrl)(t,n,r),this.missingSchema=(0,yu.normalizeId)((0,yu.getFullPath)(t,this.missingRef))}}ds.default=FT;var Yn={};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.resolveSchema=Yn.getCompilingSchema=Yn.resolveRef=Yn.compileSchema=Yn.SchemaEnv=void 0;const wr=bt,jT=_i,ra=Qr,Ir=Tn,hm=Ve,VT=Tr;class mc{constructor(t){var n;this.refs={},this.dynamicAnchors={};let r;typeof t.schema=="object"&&(r=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(n=t.baseId)!==null&&n!==void 0?n:(0,Ir.normalizeId)(r==null?void 0:r[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=r==null?void 0:r.$async,this.refs={}}}Yn.SchemaEnv=mc;function Zd(e){const t=f_.call(this,e);if(t)return t;const n=(0,Ir.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:r,lines:o}=this.opts.code,{ownProperties:a}=this.opts,s=new wr.CodeGen(this.scope,{es5:r,lines:o,ownProperties:a});let i;e.$async&&(i=s.scopeValue("Error",{ref:jT.default,code:(0,wr._)`require("ajv/dist/runtime/validation_error").default`}));const l=s.scopeName("validate");e.validateName=l;const u={gen:s,allErrors:this.opts.allErrors,data:ra.default.data,parentData:ra.default.parentData,parentDataProperty:ra.default.parentDataProperty,dataNames:[ra.default.data],dataPathArr:[wr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,wr.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:i,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:wr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,wr._)`""`,opts:this.opts,self:this};let c;try{this._compilations.add(e),(0,VT.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);const d=s.toString();c=`${s.scopeRefs(ra.default.scope)}return ${d}`,this.opts.code.process&&(c=this.opts.code.process(c,e));const m=new Function(`${ra.default.self}`,`${ra.default.scope}`,c)(this,this.scope.get());if(this.scope.value(l,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:l,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){const{props:_,items:v}=u;m.evaluated={props:_ instanceof wr.Name?void 0:_,items:v instanceof wr.Name?void 0:v,dynamicProps:_ instanceof wr.Name,dynamicItems:v instanceof wr.Name},m.source&&(m.source.evaluated=(0,wr.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,c&&this.logger.error("Error compiling schema, function code:",c),d}finally{this._compilations.delete(e)}}Yn.compileSchema=Zd;function UT(e,t,n){var r;n=(0,Ir.resolveUrl)(this.opts.uriResolver,t,n);const o=e.refs[n];if(o)return o;let a=KT.call(this,e,n);if(a===void 0){const s=(r=e.localRefs)===null||r===void 0?void 0:r[n],{schemaId:i}=this.opts;s&&(a=new mc({schema:s,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=HT.call(this,a)}Yn.resolveRef=UT;function HT(e){return(0,Ir.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Zd.call(this,e)}function f_(e){for(const t of this._compilations)if(zT(t,e))return t}Yn.getCompilingSchema=f_;function zT(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function KT(e,t){let n;for(;typeof(n=this.refs[t])=="string";)t=n;return n||this.schemas[t]||vc.call(this,e,t)}function vc(e,t){const n=this.opts.uriResolver.parse(t),r=(0,Ir._getFullPath)(this.opts.uriResolver,n);let o=(0,Ir.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===o)return _u.call(this,n,e);const a=(0,Ir.normalizeId)(r),s=this.refs[a]||this.schemas[a];if(typeof s=="string"){const i=vc.call(this,e,s);return typeof(i==null?void 0:i.schema)!="object"?void 0:_u.call(this,n,i)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||Zd.call(this,s),a===(0,Ir.normalizeId)(t)){const{schema:i}=s,{schemaId:l}=this.opts,u=i[l];return u&&(o=(0,Ir.resolveUrl)(this.opts.uriResolver,o,u)),new mc({schema:i,schemaId:l,root:e,baseId:o})}return _u.call(this,n,s)}}Yn.resolveSchema=vc;const WT=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function _u(e,{baseId:t,schema:n,root:r}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(const i of e.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const l=n[(0,hm.unescapeFragment)(i)];if(l===void 0)return;n=l;const u=typeof n=="object"&&n[this.opts.schemaId];!WT.has(i)&&u&&(t=(0,Ir.resolveUrl)(this.opts.uriResolver,t,u))}let a;if(typeof n!="boolean"&&n.$ref&&!(0,hm.schemaHasRulesButRef)(n,this.RULES)){const i=(0,Ir.resolveUrl)(this.opts.uriResolver,t,n.$ref);a=vc.call(this,r,i)}const{schemaId:s}=this.opts;if(a=a||new mc({schema:n,schemaId:s,root:r,baseId:t}),a.schema!==a.root.schema)return a}const qT="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",GT="Meta-schema for $data reference (JSON AnySchema extension proposal)",JT="object",YT=["$data"],XT={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},QT=!1,ZT={$id:qT,description:GT,type:JT,required:YT,properties:XT,additionalProperties:QT};var ef={},gc={exports:{}};const ek={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};var tk={HEX:ek};const{HEX:nk}=tk;function p_(e){if(m_(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[n]=t;return n?{host:ok(n,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function nd(e,t=!1){let n="",r=!0;for(const o of e){if(nk[o]===void 0)return;o!=="0"&&r===!0&&(r=!1),r||(n+=o)}return t&&n.length===0&&(n="0"),n}function rk(e){let t=0;const n={error:!1,address:"",zone:""},r=[],o=[];let a=!1,s=!1,i=!1;function l(){if(o.length){if(a===!1){const u=nd(o);if(u!==void 0)r.push(u);else return n.error=!0,!1}o.length=0}return!0}for(let u=0;u<e.length;u++){const c=e[u];if(!(c==="["||c==="]"))if(c===":"){if(s===!0&&(i=!0),!l())break;if(t++,r.push(":"),t>7){n.error=!0;break}u-1>=0&&e[u-1]===":"&&(s=!0);continue}else if(c==="%"){if(!l())break;a=!0}else{o.push(c);continue}}return o.length&&(a?n.zone=o.join(""):i?r.push(o.join("")):r.push(nd(o))),n.address=r.join(""),n}function h_(e,t={}){if(m_(e,":")<2)return{host:e,isIPV6:!1};const n=rk(e);if(n.error)return{host:e,isIPV6:!1};{let r=n.address,o=n.address;return n.zone&&(r+="%"+n.zone,o+="%25"+n.zone),{host:r,escapedHost:o,isIPV6:!0}}}function ok(e,t){let n="",r=!0;const o=e.length;for(let a=0;a<o;a++){const s=e[a];s==="0"&&r?(a+1<=o&&e[a+1]===t||a+1===o)&&(n+=s,r=!1):(s===t?r=!0:r=!1,n+=s)}return n}function m_(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}const mm=/^\.\.?\//u,vm=/^\/\.(?:\/|$)/u,gm=/^\/\.\.(?:\/|$)/u,ak=/^\/?(?:.|\n)*?(?=\/|$)/u;function sk(e){const t=[];for(;e.length;)if(e.match(mm))e=e.replace(mm,"");else if(e.match(vm))e=e.replace(vm,"/");else if(e.match(gm))e=e.replace(gm,"/"),t.pop();else if(e==="."||e==="..")e="";else{const n=e.match(ak);if(n){const r=n[0];e=e.slice(r.length),t.push(r)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function ik(e,t){const n=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function lk(e,t){const n=[];if(e.userinfo!==void 0&&(n.push(e.userinfo),n.push("@")),e.host!==void 0){let r=unescape(e.host);const o=p_(r);if(o.isIPV4)r=o.host;else{const a=h_(o.host,{isIPV4:!1});a.isIPV6===!0?r=`[${a.escapedHost}]`:r=e.host}n.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var ck={recomposeAuthority:lk,normalizeComponentEncoding:ik,removeDotSegments:sk,normalizeIPv4:p_,normalizeIPv6:h_,stringArrayToHexStripped:nd};const uk=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,dk=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function v_(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function g_(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function y_(e){const t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function fk(e){return e.secure=v_(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function pk(e){if((e.port===(v_(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,n]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function hk(e,t){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(dk);if(n){const r=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const o=`${r}:${t.nid||e.nid}`,a=tf[o];e.path=void 0,a&&(e=a.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function mk(e,t){const n=t.scheme||e.scheme||"urn",r=e.nid.toLowerCase(),o=`${n}:${t.nid||r}`,a=tf[o];a&&(e=a.serialize(e,t));const s=e,i=e.nss;return s.path=`${r||t.nid}:${i}`,t.skipEscape=!0,s}function vk(e,t){const n=e;return n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!uk.test(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function gk(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const __={scheme:"http",domainHost:!0,parse:g_,serialize:y_},yk={scheme:"https",domainHost:__.domainHost,parse:g_,serialize:y_},pl={scheme:"ws",domainHost:!0,parse:fk,serialize:pk},_k={scheme:"wss",domainHost:pl.domainHost,parse:pl.parse,serialize:pl.serialize},bk={scheme:"urn",parse:hk,serialize:mk,skipNormalize:!0},wk={scheme:"urn:uuid",parse:vk,serialize:gk,skipNormalize:!0},tf={http:__,https:yk,ws:pl,wss:_k,urn:bk,"urn:uuid":wk};var Ak=tf;const{normalizeIPv6:Ck,normalizeIPv4:$k,removeDotSegments:Ls,recomposeAuthority:Sk,normalizeComponentEncoding:Yi}=ck,nf=Ak;function Ik(e,t){return typeof e=="string"?e=Hr(go(e,t),t):typeof e=="object"&&(e=go(Hr(e,t),t)),e}function Ek(e,t,n){const r=Object.assign({scheme:"null"},n),o=b_(go(e,r),go(t,r),r,!0);return Hr(o,{...r,skipEscape:!0})}function b_(e,t,n,r){const o={};return r||(e=go(Hr(e,n),n),t=go(Hr(t,n),n)),n=n||{},!n.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Ls(t.path||""),o.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Ls(t.path||""),o.query=t.query):(t.path?(t.path.charAt(0)==="/"?o.path=Ls(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?o.path="/"+t.path:e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path,o.path=Ls(o.path)),o.query=t.query):(o.path=e.path,t.query!==void 0?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function Tk(e,t,n){return typeof e=="string"?(e=unescape(e),e=Hr(Yi(go(e,n),!0),{...n,skipEscape:!0})):typeof e=="object"&&(e=Hr(Yi(e,!0),{...n,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=Hr(Yi(go(t,n),!0),{...n,skipEscape:!0})):typeof t=="object"&&(t=Hr(Yi(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function Hr(e,t){const n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},r=Object.assign({},t),o=[],a=nf[(r.scheme||n.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),r.reference!=="suffix"&&n.scheme&&o.push(n.scheme,":");const s=Sk(n,r);if(s!==void 0&&(r.reference!=="suffix"&&o.push("//"),o.push(s),n.path&&n.path.charAt(0)!=="/"&&o.push("/")),n.path!==void 0){let i=n.path;!r.absolutePath&&(!a||!a.absolutePath)&&(i=Ls(i)),s===void 0&&(i=i.replace(/^\/\//u,"/%2F")),o.push(i)}return n.query!==void 0&&o.push("?",n.query),n.fragment!==void 0&&o.push("#",n.fragment),o.join("")}const kk=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function xk(e){let t=0;for(let n=0,r=e.length;n<r;++n)if(t=e.charCodeAt(n),t>126||kk[t])return!0;return!1}const Pk=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function go(e,t){const n=Object.assign({},t),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=e.indexOf("%")!==-1;let a=!1;n.reference==="suffix"&&(e=(n.scheme?n.scheme+":":"")+"//"+e);const s=e.match(Pk);if(s){if(r.scheme=s[1],r.userinfo=s[3],r.host=s[4],r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=s[7],r.fragment=s[8],isNaN(r.port)&&(r.port=s[5]),r.host){const l=$k(r.host);if(l.isIPV4===!1){const u=Ck(l.host,{isIPV4:!1});r.host=u.host.toLowerCase(),a=u.isIPV6}else r.host=l.host,a=!0}r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&!r.path&&r.query===void 0?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");const i=nf[(n.scheme||r.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!i||!i.unicodeSupport)&&r.host&&(n.domainHost||i&&i.domainHost)&&a===!1&&xk(r.host))try{r.host=URL.domainToASCII(r.host.toLowerCase())}catch(l){r.error=r.error||"Host's domain name can not be converted to ASCII: "+l}(!i||i&&!i.skipNormalize)&&(o&&r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),o&&r.host!==void 0&&(r.host=unescape(r.host)),r.path!==void 0&&r.path.length&&(r.path=escape(unescape(r.path))),r.fragment!==void 0&&r.fragment.length&&(r.fragment=encodeURI(decodeURIComponent(r.fragment)))),i&&i.parse&&i.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return r}const rf={SCHEMES:nf,normalize:Ik,resolve:Ek,resolveComponents:b_,equal:Tk,serialize:Hr,parse:go};gc.exports=rf;gc.exports.default=rf;gc.exports.fastUri=rf;var Mk=gc.exports;Object.defineProperty(ef,"__esModule",{value:!0});const w_=Mk;w_.code='require("ajv/dist/runtime/uri").default';ef.default=w_;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Tr;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=bt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=_i,o=ds,a=ya,s=Yn,i=bt,l=Tn,u=pn,c=Ve,d=ZT,h=ef,m=(me,z)=>new RegExp(me,z);m.code="new RegExp";const _=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},A={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},C=200;function y(me){var z,ue,X,T,R,se,Re,De,it,et,dt,zt,N,j,ae,ye,U,J,x,S,E,P,W,re,ie;const Pe=me.strict,Xe=(z=me.code)===null||z===void 0?void 0:z.optimize,lt=Xe===!0||Xe===void 0?1:Xe||0,st=(X=(ue=me.code)===null||ue===void 0?void 0:ue.regExp)!==null&&X!==void 0?X:m,Nt=(T=me.uriResolver)!==null&&T!==void 0?T:h.default;return{strictSchema:(se=(R=me.strictSchema)!==null&&R!==void 0?R:Pe)!==null&&se!==void 0?se:!0,strictNumbers:(De=(Re=me.strictNumbers)!==null&&Re!==void 0?Re:Pe)!==null&&De!==void 0?De:!0,strictTypes:(et=(it=me.strictTypes)!==null&&it!==void 0?it:Pe)!==null&&et!==void 0?et:"log",strictTuples:(zt=(dt=me.strictTuples)!==null&&dt!==void 0?dt:Pe)!==null&&zt!==void 0?zt:"log",strictRequired:(j=(N=me.strictRequired)!==null&&N!==void 0?N:Pe)!==null&&j!==void 0?j:!1,code:me.code?{...me.code,optimize:lt,regExp:st}:{optimize:lt,regExp:st},loopRequired:(ae=me.loopRequired)!==null&&ae!==void 0?ae:C,loopEnum:(ye=me.loopEnum)!==null&&ye!==void 0?ye:C,meta:(U=me.meta)!==null&&U!==void 0?U:!0,messages:(J=me.messages)!==null&&J!==void 0?J:!0,inlineRefs:(x=me.inlineRefs)!==null&&x!==void 0?x:!0,schemaId:(S=me.schemaId)!==null&&S!==void 0?S:"$id",addUsedSchema:(E=me.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(P=me.validateSchema)!==null&&P!==void 0?P:!0,validateFormats:(W=me.validateFormats)!==null&&W!==void 0?W:!0,unicodeRegExp:(re=me.unicodeRegExp)!==null&&re!==void 0?re:!0,int32range:(ie=me.int32range)!==null&&ie!==void 0?ie:!0,uriResolver:Nt}}class p{constructor(z={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,z=this.opts={...z,...y(z)};const{es5:ue,lines:X}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:v,es5:ue,lines:X}),this.logger=ce(z.logger);const T=z.validateFormats;z.validateFormats=!1,this.RULES=(0,a.getRules)(),b.call(this,w,z,"NOT SUPPORTED"),b.call(this,A,z,"DEPRECATED","warn"),this._metaOpts=Z.call(this),z.formats&&K.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),z.keywords&&G.call(this,z.keywords),typeof z.meta=="object"&&this.addMetaSchema(z.meta),D.call(this),z.validateFormats=T}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:z,meta:ue,schemaId:X}=this.opts;let T=d;X==="id"&&(T={...d},T.id=T.$id,delete T.$id),ue&&z&&this.addMetaSchema(T,T[X],!1)}defaultMeta(){const{meta:z,schemaId:ue}=this.opts;return this.opts.defaultMeta=typeof z=="object"?z[ue]||z:void 0}validate(z,ue){let X;if(typeof z=="string"){if(X=this.getSchema(z),!X)throw new Error(`no schema with key or ref "${z}"`)}else X=this.compile(z);const T=X(ue);return"$async"in X||(this.errors=X.errors),T}compile(z,ue){const X=this._addSchema(z,ue);return X.validate||this._compileSchemaEnv(X)}compileAsync(z,ue){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:X}=this.opts;return T.call(this,z,ue);async function T(et,dt){await R.call(this,et.$schema);const zt=this._addSchema(et,dt);return zt.validate||se.call(this,zt)}async function R(et){et&&!this.getSchema(et)&&await T.call(this,{$ref:et},!0)}async function se(et){try{return this._compileSchemaEnv(et)}catch(dt){if(!(dt instanceof o.default))throw dt;return Re.call(this,dt),await De.call(this,dt.missingSchema),se.call(this,et)}}function Re({missingSchema:et,missingRef:dt}){if(this.refs[et])throw new Error(`AnySchema ${et} is loaded but ${dt} cannot be resolved`)}async function De(et){const dt=await it.call(this,et);this.refs[et]||await R.call(this,dt.$schema),this.refs[et]||this.addSchema(dt,et,ue)}async function it(et){const dt=this._loading[et];if(dt)return dt;try{return await(this._loading[et]=X(et))}finally{delete this._loading[et]}}}addSchema(z,ue,X,T=this.opts.validateSchema){if(Array.isArray(z)){for(const se of z)this.addSchema(se,void 0,X,T);return this}let R;if(typeof z=="object"){const{schemaId:se}=this.opts;if(R=z[se],R!==void 0&&typeof R!="string")throw new Error(`schema ${se} must be string`)}return ue=(0,l.normalizeId)(ue||R),this._checkUnique(ue),this.schemas[ue]=this._addSchema(z,X,ue,T,!0),this}addMetaSchema(z,ue,X=this.opts.validateSchema){return this.addSchema(z,ue,!0,X),this}validateSchema(z,ue){if(typeof z=="boolean")return!0;let X;if(X=z.$schema,X!==void 0&&typeof X!="string")throw new Error("$schema must be a string");if(X=X||this.opts.defaultMeta||this.defaultMeta(),!X)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const T=this.validate(X,z);if(!T&&ue){const R="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(R);else throw new Error(R)}return T}getSchema(z){let ue;for(;typeof(ue=I.call(this,z))=="string";)z=ue;if(ue===void 0){const{schemaId:X}=this.opts,T=new s.SchemaEnv({schema:{},schemaId:X});if(ue=s.resolveSchema.call(this,T,z),!ue)return;this.refs[z]=ue}return ue.validate||this._compileSchemaEnv(ue)}removeSchema(z){if(z instanceof RegExp)return this._removeAllSchemas(this.schemas,z),this._removeAllSchemas(this.refs,z),this;switch(typeof z){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const ue=I.call(this,z);return typeof ue=="object"&&this._cache.delete(ue.schema),delete this.schemas[z],delete this.refs[z],this}case"object":{const ue=z;this._cache.delete(ue);let X=z[this.opts.schemaId];return X&&(X=(0,l.normalizeId)(X),delete this.schemas[X],delete this.refs[X]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(z){for(const ue of z)this.addKeyword(ue);return this}addKeyword(z,ue){let X;if(typeof z=="string")X=z,typeof ue=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),ue.keyword=X);else if(typeof z=="object"&&ue===void 0){if(ue=z,X=ue.keyword,Array.isArray(X)&&!X.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(de.call(this,X,ue),!ue)return(0,c.eachItem)(X,R=>He.call(this,R)),this;fe.call(this,ue);const T={...ue,type:(0,u.getJSONTypes)(ue.type),schemaType:(0,u.getJSONTypes)(ue.schemaType)};return(0,c.eachItem)(X,T.type.length===0?R=>He.call(this,R,T):R=>T.type.forEach(se=>He.call(this,R,T,se))),this}getKeyword(z){const ue=this.RULES.all[z];return typeof ue=="object"?ue.definition:!!ue}removeKeyword(z){const{RULES:ue}=this;delete ue.keywords[z],delete ue.all[z];for(const X of ue.rules){const T=X.rules.findIndex(R=>R.keyword===z);T>=0&&X.rules.splice(T,1)}return this}addFormat(z,ue){return typeof ue=="string"&&(ue=new RegExp(ue)),this.formats[z]=ue,this}errorsText(z=this.errors,{separator:ue=", ",dataVar:X="data"}={}){return!z||z.length===0?"No errors":z.map(T=>`${X}${T.instancePath} ${T.message}`).reduce((T,R)=>T+ue+R)}$dataMetaSchema(z,ue){const X=this.RULES.all;z=JSON.parse(JSON.stringify(z));for(const T of ue){const R=T.split("/").slice(1);let se=z;for(const Re of R)se=se[Re];for(const Re in X){const De=X[Re];if(typeof De!="object")continue;const{$data:it}=De.definition,et=se[Re];it&&et&&(se[Re]=Ne(et))}}return z}_removeAllSchemas(z,ue){for(const X in z){const T=z[X];(!ue||ue.test(X))&&(typeof T=="string"?delete z[X]:T&&!T.meta&&(this._cache.delete(T.schema),delete z[X]))}}_addSchema(z,ue,X,T=this.opts.validateSchema,R=this.opts.addUsedSchema){let se;const{schemaId:Re}=this.opts;if(typeof z=="object")se=z[Re];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof z!="boolean")throw new Error("schema must be object or boolean")}let De=this._cache.get(z);if(De!==void 0)return De;X=(0,l.normalizeId)(se||X);const it=l.getSchemaRefs.call(this,z,X);return De=new s.SchemaEnv({schema:z,schemaId:Re,meta:ue,baseId:X,localRefs:it}),this._cache.set(De.schema,De),R&&!X.startsWith("#")&&(X&&this._checkUnique(X),this.refs[X]=De),T&&this.validateSchema(z,!0),De}_checkUnique(z){if(this.schemas[z]||this.refs[z])throw new Error(`schema with key or id "${z}" already exists`)}_compileSchemaEnv(z){if(z.meta?this._compileMetaSchema(z):s.compileSchema.call(this,z),!z.validate)throw new Error("ajv implementation error");return z.validate}_compileMetaSchema(z){const ue=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,z)}finally{this.opts=ue}}}p.ValidationError=r.default,p.MissingRefError=o.default,e.default=p;function b(me,z,ue,X="error"){for(const T in me){const R=T;R in z&&this.logger[X](`${ue}: option ${T}. ${me[R]}`)}}function I(me){return me=(0,l.normalizeId)(me),this.schemas[me]||this.refs[me]}function D(){const me=this.opts.schemas;if(me)if(Array.isArray(me))this.addSchema(me);else for(const z in me)this.addSchema(me[z],z)}function K(){for(const me in this.opts.formats){const z=this.opts.formats[me];z&&this.addFormat(me,z)}}function G(me){if(Array.isArray(me)){this.addVocabulary(me);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const z in me){const ue=me[z];ue.keyword||(ue.keyword=z),this.addKeyword(ue)}}function Z(){const me={...this.opts};for(const z of _)delete me[z];return me}const be={log(){},warn(){},error(){}};function ce(me){if(me===!1)return be;if(me===void 0)return console;if(me.log&&me.warn&&me.error)return me;throw new Error("logger must implement log, warn and error methods")}const ge=/^[a-z_$][a-z0-9_$:-]*$/i;function de(me,z){const{RULES:ue}=this;if((0,c.eachItem)(me,X=>{if(ue.keywords[X])throw new Error(`Keyword ${X} is already defined`);if(!ge.test(X))throw new Error(`Keyword ${X} has invalid name`)}),!!z&&z.$data&&!("code"in z||"validate"in z))throw new Error('$data keyword must have "code" or "validate" function')}function He(me,z,ue){var X;const T=z==null?void 0:z.post;if(ue&&T)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:R}=this;let se=T?R.post:R.rules.find(({type:De})=>De===ue);if(se||(se={type:ue,rules:[]},R.rules.push(se)),R.keywords[me]=!0,!z)return;const Re={keyword:me,definition:{...z,type:(0,u.getJSONTypes)(z.type),schemaType:(0,u.getJSONTypes)(z.schemaType)}};z.before?Ce.call(this,se,Re,z.before):se.rules.push(Re),R.all[me]=Re,(X=z.implements)===null||X===void 0||X.forEach(De=>this.addKeyword(De))}function Ce(me,z,ue){const X=me.rules.findIndex(T=>T.keyword===ue);X>=0?me.rules.splice(X,0,z):(me.rules.push(z),this.logger.warn(`rule ${ue} is not defined`))}function fe(me){let{metaSchema:z}=me;z!==void 0&&(me.$data&&this.opts.$data&&(z=Ne(z)),me.validateSchema=this.compile(z,!0))}const he={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ne(me){return{anyOf:[me,he]}}})(Ny);var of={},af={},sf={};Object.defineProperty(sf,"__esModule",{value:!0});const Ok={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};sf.default=Ok;var _a={};Object.defineProperty(_a,"__esModule",{value:!0});_a.callRef=_a.getValidate=void 0;const Nk=ds,ym=yt,qn=bt,La=Qr,_m=Yn,Xi=Ve,Rk={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:n,it:r}=e,{baseId:o,schemaEnv:a,validateName:s,opts:i,self:l}=r,{root:u}=a;if((n==="#"||n==="#/")&&o===u.baseId)return d();const c=_m.resolveRef.call(l,u,o,n);if(c===void 0)throw new Nk.default(r.opts.uriResolver,o,n);if(c instanceof _m.SchemaEnv)return h(c);return m(c);function d(){if(a===u)return hl(e,s,a,a.$async);const _=t.scopeValue("root",{ref:u});return hl(e,(0,qn._)`${_}.validate`,u,u.$async)}function h(_){const v=A_(e,_);hl(e,v,_,_.$async)}function m(_){const v=t.scopeValue("schema",i.code.source===!0?{ref:_,code:(0,qn.stringify)(_)}:{ref:_}),w=t.name("valid"),A=e.subschema({schema:_,dataTypes:[],schemaPath:qn.nil,topSchemaRef:v,errSchemaPath:n},w);e.mergeEvaluated(A),e.ok(w)}}};function A_(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,qn._)`${n.scopeValue("wrapper",{ref:t})}.validate`}_a.getValidate=A_;function hl(e,t,n,r){const{gen:o,it:a}=e,{allErrors:s,schemaEnv:i,opts:l}=a,u=l.passContext?La.default.this:qn.nil;r?c():d();function c(){if(!i.$async)throw new Error("async schema referenced by sync schema");const _=o.let("valid");o.try(()=>{o.code((0,qn._)`await ${(0,ym.callValidateCode)(e,t,u)}`),m(t),s||o.assign(_,!0)},v=>{o.if((0,qn._)`!(${v} instanceof ${a.ValidationError})`,()=>o.throw(v)),h(v),s||o.assign(_,!1)}),e.ok(_)}function d(){e.result((0,ym.callValidateCode)(e,t,u),()=>m(t),()=>h(t))}function h(_){const v=(0,qn._)`${_}.errors`;o.assign(La.default.vErrors,(0,qn._)`${La.default.vErrors} === null ? ${v} : ${La.default.vErrors}.concat(${v})`),o.assign(La.default.errors,(0,qn._)`${La.default.vErrors}.length`)}function m(_){var v;if(!a.opts.unevaluated)return;const w=(v=n==null?void 0:n.validate)===null||v===void 0?void 0:v.evaluated;if(a.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(a.props=Xi.mergeEvaluated.props(o,w.props,a.props));else{const A=o.var("props",(0,qn._)`${_}.evaluated.props`);a.props=Xi.mergeEvaluated.props(o,A,a.props,qn.Name)}if(a.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(a.items=Xi.mergeEvaluated.items(o,w.items,a.items));else{const A=o.var("items",(0,qn._)`${_}.evaluated.items`);a.items=Xi.mergeEvaluated.items(o,A,a.items,qn.Name)}}}_a.callRef=hl;_a.default=Rk;Object.defineProperty(af,"__esModule",{value:!0});const Lk=sf,Dk=_a,Bk=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Lk.default,Dk.default];af.default=Bk;var lf={},cf={};Object.defineProperty(cf,"__esModule",{value:!0});const Fl=bt,xo=Fl.operators,jl={maximum:{okStr:"<=",ok:xo.LTE,fail:xo.GT},minimum:{okStr:">=",ok:xo.GTE,fail:xo.LT},exclusiveMaximum:{okStr:"<",ok:xo.LT,fail:xo.GTE},exclusiveMinimum:{okStr:">",ok:xo.GT,fail:xo.LTE}},Fk={message:({keyword:e,schemaCode:t})=>(0,Fl.str)`must be ${jl[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Fl._)`{comparison: ${jl[e].okStr}, limit: ${t}}`},jk={keyword:Object.keys(jl),type:"number",schemaType:"number",$data:!0,error:Fk,code(e){const{keyword:t,data:n,schemaCode:r}=e;e.fail$data((0,Fl._)`${n} ${jl[t].fail} ${r} || isNaN(${n})`)}};cf.default=jk;var uf={};Object.defineProperty(uf,"__esModule",{value:!0});const qs=bt,Vk={message:({schemaCode:e})=>(0,qs.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,qs._)`{multipleOf: ${e}}`},Uk={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Vk,code(e){const{gen:t,data:n,schemaCode:r,it:o}=e,a=o.opts.multipleOfPrecision,s=t.let("res"),i=a?(0,qs._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,qs._)`${s} !== parseInt(${s})`;e.fail$data((0,qs._)`(${r} === 0 || (${s} = ${n}/${r}, ${i}))`)}};uf.default=Uk;var df={},ff={};Object.defineProperty(ff,"__esModule",{value:!0});function C_(e){const t=e.length;let n=0,r=0,o;for(;r<t;)n++,o=e.charCodeAt(r++),o>=55296&&o<=56319&&r<t&&(o=e.charCodeAt(r),(o&64512)===56320&&r++);return n}ff.default=C_;C_.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(df,"__esModule",{value:!0});const ia=bt,Hk=Ve,zk=ff,Kk={message({keyword:e,schemaCode:t}){const n=e==="maxLength"?"more":"fewer";return(0,ia.str)`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>(0,ia._)`{limit: ${e}}`},Wk={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Kk,code(e){const{keyword:t,data:n,schemaCode:r,it:o}=e,a=t==="maxLength"?ia.operators.GT:ia.operators.LT,s=o.opts.unicode===!1?(0,ia._)`${n}.length`:(0,ia._)`${(0,Hk.useFunc)(e.gen,zk.default)}(${n})`;e.fail$data((0,ia._)`${s} ${a} ${r}`)}};df.default=Wk;var pf={};Object.defineProperty(pf,"__esModule",{value:!0});const qk=yt,Vl=bt,Gk={message:({schemaCode:e})=>(0,Vl.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Vl._)`{pattern: ${e}}`},Jk={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Gk,code(e){const{data:t,$data:n,schema:r,schemaCode:o,it:a}=e,s=a.opts.unicodeRegExp?"u":"",i=n?(0,Vl._)`(new RegExp(${o}, ${s}))`:(0,qk.usePattern)(e,r);e.fail$data((0,Vl._)`!${i}.test(${t})`)}};pf.default=Jk;var hf={};Object.defineProperty(hf,"__esModule",{value:!0});const Gs=bt,Yk={message({keyword:e,schemaCode:t}){const n=e==="maxProperties"?"more":"fewer";return(0,Gs.str)`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>(0,Gs._)`{limit: ${e}}`},Xk={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Yk,code(e){const{keyword:t,data:n,schemaCode:r}=e,o=t==="maxProperties"?Gs.operators.GT:Gs.operators.LT;e.fail$data((0,Gs._)`Object.keys(${n}).length ${o} ${r}`)}};hf.default=Xk;var mf={};Object.defineProperty(mf,"__esModule",{value:!0});const Ps=yt,Js=bt,Qk=Ve,Zk={message:({params:{missingProperty:e}})=>(0,Js.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Js._)`{missingProperty: ${e}}`},ex={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Zk,code(e){const{gen:t,schema:n,schemaCode:r,data:o,$data:a,it:s}=e,{opts:i}=s;if(!a&&n.length===0)return;const l=n.length>=i.loopRequired;if(s.allErrors?u():c(),i.strictRequired){const m=e.parentSchema.properties,{definedProperties:_}=e.it;for(const v of n)if((m==null?void 0:m[v])===void 0&&!_.has(v)){const w=s.schemaEnv.baseId+s.errSchemaPath,A=`required property "${v}" is not defined at "${w}" (strictRequired)`;(0,Qk.checkStrictMode)(s,A,s.opts.strictRequired)}}function u(){if(l||a)e.block$data(Js.nil,d);else for(const m of n)(0,Ps.checkReportMissingProp)(e,m)}function c(){const m=t.let("missing");if(l||a){const _=t.let("valid",!0);e.block$data(_,()=>h(m,_)),e.ok(_)}else t.if((0,Ps.checkMissingProp)(e,n,m)),(0,Ps.reportMissingProp)(e,m),t.else()}function d(){t.forOf("prop",r,m=>{e.setParams({missingProperty:m}),t.if((0,Ps.noPropertyInData)(t,o,m,i.ownProperties),()=>e.error())})}function h(m,_){e.setParams({missingProperty:m}),t.forOf(m,r,()=>{t.assign(_,(0,Ps.propertyInData)(t,o,m,i.ownProperties)),t.if((0,Js.not)(_),()=>{e.error(),t.break()})},Js.nil)}}};mf.default=ex;var vf={};Object.defineProperty(vf,"__esModule",{value:!0});const Ys=bt,tx={message({keyword:e,schemaCode:t}){const n=e==="maxItems"?"more":"fewer";return(0,Ys.str)`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>(0,Ys._)`{limit: ${e}}`},nx={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:tx,code(e){const{keyword:t,data:n,schemaCode:r}=e,o=t==="maxItems"?Ys.operators.GT:Ys.operators.LT;e.fail$data((0,Ys._)`${n}.length ${o} ${r}`)}};vf.default=nx;var gf={},bi={};Object.defineProperty(bi,"__esModule",{value:!0});const $_=Yy;$_.code='require("ajv/dist/runtime/equal").default';bi.default=$_;Object.defineProperty(gf,"__esModule",{value:!0});const bu=pn,Sn=bt,rx=Ve,ox=bi,ax={message:({params:{i:e,j:t}})=>(0,Sn.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Sn._)`{i: ${e}, j: ${t}}`},sx={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:ax,code(e){const{gen:t,data:n,$data:r,schema:o,parentSchema:a,schemaCode:s,it:i}=e;if(!r&&!o)return;const l=t.let("valid"),u=a.items?(0,bu.getSchemaTypes)(a.items):[];e.block$data(l,c,(0,Sn._)`${s} === false`),e.ok(l);function c(){const _=t.let("i",(0,Sn._)`${n}.length`),v=t.let("j");e.setParams({i:_,j:v}),t.assign(l,!0),t.if((0,Sn._)`${_} > 1`,()=>(d()?h:m)(_,v))}function d(){return u.length>0&&!u.some(_=>_==="object"||_==="array")}function h(_,v){const w=t.name("item"),A=(0,bu.checkDataTypes)(u,w,i.opts.strictNumbers,bu.DataType.Wrong),C=t.const("indices",(0,Sn._)`{}`);t.for((0,Sn._)`;${_}--;`,()=>{t.let(w,(0,Sn._)`${n}[${_}]`),t.if(A,(0,Sn._)`continue`),u.length>1&&t.if((0,Sn._)`typeof ${w} == "string"`,(0,Sn._)`${w} += "_"`),t.if((0,Sn._)`typeof ${C}[${w}] == "number"`,()=>{t.assign(v,(0,Sn._)`${C}[${w}]`),e.error(),t.assign(l,!1).break()}).code((0,Sn._)`${C}[${w}] = ${_}`)})}function m(_,v){const w=(0,rx.useFunc)(t,ox.default),A=t.name("outer");t.label(A).for((0,Sn._)`;${_}--;`,()=>t.for((0,Sn._)`${v} = ${_}; ${v}--;`,()=>t.if((0,Sn._)`${w}(${n}[${_}], ${n}[${v}])`,()=>{e.error(),t.assign(l,!1).break(A)})))}}};gf.default=sx;var yf={};Object.defineProperty(yf,"__esModule",{value:!0});const rd=bt,ix=Ve,lx=bi,cx={message:"must be equal to constant",params:({schemaCode:e})=>(0,rd._)`{allowedValue: ${e}}`},ux={keyword:"const",$data:!0,error:cx,code(e){const{gen:t,data:n,$data:r,schemaCode:o,schema:a}=e;r||a&&typeof a=="object"?e.fail$data((0,rd._)`!${(0,ix.useFunc)(t,lx.default)}(${n}, ${o})`):e.fail((0,rd._)`${a} !== ${n}`)}};yf.default=ux;var _f={};Object.defineProperty(_f,"__esModule",{value:!0});const Ds=bt,dx=Ve,fx=bi,px={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Ds._)`{allowedValues: ${e}}`},hx={keyword:"enum",schemaType:"array",$data:!0,error:px,code(e){const{gen:t,data:n,$data:r,schema:o,schemaCode:a,it:s}=e;if(!r&&o.length===0)throw new Error("enum must have non-empty array");const i=o.length>=s.opts.loopEnum;let l;const u=()=>l??(l=(0,dx.useFunc)(t,fx.default));let c;if(i||r)c=t.let("valid"),e.block$data(c,d);else{if(!Array.isArray(o))throw new Error("ajv implementation error");const m=t.const("vSchema",a);c=(0,Ds.or)(...o.map((_,v)=>h(m,v)))}e.pass(c);function d(){t.assign(c,!1),t.forOf("v",a,m=>t.if((0,Ds._)`${u()}(${n}, ${m})`,()=>t.assign(c,!0).break()))}function h(m,_){const v=o[_];return typeof v=="object"&&v!==null?(0,Ds._)`${u()}(${n}, ${m}[${_}])`:(0,Ds._)`${n} === ${v}`}}};_f.default=hx;Object.defineProperty(lf,"__esModule",{value:!0});const mx=cf,vx=uf,gx=df,yx=pf,_x=hf,bx=mf,wx=vf,Ax=gf,Cx=yf,$x=_f,Sx=[mx.default,vx.default,gx.default,yx.default,_x.default,bx.default,wx.default,Ax.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Cx.default,$x.default];lf.default=Sx;var bf={},fs={};Object.defineProperty(fs,"__esModule",{value:!0});fs.validateAdditionalItems=void 0;const la=bt,od=Ve,Ix={message:({params:{len:e}})=>(0,la.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,la._)`{limit: ${e}}`},Ex={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Ix,code(e){const{parentSchema:t,it:n}=e,{items:r}=t;if(!Array.isArray(r)){(0,od.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}S_(e,r)}};function S_(e,t){const{gen:n,schema:r,data:o,keyword:a,it:s}=e;s.items=!0;const i=n.const("len",(0,la._)`${o}.length`);if(r===!1)e.setParams({len:t.length}),e.pass((0,la._)`${i} <= ${t.length}`);else if(typeof r=="object"&&!(0,od.alwaysValidSchema)(s,r)){const u=n.var("valid",(0,la._)`${i} <= ${t.length}`);n.if((0,la.not)(u),()=>l(u)),e.ok(u)}function l(u){n.forRange("i",t.length,i,c=>{e.subschema({keyword:a,dataProp:c,dataPropType:od.Type.Num},u),s.allErrors||n.if((0,la.not)(u),()=>n.break())})}}fs.validateAdditionalItems=S_;fs.default=Ex;var wf={},ps={};Object.defineProperty(ps,"__esModule",{value:!0});ps.validateTuple=void 0;const bm=bt,ml=Ve,Tx=yt,kx={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return I_(e,"additionalItems",t);n.items=!0,!(0,ml.alwaysValidSchema)(n,t)&&e.ok((0,Tx.validateArray)(e))}};function I_(e,t,n=e.schema){const{gen:r,parentSchema:o,data:a,keyword:s,it:i}=e;c(o),i.opts.unevaluated&&n.length&&i.items!==!0&&(i.items=ml.mergeEvaluated.items(r,n.length,i.items));const l=r.name("valid"),u=r.const("len",(0,bm._)`${a}.length`);n.forEach((d,h)=>{(0,ml.alwaysValidSchema)(i,d)||(r.if((0,bm._)`${u} > ${h}`,()=>e.subschema({keyword:s,schemaProp:h,dataProp:h},l)),e.ok(l))});function c(d){const{opts:h,errSchemaPath:m}=i,_=n.length,v=_===d.minItems&&(_===d.maxItems||d[t]===!1);if(h.strictTuples&&!v){const w=`"${s}" is ${_}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,ml.checkStrictMode)(i,w,h.strictTuples)}}}ps.validateTuple=I_;ps.default=kx;Object.defineProperty(wf,"__esModule",{value:!0});const xx=ps,Px={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,xx.validateTuple)(e,"items")};wf.default=Px;var Af={};Object.defineProperty(Af,"__esModule",{value:!0});const wm=bt,Mx=Ve,Ox=yt,Nx=fs,Rx={message:({params:{len:e}})=>(0,wm.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,wm._)`{limit: ${e}}`},Lx={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Rx,code(e){const{schema:t,parentSchema:n,it:r}=e,{prefixItems:o}=n;r.items=!0,!(0,Mx.alwaysValidSchema)(r,t)&&(o?(0,Nx.validateAdditionalItems)(e,o):e.ok((0,Ox.validateArray)(e)))}};Af.default=Lx;var Cf={};Object.defineProperty(Cf,"__esModule",{value:!0});const lr=bt,Qi=Ve,Dx={message:({params:{min:e,max:t}})=>t===void 0?(0,lr.str)`must contain at least ${e} valid item(s)`:(0,lr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,lr._)`{minContains: ${e}}`:(0,lr._)`{minContains: ${e}, maxContains: ${t}}`},Bx={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Dx,code(e){const{gen:t,schema:n,parentSchema:r,data:o,it:a}=e;let s,i;const{minContains:l,maxContains:u}=r;a.opts.next?(s=l===void 0?1:l,i=u):s=1;const c=t.const("len",(0,lr._)`${o}.length`);if(e.setParams({min:s,max:i}),i===void 0&&s===0){(0,Qi.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(i!==void 0&&s>i){(0,Qi.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Qi.alwaysValidSchema)(a,n)){let v=(0,lr._)`${c} >= ${s}`;i!==void 0&&(v=(0,lr._)`${v} && ${c} <= ${i}`),e.pass(v);return}a.items=!0;const d=t.name("valid");i===void 0&&s===1?m(d,()=>t.if(d,()=>t.break())):s===0?(t.let(d,!0),i!==void 0&&t.if((0,lr._)`${o}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,()=>e.reset());function h(){const v=t.name("_valid"),w=t.let("count",0);m(v,()=>t.if(v,()=>_(w)))}function m(v,w){t.forRange("i",0,c,A=>{e.subschema({keyword:"contains",dataProp:A,dataPropType:Qi.Type.Num,compositeRule:!0},v),w()})}function _(v){t.code((0,lr._)`${v}++`),i===void 0?t.if((0,lr._)`${v} >= ${s}`,()=>t.assign(d,!0).break()):(t.if((0,lr._)`${v} > ${i}`,()=>t.assign(d,!1).break()),s===1?t.assign(d,!0):t.if((0,lr._)`${v} >= ${s}`,()=>t.assign(d,!0)))}}};Cf.default=Bx;var E_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=bt,n=Ve,r=yt;e.error={message:({params:{property:l,depsCount:u,deps:c}})=>{const d=u===1?"property":"properties";return(0,t.str)`must have ${d} ${c} when property ${l} is present`},params:({params:{property:l,depsCount:u,deps:c,missingProperty:d}})=>(0,t._)`{property: ${l},
|
|
34
|
-
missingProperty: ${d},
|
|
35
|
-
depsCount: ${u},
|
|
36
|
-
deps: ${c}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(l){const[u,c]=a(l);s(l,u),i(l,c)}};function a({schema:l}){const u={},c={};for(const d in l){if(d==="__proto__")continue;const h=Array.isArray(l[d])?u:c;h[d]=l[d]}return[u,c]}function s(l,u=l.schema){const{gen:c,data:d,it:h}=l;if(Object.keys(u).length===0)return;const m=c.let("missing");for(const _ in u){const v=u[_];if(v.length===0)continue;const w=(0,r.propertyInData)(c,d,_,h.opts.ownProperties);l.setParams({property:_,depsCount:v.length,deps:v.join(", ")}),h.allErrors?c.if(w,()=>{for(const A of v)(0,r.checkReportMissingProp)(l,A)}):(c.if((0,t._)`${w} && (${(0,r.checkMissingProp)(l,v,m)})`),(0,r.reportMissingProp)(l,m),c.else())}}e.validatePropertyDeps=s;function i(l,u=l.schema){const{gen:c,data:d,keyword:h,it:m}=l,_=c.name("valid");for(const v in u)(0,n.alwaysValidSchema)(m,u[v])||(c.if((0,r.propertyInData)(c,d,v,m.opts.ownProperties),()=>{const w=l.subschema({keyword:h,schemaProp:v},_);l.mergeValidEvaluated(w,_)},()=>c.var(_,!0)),l.ok(_))}e.validateSchemaDeps=i,e.default=o})(E_);var $f={};Object.defineProperty($f,"__esModule",{value:!0});const T_=bt,Fx=Ve,jx={message:"property name must be valid",params:({params:e})=>(0,T_._)`{propertyName: ${e.propertyName}}`},Vx={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:jx,code(e){const{gen:t,schema:n,data:r,it:o}=e;if((0,Fx.alwaysValidSchema)(o,n))return;const a=t.name("valid");t.forIn("key",r,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},a),t.if((0,T_.not)(a),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(a)}};$f.default=Vx;var yc={};Object.defineProperty(yc,"__esModule",{value:!0});const Zi=yt,Ar=bt,Ux=Qr,el=Ve,Hx={message:"must NOT have additional properties",params:({params:e})=>(0,Ar._)`{additionalProperty: ${e.additionalProperty}}`},zx={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Hx,code(e){const{gen:t,schema:n,parentSchema:r,data:o,errsCount:a,it:s}=e;if(!a)throw new Error("ajv implementation error");const{allErrors:i,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,el.alwaysValidSchema)(s,n))return;const u=(0,Zi.allSchemaProperties)(r.properties),c=(0,Zi.allSchemaProperties)(r.patternProperties);d(),e.ok((0,Ar._)`${a} === ${Ux.default.errors}`);function d(){t.forIn("key",o,w=>{!u.length&&!c.length?_(w):t.if(h(w),()=>_(w))})}function h(w){let A;if(u.length>8){const C=(0,el.schemaRefOrVal)(s,r.properties,"properties");A=(0,Zi.isOwnProperty)(t,C,w)}else u.length?A=(0,Ar.or)(...u.map(C=>(0,Ar._)`${w} === ${C}`)):A=Ar.nil;return c.length&&(A=(0,Ar.or)(A,...c.map(C=>(0,Ar._)`${(0,Zi.usePattern)(e,C)}.test(${w})`))),(0,Ar.not)(A)}function m(w){t.code((0,Ar._)`delete ${o}[${w}]`)}function _(w){if(l.removeAdditional==="all"||l.removeAdditional&&n===!1){m(w);return}if(n===!1){e.setParams({additionalProperty:w}),e.error(),i||t.break();return}if(typeof n=="object"&&!(0,el.alwaysValidSchema)(s,n)){const A=t.name("valid");l.removeAdditional==="failing"?(v(w,A,!1),t.if((0,Ar.not)(A),()=>{e.reset(),m(w)})):(v(w,A),i||t.if((0,Ar.not)(A),()=>t.break()))}}function v(w,A,C){const y={keyword:"additionalProperties",dataProp:w,dataPropType:el.Type.Str};C===!1&&Object.assign(y,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(y,A)}}};yc.default=zx;var Sf={};Object.defineProperty(Sf,"__esModule",{value:!0});const Kx=Tr,Am=yt,wu=Ve,Cm=yc,Wx={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:r,data:o,it:a}=e;a.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&Cm.default.code(new Kx.KeywordCxt(a,Cm.default,"additionalProperties"));const s=(0,Am.allSchemaProperties)(n);for(const d of s)a.definedProperties.add(d);a.opts.unevaluated&&s.length&&a.props!==!0&&(a.props=wu.mergeEvaluated.props(t,(0,wu.toHash)(s),a.props));const i=s.filter(d=>!(0,wu.alwaysValidSchema)(a,n[d]));if(i.length===0)return;const l=t.name("valid");for(const d of i)u(d)?c(d):(t.if((0,Am.propertyInData)(t,o,d,a.opts.ownProperties)),c(d),a.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(l);function u(d){return a.opts.useDefaults&&!a.compositeRule&&n[d].default!==void 0}function c(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};Sf.default=Wx;var If={};Object.defineProperty(If,"__esModule",{value:!0});const $m=yt,tl=bt,Sm=Ve,Im=Ve,qx={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:r,parentSchema:o,it:a}=e,{opts:s}=a,i=(0,$m.allSchemaProperties)(n),l=i.filter(v=>(0,Sm.alwaysValidSchema)(a,n[v]));if(i.length===0||l.length===i.length&&(!a.opts.unevaluated||a.props===!0))return;const u=s.strictSchema&&!s.allowMatchingProperties&&o.properties,c=t.name("valid");a.props!==!0&&!(a.props instanceof tl.Name)&&(a.props=(0,Im.evaluatedPropsToName)(t,a.props));const{props:d}=a;h();function h(){for(const v of i)u&&m(v),a.allErrors?_(v):(t.var(c,!0),_(v),t.if(c))}function m(v){for(const w in u)new RegExp(v).test(w)&&(0,Sm.checkStrictMode)(a,`property ${w} matches pattern ${v} (use allowMatchingProperties)`)}function _(v){t.forIn("key",r,w=>{t.if((0,tl._)`${(0,$m.usePattern)(e,v)}.test(${w})`,()=>{const A=l.includes(v);A||e.subschema({keyword:"patternProperties",schemaProp:v,dataProp:w,dataPropType:Im.Type.Str},c),a.opts.unevaluated&&d!==!0?t.assign((0,tl._)`${d}[${w}]`,!0):!A&&!a.allErrors&&t.if((0,tl.not)(c),()=>t.break())})})}}};If.default=qx;var Ef={};Object.defineProperty(Ef,"__esModule",{value:!0});const Gx=Ve,Jx={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:r}=e;if((0,Gx.alwaysValidSchema)(r,n)){e.fail();return}const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Ef.default=Jx;var Tf={};Object.defineProperty(Tf,"__esModule",{value:!0});const Yx=yt,Xx={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Yx.validateUnion,error:{message:"must match a schema in anyOf"}};Tf.default=Xx;var kf={};Object.defineProperty(kf,"__esModule",{value:!0});const vl=bt,Qx=Ve,Zx={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,vl._)`{passingSchemas: ${e.passing}}`},e2={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Zx,code(e){const{gen:t,schema:n,parentSchema:r,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(o.opts.discriminator&&r.discriminator)return;const a=n,s=t.let("valid",!1),i=t.let("passing",null),l=t.name("_valid");e.setParams({passing:i}),t.block(u),e.result(s,()=>e.reset(),()=>e.error(!0));function u(){a.forEach((c,d)=>{let h;(0,Qx.alwaysValidSchema)(o,c)?t.var(l,!0):h=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&t.if((0,vl._)`${l} && ${s}`).assign(s,!1).assign(i,(0,vl._)`[${i}, ${d}]`).else(),t.if(l,()=>{t.assign(s,!0),t.assign(i,d),h&&e.mergeEvaluated(h,vl.Name)})})}}};kf.default=e2;var xf={};Object.defineProperty(xf,"__esModule",{value:!0});const t2=Ve,n2={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const o=t.name("valid");n.forEach((a,s)=>{if((0,t2.alwaysValidSchema)(r,a))return;const i=e.subschema({keyword:"allOf",schemaProp:s},o);e.ok(o),e.mergeEvaluated(i)})}};xf.default=n2;var Pf={};Object.defineProperty(Pf,"__esModule",{value:!0});const Ul=bt,k_=Ve,r2={message:({params:e})=>(0,Ul.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Ul._)`{failingKeyword: ${e.ifClause}}`},o2={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:r2,code(e){const{gen:t,parentSchema:n,it:r}=e;n.then===void 0&&n.else===void 0&&(0,k_.checkStrictMode)(r,'"if" without "then" and "else" is ignored');const o=Em(r,"then"),a=Em(r,"else");if(!o&&!a)return;const s=t.let("valid",!0),i=t.name("_valid");if(l(),e.reset(),o&&a){const c=t.let("ifClause");e.setParams({ifClause:c}),t.if(i,u("then",c),u("else",c))}else o?t.if(i,u("then")):t.if((0,Ul.not)(i),u("else"));e.pass(s,()=>e.error(!0));function l(){const c=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},i);e.mergeEvaluated(c)}function u(c,d){return()=>{const h=e.subschema({keyword:c},i);t.assign(s,i),e.mergeValidEvaluated(h,s),d?t.assign(d,(0,Ul._)`${c}`):e.setParams({ifClause:c})}}}};function Em(e,t){const n=e.schema[t];return n!==void 0&&!(0,k_.alwaysValidSchema)(e,n)}Pf.default=o2;var Mf={};Object.defineProperty(Mf,"__esModule",{value:!0});const a2=Ve,s2={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){t.if===void 0&&(0,a2.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};Mf.default=s2;Object.defineProperty(bf,"__esModule",{value:!0});const i2=fs,l2=wf,c2=ps,u2=Af,d2=Cf,f2=E_,p2=$f,h2=yc,m2=Sf,v2=If,g2=Ef,y2=Tf,_2=kf,b2=xf,w2=Pf,A2=Mf;function C2(e=!1){const t=[g2.default,y2.default,_2.default,b2.default,w2.default,A2.default,p2.default,h2.default,f2.default,m2.default,v2.default];return e?t.push(l2.default,u2.default):t.push(i2.default,c2.default),t.push(d2.default),t}bf.default=C2;var Of={},Nf={};Object.defineProperty(Nf,"__esModule",{value:!0});const rn=bt,$2={message:({schemaCode:e})=>(0,rn.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,rn._)`{format: ${e}}`},S2={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:$2,code(e,t){const{gen:n,data:r,$data:o,schema:a,schemaCode:s,it:i}=e,{opts:l,errSchemaPath:u,schemaEnv:c,self:d}=i;if(!l.validateFormats)return;o?h():m();function h(){const _=n.scopeValue("formats",{ref:d.formats,code:l.code.formats}),v=n.const("fDef",(0,rn._)`${_}[${s}]`),w=n.let("fType"),A=n.let("format");n.if((0,rn._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>n.assign(w,(0,rn._)`${v}.type || "string"`).assign(A,(0,rn._)`${v}.validate`),()=>n.assign(w,(0,rn._)`"string"`).assign(A,v)),e.fail$data((0,rn.or)(C(),y()));function C(){return l.strictSchema===!1?rn.nil:(0,rn._)`${s} && !${A}`}function y(){const p=c.$async?(0,rn._)`(${v}.async ? await ${A}(${r}) : ${A}(${r}))`:(0,rn._)`${A}(${r})`,b=(0,rn._)`(typeof ${A} == "function" ? ${p} : ${A}.test(${r}))`;return(0,rn._)`${A} && ${A} !== true && ${w} === ${t} && !${b}`}}function m(){const _=d.formats[a];if(!_){C();return}if(_===!0)return;const[v,w,A]=y(_);v===t&&e.pass(p());function C(){if(l.strictSchema===!1){d.logger.warn(b());return}throw new Error(b());function b(){return`unknown format "${a}" ignored in schema at path "${u}"`}}function y(b){const I=b instanceof RegExp?(0,rn.regexpCode)(b):l.code.formats?(0,rn._)`${l.code.formats}${(0,rn.getProperty)(a)}`:void 0,D=n.scopeValue("formats",{key:a,ref:b,code:I});return typeof b=="object"&&!(b instanceof RegExp)?[b.type||"string",b.validate,(0,rn._)`${D}.validate`]:["string",b,D]}function p(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!c.$async)throw new Error("async format in sync schema");return(0,rn._)`await ${A}(${r})`}return typeof w=="function"?(0,rn._)`${A}(${r})`:(0,rn._)`${A}.test(${r})`}}}};Nf.default=S2;Object.defineProperty(Of,"__esModule",{value:!0});const I2=Nf,E2=[I2.default];Of.default=E2;var as={};Object.defineProperty(as,"__esModule",{value:!0});as.contentVocabulary=as.metadataVocabulary=void 0;as.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];as.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(of,"__esModule",{value:!0});const T2=af,k2=lf,x2=bf,P2=Of,Tm=as,M2=[T2.default,k2.default,(0,x2.default)(),P2.default,Tm.metadataVocabulary,Tm.contentVocabulary];of.default=M2;var Rf={},_c={};Object.defineProperty(_c,"__esModule",{value:!0});_c.DiscrError=void 0;var km;(function(e){e.Tag="tag",e.Mapping="mapping"})(km||(_c.DiscrError=km={}));Object.defineProperty(Rf,"__esModule",{value:!0});const Fa=bt,ad=_c,xm=Yn,O2=ds,N2=Ve,R2={message:({params:{discrError:e,tagName:t}})=>e===ad.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>(0,Fa._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`},L2={keyword:"discriminator",type:"object",schemaType:"object",error:R2,code(e){const{gen:t,data:n,schema:r,parentSchema:o,it:a}=e,{oneOf:s}=o;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");const i=r.propertyName;if(typeof i!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),u=t.const("tag",(0,Fa._)`${n}${(0,Fa.getProperty)(i)}`);t.if((0,Fa._)`typeof ${u} == "string"`,()=>c(),()=>e.error(!1,{discrError:ad.DiscrError.Tag,tag:u,tagName:i})),e.ok(l);function c(){const m=h();t.if(!1);for(const _ in m)t.elseIf((0,Fa._)`${u} === ${_}`),t.assign(l,d(m[_]));t.else(),e.error(!1,{discrError:ad.DiscrError.Mapping,tag:u,tagName:i}),t.endIf()}function d(m){const _=t.name("valid"),v=e.subschema({keyword:"oneOf",schemaProp:m},_);return e.mergeEvaluated(v,Fa.Name),_}function h(){var m;const _={},v=A(o);let w=!0;for(let p=0;p<s.length;p++){let b=s[p];if(b!=null&&b.$ref&&!(0,N2.schemaHasRulesButRef)(b,a.self.RULES)){const D=b.$ref;if(b=xm.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,D),b instanceof xm.SchemaEnv&&(b=b.schema),b===void 0)throw new O2.default(a.opts.uriResolver,a.baseId,D)}const I=(m=b==null?void 0:b.properties)===null||m===void 0?void 0:m[i];if(typeof I!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${i}"`);w=w&&(v||A(b)),C(I,p)}if(!w)throw new Error(`discriminator: "${i}" must be required`);return _;function A({required:p}){return Array.isArray(p)&&p.includes(i)}function C(p,b){if(p.const)y(p.const,b);else if(p.enum)for(const I of p.enum)y(I,b);else throw new Error(`discriminator: "properties/${i}" must have "const" or "enum"`)}function y(p,b){if(typeof p!="string"||p in _)throw new Error(`discriminator: "${i}" values must be unique strings`);_[p]=b}}}};Rf.default=L2;const D2="http://json-schema.org/draft-07/schema#",B2="http://json-schema.org/draft-07/schema#",F2="Core schema meta-schema",j2={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},V2=["object","boolean"],U2={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},H2={$schema:D2,$id:B2,title:F2,definitions:j2,type:V2,properties:U2,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=Ny,r=of,o=Rf,a=H2,s=["/properties"],i="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(_,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv=l,e.exports=t=l,e.exports.Ajv=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var u=Tr;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var c=bt;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var d=_i;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var h=ds;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})(Xu,Xu.exports);var z2=Xu.exports;const K2=Oy(z2);var W2=(e=>(e.WriterBlueprintKey="writer#blueprintKey",e.CssClassnames="cssClassnames",e.CssSize="cssSize",e.Uri="uri",e.Uuid="uuid",e))(W2||{});function Qn(e){return`https://dev.writer.com/framework/${encodeURIComponent(e)}.json`}function aF(e){return{$id:Qn(e.join(",")),type:"string",enum:e}}function Xs(e,t){return{$id:Qn(`between-${e}-${t}`),type:"number",minimum:e,maximum:t}}const q2={$id:Qn("cssClassname"),type:"string",format:"cssClassnames"},x_={$id:Qn("cssSize"),type:"string",format:"cssSize"},P_={$id:Qn("arrayOfString"),type:"array",items:{type:"string"}},Lf=Xs(-90,90),Df=Xs(-180,180),G2={$id:Qn("gpsMarker"),type:"object",properties:{name:{type:"string"},lat:Lf,lng:Df},required:["lat","lng","name"],additionalProperties:!1},M_={$id:Qn("gpsMarkers"),type:"array",items:G2},Wo={$id:Qn("objectRecordNotNested"),type:"object",patternProperties:{"^.*$":{type:["string","number","boolean"]}},additionalProperties:!0},J2={$id:Qn("anotatedText"),type:"array",items:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},Y2={$id:Qn("repeaterObject"),oneOf:[{type:"object",patternProperties:{"^.*$":{type:"object"}},additionalProperties:!0},{type:"array",items:{type:"object"}}]},X2={$id:Qn("chatBotMessage"),type:"object",properties:{role:{type:"string"},content:{type:"string"},tools:{type:"array",items:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0}}},required:["role"],additionalProperties:!0},Q2={$id:Qn("chatBotMessages"),type:"array",items:X2},Xn={$id:Qn("positiveNumber"),type:"number",minimum:0},O_={$id:Qn("uri"),type:"string",format:"uri"},gl=new K2({strict:!0,allowUnionTypes:!0});function sF(e){return(e==null?void 0:e.$id)===void 0?gl.compile(e):gl.getSchema(e.$id)||gl.compile(e)}const Z2={uri:{format:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,errorMessage:"must be a valid URL"},uuid:{format:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,errorMessage:"must be a valid UUID"},cssClassnames:{format:/(^\s*[a-zA-Z_][-\w]*(\s+[a-zA-Z_][-\w]*)*\s*$)|(^$)/,errorMessage:"must be a valid list of CSS classes separated by spaces"},cssSize:{format:/(^([+-]?\d*\.?\d+)(px|em|%|vh|vw|rem|pt|pc|in|cm|mm|ex|ch|vmin|vmax|fr)$)|(^$)/,errorMessage:"must be a valid CSS size"},"writer#blueprintKey":{format:{type:"string",validate:e=>{const t=te(ne.core);return t?t.getComponents().filter(r=>r.type==="blueprints_blueprint").map(r=>r.content.key).includes(e):!0}},errorMessage:"must correspond to an existing blueprint key"}};Object.entries(Z2).map(([e,t])=>gl.addFormat(e,t.format));const vn={name:"Accent",type:Y.Color,category:ze.Style,applyStyleVariable:!0},Qt={name:"Primary text",type:Y.Color,category:ze.Style,applyStyleVariable:!0},mr={name:"Secondary text",type:Y.Color,category:ze.Style,applyStyleVariable:!0},N_={name:"Emptiness",desc:"Page background color",type:Y.Color,category:ze.Style,applyStyleVariable:!0},bo={name:"Container background",type:Y.Color,category:ze.Style,applyStyleVariable:!0},hs={name:"Container shadow",type:Y.Shadow,category:ze.Style,applyStyleVariable:!0},cn={name:"Separator",type:Y.Color,category:ze.Style,applyStyleVariable:!0},Zr={name:"Button",type:Y.Color,category:ze.Style,applyStyleVariable:!0},eo={name:"Button text",type:Y.Color,category:ze.Style,applyStyleVariable:!0},Jo={name:"Button shadow",type:Y.Shadow,category:ze.Style,applyStyleVariable:!0},tt={name:"Custom CSS classes",type:Y.Text,category:ze.Style,desc:"CSS classes, separated by spaces. You can define classes in custom stylesheets.",validator:q2},eP={name:"Content width",type:Y.Width,default:"100%",category:ze.Style,desc:"Configure content width using CSS units, e.g. 100px, 50%, 10vw, etc.",validator:x_},ms={name:"Content alignment (H)",type:Y.HAlign,default:"unset",category:ze.Style},Bf={name:"Content alignment (V)",type:Y.VAlign,default:"unset",category:ze.Style},vs={name:"Padding",type:Y.Padding,default:"0",category:ze.Style},xt=Object.freeze({type:Y.Boolean,options:{yes:"Yes",no:"No"},validator:{type:"boolean"}}),R_={...xt,name:"Collapsible",default:"no",category:ze.Style},Ff={...xt,name:"Start collapsed",category:ze.Style,default:"no",desc:"Only applied when the component is collapsible."},tP=["aria-invalid"],nP={key:0,class:"material-symbols-outlined"},rP={key:1,class:"WdsTextInput__rightText"},oP=["aria-invalid"],aP=we({inheritAttrs:!1,__name:"WdsTextInput",props:Wr({leftIcon:{type:String,required:!1,default:void 0},invalid:{type:Boolean,required:!1},variant:{type:String,default:void 0},enableClearButton:{type:Boolean,required:!1},rightText:{type:String,required:!1,default:""}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const n=Yr(e,"modelValue"),r=e;t({focus:u,getSelection:l,value:n,setSelectionEnd:i,setSelectionStart:s});const o=ot("input"),a=H(()=>[r.leftIcon?"auto":void 0,"1fr",r.rightText?"auto":void 0,r.enableClearButton?"auto":void 0].filter(Boolean).join(" "));function s(c){o.value&&(o.value.selectionStart=c)}function i(c){o.value&&(o.value.selectionEnd=c)}function l(){var c,d;return{selectionStart:(c=o.value)==null?void 0:c.selectionStart,selectionEnd:(d=o.value)==null?void 0:d.selectionEnd}}function u(){var c;(c=o.value)==null||c.focus()}return(c,d)=>e.leftIcon||e.enableClearButton?(k(),L("div",qa({key:0,class:["WdsTextInput WdsTextInput--leftIcon colorTransformer",{"WdsTextInput--ghost":e.variant==="ghost"}]},c.$attrs,{"aria-invalid":e.invalid,style:{gridTemplateColumns:a.value},onClick:u}),[e.leftIcon?(k(),L("i",nP,Ee(e.leftIcon),1)):ve("",!0),Dn(F("input",qa({ref_key:"input",ref:o,"onUpdate:modelValue":d[0]||(d[0]=h=>n.value=h)},c.$attrs),null,16),[[Ml,n.value]]),e.rightText?(k(),L("p",rP,Ee(e.rightText),1)):ve("",!0),e.enableClearButton&&n.value?(k(),L("button",{key:2,class:"WdsTextInput__clearBtn",type:"button",onClick:d[1]||(d[1]=h=>n.value="")},d[3]||(d[3]=[F("i",{class:"material-symbols-outlined"},"close",-1)]))):ve("",!0)],16,tP)):Dn((k(),L("input",qa({key:1},c.$attrs,{ref_key:"input",ref:o,"onUpdate:modelValue":d[2]||(d[2]=h=>n.value=h),"aria-invalid":e.invalid,class:["WdsTextInput colorTransformer",{"WdsTextInput--ghost":e.variant==="ghost"}]}),null,16,oP)),[[Ml,n.value]])}}),L_=Ie(aP,[["__scopeId","data-v-9092817d"]]),sP={};function iP(e,t){return k(),L("button",null,[Vt(e.$slots,"default",{},void 0,!0)])}const $r=Ie(sP,[["render",iP],["__scopeId","data-v-75345289"]]);function lP(e){const t=En([]),n=Ae(!1),r=wn();async function o(){if(!n.value){for(n.value=!0;t.value.length;){const[s,...i]=t.value;try{await e(s)}catch(l){r.error("Error during handling job",s,l)}finally{t.value=i}}n.value=!1}}function a(s){if(t.value=[...t.value,s],!n.value)return o()}return{push:a,isBusy:In(n)}}function jf(e,t,n){function r(i){return i.type==="blueprints_uieventtrigger"&&i.content.refComponentId===O(t)&&i.content.refEventType===O(n)}const o=H(()=>[...new Set(a.value.map(l=>l.parentId))].map(l=>e.getComponentById(l)).filter(Boolean)),a=H(()=>e.getComponents("blueprints_root").flatMap(i=>e.getComponents(i.id).filter(r))),s=H(()=>a.value.length>0);return{blueprints:o,triggers:a,isLinked:s}}function cP(e,t,n,r){const o=t.at(-1).componentId,a=H(()=>e.getComponentById(o)),{push:s,isBusy:i}=lP(l);async function l(_){switch(_.eventType){case"wf-dataframe-add":await u(..._.payload);break;case"wf-dataframe-update":await d(..._.payload);break;case"wf-dataframe-action":await c(..._.payload);break}}async function u(){const _="wf-dataframe-add",v=r.value.numRows(),w=await en(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([2,3]),import.meta.url),A=w.escape(b=>b[ur]===v),C=r.value.filter(A).object();if(!C)throw Error("Could not find record");const y=fP(C),p=w.from([y]);if(r.value=r.value.concat(p).derive({[ur]:()=>w.op.row_number()}),!!h(_))return new Promise(b=>{const I=new CustomEvent(_,{detail:{payload:{record:y,record_index:v},callback:b}});m(I)})}async function c(_,v){const w="wf-dataframe-action";if(!r.value)throw Error("Table is not ready");if(!h(w))return;const A=v-1;return new Promise(C=>{const y=new CustomEvent(w,{detail:{payload:{action:_,record_index:A},callback:C}});m(y)})}async function d(_,v,w){if(!r.value)throw Error("Table is not ready");if(v===void 0)throw Error("Must specify the index to update a row");const A="wf-dataframe-update",C=v-1,y=await en(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([2,3]),import.meta.url),p=y.escape(Z=>Z[ur]===v),b=r.value.filter(p).object();if(!b)throw Error("Could not find record");const I=b[_],D=uP(I,w),K=y.escape(Z=>Z[ur]===v?D:Z[_]);if(r.value=r.value.derive({[_]:K}),!h(A))return;const G=dP(r.value.filter(p).object());return new Promise(Z=>{const be=new CustomEvent(A,{detail:{payload:{record:G,record_index:C},callback:Z}});m(be)})}function h(_){var C,y;const v=(C=a.value.handlers)==null?void 0:C[_],w=((y=a.value.binding)==null?void 0:y.eventType)==_,A=jf(e,o,_).isLinked.value;return!!(v||w||A)}function m(_){n.value instanceof HTMLElement?n.value.dispatchEvent(_):n.value.$el.dispatchEvent(_)}return{isBusy:i,handleUpdateCell:(..._)=>s({eventType:"wf-dataframe-update",payload:_}),handleAddRow:(..._)=>s({eventType:"wf-dataframe-add",payload:_}),handleActionRow:(..._)=>s({eventType:"wf-dataframe-action",payload:_})}}function uP(e,t){switch(typeof e){case"number":return Number(t);case"string":return String(t);case"boolean":return!!t;case"bigint":return BigInt(String(t));default:throw Error(`Could not update a field of type ${typeof e}`)}}function D_(e){return e===ur||by.test(e)}function dP(e){return Object.entries(e).filter(([t])=>!D_(t)).reduce((t,[n,r])=>(t[n]=r,t),{})}function fP(e){return Object.entries(e).filter(([t])=>!D_(t)).reduce((t,[n,r])=>(t[n]=pP(r),t),{})}function pP(e){switch(typeof e){case"number":return 0;case"string":return"";case"boolean":return!1;case"bigint":return BigInt(0);case"object":return{};default:throw Error(`Could not get default value a field of type ${typeof e}`)}}const hP=["disabled"],mP={key:0,class:"WdsButton__loader"},vP=we({__name:"WdsButton",props:{variant:{type:String,default:"primary"},size:{type:String,default:"big"},customSize:{type:String,required:!1,default:void 0},loading:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1}},setup(e){const t=pa(()=>en(()=>import("./WdsLoaderDots-qdyk2N-2.js"),[],import.meta.url)),n=e,r=H(()=>{if(n.customSize)return{width:n.customSize,height:n.customSize}}),o=H(()=>["WdsButton",`WdsButton--${n.variant}`,n.customSize?void 0:`WdsButton--${n.size}`]);return(a,s)=>(k(),L("button",{class:ut(["WdsButton colorTransformer",o.value]),type:"button",style:_t(r.value),disabled:e.disabled||e.loading},[e.loading?(k(),L("div",mP,[Le(O(t),{color:"white",size:24})])):ve("",!0),Vt(a.$slots,"default",{},void 0,!0)],14,hP))}}),Rn=Ie(vP,[["__scopeId","data-v-99140b1b"]]);var $t=(e=>(e.White="#ffffff",e.Black="#000000",e.Blue1="#f3f5ff",e.Blue2="#e4e9ff",e.Blue3="#bfcbff",e.Blue4="#6985ff",e.Blue5="#5551ff",e.Blue6="#4a46da",e.Gray0="#fbfbfd",e.Gray1="#f5f5f9",e.Gray2="#e4e7ed",e.Gray3="#d2d4d7",e.Gray4="#828282",e.Gray5="#4f4f4f",e.Gray6="#333333",e.Purple1="#f6effd",e.Purple2="#ede2ff",e.Purple3="#d4b2f7",e.Purple4="#a95ef8",e.Purple5="#721cc9",e.Orange1="#fff4f1",e.Orange2="#ffcfc2",e.Orange4="#ff8866",e.Orange5="#ff643c",e.Green1="#f2fffb",e.Green2="#d4fff2",e.Green3="#a9f9e1",e.Green5="#3bdcab",e.Green6="#078660",e))($t||{}),B_=(e=>(e.Box="0px 2px 0px 0px #f3f3f3",e.Menu="0px 1px 8px 0px #bfcbff40",e.Large="0px 3px 40px 0px #acb9dc66",e))(B_||{});const iF=Object.freeze(Object.fromEntries([...Object.entries($t).map(([e,t])=>[`--wdsColor${e}`,t]),...Object.entries(B_).map(([e,t])=>[`--wdsShadow${e}`,t])])),gP=["aria-busy"],yP={key:0},_P={class:"CoreDataframe__table__row CoreDataframe__table__row--head"},bP={key:0,"data-writer-grid-col":"0",class:"CoreDataframe__table__th CoreDataframe__table__th--index"},wP=["data-writer-grid-col"],AP=["onClick"],CP={key:0,class:"CoreDataframe__table__th__icon material-symbols-outlined"},$P={key:1,class:"CoreDataframe__table__th CoreDataframe__table__th--stickyRight"},SP={key:0,class:"CoreDataframe__newRow"},IP="A component to display Pandas DataFrames.",EP=`
|
|
37
|
-
# Subscribe this event handler to the \`wf-dataframe-update\` event
|
|
38
|
-
#
|
|
39
|
-
# more on : https://dev.writer.com/framework/dataframe
|
|
40
|
-
def on_record_change(state, payload):
|
|
41
|
-
state['mydf'].record_update(payload) # should contain an EditableDataFrame instance`,TP=`
|
|
42
|
-
# Subscribe this event handler to the \`wf-dataframe-add\` event
|
|
43
|
-
#
|
|
44
|
-
# more on : https://dev.writer.com/framework/dataframe
|
|
45
|
-
def on_record_add(state, payload):
|
|
46
|
-
payload['record']['sales'] = 0 # default value inside the dataframe
|
|
47
|
-
state['mydf'].record_add(payload) # should contain an EditableDataFrame instance`,kP=`
|
|
48
|
-
# Subscribe this event handler to the \`wf-dataframe-action\` event
|
|
49
|
-
#
|
|
50
|
-
# more on : https://dev.writer.com/framework/dataframe
|
|
51
|
-
def on_record_action(state, payload):
|
|
52
|
-
# state['mydf'] should contains an EditableDataFrame instance
|
|
53
|
-
record_index = payload['record_index']
|
|
54
|
-
if payload['action'] == 'remove':
|
|
55
|
-
state['mydf'].record_remove(payload) # should contain an EditableDataFrame instance
|
|
56
|
-
if payload['action'] == 'open':
|
|
57
|
-
state['record'] = state['mydf'].record(record_index) # dict representation of record`,xP={writer:{name:"DataFrame",description:IP,category:"Content",events:{"wf-dataframe-add":{desc:"Capture adding a row.",stub:TP.trim(),eventPayloadExample:{record:{col_a:"0n",col_b:"0n"},record_index:2}},"wf-dataframe-update":{desc:"Capture a cell change.",stub:EP.trim(),eventPayloadExample:{record:{col_a:"1n",col_b:"2n"},record_index:0}},"wf-dataframe-action":{desc:"Remove or open a row.",stub:kP.trim(),eventPayloadExample:{action:"open",record_index:0}}},fields:{dataframe:{name:"Data",desc:"Must be a state reference to a Pandas dataframe or PyArrow table. Alternatively, a URL for an Arrow IPC file.",type:Y.Text,default:dI},showIndex:{...xt,name:"Show index",desc:"Shows the dataframe's index. If an Arrow table is used, shows the zero-based integer index.",default:"yes"},enableSearch:{...xt,name:"Enable search",default:"no"},enableRecordAdd:{...xt,name:"Enable adding a record",default:"no"},enableRecordUpdate:{...xt,name:"Enable updating a record",default:"no"},enableDownload:{...xt,name:"Enable download",desc:"Allows the user to download the data as CSV.",default:"no"},actions:{name:"Actions",desc:"Define rows actions",type:Y.KeyValue,default:JSON.stringify({remove:"Remove",open:"Open"}),validator:Wo},useMarkdown:{...xt,name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no"},displayRowCount:{name:"Display row count",desc:"Specifies how many rows to show simultaneously.",type:Y.Number,category:ze.Style,default:"10",validator:Xn},wrapText:{...xt,name:"Wrap text",category:ze.Style,desc:"Not wrapping text allows for an uniform grid, but may be inconvenient if your data contains longer text fields.",default:"no"},primaryTextColor:Qt,secondaryTextColor:mr,accentColor:vn,separatorColor:cn,dataframeBackgroundColor:{name:"Background",type:Y.Color,category:ze.Style,default:$t.White,applyStyleVariable:!0},fontStyle:{name:"Font style",type:Y.Text,category:ze.Style,options:{normal:"normal",monospace:"monospace"},default:"normal"},cssClasses:tt}}},PP=we({...xP,__name:"CoreDataframe",setup(e){const a=te(ne.evaluatedFields),s=ot("rootEl"),i=ot("toolsEl"),l=ot("gridContainerEl");let u=null;const c=En(null),d=En([]),h=H(()=>a.showIndex.value=="yes"),m=H(()=>a.actions.value),_=En(null),v=Ae(0),w=Ae([]);let A=null;const C=te(ne.core),y=te(ne.instancePath),{handleUpdateCell:p,handleAddRow:b,handleActionRow:I,isBusy:D}=cP(C,y,s,c);async function K(){await b(),l.value.scrollTo({behavior:"smooth",top:48*de.value})}const G=H(()=>j.value||D.value),Z=H(()=>{var S;return c.value?(S=c.value)==null?void 0:S.columnNames():[]}),be=H(()=>Z.value.filter(S=>d.value.includes(S))),ce=H(()=>Z.value.filter(E=>{if(E===ur)return!1;const P=d.value.includes(E),W=by.test(E);return!(P&&W)})),ge=H(()=>(h.value?1:0)+ce.value.length),de=H(()=>{var S;return((S=c.value)==null?void 0:S.numRows())??0}),He=H(()=>de.value>1e3),Ce=H(()=>Math.min(a.displayRowCount.value,de.value)),fe=H(()=>Object.keys(a.actions.value||{}).length>0),he=H(()=>!!a.useMarkdown.value),Ne=H(()=>!!a.enableRecordUpdate.value),me=H(()=>!!a.enableRecordAdd.value),z=H(()=>!!a.wrapText.value),ue=H(()=>{let S;return z.value?S=de.value-1:S=de.value-Ce.value,Math.min(Math.ceil(v.value*S),S)}),X=H(()=>{if(!c.value)return null;const S=He.value?ue.value:0,E=He.value?Ce.value:1e3,P=c.value.objects({offset:S,limit:E}),W=c.value.indices().slice(S,ue.value+Ce.value);return{data:P,indices:W}}),T=H(()=>{let S="16px ";return w.value.length==0?(h.value&&(S+="75px "),S+=`repeat(${ce.value.length}, minmax(min-content, 1fr)) `):S+=w.value.map(E=>`${Math.max(E,80)}px `).join(" "),fe.value&&(S+="40px "),S}),R=H(()=>{const S=a.fontStyle.value,E=`${(1+a.displayRowCount.value)*48}px`;return{position:He.value?"sticky":"unset","min-height":"48px","max-height":E,"font-family":S=="monospace"?"monospace":void 0,"grid-template-rows":`48px repeat(${Ce.value}, min-content)`,"grid-template-columns":T.value}}),se=H(()=>({top:`${48*de.value}px`})),Re=Ae(!1);function De(){if(!(l.value.scrollWidth>l.value.clientWidth)){Re.value=!1;return}const E=l.value.scrollLeft+l.value.clientWidth>=l.value.scrollWidth;Re.value=!E}Ue(w,De);function it(){const S=l.value.scrollTop;v.value=S/(l.value.scrollHeight-l.value.clientHeight),De()}function et(){l.value.scrollTop=0}async function dt(){var P;w.value=[],await ar();const S=(P=l.value)==null?void 0:P.querySelectorAll("[data-writer-grid-col]"),E=[];S==null||S.forEach(W=>{const re=W,ie=re.dataset.writerGridCol,{width:Pe}=re.getBoundingClientRect(),Xe=Math.min(Pe,300);E[ie]=Xe}),w.value=E}function zt(S,E){var ie,Pe;if(S.target.classList.contains("widthAdjuster"))return;if(((ie=_.value)==null?void 0:ie.columnName)!==E){_.value={columnName:E,descending:!1};return}if((Pe=_.value)==null?void 0:Pe.descending){_.value=null;return}_.value={columnName:E,descending:!_.value.descending}}function N(S){const E=S.schema.metadata.get("pandas");return E?JSON.parse(E).index_columns:[]}const j=Ae(!1);async function ae(){j.value=!0;const S=await en(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([2,3]),import.meta.url),{tableFromIPC:E}=await en(()=>import("./Arrow.dom-GBJpMYQS.js"),__vite__mapDeps([4,3]),import.meta.url);try{const P=HS(a.dataframe.value),W=zS(P),re=E(W);d.value=N(re),u=S.fromArrow(re),c.value=u.derive({[ur]:()=>S.op.row_number()})}catch(P){wn().error("Couldn't load dataframe from Arrow URL.",P)}finally{j.value=!1}}async function ye(){const S=await en(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([2,3]),import.meta.url),E=c.value.select(S.not(ur)).toCSV(),P=document.createElement("a"),W=new Blob([E],{type:"text/csv"}),re=URL.createObjectURL(W);P.href=re,P.download="data.csv",P.click(),URL.revokeObjectURL(re)}async function U(){const S=await en(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([2,3]),import.meta.url);if(_.value===null){c.value=c.value.unorder();return}let E;_.value.descending?E=S.desc(_.value.columnName):E=_.value.columnName,c.value=c.value.orderby(E)}async function J(S){const E=S.target.value;if(!E)c.value=u;else{const P=new RegExp(E,"i"),re="(d, $) => "+u.columnNames().map(Pe=>`aq.op.match(d.${Pe}, $.pattern) !== null`).join(" || "),ie=await en(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([2,3]),import.meta.url);c.value=u.params({pattern:P,filterS:re}).filter(re).derive({[ur]:()=>ie.op.row_number()})}await ar(),et()}async function x(S){if(S.buttons!==1){A=null;return}const E=S.target;if(!s.value.contains(E))return;if(A===null&&E.classList.contains("widthAdjuster")){const Pe=E.closest(".CoreDataframe__table__th");A=parseInt(Pe.dataset.writerGridCol)}else if(A===null)return;const P=l.value.querySelector(`[data-writer-grid-col="${A}"]`),{left:W}=P.getBoundingClientRect(),ie=S.clientX-W;w.value[A]=ie}return Ue(a.dataframe,()=>{ae()}),Ue(_,async()=>{await U()}),Ue(ge,()=>{dt()}),Ue(z,()=>{dt()}),ln(async()=>{await ae(),document.addEventListener("mousemove",x),i.value&&new ResizeObserver(dt).observe(i.value,{box:"border-box"})}),Nr(()=>{document.removeEventListener("mousemove",x)}),(S,E)=>{var P;return k(),L("div",{ref_key:"rootEl",ref:s,class:"CoreDataframe","aria-busy":G.value},[F("div",{ref_key:"toolsEl",ref:i,class:"tools"},[O(a).enableSearch.value==="yes"?(k(),L("div",yP,[Le(L_,{class:"search",placeholder:"Search","left-icon":"search",onChange:J})])):ve("",!0),O(a).enableDownload.value?(k(),Oe($r,{key:1,title:"Download",class:"download",onClick:ye},{default:Je(()=>E[0]||(E[0]=[F("i",{class:"material-symbols-outlined"},"download",-1)])),_:1})):ve("",!0)],512),F("div",{ref_key:"gridContainerEl",ref:l,class:"CoreDataframe__tableWrapper",onScroll:it},[F("div",{class:ut(["CoreDataframe__table",{scrolled:ue.value>0,wrapText:z.value}]),style:_t(R.value)},[F("div",_P,[E[3]||(E[3]=F("div",{class:"CoreDataframe__table__th CoreDataframeRow__spacer"},null,-1)),h.value?(k(),L("div",bP,E[1]||(E[1]=[F("span",{class:"widthAdjuster material-symbols-outlined"}," drag_indicator ",-1)]))):ve("",!0),(k(!0),L(We,null,Pt(ce.value,(W,re)=>{var ie,Pe;return k(),L("div",{key:W,"data-writer-grid-col":re+(h.value?1:0),class:"CoreDataframe__table__th"},[F("button",{type:"button",class:"CoreDataframe__table__th__name",onClick:Xe=>zt(Xe,W)},Ee(W),9,AP),((ie=_.value)==null?void 0:ie.columnName)==W?(k(),L("span",CP,Ee((Pe=_.value)!=null&&Pe.descending?"arrow_drop_up":"arrow_drop_down"),1)):ve("",!0),E[2]||(E[2]=F("span",{class:"widthAdjuster material-symbols-outlined"}," drag_indicator ",-1))],8,wP)}),128)),fe.value?(k(),L("div",$P)):ve("",!0)]),(k(!0),L(We,null,Pt((P=X.value)==null?void 0:P.data,(W,re)=>(k(),Oe(ZI,{key:re,class:"CoreDataframe__table__row",row:W,actions:m.value,"use-markdown":he.value,editable:Ne.value&&!G.value,columns:ce.value,"show-index":h.value,"index-text":X.value.indices[re]??be.value.map(ie=>W[ie]).join(", "),"display-shadow-on-sticky":Re.value,"wrap-text":z.value,onAction:O(I),onChange:O(p)},null,8,["row","actions","use-markdown","editable","columns","show-index","index-text","display-shadow-on-sticky","wrap-text","onAction","onChange"]))),128))],6),He.value?(k(),L("div",{key:0,class:"endpoint",style:_t(se.value)},null,4)):ve("",!0)],544),me.value?(k(),L("div",SP,[Le(Rn,{"aria-label":"Create a new row at the end",size:"small",variant:"tertiary",onClick:K},{default:Je(()=>E[4]||(E[4]=[F("i",{class:"material-symbols-outlined"},"add",-1),tn(" Add a row ")])),_:1})])):ve("",!0)],8,gP)}}}),MP=Ie(PP,[["__scopeId","data-v-ebda5f98"]]),OP={key:0},NP={key:1},RP={key:2},LP={key:3},DP="A text component used to display headings or titles in different sizes and styles.",BP={writer:{name:"Heading",description:DP,category:"Content",fields:{text:{name:"Text",default:"(No text)",init:"Heading Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:Y.Text},headingType:{name:"Heading type",default:"h3",options:{h1:"h1 (Big)",h2:"h2 (Normal)",h3:"h3 (Small)",h4:"h4 (Smallest)"},type:Y.Text,category:ze.Style},alignment:{name:"Alignment",default:"left",type:Y.Text,category:ze.Style,options:{left:"Left",center:"Center",right:"Right"}},primaryTextColor:Qt,cssClasses:tt},previewField:"text"}},FP=we({...BP,__name:"CoreHeading",setup(e){const t=te(ne.evaluatedFields);return(n,r)=>(k(),L("div",{class:"CoreHeading",style:_t({"text-align":O(t).alignment.value})},[O(t).headingType.value=="h1"?(k(),L("h1",OP,Ee(O(t).text.value),1)):O(t).headingType.value=="h3"?(k(),L("h3",NP,Ee(O(t).text.value),1)):O(t).headingType.value=="h4"?(k(),L("h4",RP,Ee(O(t).text.value),1)):(k(),L("h2",LP,Ee(O(t).text.value),1))],4))}}),jP=Ie(FP,[["__scopeId","data-v-a24181bd"]]),VP={class:"icon"},UP={writer:{name:"Icon",description:"A component to display an icon",category:"Content",fields:{icon:{name:"Icon",type:Y.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:ze.Style,default:"arrow_forward"},size:{name:"Icon size",type:Y.Number,desc:"Icon size in px",category:ze.Style,default:"14",validator:Xn},color:{name:"Icon color",type:Y.Color,category:ze.Style},cssClasses:tt},previewField:"icon"}},F_=we({...UP,__name:"CoreIcon",setup(e){const t=te(ne.evaluatedFields);return(n,r)=>(k(),L("div",VP,[O(t).icon.value?(k(),L("span",{key:0,class:"material-symbols-outlined",style:_t({fontSize:`${O(t).size.value}px`,color:O(t).color.value})},Ee(O(t).icon.value),5)):ve("",!0)]))}}),Pm=e=>{e.writer&&(e.writer.docs="Writer Framework uses Material Symbols to display icons. To include an icon, check https://fonts.google.com/icons, find the icon's id (such as `arrow_forward`) and it to your _Icon.")};typeof Pm=="function"&&Pm(F_);const HP=Ie(F_,[["__scopeId","data-v-983dfef2"]]);function wi(e){const t={ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-click",{detail:{payload:t}})}function zP(e){const t={key:e.key,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-keydown",{detail:{payload:t}})}const KP=["src","alt"],WP={key:0,class:"captionContainer"},qP="A component to display images.",GP=`
|
|
58
|
-
def click_handler(state):
|
|
59
|
-
|
|
60
|
-
# Increment counter when the image is clicked
|
|
61
|
-
|
|
62
|
-
state["counter"] += 1`,JP={writer:{name:"Image",description:qP,category:"Content",fields:{src:{name:"Source",default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQoAAAEKCAYAAADqyxvJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAemSURBVHgB7d3baltHGIZhJd5DW3pS2vu/tkKgEFragiXLjuvVkpOS5PMa6Z8ZWc8DPXPBJNGrpX82evfrh4/PG4BveL8BCIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiC43HN3PP/24ubyoafCnT8+bD7/9vur/+f67u80PL/9V+fjHX5vtdv/qn794+bP55eXPaJbfh8wTRYGHh7p/pO/fv/v3hbZG5e+zuLm+WvXzT0+fNo8v/1XZ7582HJdQFKj+h3p7c73q5/ePTy9PInUvzOuVoVhUxWsJ0FNhhM6VUBS43z1sKl1fXaz6+eXjyv6xMBSXF5t3L086a+weHjcVqp+ezpVQFFje0Srfwdc+USz2jzUvzM+WWKyxK3pB74SihFAU2e7mmlNst7VPObe36+JVFdOqJ5VzJxRFqucUaweIy5yi0tXl+gW0Y8fUfKKOUBTZla80rHth/jenqIvFVcOc4tgx3e89TVQRiiLVKw03DSsNu+Jl29Fzim3xEPmcCUWhh8LPy8uMYu07+EPx5/frho9Dx4yp/RN1hKJQ9WDtbuXqx26yjVeLY8Wr+qPVuROKQtVLklcN+ykqd0RerfzosThWTC2L1hKKQsuLoHJOcdewn6Lyc/wyp1g7ZD3WC9yyaC2hKFa5I7JlTlH9Of5y5TLpseYUdmTWEopi1Rud1r6DV68MrP19FofG1HyinlAUq55TrB0gVs8pWgaah8ZUJOoJRbFzOrm5WOYUa4eah8b0fmv/RDWhKHZOJzc/672f4vHRILOaUHRwLic3P2vbXt4eCise9YSigxlPbs42p2iNl0j0IRQdzHhy861c12ejVR9C0cHyaF35zrc86s+2n6Llur4W9k/0IRSdzDanmPG6vpaY+ujRh1B0MtvJzerr+lrmFGtjKhL9CEUnb/nk5pcsM4r1c4p1v8/esmg3QtFJjxum1qp+R14br7Ux3dpo1Y1QdFR9w9Sok5tfU31d34Ot290IRUdv9eTm11Tup1gi8fwSFvoQio6qT27e3bZ838dcx+BfO6ewLNqXUHQ04w1T1Z/zq67rs9GqL6Ho7K2d3EyqruuzNNqXUHQ228nN6uv6Wo7Bp49o5hP9CUVns600LGY7Bp+Gvo++6Kc7oejsLZ3cfK1jL9ve+6Kf7oRigLdycvO1bhq2l38rpr7opz+hGGDGk5uVc4pjHoP3RcRjCMUAM57crJxTtByD/9rQ1/6JMYRigOqTm7c3LRuvTuO6PvsnxhCKQba7ueYUM17X96WY2j8xhlAMUj2nuGm4CbtSy5zi/zE1nxhHKAY59ZOba10dYT/F3v6JYYRikFM+udli+Th06Jxia//EMEIxUPUNU1UnN1sd+sVA9k+MIxQDVQ/mqk5utjrkuj5fRDyWUAx0qic3Wx1yXZ9l0bGEYqDqk5t3DfspKucAh1zXZ1l0LKEYbLYbpma9rs+OzLGEYrDZlkmrVxZajsEvcwrzibGEYrDZTm5WzylaBpp//n2/YSyhGKx6P8V100rDbNf1eZoYTSgGqz652XLD1GzX9TGeUEzgVE5uHsvaY/CMJxQTmPHkZuWcouUYPGMJxQRmPLk523V9jOVvawLLnKJyLtByw9Rs1/UxllBMYrY5xWzX9TGWUExitpOb1df13Vj5OClCMYmZT25WWGYU5hSnw9/UJHrcMLVW9X4KTxWnQygmUn3D1LG/setQLec+GEMoJjLryc0qnihOh1BMpPrk5t1ty/d9zHUMnjGEYiIz3jBVvWv0zn6KkyAUk5nv5OZc1/UxhlBMZraTm9XX9TlJehqEYjIzrjTMdgye/oRiMtUnN2f7YqCFZdL5CcWEZju5Odt1ffT37tcPH583AN/giQKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKI/gE7SXVdY25ypwAAAABJRU5ErkJggg==",desc:"A valid URL. Alternatively, you can provide a state reference to a Matplotlib figure or a packed file.",type:Y.Text},caption:{name:"Caption",init:"Image Caption",desc:"Leave blank to hide.",type:Y.Text},maxWidth:{name:"Max width (px)",type:Y.Number,default:"-1",category:ze.Style},maxHeight:{name:"Max height (px)",type:Y.Number,default:"-1",category:ze.Style},secondaryTextColor:mr,cssClasses:tt},events:{"wf-click":{desc:"Capture single clicks.",stub:GP.trim()}},previewField:"caption"}},j_=we({...JP,__name:"CoreImage",setup(e){const t=ot("rootEl"),n=te(ne.core),r=te(ne.evaluatedFields),o=te(ne.componentId),a=H(()=>{var c;return{cursor:typeof((c=n.getComponentById(o).handlers)==null?void 0:c["wf-click"])<"u"?"pointer":"unset"}}),s=H(()=>{const l=r.maxWidth.value,u=r.maxHeight.value;return{"max-width":l!==-1?`${l}px`:void 0,"max-height":u!==-1?`${u}px`:void 0}});function i(l){const u=wi(l);t.value.dispatchEvent(u)}return(l,u)=>(k(),L("div",{ref_key:"rootEl",ref:t,class:"CoreImage",style:_t(a.value),onClick:i},[F("img",{src:O(r).src.value,alt:O(r).caption.value,draggable:"false",style:_t(s.value)},null,12,KP),O(r).caption.value||O(r).caption.value===0?(k(),L("div",WP,Ee(O(r).caption.value),1)):ve("",!0)],4))}}),Mm=e=>{e.writer&&(e.writer.docs=`Use your app's static folder to serve images directly. For example, \`static/my_image.png\`.
|
|
63
|
-
|
|
64
|
-
Alternatively, pass a Matplotlib figure via state.
|
|
65
|
-
|
|
66
|
-
\`state["my_fig"] = fig\` and then setting the _Image_ source to \`@{fig}\`
|
|
67
|
-
|
|
68
|
-
You can also use packed files or bytes:
|
|
69
|
-
|
|
70
|
-
\`state["img_b"] = wf.pack_bytes(img_bytes, "image/png")\`
|
|
71
|
-
|
|
72
|
-
\`state["img_f"] = wf.pack_file(img_file, "image/png")\``)};typeof Mm=="function"&&Mm(j_);const YP=Ie(j_,[["__scopeId","data-v-88b01ba2"]]),XP={},QP={class:"LoadingSymbol"};function ZP(e,t){return k(),L("div",QP,t[0]||(t[0]=[F("div",null,null,-1)]))}const V_=Ie(XP,[["render",ZP],["__scopeId","data-v-5a38f374"]]),eM={class:"BaseEmptiness"},tM={class:"content"},nM={class:"title"},rM={key:0,class:"message"},oM=we({__name:"BaseEmptiness",props:{componentId:{type:String,required:!0},message:{type:String,required:!1,default:void 0}},setup(e){const t=e,n=te(ne.core),r=H(()=>n.getComponentById(t.componentId)),o=H(()=>n.getComponentDefinition(r.value.type));return(a,s)=>(k(),L("div",eM,[F("div",tM,[F("div",nM,[F("h3",null,"Empty "+Ee(o.value.name),1)]),e.message?(k(),L("div",rM,Ee(e.message),1)):ve("",!0)])]))}}),Vf=Ie(oM,[["__scopeId","data-v-8c972dbe"]]),aM={key:0,class:"message"},sM="A component that displays a message in various styles, including success, error, warning, and informational.",iM={writer:{name:"Message",description:sM,category:"Content",fields:{message:{name:"Message",type:Y.Text,desc:"Prefix with '+' for a success message, with '-' for error, '!' for warning, '%' for loading. No prefix for info. Leave empty to hide."},successColor:{name:"Success",default:$t.Green3,type:Y.Color,category:ze.Style},errorColor:{name:"Error",default:$t.Orange2,type:Y.Color,category:ze.Style},warningColor:{name:"Warning",default:"#FFE999",type:Y.Color,category:ze.Style},infoColor:{name:"Info",default:$t.Blue2,type:Y.Color,category:ze.Style},loadingColor:{name:"Loading",default:$t.Blue2,type:Y.Color,category:ze.Style},primaryTextColor:Qt,cssClasses:tt},previewField:"name"}},U_=we({...iM,__name:"CoreMessage",setup(e){const t=te(ne.componentId),n=te(ne.evaluatedFields),r=te(ne.isBeingEdited),o=H(()=>{const i=n.message.value;if(!i)return"neutral";const l=i.charAt(0);return l=="+"?"success":l=="-"?"error":l=="!"?"warning":l=="%"?"loading":"info"}),a=H(()=>{const i=n.message.value;if(!i)return;const l=i.charAt(0);return l=="+"||l=="-"||l=="!"||l=="%"?i.substring(1).trim():i}),s=H(()=>({"--messageActiveSeverityColor":{error:n.errorColor.value,success:n.successColor.value,warning:n.warningColor.value,info:n.infoColor.value,loading:n.loadingColor.value}[o.value]}));return(i,l)=>a.value||O(r)?(k(),L("div",{key:0,class:ut(["CoreMessage",o.value]),style:_t(s.value)},[a.value?(k(),L("p",aM,[o.value=="loading"?(k(),Oe(V_,{key:0,class:"loadingSymbol"})):ve("",!0),F("span",null,Ee(a.value),1)])):(k(),Oe(Vf,{key:1,"component-id":O(t)},null,8,["component-id"]))],6)):ve("",!0)}}),Om=e=>{e.writer&&(e.writer.docs=`When working with operations that can succeed or fail, _Message_ can be useful. You can reserve a state element to be used for the outcome of the operation; empty messages aren't shown, so you can initialise it empty.
|
|
73
|
-
Then, assign a message when the operation is completed.
|
|
74
|
-
|
|
75
|
-
\`\`\`python
|
|
76
|
-
state["msg"] = ""
|
|
77
|
-
|
|
78
|
-
if is_ok:
|
|
79
|
-
state["msg"] = "+It worked!"
|
|
80
|
-
else:
|
|
81
|
-
state["msg"] = "-It failed"
|
|
82
|
-
\`\`\``)};typeof Om=="function"&&Om(U_);const lM=Ie(U_,[["__scopeId","data-v-5eb22d34"]]),cM={key:0,class:"name"},uM={key:1,class:"description"},dM={class:"value"},fM={key:2,class:"note"},pM="A component that prominently displays a metric value and associated information.",hM={writer:{name:"Metric",description:pM,category:"Content",fields:{name:{name:"Name",init:"Metric",type:Y.Text},metricValue:{name:"Value",default:"0",type:Y.Text,desc:"The main value to be displayed. It's not limited to numbers."},description:{name:"Description",type:Y.Text},note:{name:"Note",init:"+Pass",type:Y.Text,desc:"Prefix with '+' for a positive message, with '-' for a negative message."},primaryTextColor:Qt,secondaryTextColor:mr,positiveColor:{name:"Positive",default:$t.Green3,type:Y.Color,category:ze.Style},neutralColor:{name:"Neutral",default:"var(--separatorColor)",type:Y.Color,category:ze.Style},negativeColor:{name:"Negative",default:$t.Orange2,type:Y.Color,category:ze.Style},cssClasses:tt},previewField:"name"}},mM=we({...hM,__name:"CoreMetric",setup(e){const t=te(ne.evaluatedFields),n=H(()=>{const a=t.note.value;if(!a)return"neutral";const s=a.charAt(0);return s=="+"?"positive":s=="-"?"negative":"neutral"}),r=H(()=>{const a=t.note.value;if(!a)return;const s=a.charAt(0);return s=="+"||s=="-"?a.substring(1):a}),o=H(()=>({"--messageActiveSentimentColor":{positive:t.positiveColor.value,neutral:t.neutralColor.value,negative:t.negativeColor.value}[n.value]}));return(a,s)=>(k(),L("div",{class:"CoreMetric",style:_t(o.value)},[O(t).name.value?(k(),L("div",cM,Ee(O(t).name.value),1)):ve("",!0),O(t).description.value?(k(),L("div",uM,Ee(O(t).description.value),1)):ve("",!0),F("h2",dM,Ee(O(t).metricValue.value),1),r.value?(k(),L("div",fM,Ee(r.value),1)):ve("",!0)],4))}}),vM=Ie(mM,[["__scopeId","data-v-bc5826e1"]]),gM="A component that displays Plotly graphs.",yM={data:[{x:["a","b","c"],y:[22,25,29],type:"bar"}]},_M={writer:{name:"Plotly Graph",description:gM,category:"Content",fields:{spec:{name:"Graph specification",default:JSON.stringify(yM,null,2),desc:"Plotly graph specification. Pass it using state, e.g. @{fig}, or paste a JSON specification.",type:Y.Object},cssClasses:tt},events:{"plotly-click":{desc:"Sends a list with the clicked points.",eventPayloadExample:{curveNumber:0,pointNumber:2,x:"c",y:29,label:"c",xaxis:{anchor:"y"},yaxis:{anchor:"x"}}},"plotly-selected":{desc:"Sends a list with the selected points."},"plotly-deselect":{desc:"Triggered when points are deselected."}}}},H_=we({..._M,__name:"CorePlotlyGraph",setup(e){const t=ot("rootEl"),n=ot("chartTargetEl"),r=te(ne.evaluatedFields),o=H(()=>r.spec.value),a={paper_bgcolor:$t.White,plot_bgcolor:$t.Gray1,colorway:[$t.Blue4,$t.Blue4,$t.Orange4,$t.Green5],font:{family:"Poppins, sans-serif",size:12,color:$t.Black},hoverlabel:{color:$t.White,bgcolor:$t.Black}},s=async()=>{var m,_,v;if(!o.value||!n.value)return;const d=await en(()=>import("./plotly.min-Dk-1ahEu.js").then(w=>w.p),[],import.meta.url);if(!t.value||t.value.clientHeight==0)return;const h={...o.value,layout:{...a,...(m=o.value)==null?void 0:m.layout}};d.newPlot(n.value,h),l(),(v=(_=o.value)==null?void 0:_.layout)!=null&&v.autosize&&i()};function i(){const d=t.value.parentElement;d!=null&&d.clientHeight&&(t.value.style.height="100%",n.value.style.height="100%")}function l(){n.value.on("plotly_click",c("plotly-click")),n.value.on("plotly_selected",c("plotly-selected")),n.value.on("plotly_deselect",c("plotly-deselect"))}function u(d){var h,m;return{curveNumber:d.curveNumber,pointNumber:d.pointNumber,pointNumbers:d.pointNumbers,x:d.x,y:d.y,z:d.z,label:d.label,lat:d.lat,lon:d.lon,xaxis:{anchor:(h=d.xaxis)==null?void 0:h.anchor},yaxis:{anchor:(m=d.yaxis)==null?void 0:m.anchor}}}function c(d){return h=>{var _;const m=new CustomEvent(d,{detail:{payload:(_=h==null?void 0:h.points)==null?void 0:_.map(v=>u(v))}});t.value.dispatchEvent(m)}}return Ue(o,d=>{d&&s()}),ln(async()=>{await s(),t.value&&new ResizeObserver(s).observe(t.value,{box:"border-box"})}),(d,h)=>(k(),L("div",{ref_key:"rootEl",ref:t,class:"CorePlotlyGraph"},[F("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512),h[0]||(h[0]=F("div",{class:"mask"},null,-1))],512))}}),Nm=e=>{e.writer&&(e.writer.docs=`You can listen to events triggered by Plotly.js and add interactivity to your charts.
|
|
83
|
-
For example, implement cross-filtering.`)};typeof Nm=="function"&&Nm(H_);const bM=Ie(H_,[["__scopeId","data-v-3de9c6e5"]]),wM=`
|
|
84
|
-
def click_handler(state):
|
|
85
|
-
|
|
86
|
-
# Increment counter when the text is clicked
|
|
87
|
-
|
|
88
|
-
state["counter"] += 1`,AM="A component to display plain text or formatted text using Markdown syntax.",CM={writer:{name:"Text",description:AM,category:"Content",fields:{text:{name:"Text",init:"Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:Y.Text,control:cc.Textarea},useMarkdown:{...xt,name:"Use Markdown",desc:"The Markdown output will be sanitised; unsafe elements will be removed.",default:"no"},alignment:{name:"Alignment",default:"left",type:Y.Text,options:{left:"Left",center:"Center",right:"Right"},category:ze.Style},primaryTextColor:Qt,cssClasses:tt},events:{"wf-click":{desc:"Capture single clicks.",stub:wM.trim()}},previewField:"text"}},$M=we({...CM,__name:"CoreText",setup(e){const t=ot("rootEl"),n=te(ne.evaluatedFields),r=te(ne.componentId),o=te(ne.core),a=te(ne.isBeingEdited),s=H(()=>!n.text.value),i=H(()=>!s.value||a.value),l=H(()=>{var m;return{cursor:typeof((m=o.getComponentById(r).handlers)==null?void 0:m["wf-click"])<"u"?"pointer":"unset"}}),u=H(()=>({"text-align":n.alignment.value}));function c(d){const h=wi(d);t.value.dispatchEvent(h)}return(d,h)=>i.value?(k(),L("div",{key:0,ref_key:"rootEl",ref:t,class:"CoreText",style:_t(l.value),onClick:c},[s.value?(k(),Oe(Vf,{key:0,"component-id":O(r)},null,8,["component-id"])):(k(),L(We,{key:1},[O(n).useMarkdown.value?(k(),Oe(yy,{key:0,"raw-text":O(n).text.value,style:_t(u.value)},null,8,["raw-text","style"])):(k(),L("p",{key:1,class:"plainText",style:_t(u.value)},Ee(O(n).text.value),5))],64))],4)):ve("",!0)}}),SM=Ie($M,[["__scopeId","data-v-d4e9274e"]]),z_="A component that displays Vega-Lite/Altair charts.",IM={$schema:"https://vega.github.io/schema/vega-lite/v5.json",description:z_,data:{values:[{a:"A",b:100},{a:"B",b:200},{a:"C",b:150},{a:"D",b:300}]},mark:"bar",encoding:{x:{field:"a",type:"nominal"},y:{field:"b",type:"quantitative"}}},EM={writer:{name:"Vega Lite Chart",description:z_,category:"Content",fields:{spec:{name:"Chart specification",default:JSON.stringify(IM,null,2),desc:"Vega-Lite chart specification. Pass a Vega Altair chart using state or paste a JSON specification.",type:Y.Object},cssClasses:tt}}},K_=we({...EM,__name:"CoreVegaLiteChart",setup(e){const t=ot("rootEl"),n=ot("chartTargetEl"),r=te(ne.evaluatedFields),o=async()=>{if(!r.spec.value||!n.value)return;const{default:a}=await en(()=>import("./vega-embed.module-SNP5iNdJ.js"),[],import.meta.url);await a(n.value,r.spec.value)};return Ue(()=>r.spec.value,a=>{a&&o()}),ln(()=>{o(),new ResizeObserver(o).observe(t.value,{box:"border-box"})}),(a,s)=>(k(),L("div",{ref_key:"rootEl",ref:t,class:"CoreVegaLiteChart"},[F("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512)],512))}}),Rm=e=>{e.writer&&(e.writer.docs=`Generate a chart using Altair and pass it via state; it'll be converted to Vega-Lite specification.
|
|
89
|
-
|
|
90
|
-
\`state["my_chart"] = chart\`
|
|
91
|
-
|
|
92
|
-
Afterwards, you can reference the chart in the specification using the syntax \`@{my_chart}\`.
|
|
93
|
-
|
|
94
|
-
Alternatively, you can work with Vega-Lite directly.`)};typeof Rm=="function"&&Rm(K_);const TM=Ie(K_,[["__scopeId","data-v-c7c1318d"]]),kM={class:"CoreVideoPlayer"},xM=["src","controls","autoplay","loop","muted"],PM="A video player component that can play various video formats.",MM={writer:{name:"Video Player",description:PM,category:"Content",fields:{src:{name:"Source",desc:"The URL of the video file. Alternatively, you can pass a file via state.",default:"",type:Y.Text,validator:O_},controls:{...xt,name:"Controls",desc:"Display video player controls.",default:"yes"},autoplay:{...xt,name:"Autoplay",desc:"Autoplay the video when the component is loaded.",default:"no"},loop:{...xt,name:"Loop",desc:"Loop the video when it reaches the end.",default:"no"},muted:{...xt,name:"Muted",desc:"Mute the video by default.",default:"no"},cssClasses:tt}}},W_=we({...MM,__name:"CoreVideoPlayer",setup(e){const t=te(ne.evaluatedFields);return(n,r)=>(k(),L("div",kM,[F("video",{src:O(t).src.value,controls:O(t).controls.value,autoplay:O(t).autoplay.value,loop:O(t).loop.value,muted:O(t).muted.value},null,8,xM),r[0]||(r[0]=F("div",{class:"mask"},null,-1))]))}}),Lm=e=>{e.writer&&(e.writer.docs=`Use your app's static folder to serve videos directly. For example, \`static/my_video.mp4\`.
|
|
95
|
-
|
|
96
|
-
Alternatively, you can pack bytes or files in state:
|
|
97
|
-
|
|
98
|
-
\`state["vid_b"] = wf.pack_bytes(vid_bytes, "video/mp4")\`
|
|
99
|
-
|
|
100
|
-
\`state["vid_f"] = wf.pack_file(vid_file, "video/mp4")\`
|
|
101
|
-
|
|
102
|
-
Afterwards, you can reference the video using the syntax \`@{vid_f}\`.`)};typeof Lm=="function"&&Lm(W_);const OM=Ie(W_,[["__scopeId","data-v-80b03e78"]]),NM={class:"CoreLink"},RM=["href","target","rel"],LM={writer:{name:"Link",description:"A component to create a hyperlink.",category:"Content",fields:{url:{name:"URL",type:Y.Text,default:"https://writer.com",desc:"Specify a URL or choose a page. Keep in mind that you can only link to pages for which a key has been specified.",options:e=>Object.fromEntries(e.getComponents("root",{sortedByPosition:!0}).map(t=>t.content.key).filter(t=>!!t).map(t=>[`#${t}`,`Page with key: ${t}`]))},target:{name:"Target",type:Y.Text,options:{_self:"Self",_blank:"Blank",_parent:"Parent",_top:"Top"},desc:"Specifies where to open the linked document.",default:"_self"},rel:{name:"Rel",type:Y.Text,desc:"Specifies the relationship between the current document and the linked document."},text:{name:"Text",default:"",type:Y.Text,desc:"The text to display in the link."},primaryTextColor:Qt,cssClasses:tt}}},DM=we({...LM,__name:"CoreLink",setup(e){const t=te(ne.evaluatedFields),n=H(()=>t.text.value||t.url.value);return(r,o)=>(k(),L("div",NM,[F("a",{href:O(t).url.value,target:O(t).target.value,rel:O(t).rel.value},Ee(n.value),9,RM)]))}}),BM=Ie(DM,[["__scopeId","data-v-f7f2507b"]]),FM={},jM={width:"15",height:"12",viewBox:"0 0 15 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function VM(e,t){return k(),L("svg",jM,t[0]||(t[0]=[F("path",{d:"M14.0712 4.50295C14.2882 4.72002 14.2882 5.07197 14.0712 5.28905L10.5337 8.8265C10.3166 9.04357 9.96468 9.04357 9.7476 8.8265C9.53052 8.60942 9.53052 8.25747 9.7476 8.0404L12.892 4.896L9.7476 1.7516C9.53052 1.53452 9.53052 1.18257 9.7476 0.965495C9.96467 0.74842 10.3166 0.74842 10.5337 0.965495L14.0712 4.50295ZM13.6781 5.45185L3.67268 5.45185L3.67268 4.34014L13.6781 4.34014L13.6781 5.45185ZM2.00511 7.11942L2.00511 8.23114L0.893394 8.23114L0.893394 7.11942L2.00511 7.11942ZM3.67268 9.89871L5.52553 9.89871L5.52553 11.0104L3.67268 11.0104L3.67268 9.89871ZM2.00511 8.23114C2.00511 9.15211 2.7517 9.89871 3.67268 9.89871L3.67268 11.0104C2.13772 11.0104 0.893394 9.76609 0.893394 8.23114L2.00511 8.23114ZM3.67268 5.45185C2.7517 5.45185 2.00511 6.19845 2.00511 7.11942L0.893394 7.11942C0.893394 5.58447 2.13772 4.34014 3.67268 4.34014L3.67268 5.45185Z",fill:"currentColor"},null,-1)]))}const UM=Ie(FM,[["render",VM]]),HM={class:"CoreChatbotAvatar"},zM=we({__name:"CoreChatbotAvatar",props:{initials:{type:String,required:!0}},setup(e){return(t,n)=>(k(),L("div",HM,Ee(e.initials),1))}}),KM=Ie(zM,[["__scopeId","data-v-ce5bb453"]]),WM=["aria-busy"],qM={key:1,class:"CoreChatbotMessage__content__text"},GM={key:2,class:"CoreChatbotMessage__content__actions"},JM=["onClick"],YM={key:0,class:"subheading"},XM={class:"name"},QM={key:1,class:"desc"},ZM=we({__name:"CoreChatbotMessage",props:{initials:{type:String,required:!0},useMarkdown:{type:Boolean,required:!1},message:{type:Object,required:!1,default:void 0},assistantRoleColor:{type:String,required:!1,default:""},isLoading:{type:Boolean,required:!1}},emits:{actionClick:e=>typeof e=="object"&&e!==null},setup(e){const t=pa(()=>en(()=>import("./BaseMarkdown-BH_nSq9H.js"),[],import.meta.url)),n=pa(()=>en(()=>import("./WdsLoaderDots-qdyk2N-2.js"),[],import.meta.url)),r=e,o=H(()=>{var u;return((u=r.message)==null?void 0:u.actions)??[]}),a=H(()=>r.isLoading&&!i.value),s=H(()=>{var u;return r.isLoading?"assistant":((u=r.message)==null?void 0:u.role)??""}),i=H(()=>{var u;return((u=r.message)==null?void 0:u.content.trim())??""}),l=H(()=>{switch(s.value){case"user":return"var(--userRoleColor)";case"assistant":return r.assistantRoleColor||"linear-gradient(264deg, #f5ebff 0.71%, #eef1ff 100%)";default:return""}});return(u,c)=>(k(),L("div",{class:"CoreChatbotMessage","aria-busy":e.isLoading},[Le(KM,{initials:e.initials},null,8,["initials"]),F("div",{class:"CoreChatbotMessage__content",style:_t({background:l.value})},[a.value?(k(),Oe(O(n),{key:0})):(k(),L("div",qM,[e.useMarkdown?(k(),Oe(O(t),{key:0,"raw-text":i.value},null,8,["raw-text"])):(k(),L(We,{key:1},[tn(Ee(i.value),1)],64))])),o.value.length?(k(),L("div",GM,[(k(!0),L(We,null,Pt(o.value,(d,h)=>(k(),L("button",{key:h,class:"action",onClick:m=>u.$emit("actionClick",d)},[d.subheading?(k(),L("div",YM,Ee(d.subheading),1)):ve("",!0),F("h3",XM,Ee(d.name),1),d.desc?(k(),L("div",QM,Ee(d.desc),1)):ve("",!0)],8,JM))),128))])):ve("",!0)],4)],8,WM))}}),Dm=Ie(ZM,[["__scopeId","data-v-502b71b2"]]),eO=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],tO=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],nO=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],rO=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Bm=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function Fm(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?rO:nO:t.binary?tO:eO,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,a=o?"-":t.signed?"+":"";o&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const c=Bm(e,t.locale,s);return a+c+r+n[0]}const i=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**i,s||(e=e.toPrecision(3));const l=Bm(Number(e),t.locale,s),u=n[i];return a+l+r+u}const oO={class:"filesArea"},aO={key:1,class:"list"},sO=["title"],iO={class:"size"},lO={class:"filesButtons"},cO={key:1,class:"sizeExceededMessage"},uO={class:"inputArea"},dO={class:"inputButtons"},Au=200*1024*1024,fO="A chatbot component to build human-to-AI interactions.",pO=`[
|
|
103
|
-
{
|
|
104
|
-
"role": "assistant",
|
|
105
|
-
"content": "How can I help you?"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"role": "user",
|
|
109
|
-
"content": "I'm building a Chatbot"
|
|
110
|
-
}
|
|
111
|
-
]`,hO=`
|
|
112
|
-
def handle_message_simple(payload, state):
|
|
113
|
-
|
|
114
|
-
# payload contains a dict in the form { "role": "user", "message": "hello"}
|
|
115
|
-
|
|
116
|
-
state["conversation"] += [payload]
|
|
117
|
-
state["conversation"] += [{
|
|
118
|
-
"role": "assistant",
|
|
119
|
-
"content": "Hello human" if payload == "Hello" else "I don't understand"
|
|
120
|
-
}]
|
|
121
|
-
|
|
122
|
-
# Handle streaming by appending to the last message
|
|
123
|
-
|
|
124
|
-
import time
|
|
125
|
-
for i in range(10):
|
|
126
|
-
conv = state["conversation"]
|
|
127
|
-
conv[-1]["content"] += f" {i}"
|
|
128
|
-
state["conversation"] = conv
|
|
129
|
-
time.sleep(0.5)
|
|
130
|
-
`.trim(),mO=`
|
|
131
|
-
def handle_action_simple(payload, state):
|
|
132
|
-
|
|
133
|
-
# payload contains the "data" property of the action
|
|
134
|
-
|
|
135
|
-
if payload == "change_title":
|
|
136
|
-
state["app_background_color"] = "red"
|
|
137
|
-
|
|
138
|
-
# Make an action available when adding a message
|
|
139
|
-
|
|
140
|
-
def handle_message_with_action(payload, state):
|
|
141
|
-
state["conversation"] += [payload]
|
|
142
|
-
state["conversation"] += [{
|
|
143
|
-
"role": "assistant",
|
|
144
|
-
"content": "I don't know, but check this out.",
|
|
145
|
-
"actions": [{
|
|
146
|
-
"subheading": "Resource",
|
|
147
|
-
"name": "Surprise",
|
|
148
|
-
"desc": "Click to be surprised",
|
|
149
|
-
"data": "change_title"
|
|
150
|
-
}]
|
|
151
|
-
}]
|
|
152
|
-
`.trim(),vO=`
|
|
153
|
-
def handle_file_upload(state, payload):
|
|
154
|
-
|
|
155
|
-
# An array of dictionaries is provided in the payload
|
|
156
|
-
# The dictionaries have the properties name, type and data
|
|
157
|
-
# The data property is a file-like object
|
|
158
|
-
|
|
159
|
-
uploaded_files = payload
|
|
160
|
-
for i, uploaded_file in enumerate(uploaded_files):
|
|
161
|
-
name = uploaded_file.get("name")
|
|
162
|
-
file_data = uploaded_file.get("data")
|
|
163
|
-
with open(f"{name}-{i}.jpeg", "wb") as file_handle:
|
|
164
|
-
file_handle.write(file_data)
|
|
165
|
-
`.trim(),gO={writer:{name:"Chatbot",description:fO,category:"Content",fields:{conversation:{name:"Conversation",init:pO,desc:"An array with messages or a writer.ai.Conversation object.",type:Y.Object,validator:Q2},assistantInitials:{name:"Assistant initials",default:"AI",type:Y.Text},userInitials:{name:"User initials",default:"YOU",type:Y.Text},useMarkdown:{...xt,name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no"},enableFileUpload:{name:"Enable file upload",default:"no",type:Y.Text,options:{single:"Single file",multiple:"Multiple files",no:"No"}},placeholder:{name:"Placeholder",default:"What do you need?",type:Y.Text},assistantRoleColor:{name:"Assistant role",type:Y.Color,category:ze.Style,applyStyleVariable:!0},userRoleColor:{name:"User role",default:$t.Gray1,type:Y.Color,category:ze.Style,applyStyleVariable:!0},avatarBackgroundColor:{name:"Avatar",default:$t.Gray6,type:Y.Color,category:ze.Style,applyStyleVariable:!0},avatarTextColor:{name:"Avatar text",default:$t.White,type:Y.Color,category:ze.Style,applyStyleVariable:!0},accentColor:vn,containerBackgroundColor:bo,primaryTextColor:Qt,secondaryTextColor:mr,separatorColor:cn,buttonColor:{...Zr,default:$t.Black},buttonTextColor:{...eo,default:$t.White},cssClasses:tt},events:{"wf-chatbot-message":{desc:"Triggered when the user sends a message.",stub:hO,eventPayloadExample:{role:"user",content:"I'm building a Chatbot"}},"wf-chatbot-action-click":{desc:"Handle clicks on actions.",stub:mO},"wf-file-change":{desc:"Triggered when files are uploaded",stub:vO}}}},q_=we({...gO,__name:"CoreChatbot",setup(e){const t=ot("rootEl"),n=ot("messageAreaEl"),r=ot("messagesEl"),o=Ae(void 0),a=te(ne.evaluatedFields),s=En([]),i=Ae(!1);let l;const u=H(()=>{var p;return((p=a.conversation)==null?void 0:p.value)??[]}),c=Ae(""),d=H(()=>{let p=0;return Array.from(s.value).forEach(b=>{p+=b.size}),p>=Au}),h=H(()=>o.value===void 0?!1:o.value>=u.value.length);function m(){if(o.value)return;o.value=u.value.length+1;const p=new CustomEvent("wf-chatbot-message",{detail:{payload:{role:"user",content:c.value},callback:()=>{o.value=void 0}}});t.value.dispatchEvent(p),c.value=""}function _(p){const{data:b}=p,I=new CustomEvent("wf-chatbot-action-click",{detail:{payload:b}});t.value.dispatchEvent(I)}function v(){const p=document.createElement("input");p.type="file",a.enableFileUpload.value=="multiple"&&(p.multiple=!0),p.addEventListener("change",()=>{let b;a.enableFileUpload.value=="multiple"?b=[...s.value]:b=[],Array.from(p.files).forEach(I=>{b.push(I)}),s.value=b}),p.dispatchEvent(new MouseEvent("click"))}function w(p){const b=s.value.toSpliced(p,1);s.value=b}function A(){n.value.scrollTo({top:n.value.scrollHeight,left:0})}const C=async p=>{const b=new FileReader;return b.readAsDataURL(p),new Promise((I,D)=>{b.onload=()=>I(b.result),b.onerror=()=>D(b.error)})};async function y(){if(s.value.length==0||i.value)return;i.value=!0;const b=await(async()=>{let D=0;const K=Promise.all(Array.from(s.value).map(async G=>(D+=G.size,{name:G.name,type:G.type,data:await C(G)})));if(D>Au){alert("Size limit exceeded.");return}return K})();if(!b){i.value=!1;return}const I=new CustomEvent("wf-file-change",{detail:{payload:b,callback:()=>{i.value=!1,s.value=[]}}});t.value.dispatchEvent(I)}return ln(()=>{l=new ResizeObserver(()=>{A()}),l.observe(r.value)}),_o(()=>{l.unobserve(r.value)}),(p,b)=>(k(),L("div",{ref_key:"rootEl",ref:t,class:"CoreChatbot"},[F("div",{ref_key:"messageAreaEl",ref:n,class:"messageArea"},[F("div",{ref_key:"messagesEl",ref:r,class:"messages"},[(k(!0),L(We,null,Pt(u.value,(I,D)=>(k(),Oe(Dm,{key:D,message:I,"use-markdown":O(a).useMarkdown.value,"assistant-role-color":O(a).assistantRoleColor.value,initials:I.role==="assistant"?O(a).assistantInitials.value:O(a).userInitials.value,onActionClick:b[0]||(b[0]=K=>_(K))},null,8,["message","use-markdown","assistant-role-color","initials"]))),128)),h.value?(k(),Oe(Dm,{key:0,"is-loading":"",initials:O(a).assistantInitials.value},null,8,["initials"])):ve("",!0)],512)],512),s.value.length>0?(k(),L(We,{key:0},[F("div",oO,[i.value?(k(),L(We,{key:0},[tn(" Uploading... ")],64)):ve("",!0),i.value?ve("",!0):(k(),L("div",aO,[(k(!0),L(We,null,Pt(s.value,(I,D)=>(k(),L("div",{key:D,class:"file"},[F("div",null,[F("div",{class:"name",title:I.name},Ee(I.name),9,sO),F("div",iO,Ee(O(Fm)(I.size)),1)]),Le($r,{onClick:K=>w(D)},{default:Je(()=>b[2]||(b[2]=[F("i",{class:"material-symbols-outlined"}," delete ",-1)])),_:2},1032,["onClick"])]))),128))]))]),F("div",lO,[!d.value&&!i.value?(k(),Oe($r,{key:0,title:"Upload",onClick:y},{default:Je(()=>b[3]||(b[3]=[F("i",{class:"material-symbols-outlined"},"upload",-1)])),_:1})):ve("",!0),d.value?(k(),L("div",cO,[b[4]||(b[4]=F("i",{class:"material-symbols-outlined"},"warning",-1)),tn(" Size limit of "+Ee(O(Fm)(Au))+" exceeded. ",1)])):ve("",!0)])],64)):ve("",!0),F("div",uO,[Le(Bd,{modelValue:c.value,"onUpdate:modelValue":b[1]||(b[1]=I=>c.value=I),placeholder:O(a).placeholder.value,onKeydown:vo(cr(m,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])]),F("div",dO,[Le($r,{class:"send action",title:"Send message",onClick:m},{default:Je(()=>[Le(UM)]),_:1}),O(a).enableFileUpload.value!="no"?(k(),Oe($r,{key:0,class:"action",title:"Attach files",onClick:v},{default:Je(()=>b[5]||(b[5]=[F("i",{class:"material-symbols-outlined"},"attach_file",-1)])),_:1})):ve("",!0)])],512))}}),jm=e=>{e.writer&&(e.writer.docs="Connect it to an LLM by handling the `wf-chatbot-message` event, which is triggered every time the user sends a message.\n\nYou can add `actions` to messages, which are buttons that trigger the `wf-chatbot-action-click`.\n\nSee the stubs for more details.")};typeof jm=="function"&&jm(q_);const yO=Ie(q_,[["__scopeId","data-v-fcbc1aa1"]]);var G_={exports:{}};/**
|
|
166
|
-
* chroma.js - JavaScript library for color conversions
|
|
167
|
-
*
|
|
168
|
-
* Copyright (c) 2011-2019, Gregor Aisch
|
|
169
|
-
* All rights reserved.
|
|
170
|
-
*
|
|
171
|
-
* Redistribution and use in source and binary forms, with or without
|
|
172
|
-
* modification, are permitted provided that the following conditions are met:
|
|
173
|
-
*
|
|
174
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
175
|
-
* list of conditions and the following disclaimer.
|
|
176
|
-
*
|
|
177
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
178
|
-
* this list of conditions and the following disclaimer in the documentation
|
|
179
|
-
* and/or other materials provided with the distribution.
|
|
180
|
-
*
|
|
181
|
-
* 3. The name Gregor Aisch may not be used to endorse or promote products
|
|
182
|
-
* derived from this software without specific prior written permission.
|
|
183
|
-
*
|
|
184
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
185
|
-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
186
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
187
|
-
* DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
188
|
-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
189
|
-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
190
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
|
191
|
-
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
192
|
-
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
193
|
-
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
194
|
-
*
|
|
195
|
-
* -------------------------------------------------------
|
|
196
|
-
*
|
|
197
|
-
* chroma.js includes colors from colorbrewer2.org, which are released under
|
|
198
|
-
* the following license:
|
|
199
|
-
*
|
|
200
|
-
* Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
|
|
201
|
-
* and The Pennsylvania State University.
|
|
202
|
-
*
|
|
203
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
204
|
-
* you may not use this file except in compliance with the License.
|
|
205
|
-
* You may obtain a copy of the License at
|
|
206
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
207
|
-
*
|
|
208
|
-
* Unless required by applicable law or agreed to in writing,
|
|
209
|
-
* software distributed under the License is distributed on an
|
|
210
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
|
211
|
-
* either express or implied. See the License for the specific
|
|
212
|
-
* language governing permissions and limitations under the License.
|
|
213
|
-
*
|
|
214
|
-
* ------------------------------------------------------
|
|
215
|
-
*
|
|
216
|
-
* Named colors are taken from X11 Color Names.
|
|
217
|
-
* http://www.w3.org/TR/css3-color/#svg-color
|
|
218
|
-
*
|
|
219
|
-
* @preserve
|
|
220
|
-
*/(function(e,t){(function(n,r){e.exports=r()})(eE,function(){for(var n=function(f,g,$){return g===void 0&&(g=0),$===void 0&&($=1),f<g?g:f>$?$:f},r=n,o=function(f){f._clipped=!1,f._unclipped=f.slice(0);for(var g=0;g<=3;g++)g<3?((f[g]<0||f[g]>255)&&(f._clipped=!0),f[g]=r(f[g],0,255)):g===3&&(f[g]=r(f[g],0,1));return f},a={},s=0,i=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];s<i.length;s+=1){var l=i[s];a["[object "+l+"]"]=l.toLowerCase()}var u=function(f){return a[Object.prototype.toString.call(f)]||"object"},c=u,d=function(f,g){return g===void 0&&(g=null),f.length>=3?Array.prototype.slice.call(f):c(f[0])=="object"&&g?g.split("").filter(function($){return f[0][$]!==void 0}).map(function($){return f[0][$]}):f[0]},h=u,m=function(f){if(f.length<2)return null;var g=f.length-1;return h(f[g])=="string"?f[g].toLowerCase():null},_=Math.PI,v={clip_rgb:o,limit:n,type:u,unpack:d,last:m,PI:_,TWOPI:_*2,PITHIRD:_/3,DEG2RAD:_/180,RAD2DEG:180/_},w={format:{},autodetect:[]},A=v.last,C=v.clip_rgb,y=v.type,p=w,b=function(){for(var g=[],$=arguments.length;$--;)g[$]=arguments[$];var M=this;if(y(g[0])==="object"&&g[0].constructor&&g[0].constructor===this.constructor)return g[0];var V=A(g),q=!1;if(!V){q=!0,p.sorted||(p.autodetect=p.autodetect.sort(function($e,Fe){return Fe.p-$e.p}),p.sorted=!0);for(var B=0,ee=p.autodetect;B<ee.length;B+=1){var oe=ee[B];if(V=oe.test.apply(oe,g),V)break}}if(p.format[V]){var pe=p.format[V].apply(null,q?g:g.slice(0,-1));M._rgb=C(pe)}else throw new Error("unknown format: "+g);M._rgb.length===3&&M._rgb.push(1)};b.prototype.toString=function(){return y(this.hex)=="function"?this.hex():"["+this._rgb.join(",")+"]"};var I=b,D=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(D.Color,[null].concat(f)))};D.Color=I,D.version="2.4.2";var K=D,G=v.unpack,Z=Math.max,be=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=G(f,"rgb"),M=$[0],V=$[1],q=$[2];M=M/255,V=V/255,q=q/255;var B=1-Z(M,Z(V,q)),ee=B<1?1/(1-B):0,oe=(1-M-B)*ee,pe=(1-V-B)*ee,$e=(1-q-B)*ee;return[oe,pe,$e,B]},ce=be,ge=v.unpack,de=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=ge(f,"cmyk");var $=f[0],M=f[1],V=f[2],q=f[3],B=f.length>4?f[4]:1;return q===1?[0,0,0,B]:[$>=1?0:255*(1-$)*(1-q),M>=1?0:255*(1-M)*(1-q),V>=1?0:255*(1-V)*(1-q),B]},He=de,Ce=K,fe=I,he=w,Ne=v.unpack,me=v.type,z=ce;fe.prototype.cmyk=function(){return z(this._rgb)},Ce.cmyk=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(fe,[null].concat(f,["cmyk"])))},he.format.cmyk=He,he.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=Ne(f,"cmyk"),me(f)==="array"&&f.length===4)return"cmyk"}});var ue=v.unpack,X=v.last,T=function(f){return Math.round(f*100)/100},R=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=ue(f,"hsla"),M=X(f)||"lsa";return $[0]=T($[0]||0),$[1]=T($[1]*100)+"%",$[2]=T($[2]*100)+"%",M==="hsla"||$.length>3&&$[3]<1?($[3]=$.length>3?$[3]:1,M="hsla"):$.length=3,M+"("+$.join(",")+")"},se=R,Re=v.unpack,De=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=Re(f,"rgba");var $=f[0],M=f[1],V=f[2];$/=255,M/=255,V/=255;var q=Math.min($,M,V),B=Math.max($,M,V),ee=(B+q)/2,oe,pe;return B===q?(oe=0,pe=Number.NaN):oe=ee<.5?(B-q)/(B+q):(B-q)/(2-B-q),$==B?pe=(M-V)/(B-q):M==B?pe=2+(V-$)/(B-q):V==B&&(pe=4+($-M)/(B-q)),pe*=60,pe<0&&(pe+=360),f.length>3&&f[3]!==void 0?[pe,oe,ee,f[3]]:[pe,oe,ee]},it=De,et=v.unpack,dt=v.last,zt=se,N=it,j=Math.round,ae=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=et(f,"rgba"),M=dt(f)||"rgb";return M.substr(0,3)=="hsl"?zt(N($),M):($[0]=j($[0]),$[1]=j($[1]),$[2]=j($[2]),(M==="rgba"||$.length>3&&$[3]<1)&&($[3]=$.length>3?$[3]:1,M="rgba"),M+"("+$.slice(0,M==="rgb"?3:4).join(",")+")")},ye=ae,U=v.unpack,J=Math.round,x=function(){for(var f,g=[],$=arguments.length;$--;)g[$]=arguments[$];g=U(g,"hsl");var M=g[0],V=g[1],q=g[2],B,ee,oe;if(V===0)B=ee=oe=q*255;else{var pe=[0,0,0],$e=[0,0,0],Fe=q<.5?q*(1+V):q+V-q*V,ke=2*q-Fe,qe=M/360;pe[0]=qe+1/3,pe[1]=qe,pe[2]=qe-1/3;for(var Ke=0;Ke<3;Ke++)pe[Ke]<0&&(pe[Ke]+=1),pe[Ke]>1&&(pe[Ke]-=1),6*pe[Ke]<1?$e[Ke]=ke+(Fe-ke)*6*pe[Ke]:2*pe[Ke]<1?$e[Ke]=Fe:3*pe[Ke]<2?$e[Ke]=ke+(Fe-ke)*(2/3-pe[Ke])*6:$e[Ke]=ke;f=[J($e[0]*255),J($e[1]*255),J($e[2]*255)],B=f[0],ee=f[1],oe=f[2]}return g.length>3?[B,ee,oe,g[3]]:[B,ee,oe,1]},S=x,E=S,P=w,W=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,re=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,ie=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Pe=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Xe=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,lt=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,st=Math.round,Nt=function(f){f=f.toLowerCase().trim();var g;if(P.format.named)try{return P.format.named(f)}catch{}if(g=f.match(W)){for(var $=g.slice(1,4),M=0;M<3;M++)$[M]=+$[M];return $[3]=1,$}if(g=f.match(re)){for(var V=g.slice(1,5),q=0;q<4;q++)V[q]=+V[q];return V}if(g=f.match(ie)){for(var B=g.slice(1,4),ee=0;ee<3;ee++)B[ee]=st(B[ee]*2.55);return B[3]=1,B}if(g=f.match(Pe)){for(var oe=g.slice(1,5),pe=0;pe<3;pe++)oe[pe]=st(oe[pe]*2.55);return oe[3]=+oe[3],oe}if(g=f.match(Xe)){var $e=g.slice(1,4);$e[1]*=.01,$e[2]*=.01;var Fe=E($e);return Fe[3]=1,Fe}if(g=f.match(lt)){var ke=g.slice(1,4);ke[1]*=.01,ke[2]*=.01;var qe=E(ke);return qe[3]=+g[4],qe}};Nt.test=function(f){return W.test(f)||re.test(f)||ie.test(f)||Pe.test(f)||Xe.test(f)||lt.test(f)};var Tt=Nt,nn=K,Zt=I,le=w,Te=v.type,_e=ye,Se=Tt;Zt.prototype.css=function(f){return _e(this._rgb,f)},nn.css=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(Zt,[null].concat(f,["css"])))},le.format.css=Se,le.autodetect.push({p:5,test:function(f){for(var g=[],$=arguments.length-1;$-- >0;)g[$]=arguments[$+1];if(!g.length&&Te(f)==="string"&&Se.test(f))return"css"}});var Be=I,je=K,nt=w,kt=v.unpack;nt.format.gl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=kt(f,"rgba");return $[0]*=255,$[1]*=255,$[2]*=255,$},je.gl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(Be,[null].concat(f,["gl"])))},Be.prototype.gl=function(){var f=this._rgb;return[f[0]/255,f[1]/255,f[2]/255,f[3]]};var pt=v.unpack,Dt=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=pt(f,"rgb"),M=$[0],V=$[1],q=$[2],B=Math.min(M,V,q),ee=Math.max(M,V,q),oe=ee-B,pe=oe*100/255,$e=B/(255-oe)*100,Fe;return oe===0?Fe=Number.NaN:(M===ee&&(Fe=(V-q)/oe),V===ee&&(Fe=2+(q-M)/oe),q===ee&&(Fe=4+(M-V)/oe),Fe*=60,Fe<0&&(Fe+=360)),[Fe,pe,$e]},Jt=Dt,Kt=v.unpack,Yt=Math.floor,gn=function(){for(var f,g,$,M,V,q,B=[],ee=arguments.length;ee--;)B[ee]=arguments[ee];B=Kt(B,"hcg");var oe=B[0],pe=B[1],$e=B[2],Fe,ke,qe;$e=$e*255;var Ke=pe*255;if(pe===0)Fe=ke=qe=$e;else{oe===360&&(oe=0),oe>360&&(oe-=360),oe<0&&(oe+=360),oe/=60;var ht=Yt(oe),wt=oe-ht,It=$e*(1-pe),Mt=It+Ke*(1-wt),Cn=It+Ke*wt,bn=It+Ke;switch(ht){case 0:f=[bn,Cn,It],Fe=f[0],ke=f[1],qe=f[2];break;case 1:g=[Mt,bn,It],Fe=g[0],ke=g[1],qe=g[2];break;case 2:$=[It,bn,Cn],Fe=$[0],ke=$[1],qe=$[2];break;case 3:M=[It,Mt,bn],Fe=M[0],ke=M[1],qe=M[2];break;case 4:V=[Cn,It,bn],Fe=V[0],ke=V[1],qe=V[2];break;case 5:q=[bn,It,Mt],Fe=q[0],ke=q[1],qe=q[2];break}}return[Fe,ke,qe,B.length>3?B[3]:1]},wo=gn,ys=v.unpack,vr=v.type,Ao=K,Co=I,to=w,Ac=Jt;Co.prototype.hcg=function(){return Ac(this._rgb)},Ao.hcg=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(Co,[null].concat(f,["hcg"])))},to.format.hcg=wo,to.autodetect.push({p:1,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=ys(f,"hcg"),vr(f)==="array"&&f.length===3)return"hcg"}});var Ci=v.unpack,gr=v.last,Yo=Math.round,$i=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=Ci(f,"rgba"),M=$[0],V=$[1],q=$[2],B=$[3],ee=gr(f)||"auto";B===void 0&&(B=1),ee==="auto"&&(ee=B<1?"rgba":"rgb"),M=Yo(M),V=Yo(V),q=Yo(q);var oe=M<<16|V<<8|q,pe="000000"+oe.toString(16);pe=pe.substr(pe.length-6);var $e="0"+Yo(B*255).toString(16);switch($e=$e.substr($e.length-2),ee.toLowerCase()){case"rgba":return"#"+pe+$e;case"argb":return"#"+$e+pe;default:return"#"+pe}},_s=$i,Si=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Cc=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Qe=function(f){if(f.match(Si)){(f.length===4||f.length===7)&&(f=f.substr(1)),f.length===3&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]);var g=parseInt(f,16),$=g>>16,M=g>>8&255,V=g&255;return[$,M,V,1]}if(f.match(Cc)){(f.length===5||f.length===9)&&(f=f.substr(1)),f.length===4&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]+f[3]+f[3]);var q=parseInt(f,16),B=q>>24&255,ee=q>>16&255,oe=q>>8&255,pe=Math.round((q&255)/255*100)/100;return[B,ee,oe,pe]}throw new Error("unknown hex color: "+f)},Q=Qe,Me=K,Ge=I,Ft=v.type,un=w,yn=_s;Ge.prototype.hex=function(f){return yn(this._rgb,f)},Me.hex=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(Ge,[null].concat(f,["hex"])))},un.format.hex=Q,un.autodetect.push({p:4,test:function(f){for(var g=[],$=arguments.length-1;$-- >0;)g[$]=arguments[$+1];if(!g.length&&Ft(f)==="string"&&[3,4,5,6,7,8,9].indexOf(f.length)>=0)return"hex"}});var xn=v.unpack,Rr=v.TWOPI,Xo=Math.min,Pn=Math.sqrt,Ii=Math.acos,Ei=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=xn(f,"rgb"),M=$[0],V=$[1],q=$[2];M/=255,V/=255,q/=255;var B,ee=Xo(M,V,q),oe=(M+V+q)/3,pe=oe>0?1-ee/oe:0;return pe===0?B=NaN:(B=(M-V+(M-q))/2,B/=Pn((M-V)*(M-V)+(M-q)*(V-q)),B=Ii(B),q>V&&(B=Rr-B),B/=Rr),[B*360,pe,oe]},yb=Ei,_b=v.unpack,$c=v.limit,Ca=v.TWOPI,Sc=v.PITHIRD,$a=Math.cos,bb=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=_b(f,"hsi");var $=f[0],M=f[1],V=f[2],q,B,ee;return isNaN($)&&($=0),isNaN(M)&&(M=0),$>360&&($-=360),$<0&&($+=360),$/=360,$<1/3?(ee=(1-M)/3,q=(1+M*$a(Ca*$)/$a(Sc-Ca*$))/3,B=1-(ee+q)):$<2/3?($-=1/3,q=(1-M)/3,B=(1+M*$a(Ca*$)/$a(Sc-Ca*$))/3,ee=1-(q+B)):($-=2/3,B=(1-M)/3,ee=(1+M*$a(Ca*$)/$a(Sc-Ca*$))/3,q=1-(B+ee)),q=$c(V*q*3),B=$c(V*B*3),ee=$c(V*ee*3),[q*255,B*255,ee*255,f.length>3?f[3]:1]},wb=bb,Ab=v.unpack,Cb=v.type,$b=K,Xf=I,Qf=w,Sb=yb;Xf.prototype.hsi=function(){return Sb(this._rgb)},$b.hsi=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(Xf,[null].concat(f,["hsi"])))},Qf.format.hsi=wb,Qf.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=Ab(f,"hsi"),Cb(f)==="array"&&f.length===3)return"hsi"}});var Ib=v.unpack,Eb=v.type,Tb=K,Zf=I,ep=w,kb=it;Zf.prototype.hsl=function(){return kb(this._rgb)},Tb.hsl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(Zf,[null].concat(f,["hsl"])))},ep.format.hsl=S,ep.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=Ib(f,"hsl"),Eb(f)==="array"&&f.length===3)return"hsl"}});var xb=v.unpack,Pb=Math.min,Mb=Math.max,Ob=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=xb(f,"rgb");var $=f[0],M=f[1],V=f[2],q=Pb($,M,V),B=Mb($,M,V),ee=B-q,oe,pe,$e;return $e=B/255,B===0?(oe=Number.NaN,pe=0):(pe=ee/B,$===B&&(oe=(M-V)/ee),M===B&&(oe=2+(V-$)/ee),V===B&&(oe=4+($-M)/ee),oe*=60,oe<0&&(oe+=360)),[oe,pe,$e]},Nb=Ob,Rb=v.unpack,Lb=Math.floor,Db=function(){for(var f,g,$,M,V,q,B=[],ee=arguments.length;ee--;)B[ee]=arguments[ee];B=Rb(B,"hsv");var oe=B[0],pe=B[1],$e=B[2],Fe,ke,qe;if($e*=255,pe===0)Fe=ke=qe=$e;else{oe===360&&(oe=0),oe>360&&(oe-=360),oe<0&&(oe+=360),oe/=60;var Ke=Lb(oe),ht=oe-Ke,wt=$e*(1-pe),It=$e*(1-pe*ht),Mt=$e*(1-pe*(1-ht));switch(Ke){case 0:f=[$e,Mt,wt],Fe=f[0],ke=f[1],qe=f[2];break;case 1:g=[It,$e,wt],Fe=g[0],ke=g[1],qe=g[2];break;case 2:$=[wt,$e,Mt],Fe=$[0],ke=$[1],qe=$[2];break;case 3:M=[wt,It,$e],Fe=M[0],ke=M[1],qe=M[2];break;case 4:V=[Mt,wt,$e],Fe=V[0],ke=V[1],qe=V[2];break;case 5:q=[$e,wt,It],Fe=q[0],ke=q[1],qe=q[2];break}}return[Fe,ke,qe,B.length>3?B[3]:1]},Bb=Db,Fb=v.unpack,jb=v.type,Vb=K,tp=I,np=w,Ub=Nb;tp.prototype.hsv=function(){return Ub(this._rgb)},Vb.hsv=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(tp,[null].concat(f,["hsv"])))},np.format.hsv=Bb,np.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=Fb(f,"hsv"),jb(f)==="array"&&f.length===3)return"hsv"}});var Ti={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Sa=Ti,Hb=v.unpack,rp=Math.pow,zb=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=Hb(f,"rgb"),M=$[0],V=$[1],q=$[2],B=Kb(M,V,q),ee=B[0],oe=B[1],pe=B[2],$e=116*oe-16;return[$e<0?0:$e,500*(ee-oe),200*(oe-pe)]},Ic=function(f){return(f/=255)<=.04045?f/12.92:rp((f+.055)/1.055,2.4)},Ec=function(f){return f>Sa.t3?rp(f,1/3):f/Sa.t2+Sa.t0},Kb=function(f,g,$){f=Ic(f),g=Ic(g),$=Ic($);var M=Ec((.4124564*f+.3575761*g+.1804375*$)/Sa.Xn),V=Ec((.2126729*f+.7151522*g+.072175*$)/Sa.Yn),q=Ec((.0193339*f+.119192*g+.9503041*$)/Sa.Zn);return[M,V,q]},op=zb,Ia=Ti,Wb=v.unpack,qb=Math.pow,Gb=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=Wb(f,"lab");var $=f[0],M=f[1],V=f[2],q,B,ee,oe,pe,$e;return B=($+16)/116,q=isNaN(M)?B:B+M/500,ee=isNaN(V)?B:B-V/200,B=Ia.Yn*kc(B),q=Ia.Xn*kc(q),ee=Ia.Zn*kc(ee),oe=Tc(3.2404542*q-1.5371385*B-.4985314*ee),pe=Tc(-.969266*q+1.8760108*B+.041556*ee),$e=Tc(.0556434*q-.2040259*B+1.0572252*ee),[oe,pe,$e,f.length>3?f[3]:1]},Tc=function(f){return 255*(f<=.00304?12.92*f:1.055*qb(f,1/2.4)-.055)},kc=function(f){return f>Ia.t1?f*f*f:Ia.t2*(f-Ia.t0)},ap=Gb,Jb=v.unpack,Yb=v.type,Xb=K,sp=I,ip=w,Qb=op;sp.prototype.lab=function(){return Qb(this._rgb)},Xb.lab=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(sp,[null].concat(f,["lab"])))},ip.format.lab=ap,ip.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=Jb(f,"lab"),Yb(f)==="array"&&f.length===3)return"lab"}});var Zb=v.unpack,e0=v.RAD2DEG,t0=Math.sqrt,n0=Math.atan2,r0=Math.round,o0=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=Zb(f,"lab"),M=$[0],V=$[1],q=$[2],B=t0(V*V+q*q),ee=(n0(q,V)*e0+360)%360;return r0(B*1e4)===0&&(ee=Number.NaN),[M,B,ee]},lp=o0,a0=v.unpack,s0=op,i0=lp,l0=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=a0(f,"rgb"),M=$[0],V=$[1],q=$[2],B=s0(M,V,q),ee=B[0],oe=B[1],pe=B[2];return i0(ee,oe,pe)},c0=l0,u0=v.unpack,d0=v.DEG2RAD,f0=Math.sin,p0=Math.cos,h0=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=u0(f,"lch"),M=$[0],V=$[1],q=$[2];return isNaN(q)&&(q=0),q=q*d0,[M,p0(q)*V,f0(q)*V]},cp=h0,m0=v.unpack,v0=cp,g0=ap,y0=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=m0(f,"lch");var $=f[0],M=f[1],V=f[2],q=v0($,M,V),B=q[0],ee=q[1],oe=q[2],pe=g0(B,ee,oe),$e=pe[0],Fe=pe[1],ke=pe[2];return[$e,Fe,ke,f.length>3?f[3]:1]},up=y0,_0=v.unpack,b0=up,w0=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=_0(f,"hcl").reverse();return b0.apply(void 0,$)},A0=w0,C0=v.unpack,$0=v.type,dp=K,ki=I,xc=w,fp=c0;ki.prototype.lch=function(){return fp(this._rgb)},ki.prototype.hcl=function(){return fp(this._rgb).reverse()},dp.lch=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(ki,[null].concat(f,["lch"])))},dp.hcl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(ki,[null].concat(f,["hcl"])))},xc.format.lch=up,xc.format.hcl=A0,["lch","hcl"].forEach(function(f){return xc.autodetect.push({p:2,test:function(){for(var g=[],$=arguments.length;$--;)g[$]=arguments[$];if(g=C0(g,f),$0(g)==="array"&&g.length===3)return f}})});var S0={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},pp=S0,I0=I,hp=w,E0=v.type,bs=pp,T0=Q,k0=_s;I0.prototype.name=function(){for(var f=k0(this._rgb,"rgb"),g=0,$=Object.keys(bs);g<$.length;g+=1){var M=$[g];if(bs[M]===f)return M.toLowerCase()}return f},hp.format.named=function(f){if(f=f.toLowerCase(),bs[f])return T0(bs[f]);throw new Error("unknown color name: "+f)},hp.autodetect.push({p:5,test:function(f){for(var g=[],$=arguments.length-1;$-- >0;)g[$]=arguments[$+1];if(!g.length&&E0(f)==="string"&&bs[f.toLowerCase()])return"named"}});var x0=v.unpack,P0=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=x0(f,"rgb"),M=$[0],V=$[1],q=$[2];return(M<<16)+(V<<8)+q},M0=P0,O0=v.type,N0=function(f){if(O0(f)=="number"&&f>=0&&f<=16777215){var g=f>>16,$=f>>8&255,M=f&255;return[g,$,M,1]}throw new Error("unknown num color: "+f)},R0=N0,L0=K,mp=I,vp=w,D0=v.type,B0=M0;mp.prototype.num=function(){return B0(this._rgb)},L0.num=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(mp,[null].concat(f,["num"])))},vp.format.num=R0,vp.autodetect.push({p:5,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f.length===1&&D0(f[0])==="number"&&f[0]>=0&&f[0]<=16777215)return"num"}});var F0=K,Pc=I,gp=w,yp=v.unpack,_p=v.type,bp=Math.round;Pc.prototype.rgb=function(f){return f===void 0&&(f=!0),f===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(bp)},Pc.prototype.rgba=function(f){return f===void 0&&(f=!0),this._rgb.slice(0,4).map(function(g,$){return $<3?f===!1?g:bp(g):g})},F0.rgb=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(Pc,[null].concat(f,["rgb"])))},gp.format.rgb=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=yp(f,"rgba");return $[3]===void 0&&($[3]=1),$},gp.autodetect.push({p:3,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=yp(f,"rgba"),_p(f)==="array"&&(f.length===3||f.length===4&&_p(f[3])=="number"&&f[3]>=0&&f[3]<=1))return"rgb"}});var xi=Math.log,j0=function(f){var g=f/100,$,M,V;return g<66?($=255,M=g<6?0:-155.25485562709179-.44596950469579133*(M=g-2)+104.49216199393888*xi(M),V=g<20?0:-254.76935184120902+.8274096064007395*(V=g-10)+115.67994401066147*xi(V)):($=351.97690566805693+.114206453784165*($=g-55)-40.25366309332127*xi($),M=325.4494125711974+.07943456536662342*(M=g-50)-28.0852963507957*xi(M),V=255),[$,M,V,1]},wp=j0,V0=wp,U0=v.unpack,H0=Math.round,z0=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];for(var $=U0(f,"rgb"),M=$[0],V=$[2],q=1e3,B=4e4,ee=.4,oe;B-q>ee;){oe=(B+q)*.5;var pe=V0(oe);pe[2]/pe[0]>=V/M?B=oe:q=oe}return H0(oe)},K0=z0,Mc=K,Pi=I,Oc=w,W0=K0;Pi.prototype.temp=Pi.prototype.kelvin=Pi.prototype.temperature=function(){return W0(this._rgb)},Mc.temp=Mc.kelvin=Mc.temperature=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(Pi,[null].concat(f,["temp"])))},Oc.format.temp=Oc.format.kelvin=Oc.format.temperature=wp;var q0=v.unpack,Nc=Math.cbrt,G0=Math.pow,J0=Math.sign,Y0=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=q0(f,"rgb"),M=$[0],V=$[1],q=$[2],B=[Rc(M/255),Rc(V/255),Rc(q/255)],ee=B[0],oe=B[1],pe=B[2],$e=Nc(.4122214708*ee+.5363325363*oe+.0514459929*pe),Fe=Nc(.2119034982*ee+.6806995451*oe+.1073969566*pe),ke=Nc(.0883024619*ee+.2817188376*oe+.6299787005*pe);return[.2104542553*$e+.793617785*Fe-.0040720468*ke,1.9779984951*$e-2.428592205*Fe+.4505937099*ke,.0259040371*$e+.7827717662*Fe-.808675766*ke]},Ap=Y0;function Rc(f){var g=Math.abs(f);return g<.04045?f/12.92:(J0(f)||1)*G0((g+.055)/1.055,2.4)}var X0=v.unpack,Mi=Math.pow,Q0=Math.sign,Z0=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=X0(f,"lab");var $=f[0],M=f[1],V=f[2],q=Mi($+.3963377774*M+.2158037573*V,3),B=Mi($-.1055613458*M-.0638541728*V,3),ee=Mi($-.0894841775*M-1.291485548*V,3);return[255*Lc(4.0767416621*q-3.3077115913*B+.2309699292*ee),255*Lc(-1.2684380046*q+2.6097574011*B-.3413193965*ee),255*Lc(-.0041960863*q-.7034186147*B+1.707614701*ee),f.length>3?f[3]:1]},Cp=Z0;function Lc(f){var g=Math.abs(f);return g>.0031308?(Q0(f)||1)*(1.055*Mi(g,1/2.4)-.055):f*12.92}var ew=v.unpack,tw=v.type,nw=K,$p=I,Sp=w,rw=Ap;$p.prototype.oklab=function(){return rw(this._rgb)},nw.oklab=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply($p,[null].concat(f,["oklab"])))},Sp.format.oklab=Cp,Sp.autodetect.push({p:3,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=ew(f,"oklab"),tw(f)==="array"&&f.length===3)return"oklab"}});var ow=v.unpack,aw=Ap,sw=lp,iw=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var $=ow(f,"rgb"),M=$[0],V=$[1],q=$[2],B=aw(M,V,q),ee=B[0],oe=B[1],pe=B[2];return sw(ee,oe,pe)},lw=iw,cw=v.unpack,uw=cp,dw=Cp,fw=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=cw(f,"lch");var $=f[0],M=f[1],V=f[2],q=uw($,M,V),B=q[0],ee=q[1],oe=q[2],pe=dw(B,ee,oe),$e=pe[0],Fe=pe[1],ke=pe[2];return[$e,Fe,ke,f.length>3?f[3]:1]},pw=fw,hw=v.unpack,mw=v.type,vw=K,Ip=I,Ep=w,gw=lw;Ip.prototype.oklch=function(){return gw(this._rgb)},vw.oklch=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(Ip,[null].concat(f,["oklch"])))},Ep.format.oklch=pw,Ep.autodetect.push({p:3,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=hw(f,"oklch"),mw(f)==="array"&&f.length===3)return"oklch"}});var Tp=I,yw=v.type;Tp.prototype.alpha=function(f,g){return g===void 0&&(g=!1),f!==void 0&&yw(f)==="number"?g?(this._rgb[3]=f,this):new Tp([this._rgb[0],this._rgb[1],this._rgb[2],f],"rgb"):this._rgb[3]};var _w=I;_w.prototype.clipped=function(){return this._rgb._clipped||!1};var Qo=I,bw=Ti;Qo.prototype.darken=function(f){f===void 0&&(f=1);var g=this,$=g.lab();return $[0]-=bw.Kn*f,new Qo($,"lab").alpha(g.alpha(),!0)},Qo.prototype.brighten=function(f){return f===void 0&&(f=1),this.darken(-f)},Qo.prototype.darker=Qo.prototype.darken,Qo.prototype.brighter=Qo.prototype.brighten;var ww=I;ww.prototype.get=function(f){var g=f.split("."),$=g[0],M=g[1],V=this[$]();if(M){var q=$.indexOf(M)-($.substr(0,2)==="ok"?2:0);if(q>-1)return V[q];throw new Error("unknown channel "+M+" in mode "+$)}else return V};var Ea=I,Aw=v.type,Cw=Math.pow,$w=1e-7,Sw=20;Ea.prototype.luminance=function(f){if(f!==void 0&&Aw(f)==="number"){if(f===0)return new Ea([0,0,0,this._rgb[3]],"rgb");if(f===1)return new Ea([255,255,255,this._rgb[3]],"rgb");var g=this.luminance(),$="rgb",M=Sw,V=function(B,ee){var oe=B.interpolate(ee,.5,$),pe=oe.luminance();return Math.abs(f-pe)<$w||!M--?oe:pe>f?V(B,oe):V(oe,ee)},q=(g>f?V(new Ea([0,0,0]),this):V(this,new Ea([255,255,255]))).rgb();return new Ea(q.concat([this._rgb[3]]))}return Iw.apply(void 0,this._rgb.slice(0,3))};var Iw=function(f,g,$){return f=Dc(f),g=Dc(g),$=Dc($),.2126*f+.7152*g+.0722*$},Dc=function(f){return f/=255,f<=.03928?f/12.92:Cw((f+.055)/1.055,2.4)},Zn={},kp=I,xp=v.type,Oi=Zn,Pp=function(f,g,$){$===void 0&&($=.5);for(var M=[],V=arguments.length-3;V-- >0;)M[V]=arguments[V+3];var q=M[0]||"lrgb";if(!Oi[q]&&!M.length&&(q=Object.keys(Oi)[0]),!Oi[q])throw new Error("interpolation mode "+q+" is not defined");return xp(f)!=="object"&&(f=new kp(f)),xp(g)!=="object"&&(g=new kp(g)),Oi[q](f,g,$).alpha(f.alpha()+$*(g.alpha()-f.alpha()))},Mp=I,Ew=Pp;Mp.prototype.mix=Mp.prototype.interpolate=function(f,g){g===void 0&&(g=.5);for(var $=[],M=arguments.length-2;M-- >0;)$[M]=arguments[M+2];return Ew.apply(void 0,[this,f,g].concat($))};var Op=I;Op.prototype.premultiply=function(f){f===void 0&&(f=!1);var g=this._rgb,$=g[3];return f?(this._rgb=[g[0]*$,g[1]*$,g[2]*$,$],this):new Op([g[0]*$,g[1]*$,g[2]*$,$],"rgb")};var Bc=I,Tw=Ti;Bc.prototype.saturate=function(f){f===void 0&&(f=1);var g=this,$=g.lch();return $[1]+=Tw.Kn*f,$[1]<0&&($[1]=0),new Bc($,"lch").alpha(g.alpha(),!0)},Bc.prototype.desaturate=function(f){return f===void 0&&(f=1),this.saturate(-f)};var Np=I,Rp=v.type;Np.prototype.set=function(f,g,$){$===void 0&&($=!1);var M=f.split("."),V=M[0],q=M[1],B=this[V]();if(q){var ee=V.indexOf(q)-(V.substr(0,2)==="ok"?2:0);if(ee>-1){if(Rp(g)=="string")switch(g.charAt(0)){case"+":B[ee]+=+g;break;case"-":B[ee]+=+g;break;case"*":B[ee]*=+g.substr(1);break;case"/":B[ee]/=+g.substr(1);break;default:B[ee]=+g}else if(Rp(g)==="number")B[ee]=g;else throw new Error("unsupported value for Color.set");var oe=new Np(B,V);return $?(this._rgb=oe._rgb,this):oe}throw new Error("unknown channel "+q+" in mode "+V)}else return B};var kw=I,xw=function(f,g,$){var M=f._rgb,V=g._rgb;return new kw(M[0]+$*(V[0]-M[0]),M[1]+$*(V[1]-M[1]),M[2]+$*(V[2]-M[2]),"rgb")};Zn.rgb=xw;var Pw=I,Fc=Math.sqrt,Ta=Math.pow,Mw=function(f,g,$){var M=f._rgb,V=M[0],q=M[1],B=M[2],ee=g._rgb,oe=ee[0],pe=ee[1],$e=ee[2];return new Pw(Fc(Ta(V,2)*(1-$)+Ta(oe,2)*$),Fc(Ta(q,2)*(1-$)+Ta(pe,2)*$),Fc(Ta(B,2)*(1-$)+Ta($e,2)*$),"rgb")};Zn.lrgb=Mw;var Ow=I,Nw=function(f,g,$){var M=f.lab(),V=g.lab();return new Ow(M[0]+$*(V[0]-M[0]),M[1]+$*(V[1]-M[1]),M[2]+$*(V[2]-M[2]),"lab")};Zn.lab=Nw;var Lp=I,ka=function(f,g,$,M){var V,q,B,ee;M==="hsl"?(B=f.hsl(),ee=g.hsl()):M==="hsv"?(B=f.hsv(),ee=g.hsv()):M==="hcg"?(B=f.hcg(),ee=g.hcg()):M==="hsi"?(B=f.hsi(),ee=g.hsi()):M==="lch"||M==="hcl"?(M="hcl",B=f.hcl(),ee=g.hcl()):M==="oklch"&&(B=f.oklch().reverse(),ee=g.oklch().reverse());var oe,pe,$e,Fe,ke,qe;(M.substr(0,1)==="h"||M==="oklch")&&(V=B,oe=V[0],$e=V[1],ke=V[2],q=ee,pe=q[0],Fe=q[1],qe=q[2]);var Ke,ht,wt,It;return!isNaN(oe)&&!isNaN(pe)?(pe>oe&&pe-oe>180?It=pe-(oe+360):pe<oe&&oe-pe>180?It=pe+360-oe:It=pe-oe,ht=oe+$*It):isNaN(oe)?isNaN(pe)?ht=Number.NaN:(ht=pe,(ke==1||ke==0)&&M!="hsv"&&(Ke=Fe)):(ht=oe,(qe==1||qe==0)&&M!="hsv"&&(Ke=$e)),Ke===void 0&&(Ke=$e+$*(Fe-$e)),wt=ke+$*(qe-ke),M==="oklch"?new Lp([wt,Ke,ht],M):new Lp([ht,Ke,wt],M)},Rw=ka,Dp=function(f,g,$){return Rw(f,g,$,"lch")};Zn.lch=Dp,Zn.hcl=Dp;var Lw=I,Dw=function(f,g,$){var M=f.num(),V=g.num();return new Lw(M+$*(V-M),"num")};Zn.num=Dw;var Bw=ka,Fw=function(f,g,$){return Bw(f,g,$,"hcg")};Zn.hcg=Fw;var jw=ka,Vw=function(f,g,$){return jw(f,g,$,"hsi")};Zn.hsi=Vw;var Uw=ka,Hw=function(f,g,$){return Uw(f,g,$,"hsl")};Zn.hsl=Hw;var zw=ka,Kw=function(f,g,$){return zw(f,g,$,"hsv")};Zn.hsv=Kw;var Ww=I,qw=function(f,g,$){var M=f.oklab(),V=g.oklab();return new Ww(M[0]+$*(V[0]-M[0]),M[1]+$*(V[1]-M[1]),M[2]+$*(V[2]-M[2]),"oklab")};Zn.oklab=qw;var Gw=ka,Jw=function(f,g,$){return Gw(f,g,$,"oklch")};Zn.oklch=Jw;var jc=I,Yw=v.clip_rgb,Vc=Math.pow,Uc=Math.sqrt,Hc=Math.PI,Bp=Math.cos,Fp=Math.sin,Xw=Math.atan2,Qw=function(f,g,$){g===void 0&&(g="lrgb"),$===void 0&&($=null);var M=f.length;$||($=Array.from(new Array(M)).map(function(){return 1}));var V=M/$.reduce(function(ht,wt){return ht+wt});if($.forEach(function(ht,wt){$[wt]*=V}),f=f.map(function(ht){return new jc(ht)}),g==="lrgb")return Zw(f,$);for(var q=f.shift(),B=q.get(g),ee=[],oe=0,pe=0,$e=0;$e<B.length;$e++)if(B[$e]=(B[$e]||0)*$[0],ee.push(isNaN(B[$e])?0:$[0]),g.charAt($e)==="h"&&!isNaN(B[$e])){var Fe=B[$e]/180*Hc;oe+=Bp(Fe)*$[0],pe+=Fp(Fe)*$[0]}var ke=q.alpha()*$[0];f.forEach(function(ht,wt){var It=ht.get(g);ke+=ht.alpha()*$[wt+1];for(var Mt=0;Mt<B.length;Mt++)if(!isNaN(It[Mt]))if(ee[Mt]+=$[wt+1],g.charAt(Mt)==="h"){var Cn=It[Mt]/180*Hc;oe+=Bp(Cn)*$[wt+1],pe+=Fp(Cn)*$[wt+1]}else B[Mt]+=It[Mt]*$[wt+1]});for(var qe=0;qe<B.length;qe++)if(g.charAt(qe)==="h"){for(var Ke=Xw(pe/ee[qe],oe/ee[qe])/Hc*180;Ke<0;)Ke+=360;for(;Ke>=360;)Ke-=360;B[qe]=Ke}else B[qe]=B[qe]/ee[qe];return ke/=M,new jc(B,g).alpha(ke>.99999?1:ke,!0)},Zw=function(f,g){for(var $=f.length,M=[0,0,0,0],V=0;V<f.length;V++){var q=f[V],B=g[V]/$,ee=q._rgb;M[0]+=Vc(ee[0],2)*B,M[1]+=Vc(ee[1],2)*B,M[2]+=Vc(ee[2],2)*B,M[3]+=ee[3]*B}return M[0]=Uc(M[0]),M[1]=Uc(M[1]),M[2]=Uc(M[2]),M[3]>.9999999&&(M[3]=1),new jc(Yw(M))},yr=K,xa=v.type,e1=Math.pow,zc=function(f){var g="rgb",$=yr("#ccc"),M=0,V=[0,1],q=[],B=[0,0],ee=!1,oe=[],pe=!1,$e=0,Fe=1,ke=!1,qe={},Ke=!0,ht=1,wt=function(xe){if(xe=xe||["#fff","#000"],xe&&xa(xe)==="string"&&yr.brewer&&yr.brewer[xe.toLowerCase()]&&(xe=yr.brewer[xe.toLowerCase()]),xa(xe)==="array"){xe.length===1&&(xe=[xe[0],xe[0]]),xe=xe.slice(0);for(var rt=0;rt<xe.length;rt++)xe[rt]=yr(xe[rt]);q.length=0;for(var gt=0;gt<xe.length;gt++)q.push(gt/(xe.length-1))}return Kn(),oe=xe},It=function(xe){if(ee!=null){for(var rt=ee.length-1,gt=0;gt<rt&&xe>=ee[gt];)gt++;return gt-1}return 0},Mt=function(xe){return xe},Cn=function(xe){return xe},bn=function(xe,rt){var gt,mt;if(rt==null&&(rt=!1),isNaN(xe)||xe===null)return $;if(rt)mt=xe;else if(ee&&ee.length>2){var $n=It(xe);mt=$n/(ee.length-2)}else Fe!==$e?mt=(xe-$e)/(Fe-$e):mt=1;mt=Cn(mt),rt||(mt=Mt(mt)),ht!==1&&(mt=e1(mt,ht)),mt=B[0]+mt*(1-B[0]-B[1]),mt=Math.min(1,Math.max(0,mt));var Wt=Math.floor(mt*1e4);if(Ke&&qe[Wt])gt=qe[Wt];else{if(xa(oe)==="array")for(var Et=0;Et<q.length;Et++){var Rt=q[Et];if(mt<=Rt){gt=oe[Et];break}if(mt>=Rt&&Et===q.length-1){gt=oe[Et];break}if(mt>Rt&&mt<q[Et+1]){mt=(mt-Rt)/(q[Et+1]-Rt),gt=yr.interpolate(oe[Et],oe[Et+1],mt,g);break}}else xa(oe)==="function"&&(gt=oe(mt));Ke&&(qe[Wt]=gt)}return gt},Kn=function(){return qe={}};wt(f);var Ct=function(xe){var rt=yr(bn(xe));return pe&&rt[pe]?rt[pe]():rt};return Ct.classes=function(xe){if(xe!=null){if(xa(xe)==="array")ee=xe,V=[xe[0],xe[xe.length-1]];else{var rt=yr.analyze(V);xe===0?ee=[rt.min,rt.max]:ee=yr.limits(rt,"e",xe)}return Ct}return ee},Ct.domain=function(xe){if(!arguments.length)return V;$e=xe[0],Fe=xe[xe.length-1],q=[];var rt=oe.length;if(xe.length===rt&&$e!==Fe)for(var gt=0,mt=Array.from(xe);gt<mt.length;gt+=1){var $n=mt[gt];q.push(($n-$e)/(Fe-$e))}else{for(var Wt=0;Wt<rt;Wt++)q.push(Wt/(rt-1));if(xe.length>2){var Et=xe.map(function(Lt,Bt){return Bt/(xe.length-1)}),Rt=xe.map(function(Lt){return(Lt-$e)/(Fe-$e)});Rt.every(function(Lt,Bt){return Et[Bt]===Lt})||(Cn=function(Lt){if(Lt<=0||Lt>=1)return Lt;for(var Bt=0;Lt>=Rt[Bt+1];)Bt++;var br=(Lt-Rt[Bt])/(Rt[Bt+1]-Rt[Bt]),Io=Et[Bt]+br*(Et[Bt+1]-Et[Bt]);return Io})}}return V=[$e,Fe],Ct},Ct.mode=function(xe){return arguments.length?(g=xe,Kn(),Ct):g},Ct.range=function(xe,rt){return wt(xe),Ct},Ct.out=function(xe){return pe=xe,Ct},Ct.spread=function(xe){return arguments.length?(M=xe,Ct):M},Ct.correctLightness=function(xe){return xe==null&&(xe=!0),ke=xe,Kn(),ke?Mt=function(rt){for(var gt=bn(0,!0).lab()[0],mt=bn(1,!0).lab()[0],$n=gt>mt,Wt=bn(rt,!0).lab()[0],Et=gt+(mt-gt)*rt,Rt=Wt-Et,Lt=0,Bt=1,br=20;Math.abs(Rt)>.01&&br-- >0;)(function(){return $n&&(Rt*=-1),Rt<0?(Lt=rt,rt+=(Bt-rt)*.5):(Bt=rt,rt+=(Lt-rt)*.5),Wt=bn(rt,!0).lab()[0],Rt=Wt-Et})();return rt}:Mt=function(rt){return rt},Ct},Ct.padding=function(xe){return xe!=null?(xa(xe)==="number"&&(xe=[xe,xe]),B=xe,Ct):B},Ct.colors=function(xe,rt){arguments.length<2&&(rt="hex");var gt=[];if(arguments.length===0)gt=oe.slice(0);else if(xe===1)gt=[Ct(.5)];else if(xe>1){var mt=V[0],$n=V[1]-mt;gt=t1(0,xe,!1).map(function(Bt){return Ct(mt+Bt/(xe-1)*$n)})}else{f=[];var Wt=[];if(ee&&ee.length>2)for(var Et=1,Rt=ee.length,Lt=1<=Rt;Lt?Et<Rt:Et>Rt;Lt?Et++:Et--)Wt.push((ee[Et-1]+ee[Et])*.5);else Wt=V;gt=Wt.map(function(Bt){return Ct(Bt)})}return yr[rt]&&(gt=gt.map(function(Bt){return Bt[rt]()})),gt},Ct.cache=function(xe){return xe!=null?(Ke=xe,Ct):Ke},Ct.gamma=function(xe){return xe!=null?(ht=xe,Ct):ht},Ct.nodata=function(xe){return xe!=null?($=yr(xe),Ct):$},Ct};function t1(f,g,$){for(var M=[],V=f<g,q=$?V?g+1:g-1:g,B=f;V?B<q:B>q;V?B++:B--)M.push(B);return M}var ws=I,n1=zc,r1=function(f){for(var g=[1,1],$=1;$<f;$++){for(var M=[1],V=1;V<=g.length;V++)M[V]=(g[V]||0)+g[V-1];g=M}return g},o1=function(f){var g,$,M,V,q,B,ee;if(f=f.map(function(ke){return new ws(ke)}),f.length===2)g=f.map(function(ke){return ke.lab()}),q=g[0],B=g[1],V=function(ke){var qe=[0,1,2].map(function(Ke){return q[Ke]+ke*(B[Ke]-q[Ke])});return new ws(qe,"lab")};else if(f.length===3)$=f.map(function(ke){return ke.lab()}),q=$[0],B=$[1],ee=$[2],V=function(ke){var qe=[0,1,2].map(function(Ke){return(1-ke)*(1-ke)*q[Ke]+2*(1-ke)*ke*B[Ke]+ke*ke*ee[Ke]});return new ws(qe,"lab")};else if(f.length===4){var oe;M=f.map(function(ke){return ke.lab()}),q=M[0],B=M[1],ee=M[2],oe=M[3],V=function(ke){var qe=[0,1,2].map(function(Ke){return(1-ke)*(1-ke)*(1-ke)*q[Ke]+3*(1-ke)*(1-ke)*ke*B[Ke]+3*(1-ke)*ke*ke*ee[Ke]+ke*ke*ke*oe[Ke]});return new ws(qe,"lab")}}else if(f.length>=5){var pe,$e,Fe;pe=f.map(function(ke){return ke.lab()}),Fe=f.length-1,$e=r1(Fe),V=function(ke){var qe=1-ke,Ke=[0,1,2].map(function(ht){return pe.reduce(function(wt,It,Mt){return wt+$e[Mt]*Math.pow(qe,Fe-Mt)*Math.pow(ke,Mt)*It[ht]},0)});return new ws(Ke,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return V},a1=function(f){var g=o1(f);return g.scale=function(){return n1(g)},g},Kc=K,_r=function(f,g,$){if(!_r[$])throw new Error("unknown blend mode "+$);return _r[$](f,g)},$o=function(f){return function(g,$){var M=Kc($).rgb(),V=Kc(g).rgb();return Kc.rgb(f(M,V))}},So=function(f){return function(g,$){var M=[];return M[0]=f(g[0],$[0]),M[1]=f(g[1],$[1]),M[2]=f(g[2],$[2]),M}},s1=function(f){return f},i1=function(f,g){return f*g/255},l1=function(f,g){return f>g?g:f},c1=function(f,g){return f>g?f:g},u1=function(f,g){return 255*(1-(1-f/255)*(1-g/255))},d1=function(f,g){return g<128?2*f*g/255:255*(1-2*(1-f/255)*(1-g/255))},f1=function(f,g){return 255*(1-(1-g/255)/(f/255))},p1=function(f,g){return f===255?255:(f=255*(g/255)/(1-f/255),f>255?255:f)};_r.normal=$o(So(s1)),_r.multiply=$o(So(i1)),_r.screen=$o(So(u1)),_r.overlay=$o(So(d1)),_r.darken=$o(So(l1)),_r.lighten=$o(So(c1)),_r.dodge=$o(So(p1)),_r.burn=$o(So(f1));for(var h1=_r,Wc=v.type,m1=v.clip_rgb,v1=v.TWOPI,g1=Math.pow,y1=Math.sin,_1=Math.cos,jp=K,b1=function(f,g,$,M,V){f===void 0&&(f=300),g===void 0&&(g=-1.5),$===void 0&&($=1),M===void 0&&(M=1),V===void 0&&(V=[0,1]);var q=0,B;Wc(V)==="array"?B=V[1]-V[0]:(B=0,V=[V,V]);var ee=function(oe){var pe=v1*((f+120)/360+g*oe),$e=g1(V[0]+B*oe,M),Fe=q!==0?$[0]+oe*q:$,ke=Fe*$e*(1-$e)/2,qe=_1(pe),Ke=y1(pe),ht=$e+ke*(-.14861*qe+1.78277*Ke),wt=$e+ke*(-.29227*qe-.90649*Ke),It=$e+ke*(1.97294*qe);return jp(m1([ht*255,wt*255,It*255,1]))};return ee.start=function(oe){return oe==null?f:(f=oe,ee)},ee.rotations=function(oe){return oe==null?g:(g=oe,ee)},ee.gamma=function(oe){return oe==null?M:(M=oe,ee)},ee.hue=function(oe){return oe==null?$:($=oe,Wc($)==="array"?(q=$[1]-$[0],q===0&&($=$[1])):q=0,ee)},ee.lightness=function(oe){return oe==null?V:(Wc(oe)==="array"?(V=oe,B=oe[1]-oe[0]):(V=[oe,oe],B=0),ee)},ee.scale=function(){return jp.scale(ee)},ee.hue($),ee},w1=I,A1="0123456789abcdef",C1=Math.floor,$1=Math.random,S1=function(){for(var f="#",g=0;g<6;g++)f+=A1.charAt(C1($1()*16));return new w1(f,"hex")},qc=u,Vp=Math.log,I1=Math.pow,E1=Math.floor,T1=Math.abs,Up=function(f,g){g===void 0&&(g=null);var $={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return qc(f)==="object"&&(f=Object.values(f)),f.forEach(function(M){g&&qc(M)==="object"&&(M=M[g]),M!=null&&!isNaN(M)&&($.values.push(M),$.sum+=M,M<$.min&&($.min=M),M>$.max&&($.max=M),$.count+=1)}),$.domain=[$.min,$.max],$.limits=function(M,V){return Hp($,M,V)},$},Hp=function(f,g,$){g===void 0&&(g="equal"),$===void 0&&($=7),qc(f)=="array"&&(f=Up(f));var M=f.min,V=f.max,q=f.values.sort(function(Jc,Yc){return Jc-Yc});if($===1)return[M,V];var B=[];if(g.substr(0,1)==="c"&&(B.push(M),B.push(V)),g.substr(0,1)==="e"){B.push(M);for(var ee=1;ee<$;ee++)B.push(M+ee/$*(V-M));B.push(V)}else if(g.substr(0,1)==="l"){if(M<=0)throw new Error("Logarithmic scales are only possible for values > 0");var oe=Math.LOG10E*Vp(M),pe=Math.LOG10E*Vp(V);B.push(M);for(var $e=1;$e<$;$e++)B.push(I1(10,oe+$e/$*(pe-oe)));B.push(V)}else if(g.substr(0,1)==="q"){B.push(M);for(var Fe=1;Fe<$;Fe++){var ke=(q.length-1)*Fe/$,qe=E1(ke);if(qe===ke)B.push(q[qe]);else{var Ke=ke-qe;B.push(q[qe]*(1-Ke)+q[qe+1]*Ke)}}B.push(V)}else if(g.substr(0,1)==="k"){var ht,wt=q.length,It=new Array(wt),Mt=new Array($),Cn=!0,bn=0,Kn=null;Kn=[],Kn.push(M);for(var Ct=1;Ct<$;Ct++)Kn.push(M+Ct/$*(V-M));for(Kn.push(V);Cn;){for(var xe=0;xe<$;xe++)Mt[xe]=0;for(var rt=0;rt<wt;rt++)for(var gt=q[rt],mt=Number.MAX_VALUE,$n=void 0,Wt=0;Wt<$;Wt++){var Et=T1(Kn[Wt]-gt);Et<mt&&(mt=Et,$n=Wt),Mt[$n]++,It[rt]=$n}for(var Rt=new Array($),Lt=0;Lt<$;Lt++)Rt[Lt]=null;for(var Bt=0;Bt<wt;Bt++)ht=It[Bt],Rt[ht]===null?Rt[ht]=q[Bt]:Rt[ht]+=q[Bt];for(var br=0;br<$;br++)Rt[br]*=1/Mt[br];Cn=!1;for(var Io=0;Io<$;Io++)if(Rt[Io]!==Kn[Io]){Cn=!0;break}Kn=Rt,bn++,bn>200&&(Cn=!1)}for(var Eo={},Pa=0;Pa<$;Pa++)Eo[Pa]=[];for(var Ma=0;Ma<wt;Ma++)ht=It[Ma],Eo[ht].push(q[Ma]);for(var ro=[],Zo=0;Zo<$;Zo++)ro.push(Eo[Zo][0]),ro.push(Eo[Zo][Eo[Zo].length-1]);ro=ro.sort(function(Jc,Yc){return Jc-Yc}),B.push(ro[0]);for(var As=1;As<ro.length;As+=2){var ea=ro[As];!isNaN(ea)&&B.indexOf(ea)===-1&&B.push(ea)}}return B},zp={analyze:Up,limits:Hp},Kp=I,k1=function(f,g){f=new Kp(f),g=new Kp(g);var $=f.luminance(),M=g.luminance();return $>M?($+.05)/(M+.05):(M+.05)/($+.05)},Wp=I,no=Math.sqrt,on=Math.pow,x1=Math.min,P1=Math.max,qp=Math.atan2,Gp=Math.abs,Ni=Math.cos,Jp=Math.sin,M1=Math.exp,Yp=Math.PI,O1=function(f,g,$,M,V){$===void 0&&($=1),M===void 0&&(M=1),V===void 0&&(V=1);var q=function(ea){return 360*ea/(2*Yp)},B=function(ea){return 2*Yp*ea/360};f=new Wp(f),g=new Wp(g);var ee=Array.from(f.lab()),oe=ee[0],pe=ee[1],$e=ee[2],Fe=Array.from(g.lab()),ke=Fe[0],qe=Fe[1],Ke=Fe[2],ht=(oe+ke)/2,wt=no(on(pe,2)+on($e,2)),It=no(on(qe,2)+on(Ke,2)),Mt=(wt+It)/2,Cn=.5*(1-no(on(Mt,7)/(on(Mt,7)+on(25,7)))),bn=pe*(1+Cn),Kn=qe*(1+Cn),Ct=no(on(bn,2)+on($e,2)),xe=no(on(Kn,2)+on(Ke,2)),rt=(Ct+xe)/2,gt=q(qp($e,bn)),mt=q(qp(Ke,Kn)),$n=gt>=0?gt:gt+360,Wt=mt>=0?mt:mt+360,Et=Gp($n-Wt)>180?($n+Wt+360)/2:($n+Wt)/2,Rt=1-.17*Ni(B(Et-30))+.24*Ni(B(2*Et))+.32*Ni(B(3*Et+6))-.2*Ni(B(4*Et-63)),Lt=Wt-$n;Lt=Gp(Lt)<=180?Lt:Wt<=$n?Lt+360:Lt-360,Lt=2*no(Ct*xe)*Jp(B(Lt)/2);var Bt=ke-oe,br=xe-Ct,Io=1+.015*on(ht-50,2)/no(20+on(ht-50,2)),Eo=1+.045*rt,Pa=1+.015*rt*Rt,Ma=30*M1(-on((Et-275)/25,2)),ro=2*no(on(rt,7)/(on(rt,7)+on(25,7))),Zo=-ro*Jp(2*B(Ma)),As=no(on(Bt/($*Io),2)+on(br/(M*Eo),2)+on(Lt/(V*Pa),2)+Zo*(br/(M*Eo))*(Lt/(V*Pa)));return P1(0,x1(100,As))},Xp=I,N1=function(f,g,$){$===void 0&&($="lab"),f=new Xp(f),g=new Xp(g);var M=f.get($),V=g.get($),q=0;for(var B in M){var ee=(M[B]||0)-(V[B]||0);q+=ee*ee}return Math.sqrt(q)},R1=I,L1=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];try{return new(Function.prototype.bind.apply(R1,[null].concat(f))),!0}catch{return!1}},Qp=K,Zp=zc,D1={cool:function(){return Zp([Qp.hsl(180,1,.9),Qp.hsl(250,.7,.4)])},hot:function(){return Zp(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Ri={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Gc=0,eh=Object.keys(Ri);Gc<eh.length;Gc+=1){var th=eh[Gc];Ri[th.toLowerCase()]=Ri[th]}var B1=Ri,_n=K;_n.average=Qw,_n.bezier=a1,_n.blend=h1,_n.cubehelix=b1,_n.mix=_n.interpolate=Pp,_n.random=S1,_n.scale=zc,_n.analyze=zp.analyze,_n.contrast=k1,_n.deltaE=O1,_n.distance=N1,_n.limits=zp.limits,_n.valid=L1,_n.scales=D1,_n.colors=pp,_n.brewer=B1;var F1=_n;return F1})})(G_);var _O=G_.exports;const J_=Oy(_O),bO=["onClick"],wO=["data-writer-tooltip"],AO={key:1,class:"CoreTags__tag CoreTags__tag--empty"},CO=`
|
|
221
|
-
def handle_tag_click(state, payload):
|
|
222
|
-
state["selected_tag_id"] = payload`,$O="A component to display coloured tag pills.",SO={writer:{name:"Tags",description:$O,category:"Content",fields:{tags:{name:"Tags",desc:"Key-value object with tags. Must be a JSON string or a state reference to a dictionary.",type:Y.KeyValue,default:"{}"},referenceColor:{name:"Reference",desc:"The colour to be used as reference for chroma and luminance, and as the starting point for hue rotation.",type:Y.Color,default:$t.Blue5,category:ze.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:Y.Number,default:"1",category:ze.Style},rotateHue:{...xt,name:"Rotate hue",desc:"If active, rotates the hue depending on the content of the string. If turned off, the reference colour is always used.",default:"yes",category:ze.Style},primaryTextColor:Qt,cssClasses:tt},events:{"wf-tag-click":{desc:"Triggered when a tag is clicked.",stub:CO.trim(),eventPayloadExample:"tagKey"}},previewField:"text"}},IO=we({...SO,__name:"CoreTags",setup(e){vi(h=>({"3d4231f0":l.value?"pointer":"auto"}));const t=[{h:-78,s:-34,l:16},{h:-61,s:-37,l:16},{h:-2,s:0,l:24},{h:-12,s:0,l:29},{h:28,s:-20,l:24},{h:-61,s:-95,l:25},{h:-173,s:0,l:16},{h:-228,s:0,l:22},{h:69,s:0,l:25},{h:70,s:0,l:29}],n=ot("rootEl"),r=te(ne.evaluatedFields),o=te(ne.componentId),a=te(ne.core),s=te(ne.isBeingEdited),{isLinked:i}=jf(a,o,"wf-tag-click"),l=H(()=>{var m;return i.value?!0:typeof((m=a.getComponentById(o).handlers)==null?void 0:m["wf-tag-click"])<"u"});function u(h){if(!r.rotateHue.value)return r.referenceColor.value;const m=J_(r.referenceColor.value),_=t[c(h)];return m.set("hsl.h",`${Math.sign(_.h)==-1?"-":"+"}${Math.abs(_.h)}`).set("hsl.s",`${Math.sign(_.s)==-1?"-":"+"}${Math.abs(_.s/100)}`).set("hsl.l",`${Math.sign(_.l)==-1?"-":"+"}${Math.abs(_.l/100)}`).css()}function c(h){let m=r.seed.value*52673&4294967295;for(let v=0;v<h.length;v++)m=(v+1)*h.charCodeAt(v)^m&4294967295;return Math.abs(m)%t.length}function d(h){const m=new CustomEvent("wf-tag-click",{detail:{payload:h}});n.value.dispatchEvent(m)}return(h,m)=>O(s)||Object.entries(O(r).tags.value??[]).length>0?(k(),L("div",{key:0,ref_key:"rootEl",ref:n,class:"CoreTags"},[Object.entries(O(r).tags.value??[]).length>0?(k(!0),L(We,{key:0},Pt(O(r).tags.value,(_,v)=>(k(),L("p",{key:v,class:"CoreTags__tag",style:_t({background:u(v)}),onClick:w=>d(v)},[F("span",{"data-writer-tooltip":_,"data-writer-tooltip-strategy":"overflow"},Ee(_),9,wO)],12,bO))),128)):(k(),L("p",AO,m[0]||(m[0]=[F("span",null,"Empty Tags",-1)])))],512)):ve("",!0)}}),EO=Ie(IO,[["__scopeId","data-v-b37299ed"]]),TO={key:0,class:"material-symbols-outlined"},kO={class:"info"},xO={key:1,class:"caption"},PO={class:"container","data-writer-container":""},MO=`
|
|
223
|
-
def handle_avatar_click():
|
|
224
|
-
print("The avatar was clicked")`,OO="A component to display user avatars.",NO={writer:{name:"Avatar",description:OO,category:"Content",allowedChildrenTypes:["*"],fields:{name:{name:"Name",type:Y.Text},imageSrc:{name:"Image source",desc:"A valid URL. Alternatively, you can provide a state reference to a packed file.",type:Y.Text},caption:{name:"Caption",desc:"Add an optional caption under the name, such as the person's job title.",type:Y.Text},size:{name:"Size",type:Y.Text,options:{small:"Small",medium:"Medium",large:"Large"},default:"medium",category:ze.Style},orientation:{name:"Orientation",type:Y.Text,options:{horizontal:"Horizontal",vertical:"Vertical"},default:"horizontal",category:ze.Style},primaryTextColor:Qt,secondaryTextColor:mr,separatorColor:cn,cssClasses:tt},events:{"wf-click":{desc:"Triggered when the avatar is clicked.",stub:MO.trim()}},previewField:"text"}},RO=we({...NO,__name:"CoreAvatar",setup(e){vi(l=>({84668864:a.value?"pointer":"auto"}));const t=ot("rootEl"),n=te(ne.evaluatedFields),r=te(ne.componentId),o=te(ne.core),a=H(()=>{var u;return typeof((u=o.getComponentById(r).handlers)==null?void 0:u["wf-click"])<"u"}),s=H(()=>({backgroundImage:n.imageSrc.value?`url(${n.imageSrc.value})`:"none",cursor:a.value?"pointer":"auto"}));function i(l){const u=wi(l);t.value.dispatchEvent(u)}return(l,u)=>(k(),L("div",{ref_key:"rootEl",ref:t,class:ut(["CoreAvatar",[O(n).size.value,O(n).orientation.value]])},[F("div",{class:"image",style:_t(s.value),onClick:i},[O(n).imageSrc.value?ve("",!0):(k(),L("i",TO," account_circle "))],4),F("div",kO,[O(n).name.value?(k(),L("div",{key:0,class:"name",onClick:i},Ee(O(n).name.value),1)):ve("",!0),O(n).caption.value?(k(),L("div",xO,Ee(O(n).caption.value),1)):ve("",!0),F("div",PO,[Vt(l.$slots,"default",{},void 0,!0)])])],2))}}),LO=Ie(RO,[["__scopeId","data-v-f433e0c3"]]),DO={key:0,class:"material-symbols-outlined"},Vm=we({__name:"SharedButtonCopyClipboard",props:{label:{type:String,required:!0},content:{type:String,required:!0}},setup(e){const t=e;Ue(po(t,"content"),()=>r.value=!1);const n=Ae(!1),r=Ae(!1);let o;async function a(){o&&(clearTimeout(o),o=void 0),n.value=!0;try{await navigator.clipboard.writeText(t.content),r.value=!0,o=setTimeout(()=>{r.value=!1,o=void 0},3e3)}catch(s){wn().error(s)}finally{n.value=!1}}return _o(()=>{o&&clearTimeout(o)}),(s,i)=>(k(),Oe(Rn,{size:"small",variant:"tertiary",loading:n.value,onClick:a},{default:Je(()=>[r.value?(k(),L("span",DO," check_circle ")):ve("",!0),tn(" "+Ee(r.value?"Copied to clipboard":e.label),1)]),_:1},8,["loading"]))}}),BO={class:"SharedControlBar"},FO=we({__name:"SharedControlBar",props:{copyRawContent:{type:String,required:!1,default:void 0},copyStructuredContent:{type:String,required:!1,default:void 0}},setup(e){const t=e;return(n,r)=>(k(),L("div",BO,[t.copyStructuredContent?(k(),Oe(Vm,{key:0,label:"Copy JSON",content:t.copyStructuredContent},null,8,["content"])):ve("",!0),t.copyRawContent?(k(),Oe(Vm,{key:1,label:"Copy",content:t.copyRawContent},null,8,["content"])):ve("",!0)]))}}),Y_=Ie(FO,[["__scopeId","data-v-1464e278"]]),jO={key:0,class:"CoreAnnotatedText"},VO={key:0,class:"CoreAnnotatedText__annotation__subject"},UO={writer:{name:"Annotated text",description:"Shows text with annotations",category:"Content",fields:{text:{name:"Annotated text",type:Y.Object,desc:"Value array with text/annotations. Must be a JSON string or a state reference to an array.",init:`["This ",["is", "Verb"]," some ",["annotated", "Adjective"], ["text", "Noun"]," for those of ",["you", "Pronoun"]," who ",["like", "Verb"]," this sort of ",["thing", "Noun"],". ","And here's a ",["word", "", "#faf"]," with a fancy background but no label."]`,validator:J2},referenceColor:{name:"Reference",desc:"The colour to be used as reference for chroma and luminance, and as the starting point for hue rotation.",type:Y.Color,default:$t.Blue5,category:ze.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:Y.Number,default:"1",category:ze.Style},rotateHue:{...xt,name:"Rotate hue",desc:"If active, rotates the hue depending on the content of the string. If turned off, the reference colour is always used.",default:"yes",category:ze.Style},useMarkdown:{...xt,name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no"},copyButtons:{...xt,name:"Copy buttons",desc:"If active, adds a control bar with both copy text and JSON buttons.",default:"no",category:ze.Style},buttonColor:Zr,buttonTextColor:eo,primaryTextColor:Qt,cssClasses:tt},previewField:"data"}},HO=we({...UO,__name:"CoreAnnotatedText",setup(e){const t=te(ne.evaluatedFields),n=H(()=>t.text.value??[]),r=te(ne.isBeingEdited),o=te(ne.componentId),a=H(()=>!t.text.value),s=H(()=>!a.value||r.value),i=H(()=>!!t.useMarkdown.value),l=[{h:-78,s:-34,l:16},{h:-61,s:-37,l:16},{h:-2,s:0,l:24},{h:-12,s:0,l:29},{h:28,s:-20,l:24},{h:-61,s:-95,l:25},{h:-173,s:0,l:16},{h:-228,s:0,l:22},{h:69,s:0,l:25},{h:70,s:0,l:29}];let u=[...l],c={},d=t.seed.value;function h(){const p=Ae("");Ue([i,n],async()=>{if(!i.value)return p.value="";p.value=await I()},{immediate:!0});function b(D){const[K,G]=D,Z=G?`<span class="CoreAnnotatedText__annotation__subject">${G}</span>`:"";return`<span class="CoreAnnotatedText__annotation" style="background: ${w(D)}">${K}${Z}</span>`}async function I(){const D=n.value.reduce((G,Z)=>typeof Z=="string"?`${G} ${Z}`:Array.isArray(Z)?`${G} ${b(Z)}`:G,"");return await(await en(()=>import("./marked.esm-273vDTCT.js"),[],import.meta.url)).parse(D)}return In(p)}const m=h();function _(p,b){return p.set("hsl.h",`${Math.sign(b.h)==-1?"-":"+"}${Math.abs(b.h)}`).set("hsl.s",`${Math.sign(b.s)==-1?"-":"+"}${Math.abs(b.s/100)}`).set("hsl.l",`${Math.sign(b.l)==-1?"-":"+"}${Math.abs(b.l/100)}`).css()}function v(p,b=l.length){let I=t.seed.value*52673&4294967295;for(let K=0;K<p.length;K++)I=(K+1)*p.charCodeAt(K)^I&4294967295;return Math.abs(I)%b}function w(p){return p[2]||A(p[1])}function A(p){if(!t.rotateHue.value)return t.referenceColor.value;const b=J_(t.referenceColor.value);if(d!==t.seed.value&&(u=[...l],c={},d=t.seed.value),c[p])return _(b,c[p]);u.length===0&&(u=[...l]);const I=v(p,u.length),D=u[I];return c[p]=D,u.splice(I,1),_(b,D)}const C=H(()=>n.value.reduce((p,b)=>typeof b=="string"?p+b:p+b[0],"")),y=H(()=>{try{return JSON.stringify(n.value)}catch{return n.value.join("")}});return(p,b)=>s.value?(k(),L("div",jO,[i.value?(k(),Oe(gy,{key:0,"raw-markdown":O(m),class:"CoreAnnotatedText__markdown"},null,8,["raw-markdown"])):(k(),L(We,{key:1},[a.value?(k(),Oe(Vf,{key:0,"component-id":O(o)},null,8,["component-id"])):ve("",!0),(k(!0),L(We,null,Pt(n.value,(I,D)=>(k(),L("span",{key:String(I)+D},[typeof I=="string"?(k(),L(We,{key:0},[tn(Ee(I),1)],64)):ve("",!0),Array.isArray(I)?(k(),L("span",{key:1,class:"CoreAnnotatedText__annotation",style:_t({backgroundColor:w(I)})},[tn(Ee(I[0])+" ",1),I[1]?(k(),L("span",VO,Ee(I[1]),1)):ve("",!0)],4)):ve("",!0)]))),128))],64)),O(t).copyButtons.value?(k(),Oe(Y_,{key:2,"copy-raw-content":C.value,"copy-structured-content":y.value},null,8,["copy-raw-content","copy-structured-content"])):ve("",!0)])):ve("",!0)}}),zO=Ie(HO,[["__scopeId","data-v-a82b769f"]]);function bc(e){return!!(["string","number","boolean"].includes(typeof e)||e===null)}function Uf(e){return bc(e)?!1:Array.isArray(e)}function X_(e){return!Uf(e)&&typeof e=="object"&&e!==null}function Q_(e){return bc(e)?1:Object.keys(e).length}function Z_(e){return typeof e.open=="boolean"&&Array.isArray(e.path)}const KO=["open","disabled"],WO={class:"SharedCollapsible__summary"},qO={key:0,class:"SharedCollapsible__summary__icon material-symbols-outlined"},GO={class:"content"},JO=we({__name:"SharedCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},icons:{type:Object,required:!1,default:void 0}},emits:{toggle:e=>typeof e=="boolean"},setup(e,{emit:t}){const n=e,r=t,o=Ae(n.open);Ue(po(n,"open"),i=>o.value=i);const a=H(()=>{if(n.icons!==void 0)return o.value?n.icons.open:n.icons.close});function s(i){const l=i.newState==="open";o.value=l,r("toggle",l)}return(i,l)=>(k(),L("details",{class:ut(["SharedCollapsible",{"SharedCollapsible--customMarker":e.icons}]),open:o.value,disabled:e.disabled,onToggle:s},[F("summary",WO,[e.icons?(k(),L("span",qO,Ee(a.value),1)):ve("",!0),Vt(i.$slots,"title",{},void 0,!0)]),F("div",GO,[Vt(i.$slots,"content",{},void 0,!0)])],42,KO))}}),YO=Ie(JO,[["__scopeId","data-v-ef5bb8f8"]]),XO=we({__name:"SharedJsonViewerChildrenCounter",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=a=>`Object{${a}}`,r=a=>`Array[${a}]`,o=H(()=>{const a=Q_(t.data);return a===0?n(0):Uf(t.data)?r(a):X_(t.data)?n(a):n(0)});return(a,s)=>(k(),L("span",null,Ee(o.value),1))}}),eb=Ie(XO,[["__scopeId","data-v-2641ae29"]]),QO={class:"SharedJsonViewerCollapsible__title"},ZO={key:0},eN={class:"SharedJsonViewerCollapsible__content"},tN=we({__name:"SharedJsonViewerCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},title:{type:String,required:!1,default:void 0},data:{type:[String,Number,Boolean,Object,Array,null],required:!1,default:void 0}},emits:{toggle:e=>typeof e=="boolean"},setup(e){return(t,n)=>(k(),Oe(YO,{open:e.open,disabled:e.disabled,icons:{open:"keyboard_arrow_right",close:"keyboard_arrow_down"},onToggle:n[0]||(n[0]=r=>t.$emit("toggle",r))},{title:Je(()=>[F("div",QO,[e.title?(k(),L("span",ZO,Ee(e.title),1)):ve("",!0),e.data?(k(),Oe(eb,{key:1,data:e.data},null,8,["data"])):ve("",!0)])]),content:Je(()=>[F("div",eN,[Vt(t.$slots,"default",{},void 0,!0)])]),_:3},8,["open","disabled"]))}}),tb=Ie(tN,[["__scopeId","data-v-746fb4ae"]]),nN={class:"SharedJsonViewerValue"},rN=we({__name:"SharedJsonViewerValue",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=H(()=>JSON.stringify(t.data));return(r,o)=>(k(),L("span",nN,Ee(n.value),1))}}),nb=Ie(rN,[["__scopeId","data-v-496a5553"]]),oN={class:"SharedJsonViewerObject"},aN={key:0,class:"SharedJsonViewerObject__value"},sN=we({__name:"SharedJsonViewerObject",props:{data:{type:[Object,Array],required:!0},path:{type:Array,default:()=>[]},initialDepth:{type:Number,default:0}},emits:{toggle:Z_},setup(e,{emit:t}){const n=e,r=po(n,"initialDepth"),o=t,a=Ae([]),s=H(()=>n.path.length+1);Ue(r,()=>{if(r.value===0){a.value=[];return}if(!(r.value===-1||r.value>s.value))return;const c=new Set([...a.value,...Object.keys(n.data)]);a.value=Array.from(c)},{immediate:!0});function i(u,c){c?a.value=[...a.value,u]:a.value=a.value.filter(d=>d!==u),o("toggle",{open:c,path:[...n.path,u]})}function l(u){return a.value.includes(String(u))}return(u,c)=>(k(),L("div",oN,[(k(!0),L(We,null,Pt(Object.entries(e.data),([d,h],m)=>(k(),L(We,{key:m},[O(bc)(h)||O(Q_)(h)===0?(k(),L("div",aN,[F("span",null,Ee(d),1),c[1]||(c[1]=tn(": ")),Le(nb,{data:h},null,8,["data"])])):(k(),Oe(tb,{key:1,open:l(d),title:d,data:h,onToggle:_=>i(d,_)},{default:Je(()=>[l(d)?(k(),Oe(rb,{key:0,data:h,path:[...e.path,d],"initial-depth":r.value,onToggle:c[0]||(c[0]=_=>u.$emit("toggle",_))},null,8,["data","path","initial-depth"])):ve("",!0)]),_:2},1032,["open","title","data","onToggle"]))],64))),128))]))}}),Um=Ie(sN,[["__scopeId","data-v-eb3b38f1"]]),rb=we({__name:"SharedJsonViewer",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0},path:{type:Array,default:()=>[]},hideRoot:{type:Boolean,required:!1},initialDepth:{type:Number,default:0},enableCopyToJson:{type:Boolean,required:!1}},emits:{toggle:Z_},setup(e){const t=e,n=H(()=>t.path.length===0&&!t.hideRoot),r=H(()=>t.initialDepth===-1||t.initialDepth>0),o=H(()=>t.data===void 0?JSON.stringify(null):JSON.stringify(t.data));return(a,s)=>(k(),L(We,null,[O(X_)(e.data)||O(Uf)(e.data)?(k(),L(We,{key:0},[n.value?(k(),Oe(tb,{key:0,open:r.value,data:e.data,onToggle:s[1]||(s[1]=i=>a.$emit("toggle",{path:[],open:i}))},{default:Je(()=>[Le(Um,{data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:s[0]||(s[0]=i=>a.$emit("toggle",i))},null,8,["data","path","initial-depth"])]),_:1},8,["open","data"])):(k(),Oe(Um,{key:1,data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:s[2]||(s[2]=i=>a.$emit("toggle",i))},null,8,["data","path","initial-depth"]))],64)):O(bc)(e.data)?(k(),Oe(nb,{key:1,data:e.data},null,8,["data"])):(k(),Oe(eb,{key:2,data:{}})),e.enableCopyToJson?(k(),Oe(Y_,{key:3,"copy-structured-content":o.value},null,8,["copy-structured-content"])):ve("",!0)],64))}}),iN={class:"CoreJsonViewer"},lN="A component to explore JSON data as a hierarchy.",cN={name:"JSON Viewer",description:"A JSON tree viewer where you can expand the keys.",sample:{description:"This sample is opened by default",bool:!0,null:null,list:[1,"two",{key:3}]},sampleClosed:{description:"This sample is not opened by default"},createdAt:new Date},uN={name:"JSON Viewer",description:lN,category:"Content",fields:{data:{name:"Data",init:JSON.stringify(cN),type:Y.Object},initialDepth:{name:"Initial depth",desc:"Sets the initial viewing depth of the JSON tree hierarchy. Use -1 to display the full hierarchy.",type:Y.Number,init:"0",validator:Xn},hideRoot:{...xt,name:"Hide root",desc:"Don't show the type of the root node when it's an Object or an Array.",default:"no",category:ze.Style},copy:{...xt,name:"Copy",desc:"If active, adds a control bar with copy JSON button.",default:"no",category:ze.Style},jsonViewerIndentationSpacing:{name:"JSON indentation",type:Y.Width,category:ze.Style,applyStyleVariable:!0,validator:x_},secondaryTextColor:mr,separatorColor:cn,cssClasses:tt},previewField:"data"},dN={writer:uN},fN=we({...dN,__name:"CoreJsonViewer",setup(e){const t=te(ne.evaluatedFields),n=H(()=>t.data.value),r=H(()=>Number(t.initialDepth.value)||0);return(o,a)=>(k(),L("div",iN,[Le(rb,{data:n.value??{},"initial-depth":r.value,"enable-copy-to-json":O(t).copy.value,"hide-root":O(t).hideRoot.value},null,8,["data","initial-depth","enable-copy-to-json","hide-root"])]))}});function pN(e,t={minimumFractionDigits:0,maximumFractionDigits:1}){const n=new Intl.NumberFormat(void 0,{style:"percent",...t});return H(()=>n.format(e.value))}const hN=["aria-valuetext","aria-valuemin","aria-valuemax","aria-valuenow","aria-busy","tabindex"],mN={key:0,class:"CoreProgressBar__title"},vN={key:0,class:"CoreProgressBar__title__label"},gN={key:1,class:"CoreProgressBar__title__progress"},yN={class:"CoreProgressBar__bar"},_N=`
|
|
225
|
-
def handle_progress_bar_click():
|
|
226
|
-
print("The progress bar was clicked")`,bN="A component to display a progression.",wN={name:"Progress Bar",description:bN,category:"Content",allowedChildrenTypes:["*"],fields:{label:{name:"Label",type:Y.Text,default:""},value:{name:"Value",type:Y.Number},min:{name:"Minimum value",type:Y.Number,default:"0"},max:{name:"Maximum value",type:Y.Number,default:"1"},displayPercentage:{...xt,name:"Display percentage",default:"no",category:ze.Style},accentColor:vn,primaryTextColor:Qt,separatorColor:cn,cssClasses:tt},events:{"wf-click":{desc:"Triggered when the progress bar is clicked.",stub:_N.trim()}}},AN={writer:wN},CN=we({...AN,__name:"CoreProgressBar",setup(e){const t=ot("rootEl"),n=te(ne.evaluatedFields),r=te(ne.componentId),o=te(ne.core),a=H(()=>{var v;return String((v=n.label)==null?void 0:v.value)}),s=H(()=>Number(n.value.value)),i=H(()=>Number(n.min.value)),l=H(()=>Number(n.max.value)),u=H(()=>!!n.displayPercentage.value),c=H(()=>{if(!(s.value===void 0||Number.isNaN(s.value)))return(s.value-i.value)/(l.value-i.value)}),d=pN(c),h=H(()=>({width:c.value===void 0?void 0:`${c.value*100}%`})),m=H(()=>{var w;return typeof((w=o.getComponentById(r).handlers)==null?void 0:w["wf-click"])<"u"});function _(v){if(!m.value)return;const w=wi(v);t.value.dispatchEvent(w)}return(v,w)=>(k(),L("div",{ref_key:"rootEl",ref:t,class:ut(["CoreProgressBar",{"CoreProgressBar--clickable":m.value}]),role:"progressbar","aria-valuetext":c.value===void 0?null:O(d),"aria-valuemin":i.value,"aria-valuemax":l.value,"aria-valuenow":c.value===void 0?null:s.value,"aria-busy":c.value<1||c.value===void 0,tabindex:m.value?"0":null,onKeydown:vo(_,["enter"]),onClick:_},[a.value||u.value?(k(),L("div",mN,[a.value?(k(),L("label",vN,Ee(a.value),1)):ve("",!0),u.value&&c.value!==void 0?(k(),L("span",gN,Ee(O(d)),1)):ve("",!0)])):ve("",!0),F("div",yN,[F("div",{class:ut(["CoreProgressBar__bar__value",{"CoreProgressBar__bar__value--indeterminate":c.value===void 0}]),style:_t(h.value)},null,6)])],42,hN))}}),$N=Ie(CN,[["__scopeId","data-v-873bd788"]]);function wc(e){const t=/[\\]?@{([^}]*)}/g;function n(u,c){var v;let d=[],h="",m=0,_=0;for(;_<u.length;){const w=u.charAt(_);w=="\\"?_+1<u.length&&(h+=u.charAt(_+1),_++):w=="."?m==0?(d.push(h),h=""):h+=w:w=="["?(m==0?(d.push(h),h=""):h+=w,m++):w=="]"?(m--,m==0?h=(v=r(h,c))==null?void 0:v.toString():h+=w):h+=w,_++}return h&&d.push(h),d}function r(u,c){let h=c?o(c):void 0,m=e.userState.value;const _=n(u,c);for(let v=0;v<_.length;v++)h=h==null?void 0:h[_[v]],m=m==null?void 0:m[_[v]];return h??m}function o(u){var d,h;const c={};for(let m=0;m<u.length-1;m++){const _=u[m],{componentId:v}=_,{type:w}=e.getComponentById(v);if(w!=="repeater"||m+1>=u.length)continue;const A=u.slice(0,m+1),C=u.slice(0,m+2),{instanceNumber:y}=C.at(-1),p=i(A,"repeaterObject");if(!p)continue;const b=Object.entries(p),I=i(A,"keyVariable"),D=i(A,"valueVariable");c[I]=(d=b[y])==null?void 0:d[0],c[D]=(h=b[y])==null?void 0:h[1]}return c}function a(u,c){return u==null?"":u.replace(t,(h,m)=>{if(h.charAt(0)=="\\")return h.substring(1);const _=m.trim();if(!_)return"";const v=r(_,c);return typeof v>"u"?"":typeof v=="object"?JSON.stringify(v):v.toString()})}function s(u){const{componentId:c}=u.at(-1),d=e.getComponentById(c);if(!d)return;const h={},{fields:m}=e.getComponentDefinition(d.type);if(m)return Object.keys(m).forEach(_=>{h[_]=H(()=>i(u,_))}),h}function i(u,c){var y;const{componentId:d}=u.at(-1),h=e.getComponentById(d);if(!h)return;const{fields:m}=e.getComponentDefinition(h.type),_=(y=h.content)==null?void 0:y[c],v=m[c].default,w=a(_,u),A=m[c].type,C=typeof w>"u"||w===null||w==="";if(A==Y.Object||A==Y.KeyValue||A==Y.Tools){if(!w)return JSON.parse(v??null);if(typeof w!="string")return w;let p;try{p=JSON.parse(w)}catch{return JSON.parse(v??null)}return p}else if(A==Y.Number){const p=v===null?null:parseFloat(v);if(C)return p??null;const b=parseFloat(w);return typeof b>"u"||Number.isNaN(b)?p??null:b}else if(A==Y.Boolean){const p=C?v:w;return p==="yes"||p==="true"}else return A==Y.IdKey?_:C?v??"":w}function l(u,c){const d=e.getComponentById(u);if(!d)return;if(typeof d.visible>"u"||d.visible.expression===!0)return!0;if(d.visible.expression===!1)return!1;const h=r(d.visible.binding,c);return d.visible.reversed===!0?!h:!!h}return{getEvaluatedFields:s,isComponentVisible:l,evaluateExpression:r}}function An(e,t,n,r=""){const o=Ae(),a=Ae(!1),s=Ae(null),i=t.at(-1).componentId,l=H(()=>e.getComponentById(i)),{evaluateExpression:u}=wc(e);function c(){var m;const h=e.getComponentById(i);if((m=h==null?void 0:h.binding)!=null&&m.stateRef)return u(h.binding.stateRef,t)}function d(h,m,_){var p,b;o.value=h;const v=(p=l.value.handlers)==null?void 0:p[m],w=((b=l.value.binding)==null?void 0:b.eventType)==m,A=jf(e,i,m).isLinked.value;if(!v&&!w&&!A)return;if(a.value){s.value={eventValue:h,emitEventType:m};return}a.value=!0;const C=()=>{a.value=!1,s.value&&(d(s.value.eventValue,s.value.emitEventType),s.value=null),_==null||_()},y=new CustomEvent(m,{detail:{payload:h,callback:C}});n.value instanceof HTMLElement?n.value.dispatchEvent(y):n.value.$el.dispatchEvent(y)}return Ue(()=>c(),h=>{a.value||(o.value=h)},{immediate:!0}),Ue(o,h=>{typeof h>"u"&&(o.value=r)},{immediate:!0}),{formValue:o,handleInput:d}}const SN={key:0},IN=we({__name:"BaseInputWrapper",props:{label:{type:String,required:!1,default:void 0},isHorizontal:{type:Boolean,required:!1}},setup(e){return(t,n)=>(k(),L("div",{ref:"rootEl",class:ut(["BaseInputWrapper",{horizontal:e.isHorizontal}])},[e.label?(k(),L("label",SN,Ee(e.label),1)):ve("",!0),Vt(t.$slots,"default",{},void 0,!0)],2))}}),Bn=Ie(IN,[["__scopeId","data-v-1cbc4730"]]),EN=["checked","value"],TN=["for"],Hm={a:"Option A",b:"Option B"},kN="A user input component that allows users to choose multiple values from a list of options using checkboxes.",xN=`
|
|
227
|
-
def onchange_handler(state, payload):
|
|
228
|
-
|
|
229
|
-
# Set the state variable "selected" to the selected options.
|
|
230
|
-
# The payload will be a list, as multiple options are allowed.
|
|
231
|
-
|
|
232
|
-
state["selected"] = payload`,PN={writer:{name:"Checkbox Input",description:kN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:Y.KeyValue,default:JSON.stringify(Hm,null,2),validator:Wo},orientation:{name:"Orientation",type:Y.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:ze.Style,desc:"Specify how to lay out the options."},primaryTextColor:Qt,accentColor:vn,cssClasses:tt},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:xN.trim(),bindable:!0,eventPayloadExample:Object.keys(Hm)}}}},MN=we({...PN,__name:"CoreCheckboxInput",setup(e){const t=te(ne.evaluatedFields),n=Ae(null),r=te(ne.core),o=te(ne.instancePath),a=te(ne.flattenedInstancePath),{formValue:s,handleInput:i}=An(r,o,n);function l(){return n.value?Array.from(n.value.$el.querySelectorAll('input[type="checkbox"]')).map(d=>d.checked?d.value:void 0).filter(d=>typeof d<"u"):void 0}return(u,c)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:O(t).label.value,class:"CoreCheckboxInput"},{default:Je(()=>[F("div",{class:ut(["options",{horizontal:O(t).orientation.value=="horizontal"}])},[(k(!0),L(We,null,Pt(O(t).options.value,(d,h)=>(k(),L("div",{key:h,class:"option"},[F("input",{type:"checkbox",checked:Array.isArray(O(s))?O(s).includes(h):!1,value:h,onInput:c[0]||(c[0]=m=>O(i)(l(),"wf-options-change"))},null,40,EN),F("label",{for:`${O(a)}-option-${h}`},Ee(d),9,TN)]))),128))],2)]),_:1},8,["label"]))}}),ON=Ie(MN,[["__scopeId","data-v-c48ee644"]]),NN=["value","list"],RN=["id"],LN=we({__name:"BaseInputColor",props:{value:{type:String,required:!1,default:void 0},customColors:{type:Array,default:()=>[]}},emits:{"update:value":e=>typeof e=="string",change:e=>typeof e=="string"},setup(e,{emit:t}){const n=e,r=t,o=ot("pickerEl"),a=te(ne.flattenedInstancePath),s=H(()=>{var u;return(u=n.customColors)!=null&&u.length?`${a}_datalist`:null});function i(u){r("update:value",u.target.value)}function l(u){r("change",u.target.value)}return(u,c)=>(k(),L(We,null,[F("input",{ref_key:"pickerEl",ref:o,type:"color",class:"BaseInputColor",value:e.value,list:s.value,onInput:i,onChange:l},null,40,NN),s.value?(k(),L("datalist",{key:0,id:s.value},[(k(!0),L(We,null,Pt(e.customColors,d=>(k(),L("option",{key:d},Ee(d),1))),128))],8,RN)):ve("",!0)],64))}}),DN=Ie(LN,[["__scopeId","data-v-ba449f16"]]),BN="A user input component that allows users to select a color using a color picker interface.",zm=`
|
|
233
|
-
def onchange_handler(state, payload):
|
|
234
|
-
|
|
235
|
-
# Set the state variable "new_color" to the new value, provided as string.
|
|
236
|
-
|
|
237
|
-
state["new_color"] = payload`,FN={name:"Color Input",description:BN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},colorList:{name:"Color List",desc:"List of predefined colors",type:Y.Object,init:JSON.stringify([$t.Blue5,$t.Green5,$t.Orange5,$t.Gray6,$t.Blue4]),validator:P_},cssClasses:tt},events:{"wf-change":{desc:"Capture changes as they happen.",stub:zm,bindable:!0,eventPayloadExample:$t.Blue5},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:zm,eventPayloadExample:$t.Blue5}}},jN={writer:FN},VN=we({...jN,__name:"CoreColorInput",setup(e){const t=te(ne.evaluatedFields),n=Ae(null),r=te(ne.core),o=te(ne.instancePath),a=H(()=>Array.isArray(t.colorList.value)?t.colorList.value:void 0),{formValue:s,handleInput:i}=An(r,o,n);return(l,u)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:O(t).label.value,class:"CoreColorInput"},{default:Je(()=>[Le(DN,{value:O(s),"custom-colors":a.value,"onUpdate:value":u[0]||(u[0]=c=>O(i)(c,"wf-change")),onChange:u[1]||(u[1]=c=>O(i)(c,"wf-change-finish"))},null,8,["value","custom-colors"])]),_:1},8,["label"]))}}),UN=Ie(VN,[["__scopeId","data-v-f4b5e938"]]),HN=["value"],zN="A user input component that allows users to select a date using a date picker interface.",KN=`
|
|
238
|
-
def onchange_handler(state, payload):
|
|
239
|
-
|
|
240
|
-
# Set the state variable "new_date" to the new value, provided as a YYYY-MM-DD string.
|
|
241
|
-
|
|
242
|
-
state["new_date"] = payload`,WN={writer:{name:"Date Input",description:zN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},cssClasses:tt},events:{"wf-date-change":{desc:"Capture changes to this control.",stub:KN,bindable:!0,eventPayloadExample:new Date().toISOString().split("T")[0]}}}},qN=we({...WN,__name:"CoreDateInput",setup(e){const t=te(ne.evaluatedFields),n=Ae(null),r=te(ne.core),o=te(ne.instancePath),{formValue:a,handleInput:s}=An(r,o,n);return(i,l)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:O(t).label.value,class:"CoreDateInput"},{default:Je(()=>[F("input",{type:"date",value:O(a),onChange:l[0]||(l[0]=u=>O(s)(u.target.value,"wf-date-change"))},null,40,HN)]),_:1},8,["label"]))}}),GN=Ie(qN,[["__scopeId","data-v-d6140e2d"]]),JN=we({__name:"WdsDropdownInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Yr(e,"modelValue");return(n,r)=>Dn((k(),L("select",{"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),class:"WdsDropdownInput colorTransformer"},[Vt(n.$slots,"default",{},void 0,!0)],512)),[[Dd,t.value]])}}),ob=Ie(JN,[["__scopeId","data-v-a262dc28"]]),YN=["value"],XN="A user input component that allows users to select a single value from a list of options using a dropdown menu.",Km={a:"Option A",b:"Option B"},QN=`
|
|
243
|
-
def onchange_handler(state, payload):
|
|
244
|
-
|
|
245
|
-
# Set the state variable "selected" to the selected option
|
|
246
|
-
|
|
247
|
-
state["selected"] = payload`,ZN={writer:{name:"Dropdown Input",description:XN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:Y.KeyValue,default:JSON.stringify(Km,null,2),validator:Wo},cssClasses:tt},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:QN.trim(),bindable:!0,eventPayloadExample:Object.keys(Km)[0]}}}},eR=we({...ZN,__name:"CoreDropdownInput",setup(e){const t=te(ne.evaluatedFields),n=Ae(null),r=te(ne.core),o=te(ne.instancePath),{formValue:a,handleInput:s}=An(r,o,n);return(i,l)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:O(t).label.value,class:"CoreDropdownInput"},{default:Je(()=>[Le(ob,{modelValue:O(a),"onUpdate:modelValue":l[0]||(l[0]=u=>sn(a)?a.value=u:null),onInput:l[1]||(l[1]=u=>O(s)(u.target.value,"wf-option-change"))},{default:Je(()=>[(k(!0),L(We,null,Pt(O(t).options.value,(u,c)=>(k(),L("option",{key:c,value:c},Ee(u),9,YN))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]))}}),tR=Ie(eR,[["__scopeId","data-v-8e1a01b0"]]),nR={class:"main"},rR={key:0,class:"file-input"},oR=["multiple","accept"],aR={key:0,class:"file-input__files"},sR=["onClick"],iR={key:1},lR={key:1,class:"status"},cR={key:1},uR={key:2},Wm=200*1024*1024,dR="A user input component that allows users to upload files.",fR=`
|
|
248
|
-
def onchange_handler(state, payload):
|
|
249
|
-
|
|
250
|
-
# An array of dictionaries is provided in the payload
|
|
251
|
-
# The dictionaries have the properties name, type and data
|
|
252
|
-
# The data property is a file-like object
|
|
253
|
-
|
|
254
|
-
uploaded_files = payload
|
|
255
|
-
for i, uploaded_file in enumerate(uploaded_files):
|
|
256
|
-
name = uploaded_file.get("name")
|
|
257
|
-
file_data = uploaded_file.get("data")
|
|
258
|
-
with open(f"{name}-{i}.jpeg", "wb") as file_handle:
|
|
259
|
-
file_handle.write(file_data)`.trim(),pR={writer:{name:"File Input",description:dR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},allowFileTypes:{name:"Allowed file types",type:Y.Text,init:[".pdf",".txt",".doc","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].join(", "),desc:"Provides hints for browsers to select the correct file types. You can specify extensions and MIME types separated by comma, or leave empty to accept any file."},allowMultipleFiles:{...xt,name:"Allow multiple files",default:"no"},cssClasses:tt},events:{"wf-file-change":{desc:"Capture changes to this control.",stub:fR,bindable:!0,eventPayloadExample:[{name:"hello.txt",type:"text/plain",data:"data:text/plain;base64,SGVsbG8gd29ybGQK"}]}}}},hR=we({...pR,__name:"CoreFileInput",setup(e){const t=te(ne.evaluatedFields),n=Ae(null),r=ot("fileEl"),o=Ae(null),a=te(ne.core),s=te(ne.instancePath),i=Ae(null),{formValue:l,handleInput:u}=An(a,s,n),c=H(()=>Array.isArray(l.value)?l.value:[]),d=H(()=>{var y;return((y=t.allowFileTypes)==null?void 0:y.value)??""}),h=H(()=>t.allowMultipleFiles.value||void 0),m=async y=>{const p=new FileReader;return p.readAsDataURL(y),new Promise((b,I)=>{p.onload=()=>b(p.result),p.onerror=()=>I(p.error)})},_=async y=>{const p=y.target;if(!p.files||p.files.length==0)return;const b=async()=>{let D=0;o.value=null;const K=Promise.all(Array.from(p.files).map(async G=>(D+=G.size,{name:G.name,type:G.type,data:await m(G)})));return D>Wm?(o.value=`Files are too big. Total size limit is ${Math.floor(Wm/Math.pow(1024,2))}mb.`,[]):K};i.value=Array.from(p.files).map(D=>D.name),l.value=b();const I=()=>{i.value=null};u(b(),"wf-file-change",I)};Ue(l,y=>{typeof y>"u"&&r.value&&(r.value.value="")});function v(y){const p=document.createElement("a");p.href=String(y.data),p.download=y.name,p.click(),p.remove()}const w=H(()=>h.value?"files":"file"),A=H(()=>`Browse ${w.value}`),C=H(()=>`No ${w.value} selected`);return(y,p)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:i.value?"":O(t).label.value,class:"CoreFileInput"},{default:Je(()=>[F("div",nR,[i.value?ve("",!0):(k(),L("div",rR,[Dn(F("input",{ref_key:"fileEl",ref:r,type:"file",multiple:h.value,accept:d.value,onChange:p[0]||(p[0]=b=>_(b))},null,40,oR),[[xr,!1]]),F("div",null,[Le(Rn,{variant:"tertiary",size:"small",onClick:p[1]||(p[1]=b=>O(r).click())},{default:Je(()=>[tn(Ee(A.value),1)]),_:1})]),c.value?(k(),L("ul",aR,[(k(!0),L(We,null,Pt(c.value,(b,I)=>(k(),L("li",{key:I},[F("a",{href:"#",onClick:D=>v(b)},Ee(b.name),9,sR)]))),128))])):(k(),L("p",iR,Ee(C.value),1))])),o.value||i.value?(k(),L("div",lR,[i.value?(k(),Oe(V_,{key:0,class:"loadingSymbol"})):ve("",!0),i.value?(k(),L("span",cR,"Processing "+Ee(i.value.join(", "))+"...",1)):ve("",!0),o.value?(k(),L("span",uR,Ee(o.value),1)):ve("",!0)])):ve("",!0)])]),_:1},8,["label"]))}}),mR=Ie(hR,[["__scopeId","data-v-bed4324c"]]),vR={class:"WdsTag__text"},gR=we({__name:"WdsTag",props:{text:{type:String,required:!0},closable:{type:Boolean,required:!1},size:{type:String,default:"normal"},variant:{type:String,default:"normal"}},emits:{close:()=>!0},setup(e){const t=e,n=H(()=>[`WdsTag--size-${t.size}`,`WdsTag--variant-${t.variant}`]);return(r,o)=>(k(),L("div",{class:ut(["WdsTag",n.value])},[F("span",vR,Ee(e.text),1),e.closable?(k(),L("button",{key:0,type:"button",class:"WdsTag__close",onClick:o[0]||(o[0]=cr(a=>r.$emit("close"),["stop"]))},o[1]||(o[1]=[F("i",{class:"material-symbols-outlined"},"close",-1)]))):ve("",!0)],2))}}),yR=Ie(gR,[["__scopeId","data-v-4668d853"]]),Cu=new Map;function _R(){function e(n){const r=Cu.get(n);if(r!==void 0)return r;const o=fetch(n,{method:"HEAD"}).then(a=>{if(a.ok)return a.headers.get("Content-Type")||void 0}).catch(()=>{});return Cu.set(n,o),o}function t(){Cu.clear()}return{fetchAssetContentType:e,clearCache:t}}const bR=["src"],ab=we({__name:"SharedImgWithFallback",props:{urls:{type:Array,required:!0}},setup(e){const t=e,n=Ae(""),{fetchAssetContentType:r}=_R();return Ue(po(t,"urls"),async o=>{n.value="";for(const a of o){const s=await r(a);if(!(!s||s==="text/html"))return n.value=a}},{immediate:!0}),(o,a)=>(k(),L("img",{src:n.value},null,8,bR))}}),wR={};function AR(e,t){return k(),Oe(Nd,{name:"slide-fade"},{default:Je(()=>[Vt(e.$slots,"default",{},void 0,!0)]),_:3})}const CR=Ie(wR,[["render",AR],["__scopeId","data-v-75fe1e40"]]),$R={key:1,class:"material-symbols-outlined"},SR={key:1,class:"WdsSelect__trigger__multiSelectLabel"},IR={key:0,class:"WdsSelect__trigger__multiSelectLabel__placeholder"},ER=["data-writer-tooltip"],TR={class:"WdsSelect__trigger__arrow"},kR={class:"material-symbols-outlined"},xR=we({__name:"WdsSelect",props:Wr({options:{type:Array,default:()=>[]},placeholder:{type:String,required:!1,default:void 0},defaultIcon:{type:String,required:!1,default:void 0},hideIcons:{type:Boolean,required:!1},enableSearch:{type:Boolean,required:!1},enableMultiSelection:{type:Boolean,required:!1},loading:{type:Boolean,required:!1}},{modelValue:{type:[String,Array],required:!0,default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=pa(()=>en(()=>import("./WdsDropdownMenu-CGiATY2E.js"),__vite__mapDeps([5,6]),import.meta.url)),n=e,r=Yr(e,"modelValue"),o=Ae(!1),a=ot("trigger"),s=ot("dropdown"),i=H(()=>n.enableSearch?[]:[WI({allowedPlacements:["bottom","top"]})]),{floatingStyles:l,update:u}=YI(a,s,{placement:"bottom",middleware:i}),c=H(()=>o.value?"keyboard_arrow_up":"expand_more"),d=H(()=>r.value?(Array.isArray(r.value)?r.value:[r.value]).filter(Boolean):[]),h=H(()=>d.value.map(y=>n.options.find(p=>p.value===y)??{value:y,label:y})),m=H(()=>r.value&&!n.options.some(y=>y.value===r.value)),_=H(()=>m.value?String(r.value):h.value.map(y=>y.label).sort().join(" / ")),v=H(()=>{var y;return m.value?"help_center":n.hideIcons?"":((y=h.value.at(0))==null?void 0:y.icon)??n.defaultIcon??"help_center"}),w=wy(a);Ue(w,()=>{w.value||ar().then(()=>o.value=!1)},{immediate:!0});function A(y){n.enableMultiSelection||(o.value=!1),r.value=y}function C(y){Array.isArray(r.value)&&(r.value=r.value.filter(p=>p!==y))}return(y,p)=>(k(),L("div",{ref_key:"trigger",ref:a,class:"WdsSelect"},[F("div",{class:"WdsSelect__trigger",role:"button",tabindex:"0",onClick:p[0]||(p[0]=b=>o.value=!o.value),onKeydown:p[1]||(p[1]=vo(b=>o.value=!o.value,["enter"]))},[(m.value||!e.hideIcons)&&!e.enableMultiSelection?(k(),L(We,{key:0},[Array.isArray(v.value)?(k(),Oe(ab,{key:0,urls:v.value},null,8,["urls"])):(k(),L("i",$R,Ee(v.value),1))],64)):ve("",!0),e.enableMultiSelection?(k(),L("div",SR,[(k(!0),L(We,null,Pt(h.value,b=>(k(),Oe(yR,{key:b.value,text:b.label,closable:"",onClose:I=>C(b.value)},null,8,["text","onClose"]))),128)),h.value.length===0&&e.placeholder?(k(),L("p",IR,Ee(e.placeholder),1)):ve("",!0)])):(k(),L("div",{key:2,class:"WdsSelect__trigger__label","data-writer-tooltip-strategy":"overflow","data-writer-tooltip":_.value},Ee(_.value??e.placeholder),9,ER)),F("div",TR,[F("i",kR,Ee(c.value),1)])],32),Le(CR,null,{default:Je(()=>[o.value?(k(),Oe(O(t),{key:0,ref_key:"dropdown",ref:s,"enable-search":e.enableSearch,"enable-multi-selection":e.enableMultiSelection,"hide-icons":e.hideIcons,loading:e.loading,options:e.options,selected:r.value,style:_t(O(l)),onSelect:A,onSearch:O(u)},null,8,["enable-search","enable-multi-selection","hide-icons","loading","options","selected","style","onSearch"])):ve("",!0)]),_:1})],512))}}),Hf=Ie(xR,[["__scopeId","data-v-18ccf33a"]]),lF=Object.freeze(Object.defineProperty({__proto__:null,default:Hf},Symbol.toStringTag,{value:"Module"})),PR="A user input component that allows users to select multiple values from a searchable list of options.",qm={a:"Option A",b:"Option B"},MR=`
|
|
260
|
-
def onchange_handler(state, payload):
|
|
261
|
-
|
|
262
|
-
# Set the state variable "selected" to the selected option
|
|
263
|
-
|
|
264
|
-
state["selected"] = payload`,OR={writer:{name:"Multiselect Input",description:PR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:Y.KeyValue,default:JSON.stringify(qm,null,2),validator:Wo},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:Y.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:Y.Number,default:"0",validator:Xn},accentColor:{...vn,desc:"The colour of the chips created for each selected option."},chipTextColor:{name:"Chip text",type:Y.Color,default:$t.White,desc:"The colour of the text in the chips.",category:ze.Style,applyStyleVariable:!0},primaryTextColor:Qt,containerBackgroundColor:bo,separatorColor:cn,cssClasses:tt},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:MR.trim(),bindable:!0,eventPayloadExample:Object.keys(qm)}}}},NR=we({...OR,__name:"CoreMultiselectInput",setup(e){const t=te(ne.evaluatedFields),n=Ae(null),r=te(ne.core),o=te(ne.instancePath),{formValue:a,handleInput:s}=An(r,o,n),i=H(()=>t.maximumCount.value?u.value.length>=t.maximumCount.value:!1),l=H(()=>Object.entries(t.options.value).map(([c,d])=>({value:c,label:String(d),disabled:i.value&&!u.value.includes(c)}))),u=H({get(){return a.value??[]},set(c){s(c,"wf-options-change")}});return(c,d)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:O(t).label.value,class:"CoreMultiselectInput"},{default:Je(()=>[Le(Hf,{modelValue:u.value,"onUpdate:modelValue":d[0]||(d[0]=h=>u.value=h),options:l.value,placeholder:O(t).placeholder.value,"enable-multi-selection":"","hide-icons":""},null,8,["modelValue","options","placeholder"])]),_:1},8,["label"]))}}),RR=Ie(NR,[["__scopeId","data-v-73d09d59"]]),LR=["value","placeholder","min","max","step"],DR="A user input component that allows users to enter numeric values.",Gm=`
|
|
265
|
-
def onchange_handler(state, payload):
|
|
266
|
-
|
|
267
|
-
# Set the state variable "new_val" to the new value
|
|
268
|
-
|
|
269
|
-
state["new_val"] = payload`,BR={writer:{name:"Number Input",description:DR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},placeholder:{name:"Placeholder",type:Y.Text},minValue:{name:"Minimum value",type:Y.Number,default:null},maxValue:{name:"Max value",type:Y.Number,default:null},valueStep:{name:"Step",type:Y.Number,default:"1"},cssClasses:tt},events:{"wf-number-change":{desc:"Capture changes as they happen.",stub:Gm,bindable:!0,eventPayloadExample:42},"wf-number-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Gm,eventPayloadExample:42}}}},FR=we({...BR,__name:"CoreNumberInput",setup(e){const t=te(ne.evaluatedFields),n=ot("rootInstance"),r=ot("inputEl"),o=te(ne.core),a=te(ne.instancePath),{formValue:s,handleInput:i}=An(o,a,n);function l(){if(r.value.value=="")return null;let d=parseFloat(r.value.value);return isNaN(d)||(t.minValue.value!==null&&d<t.minValue.value&&(d=t.minValue.value,r.value.value=d),t.maxValue.value!==null&&d>t.maxValue.value&&(d=t.maxValue.value,r.value.value=d)),d}function u(){const d=l();isNaN(d)||i(d,"wf-number-change")}function c(){const d=l();isNaN(d)||i(d,"wf-number-change-finish")}return(d,h)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:O(t).label.value,class:"CoreNumberInput"},{default:Je(()=>[F("input",{ref_key:"inputEl",ref:r,type:"number",value:O(s),placeholder:O(t).placeholder.value,min:O(t).minValue.value!==null?O(t).minValue.value:void 0,max:O(t).maxValue.value!==null?O(t).maxValue.value:void 0,step:O(t).valueStep.value!==null?O(t).valueStep.value:void 0,onInput:u,onChange:c},null,40,LR)]),_:1},8,["label"]))}}),jR=Ie(FR,[["__scopeId","data-v-f4e3ddb8"]]),VR=["id","checked","value","name","onInput"],UR=["for"],HR="A user input component that allows users to choose a single value from a list of options using radio buttons.",Jm={a:"Option A",b:"Option B"},zR=`
|
|
270
|
-
def onchange_handler(state, payload):
|
|
271
|
-
|
|
272
|
-
# Set the state variable "selected" to the selected radio option
|
|
273
|
-
|
|
274
|
-
state["selected"] = payload`,KR={writer:{name:"Radio Input",description:HR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:Y.KeyValue,default:JSON.stringify(Jm,null,2),validator:Wo},orientation:{name:"Orientation",type:Y.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:ze.Style,desc:"Specify how to lay out the options."},primaryTextColor:Qt,accentColor:vn,cssClasses:tt},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:zR.trim(),bindable:!0,eventPayloadExample:Object.keys(Jm)[0]}}}},WR=we({...KR,__name:"CoreRadioInput",setup(e){const t=te(ne.evaluatedFields),n=te(ne.flattenedInstancePath),r=Ae(null),o=te(ne.core),a=te(ne.instancePath),{formValue:s,handleInput:i}=An(o,a,r);return(l,u)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:r,label:O(t).label.value,class:"CoreRadioInput"},{default:Je(()=>[F("div",{class:ut(["options",{horizontal:O(t).orientation.value=="horizontal"}])},[(k(!0),L(We,null,Pt(O(t).options.value,(c,d)=>(k(),L("div",{key:d,class:"option"},[F("input",{id:`${O(n)}-option-${d}`,type:"radio",checked:O(s)===d,value:d,name:`${O(n)}-options`,onInput:h=>O(i)(d,"wf-option-change")},null,40,VR),F("label",{for:`${O(n)}-option-${d}`},Ee(c),9,UR)]))),128))],2)]),_:1},8,["label"]))}}),qR=Ie(WR,[["__scopeId","data-v-4a0eac98"]]),GR="A user input component that allows users to select a single value from a searchable list of options.",JR={a:"Option A",b:"Option B"},YR=`
|
|
275
|
-
def onchange_handler(state, payload):
|
|
276
|
-
|
|
277
|
-
# Set the state variable "selected" to the selected option
|
|
278
|
-
|
|
279
|
-
state["selected"] = payload`,XR={writer:{name:"Select Input",description:GR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:Y.KeyValue,default:JSON.stringify(JR,null,2),validator:Wo},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:Y.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:Y.Number,default:"0",validator:Xn},accentColor:vn,primaryTextColor:Qt,containerBackgroundColor:bo,separatorColor:cn,cssClasses:tt},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:YR.trim(),bindable:!0}}}},QR=we({...XR,__name:"CoreSelectInput",setup(e){const t=te(ne.evaluatedFields),n=Ae(null),r=te(ne.core),o=te(ne.instancePath),{formValue:a,handleInput:s}=An(r,o,n),i=H(()=>Object.entries(t.options.value).map(([u,c])=>({value:u,label:String(c)}))),l=H({get(){return a.value},set(u){s(u,"wf-option-change")}});return(u,c)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:O(t).label.value,class:"CoreSelectInput"},{default:Je(()=>[Le(Hf,{modelValue:l.value,"onUpdate:modelValue":c[0]||(c[0]=d=>l.value=d),options:i.value,placeholder:O(t).placeholder.value,"hide-icons":""},null,8,["modelValue","options","placeholder"])]),_:1},8,["label"]))}}),ZR=Ie(QR,[["__scopeId","data-v-61ccec03"]]);function Hl(e,t){const n=H(()=>{var r;return((r=String(t.value).split(".")[1])==null?void 0:r.length)??0});return H(()=>Number(e.value).toFixed(n.value))}const eL={class:"BaseInputRange__popover__content"},tL=we({__name:"BaseInputSliderThumb",props:Wr({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},sliderBoundingRect:{type:Object,default:void 0},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Number,default:50},valueModifiers:{}}),emits:["update:value"],setup(e,{expose:t}){const n=e;t({handleMouseDown:m,getOffsetLeft:_});const r=Yr(e,"value"),o=ot("thumb"),a=Hl(r,po(n,"step")),s=H(()=>typeof r.value!="number"?50:(r.value-n.min)/(n.max-n.min)*100),i=Ae(n.popoverDisplayMode==="always");let l=null;Ue(po(n.popoverDisplayMode),()=>{n.popoverDisplayMode==="always"&&(i.value=!0)});function u(){n.popoverDisplayMode!=="always"&&(i.value=!0,l&&(clearTimeout(l),l=null),l=setTimeout(()=>{i.value=!1,l=null},1e3))}const c=H(()=>`${s.value}%`),d=H(()=>`${s.value}%`);function h(v){if(u(),n.min!==void 0&&v<n.min||n.max!==void 0&&v>n.max)return;const w=v-n.min,A=Math.round(w/n.step),C=n.min+A*n.step;r.value!==C&&(r.value=C)}function m(v){document.addEventListener("mousemove",A),document.addEventListener("mouseup",C);const w=n.sliderBoundingRect;A(v);function A(y){const p=(y.x-w.left)/(w.right-w.left);if(p>1||p<0)return;const b=(n.max-n.min)*p+n.min;h(b)}function C(){document.removeEventListener("mouseup",C),document.removeEventListener("mousemove",A)}}function _(){return o.value.offsetLeft}return(v,w)=>(k(),L(We,null,[Le(Nd,null,{default:Je(()=>[Dn(F("div",{class:"BaseInputRange__popover",style:_t({left:d.value})},[F("span",eL,Ee(O(a)),1)],4),[[xr,i.value]])]),_:1}),F("button",{ref_key:"thumb",ref:o,type:"button",class:"BaseInputRange__thumb",style:_t({left:c.value}),"aria-label":"Use the arrow keys to increase or decrease the value.",onKeydown:[w[0]||(w[0]=vo(A=>h(+r.value-e.step),["left"])),w[1]||(w[1]=vo(A=>h(+r.value+e.step),["right"]))],onMousedown:m},null,36)],64))}}),sb=Ie(tL,[["__scopeId","data-v-f2261a8d"]]),nL=["aria-valuemin","aria-valuemax"],rL=we({__name:"BaseInputSliderLayout",props:{min:{type:Number,default:0},max:{type:Number,default:100},popoverDisplayMode:{type:String,default:"onChange"}},setup(e){return(t,n)=>(k(),L("div",{role:"slider","aria-valuemin":e.min,"aria-valuemax":e.max,class:ut(["BaseInputRange",{"BaseInputRange--popover-always-visible":e.popoverDisplayMode==="always"}])},[Vt(t.$slots,"default",{},void 0,!0)],10,nL))}}),ib=Ie(rL,[["__scopeId","data-v-4583336d"]]);function lb(e,t=500){const n=Ae(),r=setInterval(()=>{var o;n.value=(o=e.value)==null?void 0:o.getBoundingClientRect()},t);return Nr(()=>{clearInterval(r)}),H(()=>n.value)}const oL=9,aL=we({__name:"BaseInputSlider",props:Wr({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Number,default:50},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=Yr(e,"value"),r=ot("slider"),o=ot("thumb"),a=Hl(n,po(t,"step")),s=H(()=>typeof n.value!="number"?50:(n.value-t.min)/(t.max-t.min)*100),i=lb(r);return Ue(()=>t.min,()=>{typeof n.value=="number"&&n.value<t.min&&(n.value=t.min)},{immediate:!0}),Ue(()=>t.max,()=>{typeof n.value=="number"&&n.value>t.max&&(n.value=t.max)},{immediate:!0}),(l,u)=>(k(),Oe(ib,{min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuenow":e.value,"aria-valuetext":`${O(a)} (${Math.round(s.value)}%)`},{default:Je(()=>[F("div",{ref_key:"slider",ref:r,class:"BaseInputRange__slider",onMousedown:u[0]||(u[0]=(...c)=>O(o).handleMouseDown&&O(o).handleMouseDown(...c))},[F("div",{class:"BaseInputRange__slider__progress",style:_t({width:`calc(${s.value}% + ${oL}px)`})},null,4)],544),Le(sb,{ref_key:"thumb",ref:o,value:e.value,min:e.min,max:e.max,step:e.step,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":O(i),"onUpdate:value":u[1]||(u[1]=c=>n.value=c)},null,8,["value","min","max","step","popover-display-mode","slider-bounding-rect"])]),_:1},8,["min","max","popover-display-mode","aria-valuenow","aria-valuetext"]))}}),sL="A user input component that allows users to select numeric values using a slider with optional constraints like min, max, and step.",iL=`
|
|
280
|
-
def onchange_handler(state, payload):
|
|
281
|
-
|
|
282
|
-
# Set the state variable "new_val" to the new value
|
|
283
|
-
|
|
284
|
-
state["new_val"] = payload`,lL={writer:{name:"Slider Input",description:sL,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},minValue:{name:"Minimum value",type:Y.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:Y.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:Y.Number,default:"1",init:"1",validator:Xn},accentColor:vn,popoverColor:{name:"Popover color",type:Y.Color,category:ze.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:Y.Color,category:ze.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:tt},events:{"wf-number-change":{desc:"Capture changes to this control.",stub:iL,bindable:!0}}}},cL=we({...lL,__name:"CoreSliderInput",setup(e){const t=te(ne.evaluatedFields),n=Ae(null),r=te(ne.core),o=te(ne.instancePath),{formValue:a,handleInput:s}=An(r,o,n,50);return(i,l)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:O(t).label.value,class:"CoreSliderInput"},{default:Je(()=>[Le(aL,{"popover-display-mode":"always",value:O(a),min:O(t).minValue.value,max:O(t).maxValue.value,step:O(t).stepSize.value,"onUpdate:value":l[0]||(l[0]=u=>O(s)(u,"wf-number-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),uL=Ie(cL,[["__scopeId","data-v-c2e33d68"]]),dL=9,fL=we({__name:"BaseInputSliderRange",props:Wr({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Array,default:()=>[20,60]},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=Yr(e,"value");function r(w,A){const C=[...n.value];C[w]=A,n.value=C.sort((y,p)=>y-p)}const o=ot("slider"),a=ot("thumbs");function s(w){const A=a.value[0],C=a.value[1],y=Math.abs(w.x-A.getOffsetLeft()),p=Math.abs(w.x-C.getOffsetLeft());y>p?C.handleMouseDown(w):A.handleMouseDown(w)}const i=H(()=>Math.min(...n.value)),l=H(()=>Math.max(...n.value)),u=po(t,"step"),c=Hl(i,u),d=Hl(l,u),h=H(()=>`from ${c} to ${d}`),m=H(()=>typeof i.value!="number"?50:(i.value-t.min)/(t.max-t.min)*100),_=H(()=>typeof l.value!="number"?50:(l.value-t.min)/(t.max-t.min)*100-m.value),v=lb(o);return Ue(()=>t.min,()=>{n.value.some(w=>w<t.min)&&(n.value=n.value.map(w=>w<t.min?t.min:w))},{immediate:!0}),Ue(()=>t.max,()=>{n.value.some(w=>w>t.max)&&(n.value=n.value.map(w=>w>t.max?t.max:w))},{immediate:!0}),(w,A)=>(k(),Oe(ib,{class:"BaseInputRangeSlider",min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuetext":h.value},{default:Je(()=>[F("div",{ref_key:"slider",ref:o,class:"BaseInputRange__slider",onMousedown:s},[F("div",{class:"BaseInputRange__slider__progress",style:_t({width:`calc(${_.value}% + ${dL}px)`,marginLeft:`${m.value}%`})},null,4)],544),(k(),L(We,null,Pt([0,1],C=>Le(sb,{key:C,ref_for:!0,ref_key:"thumbs",ref:a,value:e.value[C],min:e.min,max:e.max,step:u.value,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":O(v),"onUpdate:value":y=>r(C?1:0,y)},null,8,["value","min","max","step","popover-display-mode","slider-bounding-rect","onUpdate:value"])),64))]),_:1},8,["min","max","popover-display-mode","aria-valuetext"]))}}),pL="A user input component that allows users to select numeric values range using a range slider with optional constraints like min, max, and step.",hL=`
|
|
285
|
-
def onchange_handler(state, payload):
|
|
286
|
-
|
|
287
|
-
# Set the state variables "from" & "to" to the new range
|
|
288
|
-
state["from"] = payload[0]
|
|
289
|
-
state["to"] = payload[1]`,mL={writer:{name:"Slider Range Input",description:pL,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},minValue:{name:"Minimum value",type:Y.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:Y.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:Y.Number,default:"1",init:"1",validator:Xn},accentColor:vn,popoverColor:{name:"Popover color",type:Y.Color,category:ze.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:Y.Color,category:ze.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:tt},events:{"wf-range-change":{desc:"Capture changes to this control.",stub:hL,bindable:!0}}}},vL=we({...mL,__name:"CoreSliderRangeInput",setup(e){const t=te(ne.evaluatedFields),n=Ae(null),r=te(ne.core),o=te(ne.instancePath),{formValue:a,handleInput:s}=An(r,o,n,[20,50]);return(i,l)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:O(t).label.value,class:"CoreSliderInput"},{default:Je(()=>[Le(fL,{"popover-display-mode":"always",value:O(a),min:O(t).minValue.value,max:O(t).maxValue.value,step:O(t).stepSize.value,"onUpdate:value":l[0]||(l[0]=u=>O(s)(u,"wf-range-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),gL=Ie(vL,[["__scopeId","data-v-6297ca8b"]]),yL=["type","value","placeholder"],_L="A user input component that allows users to enter single-line text values.",Ym=`
|
|
290
|
-
def onchange_handler(state, payload):
|
|
291
|
-
|
|
292
|
-
# Set the state variable "new_val" to the new value
|
|
293
|
-
|
|
294
|
-
state["new_val"] = payload`,bL={writer:{name:"Text Input",description:_L,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},placeholder:{name:"Placeholder",type:Y.Text},passwordMode:{...xt,name:"Password mode",default:"no",category:ze.Style},accentColor:vn,cssClasses:tt},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Ym,bindable:!0,eventPayloadExample:"The content of the input"},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Ym,eventPayloadExample:"The content of the input"}}}},wL=we({...bL,__name:"CoreTextInput",setup(e){const t=te(ne.evaluatedFields),n=Ae(null),r=te(ne.core),o=te(ne.instancePath),{formValue:a,handleInput:s}=An(r,o,n);return(i,l)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:O(t).label.value,class:"CoreTextInput"},{default:Je(()=>[F("input",{type:O(t).passwordMode.value?"password":"text",value:O(a),placeholder:O(t).placeholder.value,"aria-autocomplete":"none",onInput:l[0]||(l[0]=u=>O(s)(u.target.value,"wf-change")),onChange:l[1]||(l[1]=u=>O(s)(u.target.value,"wf-change-finish"))},null,40,yL)]),_:1},8,["label"]))}}),AL=Ie(wL,[["__scopeId","data-v-72b1ab62"]]),CL=["value","placeholder","rows"],$L="A user input component that allows users to enter multi-line text values.",Xm=`
|
|
295
|
-
def onchange_handler(state, payload):
|
|
296
|
-
|
|
297
|
-
# Set the state variable "new_val" to the new value
|
|
298
|
-
|
|
299
|
-
state["new_val"] = payload`,SL={writer:{name:"Textarea Input",description:$L,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},placeholder:{name:"Placeholder",type:Y.Text,control:cc.Textarea},rows:{name:"Rows",type:Y.Number,init:"5",default:"5",validator:Xn},cssClasses:tt},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Xm,bindable:!0,eventPayloadExample:"The content of the textarea"},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Xm,eventPayloadExample:"The content of the textarea"}}}},IL=we({...SL,__name:"CoreTextareaInput",setup(e){const t=te(ne.evaluatedFields),n=Ae(null),r=te(ne.core),o=te(ne.instancePath),{formValue:a,handleInput:s}=An(r,o,n);return(i,l)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:O(t).label.value,class:"CoreTextareaInput"},{default:Je(()=>[F("textarea",{value:O(a),placeholder:O(t).placeholder.value,rows:O(t).rows.value,onInput:l[0]||(l[0]=u=>O(s)(u.target.value,"wf-change")),onChange:l[1]||(l[1]=u=>O(s)(u.target.value,"wf-change-finish"))},null,40,CL)]),_:1},8,["label"]))}}),EL=Ie(IL,[["__scopeId","data-v-712b09e1"]]),TL=["value"],kL="A user input component that allows users to select a time.",xL=`
|
|
300
|
-
def onchange_handler(state, payload):
|
|
301
|
-
|
|
302
|
-
# Set the state variable "new_time" to the new value, provided as a hh:mm string (in 24-hour format that includes leading zeros).
|
|
303
|
-
|
|
304
|
-
state["new_time"] = payload`,PL={writer:{name:"Time Input",description:kL,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},cssClasses:tt},events:{"wf-time-change":{desc:"Capture changes to this control.",stub:xL,bindable:!0,eventPayloadExample:"9:30"}}}},ML=we({...PL,__name:"CoreTimeInput",setup(e){const t=te(ne.evaluatedFields),n=Ae(null),r=te(ne.core),o=te(ne.instancePath),{formValue:a,handleInput:s}=An(r,o,n);return(i,l)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:O(t).label.value,class:"CoreTimeInput"},{default:Je(()=>[F("input",{type:"time",value:O(a),onChange:l[0]||(l[0]=u=>O(s)(u.target.value,"wf-time-change"))},null,40,TL)]),_:1},8,["label"]))}}),OL=Ie(ML,[["__scopeId","data-v-a0be88c1"]]),NL={key:0,class:"filler light"},RL={key:1,class:"face"},LL={viewBox:"0 0 100 100"},DL=["d"],BL="A user input component that allows users to provide a rating.",FL=`
|
|
305
|
-
def onchange_handler(state, payload):
|
|
306
|
-
|
|
307
|
-
# Set the state variable "rating" to the new value
|
|
308
|
-
|
|
309
|
-
state["rating"] = payload`,jL={writer:{name:"Rating Input",description:BL,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},feedback:{name:"Feedback",default:"stars",type:Y.Text,options:{stars:"Stars",faces:"Faces",hearts:"Hearts"}},minValue:{name:"Minimum value",type:Y.Number,default:"1",desc:"Valid values are 0 and 1.",validator:Xs(0,1)},maxValue:{name:"Max value",type:Y.Number,default:"5",desc:"Valid values are between 2 and 11.",validator:Xs(2,11)},valueStep:{name:"Step",type:Y.Number,default:"1",desc:"Valid values are between 0.25 and 1.",validator:Xs(.25,1)},accentColor:vn,primaryTextColor:Qt,cssClasses:tt},events:{"wf-number-change":{stub:FL,bindable:!0}}}},VL=we({...jL,__name:"CoreRatingInput",setup(e){const t=te(ne.evaluatedFields),n=ot("rootInstance"),r=ot("unitsEl"),o=te(ne.core),a=te(ne.instancePath),s=Ae(null),{formValue:i,handleInput:l}=An(o,a,n);function u(p){const b=p.offsetX,I=r.value.querySelectorAll(".unit");let D=0;return I.forEach(K=>{const G=K;b>G.offsetLeft+G.offsetWidth?D++:b>G.offsetLeft&&(D+=(b-G.offsetLeft)/G.offsetWidth)}),D}function c(p){let b=Math.ceil(p/C.value)*C.value;return b=Math.max(Math.min(b,A.value),w.value),b}function d(p){const b=u(p);return c(b)}function h(p){const b=d(p);s.value=b}function m(){s.value=null}function _(p){const b=Math.max(Math.min(p,A.value),w.value),I=45,D=95,K=(b-w.value)/(A.value-w.value),G=K*-10,Z=70+G,be=I+K*(D-I)+G;return`M30,${Z} Q50,${be} 70,${Z}`}function v(p){const b=d(p);l(b,"wf-number-change")}const w=H(()=>Math.max(Math.min(t.minValue.value,1),0)),A=H(()=>Math.max(Math.min(t.maxValue.value,11),2)),C=H(()=>Math.max(Math.min(t.valueStep.value,1),.25)),y=H(()=>{if(s.value!==null)return s.value;const p=parseFloat(i.value);return isNaN(p)?null:p});return(p,b)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,class:"CoreRatingInput",label:O(t).label.value},{default:Je(()=>[F("div",{ref_key:"unitsEl",ref:r,class:ut(["units",{valueSet:y.value!==null}]),onClick:v,onMousemove:h,onMouseout:m},[(k(!0),L(We,null,Pt([...Array(A.value).keys()],I=>(k(),L("div",{key:I,class:ut(["unit",O(t).feedback.value])},[F("div",{class:"filler",style:_t({width:`${y.value>I?Math.min(y.value-I,1)*100:0}%`})},null,4),y.value!==null?(k(),L("div",NL)):ve("",!0),O(t).feedback.value=="faces"?(k(),L("div",RL,[(k(),L("svg",LL,[b[0]||(b[0]=F("circle",{class:"eye left",cx:"35",cy:"38",r:"6"},null,-1)),b[1]||(b[1]=F("circle",{class:"eye right",cx:"65",cy:"38",r:"6"},null,-1)),F("path",{class:"mouth",d:_(y.value??I+1)},null,8,DL)]))])):ve("",!0)],2))),128))],34)]),_:1},8,["label"]))}}),UL=Ie(VL,[["__scopeId","data-v-640d42e2"]]),HL=["aria-checked","onKeydown"],zL="A user input component with a simple on/off status.",KL=`
|
|
310
|
-
def handle_toggle(state, payload):
|
|
311
|
-
|
|
312
|
-
# The payload will be a bool
|
|
313
|
-
|
|
314
|
-
state["its_on"] = payload`,WL={writer:{name:"Switch Input",description:zL,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:Y.Text},accentColor:vn,primaryTextColor:Qt,separatorColor:cn,cssClasses:tt},events:{"wf-toggle":{desc:"Sent when the switch is toggled.",stub:KL.trim(),bindable:!0}}}},qL=we({...WL,__name:"CoreSwitchInput",setup(e){const t=te(ne.evaluatedFields),n=Ae(null),r=te(ne.core),o=te(ne.instancePath),{formValue:a,handleInput:s}=An(r,o,n);function i(){s(!a.value,"wf-toggle")}return(l,u)=>(k(),Oe(Bn,{ref_key:"rootInstance",ref:n,label:O(t).label.value,"is-horizontal":!0,class:"CoreSwitchInput"},{default:Je(()=>[F("div",{class:ut(["switch",{on:!!O(a)}]),tabindex:"0",role:"switch","aria-checked":!!O(a),onClick:i,onKeydown:vo(cr(i,["prevent"]),["enter","space"])},u[0]||(u[0]=[F("div",{class:"toggle"},null,-1)]),42,HL)]),_:1},8,["label"]))}}),GL=Ie(qL,[["__scopeId","data-v-ab3f108e"]]),JL=we({__name:"BaseContainer",props:{contentHAlign:{},contentVAlign:{},contentPadding:{},isHorizontal:{type:Boolean}},setup(e){const t=e,n=H(()=>{const r={padding:t.contentPadding};return t.isHorizontal?{...r,justifyContent:t.contentHAlign,alignItems:t.contentVAlign}:{...r,alignItems:t.contentHAlign,justifyContent:t.contentVAlign}});return(r,o)=>(k(),L("div",{class:ut(["BaseContainer",{horizontal:t.isHorizontal}]),style:_t(n.value),"data-writer-container":""},[Vt(r.$slots,"default",{},void 0,!0)],6))}}),Ai=Ie(JL,[["__scopeId","data-v-4caa740e"]]),YL={class:"BaseCollapseIcon__icon material-symbols-outlined"},XL=we({__name:"BaseCollapseButton",props:Wr({direction:{type:String,required:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=Yr(e,"modelValue"),r=H(()=>{switch(t.direction){case"left-right":return"chevron_left";case"top-bottom":return"keyboard_arrow_up";case"right-left":return"chevron_right";case"bottom-top":return"keyboard_arrow_down";default:return"keyboard_arrow_up"}});return(o,a)=>(k(),Oe(Rn,{class:ut(["BaseCollapseIcon",{"BaseCollapseIcon--collapsed":n.value}]),variant:"tertiary",size:"icon",onClick:a[0]||(a[0]=s=>n.value=!n.value)},{default:Je(()=>[F("i",YL,Ee(r.value),1)]),_:1},8,["class"]))}}),zf=Ie(XL,[["__scopeId","data-v-e3ca49f7"]]),QL={key:0,class:"header"},ZL={key:0,class:"titleContainer"},eD={key:0},tD={key:1,class:"collapsedTitle"},nD={class:"transformed"},rD={class:"content"},oD="A layout component that organizes its child components in columns. Must be inside a Column Container component.",aD={writer:{name:"Column",description:oD,allowedParentTypes:["columns","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{title:{name:"Title",type:Y.Text},width:{name:"Width (factor)",default:"1",init:"1",type:Y.Number,desc:"Relative size when compared to other columns in the same container. A column of width 2 will be double the width of one with width 1.",category:ze.Style,validator:Xn},isSticky:{...xt,name:"Sticky",default:"no",category:ze.Style},isCollapsible:R_,startCollapsed:{...Ff,desc:"Only applied when the column is collapsible."},separatorColor:cn,contentPadding:vs,contentHAlign:ms,contentVAlign:Bf,cssClasses:tt}}},sD=we({...aD,__name:"CoreColumn",setup(e){const t=te(ne.instancePath),n=te(ne.instanceData),r=te(ne.core),o=te(ne.componentId),a=te(ne.evaluatedFields),s=H(()=>!!a.isCollapsible.value),i=Ae(a.isCollapsible.value&&a.startCollapsed.value),l=H(()=>{let m;return i.value?m="0 0 32px":m=`${a.width.value} 0 0`,{flex:m}}),u=H(()=>{var m,_;return h.value>=((_=(m=d.value)==null?void 0:m.value)==null?void 0:_.minimumNonCollapsiblePosition)}),c=H(()=>u.value?"right-left":"left-right"),d=H(()=>{var m;for(let _=-1;_>-1*t.length;_--){const v=t.at(_);if(((m=r.getComponentById(v.componentId))==null?void 0:m.type)!=="columns")continue;return n.at(_)}return null}),h=H(()=>{var m;return(m=r.getComponentById(o))==null?void 0:m.position});return Ue([()=>a.isCollapsible.value,h],()=>{const m=d.value;m&&(m.value={minimumNonCollapsiblePosition:void 0})}),Ue(d,m=>{!m||!m.value||s.value||typeof m.value.minimumNonCollapsiblePosition<"u"&&h.value>=m.value.minimumNonCollapsiblePosition||(m.value.minimumNonCollapsiblePosition=h.value)},{immediate:!0,deep:!0}),(m,_)=>(k(),L("div",{class:ut(["CoreColumn",{sticky:O(a).isSticky.value,collapsible:s.value,collapsibleToRight:u.value,collapsed:i.value}]),style:_t(l.value)},[O(a).title.value||s.value?(k(),L("div",QL,[i.value?ve("",!0):(k(),L("div",ZL,[O(a).title.value?(k(),L("h3",eD,Ee(O(a).title.value),1)):ve("",!0)])),s.value?(k(),Oe(zf,{key:1,modelValue:i.value,"onUpdate:modelValue":_[0]||(_[0]=v=>i.value=v),class:"collapser",direction:c.value},null,8,["modelValue","direction"])):ve("",!0)])):ve("",!0),i.value&&O(a).title.value?(k(),L("div",tD,[F("div",nD,[F("div",rD,Ee(O(a).title.value),1)])])):ve("",!0),Le(Ai,{class:"container","aria-expanded":s.value?i.value:null,"content-h-align":O(a).contentHAlign.value,"content-v-align":O(a).contentVAlign.value,"content-padding":O(a).contentPadding.value},{default:Je(()=>[Vt(m.$slots,"default",{},void 0,!0)]),_:3},8,["aria-expanded","content-h-align","content-v-align","content-padding"])],6))}}),iD=Ie(sD,[["__scopeId","data-v-9ec0335d"]]),lD={class:"CoreColumns horizontal","data-writer-container":""},cD={writer:{name:"Column Container",description:"Serves as container for Column components",allowedChildrenTypes:["column","repeater","separator"],category:"Layout",fields:{cssClasses:tt}}},uD=we({...cD,__name:"CoreColumns",setup(e){const t=te(ne.instanceData);return t.at(-1).value={minimumNonCollapsiblePosition:void 0},(n,r)=>(k(),L("div",lD,[Vt(n.$slots,"default",{},void 0,!0)]))}}),dD=Ie(uD,[["__scopeId","data-v-616070ed"]]),fD={class:"CoreHeader"},pD={class:"container horizontal","data-writer-container":""},hD="A container component that typically contains the main navigation elements.",mD={writer:{name:"Header",description:hD,category:"Layout",allowedChildrenTypes:["*"],fields:{text:{name:"Text",init:"Header Text",default:"(No text)",type:Y.Text},primaryTextColor:Qt,cssClasses:tt},previewField:"text"}},vD=we({...mD,__name:"CoreHeader",setup(e){const t=te(ne.evaluatedFields);return(n,r)=>(k(),L("div",fD,[F("h1",null,Ee(O(t).text.value),1),F("div",pD,[Vt(n.$slots,"default",{},void 0,!0)])]))}}),gD=Ie(vD,[["__scopeId","data-v-0dba4bfb"]]),yD="A layout component that stacks its child components horizontally, wrapping them to the next row if necessary.",_D={writer:{name:"Horizontal Stack",description:yD,allowedChildrenTypes:["*"],category:"Layout",fields:{contentPadding:{...vs,default:"0"},contentHAlign:ms,contentVAlign:Bf,cssClasses:tt}}},bD=we({..._D,__name:"CoreHorizontalStack",setup(e){const t=te(ne.evaluatedFields);return(n,r)=>(k(),Oe(Ai,{class:"CoreHorizontalStack","content-h-align":O(t).contentHAlign.value,"content-v-align":O(t).contentVAlign.value,"content-padding":O(t).contentPadding.value,"is-horizontal":!0},{default:Je(()=>[Vt(n.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-v-align","content-padding"]))}}),wD=Ie(bD,[["__scopeId","data-v-a5e8d853"]]),AD="A container component that divides the layout into sections, with an optional title.",CD={writer:{name:"Section",description:AD,category:"Layout",allowedChildrenTypes:["*"],fields:{title:{name:"Title",init:"Section Title",desc:"Leave blank to hide.",type:Y.Text},isCollapsible:R_,startCollapsed:Ff,accentColor:vn,primaryTextColor:Qt,secondaryTextColor:mr,containerBackgroundColor:bo,containerShadow:hs,separatorColor:cn,buttonColor:Zr,buttonTextColor:eo,buttonShadow:Jo,contentPadding:{...vs,default:"16px"},contentHAlign:ms,cssClasses:tt},previewField:"title"}},$D=we({...CD,__name:"CoreSection",setup(e){const t=te(ne.evaluatedFields),n=H(()=>t.isCollapsible.value),r=Ae(n.value&&t.startCollapsed.value);return(o,a)=>(k(),L("section",{class:ut(["CoreSection",{"CoreSection--collapsible":n.value}])},[O(t).title.value||n.value?(k(),L("div",{key:0,class:ut(["CoreSection__title",{"CoreSection__title--collapsed":n.value&&r.value}])},[F("h3",null,Ee(O(t).title.value),1),n.value?(k(),Oe(zf,{key:0,modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=s=>r.value=s),direction:"top-bottom"},null,8,["modelValue"])):ve("",!0)],2)):ve("",!0),r.value?ve("",!0):(k(),Oe(Ai,{key:1,"content-h-align":O(t).contentHAlign.value,"content-padding":O(t).contentPadding.value,"aria-expanded":n.value?r.value:null},{default:Je(()=>[Vt(o.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding","aria-expanded"]))],2))}}),SD=Ie($D,[["__scopeId","data-v-8bef68a0"]]),ID="A visual component to create a separation between adjacent elements.",cb={writer:{name:"Separator",description:ID,category:"Layout",fields:{separatorColor:cn,cssClasses:tt}}},Qm=e=>{e.writer&&(e.writer.docs=`_Separator_ components are used to separate layout elements. They can be used in most containers, including _Column Container_ to separate columns.
|
|
315
|
-
|
|
316
|
-
If the container flows horizontally (like a _Horizontal Stack_ or a _Column Container_) the _Separator_ will be a vertical line. Otherwise, it'll be a horizontal line.`)},ED={class:"CoreSeparator separator"};function TD(e,t,n,r,o,a){return k(),L("div",ED,t[0]||(t[0]=[F("div",{class:"line"},null,-1)]))}typeof Qm=="function"&&Qm(cb);const kD=Ie(cb,[["render",TD],["__scopeId","data-v-5abd9423"]]),xD={class:"collapserContainer"},PD={class:"container","data-writer-container":""},MD="A container component that organizes its children in a sidebar. Its parent must be a Page component.",OD={writer:{name:"Sidebar",description:MD,positionless:!0,slot:"sidebar",allowedParentTypes:["page"],allowedChildrenTypes:["*"],category:"Layout",fields:{startCollapsed:{...Ff,desc:void 0},sidebarBackgroundColor:{name:"Background",type:Y.Color,category:ze.Style,applyStyleVariable:!0,default:"rgba(255, 255, 255, 0.3)"},accentColor:vn,primaryTextColor:Qt,secondaryTextColor:mr,containerBackgroundColor:bo,containerShadow:hs,separatorColor:cn,buttonColor:Zr,buttonTextColor:eo,buttonShadow:Jo,cssClasses:tt}}},ND=we({...OD,__name:"CoreSidebar",setup(e){const t=te(ne.evaluatedFields),n=Ae(t.startCollapsed.value),r=te(ne.core),o=te(ne.builderManager),a=te(ne.componentId),s=H(()=>o==null?void 0:o.firstSelectedId.value),i=Ae(0),l=H(()=>({"max-height":`calc(100vh - ${i.value}px)`}));Ue(s,c=>{c&&u(c)&&(n.value=!1)});const u=c=>{const d=r.getComponentById(c);return!d||d.type=="root"?!1:d.parentId==a?!0:u(d.parentId)};return ln(()=>{const c=document.querySelector(".ComponentRenderer");i.value=document.body.clientHeight-(c==null?void 0:c.parentElement.clientHeight)}),(c,d)=>(k(),L("div",{class:ut(["CoreSidebar",{collapsed:n.value}]),style:_t(l.value)},[F("div",xD,[Le(zf,{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=h=>n.value=h),direction:"left-right"},null,8,["modelValue"])]),F("div",PD,[Vt(c.$slots,"default",{},void 0,!0)])],6))}}),RD=Ie(ND,[["__scopeId","data-v-99b92063"]]),LD={class:"CoreTab"},DD=0,Zm=1,BD="A container component that displays its child components as a tab inside a Tab Container.",FD={writer:{name:"Tab",description:BD,allowedParentTypes:["tabs","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Tab Name",type:Y.Text},contentPadding:{...vs,default:"16px"},contentHAlign:ms,cssClasses:tt},previewField:"name"}},jD=we({...FD,__name:"CoreTab",setup(e){const t=te(ne.evaluatedFields),n=te(ne.instancePath),r=te(ne.instanceData),o=te(ne.core),a=te(ne.builderManager),s=te(ne.componentId),{isComponentVisible:i}=wc(o),l=H(()=>a==null?void 0:a.firstSelectedId.value),u=()=>{for(let p=-2;p>-1*n.length;p--){const b=n.at(p),{type:I}=o.getComponentById(b.componentId);if(I==="tabs")return p+1}},c=H(()=>{const p=u();return n.at(p)}),d=H(()=>c==null?void 0:c.value.instanceNumber),h=H(()=>d.value===DD),m=H(()=>d.value===Zm),_=H(()=>i(s)?h.value||m.value&&y.value:!1),v=()=>{for(let p=-1;p>-1*n.length;p--){const b=n.at(p),{type:I}=o.getComponentById(b.componentId);if(I==="tabs")return r.at(p)}},w=()=>{const p=u(),b=n.slice(0,p),I=p+1<0?n.slice(p+1):[];return[...b,{componentId:n.at(p).componentId,instanceNumber:Zm},...I]},A=()=>{const p=v();p.value={activeTab:w()}},C=p=>{const b=o.getComponentById(p);return!b||b.type=="root"?!1:b.parentId==s?!0:C(b.parentId)};Ue(l,p=>{p&&C(p)&&A()});const y=H(()=>{var D;let p;h.value?p=w():p=n;const I=(D=v().value)==null?void 0:D.activeTab;return JSON.stringify(I)==JSON.stringify(p)});return ls(()=>{var I;if(h.value)return;const p=v();(I=p.value)!=null&&I.activeTab||i(s,n)&&(p.value={activeTab:n})}),(p,b)=>Dn((k(),L("div",LD,[h.value?(k(),L("button",{key:0,class:ut(["bit",{active:y.value}]),tabindex:"0",onClick:A},Ee(O(t).name.value),3)):ve("",!0),m.value?Dn((k(),Oe(Ai,{key:1,class:"container","content-h-align":O(t).contentHAlign.value,"content-padding":O(t).contentPadding.value},{default:Je(()=>[Vt(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[xr,y.value]]):ve("",!0)],512)),[[xr,_.value]])}}),VD=Ie(jD,[["__scopeId","data-v-63c66105"]]),UD={class:"CoreTabs"},HD={class:"tabSelector horizontal","data-writer-cage":"","data-writer-container":""},zD={class:"container"},KD="A container component for organising and displaying Tab components in a tabbed interface.",WD={writer:{name:"Tab Container",description:KD,category:"Layout",allowedChildrenTypes:["tab","repeater"],fields:{accentColor:vn,primaryTextColor:Qt,secondaryTextColor:mr,containerBackgroundColor:bo,containerShadow:hs,separatorColor:cn,buttonColor:Zr,buttonTextColor:eo,buttonShadow:Jo,cssClasses:tt}}},qD=we({...WD,__name:"CoreTabs",setup(e){const t=te(ne.instanceData);return t.at(-1).value={activeTab:void 0},(n,r)=>(k(),L("div",UD,[F("nav",HD,[Vt(n.$slots,"default",{instanceNumber:0},void 0,!0)]),F("div",zD,[Vt(n.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),GD=Ie(qD,[["__scopeId","data-v-46e04ad4"]]),JD={class:"CoreStep"},YD=["disabled"],XD={class:"indicator"},QD={key:0,class:"material-symbols-outlined"},ZD={class:"label"},nl=0,$u=1,e5="A container component that displays its child components as a step inside a Step Container.",t5={writer:{name:"Step",description:e5,allowedParentTypes:["steps","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Step name",type:Y.Text},contentPadding:{...vs,default:"16px"},isCompleted:{...xt,name:"Completed",desc:"Use a state reference to dynamically mark this step as complete.",default:"no"},contentHAlign:ms,cssClasses:tt},previewField:"name"}},n5=we({...t5,__name:"CoreStep",setup(e){const t=te(ne.evaluatedFields),n=te(ne.instancePath),r=te(ne.instanceData),o=te(ne.isBeingEdited),a=te(ne.core),s=te(ne.builderManager),i=te(ne.componentId),{isComponentVisible:l}=wc(a),u=H(()=>s==null?void 0:s.firstSelectedId.value),c=h();function d(){for(let p=-1;p>-1*n.length;p--){const b=n.at(p),I=a.getComponentById(b.componentId);if(!I)return;if(I.type==="steps")return p}}function h(){const p=d();if(!(typeof p>"u"))return r.at(p)}function m(){const p=d()+1,b=n.slice(0,p),I=p+1<0?n.slice(p+1):[];return[...b,{componentId:n.at(p).componentId,instanceNumber:$u},...I]}function _(){c.value={...c.value,activeStep:m()}}function v(){const p=c.value.steps.findIndex(D=>JSON.stringify(D.instancePath)==JSON.stringify(n));if(p==-1||p+1>c.value.steps.length)return;let I=c.value.steps.slice(p+1).find(D=>!D.isCompleted);I||(I=c.value.steps.at(-1)),c.value={...c.value,activeStep:I.instancePath}}function w(p){const b=a.getComponentById(p);return!b||b.type=="root"?!1:b.parentId==i?!0:w(b.parentId)}function A(){if(!t.isCompleted.value){_();return}v()}const C=H(()=>{const p=d()+1;return n.at(p)});Ue(u,p=>{p&&w(p)&&_()});const y=H(()=>{var I;let p;(C==null?void 0:C.value.instanceNumber)==nl?p=m():p=n;const b=(I=c.value)==null?void 0:I.activeStep;return JSON.stringify(b)==JSON.stringify(p)});return Ue([y,t.isCompleted],()=>{o.value||y.value&&t.isCompleted.value&&v()}),Ue(t.isCompleted,(p,b)=>{b&&(p||A())}),ls(()=>{var b;(C==null?void 0:C.value.instanceNumber)==nl||(typeof c.value.steps.find(I=>I.instancePath==n)>"u"&&c.value.steps.push({instancePath:n,isCompleted:t.isCompleted.value}),(b=c.value)==null?void 0:b.activeStep)||l(i,n)&&A()}),_o(()=>{const p=c.value.steps.findIndex(b=>JSON.stringify(b.instancePath)==JSON.stringify(n));c.value.steps.splice(p,1)}),(p,b)=>{var I,D,K,G;return Dn((k(),L("div",JD,[((I=C.value)==null?void 0:I.instanceNumber)==nl?(k(),L("button",{key:0,class:ut(["bit",{active:y.value,completed:O(t).isCompleted.value}]),disabled:!O(o),stepindex:"0",onClick:_},[F("div",XD,[b[0]||(b[0]=F("div",{class:"linker left"},null,-1)),F("div",{class:ut(["status",{completed:O(t).isCompleted.value}])},[O(t).isCompleted.value?(k(),L("i",QD," done ")):ve("",!0)],2),b[1]||(b[1]=F("div",{class:"linker right"},null,-1))]),F("div",ZD,Ee(O(t).name.value),1)],10,YD)):ve("",!0),((D=C.value)==null?void 0:D.instanceNumber)==$u?Dn((k(),Oe(Ai,{key:1,class:"container","content-h-align":O(t).contentHAlign.value,"content-padding":O(t).contentPadding.value},{default:Je(()=>[Vt(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[xr,y.value]]):ve("",!0)],512)),[[xr,((K=C.value)==null?void 0:K.instanceNumber)==nl||((G=C.value)==null?void 0:G.instanceNumber)==$u&&y.value]])}}}),r5=Ie(n5,[["__scopeId","data-v-ee7ef213"]]),o5={class:"CoreSteps"},a5={class:"stepSelector horizontal","data-writer-cage":"","data-writer-container":""},s5={class:"container"},i5="A container component for displaying Step components, allowing you to implement a stepped blueprint.",l5={writer:{name:"Step Container",description:i5,category:"Layout",allowedChildrenTypes:["step","repeater"],fields:{accentColor:vn,primaryTextColor:Qt,secondaryTextColor:mr,containerBackgroundColor:bo,containerShadow:hs,separatorColor:cn,buttonColor:Zr,buttonTextColor:eo,buttonShadow:Jo,cssClasses:tt}}},c5=we({...l5,__name:"CoreSteps",setup(e){const t=te(ne.instanceData),n={activeStep:void 0,steps:[]};return t.at(-1).value=n,(r,o)=>(k(),L("div",o5,[F("nav",a5,[Vt(r.$slots,"default",{instanceNumber:0},void 0,!0)]),F("div",s5,[Vt(r.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),u5=Ie(c5,[["__scopeId","data-v-3eb221bc"]]),d5={key:0,class:"material-symbols-outlined"},f5={class:"CoreButton__text"},p5=`
|
|
317
|
-
def handle_button_click(state):
|
|
318
|
-
|
|
319
|
-
# Increment counter when the button is clicked
|
|
320
|
-
|
|
321
|
-
state["counter"] += 1`,h5="A standalone button component that can be linked to a click event handler.",m5={writer:{name:"Button",description:h5,category:"Other",events:{"wf-click":{desc:"Capture single clicks.",stub:p5.trim()}},fields:{text:{name:"Text",init:"Button Text",type:Y.Text},isDisabled:{...xt,name:"Disabled",default:"no",desc:"Disables all event handlers."},buttonColor:Zr,buttonTextColor:eo,icon:{name:"Icon",type:Y.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:ze.Style},buttonShadow:Jo,separatorColor:cn,cssClasses:tt},previewField:"text"}},ub=we({...m5,__name:"CoreButton",setup(e){const t=Ae(null),n=te(ne.evaluatedFields),r=te(ne.isDisabled),o=te(ne.isBeingEdited);Ue(n.isDisabled,s=>{r.value=s},{immediate:!0});function a(s){if(!t.value)return;const i=wi(s);t.value.$el.dispatchEvent(i)}return(s,i)=>(k(),Oe(Rn,{ref_key:"rootInstance",ref:t,class:"CoreButton","aria-disabled":O(r),disabled:!O(o)&&O(r),onClick:a},{default:Je(()=>[O(n).icon.value?(k(),L("i",d5,Ee(O(n).icon.value),1)):ve("",!0),F("span",f5,Ee(O(n).text.value),1)]),_:1},8,["aria-disabled","disabled"]))}}),ev=e=>{e.writer&&(e.writer.docs="Writer Framework uses Material Symbols to display icons. To include an icon, check https://fonts.google.com/icons, find the icon's id (such as `arrow_forward`) and it to your _Button_.")};typeof ev=="function"&&ev(ub);const v5=Ie(ub,[["__scopeId","data-v-57cc9b75"]]),g5={padding:"16px","min-height":"64px","min-width":"64px","border-radius":"8px",background:"linear-gradient(90deg, rgba(41,207,0,1) 0%, rgba(145,231,78,1) 100%)"},y5="A generic component that creates customisable HTML elements, which can serve as containers for other components.",db={writer:{name:"HTML Element",description:y5,category:"Other",allowedChildrenTypes:["*"],fields:{element:{name:"Element",default:"div",type:Y.Text,desc:"Set the type of HTML element to create, e.g., 'div', 'section', 'span', etc."},styles:{name:"Styles",default:"{}",init:JSON.stringify(g5,null,2),type:Y.Object,desc:"Define the CSS styles to apply to the HTML element using a JSON object or a state reference to a dictionary.",validator:Wo},attrs:{name:"Attributes",default:"{}",type:Y.Object,desc:"Set additional HTML attributes for the element using a JSON object or a dictionary via a state reference.",validator:Wo},htmlInside:{name:"HTML inside",default:null,type:Y.Text,control:cc.Textarea,desc:"Define custom HTML to be used inside the element. It will be wrapped in a div and rendered after children components."},cssClasses:tt}},setup(e,{slots:t}){const n=te(ne.evaluatedFields),r=/^[a-zA-Z][a-zA-Z0-9-_:.]*$/,o=H(()=>{if(typeof n.attrs.value!="object"||n.attrs.value===null)return{};const a=Object.entries(n.attrs.value).filter(([s])=>r.test(s));return Object.fromEntries(a)});return()=>{let a;return n.htmlInside.value&&(a=Ho("div",{innerHTML:n.htmlInside.value})),Ho(n.element.value,{...o.value,class:"CoreHTML","data-writer-container":"",style:n.styles.value},[t.default({}),a])}}},tv=e=>{e.writer&&(e.writer.docs=`You can configure the element type, styles, and attributes to fit your design requirements. You can link them to state for advanced use cases, such as custom animations.
|
|
322
|
-
|
|
323
|
-
All valid HTML tags are supported, including tags such as \`iframe\`, allowing you to embed external sites.
|
|
324
|
-
|
|
325
|
-
Take into account the potential risks of adding custom HTML to your app, including XSS. Be specially careful when injecting user-generated data.`)};typeof tv=="function"&&tv(db);const _5={class:"pagination-left"},b5={class:"pagination-pagesize"},w5=["value","selected"],A5={class:"pagination-description"},C5={class:"bold"},$5={class:"bold"},S5={class:"bold"},I5={class:"pagination-right"},E5={class:"pagination-picker"},T5={key:0,class:"paginationpicker-block paginationpicker-neutral"},k5=["onClick"],x5={key:2,class:"paginationpicker-block paginationpicker-currentpage"},P5={class:"pagination-jump"},M5=["value"],O5=`
|
|
326
|
-
def handle_page_change(state, payload):
|
|
327
|
-
page = payload
|
|
328
|
-
state["page"] = page
|
|
329
|
-
|
|
330
|
-
records = _load_records_from_db(start = state["page"] * state["pageSize"], limit = state["pageSize"])
|
|
331
|
-
# update a repeater
|
|
332
|
-
state["highlighted_members"] = {r.id: r for r in records}
|
|
333
|
-
`,N5=`
|
|
334
|
-
def handle_page_size_change(state, payload):
|
|
335
|
-
state['pageSize'] = payload
|
|
336
|
-
|
|
337
|
-
records = _load_records_from_db(start = state["page"] * state["pageSize"], limit = state["pageSize"])
|
|
338
|
-
# update a repeater
|
|
339
|
-
state["highlighted_members"] = {r.id: r for r in records}
|
|
340
|
-
`,R5={writer:{name:"Pagination",category:"Other",description:"A component that can help you paginate records, for example from a Repeater or a DataFrame.",fields:{page:{name:"Page",init:"1",default:"1",type:Y.Number,desc:"The current page number.",validator:Xn},pageSize:{name:"Page Size",default:"10",type:Y.Number,desc:"The number of items per page.",validator:Xn},totalItems:{name:"Total Items",default:"10",type:Y.Number,desc:"The total number of items",validator:Xn},pageSizeOptions:{name:"Page Size Options",init:"",default:"",type:Y.Text,desc:"A comma-separated list of page size options. If it's empty, the user can't change the page size. Set your default page size as the first option."},pageSizeShowAll:{...xt,name:"Show All Option",default:"no",desc:"Show an option to show all records."},jumpTo:{...xt,name:"Jump To",default:"no",desc:"Show an option to jump to a specific page."}},events:{"wf-change-page":{desc:"Fires when the user pick a page",stub:O5.trim(),eventPayloadExample:2},"wf-change-page-size":{desc:"Fires when the user change the page size.",stub:N5.trim(),eventPayloadExample:10}}}},L5=we({...R5,__name:"CorePagination",setup(e){const t=te(ne.evaluatedFields),n=te(ne.core),r=ot("rootEl"),o=te(ne.instancePath),{handleInput:a}=An(n,o,r),{handleInput:s}=An(n,o,r),i=H(()=>t.pageSizeOptions.value!==""||t.pageSizeShowAll.value),l=H(()=>t.jumpTo.value),u=H(()=>t.totalItems.value==0?0:(t.page.value-1)*t.pageSize.value+1),c=H(()=>Math.min(t.page.value*t.pageSize.value,t.totalItems.value)),d=H(()=>t.totalItems.value),h=H(()=>Math.ceil(parseInt(t.totalItems.value)/parseInt(t.pageSize.value))),m=H(()=>{let p=[];const b=t.pageSizeOptions.value.split(",");for(const I in b){const D=parseInt(b[I],10);p.push({value:D,label:`${D} items`})}return t.pageSizeShowAll.value&&p.push({value:d.value,label:"All items"}),p}),_=H(()=>{const p=[],b=parseInt(t.page.value);if(h.value<=7)for(let I=0;I<h.value;I++)p.push(I+1);else b==1||b==2?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(h.value-2),p.push(h.value-1),p.push(h.value)):b==3?(p.push(1),p.push(2),p.push(3),p.push(4),p.push("..."),p.push(h.value-1),p.push(h.value)):b==4?(p.push(1),p.push(2),p.push(3),p.push(4),p.push(5),p.push("..."),p.push(h.value)):b==h.value||b==h.value-1?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(h.value-2),p.push(h.value-1),p.push(h.value)):b==h.value-2?(p.push(1),p.push(2),p.push("..."),p.push(h.value-3),p.push(h.value-2),p.push(h.value-1),p.push(h.value)):(p.push(1),p.push("..."),p.push(b-1),p.push(b),p.push(b+1),p.push("..."),p.push(h.value));return p}),v=H(()=>parseInt(t.page.value)-1<1),w=H(()=>parseInt(t.page.value)+1>h.value),A=p=>{if(p.target.value==="")return;let b=parseInt(p.target.value);b>h.value&&(b=h.value),a(b,"wf-change-page")},C=p=>{a(p,"wf-change-page")},y=p=>{let b=parseInt(p.target.value);s(b,"wf-change-page-size")};return(p,b)=>(k(),L("div",{ref_key:"rootEl",ref:r,class:"CorePagination"},[F("div",_5,[Dn(F("div",b5,[F("select",{class:"pagesize-select",onChange:y},[(k(!0),L(We,null,Pt(m.value,(I,D)=>(k(),L("option",{key:D,value:I.value,selected:I.value==O(t).pageSize.value},Ee(I.label),9,w5))),128))],32)],512),[[xr,i.value]]),F("div",A5,[b[2]||(b[2]=tn(" Showing ")),F("span",C5,Ee(u.value),1),b[3]||(b[3]=tn(" to ")),F("span",$5,Ee(c.value),1),b[4]||(b[4]=tn(" of ")),F("span",S5,Ee(d.value),1),b[5]||(b[5]=tn(" results "))])]),F("div",I5,[F("div",E5,[F("div",{class:ut(["paginationpicker-block",{"paginationpicker-disabled":v.value}]),onClick:b[0]||(b[0]=I=>C(O(t).page.value-1))},b[6]||(b[6]=[F("i",{class:"material-symbols-outlined"}," navigate_before ",-1)]),2),(k(!0),L(We,null,Pt(_.value,(I,D)=>(k(),L(We,{key:D},[I=="..."?(k(),L("div",T5,Ee(I),1)):ve("",!0),I!="..."&&I!=O(t).page.value?(k(),L("div",{key:1,class:"paginationpicker-block",onClick:K=>C(I)},Ee(I),9,k5)):ve("",!0),I==O(t).page.value?(k(),L("div",x5,Ee(I),1)):ve("",!0)],64))),128)),F("div",{class:ut(["paginationpicker-block",{"paginationpicker-disabled":w.value}]),onClick:b[1]||(b[1]=I=>C(O(t).page.value+1))},b[7]||(b[7]=[F("i",{class:"material-symbols-outlined"}," navigate_next ",-1)]),2)]),Dn(F("div",P5,[b[8]||(b[8]=F("label",null,"Jump to",-1)),F("input",{type:"text",value:O(t).page.value,onInput:A},null,40,M5)],512),[[xr,l.value]])])],512))}}),D5=Ie(L5,[["__scopeId","data-v-2c0a56bd"]]),B5="A container component that repeats its child components based on a dictionary.",F5={a:{desc:"Option A"},b:{desc:"Option B"}},j5={writer:{name:"Repeater",description:B5,category:"Other",allowedChildrenTypes:["inherit"],fields:{repeaterObject:{name:"Repeater object",default:JSON.stringify(F5,null,2),type:Y.Object,desc:"Include a state reference to the dictionary used for repeating the child components. Alternatively, specify a JSON object.",validator:Y2},keyVariable:{name:"Key variable name",default:"itemId",init:"itemId",type:Y.Text,desc:"Set the name of the variable that will store the key of the current repeater object entry."},valueVariable:{name:"Value variable name",default:"item",init:"item",type:Y.Text,desc:"Set the name of the variable that will store the value of the current repeater object entry."}}},setup(e,{slots:t}){const n=te(ne.core),r=te(ne.componentId),o=te(ne.evaluatedFields),a=te(ne.isBeingEdited),s=te(ne.renderProxiedComponent),i=H(()=>n.getComponents(r,{sortedByPosition:!0})),l=()=>typeof o.repeaterObject.value!="object"?[]:Object.values(o.repeaterObject.value).map((c,d)=>i.value.map(h=>s(h.id,d)));return()=>{let u={};return i.value.length!=0&&o.repeaterObject.value!=null&&Object.keys(o.repeaterObject.value).length!=0?u=l():a.value===!0?u=t.default({}):u={},Ho("div",{class:"CoreRepeater","data-writer-container":""},u)}}},V5=Ie(j5,[["__scopeId","data-v-0b783e59"]]),U5="A component that emits an event repeatedly at specified time intervals, enabling time-based refresh.",H5=`
|
|
341
|
-
def handle_timer_tick(state):
|
|
342
|
-
|
|
343
|
-
# Increment counter when the timer ticks
|
|
344
|
-
|
|
345
|
-
state["counter"] += 1`.trim(),z5={writer:{name:"Timer",description:U5,category:"Other",fields:{intervalMs:{name:"Interval (ms)",desc:"How much time to wait between ticks. A tick is considered finished when its event is handled.",default:"200",type:Y.Number,validator:Xn},isActive:{...xt,name:"Active",default:"yes",desc:"Whether the timer should trigger tick events."},accentColor:vn,cssClasses:tt},events:{"wf-tick":{desc:"Emitted when the timer ticks.",stub:H5.trim()}}}},K5=we({...z5,__name:"CoreTimer",setup(e){const r=te(ne.evaluatedFields),o=te(ne.core),a=ot("rootEl"),s=H(()=>r.intervalMs.value),i=H(()=>r.isActive.value),l=Ae(!1),u=te(ne.componentId),c=H(()=>{var w,A;return!!((A=(w=o.getComponentById(u))==null?void 0:w.handlers)!=null&&A["wf-tick"])}),d=H(()=>({"animation-duration":`${Math.max(s.value,1e3)}ms`}));Ue([i,s],()=>{v()}),Ue(c,async w=>{w&&(await ar(),v())});let h=0,m=null;function _(){clearTimeout(m)}function v(){if(_(),!i.value||s.value<0||!a.value)return;Date.now()-h>=500&&(a.value.classList.remove("tick"),a.value.offsetWidth,h=Date.now(),a.value.classList.add("tick"));const w=({ok:C})=>{l.value=!C,m=setTimeout(()=>{v()},s.value)},A=new CustomEvent("wf-tick",{detail:{callback:w}});a.value.dispatchEvent(A)}return ln(()=>{v()}),(w,A)=>(k(),L("div",{ref_key:"rootEl",ref:a,class:ut(["CoreTimer",{failing:l.value}]),style:_t(d.value)},null,6))}}),W5=Ie(K5,[["__scopeId","data-v-8e3b3227"]]),q5={class:"main"},G5={class:"actions"},J5=["value"],Y5="A user input component that allows users to capture images using their webcam.",X5=`
|
|
346
|
-
def webcam_handler(payload):
|
|
347
|
-
|
|
348
|
-
# This handler will save the captured images based on timestamp
|
|
349
|
-
|
|
350
|
-
import time
|
|
351
|
-
timestamp = time.time()
|
|
352
|
-
|
|
353
|
-
# The payload is a file-like object which contains the captured image
|
|
354
|
-
# in PNG format
|
|
355
|
-
|
|
356
|
-
image_file = payload
|
|
357
|
-
with open(f"capture-{timestamp}.png", "wb") as file_handle:
|
|
358
|
-
file_handle.write(image_file)`.trim(),Q5={writer:{name:"Webcam Capture",description:Y5,category:"Other",fields:{refreshRate:{name:"Refresh rate (ms)",init:"200",default:"200",desc:"Set to 0 for manual capture.",type:Y.Number,validator:Xn},buttonColor:Zr,buttonTextColor:eo,buttonShadow:Jo,separatorColor:cn,cssClasses:tt},events:{"wf-webcam":{desc:"Sent when a frame is captured. Its payload contains the captured frame in PNG format.",stub:X5.trim(),eventPayloadExample:"data:image/png;base64,azerty"}}}},Z5=we({...Q5,__name:"CoreWebcamCapture",setup(e){const t=Ae(!1),n=ot("rootEl"),r=document.createElement("canvas"),o=ot("videoEl"),a=te(ne.evaluatedFields),s=Ae(null),i=Ae(null),l=wn();ln(async()=>{var w,A;s.value=await u(),i.value=(A=(w=s.value)==null?void 0:w[0])==null?void 0:A.deviceId}),_o(()=>{v()});const u=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(C=>C.kind=="videoinput"),c=H(()=>a.refreshRate.value);Ue(c,(w,A)=>{w>0&&A<=0&&m()}),Ue(i,async()=>{t.value&&(v(),await _())});const d=async()=>{if(t.value=!t.value,!t.value){v();return}await _(),m()},h=()=>(r.getContext("2d").drawImage(o.value,0,0),r.toDataURL("image/png")),m=()=>{const w=new CustomEvent("wf-webcam",{detail:{payload:h(),callback:()=>{c.value<=0||!t.value||setTimeout(()=>{m()},c.value)}}});n.value.dispatchEvent(w)},_=async()=>(o.value.style.display="",new Promise((w,A)=>{navigator.mediaDevices.getUserMedia||(l.error("This browser doesn't support webcam connection."),A());const C={video:!0};s.value.length>1&&(C.video={deviceId:i.value}),navigator.mediaDevices.getUserMedia(C).then(y=>{o.value.srcObject=y;const p=y.getVideoTracks()[0].getSettings().width,b=y.getVideoTracks()[0].getSettings().height;r.setAttribute("width",p.toString()),r.setAttribute("height",b.toString()),w()}).catch(y=>{l.error("An error occurred when trying to use the webcam.",y),A()})})),v=()=>{const w=o.value.srcObject;w&&w.getTracks().map(C=>C.stop()),o.value.srcObject=null,o.value.style.display="none"};return(w,A)=>{var C;return k(),L("div",{ref_key:"rootEl",ref:n,class:"CoreWebcamCapture"},[Dn(F("div",q5,[F("video",{ref_key:"videoEl",ref:o,autoplay:"true"},null,512)],512),[[xr,t.value]]),F("div",G5,[c.value==0?(k(),Oe(Rn,{key:0,onClick:m},{default:Je(()=>A[1]||(A[1]=[tn(" Capture image ")])),_:1})):ve("",!0),Le(Rn,{onClick:d},{default:Je(()=>[tn(Ee(t.value?"Stop capture":"Start webcam capture"),1)]),_:1}),((C=s.value)==null?void 0:C.length)>1?(k(),Oe(ob,{key:1,modelValue:i.value,"onUpdate:modelValue":A[0]||(A[0]=y=>i.value=y)},{default:Je(()=>[(k(!0),L(We,null,Pt(s.value,(y,p)=>(k(),L("option",{key:y.deviceId,value:y.deviceId},Ee(y.label||`Webcam ${p+1}`),9,J5))),128))]),_:1},8,["modelValue"])):ve("",!0)])],512)}}}),e3=Ie(Z5,[["__scopeId","data-v-bf784564"]]),t3={writer:{name:"Reuse Component",slot:"*",description:"Those components are used to reuse other components. Reused components share the same state and are updated together.",category:"Other",allowedChildrenTypes:[],fields:{proxyId:{name:"Component id",type:Y.Text,desc:"The id of the component to reuse."}}}},n3=we({...t3,__name:"CoreReuse",props:{contextSlot:{}},setup(e){const t=e,n=te(ne.evaluatedFields),o=te(ne.instancePath).at(-2).componentId,a=te(ne.core),s=te(ne.renderProxiedComponent),i=te(ne.isBeingEdited),l=te(ne.componentId),u=Ae(Ho("div","")),c=Ae(!0),d=H(()=>{var v;return(v=a.getComponentById(n.proxyId.value))==null?void 0:v.type}),h=H(()=>d.value?a.getComponentDefinition(d.value):null);function m(v,w){c.value=t.contextSlot==="default",u.value=Ho("div",{class:["CoreReuse",w],style:{color:"var(--primaryTextColor)"}},i.value?v:"")}function _(){if(!n.proxyId.value)return m("No component selected to reuse","empty");if(l===n.proxyId.value||!h.value)return m("The id specified for reuse doesn't match any component.","invalid-value");if(!a.getContainableTypes(o).includes(d.value))return m("The component cannot be reused here.","invalid-context");c.value=t.contextSlot===(h.value.slot??"default");const v=s(n.proxyId.value,0,{class:["CoreReuse"]});u.value=v}return Ue([n.proxyId,h],_,{immediate:!0}),(v,w)=>c.value?(k(),Oe(cs(u.value),{key:0})):ve("",!0)}}),r3={key:0,class:"controls"},o3={key:2},a3=["page"],s3="A component to embed PDF documents.",i3={writer:{name:"PDF",description:s3,category:"Embed",fields:{source:{name:"PDF source",type:Y.Text,desc:"A valid URL. Alternatively, you can provide a state reference to a packed PDF file."},highlights:{name:"Highlights",default:JSON.stringify([]),desc:"A list of highlights to be applied to the PDF as a JSON array of strings.",type:Y.Object,validator:P_},selectedMatch:{name:"Selected highlight match",default:null,desc:"The index of the selected highlight match.",type:Y.Number},page:{name:"Page",type:Y.Number,desc:"The page to be displayed."},controls:{...xt,name:"Controls",desc:"Show controls to navigate the PDF.",default:"yes"},containerBackgroundColor:bo,separatorColor:cn,primaryTextColor:Qt,cssClasses:tt}}},l3=we({...i3,__name:"CorePDF",setup(e){const t=te(ne.evaluatedFields);let n,r,o;const a=H(()=>t.highlights.value?t.highlights.value.map(ge=>ge.replaceAll("|","\\|")).join("|"):""),s=Ae({completeWords:!1,ignoreCase:!0}),i=Ae(1),l=Ae(1),u=Ae([]),c=Ae(0),d=ot("rootEl"),h=ot("viewerEl"),m=Ae(!1),_=Ae(0),v=Ae([]);ln(async()=>{const ge=await en(()=>import("./index-BJMAe9SN.js"),[],import.meta.url);o=ge.VuePDF;const de=ge.usePDF;({pdf:n,pages:r}=de(t.source)),w()});const w=()=>{m.value=!0,_.value=0,v.value=[],u.value=[]},A=ge=>{v.value=[...v.value,ge].sort((de,He)=>de.page-He.page)},C=ge=>{_.value++},y=()=>{u.value=v.value.reduce((ge,de)=>[...ge,...de.matches.map((He,Ce)=>({page:de.page,str:He.str,index:Ce}))],[]).sort((ge,de)=>ge.page===de.page?ge.index-de.index:ge.page-de.page)},p=()=>{y(),c.value&&D(c.value),t.selectedMatch.value&&(c.value=t.selectedMatch.value)},b=ge=>{const de=ge.target.getBoundingClientRect(),He=[...ge.target.children].filter(Ce=>Ce.className.includes("page")).find(Ce=>{const fe=Ce.getBoundingClientRect(),he=fe.y-de.y;return he<de.height/2&&he+fe.height>de.height/2});He&&(l.value=Number(He.getAttribute("page")))},I=(ge,de)=>{let He=0,Ce=ge;for(;Ce&&Ce!==de;)He+=Ce.offsetTop,Ce=Ce.offsetParent;return He},D=ge=>{if(ge<1||ge>u.value.length)return;const de=u.value[ge-1];if(!de)return;const Ce=d.value.querySelectorAll(`div[page='${de.page}'] span.highlight`)[de.index];h.value.scrollTop=I(Ce,h.value)},K=ge=>{if(ge<1||ge>r.value)return;const de=d.value.querySelector("div[page='"+ge+"']");h.value.scrollTop=I(de,h.value)},G=()=>{c.value<u.value.length?c.value=c.value+1:c.value=1},Z=()=>{c.value>1?c.value=c.value-1:c.value=u.value.length},be=()=>{i.value=i.value<2?i.value+.1:i.value},ce=()=>{i.value=i.value>.25?i.value-.1:i.value};return Ue(_,()=>{_.value===r.value&&t.page.value&&K(t.page.value)}),Ue([v,_],()=>{(!a.value||v.value.length===r.value)&&_.value===r.value&&(p(),m.value=!1)}),Ue(i,()=>{w()}),Ue(t.source,()=>{w()}),Ue(t.highlights,()=>{v.value=[],u.value=[]}),Ue(c,()=>{D(c.value)}),Ue(t.selectedMatch,()=>{c.value=t.selectedMatch.value}),Ue(t.page,()=>{K(t.page.value)}),(ge,de)=>(k(),L("div",{ref_key:"rootEl",ref:d,class:"CorePDF"},[O(t).controls.value?(k(),L("div",r3,[Le($r,{onClick:de[0]||(de[0]=()=>K(l.value-1))},{default:Je(()=>de[3]||(de[3]=[F("i",{class:"material-symbols-outlined"},"arrow_upward",-1)])),_:1}),Le($r,{onClick:de[1]||(de[1]=()=>K(l.value+1))},{default:Je(()=>de[4]||(de[4]=[F("i",{class:"material-symbols-outlined"},"arrow_downward",-1)])),_:1}),(k(),L("span",{key:l.value},Ee(l.value)+" / "+Ee(O(r)),1)),Le($r,{disabled:m.value,onClick:be},{default:Je(()=>de[5]||(de[5]=[F("i",{class:"material-symbols-outlined"},"zoom_in",-1)])),_:1},8,["disabled"]),Le($r,{disabled:m.value,onClick:ce},{default:Je(()=>de[6]||(de[6]=[F("i",{class:"material-symbols-outlined"},"zoom_out",-1)])),_:1},8,["disabled"]),F("span",null,Ee(Math.round(i.value*100))+"%",1),de[9]||(de[9]=F("span",{class:"separator"},null,-1)),u.value.length?(k(),Oe($r,{key:0,onClick:Z},{default:Je(()=>de[7]||(de[7]=[F("i",{class:"material-symbols-outlined"},"navigate_before",-1)])),_:1})):ve("",!0),u.value.length?(k(),Oe($r,{key:1,onClick:G},{default:Je(()=>de[8]||(de[8]=[F("i",{class:"material-symbols-outlined"},"navigate_next",-1)])),_:1})):ve("",!0),u.value.length?(k(),L("span",o3,"Matches "+Ee(c.value)+" / "+Ee(u.value.length),1)):ve("",!0)])):ve("",!0),F("div",{ref_key:"viewerEl",ref:h,class:"viewer",onScroll:b},[(k(!0),L(We,null,Pt(O(r),He=>(k(),L("div",{key:He,page:He,class:"page"},[Le(O(o),{scale:i.value,pdf:O(n),page:He,"text-layer":"","highlight-text":a.value,"highlight-options":s.value,onHighlight:de[2]||(de[2]=Ce=>A(Ce)),onLoaded:C},null,8,["scale","pdf","page","highlight-text","highlight-options"])],8,a3))),128))],544),de[10]||(de[10]=F("div",{class:"mask"},null,-1))],512))}}),c3=Ie(l3,[["__scopeId","data-v-aeb4c8ed"]]),u3={key:0,class:"noURLProvided"},d3=["src"],f3="A component to embed an external resource in an iframe.",p3=`
|
|
359
|
-
def load_handler(state):
|
|
360
|
-
|
|
361
|
-
# Sets status message when resource is loaded
|
|
362
|
-
|
|
363
|
-
state["status"] = "Page loaded"`,h3={writer:{name:"IFrame",description:f3,category:"Embed",fields:{src:{name:"Source",default:"",desc:"A valid URL",type:Y.Text,validator:O_},separatorColor:cn,cssClasses:tt},events:{"wf-load":{desc:"Fires when the resource has successfully loaded.",stub:p3.trim()}}}},m3=we({...h3,__name:"CoreIFrame",setup(e){const t=ot("rootEl"),n=te(ne.evaluatedFields);function r(){const o=new CustomEvent("wf-load");t.value.dispatchEvent(o)}return(o,a)=>(k(),L("div",{ref_key:"rootEl",ref:t,class:"CoreIFrame"},[O(n).src.value?(k(),L("iframe",{key:1,src:O(n).src.value,draggable:"false",onLoad:r},null,40,d3)):(k(),L("div",u3,a[0]||(a[0]=[F("h2",null,"No URL provided.",-1)]))),a[1]||(a[1]=F("div",{class:"mask"},null,-1))],512))}}),v3=Ie(m3,[["__scopeId","data-v-a3a63f75"]]),g3={key:0,class:"noAPIKeyProvided"},y3="A component to embed a Google Map. It can be used to display a map with markers.",_3=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],b3={writer:{name:"Google Maps",description:y3,category:"Embed",fields:{apiKey:{name:"API Key",default:"",desc:"API Key from Google Cloud Console.",type:Y.Text},mapId:{name:"Map ID",default:"",desc:"ID of map from Google Cloud Console, needed for markers.",type:Y.Text},mapType:{name:"Map type",type:Y.Text,default:"roadmap",options:{roadmap:"Roadmap",satellite:"Satellite",hybrid:"Hybrid",terrain:"Terrain"},desc:"One of 'roadmap', 'satellite', 'hybrid' or 'terrain'."},zoom:{name:"Zoom",default:"8",type:Y.Number},lat:{name:"Latitude",default:"37.79322359164316",type:Y.Number,validator:Lf},lng:{name:"Longitude",default:"-122.39999318828129",type:Y.Number,validator:Df},markers:{name:"Markers",default:JSON.stringify(_3),desc:"Markers data",type:Y.Object,validator:M_},cssClasses:tt},events:{"gmap-marker-click":{desc:"Capture single clicks on markers.",eventPayloadExample:[{lat:1,lng:1,name:"Marker"}]},"gmap-click":{desc:"Capture single click on map.",eventPayloadExample:{lat:1,lng:1}}}}},w3=we({...b3,__name:"CoreGoogleMaps",setup(e){const t=ot("rootEl"),n=ot("mapEl"),r=te(ne.evaluatedFields);let o=null,a=[];const s=H(()=>({lat:r.lat.value,lng:r.lng.value})),i=H(()=>["roadmap","satellite","hybrid","terrain"].includes(r.mapType.value)?r.mapType.value:"roadmap"),l=async()=>{c();const{Loader:d}=await en(()=>import("./index-BQr1pfrb.js"),[],import.meta.url);await new d({apiKey:r.apiKey.value,version:"weekly"}).load(),o=new google.maps.Map(n.value,{center:s.value,mapTypeId:i.value,zoom:8,mapId:r.mapId.value}),o.addListener("click",m=>{const _=new CustomEvent("gmap-click",{detail:{payload:m.latLng.toJSON()}});t.value.dispatchEvent(_)}),u()},u=async()=>{if(!r.mapId.value||!r.markers.value)return;const{AdvancedMarkerElement:d}=await google.maps.importLibrary("marker");c(),r.markers.value.forEach(m=>{const _=new d({position:{lat:m.lat,lng:m.lng},map:o,title:m.name});a.push(_),_.addListener("click",()=>{const v=new CustomEvent("gmap-marker-click",{detail:{payload:m}});t.value.dispatchEvent(v)})})},c=()=>{a.forEach(d=>d.setMap(null)),a=[]};return ln(async()=>{r.apiKey.value&&await l()}),Ue(s,async d=>{o&&o.setCenter(d)}),Ue(r.zoom,async d=>{o&&o.setZoom(d)}),Ue(i,async d=>{o&&o.setMapTypeId(d)}),Ue(r.markers,u),Ue(r.apiKey,l),Ue(r.mapId,l),(d,h)=>(k(),L("div",{ref_key:"rootEl",ref:t,class:"CoreGoogleMaps"},[O(r).apiKey.value?(k(),L("div",{key:1,ref_key:"mapEl",ref:n,class:"map"},null,512)):(k(),L("div",g3,h[0]||(h[0]=[F("h2",null,"Google Maps cannot be initialised.",-1),F("h3",null,"An API key hasn't been provided.",-1)]))),h[1]||(h[1]=F("div",{class:"mask"},null,-1))],512))}}),A3=Ie(w3,[["__scopeId","data-v-249b3ca8"]]),C3={class:"sidebarContainer"},$3=`
|
|
364
|
-
def handle_keydown(state, payload):
|
|
365
|
-
# The payload is a dictionary containing the key code and modifier keys.
|
|
366
|
-
# For example,
|
|
367
|
-
# {
|
|
368
|
-
# "key": "ArrowDown",
|
|
369
|
-
# "ctrl_key": False,
|
|
370
|
-
# "shift_key": False,
|
|
371
|
-
# "meta_key": False
|
|
372
|
-
# }
|
|
373
|
-
|
|
374
|
-
key_activated = payload.get("key")
|
|
375
|
-
delta = 0
|
|
376
|
-
if key_activated == "ArrowLeft":
|
|
377
|
-
delta += -10
|
|
378
|
-
elif key_activated == "ArrowRight":
|
|
379
|
-
delta += 10
|
|
380
|
-
|
|
381
|
-
shift_key = payload.get("shift_key")
|
|
382
|
-
if shift_key:
|
|
383
|
-
delta *= 2 # Shift makes it go faster
|
|
384
|
-
|
|
385
|
-
state["position"] += delta
|
|
386
|
-
`,S3=`
|
|
387
|
-
def handle_page_open(state, payload):
|
|
388
|
-
page_key = payload
|
|
389
|
-
state["message"] = f"The page {page_key} has been opened."
|
|
390
|
-
`,I3="A container component representing a single page within the application.",E3={writer:{name:"Page",category:"Root",events:{"wf-keydown":{desc:"Captures all key activity while this page is open.",stub:$3},"wf-page-open":{desc:"Emitted when the page is opened.",stub:S3}},description:I3,allowedChildrenTypes:["*"],allowedParentTypes:["root"],fields:{key:{name:"Page key",desc:"Unique identifier. It's needed to enable navigation to this Page.",type:Y.IdKey},pageMode:{name:"Page mode",default:"compact",type:Y.Text,options:{compact:"Compact",wide:"Wide"},category:ze.Style},accentColor:vn,primaryTextColor:Qt,secondaryTextColor:mr,emptinessColor:N_,containerBackgroundColor:bo,containerShadow:hs,separatorColor:cn,buttonColor:Zr,buttonTextColor:eo,buttonShadow:Jo,cssClasses:tt},previewField:"key"}},T3=we({...E3,__name:"CorePage",setup(e){const t=ot("rootEl"),n=te(ne.evaluatedFields);function r(a){const s=zP(a),i=a.target;t.value.contains(i)&&t.value.dispatchEvent(s)}function o(){const a=n.key.value,s=new CustomEvent("wf-page-open",{detail:{payload:a}});t.value.dispatchEvent(s)}return ln(async()=>{document.addEventListener("keydown",r),o()}),Nr(()=>{document.removeEventListener("keydown",r)}),(a,s)=>(k(),L("div",{ref_key:"rootEl",ref:t,class:"CorePage"},[F("div",C3,[Vt(a.$slots,"default",{slotName:"sidebar",positionlessSlot:!0},void 0,!0)]),F("div",{class:ut(["main",{compact:O(n).pageMode.value=="compact",wide:O(n).pageMode.value=="wide"}]),"data-writer-container":""},[Vt(a.$slots,"default",{},void 0,!0)],2)],512))}}),k3=Ie(T3,[["__scopeId","data-v-52076071"]]),x3=/^((?<pageKey>[^/]*))?(\/(?<routeVars>.*))?$/;function Kf(e=document.location.hash){var a;const n=(a=e.substring(1).match(x3))==null?void 0:a.groups,r=n!=null&&n.pageKey?decodeURIComponent(n.pageKey):void 0;if(!n)return{pageKey:r,routeVars:new Map};const o=new URLSearchParams(n.routeVars);return{pageKey:r,routeVars:new Map(o.entries())}}function P3(){const e=Kf(),t=Object.fromEntries(e.routeVars.entries());return{pageKey:e.pageKey,routeVars:t}}function M3(e){const{pageKey:t,routeVars:n}=e;let r="";if(t&&(r+=`${encodeURIComponent(t)}`),n.size>0){const o=new URLSearchParams([...n.entries()]);r+=`/${o.toString()}`}return r}function fb(e){document.location.hash=M3(e)}function O3(e){const t=Kf();t.pageKey=e,fb(t)}function cF(e){const t=Kf(),n=(t==null?void 0:t.routeVars)??{};t.routeVars=new Map(Object.entries({...n,...e})),fb(t)}const N3=`
|
|
391
|
-
def handle_hashchange(state, payload):
|
|
392
|
-
# The payload is a dictionary with the page key and all the route variables in the URL hash.
|
|
393
|
-
# For example, if the current URL is http://localhost:3000/#main/animal=duck&colour=yellow
|
|
394
|
-
# you will get the following dictionary
|
|
395
|
-
# {
|
|
396
|
-
# "page_key": "main",
|
|
397
|
-
# "route_vars": {
|
|
398
|
-
# "animal": "duck",
|
|
399
|
-
# "colour": "yellow"
|
|
400
|
-
# }
|
|
401
|
-
# }
|
|
402
|
-
|
|
403
|
-
page_key = payload.get("page_key")
|
|
404
|
-
route_vars = payload.get("route_vars")
|
|
405
|
-
|
|
406
|
-
if not route_vars:
|
|
407
|
-
return
|
|
408
|
-
|
|
409
|
-
if route_vars.get("animal") == "duck":
|
|
410
|
-
state["message"] = "You've navigated to the Duck zone."
|
|
411
|
-
else:
|
|
412
|
-
state["message"] = "You're not in the Duck zone.`.trim(),R3=`
|
|
413
|
-
def handle_app_open(state):
|
|
414
|
-
# The payload is a dictionary with the page key and all the route variables in the URL hash.
|
|
415
|
-
# For example, if the current URL is http://localhost:3000/#/animal=duck&colour=yellow
|
|
416
|
-
# you will get the following dictionary
|
|
417
|
-
# {
|
|
418
|
-
# "page_key": "main",
|
|
419
|
-
# "route_vars": {
|
|
420
|
-
# "animal": "duck",
|
|
421
|
-
# "colour": "yellow"
|
|
422
|
-
# }
|
|
423
|
-
# }
|
|
424
|
-
|
|
425
|
-
page_key = payload.get("page_key")
|
|
426
|
-
route_vars = payload.get("route_vars")
|
|
427
|
-
`.trim(),L3="The root component of the application, which serves as the starting point of the component hierarchy.",D3={writer:{name:"Root",category:"Root",description:L3,allowedChildrenTypes:["page"],fields:{appName:{name:"App name",type:Y.Text,desc:"The app name will be shown in the browser's title bar."},cssClasses:tt,buttonColor:Zr,buttonShadow:Jo,accentColor:vn,contentPadding:vs,primaryTextColor:Qt,buttonTextColor:eo,emptinessColor:N_,containerShadow:hs,secondaryTextColor:mr,separatorColor:cn,contentVAlign:Bf,contentHAlign:ms,contentWidth:eP},events:{"wf-app-open":{desc:"Captures the first application load, including page key and route vars.",stub:R3},"wf-hashchange":{desc:"Capture changes to the URL hash, including page key and route vars.",stub:N3}}}},B3=we({...D3,__name:"CoreRoot",setup(e){const t=te(ne.core),n=te(ne.builderManager),r=te(ne.getChildrenVNodes),o=ot("rootEl"),{isComponentVisible:a}=wc(t),s=H(()=>{const l=t.activePageId.value;if(!!t.getComponentById(l)&&t.isChildOf("root",l))return l;const c=t.getComponents("root",{includeBMC:!0,includeCMC:!0,sortedByPosition:!0});if(c.length==0)return null;const d=c.filter(h=>a(h.id));return d.length==0?null:d[0].id});function i(){var c;const l=P3(),u=new CustomEvent("wf-hashchange",{detail:{payload:l}});(c=o.value)==null||c.dispatchEvent(u),l.pageKey&&t.setActivePageFromKey(l.pageKey)}return Ue(s,l=>{var d;const c=(d=t.getComponentById(l).content)==null?void 0:d.key;n&&!n.isComponentIdSelected(l)&&n.setSelection(null),ar().then(()=>{var h,m;window.scrollTo(0,0),(m=(h=document.querySelector(".ComponentRenderer"))==null?void 0:h.parentElement)==null||m.scrollTo(0,0)}),O3(c)}),ls(()=>{window.addEventListener("hashchange",()=>{i()}),i()}),(l,u)=>(k(),L("div",{ref_key:"rootEl",ref:o,class:"CoreRoot","data-writer-container":""},[(k(!0),L(We,null,Pt(O(r)(),c=>(k(),L(We,{key:c.key},[c.key===`${s.value}:0`?(k(),Oe(cs(c),{key:0})):ve("",!0)],64))),128))],512))}}),F3=Ie(B3,[["__scopeId","data-v-89d3e95c"]]),j3={key:0,class:"noAccessTokenProvided"},V3=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],U3={writer:{name:"Mapbox",description:"A component to embed a Mapbox map. It can be used to display a map with markers.",docs:"For this component you need Mapbox access token: https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",category:"Embed",fields:{accessToken:{name:"Access Token",default:"",desc:"Access token from Mapbox",type:Y.Text},mapStyle:{name:"Map style",default:"mapbox://styles/mapbox/standard",type:Y.Text,desc:"Map style URL"},zoom:{name:"Zoom",default:"8",type:Y.Number},lat:{name:"Latitude",default:"37.79322359164316",type:Y.Number,validator:Lf},lng:{name:"Longitude",default:"-122.39999318828129",type:Y.Number,validator:Df},markers:{name:"Markers",init:JSON.stringify(V3,null,2),desc:"",type:Y.Object,validator:M_},controls:{...xt,name:"Controls visible",default:"yes",desc:"Show map controls"},cssClasses:tt},events:{"mapbox-marker-click":{desc:"Capture single clicks on markers.",eventPayloadExample:[{lat:1,lng:1,name:"Marker"}]},"mapbox-click":{desc:"Capture single click on map.",eventPayloadExample:{lat:1,lng:1}}}}},H3=we({...U3,__name:"CoreMapbox",setup(e){const t=te(ne.evaluatedFields),n=ot("rootEl"),r=ot("mapEl"),o=H(()=>[t.lng.value,t.lat.value]),a=Ae(null);let s=[],i=null;const l=async()=>{if(!r.value||!t.accessToken.value)return;const c=await en(()=>import("./mapbox-gl-BjXsUCYi.js").then(d=>d.m),[],import.meta.url);try{c.accessToken=t.accessToken.value,c.default&&(c.default.accessToken=t.accessToken.value),a.value=new c.Map({container:r.value,style:t.mapStyle.value,center:o.value,zoom:t.zoom.value}),a.value.on("click",d=>{const h=new CustomEvent("mapbox-click",{detail:{payload:{lat:d.lngLat.lat,lng:d.lngLat.lng}}});n.value.dispatchEvent(h)}),i=new c.NavigationControl,t.controls.value&&a.value.addControl(i),t.markers.value&&a.value.on("load",u)}catch(d){wn().error(d)}},u=async()=>{var d,h;if(!a.value)return;const c=await en(()=>import("./mapbox-gl-BjXsUCYi.js").then(m=>m.m),[],import.meta.url);s.forEach(m=>m.remove()),s=[],(h=(d=t.markers)==null?void 0:d.value)==null||h.forEach(m=>{const _=new c.Marker().setLngLat([m.lng,m.lat]).addTo(a.value).setPopup(new c.Popup().setText(m.name));s.push(_),_.getElement().addEventListener("click",v=>{const w=new CustomEvent("mapbox-marker-click",{detail:{payload:m}});n.value.dispatchEvent(w),v.stopPropagation()})})};return Ue(t.controls,()=>{a.value&&(t.controls?a.value.addControl(i):a.value.removeControl(i))}),Ue(t.markers,async()=>{a.value&&await u()}),Ue(t.mapStyle,()=>{a.value&&a.value.setStyle(t.mapStyle.value)}),Ue(o,()=>{var c,d;a.value&&((c=o.value)!=null&&c.lat)&&((d=o.value)!=null&&d.lng)&&a.value.setCenter(o.value)}),Ue(t.zoom,()=>{a.value&&t.zoom.value&&a.value.setZoom(t.zoom.value)}),Ue([r,t.accessToken],()=>{l()}),(c,d)=>(k(),L("div",{ref_key:"rootEl",ref:n,class:"CoreMapbox"},[O(t).accessToken.value?(k(),L("div",{key:1,ref_key:"mapEl",ref:r,class:"map"},null,512)):(k(),L("div",j3,d[0]||(d[0]=[F("h2",null,"MapBox cannot be initialised.",-1),F("h3",null,"An access token hasn't been provided.",-1)]))),d[1]||(d[1]=F("div",{class:"mask"},null,-1))],512))}}),z3=Ie(H3,[["__scopeId","data-v-946d8c56"]]);function K3(e,t){const{type:n}=e[t],a=Jf().map(i=>({type:i,definition:ui(i)})).filter(i=>i.definition.allowedParentTypes&&!i.definition.allowedParentTypes.includes(n));return new Set(a.map(i=>i.type))}function W3(e,t){const{type:n,parentId:r}=e[t],o=Jf().filter(l=>l!=="root"&&l!=="blueprints_root"),{allowedChildrenTypes:a,toolkit:s}=ui(n);if(!a)return new Set([]);let i=new Set(a);if(a.includes("*")&&(i=new Set([...i,...o])),i.delete("inherit")){if(!r)return i;const l=Wf(e,r);i=new Set([...i,...l])}return s&&(i=new Set(Array.from(i).filter(l=>ui(l).toolkit==s))),i}function Wf(e,t){const n=Array.from(W3(e,t)),r=Array.from(K3(e,t));return n.filter(a=>!r.includes(a))}function q3(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="writer/clipboard"&&"components"in e&&Array.isArray(e.components)}function G3(){const e=wn();async function t(){try{const r=await navigator.clipboard.readText(),o=JSON.parse(r);return q3(o)?o.components:void 0}catch{return}}function n(r){const o={type:"writer/clipboard",components:r};try{navigator.clipboard.writeText(JSON.stringify(o))}catch(a){e.warn("Failed to write components in the clipboard",a)}}return{get:t,set:n}}function qf(e,t,n){const r=G3();function o(){let S="";const E=new Uint16Array(16);return window.crypto.getRandomValues(E),E.forEach(P=>{S+=(P%36).toString(36)}),S}function a(x){const S=e.getComponentById(x);if(!S||S.position==0||!e.getComponentById(S.parentId))return;const W=de(x,-1),re=`move-up-${x}`;t.openMutationTransaction(re,"Move up"),t.registerPreMutation(W),W.position++,t.registerPostMutation(W),t.registerPreMutation(S),S.position--,t.registerPostMutation(S),t.closeMutationTransaction(re),e.sendComponentUpdate()}function s(x){const S=e.getComponentById(x);if(!S||!e.getComponentById(S.parentId)||S.position==-2)return;const W=de(x,1);if(!W)return;const re=`move-down-${x}`;t.openMutationTransaction(re,"Move down"),t.registerPreMutation(W),W.position--,t.registerPostMutation(W),t.registerPreMutation(S),S.position++,t.registerPostMutation(S),t.closeMutationTransaction(re),e.sendComponentUpdate()}function i(x,S,E){const P=e.getComponentById(x);if(!P)return;const W=e.getComponentById(P.parentId);if(!W||x==S||W.id==S&&E===null)return;const re=`move-${x}`;t.openMutationTransaction(re,"Move"),t.registerPreMutation(P),m(x,-1),P.position=E??R(S,P.type),P.parentId=S,m(x,1),t.registerPostMutation(P),t.closeMutationTransaction(re),e.sendComponentUpdate()}function l(x,S){const E=e.getComponentById(x);if(!E)return!1;const P=e.getContainableTypes(x);return!(E!=null&&E.isCodeManaged)&&!e.isChildOf(S.id,x)&&P.includes(S.type)}function u(x){const S=e.getComponentById(x),E=de(x,1);if(E&&l(E.id,S))return i(x,E.id),E.id}function c(x){const S=e.getComponentById(x),E=e.getComponentById(S.parentId).parentId;if(E&&l(E,S))return i(x,E,0),E}function d(x,S,E,P){const W=o(),re=e.getComponentDefinition(x),{fields:ie}=re,Pe={};return Object.entries(ie??{}).map(([lt,st])=>{var Nt;Pe[lt]=((Nt=P==null?void 0:P.content)==null?void 0:Nt[lt])??st.init}),{...P??{},id:W,type:x,parentId:S,content:Pe,handlers:{},position:E??R(S,x)}}function h(x,S,E,P,W){const re=d(x,S,E,P);re.id=(P==null?void 0:P.id)??re.id;const ie=`create-${re.id}`;return t.openMutationTransaction(ie,"Create"),e.addComponent(re),m(re.id,1),W==null||W(re.id),t.registerPostMutation(re),t.closeMutationTransaction(ie),e.sendComponentUpdate(),n==null||n.track(x.startsWith("blueprints_")?"blueprints_block_added":"ui_block_added",{componentId:re.id}),re.id}function m(x,S){const E=e.getComponentById(x);if(e.getComponentDefinition(E.type).positionless)return;e.getComponents(E.parentId,{includeBMC:!0,includeCMC:!1}).filter(ie=>ie.id!==x).filter(ie=>ie.position>=E.position).map(ie=>{t.registerPreMutation(ie),ie.position+=S,t.registerPostMutation(ie)})}function _(x){const S=e.getComponentById(x),E=[],P=W=>{const re=e.getComponents(W.id);E.push(W),re.map(ie=>P(ie))};return P(S),E}function v(x){return e.getComponents().filter(S=>{var E;return(E=S.outs)==null?void 0:E.find(P=>P.toNodeId==x)})}function w(...x){const S=x.map(P=>e.getComponentById(P)).filter(Boolean);if(S.length===0)return;const E=`delete-${S.map(P=>P.id).join(",")}`;t.openMutationTransaction(E,"Delete");for(const P of S){P.parentId&&m(P.id,-1);const W=v(P.id);for(const ie of W)t.registerPreMutation(ie),ie.outs=[...ie.outs.filter(Pe=>Pe.toNodeId!==P.id)];n==null||n.track(P.type.startsWith("blueprints_")?"blueprints_block_deleted":"ui_block_deleted",{componentId:P.id});const re=_(P.id);for(const ie of re)t.registerPreMutation(ie),e.deleteComponent(ie.id),t.removeSelectedComponentId(ie.id)}t.closeMutationTransaction(E),e.sendComponentUpdate()}function A(x){return w(x)}function C(x){return x=="root"}function y(x){const S=e.getComponentById(x);return!C(x)&&!(S!=null&&S.isCodeManaged)}function p(x){const S=e.getComponentById(x);return!(S!=null&&S.isCodeManaged)&&e.getContainableTypes(x).length>0}function b(x){return!C(x)}function I(x){const S=e.getComponentById(x);return!C(x)&&!(S!=null&&S.isCodeManaged)}function D(x){const S=e.getComponentById(x);return!C(x)&&!(S!=null&&S.isCodeManaged)}function K(x){return!C(x)}function G(x){return e.getComponents(x).length>0}function Z(x){return!!de(x,1)}function be(x){return!!de(x,-1)}function ce(x,S){const E=e.getComponentById(x);if(!E)return;const P=E.parentId;if(!P)return;let W;S&&(W=S.split(",").slice(0,-1).join(",")),t.setSelection(P,W)}function ge(x){const S=e.getComponents(x).sort((E,P)=>E.position-P.position).at(0);S&&t.setSelection(S.id)}function de(x,S){if(C(x))return;const E=e.getComponentById(x);if(!E)return;const{parentId:P,position:W}=E,re=W+S;return e.getComponents(P,{includeBMC:!0,includeCMC:!1}).find(ie=>ie.position===re&&ie.parentId===P)}function He(x){var W,re;if(C(x))return;const S=(W=e.getComponentById(x))==null?void 0:W.parentId;if(!S)return;const E=e.getComponents(S).sort((ie,Pe)=>ie.position-Pe.position),P=E.findIndex(ie=>ie.id===x);P===-1&&P+1===E.length||t.setSelection((re=E[P+1])==null?void 0:re.id)}function Ce(x){const S=de(x,-1);S&&t.setSelection(S.id)}function fe(x){if(x.length==0)return!1;const S={};return[...e.getComponents(),...x].forEach(P=>{S[P.id]=P}),x.map(P=>Wf(S,P.parentId).includes(P.type)).every(P=>P)}function he(x){const S=e.getComponentById(x);return!(!S||S.isCodeManaged)}function Ne(x){const S=Pe=>e.getComponents(Pe,{includeBMC:!0,includeCMC:!1}).filter(st=>{var Tt;return!((Tt=e.getComponentDefinition(st.type))==null?void 0:Tt.positionless)}).length,E=e.getComponentById(x);if(!E||E.isCodeManaged)return{up:!1,down:!1};if(e.getComponentDefinition(E.type).positionless)return{up:!1,down:!1};const W=E.parentId?S(E.parentId):0,re=W>0&&E.position>0,ie=W>0&&E.position<W-1;return{up:re,down:ie}}function me(x){if(!e.getComponentById(x))return;const E=_(x);r.set(E),t.setSelection(null),A(x),e.sendComponentUpdate()}function z(x){const S=JSON.parse(JSON.stringify(x));return S.forEach(E=>{delete E.isCodeManaged;const P=o();S.filter(W=>W.id!==E.id).map(W=>{var re;W.parentId==E.id&&(W.parentId=P),(re=W.outs)==null||re.forEach(ie=>{ie.toNodeId==E.id&&(ie.toNodeId=P)})}),E.id=P,typeof E.x<"u"&&typeof E.y<"u"&&(E.x+=36,E.y+=36)}),S}function ue(x){if(!e.getComponentById(x))return;const E=_(x),P=z(E);r.set(P)}async function X(x){if(!e.getComponentById(x))return;const E=await r.get();if(!E)throw Error("The clipboard doesn't contain Writer data");if(!E.length)throw Error("The clipboard doesn't contain components");const P=E[0];return typeof P.outs<"u"&&P.parentId!==x&&(P.outs=[]),T(x,E)}function T(x,S){r.set(z(S));const E=S[0];if(E.parentId=x,E.position=R(x,E.type),!fe(S))throw Error("Could not paste the components here");const P=`paste-copy-${x}`;t.openMutationTransaction(P,"Paste from copy"),S.map(W=>{e.addComponent(W),t.registerPostMutation(W)}),t.closeMutationTransaction(P),e.sendComponentUpdate()}function R(x,S){if(e.getComponentDefinition(S).positionless)return-2;const P=e.getComponents(x,{includeBMC:!0,includeCMC:!1}).filter(W=>W.position!==-2);return P.length>0?Math.max(Math.max(...P.map(re=>re.position))+1,0):0}function se(){var S,E;const x=t.getMutationTransactionsSnapshot();return{isUndoAvailable:!!x.undo,isRedoAvailable:!!x.redo,undoDesc:(S=x.undo)==null?void 0:S.desc,redoDesc:(E=x.redo)==null?void 0:E.desc}}function Re(){const x=t.consumeUndoTransaction();x&&(Object.entries(x.mutations).forEach(([S,E])=>{if(E.jsonPre&&E.jsonPost){e.addComponent(JSON.parse(E.jsonPre));return}if(!E.jsonPre&&E.jsonPost){e.deleteComponent(S);return}if(E.jsonPre&&!E.jsonPost){e.addComponent(JSON.parse(E.jsonPre));return}}),e.sendComponentUpdate())}function De(){const x=t.consumeRedoTransaction();x&&(Object.entries(x.mutations).forEach(([S,E])=>{if(E.jsonPre&&E.jsonPost){e.addComponent(JSON.parse(E.jsonPost));return}if(!E.jsonPre&&E.jsonPost){e.addComponent(JSON.parse(E.jsonPost));return}if(E.jsonPre&&!E.jsonPost){e.deleteComponent(S);return}}),e.sendComponentUpdate())}function it(x,S,E){const P=e.getComponentById(x);if(!P)return;const W=`edit-${x}-content-${S}`;t.openMutationTransaction(W,"Edit property",!0),t.registerPreMutation(P),P.content[S]=E,t.registerPostMutation(P),t.closeMutationTransaction(W),e.sendComponentUpdate()}function et(x,S){const E=e.getComponentById(x);if(!E)return;const P=`add-${x}-out-${S.outId}-${S.toNodeId}`;t.openMutationTransaction(P,"Add out",!0),t.registerPreMutation(E),E.outs=[...E.outs??[],S],t.registerPostMutation(E),t.closeMutationTransaction(P),e.sendComponentUpdate(),n==null||n.track("ui_blueprint_connected",{componentIds:[x,S.toNodeId],outId:S.outId})}function dt(x,S){const E=e.getComponentById(x);if(!E)return;const P=`edit-${x}-out-${S.outId}-${S.toNodeId}`;t.openMutationTransaction(P,"Edit out",!0),t.registerPreMutation(E),E.outs=E.outs.filter(W=>!(S.outId===W.outId&&S.toNodeId===W.toNodeId)),t.registerPostMutation(E),t.closeMutationTransaction(P),e.sendComponentUpdate()}function zt(x,S,E){const P=e.getComponentById(x);if(!P)return;const W=`change-${x}-coordinates`;t.openMutationTransaction(W,"Change coordinates",!1),t.registerPreMutation(P),P.x=Math.floor(S),P.y=Math.floor(E),t.registerPostMutation(P),t.closeMutationTransaction(W),e.sendComponentUpdate()}function N(x){const S=Object.entries(x);if(S.length==0)return;const E=`change-multiple-coordinates-${Object.keys(x).join(",")}`;t.openMutationTransaction(E,"Change coordinates",!1),S.forEach(([P,{x:W,y:re}])=>{const ie=e.getComponentById(P);ie&&(t.registerPreMutation(ie),ie.x=Math.floor(W),ie.y=Math.floor(re),t.registerPostMutation(ie))}),t.closeMutationTransaction(E),e.sendComponentUpdate()}function j(x,S,E="",P=!1){const W=e.getComponentById(x);if(!W)return;const re=`change-visibility-${x}`;t.openMutationTransaction(re,"Change visibility",!0),t.registerPreMutation(W),W.visible==null&&(W.visible={expression:!0,binding:"",reversed:!1}),typeof S=="boolean"?W.visible.expression=S:S=="custom"&&(W.visible={expression:"custom",binding:E,reversed:P}),t.registerPostMutation(W),t.closeMutationTransaction(re),e.sendComponentUpdate()}function ae(x,S,E){const P=e.getComponentById(x);if(!P)return;let W;if(E)W=E;else{const ie=e.getComponentDefinition(P.type),Xe=Object.entries(ie.events).filter(([lt,st])=>st.bindable).map(([lt,st])=>lt);W=Xe==null?void 0:Xe[0]}if(!W)return;const re=`change-binding-${x}`;t.openMutationTransaction(re,"Change binding",!0),t.registerPreMutation(P),S?P.binding={eventType:W,stateRef:S}:delete P.binding,t.registerPostMutation(P),t.closeMutationTransaction(re),e.sendComponentUpdate()}function ye(x,S,E){const P=e.getComponentById(x);if(!P)return;const W=`set-handler-${x}`;t.openMutationTransaction(W,"Set event handler",!0),t.registerPreMutation(P),E?(P.handlers||(P.handlers={}),P.handlers[S]=E):(delete P.handlers[S],Object.keys(P.handlers).length==0&&delete P.handlers),t.registerPostMutation(P),t.closeMutationTransaction(W),e.sendComponentUpdate()}function U(x){const S=e.getComponentById(x);return!S||S.type=="root"?null:S.type=="page"||S.type=="blueprints_blueprint"?x:U(S.parentId)}async function J(x){var P;const S=e.getComponentById(x);(P=e.getComponentDefinition(S.type))!=null&&P.name&&e.setActivePageId(U(x))}return{generateNewComponentId:o,moveComponent:i,moveComponentUp:a,moveComponentDown:s,cutComponent:me,copyComponent:ue,pasteComponent:X,createAndInsertComponent:h,removeComponentSubtree:A,removeComponentsSubtree:w,isPasteAllowed:he,undo:Re,redo:De,setContentValue:it,addOut:et,removeOut:dt,changeCoordinates:zt,changeCoordinatesMultiple:N,setVisibleValue:j,setBinding:ae,getUndoRedoSnapshot:se,setHandlerValue:ye,isAddAllowed:p,isCopyAllowed:b,isCutAllowed:I,isDeleteAllowed:D,isGoToParentAllowed:K,isGoToChildAllowed:G,isGoToNextSiblingAllowed:Z,isGoToPrevSiblingAllowed:be,repositionHigherSiblings:m,isDraggingAllowed:y,getEnabledMoves:Ne,goToParent:ce,goToChild:ge,goToNextSibling:He,goToPrevSibling:Ce,goToComponentParentPage:J,moveComponentInsideNextSibling:u,moveComponentToParent:c}}const J3=30,Y3=/^application\/json;writer=(?<componentType>\w+),(?<componentId>[\w\-]*)$/,Ms=Ae(null),ao=Ae(null),rl=Ae(!1);let Su=null,ol=null;function X3(e){function t(w){var y;const A=w.dataTransfer.types[0],C=(y=A==null?void 0:A.match(Y3))==null?void 0:y.groups;if(C)return{draggedType:C.componentType,draggedId:C.componentId}}function n(w){const y=(w.closest("[data-writer-cage]")??w).closest("[data-writer-id]");if(y)return y.dataset.writerId}function r(w){const A=t(w);if(!A)return;const{draggedType:C,draggedId:y}=A,p=n(w.target);if(!a(p,y,C))return;const I={draggedType:C,draggedId:y,parentId:Ms.value,position:ol};return v(w),I}function o(w,A,C){const y=e.getComponentById(w);if(!y)return!1;const p=e.getContainableTypes(w);return!(y!=null&&y.isCodeManaged)&&!e.isChildOf(A,w)&&p.includes(C)}function a(w,A,C){const y=e.getComponentById(w);if(y)return o(w,A,C)?w:y.parentId?a(y.parentId,A,C):null}function s(w){if(rl.value){l(w);return}i(w)}function i(w){const A=t(w);if(!A)return;const{draggedType:C,draggedId:y}=A,p=w.target,b=n(p),I=a(b,y,C);if(!I||I==y)return;const K=p.closest(`[data-writer-id="${I}"]`).dataset.writerInstancePath;if(w.preventDefault(),ao.value!==K)Su=Date.now();else if(Date.now()-Su>=DS){rl.value=!0,h(ao.value);return}Ms.value=I,ao.value=K}function l(w){const A=t(w);if(!A)return;w.preventDefault();const C=document.querySelector(`[data-writer-instance-path="${ao.value}"]`);if(d(w.clientX,w.clientY,C)>J3){v(w);return}const y=u(ao.value);if(y.length==0)return;const p=c(w.clientX,w.clientY,y);if(!p)return;const{el:b}=p,{draggedId:I}=A,D=parseInt(b.dataset.writerPosition),K=e.getComponentById(I);if(y.map(G=>{G.classList.contains("highlighted")&&G.classList.remove("highlighted")}),!b.classList.contains("highlighted")){if(b.classList.add("highlighted"),K&&K.parentId==Ms.value&&D>K.position){ol=D-1;return}ol=D}}function u(w){const A=_(w);return Array.from(A.querySelectorAll("[data-writer-position]"))}function c(w,A,C){const y=C.map(p=>({el:p,distance:d(w,A,p)})).sort((p,b)=>p.distance>b.distance?1:-1);return y==null?void 0:y[0]}function d(w,A,C){const{top:y,left:p,right:b,bottom:I}=C.getBoundingClientRect(),D=Math.max(p-w,0,w-b),K=Math.max(y-A,0,A-I);return Math.sqrt(D*D+K*K)}function h(w){_(w).classList.add("crackedContainer")}function m(w){_(w).classList.remove("crackedContainer")}function _(w){const A=document.querySelector(`[data-writer-instance-path="${w}"]`);if(A.hasAttribute("data-writer-container"))return A;const C=A.querySelectorAll("[data-writer-container]");for(let y=0;y<C.length;y++){const p=C[y];if(p.closest("[data-writer-instance-path]")==A)return p}}function v(w){w.preventDefault(),ao.value&&(m(ao.value),ao.value=null),Ms.value=null,Su=null,ol=null,rl.value=!1}return{candidateId:Ms,candidateInstancePath:ao,isParentSuitable:o,isCandidacyConfirmed:rl,getComponentInfoFromDrag:t,dropComponent:r,assignInsertionCandidacy:s,removeInsertionCandidacy:v}}function Iu(e,t){return Math.ceil(e/t)*t}function nv(e,t){return Math.round(e/t)*t}function pb(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function rv({x:e,y:t},n){return{x:nv(e,n),y:nv(t,n)}}function sd({x:e,y:t},{x:n,y:r}){return{x:e+n,y:t+r}}function ov(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function al(e,t,n){return e>=t&&e<=n}function av(e,t,n,r){return al(e,n,r)||al(t,n,r)||al(n,e,t)||al(r,e,t)}function Q3(e,t){const n=av(e.x,e.x+e.width,t.x,t.x+t.width),r=av(e.y,e.y+e.height,t.y,t.y+t.height);return n&&r}function sv(e,t,n){const r=[{x:-n,y:-n},{x:-n,y:0},{x:-n,y:n},{x:0,y:-n},{x:0,y:n},{x:n,y:-n},{x:n,y:0},{x:n,y:n}],o=new Set,a=[],s=[];function i({x:m,y:_}){return{width:e.width,height:e.height,x:m,y:_}}function l(m){if(m.x<0||m.y<0)return!1;const _=i(m);return!t.some(v=>Q3(_,v))}function u(m){const _=`${m.x},${m.y}`;o.has(_)||(a.push(m),o.add(_))}for(u({x:e.x,y:e.y});a.length;){const m=a.shift();if(m===void 0)return;if(l(m)&&s.push(m),s.length===0)for(const _ of r)u(sd(m,_))}const c=ov(e),d=m=>pb(c,ov(i(m))),h=s.sort((m,_)=>d(m)-d(_)).shift();return h?i(h):void 0}const Z3=["d"],eB=["d"],tB=["cx","cy"],nB=["x1","y1","x2","y2","stroke"],rB=["x1","y1","x2","y2","stroke"],Os=30,oB=we({__name:"BlueprintArrow",props:{arrow:{},isSelected:{type:Boolean},isEngaged:{type:Boolean}},emits:["delete"],setup(e,{emit:t}){const n=t,r=e,o=H(()=>{const i=r.arrow.x2-r.arrow.x1,l=r.arrow.y2-r.arrow.y1;return[{x:r.arrow.x1,y:r.arrow.y1},{x:r.arrow.x1+Os,y:r.arrow.y1},{x:r.arrow.x1+Os,y:r.arrow.y1+l*.25},{x:r.arrow.x1+i*.5,y:r.arrow.y1+l*.5},{x:r.arrow.x2-Os,y:r.arrow.y1+l*.75},{x:r.arrow.x2-Os,y:r.arrow.y2},{x:r.arrow.x2,y:r.arrow.y2}]}),a=H(()=>{const i=r.arrow.x2-r.arrow.x1,l=o.value;let u;return i>Os?(u=`M ${l[0].x} ${l[0].y}`,u+=`C ${l[3].x} ${l[0].y}, ${l[3].x} ${l[6].y}, ${l[6].x} ${l[6].y}`):(u=`M ${l[0].x} ${l[0].y}`,u+=`C ${l[1].x} ${l[1].y}, ${l[2].x} ${l[2].y}, ${l[3].x} ${l[3].y}`,u+=`C ${l[4].x} ${l[4].y}, ${l[5].x} ${l[5].y}, ${l[6].x} ${l[6].y}`),u});function s(){n("delete")}return(i,l)=>(k(),L("g",{class:ut(["BlueprintArrow",{engaged:i.isEngaged}]),tabindex:"0","data-writer-unselectable":"true"},[F("path",{d:a.value,style:_t({stroke:i.arrow.color})},null,12,Z3),F("path",{d:a.value,style:_t({stroke:i.arrow.color,strokeWidth:12,opacity:i.isSelected?"0.2":"0"})},null,12,eB),i.isSelected?(k(),L("g",{key:0,class:"delete",tabindex:"0","aria-label":"Delete relation",onClick:s,onKeydown:vo(s,["enter"])},[F("circle",{cx:o.value[3].x,cy:o.value[3].y,r:"12"},null,8,tB),F("line",{class:"cross",x1:o.value[3].x-4,y1:o.value[3].y-4,x2:o.value[3].x+4,y2:o.value[3].y+4,stroke:i.arrow.color,"stroke-width":"2"},null,8,nB),F("line",{class:"cross",x1:o.value[3].x+4,y1:o.value[3].y-4,x2:o.value[3].x-4,y2:o.value[3].y+4,stroke:i.arrow.color,"stroke-width":"2"},null,8,rB)],32)):ve("",!0)],2))}}),iv=Ie(oB,[["__scopeId","data-v-343694d1"]]),aB=we({__name:"BlueprintMiniMap",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset"],setup(e,{emit:t}){vi(C=>({"5436111d":`${l.value.width}px`,"2f2ee374":`${l.value.height}px`,"791851f1":u.value.isDisplayed?"":"none"}));const n=te(ne.builderManager),r=ot("rootEl"),o=t,a=new ResizeObserver(m),s=new MutationObserver(m),i=Ae(.2),l=Ae({width:166,height:100}),u=Ae({width:260,height:1,top:0,left:0,isDisplayed:!1}),c=Ae({width:1,height:1,top:0,left:0}),d=e,h=Ae([]);function m(){if(!d.nodeContainerEl)return;const C=Array.from(d.nodeContainerEl.querySelectorAll("[data-writer-id]")),y=d.nodeContainerEl.getBoundingClientRect();let p=0,b=0;h.value=C.map(I=>{const D=I.getBoundingClientRect();return p=Math.max(p,D.right+d.renderOffset.x*d.zoomLevel-y.left),b=Math.max(b,D.bottom+d.renderOffset.y*d.zoomLevel-y.top),{id:I.dataset.writerId,width:D.width,height:D.height,top:D.top+d.renderOffset.y*d.zoomLevel-y.top,left:D.left+d.renderOffset.x*d.zoomLevel-y.left}}),l.value={width:260,height:y.height/y.width*y.width/7},i.value=Math.min(l.value.width/(y.width+300),l.value.height/(y.height+300),l.value.width/(p+300),l.value.height/(b+300),l.value.width/(d.renderOffset.x*d.zoomLevel+y.width),l.value.height/(d.renderOffset.y*d.zoomLevel+y.height)),c.value={top:d.renderOffset.y*d.zoomLevel,left:d.renderOffset.x*d.zoomLevel,width:y.width,height:y.height},u.value={...c.value,isDisplayed:u.value.isDisplayed}}function _(C){const y=d.nodeContainerEl.getBoundingClientRect(),p=r.value.getBoundingClientRect();u.value={...u.value,top:Math.min(Math.max(0,(C.pageY-p.top)*(1/i.value)-y.height/2),p.height*(1/i.value)-y.height),left:Math.min(Math.max(0,(C.pageX-p.left)*(1/i.value)-y.width/2),p.width*(1/i.value)-y.width)}}function v(){u.value.isDisplayed=!0}function w(){u.value.isDisplayed=!1}function A(C){C.stopPropagation(),n.setSelection(null),o("changeRenderOffset",{x:u.value.left*(1/d.zoomLevel),y:u.value.top*(1/d.zoomLevel)})}return ln(async()=>{a.observe(d.nodeContainerEl),s.observe(d.nodeContainerEl,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style"]}),await ar(),m()}),Nr(()=>{a.disconnect(),s.disconnect()}),(C,y)=>(k(),L("div",{ref_key:"rootEl",ref:r,class:"BlueprintMiniMap",onMouseenter:v,onMouseleave:w,onMousemove:_,onClick:A},[F("div",{class:"selectedArea",style:_t({top:`${c.value.top*i.value}px`,left:`${c.value.left*i.value}px`,width:`${c.value.width*i.value}px`,height:`${c.value.height*i.value}px`})},null,4),F("div",{class:"selector",style:_t({top:`${u.value.top*i.value}px`,left:`${u.value.left*i.value}px`,width:`${u.value.width*i.value}px`,height:`${u.value.height*i.value}px`})},null,4),(k(!0),L(We,null,Pt(h.value,p=>(k(),L("div",{key:p.id,class:ut(["node",{selected:O(n).isComponentIdSelected(p.id)}]),style:_t({top:`${p.top*i.value}px`,left:`${p.left*i.value}px`,width:`${p.width*i.value}px`,height:`${p.height*i.value}px`})},null,6))),128))],544))}}),sB=Ie(aB,[["__scopeId","data-v-05861f5c"]]);function iB(){var t;return((t=navigator==null?void 0:navigator.userAgentData)==null?void 0:t.platform)||(navigator==null?void 0:navigator.platform)}function lv(){return hb()?"⌘ ":"Ctrl+"}function id(e){return hb()?e.metaKey:e.ctrlKey}function hb(){return iB().toLowerCase().indexOf("mac")!=-1}const lB={class:"bar"},cB={class:"autoArranger"},uB={class:"zoomer"},dB={class:"miniMapCollapser"},cv=.01,sl=.2,fB=we({__name:"BlueprintNavigator",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset","changeZoomLevel","resetZoom","autoArrange"],setup(e,{emit:t}){const n=e,{zoomLevel:r}=wd(n),o=ot("rootEl"),a=t,s=Ae(!0),i=Ae(l(r.value));function l(C){return`${Math.floor(C*100)}%`}function u(){s.value=!s.value}function c(){a("autoArrange")}function d(C){a("changeRenderOffset",C)}function h(){const C=r.value+sl;a("changeZoomLevel",C)}function m(){const C=r.value-sl;a("changeZoomLevel",C)}function _(C){const y=C.key;let p=r.value;if(y=="ArrowUp")p+=cv;else if(y=="ArrowDown")p-=cv;else return;a("changeZoomLevel",p)}function v(C){var b;const y=(b=C.target)==null?void 0:b.value;let p=parseInt(y)/100;isNaN(p)&&(p=1),i.value=l(p),a("changeZoomLevel",p)}function w(){a("resetZoom")}Ue(r,C=>{i.value=l(C)});function A(C){if(id(C)===!1)return;let y=r.value;if(C.key=="+"||C.key=="=")C.preventDefault(),y+=sl;else if(C.key=="-")C.preventDefault(),y-=sl;else return;a("changeZoomLevel",y)}return ln(()=>{document.addEventListener("keydown",A)}),Nr(()=>{document.removeEventListener("keydown",A)}),(C,y)=>(k(),L("div",{ref_key:"rootEl",ref:o,"data-writer-unselectable":"true",class:"BlueprintNavigator",onKeydown:A},[C.nodeContainerEl&&s.value?(k(),Oe(sB,{key:0,"node-container-el":C.nodeContainerEl,"render-offset":C.renderOffset,"zoom-level":O(r),class:"miniMap",onChangeRenderOffset:d},null,8,["node-container-el","render-offset","zoom-level"])):ve("",!0),F("div",lB,[F("div",cB,[Le(Rn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":"Auto arrange blocks","data-writer-tooltip-placement":"left",onClick:c},{default:Je(()=>y[1]||(y[1]=[F("i",{class:"material-symbols-outlined"},"apps",-1)])),_:1})]),F("div",uB,[Le(Rn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":O(r)>O(ca).minLevel?`Zoom out (${O(lv)()}-)`:"Can't zoom further","data-writer-tooltip-placement":"left",onClick:m},{default:Je(()=>y[2]||(y[2]=[F("i",{class:"material-symbols-outlined"},"remove",-1)])),_:1},8,["data-writer-tooltip"]),Le(L_,{modelValue:i.value,"onUpdate:modelValue":y[0]||(y[0]=p=>i.value=p),class:"zoomLevelInput",onKeydown:_,onChange:v},null,8,["modelValue"]),Le(Rn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":O(r)<O(ca).maxLevel?`Zoom in (${O(lv)()}+)`:"Can't zoom further","data-writer-tooltip-placement":"right",onClick:h},{default:Je(()=>y[3]||(y[3]=[F("i",{class:"material-symbols-outlined"},"add",-1)])),_:1},8,["data-writer-tooltip"]),Le(Rn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":"Reset zoom","data-writer-tooltip-placement":"right",onClick:w},{default:Je(()=>y[4]||(y[4]=[F("i",{class:"material-symbols-outlined"},"undo",-1)])),_:1})]),F("div",dB,[Le(Rn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":s.value?"Close minimap":"Open minimap","data-writer-tooltip-placement":"right",onClick:u},{default:Je(()=>y[5]||(y[5]=[F("i",{class:"material-symbols-outlined"},"close_fullscreen",-1)])),_:1},8,["data-writer-tooltip"])])])],544))}}),pB=Ie(fB,[["__scopeId","data-v-ac568870"]]),hB={class:"WdsModal__main"},mB={key:1,class:"WdsModal__main__title"},vB={class:"WdsModal__main__title__header"},gB={key:0},yB={class:"WdsModal__main__content"},_B={key:2,class:"WdsModal__main__footer"},bB={key:0,class:"WdsModal__main__footer__hint"},wB={key:1,class:"WdsModal__main__footer__actions"},AB=we({__name:"WdsModal",props:{title:{type:String,required:!1,default:null},size:{type:String,required:!1,default:"normal"},description:{type:String,required:!1,default:null},actions:{type:Array,required:!1,default:()=>[]},allowOverflow:{type:Boolean,required:!1},displayCloseButton:{type:Boolean,required:!1},hint:{type:String,required:!1,default:void 0}},emits:{close:()=>!0},setup(e){const t=e,{title:n,actions:r}=wd(t);return(o,a)=>{var s,i;return k(),Oe(qv,{to:"#modal"},[F("div",{class:ut(["WdsModal colorTransformer",{"WdsModal--overflow":e.allowOverflow,"WdsModal--wide":e.size=="wide"}]),tabindex:"-1"},[F("div",hB,[e.displayCloseButton?(k(),Oe(Rn,{key:0,variant:"neutral",size:"smallIcon",class:"WdsModal__main__closeBtn",onClick:a[0]||(a[0]=l=>o.$emit("close"))},{default:Je(()=>a[1]||(a[1]=[F("i",{class:"material-symbols-outlined"},"close",-1)])),_:1})):ve("",!0),O(n)||e.description?(k(),L("div",mB,[F("div",vB,[F("h2",null,Ee(O(n)),1),Vt(o.$slots,"titleActions",{},void 0,!0)]),e.description?(k(),L("summary",gB,Ee(e.description),1)):ve("",!0)])):ve("",!0),F("div",yB,[Vt(o.$slots,"default",{},void 0,!0)]),((s=O(r))==null?void 0:s.length)>0||e.hint?(k(),L("div",_B,[e.hint?(k(),L("p",bB,Ee(e.hint),1)):ve("",!0),((i=O(r))==null?void 0:i.length)>0?(k(),L("div",wB,[(k(!0),L(We,null,Pt(O(r),(l,u)=>(k(),Oe(Rn,{key:u,variant:u==O(r).length-1?"primary":"tertiary",disabled:l.disabled,onClick:l.fn},{default:Je(()=>[tn(Ee(l.desc),1)]),_:2},1032,["variant","disabled","onClick"]))),128))])):ve("",!0)])):ve("",!0)])],2)])}}}),CB=Ie(AB,[["__scopeId","data-v-bfac8438"]]),$B="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='48'%20height='48'%20rx='24'%20fill='black'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M34.0187%2028.9434L37.2255%2015.7128H32.7659L30.812%2015.7128L34.0187%2028.9434Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M25.4266%2015.7128H20.967L25.4266%2034.1126L27.4085%2034.1126H31.8681L27.4085%2015.7128H25.4266L25.4266%2015.7128Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.5635%2015.7129H13.1038L13.1039%2015.7132H11.1219L15.5816%2034.113H20.0413L20.0412%2034.1126H22.0231L17.5635%2015.7129Z'%20fill='white'/%3e%3c/svg%3e",SB=["width","height"],IB=["fill"],EB=["fill"],TB=["fill"],kB=we({__name:"WdsLoaderDots",props:{color:{type:String,required:!1,default:$t.Blue5},size:{type:Number,required:!1,default:16}},setup(e){return(t,n)=>(k(),L("svg",{width:e.size,height:e.size,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[F("circle",{cx:"4",cy:"8",fill:e.color},n[0]||(n[0]=[F("animate",{attributeName:"r",values:"0.5;3;0",dur:"1.2s",repeatCount:"indefinite"},null,-1)]),8,IB),F("circle",{cx:"8",cy:"8",fill:e.color},n[1]||(n[1]=[F("animate",{attributeName:"r",values:"0.5;3;0",dur:"1.2s",begin:"0.4s",repeatCount:"indefinite"},null,-1)]),8,EB),F("circle",{cx:"12",cy:"8",fill:e.color},n[2]||(n[2]=[F("animate",{attributeName:"r",values:"0.5;3;0",dur:"1.2s",begin:"0.8s",repeatCount:"indefinite"},null,-1)]),8,TB)],8,SB))}}),xB={},PB={width:"592",height:"592",viewBox:"0 0 592 592",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function MB(e,t){return k(),L("svg",PB,t[0]||(t[0]=[F("g",null,[F("g",{"clip-path":"url(#paint0_angular_167_137448_clip_path)"},[F("g",{transform:"matrix(0.208791 0.208791 -0.208791 0.208791 296.078 296.082)"},[F("foreignObject",{x:"-1003.39",y:"-1003.39",width:"2006.77",height:"2006.77"},[F("div",{xmlns:"http://www.w3.org/1999/xhtml",style:{background:`conic-gradient(
|
|
428
|
-
from 90deg,
|
|
429
|
-
rgba(240, 207, 255, 1) 0deg,
|
|
430
|
-
rgba(191, 203, 255, 1) 360deg
|
|
431
|
-
)`,height:"100%",width:"100%",opacity:"1"}})])])]),F("ellipse",{cx:"296.078",cy:"296.082",rx:"295.275",ry:"295.275",transform:"rotate(-45 296.078 296.082)"})],-1),F("defs",null,[F("clipPath",{id:"paint0_angular_167_137448_clip_path"},[F("ellipse",{cx:"296.078",cy:"296.082",rx:"295.275",ry:"295.275",transform:"rotate(-45 296.078 296.082)"})])],-1)]))}const Eu=Ie(xB,[["render",MB]]),OB={class:"BlueprintsLifeLoading"},NB={class:"logoContainer"},RB={class:"rotating-text"},LB={class:"background"},DB=4e3,BB=we({__name:"BlueprintsGenerationLoader",setup(e){const t=["Analyzing requirements","Shopping for blocks","Connecting the dots","Wiring the circuits","Flipping the switches"],n=Ae(0),r=setInterval(()=>{n.value=(n.value+1)%t.length},DB);return Nr(()=>clearInterval(r)),(o,a)=>(k(),L("div",OB,[F("div",NB,[a[0]||(a[0]=F("img",{src:$B,alt:"Writer Framework logo"},null,-1)),Le(kB,{class:"dot-loader",color:"black"}),F("p",RB,[(k(),L(We,null,Pt(t,(s,i)=>F("span",{key:i,class:ut({active:n.value===i})},Ee(s),3)),64))])]),F("div",LB,[Le(Eu,{class:"rotating-circle left"}),Le(Eu,{class:"rotating-circle center"}),Le(Eu,{class:"rotating-circle right"})])]))}}),FB=Ie(BB,[["__scopeId","data-v-6298b85a"]]);var Fr,jr;class jB{constructor(t){Xc(this,Fr,void 0);Xc(this,jr,void 0);Qc(this,Fr,t==null?void 0:t.signal),Qc(this,jr,(t==null?void 0:t.baseUrl)??window.location.origin)}async fetchApplicationDeployment(t,n){const r=new URL(`/api/template/organization/${t}/application/${n}/deployment`,er(this,jr)),o=await fetch(r,{signal:er(this,Fr),credentials:"include"});if(!o.ok)throw Error(await o.text());return o.json()}async publishApplication(t,n,r){const o=new URL(`/api/template/organization/${t}/application/${n}/publish`,er(this,jr)),a=await fetch(o,{method:"PUT",body:JSON.stringify(r),signal:er(this,Fr),credentials:"include"});if(!a.ok)throw Error(await a.text());return await a.json()}async fetchUserProfile(){const t=new URL("/api/user/v2/profile",er(this,jr)),n=await fetch(t,{signal:er(this,Fr),credentials:"include"});if(!n.ok)throw Error(await n.text());return n.json()}async analyticsIdentify(){const t=new URL("/api/analytics/identify",er(this,jr)),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json","X-Client":"Framework"},body:JSON.stringify({traits:{}}),signal:er(this,Fr),credentials:"include"});if(!n.ok)throw Error(await n.text())}async analyticsTrack(t,n){const r=new URL("/api/analytics/track",er(this,jr)),o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json","X-Client":"Framework"},body:JSON.stringify({eventName:t,properties:n}),signal:er(this,Fr),credentials:"include"});if(!o.ok)throw Error(await o.text())}async analyticsPage(t,n,r){const o=new URL("/api/analytics/page",er(this,jr)),a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json","X-Client":"Framework"},body:JSON.stringify({name:t,organizationId:n,properties:r}),signal:er(this,Fr),credentials:"include"});if(!a.ok)throw Error(await a.text())}}Fr=new WeakMap,jr=new WeakMap;var VB={BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};function UB(e={}){const t=VB.VITE_WRITER_BASE_URL??window.location.origin;return{writerApi:new jB({...e,baseUrl:t}),apiBaseUrl:t}}let uv=!1;const dv="[AgentEditor]";function mb(e){const t=new AbortController,n=H(()=>{var c;return!!((c=e.writerApplication.value)!=null&&c.id)}),r=H(()=>{var c;return Number((c=e.writerApplication.value)==null?void 0:c.organizationId)||void 0}),{writerApi:o}=UB({signal:t.signal}),a=wn();ln(async()=>{if(!(!n.value||uv)){uv=!0;try{await o.analyticsIdentify()}catch(c){a.error("Failed to identify the current user for analytics",c)}}});function s(c){var h,m;const d=structuredClone(c);return typeof d.componentId=="string"&&(d.component=i(d.componentId),delete d.componentId),Array.isArray(d.componentIds)&&(d.components=d.componentIds.map(i),delete d.componentIds),{writerApplicationId:(h=e.writerApplication.value)==null?void 0:h.id,writerOrganizationId:(m=e.writerApplication.value)==null?void 0:m.organizationId,...d}}function i(c){const d=e.getComponentById(c);if(!d)return{};const h=e.getComponentDefinition(d.type);return h?{name:h.name,category:h.category}:{}}function l(c,d={}){if(!(e.mode.value!=="edit"||!n.value))return o.analyticsTrack(`${dv} ${c}`,s(d))}function u(c,d={}){if(!(e.mode.value!=="edit"||!n.value||!r.value))return o.analyticsPage(`${dv} ${c}`,r.value,s(d))}return{track:l,page:u}}function ld(e,t=window.location.toString()){return new URL(`.${e}`,t).toString()}const HB={class:"BlueprintsAutogen"},zB={class:"main"},KB={class:"buttons"},WB=we({__name:"BlueprintsAutogen",emits:["blockGeneration"],setup(e,{emit:t}){const n=te(ne.core),r=te(ne.builderManager),{generateNewComponentId:o}=qf(n,r),a=mb(n),s=Ae(!1),i=Ae(""),l=t;function u(){l("blockGeneration",null)}ln(()=>{a.track("blueprints_auto_gen_opened")});function c(h){const m={};return h.forEach(_=>{const v=o();m[_.id]=v,_.id=v}),h.forEach(_=>{var v;(v=_.outs)==null||v.forEach(w=>{w.toNodeId=m[w.toNodeId]})}),h.forEach(_=>{Object.entries(m).forEach(([v,w])=>{const A=new RegExp(`(@{\\s*results\\.)aig${v}\\b`,"g");Object.entries(_.content).forEach(([C,y])=>{const p=y.replace(A,(b,I)=>b.replace(I,w));_.content[C]=p})})}),h}async function d(){var w;const h=i.value;s.value=!0,a.track("blueprints_auto_gen_started",{prompt:i.value});const m=await fetch(ld("/api/autogen"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:h})});if(s.value=!1,!m.ok)throw new Error(`Error: ${m.status} - ${m.statusText}`);const _=await m.json(),v=c((w=_.blueprint)==null?void 0:w.components);l("blockGeneration",{components:v}),a.track("blueprints_auto_gen_completed")}return(h,m)=>(k(),L("div",HB,[s.value?(k(),Oe(FB,{key:1})):(k(),L(We,{key:0},[F("div",zB,[Le(Bd,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=_=>i.value=_),rows:"8",placeholder:"Describe the blocks you'd like to generate..."},null,8,["modelValue"])]),F("div",KB,[Le(Rn,{onClick:d},{default:Je(()=>m[1]||(m[1]=[F("i",{class:"material-symbols-outlined"},"bolt",-1),tn(" Generate ")])),_:1}),Le(Rn,{variant:"tertiary",onClick:u},{default:Je(()=>m[2]||(m[2]=[tn(" Cancel ")])),_:1})])],64))]))}}),qB=Ie(WB,[["__scopeId","data-v-2589a114"]]),GB=["data-writer-unselectable"],JB=["x","y"],YB=["cx","cy","fill"],XB={key:0,width:"100%",height:"100%",fill:"url(#grid)",fil:""},{log:QB}=wn(),dn=24,ZB="A container component representing a single blueprint within the application.",e4={writer:{name:"Blueprint",toolkit:"blueprints",category:"Root",description:ZB,allowedChildrenTypes:["*"],allowedParentTypes:["blueprints_root"],fields:{key:{name:"Blueprint key",desc:"Unique identifier. It's needed to enable navigation to this Blueprint.",type:Y.IdKey}}}},ca={minLevel:.2,maxLevel:1,step:.25,initialLevel:1},t4=we({...e4,__name:"BlueprintsBlueprint",setup(e){vi(le=>({"32177dd0":h.value}));const t=pa({loader:()=>en(()=>import("./BlueprintToolbar-CHWL-rTm.js"),__vite__mapDeps([7,8,9]),import.meta.url)}),n=te(ne.core),r=te(ne.builderManager),o=te(ne.renderProxiedComponent),a=te(ne.componentId),s=ot("rootEl"),i=ot("nodeContainerEl"),l=En([]),u=En({x:0,y:0}),c=En(null),d=Ae(!1),h=Ae(ca.initialLevel),m=new MutationObserver(ge),_=En({}),v=dn*4,w=dn*6,A=H(()=>n.getComponents(a,{sortedByPosition:!0})),C=mb(n),{createAndInsertComponent:y,addOut:p,removeOut:b,changeCoordinatesMultiple:I}=qf(n,r,C),{getComponentInfoFromDrag:D}=X3(n),K=En(null),G=En(null),Z=En(null),be=ce();function ce(){const le="blueprint__hideGrid",Te=Ae(localStorage.getItem(le)===null);return Ue(Te,_e=>_e?localStorage.removeItem(le):localStorage.setItem(le,"1")),Te}function ge(){l.value=A.value.reduce((le,Te)=>{var _e;if(!((_e=Te.outs)!=null&&_e.length))return le;for(const Se of Te.outs){const Be=it(Te.id,Se.outId,void 0,Se.toNodeId);Be&&le.push(Be)}return le},[])}const de=H(()=>{var le,Te;return K.value===null&&!((le=G.value)!=null&&le.isPerfected)&&!((Te=Z.value)!=null&&Te.isPerfected)?null:!0});function He(){c.value=null}function Ce(){const le=new Map;function Te(Se,Be){var kt;if(le.values().find(pt=>pt.has(Se)))return;le.has(Be)||le.set(Be,new Set),le.get(Be).add(Se),(kt=Se.outs)==null||kt.forEach(pt=>{const Dt=n.getComponentById(pt.toNodeId);Te(Dt,Be+1)})}const _e=new Map;return A.value.forEach(Se=>{var Be;(Be=Se.outs)==null||Be.forEach(je=>{_e.has(je.toNodeId)||_e.set(je.toNodeId,new Set),_e.get(je.toNodeId).add(Se.id)})}),A.value.filter(Se=>!_e.has(Se.id)).forEach(Se=>{Te(Se,0)}),le}function fe(le){const Te=`[data-writer-id="${le}"]`,_e=i.value.querySelector(Te);if(_e)return _e.getBoundingClientRect()}function he(le){var Be;const Te=fe(le);if(!Te)return;const _e=(Be=s.value)==null?void 0:Be.getBoundingClientRect();if(!_e)return;const Se=je=>{const nt=Iu(je,dn);return nt===je?nt+1:nt-1};return{x:u.value.x+(Te.x-_e.x)*T.value,y:u.value.y+(Te.y-_e.y)*T.value,width:Se(Te.width*T.value),height:Se(Te.height*T.value)}}function Ne(le){const Te=new Map,_e=new Map;return le.forEach((Se,Be)=>{let je=0,nt=0;Se.forEach(kt=>{const pt=fe(kt.id);pt&&(_e.set(kt.id,{height:pt.height*T.value}),je+=pt.height*T.value+v,nt=Math.max(nt,pt.width*T.value))}),Te.set(Be,{height:je-v,width:nt})}),{columnDimensions:Te,nodeDimensions:_e}}function me(){z("currentY")}function z(le){const Te={currentY:(pt,Dt)=>pt.y>Dt.y?1:-1,socketPosition:(pt,Dt)=>{const[Jt,Kt]=[pt,Dt].map(vr=>A.value.map(Ao=>{var Co;return(Co=Ao.outs)==null?void 0:Co.filter(to=>to.toNodeId===vr.id).map(to=>({fromNodeId:Ao.id,fromOutId:to.outId}))}).filter(Boolean).flat());if(!Jt||Jt.length===0||!Kt||Kt.length===0)return 0;const Yt=document.querySelector(`[data-writer-id="${Jt[0].fromNodeId}"] [data-writer-socket-id="${Jt[0].fromOutId}"]`),gn=document.querySelector(`[data-writer-id="${Kt[0].fromNodeId}"] [data-writer-socket-id="${Kt[0].fromOutId}"]`);if(!Yt||!gn)return 0;const wo=Yt.getBoundingClientRect(),ys=gn.getBoundingClientRect();return wo.y>ys.y?-1:1}},_e=Ce(),{columnDimensions:Se,nodeDimensions:Be}=Ne(_e),je=Math.max(...Array.from(Se.values()).map(pt=>pt.height)),nt={};let kt=w/2;for(let pt=0;pt<_e.size;pt++){const Dt=Array.from(_e.get(pt)).sort(Te[le]),{width:Jt,height:Kt}=Se.get(pt);let Yt=Iu((je-Kt)/2+v,dn);Dt.forEach(gn=>{const wo=rv({x:kt,y:Yt},dn);nt[gn.id]=wo,Yt+=Be.get(gn.id).height+v}),kt+=Iu(Jt+w,dn)}I(nt)}function ue(le,Te){zt();const Se=document.querySelector(`[data-writer-id="${Te}"]`).getBoundingClientRect(),Be=(le.pageX-Se.x)*T.value,je=(le.pageY-Se.y)*T.value;G.value={nodeId:Te,offset:{x:Be,y:je},isPerfected:!1}}function X(le,Te){K.value={fromNodeId:le,fromOutId:Te}}const T=H(()=>1/h.value);function R(le){const Te=s.value.getBoundingClientRect(),_e=u.value.x+(le.pageX-Te.x)*(1/h.value),Se=u.value.y+(le.pageY-Te.y)*(1/h.value);return{x:_e,y:Se}}function se(le){le.preventDefault(),le.stopPropagation();const Te=D(le);if(!Te)return;const{draggedType:_e,draggedId:Se}=Te;if(Se)return;const{x:Be,y:je}=R(le);Be<0||je<0||S(_e,{x:Be,y:je})}function Re(le,Te){if(c.value==Te){c.value=null;return}le.stopPropagation(),c.value=Te,r.setSelection(null)}async function De(le){if(!le.toNodeId)return;const Te={outId:le.fromOutId,toNodeId:le.toNodeId};b(le.fromNodeId,Te)}function it(le,Te,_e,Se){var Kt;let Be,je,nt,kt;const pt=(Kt=s.value)==null?void 0:Kt.getBoundingClientRect();if(!pt)return;nt=((_e==null?void 0:_e.x)-pt.x)*T.value,kt=((_e==null?void 0:_e.y)-pt.y)*T.value;const Dt=document.querySelector(`[data-writer-id="${le}"] [data-writer-socket-id="${Te}"]`);if(!Dt)return;const Jt=Dt.getBoundingClientRect();if(Be=(Jt.x-pt.x+Jt.width/2)*T.value,je=(Jt.y-pt.y+Jt.height/2)*T.value,!!Dt){if(typeof Se<"u"){const gn=document.querySelector(`[data-writer-id="${Se}"]`).getBoundingClientRect();nt=(gn.x-pt.x)*T.value,kt=(gn.y-pt.y+gn.height/2)*T.value}return{x1:Be,y1:je,x2:nt,y2:kt,color:getComputedStyle(Dt).backgroundColor,fromNodeId:le,fromOutId:Te,toNodeId:Se}}}function et(le){const _e=le.target.closest(".BlueprintsBlueprint [data-writer-id]");return _e==null?void 0:_e.dataset.writerId}function dt(le){let Te,_e;_e=et(le),typeof _e>"u"&&(Te={x:le.pageX,y:le.pageY});const{fromNodeId:Se,fromOutId:Be}=K.value;_e!=Se&&(K.value={...K.value,liveArrow:it(Se,Be,Te,_e)})}function zt(){Z.value=null,K.value=null,G.value=null}function N(le){const Te=Object.entries(le).filter(([_e,Se])=>{const Be=n.getComponentById(_e);return(Be==null?void 0:Be.x)!==Se.x||(Be==null?void 0:Be.y)!==Se.y}).reduce((_e,[Se,Be])=>{const je=rv(Be,dn),nt=he(Se),kt={...nt,...je},pt=A.value.filter(Kt=>Kt.id!==Se).map(Kt=>he(Kt.id)).filter(Boolean),{x:Dt,y:Jt}=sv(kt,pt,dn);return(nt.x!==Dt||nt.y!==Jt)&&(_e[Se]={x:Dt,y:Jt}),_e},{});Object.keys(Te).length!==0&&I(Te)}function j(){N(_.value),_.value={}}function ae(le){const{nodeId:Te,offset:_e}=G.value,{x:Se,y:Be}=R(le),je=Math.floor(Se-_e.x),nt=Math.floor(Be-_e.y),kt=n.getComponentById(Te);pb({x:kt.x,y:kt.y},{x:je,y:nt})>10&&(G.value={...G.value,isPerfected:!0});const Dt={x:je-kt.x,y:nt-kt.y};if(!r.selection.value.some(Yt=>Yt.componentId===Te)){_.value={..._.value,[Te]:{x:je,y:nt}};return}const Kt=r.selection.value.map(Yt=>n.getComponentById(Yt.componentId)).filter(Yt=>Yt.id!==Te&&Yt.x!==void 0&&Yt.y!==void 0).reduce((Yt,gn)=>(Yt[gn.id]=sd({x:gn.x,y:gn.y},Dt),Yt),{});_.value={..._.value,...Kt,[Te]:{x:je,y:nt}}}function ye(le){const Te=s.value.getBoundingClientRect(),_e=le.pageX-Te.x,Se=le.pageY-Te.y,{x:Be,y:je}=Z.value.offset;Z.value={isPerfected:!0,offset:{x:_e,y:Se}},Pe(u.value.x+(Be-_e)*1*T.value,u.value.y+(je-Se)*1*T.value)}function U(le){if(le.buttons==1){if(K.value){dt(le);return}if(G.value){ae(le);return}if(Z.value){ye(le);return}}}function J(le){if(zt(),le.buttons!=1)return;const Te=s.value.getBoundingClientRect(),_e=le.pageX-Te.x,Se=le.pageY-Te.y;Z.value={offset:{x:_e,y:Se},isPerfected:!1}}async function x(le){if(G.value&&j(),K.value===null)return;const Te=et(le);if(!Te){K.value=null;return}const{fromNodeId:_e,fromOutId:Se}=K.value;if(_e==Te){K.value=null;return}p(K.value.fromNodeId,{toNodeId:Te,outId:Se})}function S(le,Te){const _e=A.value.map(je=>he(je.id)).filter(Boolean),{x:Se,y:Be}=sv({...Te,width:240,height:180},_e,dn);y(le,a,void 0,{x:Se,y:Be})}function E(le){var nt;const Te=fe(le),_e=(nt=s.value)==null?void 0:nt.getBoundingClientRect();if(!Te||!_e)return;const{width:Se,height:Be}=Te,je=n.getComponentById(le);je&&Pe(je.x-_e.width/2+Se/2,je.y-_e.height/2+Be/2)}function P(le){Pe(le.x,le.y)}function W(le){const Te=A.value.map(Be=>({id:Be.id,type:Be.type,content:Be.content,outs:Be.outs})),_e=JSON.stringify(Te),Se=`
|
|
432
|
-
<example>
|
|
433
|
-
<description>
|
|
434
|
-
${le}
|
|
435
|
-
</description>
|
|
436
|
-
<blueprint>
|
|
437
|
-
${_e}
|
|
438
|
-
</blueprint>
|
|
439
|
-
</example>`.trim();QB(Se)}function re(le){h.value=Math.max(Math.min(ca.maxLevel,le),ca.minLevel)}function ie(le){re(le)}function Pe(le,Te){u.value={x:Math.max(0,le),y:Math.max(0,Te)}}function Xe(le){Pe(u.value.x+le.deltaX*T.value,u.value.y+le.deltaY*T.value)}function lt(le){const Te=.006666666666666667,_e=s.value.getBoundingClientRect(),Se=h.value;h.value=Math.min(Math.max(h.value-le.deltaY*Te,ca.minLevel),ca.maxLevel);const Be={w:_e.width*(1/Se)*T.value*(h.value-Se),h:_e.height*(1/Se)*T.value*(h.value-Se)},je={x:(le.pageX-_e.x)/_e.width,y:(le.pageY-_e.y)/_e.height};Pe(u.value.x+Be.w*je.x,u.value.y+Be.h*je.y)}async function st(le){if(le.preventDefault(),!le.ctrlKey&&!id(le)){Xe(le);return}lt(le)}async function Nt(){const{width:Te,height:_e,x:Se,y:Be}=s.value.getBoundingClientRect(),je=i.value.querySelectorAll("[data-writer-id]"),{maxX:nt,maxY:kt}=Array.from(je).reduce((Dt,Jt)=>{const Kt=Jt.getBoundingClientRect();return{maxY:Math.max(Dt.maxY,(Kt.bottom-Be)*T.value+u.value.y),maxX:Math.max(Dt.maxX,(Kt.right-Se)*T.value+u.value.x)}},{maxY:0,maxX:0}),pt=Math.min((Te-48)/nt,(_e-48)/kt);re(pt),Pe(0,0)}async function Tt(le){if(d.value=!1,!le)return;const{components:Te}=le;Te.forEach(_e=>{y(_e.type,a,void 0,_e)}),await ar(),z("socketPosition")}Ue(r.firstSelectedItem,le=>{le&&(c.value=null,n.isChildOf(a,le.componentId)&&le.source!=="click"&&E(le.componentId))});function nn(le){if(id(le)&&(le.code==="Backquote"||le.code==="Backslash")){be.value=!be.value;return}if(!r.selection.value.length)return;const _e=le.target;if(_e.tagName==="INPUT"||_e.tagName==="TEXTAREA")return;function Se(){switch(le.key){case"ArrowDown":return{x:0,y:dn};case"ArrowUp":return{x:0,y:-dn};case"ArrowLeft":return{x:-dn,y:0};case"ArrowRight":return{x:dn,y:0}}}const Be=Se();if(Be===void 0)return;le.preventDefault();const je=r.selection.value.map(nt=>n.getComponentById(nt.componentId)).filter(nt=>(nt==null?void 0:nt.x)!==void 0&&(nt==null?void 0:nt.y)!==void 0).reduce((nt,kt)=>(nt[kt.id]=sd({x:kt.x,y:kt.y},Be),nt),{});N(je)}const Zt=new AbortController;return ln(async()=>{var le;await Nt(),await ar(),ge(),(le=s.value)==null||le.addEventListener("wheel",st,{signal:Zt.signal}),document.addEventListener("keydown",nn,{signal:Zt.signal}),m.observe(i.value,{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0,characterData:!0}),window.createAutogenExample=W}),Nr(()=>{Zt.abort(),m.disconnect()}),(le,Te)=>{var _e;return k(),L("div",{ref_key:"rootEl",ref:s,class:"BlueprintsBlueprint","data-writer-unselectable":de.value,onClick:He,onDragover:Te[1]||(Te[1]=cr(()=>{},["prevent","stop"])),onDrop:se,onMousemove:U,onMousedown:J,onMouseup:x},[F("div",{ref_key:"nodeContainerEl",ref:i,class:"nodeContainer"},[(k(),L("svg",null,[F("defs",null,[F("pattern",{id:"grid",width:dn,height:dn,patternUnits:"userSpaceOnUse",x:-u.value.x-dn/2,y:-u.value.y-dn/2},[F("circle",{cx:dn/2,cy:dn/2,r:"1",fill:O($t).Gray3},null,8,YB)],8,JB)]),O(be)?(k(),L("rect",XB)):ve("",!0),(k(!0),L(We,null,Pt(l.value,(Se,Be)=>(k(),Oe(iv,{key:Be,arrow:Se,"is-selected":c.value==Be,"is-engaged":c.value==Be||O(r).isComponentIdSelected(Se.fromNodeId)||O(r).isComponentIdSelected(Se.toNodeId),onClick:je=>Re(je,Be),onDelete:je=>De(Se)},null,8,["arrow","is-selected","is-engaged","onClick","onDelete"]))),128)),(_e=K.value)!=null&&_e.liveArrow?(k(),Oe(iv,{key:"liveArrow",arrow:K.value.liveArrow,"is-selected":!1,"is-engaged":!0},null,8,["arrow"])):ve("",!0)])),(k(!0),L(We,null,Pt(A.value,Se=>{var Be,je,nt,kt,pt,Dt,Jt,Kt;return k(),Oe(cs(O(o)(Se.id,0)),{key:Se.id,style:_t({top:`${(((je=(Be=_.value)==null?void 0:Be[Se.id])==null?void 0:je.y)??Se.y)-u.value.y}px`,left:`${(((kt=(nt=_.value)==null?void 0:nt[Se.id])==null?void 0:kt.x)??Se.x)-u.value.x}px`,"border-color":((Dt=(pt=K.value)==null?void 0:pt.liveArrow)==null?void 0:Dt.toNodeId)==Se.id?(Kt=(Jt=K.value)==null?void 0:Jt.liveArrow)==null?void 0:Kt.color:void 0}),onMousedown:cr(Yt=>ue(Yt,Se.id),["stop"]),onOutMousedown:Yt=>X(Se.id,Yt)},null,40,["style","onMousedown","onOutMousedown"])}),128))],512),Le(O(t),{class:"blueprintsToolbar",onAutogenClick:Te[0]||(Te[0]=Se=>d.value=!0)}),d.value?(k(),Oe(CB,{key:0},{default:Je(()=>[Le(qB,{onBlockGeneration:Tt})]),_:1})):ve("",!0),O(i)?(k(),Oe(pB,{key:1,"node-container-el":O(i),"render-offset":u.value,"zoom-level":h.value,class:"navigator",onAutoArrange:me,onChangeRenderOffset:P,onChangeZoomLevel:ie,onResetZoom:Nt},null,8,["node-container-el","render-offset","zoom-level"])):ve("",!0)],40,GB)}}}),n4=Ie(t4,[["__scopeId","data-v-fbe8f0b4"]]),r4={class:"alias"},o4=["contenteditable"],a4=we({__name:"BlueprintsNodeNamer",props:{componentId:{},blockName:{}},setup(e){const t=e,n=te(ne.core),r=te(ne.builderManager),{setContentValue:o}=qf(n,r),a=H(()=>{var h;return(h=n.getComponentById(t.componentId))==null?void 0:h.content.alias}),s=H(()=>!!a.value),i=ot("aliasEditorEl"),l=Ae(!1);async function u(){if(l.value)return;l.value=!0,await ar();const h=i.value;h.focus();const m=document.createRange(),_=window.getSelection();m.setStart(h,h.childNodes.length),m.collapse(!0),_.removeAllRanges(),_.addRange(m)}function c(){const h=i.value.textContent;i.value.blur(),l.value=!1,o(t.componentId,"alias",h)}function d(h){l.value&&h.stopPropagation()}return(h,m)=>(k(),L("div",{class:ut(["BlueprintsNodeNamer",{beingEdited:l.value,hasEyebrow:s.value||l.value}]),"data-writer-unselectable":"true"},[F("div",{class:"blockName",onClick:u},Ee(h.blockName),1),F("div",r4,[s.value||l.value?(k(),L("div",{key:0,ref_key:"aliasEditorEl",ref:i,class:"aliasEditor",contenteditable:l.value,"data-writer-unselectable":"true",onClick:u,onMousemove:d,onBlur:c,onKeydown:vo(c,["enter"])},Ee(a.value),41,o4)):ve("",!0)])],2))}}),s4=Ie(a4,[["__scopeId","data-v-2b0e7f1e"]]),i4={key:0,class:"side"},l4={class:"extraBorder"},c4={key:0,class:"runner"},u4={class:"main"},d4={class:"title"},f4={key:0,class:"deprecationNotice"},p4={key:0},h4=["data-writer-socket-id","onMousedownCapture"],m4={key:1},v4={class:"outputs"},g4=["data-writer-socket-id","onMousedownCapture"],y4={writer:{name:"Node",description:"A Blueprints node.",toolkit:"blueprints",category:"Other",fields:{alias:{name:"Alias",type:Y.Text}},allowedParentTypes:["blueprints_blueprint"],previewField:"alias"}},_4=we({...y4,__name:"BlueprintsNode",emits:["outMousedown","engaged"],setup(e,{emit:t}){const n=t,r=te(ne.core),o=te(ne.builderManager),a=te(ne.componentId),s=te(ne.evaluatedFields),i=H(()=>r.getComponentById(a)),l=H(()=>{var b;return r==null?void 0:r.getComponentDefinition((b=i.value)==null?void 0:b.type)}),u=H(()=>{var b;return((b=l==null?void 0:l.value)==null?void 0:b.category)=="Triggers"}),c=H(()=>{var b;return((b=l==null?void 0:l.value)==null?void 0:b.category)=="Writer"}),d=H(()=>{var b;return(b=l==null?void 0:l.value)==null?void 0:b.deprecated}),h=H(()=>{var b;return m.value==null?null:m.value=="in_progress"?"running":((b={...v.value}[m.value])==null?void 0:b.style)??"success"}),m=H(()=>{const b=o.getLogEntries();for(let I=0;I<b.length;I++){const K=b[I].blueprintExecution;if(K)for(let G=0;G<K.summary.length;G++){const Z=K.summary[G];if(Z.componentId===i.value.id)return Z.outcome}}return null}),_=H(()=>o.isComponentIdSelected(a)),v=H(()=>{const b={};return Object.entries(l.value.outs??{}).forEach(([I,D])=>{D.style!="dynamic"&&(b[I]=D)}),b}),w=H(()=>{var I;const b=new Set([...Object.keys(v.value),...Object.values(C.value).flatMap(Object.keys)]);return(((I=i.value)==null?void 0:I.outs)??[]).reduce((D,{outId:K})=>{if(!b.has(K))return D[K]={name:K,style:"dynamic",description:""},D},{})});function A(b){const D=l.value.fields[b].type==Y.Tools,K=Object.keys(s[b].value??{});return D?K.filter(Z=>{var be;return((be=s[b].value[Z])==null?void 0:be.type)=="function"}):K}const C=H(()=>{const b={};return Object.entries(l.value.outs??{}).forEach(([I,D])=>{if(D.style!=="dynamic")return;if(!D.field){b.default??(b.default={}),b.default[I]={...D};return}b[D.field]={},A(D.field).forEach(G=>{b[D.field][`${I}_${G}`]={name:G,description:"Dynamically created",style:"dynamic"}})}),b});function y(b,I){b.stopPropagation(),n("outMousedown",I)}const p=H(()=>{if(["success","error"].includes(h.value)){const I=`/status/${h.value}.svg`;return[ld(I)]}const b=[`/components/${i.value.type}.svg`,`/components/blueprints_category_${l.value.category}.svg`];return r.featureFlags.value.includes("custom_block_icons")&&b.unshift(`/static/components/${i.value.id}.svg`),b.map(I=>ld(I))});return Ue(_,()=>{n("engaged")}),(b,I)=>(k(),L("div",{class:ut(["BlueprintsNode",{"BlueprintsNode--trigger":u.value,"BlueprintsNode--intelligent":c.value,"BlueprintsNode--deprecated":d.value,"BlueprintsNode--running":h.value=="running","BlueprintsNode--success":h.value=="success","BlueprintsNode--error":h.value=="error"}])},[c.value&&h.value===null?(k(),L("div",i4)):ve("",!0),F("div",l4,[h.value=="running"?(k(),L("div",c4)):ve("",!0)]),F("div",u4,[F("div",d4,[Le(ab,{urls:p.value},null,8,["urls"]),Le(s4,{"component-id":O(a),class:"nodeNamer","block-name":l.value.name},null,8,["component-id","block-name"]),d.value?(k(),L("div",f4," Deprecated ")):ve("",!0)]),(k(!0),L(We,null,Pt(C.value,(D,K)=>{var G;return k(),L("div",{key:K,class:"outputs"},[(G=l.value.fields)!=null&&G[K]?(k(),L("h4",p4,Ee(l.value.fields[K].name),1)):ve("",!0),(k(!0),L(We,null,Pt(D,(Z,be)=>(k(),L("div",{key:be,class:"output"},[tn(Ee(Z.name)+" ",1),F("div",{class:ut(["ball",Z.style]),"data-writer-socket-id":be,"data-writer-unselectable":!0,onClickCapture:I[0]||(I[0]=cr(()=>{},["stop"])),onMousedownCapture:ce=>y(ce,be)},null,42,h4)]))),128)),Object.keys(D).length==0?(k(),L("div",m4,"None configured.")):ve("",!0)])}),128)),F("div",v4,[(k(!0),L(We,null,Pt({...v.value,...w.value},(D,K)=>(k(),L("div",{key:K,class:"output"},[K!=="trigger"?(k(),L(We,{key:0},[tn(Ee(D.name),1)],64)):ve("",!0),F("div",{class:ut(["ball",D.style]),"data-writer-socket-id":K,"data-writer-unselectable":!0,onClickCapture:I[1]||(I[1]=cr(()=>{},["stop"])),onMousedownCapture:G=>y(G,K)},null,42,g4)]))),128))])])],2))}}),b4=Ie(_4,[["__scopeId","data-v-0cb452ec"]]),w4="The root component of the application, which serves as the starting point of the component hierarchy.",A4={writer:{name:"Blueprints Root",toolkit:"blueprints",category:"Root",description:w4,allowedChildrenTypes:["blueprints_blueprint"],fields:{}}},C4=we({...A4,__name:"BlueprintsRoot",setup(e){const t=te(ne.core),n=te(ne.getChildrenVNodes),r=ot("rootEl"),o=H(()=>{const a=t.activePageId.value;if(!!t.getComponentById(a)&&t.isChildOf("blueprints_root",a))return a;const i=t.getComponents("blueprints_root",{includeBMC:!0,includeCMC:!1,sortedByPosition:!0});return i.length==0?null:i[0].id});return(a,s)=>(k(),L("div",{ref_key:"rootEl",ref:r,class:"BlueprintsRoot","data-writer-container":""},[(k(!0),L(We,null,Pt(O(n)(),i=>(k(),L(We,{key:i.key},[i.key===`${o.value}:0`?(k(),Oe(cs(i),{key:0})):ve("",!0)],64))),128))],512))}}),$4=Ie(C4,[["__scopeId","data-v-01d7b606"]]),Gf={root:F3,page:k3,sidebar:RD,button:v5,text:SM,section:SD,header:gD,heading:jP,dataframe:MP,html:db,pagination:D5,repeater:V5,column:iD,columns:dD,tab:VD,tabs:GD,link:BM,horizontalstack:wD,separator:kD,image:YP,pdf:c3,iframe:v3,googlemaps:A3,mapbox:z3,icon:HP,timer:W5,textinput:AL,textareainput:EL,numberinput:jR,sliderinput:uL,rangeinput:gL,colorinput:UN,dateinput:GN,timeinput:OL,radioinput:qR,checkboxinput:ON,dropdowninput:tR,selectinput:ZR,multiselectinput:RR,fileinput:mR,webcamcapture:e3,vegalitechart:TM,plotlygraph:bM,metric:vM,message:lM,videoplayer:OM,chatbot:yO,step:r5,steps:u5,ratinginput:UL,tags:EO,switchinput:GL,reuse:n3,avatar:LO,annotatedtext:zO,jsonviewer:fN,blueprints_root:$4,blueprints_blueprint:n4,progressbar:$N},Qs={};function S4(e){const t=`Component type "${e}" not supported. If it's a custom component, please ensure it's been loaded.`;return{writer:{name:"Fallback Component",allowedChildrenTypes:["*"],description:t,category:"Fallback"},setup(n,{slots:r}){return()=>Ho("div",{"data-writer-container":"",style:{color:"var(--primaryTextColor)"}},[t,r.default({})])}}}function I4(e){var o,a;const t={blueprints_node:b4},n=Qs[e];if(!n)return;const r=n.baseType;return{...t[r],writer:{...t[r].writer,...Qs[e].writer,fields:{...(o=t[r].writer)==null?void 0:o.fields,...(a=Qs[e].writer)==null?void 0:a.fields}}}}function E4(e){return I4(e)??Gf[e]??S4(e)}function ui(e){var t;return(t=E4(e))==null?void 0:t.writer}function Jf(){return[...Object.keys(Gf),...Object.keys(Qs)]}function T4(e,t){Gf[e]=t}function k4(e,t){Qs[e]=t}function x4(e){let t=!1;return M4(e),Object.entries(e).forEach(([,n])=>{t=R4(n,e)||t,t=P4(n)||t}),t}function P4(e){const t=wn(),n=ui(e.type);if(!n||n.category=="Fallback")return t.error(`Component ${e.id} (${e.type}). Invalid component type.`),!1;let r=!1;return r=B4(e),r=D4(e)||r,O4(e,n),N4(e,n),r}function cd(e,t,n={}){n[e]=!0,Object.entries(t).filter(([,r])=>r.parentId===e).forEach(([r])=>cd(r,t,n))}function M4(e){const t=wn(),n=Object.fromEntries(Object.entries(e).map(([r])=>[r,!1]));cd("root",e,n),cd("blueprints_root",e,n),Object.entries(n).forEach(([r,o])=>{o||t.warn(`Component ${r} (${e[r].type}). Orphan component.`)})}function O4(e,t){const n=wn(),r=Object.keys(t.fields??{});e.content&&Object.keys(e.content).forEach(o=>{r.includes(o)||n.warn(`Component ${e.id} (${e.type}). Field key "${o}" is defined in the component but not in the template.`)})}function N4(e,t){const n=Object.keys(t.events??{});if(!e.binding)return;const r=e.binding.eventType;if(n.includes(r)&&t.events[r].bindable)return;wn().warn(`Component ${e.id} (${e.type}). The component is bound to event "${e.binding.eventType}" but the template doesn't define that event or it's not bindable.`)}function R4(e,t){const n=wn();let r=!1;e.id=="root"&&e.position!==0&&n.error("Root must be at position 0."),e.position==-1&&n.error(`Component ${e.id} (${e.type}). Invalid position.`);const o=Object.values(t).filter(i=>i.parentId===e.id&&i.position!==-2&&!i.isCodeManaged);let a=0;return o.forEach(i=>{a+=i.position}),(o.length-1)*o.length/2!==a&&(n.error(`Component ${e.id} (${e.type}). Invalid children positions. Automated fix will be applied.`),L4(o),r=!0),r}function L4(e){e.sort((t,n)=>t.position>n.position?1:-1),e.map((t,n)=>{t.position=n})}function D4(e){var n,r,o;let t=!1;if(Object.keys(e.handlers??{}).forEach(a=>{if(!a.startsWith("ss-"))return;const s=`wf-${a.substring(3)}`;e.handlers[s]=e.handlers[a],t=!0,delete e.handlers[a]}),(r=(n=e.binding)==null?void 0:n.eventType)!=null&&r.startsWith("ss-")){const s=`wf-${((o=e.binding)==null?void 0:o.eventType).substring(3)}`;e.binding.eventType=s,t=!0}return t}function B4(e,t){let n=!1;if(e.type=="column"){if("horizontalAlignment"in e.content){const r={left:"start",center:"center",right:"end"};e.content.contentHAlign=r[e.content.horizontalAlignment]||e.content.horizontalAlignment,delete e.content.horizontalAlignment,n=!0}if("verticalAlignment"in e.content){const r={normal:"unset",top:"start",center:"center",bottom:"end"};e.content.contentVAlign=r[e.content.verticalAlignment]||e.content.verticalAlignment,delete e.content.verticalAlignment,n=!0}}else if(e.type=="horizontalstack"){if("alignment"in e.content){const r={left:"start",center:"center",right:"end"};e.content.contentHAlign=r[e.content.alignment]||e.content.alignment,delete e.content.alignment,n=!0}}else e.type=="section"&&"snapMode"in e.content&&(delete e.content.snapMode,n=!0);return n}function F4(e){let t="";const n=[];let r=!1;for(let a=0;a<e.length;a++){const s=e[a];if(s==="."&&!r){n.push(t),t="";continue}t+=s,s==="\\"?r=!0:r=!1}return n.push(t),n.map(a=>a.replaceAll("\\.","."))}const j4="WriterCustomComponentTemplates";async function V4(e){await Promise.all(e.map(async t=>{const n=t.toLocaleLowerCase();n.endsWith(".js")?await U4(t):n.endsWith(".css")&&z4(t)}))}async function U4(e){var n;const t=wn();t.log(`Importing custom component templates at "${e}"...`),await en(()=>import(vb()+e),[],import.meta.url),(n=Object.entries(window[j4]))==null||n.forEach(([r,o])=>{H4(r)?(T4(`custom_${r}`,o),t.log(`Registering template for "${r}".`)):t.warn(`custom component '${r}' is ignored. A custom component should be declared using only alphanumeric lowercase and _.`)})}function H4(e){return/^[a-z0-9_]+$/.test(e)}function z4(e){const t=document.createElement("link");t.rel="stylesheet",t.href=vb()+e,document.head.appendChild(t)}function vb(){let e=window.location.pathname;return e.endsWith("/")||(e+="/"),`${e}extensions/`}function K4(e){return typeof e!="object"||e===null?!1:e.type==="file"&&typeof e.content=="string"}function uF(e){return typeof e!="object"||e===null?!1:e.type==="binary"}function gs(e){return typeof e!="object"||e===null?!1:e.type==="directory"&&typeof e.children=="object"}function*W4(e,t=[]){if(!gs(e)){yield t;return}for(const[n,r]of Object.entries(e.children))yield*W4(r,[...t,n])}function*q4(e,t=[]){if(yield t,!!gs(e))for(const[n,r]of Object.entries(e.children))yield*q4(r,[...t,n])}function Yf(e,t){if(e.length===0)return t;if(!gs(t))return;const[n,...r]=e,o=t.children[n];return r.length===0?o:Yf(r,o)}function ud(e,t,n={type:"file",content:"",complete:!0}){var a;const r=structuredClone(t);let o=r;for(let s=0;s<e.length;s++){if(!gs(o))return r;const i=e.at(s);if(s===e.length-1)return o.children[i]=n,r;(a=o.children)[i]??(a[i]={type:"directory",children:{}}),o=o.children[i]}return r}function G4(e,t,n){const r=Yf(e,n);if(gs(r)||r===void 0)return n;const o=gb(e,n);return ud(t,o,structuredClone(r))}function gb(e,t){var o;const n=structuredClone(t);let r=n;for(let a=0;a<e.length;a++){if(!gs(r))return n;const s=e.at(a);if(!(s in r.children))return n;if(a===e.length-1)return delete r.children[s],n;(o=r.children)[s]??(o[s]={type:"directory",children:{}}),r=r.children[s]}return n}const J4=1e3,Y4=6e4;function X4(){let e=null;const t=Ae(null),n=Ae(null),r=Ae(),o=En([]),a=Ae(null),s=En({type:"directory",children:{}}),i=Ae({}),l=Ae([]),u=Ae({});let c;const d=Ae("idle");let h=0;const m=Ae(new Map);let _=[],v=[];const w=Ae(null);async function A(){await C(),p(),n.value=="edit"}async function C(){const U=await fetch("./api/init",{method:"post",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify({proposedSessionId:e})}),J=await U.json();if(U.status>400)throw"Connection rejected.";J.extensionPaths&&await V4(J.extensionPaths),n.value=J.mode,i.value=J.components,u.value=J.userState,G(J.mail),e=J.sessionId,t.value=new Date().getTime(),o.value=J.featureFlags,r.value=J.writerApplication,y(J.abstractTemplates),l.value=J.userFunctions,a.value=J.runCode,s.value=J.sourceFiles,await K(),!(n.value!="edit"||!x4(J.components))&&await De()}function y(U){Object.entries(U??{}).forEach(([J,x])=>{k4(J,x)})}function p(){setTimeout(()=>{R("keepAlive",{},p)},Y4)}function b(U){U&&Object.entries(U).forEach(([J,x])=>{const S=J.charAt(0),E=F4(J.substring(1)),P=E.length-1;let W=u.value;const re=S==="-";for(let ie=0;ie<P;ie++){const Pe=W==null?void 0:W[E[ie]];typeof Pe=="object"&&Pe!==null?W=Pe:re||(W[E[ie]]={},W=W[E[ie]])}re?delete W[E.at(-1)]:W[E.at(-1)]=x})}function I(U){U&&(i.value=U)}function D(){m.value.forEach(({callback:U})=>{U==null||U({ok:!1})}),m.value.clear()}async function K(){if(c)return;const U=wn(),J=new URL("./api/stream",window.location.href);return J.protocol=J.protocol.replace("https","wss"),J.protocol=J.protocol.replace("http","ws"),c=new WebSocket(J.href),c.onopen=()=>{D(),d.value="connected",U.log("WebSocket connected. Initialising stream..."),R("streamInit",{sessionId:e})},c.onmessage=x=>{var P,W,re,ie;const S=JSON.parse(x.data);if(S.messageType=="announcement"&&S.payload.type=="codeUpdate"){c.close(),C();return}if(S.messageType=="announcement"&&S.payload.type=="componentUpdate"){const Pe={};Object.entries(i.value).forEach(([Xe,lt])=>{lt.isCodeManaged&&(Pe[Xe]=lt)}),i.value={...Pe,...S.payload.payload};return}if(S.messageType=="announcement"&&S.payload.type=="mail"){G(S.payload.payload);return}(S.messageType=="eventResponse"||S.messageType=="stateEnquiryResponse")&&(b((P=S.payload)==null?void 0:P.mutations),G((W=S.payload)==null?void 0:W.mail),I((re=S.payload)==null?void 0:re.components));const E=m.value.get(S.trackingId);(ie=E==null?void 0:E.callback)==null||ie.call(E,{ok:!0,payload:S.payload}),m.value.delete(S.trackingId)},c.onclose=async x=>{if(c=null,d.value="offline",x.code==1008){U.error("Invalid session. Reinitialising..."),await C();return}U.error("WebSocket closed. Attempting to reconnect..."),setTimeout(async()=>{try{await K()}catch{U.error("Couldn't reconnect.")}},J4)},new Promise((x,S)=>{c.addEventListener("open",()=>x(),{once:!0}),c.addEventListener("close",()=>S(),{once:!0})})}function G(U=[]){_.push(...U),_=_.filter(J=>{const x=v.filter(S=>S.mailType==J.type);if(x.length==0)return J;x.forEach(S=>S.fn(J.payload))})}function Z(U,J){v.push({mailType:U,fn:J}),G()}function be(U,J){v=v.filter(x=>!(x.mailType===U&&x.fn===J))}function ce(U){var x;let J=null;if(U instanceof CustomEvent)J=((x=U.detail)==null?void 0:x.payload)??null;else{const S={};for(const E in U){const P=U[E];typeof P!="function"&&(P instanceof Object||(S[E]=P))}J=S}return J}async function ge(U,J,x){var re,ie;const S=x?ce(U):null;let E,P;U instanceof CustomEvent&&(E=(re=U.detail)==null?void 0:re.callback,P=(ie=U.detail)==null?void 0:ie.handler),R("event",async()=>({type:U.type,instancePath:J,handler:P,payload:await S}),E,!0)}async function de(U){return new Promise((J,x)=>{R("hashRequest",{message:U},E=>{var P;if(!E.ok)return x("Couldn't connect to the server.");J((P=E.payload)==null?void 0:P.message)})})}function He(U,J){const x=structuredClone(vt(s.value)),S=Yf(J,x);K4(S)&&(S.content=U,S.complete=!0,s.value=x)}async function Ce(U){return new Promise((J,x)=>{R("createSourceFile",{path:U},E=>{var P;if(!E.ok)return x("Couldn't connect to the server.");if((P=E.payload)!=null&&P.error)return x("Couldn't create the file.");s.value=ud(U,vt(s.value)),J()})})}async function fe(U,J){return new Promise((x,S)=>{R("uploadSourceFile",{path:U,content:J},P=>{var W,re;if(!P.ok)return S("Couldn't connect to the server.");if((W=P.payload)!=null&&W.error)return S("Couldn't upload the file.");s.value=((re=P.payload)==null?void 0:re.sourceFiles)??ud(U,vt(s.value)),x()})})}async function he(U,J){return new Promise((x,S)=>{R("renameSourceFile",{from:U,to:J},P=>{var W;if(!P.ok)return S("Couldn't connect to the server.");if((W=P.payload)!=null&&W.error)return S("Couldn't rename the file.");s.value=G4(U,J,vt(s.value)),x()})})}async function Ne(U){return new Promise((J,x)=>{R("deleteSourceFile",{path:U},E=>{var P;if(!E.ok)return x("Couldn't connect to the server.");if((P=E.payload)!=null&&P.error)return x("Couldn't delete the file.");s.value=gb(U,vt(s.value)),J()})})}async function me(U,J=["main.py"]){return new Promise((x,S)=>{R("codeSaveRequest",{code:U,path:J},P=>{if(!P.ok)return S("Couldn't connect to the server.");He(U,J),x()}),J.join("/")==="main.py"&&(d.value="suspended")})}function z(U){return new Promise((J,x)=>{R("loadSourceFile",{path:U},E=>{if(!E.ok)return x("Couldn't connect to the server.");He(E.payload.content,U),J()})})}async function ue(U){return new Promise((J,x)=>{R("listResources",{resource_type:U},E=>{var P;if(!E.ok)return x("Couldn't connect to the server.");J(((P=E.payload)==null?void 0:P.data)??[])})})}async function X(U){R("stateEnquiry",{},U,!0)}function T(U){const S=(E=0)=>{const P=m.value.get(U);P!==void 0&&(E==0&&P.type=="stateEnquiry"||X(()=>setTimeout(()=>S(E+1),150)))};setTimeout(()=>S(0),150)}async function R(U,J,x,S=!1){if(d.value=="offline"||d.value=="suspended"){x==null||x({ok:!1});return}const E=wn(),P=h++;try{(x||S)&&m.value.set(P,{type:U,callback:x}),S&&T(P);let W;typeof J=="function"?W=await J():W=J;const re={type:U,trackingId:P,payload:W};if(c.readyState!==c.OPEN)throw"Connection lost.";c.send(JSON.stringify(re,_y))}catch(W){E.error("sendFrontendMessage error",W),x==null||x({ok:!1})}}function se(U){delete i.value[U]}function Re(U){i.value[U.id]=U}async function De(){const U={};Object.entries(i.value).forEach(([x,S])=>{S.isCodeManaged||(U[x]=S)});const J={components:U};return new Promise((x,S)=>{R("componentUpdate",J,P=>{if(!P.ok)return S("Couldn't connect to the server.");x()})})}function it(U){return i.value[U]}function et(U,J){let x=i.value[J];do{if(x.parentId==U)return!0;x=i.value[x.parentId]}while(x);return!1}function dt(U,{includeBMC:J=!0,includeCMC:x=!0,sortedByPosition:S=!1}={}){let E=Object.values(i.value);return typeof U<"u"&&(E=E.filter(P=>P.parentId==U)),E=E.filter(P=>{const W=P.isCodeManaged;return J&&!W||x&&W}),S&&(E=E.sort((P,W)=>P.isCodeManaged&&!W.isCodeManaged?1:!P.isCodeManaged&&W.isCodeManaged?-1:P.position>W.position?1:-1)),E}function*zt(U,J={}){for(const x of dt(U,J))yield x,yield*zt(x.id,J)}function N(U){const x=dt("root").filter(S=>S.content.key==U);x.length!=0&&j(x[0].id)}function j(U){w.value=U}function ae(U){return Wf(i.value,U)}return{webSocket:c,syncHealth:d,frontendMessageMap:In(m),mode:In(n),userFunctions:In(l),addMailSubscription:Z,removeMailSubscription:be,init:A,forwardEvent:ge,hashMessage:de,runCode:In(a),sourceFiles:In(s),sendCodeSaveRequest:me,sendCreateSourceFileRequest:Ce,sendRenameSourceFileRequest:he,sendDeleteSourceFileRequest:Ne,sendFileUploadRequest:fe,requestSourceFileLoading:z,sendListResourcesRequest:ue,sendComponentUpdate:De,addComponent:Re,deleteComponent:se,getComponentById:it,getComponents:dt,getComponentsNested:zt,setActivePageId:j,activePageId:In(w),setActivePageFromKey:N,getComponentDefinition:ui,getSupportedComponentTypes:Jf,getContainableTypes:ae,sessionTimestamp:In(t),userState:In(u),isChildOf:et,featureFlags:In(o),writerApplication:In(r)}}function Q4(e){e.directive("capture-tabs",{mounted:t=>{t.addEventListener("keydown",n=>{n.key=="Tab"&&(n.preventDefault(),t.setRangeText(" ",t.selectionStart,t.selectionStart,"end"))})}})}const Bs=X4();globalThis.vue=fS;globalThis.injectionKeys=ne;globalThis.core=Bs;const zl=wn();async function Z4(){await Bs.init();const e=Bs.mode.value,t=e=="edit"?US():void 0;t&&(Bs.addMailSubscription("logEntry",t.handleLogEntry),globalThis.wfbm=t),zl.log(`Mounting app in mode ${e}...`);const{default:n}=e==="run"&&await en(()=>import("./ComponentRenderer-CZs4z773.js"),__vite__mapDeps([10,11,12]),import.meta.url),{default:r}=e==="edit"&&await en(()=>import("./BuilderApp-0XXiQ2l7.js").then(a=>a.c),__vite__mapDeps([13,14,15]),import.meta.url),o=Ol(n||r);o.use(RS),o.provide(ne.core,Bs),o.provide(ne.builderManager,t),Q4(o),o.mount("#app")}zl.log("Initialising core...");Z4().then(async()=>{zl.log("Core initialised.")}).catch(e=>{zl.error("Core initialisation failed.",e),document.write(e)});export{W4 as $,Pt as A,Vf as B,ut as C,iF as D,ls as E,ze as F,Vt as G,_t as H,ar as I,O3 as J,cF as K,P3 as L,en as M,O as N,rb as O,En as P,In as Q,UB as R,Nr as S,wn as T,$B as U,CB as V,Rn as W,ve as X,V_ as Y,vt as Z,Ie as _,ne as a,Yf as a0,uF as a1,K4 as a2,gs as a3,ud as a4,q4 as a5,gb as a6,lv as a7,qv as a8,id as a9,Wr as aA,XA as aB,Yr as aC,es as aD,ab as aE,tF as aF,Bd as aG,nF as aH,rF as aI,wd as aJ,_o as aK,cc as aL,ob as aM,cs as aN,Y as aO,aF as aP,sF as aQ,W2 as aR,Z2 as aS,vi as aT,DS as aU,Jf as aV,ui as aW,ld as aX,jf as aY,lF as aZ,cr as aa,vo as ab,CR as ac,pa as ad,$t as ae,mC as af,L_ as ag,sn as ah,qf as ai,ig as aj,LS as ak,hb as al,Z$ as am,X3 as an,VS as ao,Oy as ap,oF as aq,qa as ar,eE as as,YI as at,KI as au,WI as av,po as aw,wy as ax,kB as ay,yy as az,Oe as b,H as c,we as d,L as e,F as f,b4 as g,E4 as h,te as i,Ho as j,wc as k,ot as l,Zl as m,ln as n,k as o,dg as p,Dn as q,Ae as r,Le as s,Ee as t,mb as u,xr as v,Ue as w,Je as x,tn as y,We as z};
|