gis-bi/core/core-frontend/src/fcDesignerPro/index.umd.js

1549 lines
1.7 MiB
Java
Raw Normal View History

2025-05-20 11:03:25 +08:00
/*!
* FormCreate商业版可视化表单设计器-让表单设计更简单
* fc-designer-pro v5.7.0
* (c) 2018-2025 FormCreate Team https://form-create.com/
* license 仅限于被授权主体个人企业或组织使用
*/
(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode('._fc-step-form .van-step{line-height:1.4;text-align:left}._fc-popup.van-popup{display:flex;height:100%;padding-bottom:110px;padding-top:50px}._fc-popup-title{color:#333;font-size:16px;left:0;position:absolute;text-align:center;top:16px;width:100%}._fc-popup-content{display:flex;flex:1;overflow:auto}._fc-popup-footer{bottom:0;left:0;padding:10px;position:absolute;right:0}._fc-data-table{width:100%}._fc-data-table .el-table{--el-table-header-bg-color:#e8eefc}._fc-data-table .el-pagination{display:flex;margin-top:10px}._fc-data-table .el-pagination.left{justify-content:flex-start}._fc-data-table .el-pagination.center{justify-content:center}._fc-data-table .el-pagination.right{justify-content:flex-end}._fc-data-table ._fc-data-table-img-list .el-image{height:60px;max-width:150px}._fc-table{overflow:auto}._fc-table>table{border-bottom:1px solid #ebeef5;border-right:1px solid #ebeef5;border-color:#ebeef5 currentcolor currentcolor #ebeef5;border-style:solid none none solid;border-width:1px 0 0 1px;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-table td,._fc-table tr{min-height:50px}._fc-table td{border-bottom:0;border-right:0;border-color:currentcolor #ebeef5 #ebeef5 currentcolor;border-style:none solid solid none;border-width:0 1px 1px 0;box-sizing:border-box;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:5px;position:relative}._fc-table.is-mini td{min-height:12px;padding:0}._fc-table.is-mini .el-form-item{margin:0;padding:0}._fc-table-form{color:var(--fc-text-color-2);overflow:auto}._fc-table-form .form-create td .el-form-item{margin-bottom:1px}._fc-table-form .form-create td .el-form-item.is-error{margin-bottom:22px}._fc-table-form .el-form-item__label,._fc-table-form .van-field__label{display:none!important}._fc-table-form .el-form-item__content{display:flex;margin-left:0!important;width:100%!important}._fc-tf-head-idx,._fc-tf-idx{font-weight:500;min-width:40px;text-align:center;width:40px}._fc-tf-btn,._fc-tf-edit{min-width:70px;text-align:center;width:70px}._fc-tf-btn .fc-icon{cursor:pointer}._fc-table-form._fc-disabled ._fc-tf-btn .fc-icon,._fc-table-form._fc-disabled>.el-button{cursor:not-allowed}._fc-tf-table{border:1px solid #ebeef5;border-bottom:0;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-table-form ._fc-tf-table>thead>tr>th{border:0;border-bottom:1px solid #ebeef5;font-weight:500;height:40px}._fc-table-form ._fc-tf-table>thead>tr>th+th{border-left:1px solid #ebeef5}._fc-table-form tr{min-height:50px}._fc-table-form ._fc-read-view{text-align:center;width:100%}._fc-table-form td{border:0;border-bottom:1px solid #ebeef5;box-sizing:border-box;min-height:50px;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:5px;position:relative}._fc-table-form td+td{border-left:1px solid #ebeef5}._fc-tf-table .el-cascader,._fc-tf-table .el-date-editor,._fc-tf-table .el-input-number,._fc-tf-table .el-select,._fc-tf-table .el-slider{width:100%}._fc-tf-head-required:before{color:#f56c6c;content:"*";margin-right:4px}._fc-table-form-v2{color:var(--fc-text-color-2);overflow:auto;width:100%}._fc-table-form-v2 .is-required:before{color:#f56c6c;content:"*";margin-right:4px}._fc-table-form-v2 .form-create td .el-form-item{margin-bottom:1px}._fc-table-form-v2 .form-create td .el-form-item.is-error{margin-bottom:22px}._fc-table-form-v2 .el-form-item__content{display:flex;margin-left:0!important;width:100%!important}._fc-table-form-v2 .el-form-item__label{display:none!important}._fc-tf-pro-handle{align-items:center;display:flex;flex-direction:row;justify-content:space-between;margin-top:12px}._fc-table-form-v2 .el-cascader,._fc-table-form-v2 .el-date-editor,._fc-table-form-v2 .el-input-number,._fc-table-form-v2 .el-select,._fc-table-form-v2 .el-slider{width:100%}._fc-infinite-table-form{color:var(--fc-text-color-2);overflow:auto}._fc-infinite-table-form .form-create .el-form-item{margin-bottom:1px}._fc-infinite-table-form .form-create .el-form-i
2025-05-27 15:27:24 +08:00
(function(gt,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("element-plus"),require("@form-create/element-ui"),require("@form-create/vant"),require("vant")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","@form-create/element-ui","@form-create/vant","vant"],n):(gt=typeof globalThis<"u"?globalThis:gt||self,n(gt.FcDesigner={},gt.Vue,gt.ElementPlus,gt.formCreate,gt.formCreateMobile,gt.vant))})(this,function(gt,n,ai,Ab,xb,kb){"use strict";var L5=Object.defineProperty;var j5=(gt,n,ai)=>n in gt?L5(gt,n,{enumerable:!0,configurable:!0,writable:!0,value:ai}):gt[n]=ai;var Dt=(gt,n,ai)=>(j5(gt,typeof n!="symbol"?n+"":n,ai),ai);const mp=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},Ua=mp(Ab),At=mp(xb),dt={type(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"},Undef(e){return e==null},Element(e){return typeof e=="object"&&e!==null&&e.nodeType===1&&!dt.Object(e)},trueArray(e){return Array.isArray(e)&&e.length>0},Function(e){const t=this.getType(e);return t==="Function"||t==="AsyncFunction"},getType(e){const t=Object.prototype.toString.call(e);return/^\[object (.*)\]$/.exec(t)[1]},empty(e){return e==null||Array.isArray(e)&&Array.isArray(e)&&!e.length?!0:typeof e=="string"&&!e}};["Date","Object","String","Boolean","Array","Number"].forEach(e=>{dt[e]=function(t){return dt.type(t,e)}});function li(e,t){return{}.hasOwnProperty.call(e,t)}function Tr(e,t,r){e[t]=r}function td(e,t={},r){let o=!1;for(let i in t)if(Object.prototype.hasOwnProperty.call(t,i)){let l=t[i];if((o=Array.isArray(l))||dt.Object(l)){let d=e[i]===void 0;if(o)o=!1,d&&Tr(e,i,[]);else if(l._clone&&r!==void 0)if(r)l=l.getRule(),d&&Tr(e,i,{});else{Tr(e,i,l._clone());continue}else d&&Tr(e,i,{});e[i]=td(e[i],l,r)}else Tr(e,i,l),dt.Undef(l)||(dt.Undef(l.__json)||(e[i].__json=l.__json),dt.Undef(l.__origin)||(e[i].__origin=l.__origin))}return r!==void 0&&Array.isArray(e)?e.filter(i=>!i||!i.__ctrl):e}function rt(e){return td({},{value:e}).value}function Nb(e,t,r){return`[form-create ${e}]: ${t}`+(r?`
2025-05-20 11:03:25 +08:00
2025-05-27 15:27:24 +08:00
rule: `+JSON.stringify(r.getRule?r.getRule():r):"")}function Tb(e,t){console.error(Nb("err",e,t))}const gp="[[FORM-CREATE-PREFIX-",vp="-FORM-CREATE-SUFFIX]]";function nd(e){return new Function("return "+e)()}function Dr(e,t){if(e&&dt.String(e)&&e.length>4){let r=e.trim(),o=!1;try{if(r.indexOf(vp)>0&&r.indexOf(gp)===0)r=r.replace(vp,"").replace(gp,""),o=!0;else if(r.indexOf("$FN:")===0)r=r.substring(4),o=!0;else if(r.indexOf("$EXEC:")===0)r=r.substring(6),o=!0;else if(r.indexOf("$GLOBAL:")===0){const l=r.substring(8);return r=function(...d){const c=d[0].api.getGlobalEvent(l);if(c)return c.call(this,...d)},r.__json=e,r.__inject=!0,r}else{if(r.indexOf("$FNX:")===0)return r=nd("function($inject){"+r.substring(5)+"}"),r.__json=e,r.__inject=!0,r;(!t&&r.indexOf("function ")===0&&r!=="function "||!t&&r.indexOf("function(")===0&&r!=="function(")&&(o=!0)}if(!o)return e;let i;try{i=nd(r)}catch{i=nd("function "+r)}return i.__json=e,i}catch(i){Tb(`\u89E3\u6790\u5931\u8D25:${r}
2025-05-20 11:03:25 +08:00
2025-05-28 11:05:44 +08:00
err: ${i}`);return}}return e}function id(e){const t=e.replace(/(-[a-z])/g,function(r){return r.replace("-","").toLocaleUpperCase()});return Ha(t)}function Ha(e){return e.replace(e[0],e[0].toLowerCase())}const yp={name:"zh-cn",form:{field:"\u5B57\u6BB5 ID",title:"\u5B57\u6BB5\u540D\u79F0",iskey:"\u662F\u5426\u4E3B\u952E",fieldtype:"\u5B57\u6BB5\u7C7B\u578B",info:"\u63D0\u793A\u4FE1\u606F",ignore:"\u5FFD\u7565\u5B57\u6BB5",native:"\u662F\u5426\u663E\u793A\u6807\u9898",control:"\u7EC4\u4EF6\u8054\u52A8",labelShow:"\u662F\u5426\u663E\u793A",labelPosition:"\u6807\u7B7E\u7684\u4F4D\u7F6E",tableName:"\u81EA\u5B9A\u4E49\u540D\u79F0",labelStyle:"\u6807\u7B7E\u7684\u6837\u5F0F",labelSuffix:"\u6807\u7B7E\u7684\u540E\u7F00",formItem:"\u914D\u7F6E\u8868\u5355\u9879",formItemSpan:"\u7EC4\u4EF6\u5BBD\u5EA6",row:"\u6574\u884C",globalEvent:"\u5168\u5C40\u4E8B\u4EF6",globalFetch:"\u5168\u5C40\u6570\u636E\u6E90",globalClass:"\u5168\u5C40\u6837\u5F0F",globalConfig:"\u5168\u5C40\u914D\u7F6E",size:"\u8868\u5355\u7684\u5C3A\u5BF8",event:"\u8868\u5355\u4E8B\u4EF6",labelWidth:"\u6807\u7B7E\u7684\u5BBD\u5EA6",hideRequiredAsterisk:"\u9690\u85CF\u5FC5\u586B\u5B57\u6BB5\u7684\u6807\u7B7E\u65C1\u8FB9\u7684\u7EA2\u8272\u661F\u53F7",formItemMarginBottom:"\u8868\u5355\u9879\u7684\u4E0B\u8FB9\u8DDD",showMessage:"\u663E\u793A\u6821\u9A8C\u9519\u8BEF\u4FE1\u606F",inlineMessage:"\u4EE5\u884C\u5185\u5F62\u5F0F\u5C55\u793A\u6821\u9A8C\u4FE1\u606F",submitBtn:"\u662F\u5426\u663E\u793A\u8868\u5355\u63D0\u4EA4\u6309\u94AE",resetBtn:"\u662F\u5426\u663E\u793A\u8868\u5355\u91CD\u7F6E\u6309\u94AE",appendChild:"\u6DFB\u52A0\u5B50\u7EA7",formMode:"\u8868\u5355\u6A21\u5F0F",formName:"\u8868\u5355\u540D\u79F0",ignoreHiddenFields:"\u63D0\u4EA4\u8868\u5355\u65F6\u5FFD\u7565\u88AB\u9690\u85CF\u7684\u5B57\u6BB5",previewMode:"\u9605\u8BFB\u6A21\u5F0F",componentMode:"\u751F\u6210\u7EC4\u4EF6",sfcMode:"\u751F\u6210SFC",document:"\u5E2E\u52A9\u6587\u6863",controlDocument:"\u9700\u8981\u66F4\u8BE6\u7EC6\u7684\u914D\u7F6E\u65B9\u6CD5\uFF1F\u8BF7\u67E5\u770B{doc}",onSubmit:"\u8868\u5355\u63D0\u4EA4\u65F6\u89E6\u53D1",onReset:"\u8868\u5355\u91CD\u7F6E\u540E\u89E6\u53D1",onCreated:"\u8868\u5355\u7EC4\u4EF6\u521D\u59CB\u5316\u5B8C\u6BD5\u540E\u89E6\u53D1",onMounted:"\u8868\u5355\u7EC4\u4EF6\u6E32\u67D3\u5B8C\u6BD5\u540E\u89E6\u53D1",onReload:"\u8868\u5355\u6E32\u67D3\u89C4\u5219\u91CD\u8F7D\u540E\u89E6\u53D1",onChange:"\u8868\u5355\u7EC4\u4EF6\u7684\u503C\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1",beforeSubmit:"\u8868\u5355\u9A8C\u8BC1\u901A\u8FC7\u65F6\u89E6\u53D1",beforeFetch:"\u8FDC\u7A0B\u6570\u636E\u8BF7\u6C42\u53D1\u9001\u524D\u89E6\u53D1"},ai:{name:"\u667A\u80FD\u8868\u5355\u52A9\u7406",info:"\u60A8\u597D\uFF0C\u6211\u662F\u60A8\u7684\u667A\u80FD\u8868\u5355\u52A9\u624B\uFF01\u6211\u53EF\u4EE5\u5E2E\u52A9\u60A8\u5FEB\u901F\u751F\u6210\u548C\u4FEE\u6539\u8868\u5355\uFF0C\u5E2E\u52A9\u60A8\u8F7B\u677E\u9AD8\u6548\u5730\u5B8C\u6210\u8868\u5355\u8BBE\u8BA1\u3002",try:"\u4F60\u53EF\u4EE5\u8BD5\u7740\u95EE\u6211",change:"\u6362\u4E00\u6362",loading:"\u6B63\u5728\u6839\u636E\u60A8\u7684\u9700\u6C42\u5236\u4F5C\u8868\u5355\uFF0C\u8BF7\u7A0D\u5019...",fail:"\u5236\u4F5C\u8868\u5355\u65F6\u9047\u5230\u95EE\u9898\uFF0C\u8BF7\u5C1D\u8BD5\u8C03\u6574\u5185\u5BB9\u3002",success:"\u5DF2\u5904\u7406\u5B8C\u6BD5\uFF01",placeholder:"\u8BF7\u63CF\u8FF0\u60A8\u7684\u9700\u6C42"},warning:{name:"\u7EC4\u4EF6\u7684\u552F\u4E00\u6807\u8BC6\uFF0C\u7528\u4E8E\u83B7\u53D6\u548C\u4FEE\u6539\u8BE5\u7EC4\u4EF6\u7684\u914D\u7F6E\u89C4\u5219\u3002\u901A\u8FC7\u8BE5\u6807\u8BC6\u53EF\u4EE5\u7CBE\u786E\u5B9A\u4F4D\u7EC4\u4EF6\uFF0C\u5B9E\u73B0\u5BF9\u7EC4\u4EF6\u5C5E\u6027\u548C\u884C\u4E3A\u7684\u63A7\u5236\u3002",field:"\u7EC4\u4EF6\u5BF9\u5E94\u7684\u5B57\u6BB5\u540D\u7528\u4E8E\u4E0E\u7EC4\u4EF6\u7684\u6570\u636E\u8FDB\u884C\u7ED1\u5B9A\u3002\u5B57\u6BB5\u540D\u9700\u4EE5\u5B57\u6BCD\u5F00\u5934\uFF0C\u4EE5\u786E\u4FDD\u80FD\u591F\u6B63\u786E\u8BC6\u522B\u3002",formList:"\u7528\u4E8E\u7BA1\u7406\u548C\u5207\u6362\u8868\u5355\u6A21\u677F\uFF0C\u65B9\u4FBF\u5728\u4E0D\u540C\u4E1A\u52A1\u573A\u666F\u4E2D\u5FE
2025-05-20 11:03:25 +08:00
<form-create
v-model="formData"
v-model:api="fapi"
:rule="rule"
:option="option"
@submit="onSubmit"
></form-create>
</template>
<script>
import formCreate from "@form-create/element-ui";
export default {
components: {
formCreate: formCreate.$form()
},
data () {
const option = formCreate.parseJson('${t.replaceAll("\\","\\\\").replaceAll("'","\\'")}');
//\u5F00\u542F\u9605\u8BFB\u6A21\u5F0F
//option.preview = true;
return {
formData: {},
fapi: null,
rule: formCreate.parseJson('${e.replaceAll("\\","\\\\").replaceAll("'","\\'")}'),
option: option
}
},
methods: {
onSubmit (formData) {
//todo \u63D0\u4EA4\u8868\u5355
}
}
}
2025-05-27 15:27:24 +08:00
<\/script>`}function Bb(e,t){return`<template>
2025-05-20 11:03:25 +08:00
<form-create
v-model="formData"
v-model:api="fapi"
:rule="rule"
:option="option"
@submit="onSubmit"
></form-create>
</template>
<script setup>
import {ref} from "vue";
import formCreate from "@form-create/element-ui";
const option = ref(formCreate.parseJson('${t.replaceAll("\\","\\\\").replaceAll("'","\\'")}'));
const rule = ref(formCreate.parseJson('${e.replaceAll("\\","\\\\").replaceAll("'","\\'")}'));
const fapi = ref(null);
const formData = ref({});
const onSubmit = (formData) => {
//todo \u63D0\u4EA4\u8868\u5355
}
2025-05-27 15:27:24 +08:00
<\/script>`}function Rb(e,t){return`<template>
2025-05-20 11:03:25 +08:00
<form-create-mobile
driver="elm"
v-model="formData"
v-model:api="fapi"
:rule="rule"
:option="option"
@submit="onSubmit"
></form-create-mobile>
</template>
<script>
import formCreate from "@form-create/vant";
export default {
components: {
formCreateMobile: formCreate.$form()
},
data () {
const option = formCreate.parseJson('${t.replaceAll("\\","\\\\").replaceAll("'","\\'")}');
//\u5F00\u542F\u9605\u8BFB\u6A21\u5F0F
//option.preview = true;
return {
formData: {},
fapi: null,
rule: formCreate.parseJson('${e.replaceAll("\\","\\\\").replaceAll("'","\\'")}'),
option: option
}
},
methods: {
onSubmit (formData) {
//todo \u63D0\u4EA4\u8868\u5355
}
}
}
2025-05-27 15:27:24 +08:00
<\/script>`}function $b(e,t){return`<template>
2025-05-20 11:03:25 +08:00
<form-create-mobile
driver="elm"
v-model="formData"
v-model:api="fapi"
:rule="rule"
:option="option"
@submit="onSubmit"
></form-create-mobile>
</template>
<script setup>
import {ref} from "vue";
import formCreateMobile from "@form-create/vant";
const option = ref(formCreateMobile.parseJson('${t.replaceAll("\\","\\\\").replaceAll("'","\\'")}'));
const rule = ref(formCreateMobile.parseJson('${e.replaceAll("\\","\\\\").replaceAll("'","\\'")}'));
const fapi = ref(null);
const formData = ref({});
const onSubmit = (formData) => {
//todo \u63D0\u4EA4\u8868\u5355
}
2025-05-27 15:27:24 +08:00
<\/script>`}function od(){return{type:"Required",field:"formCreate$required",title:"\u662F\u5426\u5FC5\u586B"}}function z5(e){}function Qn(e,t,r,o=[]){t.id||(t.id=1),r&&r--;for(let i=0;i<3;i++){const l={[t.label]:e+r*10+(i+1),[t.value]:""+t.id++};r&&Qn(e+(i+1)+"-",t,r,l.children=[]),o.push(l)}return o}function ad(e){return[{type:"ConfigItem",col:{show:!0},name:"labelConfig",style:"margin-bottom: 10px",props:{label:e("form.formItem")},children:[{type:"HideConfig",field:"formCreateNative",_fc_important_prop:!1,col:{show:!1},wrap:{show:!1},value:!1,props:{activeValue:!1,inactiveValue:!0}},{type:"input",field:"formCreateTitle",title:e("form.title"),_fc_license:"KrrSN2KlZ2tanmqEGlAE",_fc_important_prop:!1,col:{show:!1},slot:"append"},{type:"select",field:"formCreateWrap>class",title:e("form.labelPosition"),_fc_important_prop:!1,col:{show:!1},slot:"append",options:it(e,[{value:"fc-wrap-top",label:"top"},{value:"fc-wrap-left",label:"left"},{value:"fc-wrap-right",label:"right"}])},{type:"SizeInput",field:"formCreateWrap>labelWidth",_fc_important_prop:!1,col:{show:!1},value:"",slot:"append",title:e("form.labelWidth")},{type:"SizeInput",field:"formCreateWrap>style>marginBottom",_fc_important_prop:!1,col:{show:!1},value:"",slot:"append",title:e("form.formItemMarginBottom")}]}]}function Pi(e,t,r,o){const i=[{label:e("fetch.optionsType.struct"),value:2},{label:e("fetch.optionsType.fetch"),value:3},{label:e("fetch.optionsType.global"),value:1}],l=[{value:1,rule:[{type:"GlobalFetchSelect",field:"formCreateEffect>fetch",props:{to:t}}]},{value:3,rule:[{type:"FetchConfig",field:"formCreateEffect>fetch",props:{to:t}}]},{value:2,rule:[{type:"TableOptions",field:"formCreate"+Br(t).replace(".",">"),title:e("props.options"),_fc_important_prop:!0,wrap:{show:!1},props:{column:[{label:"label",key:r||"label"},{value:!0,label:"value",key:o||"value"}],keyValue:r||"label"}}]}];return{type:"radio",title:e("props.options"),field:"_optionType",value:2,options:i,props:{type:"button"},control:l}}function Ln(e,t,r){const o=[{label:e("fetch.optionsType.struct"),value:2},{label:e("fetch.optionsType.fetch"),value:3},{label:e("fetch.optionsType.global"),value:1}],i=[{value:1,rule:[{type:"GlobalFetchSelect",field:"formCreateEffect>fetch",props:{to:t}}]},{value:3,rule:[{type:"FetchConfig",field:"formCreateEffect>fetch",props:{to:t}}]},{value:2,rule:[{type:"Struct",field:"formCreate"+Br(t).replace(".",">"),title:r||e("props.options"),_fc_important_prop:!0,wrap:{show:!1}}]}];return{type:"radio",title:r||e("props.options"),field:"_optionType",value:2,options:o,props:{type:"button"},control:i}}function Or(e,t,r,o){const i=[{label:e("fetch.optionsType.struct"),value:2},{label:e("fetch.optionsType.fetch"),value:3},{label:e("fetch.optionsType.global"),value:1}],l=[{value:1,rule:[{type:"GlobalFetchSelect",field:"formCreateEffect>fetch",props:{to:t}}]},{value:3,rule:[{type:"FetchConfig",field:"formCreateEffect>fetch",props:{to:t}}]},{value:2,rule:[{type:"TreeOptions",field:"formCreate"+Br(t).replace(".",">"),title:e("props.options"),_fc_important_prop:!0,wrap:{show:!1},props:{columns:{label:r,value:o},keyValue:r}}]}];return{type:"radio",title:e("props.options"),field:"_optionType",value:2,options:i,props:{type:"button"},control:l}}function Br(e){return e.replace(e[0],e[0].toLocaleUpperCase())}const En=function(e){const t=/object ([a-zA-Z]*)/.exec(Object.prototype.toString.call(e));return t&&bp[t[1].toLowerCase()]?bp[t[1].toLowerCase()](e):e},bp={object:function(e){var t=[];for(var r in e)!li(e,r)||t.push(En(r)+": "+(e[r]!=null?En(e[r]):"null"));return`{
2025-05-20 11:03:25 +08:00
`+t.join(`,
`)+`
2025-05-24 17:29:32 +08:00
}`},function:function(e){e=""+e;var t=/^ *([\w]+) *\(/.exec(e);return t&&t[1]!=="function"?"function "+e:e},array:function(e){for(var t=0,r=[];t<e.length;t++)r[t]=e[t]!=null?En(e[t]):"null";return"["+r.join(", ")+"]"},string:function(e){for(var t=e.split(""),r=0;r<t.length;r++){var o=t[r];o>=" "?o==="\\"?t[r]="\\\\":o==='"'&&(t[r]='\\"'):t[r]=o===`
2025-05-28 11:05:44 +08:00
`?"\\n":o==="\r"?"\\r":o===" "?"\\t":o==="\b"?"\\b":o==="\f"?"\\f":(o=o.charCodeAt(),"\\u00"+(o>15?1:0)+o%16)}return'"'+t.join("")+'"'}},wp=function(e){if(e&&typeof e=="object"){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];(Array.isArray(r)||dt.Object(r))&&wp(r),dt.String(r)&&(e[t]=Dr(r))}}return e};function Rr(e,t,r){t=(t||"").split(".");let o=0,i=t.length;for(;e!=null&&o<i;)e=e[t[o++]];return o&&o===i&&e!==void 0?e:r}const Ib=e=>(t,r)=>Fb(t,r,n.unref(e)),Fb=(e,t,r)=>Rr(r,e,"").replace(/\{(\w+)\}/g,(o,i)=>{var l;return`${(l=t==null?void 0:t[i])!=null?l:`{${i}}`}`}),Pb=e=>{const t=n.computed(()=>n.unref(e).name),r=n.computed(()=>Br(id(t.value||""))),o=n.isRef(e)?e:n.ref(e);return{lang:t,name:r,locale:o,t:Ib(e)}},ld=e=>Pb(n.computed(()=>(n.isRef(e)?e.value:e)||yp)),it=(e,t,r)=>t.map(o=>(o.label=e((r||"props")+"."+(o.label||o.value))||o.label,o)),Be=(e,t,r)=>r.map(o=>(o.field==="formCreate$required"?o.title=e("validate.required")||o.title:o.field&&o.field!=="_optionType"&&(o.title=e("com."+t+"."+o.field)||o.title),o.type==="template"&&dt.trueArray(o.children)&&(o.children=Be(e,t,o.children)),o)),sd=e=>{const t=[];return e&&e.forEach(r=>{if(!r._fc_drag_skip)if(r._fc_drag_tag){const o={id:r.__fc__.id,rule:r,children:sd(r.children)};o.children.length||delete o.children,t.push(o)}else t.push(...sd(r.children))}),t},Cp=e=>{const t=r=>{const o=[];return r&&r.forEach(i=>{i._fc_drag_skip||(i.field?(i.children=t(i.children||[]),i.children.length||delete i.children,o.push(i)):o.push(...t(i.children||[])))}),o};return t(e)},_p=e=>{const t=r=>{const o=[];return r&&r.forEach(i=>{if(typeof i=="object")if(i._fc_drag_tag){const l={_fc_id:i._fc_id,_fc_drag_tag:i._fc_drag_tag==="_"?void 0:i._fc_drag_tag,type:i.type,field:i.field,title:i.title,name:i.name,slot:i.slot,props:{...i.props||{}},children:t(i.children||[])};i.children&&typeof i.children[0]=="string"&&(l.content=i.children[0]),l.children.length||delete l.children,o.push(l)}else o.push(...t(i.children))}),o};return t(e)};function on(e){return{name:"$inject",columns:[{label:"$inject.api",info:e("event.inject.api"),type:"Api"},{label:"$inject.rule",info:e("event.inject.rule"),type:"Rule[]"},{label:"$inject.self",info:e("event.inject.self"),type:"Rule"},{label:"$inject.option",info:e("event.inject.option"),type:"Object"},{label:"$inject.args",info:e("event.inject.args"),type:"Array"}]}}function si(e){return["",null,void 0].indexOf(e)!==-1}function Ep(e){return e.replace(/[\ .*+?^${}()|[\]\\]/g,"\\$&")}function Mb(e,t){const r=e.split("."),o=t.split("."),i=Math.min(r.length,o.length);for(var l=0;l<i;l++){var d=parseInt(r[l],10)-parseInt(o[l],10);if(d>0)return 1;if(d<0)return-1}return r.length===o.length?0:r.length<o.length?-1:1}function di(e){const t=document.createElement("textarea");t.style.position="fixed",t.style.top=0,t.style.left="-9999px",t.value=e,document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}catch{console.log("Oops, unable to copy")}rd("\u5DF2\u590D\u5236!","success"),document.body.removeChild(t)}function Ga(e){return e.filter((t,r)=>e.indexOf(t)===r)}let Lb=0;function We(){const e=370+ ++Lb;return"F"+Math.random().toString(36).substr(3,3)+Number(`${Date.now()}`).toString(36)+e.toString(36)+"c"}function jb(e,t){return function(r,o,i){const l={...r||{}};Object.keys(l).forEach(d=>{si(l[d])&&delete l[d]}),i.getRule(e).props.info=Object.keys(l).length>0?t("struct.configured"):""}}function Sp({t:e}){const t=We();return[{type:"input",field:">formName",value:"",title:e("form.formName")},{type:"radio",field:"labelPosition",value:"left",title:e("form.labelPosition"),options:it(e,[{value:"left",label:"left"},{value:"right",label:"right"},{value:"top",label:"top"}])},{type:"input",field:">tableName",value:"",title:e("form.tableName")},{type:"radio",field:"size",value:"small",title:e("form.size"),options:it(e,[{value:"large",label:"large"},{value:"default",label:"default"},{value:"small",label:"small"}])},{type:"input",field:"labelSuffix",value:"",title:e("form.labelSuffix"),style:{width:"150px"}},{type:"SizeInput",field:"labe
2025-05-20 11:03:25 +08:00
const file = $inject.args[1];
2025-05-27 15:27:24 +08:00
file.url = res.data.url;`}}},props(e,{t}){return Be(t,Ed+".props",[{type:"switch",field:"disabled"},{type:"select",field:"listType",options:it(t,[{label:"text",value:"text"},{label:"picture",value:"picture"},{label:"picture-card",value:"picture-card"}])},{type:"switch",field:"multiple"},{type:"input",field:"name"},{type:"PromptInput",field:"accept",props:{options:[{label:t("props.image"),value:"image/*"},{label:t("props.document"),value:".pdf,.doc,.docx,.xml,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{label:t("props.video"),value:"video/*"},{label:t("props.audio"),value:"audio/*"}]}},{type:"input",field:"action"},{type:"FnInput",field:"beforeUpload",props:{body:!0,button:!0,fnx:!0,args:[on(t)],name:"beforeUpload"}},{type:"FnInput",field:"beforeRemove",props:{body:!0,button:!0,fnx:!0,args:[on(t)],name:"beforeRemove"}},{type:"FnInput",field:"onSuccess",warning:t("com.upload.info"),props:{body:!0,button:!0,fnx:!0,args:[on(t)],name:"onSuccess"}},{type:"TableOptions",field:"headers",props:{column:[{label:t("props.key"),key:"label"},{label:t("props.value"),key:"value"}],valueType:"object"}},{type:"TableOptions",field:"data",props:{column:[{label:t("props.key"),key:"label"},{label:t("props.value"),key:"value"}],valueType:"object"}},{type:"switch",field:"withCredentials"},{type:"switch",field:"autoUpload",value:!0},{type:"inputNumber",field:"limit",props:{min:0}}])}},x1="\u7A7F\u68AD\u6846",Sd="elTransfer",k1={menu:"main",icon:"icon-transfer",label:x1,name:Sd,input:!0,event:["change","leftCheckChange","rightCheckChange"],validate:["array"],condition:function(e){return{type:"select",options:e.props.data?e.props.data.map(t=>({label:t.label,value:t.key})):[]}},rule({t:e}){return{type:Sd,field:We(),title:e("com.elTransfer.name"),info:"",$required:!1,props:{data:Qn(e("props.option"),{label:"label",value:"key"},1)}}},props(e,{t}){return Be(t,Sd+".props",[Pi(t,"props.data","label","key"),{type:"switch",field:"filterable"},{type:"input",field:"filterPlaceholder"},{type:"select",field:"targetOrder",warning:t("com.elTransfer.props.targetOrderInfo"),options:[{label:"original",value:"original"},{label:"push",value:"push"},{label:"unshift",value:"unshift"}]},{type:"TableOptions",field:"titles",props:{column:[{label:t("props.value"),key:"value"}],valueType:"string",max:2}},{type:"TableOptions",field:"buttonTexts",props:{column:[{label:t("props.value"),key:"value"}],valueType:"string",max:2}}])}},N1="\u6811\u5F62\u63A7\u4EF6",Ad="tree",T1={menu:"main",icon:"icon-tree",label:N1,name:Ad,input:!0,event:["nodeClick","nodeContextmenu","checkChange","check","currentChange","nodeExpand","nodeCollapse","nodeDragStart","nodeDragEnter","nodeDragLeave","nodeDragOver","nodeDragEnd","nodeDrop"],validate:["string","number","array"],condition:function(e){return{type:"cascader",options:e.props.data||[],props:{props:{checkStrictly:!0,emitPath:!1,value:"id"}}}},sfc(e){e.type="elTree",e._sfc.modelField="defaultCheckedKeys"},rule({t:e}){return{type:Ad,field:We(),title:e("com.tree.name"),info:"",effect:{fetch:""},$required:!1,props:{props:{label:"label"},showCheckbox:!0,nodeKey:"id",data:Qn(e("props.option"),{label:"label",value:"id"},3)}}},props(e,{t}){return Be(t,Ad+".props",[Or(t,"props.data","label","id"),{type:"input",field:"emptyText"},{type:"TableOptions",field:"props",props:{column:[{label:t("props.key"),key:"label"},{label:t("props.value"),key:"value"}],valueType:"object"}},{type:"switch",field:"renderAfterExpand",value:!0},{type:"switch",field:"defaultExpandAll"},{type:"switch",field:"expandOnClickNode",value:!0},{type:"switch",field:"checkOnClickNode"},{type:"switch",field:"autoExpandParent",value:!0},{type:"switch",field:"checkStrictly"},{type:"switch",field:"accordion"},{type:"inputNumber",field:"indent"},{type:"input",field:"nodeKey"}])}},D1="\u63D0\u793A",xd="elAlert",V1={menu:"aide",icon:"icon-alert",label:D1,name:xd,event:["close"],rule({t:e}){return{type:xd,props:{title:e("com.elAlert.name"),description:e("com.elAlert.description"),type:"success",effect:"dark"},children:[]}},props(e,{t}){return B
2025-05-20 11:03:25 +08:00
overflow: auto;
}
._fc-table > table {
width: 100%;
height: 100%;
overflow: hidden;
table-layout: fixed;
border: 1px solid #EBEEF5;
border-bottom: 0 none;
border-right: 0 none;
}
._fc-table tr {
min-height: 50px;
}
._fc-table td {
padding: 5px;
min-height: 50px;
min-width: 80px;
position: relative;
box-sizing: border-box;
overflow-wrap: break-word;
overflow: hidden;
border: 0 none;
border-right: 1px solid #EBEEF5;
border-bottom: 1px solid #EBEEF5;
2025-05-27 15:27:24 +08:00
}`,handle(e){const t=(e.children||[]).reduce((m,y)=>(m[y.slot]||(m[y.slot]=[]),m[y.slot].push(y),delete y.slot,m),{}),{row:r,col:o,style:i,class:l,layout:d}=e.props.rule,c={},u=[];d.forEach(m=>{const y=m.row||1,C=m.col||1,A=`${m.top}:${m.left}`;c[A]={row:y,col:C};for(let w=0;w<y;w++)for(let E=0;E<C;E++){if(w===0&&w===E)continue;const b=`${m.top+w}:${m.left+E}`;t[b]&&(t[A]=(t[A]||[]).concat(t[b]),delete t[b]),u.push(b)}});const h=[];for(let m=0;m<r;m++){const y=[];for(let C=0;C<o;C++){const A=`${m}:${C}`;if(u.indexOf(A)>-1)continue;const w=t[A];y.push({type:"td",props:{rowspan:""+(c[A]?c[A].row:1),colspan:""+(c[A]?c[A].col:1)},style:i[A],class:l[A],children:w})}h.push({type:"tr",children:y})}return{type:"elCol",props:{span:24},style:e.style,class:e.class,children:[{type:"div",class:"_fc-table",children:[{type:"table",props:{border:"1",cellspacing:"0",cellpadding:"0"},children:h}]}]}}},rule(){return{type:Ld,props:{rule:{row:3,col:4,style:{},class:{},layout:[]}},children:[]}},props(e,{t}){return Be(t,Ld+".props",[{type:"switch",field:"border",value:!0},{type:"switch",field:"mini"},{type:"ColorInput",field:"borderColor"},{type:"input",field:"borderWidth"}])}},pw="\u8868\u683C\u8868\u5355",jd="tableForm",hw={menu:"subform",icon:"icon-table-form",label:pw,name:jd,input:!0,mask:!1,subForm:"array",languageKey:["add","operation","dataEmpty"],event:["change","add","delete"],children:"tableFormColumn",subRender({t:e,h:t,resolveComponent:r,subRule:o}){return[{label:e("props.title"),vnode:t(r("el-input"),{size:"small",modelValue:o.props.label,"onUpdate:modelValue":i=>{o.props.label=i}})}]},loadRule(e){e.props||(e.props={});const t=e.props.columns||[];e.children=t.map(r=>({type:"tableFormColumn",_fc_drag_tag:"tableFormColumn",props:{label:r.label,required:r.required||!1,width:r.style.width||"",color:r.style.color||""},children:r.rule||[]})),delete e.props.columns},parseRule(e){const t=e.children||[];e.props.columns=t.map(r=>({label:r.props.label,required:r.props.required,style:{width:r.props.width,color:r.props.color},rule:r.children||[]})),e.children=[]},sfc:!1,rule({t:e}){return{type:jd,field:We(),title:e("com.tableForm.name"),info:"",props:{},children:[]}},props(e,{t}){return Be(t,jd+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"addable",value:!0},{type:"switch",field:"deletable",value:!0},{type:"switch",field:"filterEmptyColumn",value:!0},{type:"inputNumber",field:"min",props:{min:0}},{type:"inputNumber",field:"max",props:{min:0}}])}},mw="\u8868\u683C\u8868\u5355Pro",gw="tableFormPro",Fp=e=>e.map(t=>{let r=t.children||[];const o=r.filter(i=>i._fc_drag_tag==="tableFormColumn2");return o.length>0&&(r=Fp(o)),{header:t.props.header,label:t.props.label,fixed:t.props.fixed,required:t.props.required,hidden:t.props.hidden,style:{width:t.props.width,color:t.props.color},[o.length?"children":"rule"]:r}}),Pp=e=>e.map(t=>({type:"tableFormColumn",_fc_drag_tag:"tableFormColumn2",props:{header:t.header,label:t.label,fixed:t.fixed,required:t.required||!1,hidden:t.hidden||!1,width:t.style.width||"",color:t.style.color||""},children:t.children?Pp(t.children):t.rule||[]})),vw={menu:"subform",icon:"icon-table-form",label:mw,name:gw,input:!0,mask:!1,subForm:"array",languageKey:["add","delete","operation","dataEmpty"],event:["change","add","delete","handleClick"],children:"tableFormColumn2",subRender({t:e,h:t,resolveComponent:r,subRule:o}){return[{label:e("props.title"),vnode:t(r("el-input"),{size:"small",modelValue:o.props.label,"onUpdate:modelValue":i=>{o.props.label=i}})}]},loadRule(e){e.props||(e.props={}),e.children=Pp(e.props.columns||[]),delete e.props.columns},parseRule(e){e.props.columns=Fp(e.children||[]),e.children=[]},sfc:!1,rule({t:e}){return{type:"tableFormPro",field:We(),title:e("com.tableFormPro.name"),info:"",props:{button:{open:!0,column:[{key:"delete",name:"\u5220\u9664",type:"danger",size:"small",prop:["link"]}]}},children:[]}},props(e,{t}){const r=function(o){return Be(t,"tableForm.props",o)};return Be(t,"tableForm.props",[{type:"ConfigItem",props:{label:t("com.dataTable.props.button")},col:{show:!0},children:[{
2025-05-20 11:03:25 +08:00
callback();}-FORM-CREATE-SUFFIX]]`,mode:"validator",message:""}],_fc_template:"duration",_fc_id:"id_Fhqtm50itwf6bgc",name:"ref_Fzsym50itwf6bhc",display:!0,hidden:!1},{type:"select",field:"F730m50itwf6bcc",title:"\u5F00\u59CB\u65F6\u95F4\u6BB5",effect:{fetch:""},$required:!1,options:[{label:"\u4E0A\u5348",value:"1"},{label:"\u4E0B\u5348",value:"1.5"}],_fc_drag_tag:"select",_fc_template:"duration",_fc_id:"id_Fnj8m50itwf6bkc",name:"ref_Fyjym50itwf6blc",display:!0,hidden:!1,wrap:{title:!1},style:{marginLeft:"10px",width:"150px"}}]},{type:"fcInlineForm",_fc_id:"id_Fxbnm50iw4ttccc",name:"ref_Fhwmm50iw4ttcdc",display:!0,hidden:!1,_fc_drag_tag:"fcInlineForm",children:[{type:"datePicker",field:"Fv92m50itwf6bdc",title:"\u7ED3\u675F\u65F6\u95F4",$required:!1,_fc_drag_tag:"datePicker",validate:[{type:"validator",trigger:"change",validator:`[[FORM-CREATE-PREFIX-function validator(rule, value, callback){let startTime = this.api.getValue('Fz0um50itwf6bbc');
if(startTime && value && Date.parse(startTime) > Date.parse(value)) {
callback(false);
return;
}
2025-05-27 15:27:24 +08:00
callback()}-FORM-CREATE-SUFFIX]]`,mode:"min",message:"\u5F00\u59CB\u65F6\u95F4\u4E0D\u80FD\u5927\u4E8E\u7ED3\u675F\u65F6\u95F4"}],_fc_template:"duration",_fc_id:"id_Fu8im50itwf6bqc",name:"ref_Fy17m50itwf6brc",display:!0,hidden:!1},{type:"select",field:"Fx9gm50itwf6bec",title:"\u7ED3\u675F\u65F6\u95F4\u6BB5",effect:{fetch:""},$required:!1,options:[{label:"\u4E0A\u5348",value:"1"},{label:"\u4E0B\u5348",value:"1.5"}],_fc_drag_tag:"select",_fc_template:"duration",_fc_id:"id_Fxrxm50itwf6buc",name:"ref_Fehcm50itwf6bvc",display:!0,hidden:!1,wrap:{title:!1},style:{marginLeft:"10px",width:"150px"}}]},{type:"fcInlineForm",_fc_id:"id_Ffb0m50j0g8vcec",name:"ref_Ftpym50j0g8vcfc",display:!0,hidden:!1,_fc_drag_tag:"fcInlineForm",children:[{type:"inputNumber",field:"F5q8m50itwf6bfc",title:"\u65F6\u957F",$required:!1,props:{controls:!1},_fc_drag_tag:"inputNumber",_fc_template:"duration",_fc_id:"id_Fo5cm50itwf7c0c",name:"ref_Fnnvm50itwf7c1c",display:!0,hidden:!1,computed:{value:"MAX(IF(Fz0um50itwf6bbc && Fv92m50itwf6bdc && TIMESTAMP(Fv92m50itwf6bdc) > TIMESTAMP(Fz0um50itwf6bbc), DIFFDAYS(Fz0um50itwf6bbc, Fv92m50itwf6bdc), 0) + IF(Fx9gm50itwf6bec && F730m50itwf6bcc, Fx9gm50itwf6bec - F730m50itwf6bcc + 0.5, 0), 0);"}},{type:"div",native:!0,children:["\u5929"],_fc_drag_tag:"text",_fc_template:"duration",_fc_id:"id_Fatsm50itwf7c4c",name:"ref_Fh2rm50itwf7c5c",display:!0,hidden:!1,style:{marginTop:"5px",marginLeft:"10px"}}],style:{alignItems:"flex-start"}}]},Pw={menu:"template",name:"col3",label:"\u4E09\u5217\u6805\u683C",autoField:!1,template:[{type:"fcRow",children:[{type:"col",props:{span:8},display:!0,hidden:!1,_fc_drag_tag:"col"},{type:"col",props:{span:8},display:!0,hidden:!1,_fc_drag_tag:"col"},{type:"col",props:{span:8},display:!0,hidden:!1,_fc_drag_tag:"col"}],display:!0,hidden:!1,_fc_drag_tag:"fcRow"}]},Mw={menu:"template",name:"col4",label:"\u56DB\u5217\u6805\u683C",autoField:!1,template:[{type:"fcRow",children:[{type:"col",props:{span:6},display:!0,hidden:!1,_fc_drag_tag:"col"},{type:"col",props:{span:6},display:!0,hidden:!1,_fc_drag_tag:"col"},{type:"col",props:{span:6},display:!0,hidden:!1,_fc_drag_tag:"col"},{type:"col",props:{span:6},display:!0,hidden:!1,_fc_drag_tag:"col"}],display:!0,hidden:!1,_fc_drag_tag:"fcRow"}]},Lw={menu:"template",name:"table43",label:"\u56DB\u884C\u4E09\u5217\u8868\u683C",autoField:!1,template:[{type:"fcTable",props:{rule:{row:4,col:3,style:{},class:{},layout:[]}},display:!0,hidden:!1,_fc_drag_tag:"fcTable"}]},jw="\u6570\u636E\u8868\u683C",Za="dataTable",zw=()=>{const e=[];for(let t=0;t<30;t++)e.push({date:"2016-05-12",name:"Tom "+(10+t),state:"California",city:"Los Angeles",address:"No. 189, Grove St, Los Angeles",zip:"CA 90036"});return e},Uw=e=>{if(e.format==="tag")return{type:"elTag",props:{disableTransitions:!0},_sfc:{content:`{{scope.row.${e.prop}}}`}};if(e.format==="image")return{type:"div",class:"_fc-data-table-img-list",children:[{type:"template",children:[{type:"el-image",props:{previewTeleported:!0,fit:"cover"},_sfc:{attr:{":initialIndex":"i",":src":"src",":previewSrcList":`Array.isArray(scope.row.${e.prop}) ? scope.row.${e.prop} : [scope.row.${e.prop}]`}}}],_sfc:{attr:{"v-for":`(src, i) in Array.isArray(scope.row.${e.prop}) ? scope.row.${e.prop} : [scope.row.${e.prop}]`}}}]}},Hw={menu:"main",icon:"icon-data-table",label:jw,name:Za,languageKey:["operation"],event:["cellMouseEnter","cellMouseLeave","handleClick","rowClick","rowDblclick","headerClick","filterChange","expandChange","sortChange","selectionChange"],sfc:{style:`._fc-data-table {
2025-05-20 11:03:25 +08:00
width: 100%;
}
._fc-data-table .el-table {
--el-table-header-bg-color: #e8eefc;
}
._fc-data-table .el-pagination {
display: flex;
margin-top: 10px;
}
._fc-data-table .el-pagination.left {
justify-content: flex-start;
}
._fc-data-table .el-pagination.left {
justify-content: center;
}
._fc-data-table .el-pagination.right {
justify-content: flex-end;
}
._fc-data-table ._fc-data-table-img-list .el-image {
max-width: 150px;
height: 60px;
}`,handle(e){const{column:t,button:r,page:o,index:i,selection:l,data:d}=e.props,c=[];["column","button","index","globalDataKey","fetch","page"].forEach(h=>{delete e.props[h]}),t.forEach(h=>{const m=Uw(h),y={type:"elTableColumn",props:{label:h.label,prop:h.prop,width:h.width,align:h.align,className:h.className,fixed:h.fixed,sortable:h.sortable},_sfc:{attr:{"#default":"scope"}}};m&&(y.children=[m]),c.push(y)}),r&&r.open===!0&&r.column&&c.push({type:"elTableColumn",props:{label:r.label||"\u64CD\u4F5C",fixed:r.fixed===void 0?"right":r.fixed,width:r.width||"100px"},_sfc:{attr:{"#default":"scope"}},children:r.column.map(h=>{const m=h.prop||[],y={type:"elButton",props:{type:h.type,size:h.size},_sfc:{content:h.name}};return m.forEach(C=>{y.props[C]=!0}),y})}),l&&c.unshift({type:"elTableColumn",props:{type:"selection",width:"50px"}}),i&&c.unshift({type:"elTableColumn",props:{type:"index",width:"50px"}});const u=[{type:"elTable",props:{data:[],...e.props},_fc_id:e._fc_id,children:c}];if(o&&o.open===!0){const h=o.props&&o.props.pageSize||20;o.props&&delete o.props.pageSize,u.push({type:"elPagination",class:o.position||"right",_fc_id:e._fc_id,props:{layout:"prev, pager, next",...o.props||{}},_sfc:{prop:{total:(d||[]).length,currentPage:1,pageSize:h}}})}return{type:"div",class:"_fc-data-table",children:u}}},rule(){return{type:Za,native:!0,props:{height:"500px",button:{},data:zw(),column:[{format:"default",prop:"date",label:"Date",width:"150"},{format:"default",prop:"name",label:"Name",width:"120"},{format:"default",prop:"state",label:"State",width:"120"},{format:"default",prop:"city",label:"City",width:"320"},{format:"default",prop:"address",label:"Address",width:"600"},{format:"default",prop:"zip",label:"Zip",width:"120"}]}}},props(e,{t}){const r=function(i){return Be(t,Za+".props",i)},o=r([{type:"input",field:"page>totalField",value:"count"},{type:"input",field:"page>dataField",value:"list"},{type:"input",field:"page>orderField",value:"order"},{type:"input",field:"page>orderByField",value:"orderBy"},{type:"input",field:"page>pageField",value:"page"},{type:"input",field:"page>pageSizeField",value:"limit"}]);return Be(t,Za+".props",[{type:"radio",field:"_optionType",value:0,options:[{label:t("fetch.optionsType.struct"),value:0},{label:t("fetch.optionsType.fetch"),value:2},{label:t("fetch.optionsType.global"),value:1}],props:{type:"button"},control:[{value:1,rule:[{type:"GlobalFetchSelect",field:"globalDataKey"},...o]},{value:2,rule:[{type:"FetchConfig",field:"fetch"},...o]},{value:0,rule:[{type:"Struct",title:t("com.dataTable.props._optionType"),field:"data",_fc_important_prop:!0,props:{validate(i){return!i||Array.isArray(i)}}}]}]},{type:"TableColumnConfig",field:"column",_fc_important_prop:!0},{type:"select",field:"size",options:it(t,[{label:"large",value:"large"},{label:"default",value:"default"},{label:"small",value:"small"}])},{type:"ConfigItem",props:{label:t("com.dataTable.props.button")},col:{show:!0},children:[{type:"HideConfig",title:t("com.dataTable.props.button"),wrap:{show:!1},col:{show:!1},field:"button>open"},{type:"template",slot:"append",children:r([{type:"TableButtonConfig",col:{show:!1},field:"button>column"},{type:"input",col:{show:!1},field:"button>label",value:"\u64CD\u4F5C"},{type:"select",col:{show:!1},field:"button>fixed",options:[{label:t("com.dataTable.fixed.default"),value:!1},{label:t("com.dataTable.fixed.left"),value:"left"},{label:t("com.dataTable.fixed.right"),value:"right"}],value:"right"},{type:"SizeInput",col:{show:!1},field:"button>width",value:"100px"}])}]},{type:"ConfigItem",props:{label:t("com.dataTable.props.page")},col:{show:!0},children:[{type:"HideConfig",wrap:{show:!1},col:{show:!1},title:t("com.dataTable.props.page"),field:"page>open"},{type:"template",slot:"append",children:r([{type:"select",field:"page>position",value:"right",col:{show:!1},options:it(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])},{type:"inputNumber",col:{show:!1},field:"page>props>pageSize",value:20},{type:"switch",col:{show:!1},field:"page>props>small"},{type:"switch",col
2025-05-20 11:03:25 +08:00
display: inline-flex;
vertical-align: middle;
}
._fc-line-form .el-select, ._fc-line-form .el-slider {
width: 220px;
2025-05-27 15:27:24 +08:00
}`,handle(e){return{type:"div",class:"_fc-line-form",children:e.children}}},rule(){return{type:zp,props:{}}},props(){return[]}},qw="\u56FE\u7247",Gd="elImage",eC={menu:"aide",icon:"icon-image",label:qw,name:Gd,inline:!0,rule(){return{type:Gd,title:"",style:{width:"100px",height:"100px"},props:{src:"https://static.form-create.com/example.png"}}},props(e,{t}){return Be(t,Gd+".props",[{type:"input",field:"src"},{type:"TableOptions",field:"previewSrcList",props:{column:[{label:t("com.elImage.props.src"),key:"value"}],valueType:"string"}}])}},tC={menu:"layout",icon:"icon-flex",name:"fcFlex2",label:"\u76D2\u5B50\u5E03\u5C40",drag:!0,inside:!0,inline:!0,mask:!1,sfc(e){e.type="div"},actions:[{label:"com.fcFlex2.horizontal",handler(e){e.style||(e.style={}),e.style.display!=="flex"?(e.style.display="flex",e.style.flexDirection="row",e.style.justifyContent="center"):["column-reverse","column"].indexOf(e.style.flexDirection)>-1?e.style.alignItems="center":e.style.justifyContent="center"}},{label:"com.fcFlex2.vertical",handler(e){e.style||(e.style={}),e.style.display!=="flex"?(e.style.display="flex",e.style.flexDirection="row",e.style.alignItems="center"):["column-reverse","column"].indexOf(e.style.flexDirection)>-1?e.style.justifyContent="center":e.style.alignItems="center"}},{label:"com.fcFlex2.left",handler(e){e.style||(e.style={}),e.style.display!=="flex"?(e.style.display="flex",e.style.flexDirection="row",e.style.justifyContent="flex-start"):["column-reverse","column"].indexOf(e.style.flexDirection)>-1?e.style.alignItems="flex-start":e.style.justifyContent="flex-start"}},{label:"com.fcFlex2.right",handler(e){e.style||(e.style={}),e.style.display!=="flex"?(e.style.display="flex",e.style.flexDirection="row",e.style.justifyContent="flex-end"):["column-reverse","column"].indexOf(e.style.flexDirection)>-1?e.style.alignItems="flex-end":e.style.justifyContent="flex-end"}},{label:"com.fcFlex2.reset",handler(e){e.style?(delete e.style.flexDirection,delete e.style.justifyContent,delete e.style.alignContent,delete e.style.flexWrap,delete e.style.alignItems,e.style.display="flex"):e.style={}}}],rule(){return{type:"fcCell",style:{display:"block",width:"100%",height:"100px"},children:[]}},props(e,{t}){return[{type:"SizeInput",field:"formCreateStyle>width",title:t("style.width")},{type:"SizeInput",field:"formCreateStyle>height",title:t("style.height")}]}},nC="\u8868\u5355\u9879",Kd="elFormItem",iC={menu:"container",icon:"icon-form-item",label:nC,name:Kd,drag:!0,mask:!1,event:!1,rule({t:e}){return{type:Kd,props:{label:e("com.elFormItem.name")},children:[]}},props(e,{t}){return Be(t,Kd+".props",[{type:"input",field:"label"},{type:"SizeInput",field:"labelWidth"},{type:"select",field:"formCreateClass",title:t("form.labelPosition"),options:it(t,[{value:"fc-wrap-top",label:"top"},{value:"fc-wrap-left",label:"left"},{value:"fc-wrap-right",label:"right"}])},{type:"select",field:"size",options:it(t,[{label:"large",value:"large"},{label:"default",value:"default"},{label:"small",value:"small"}])}])}},rC="\u97F3\u9891\u64AD\u653E\u5668",Yd="audioBox",oC={menu:"aide",icon:"icon-audio",label:rC,name:Yd,mask:!1,event:["pause","play","ended"],rule(){return{type:Yd,props:{src:"https://static.form-create.com/res/demo.mp3",type:"audio/mpeg"}}},props(e,{t}){return Be(t,Yd+".props",[{type:"input",field:"src"},{type:"select",field:"type",options:[{label:"MP3",value:"audio/mpeg"},{label:"OGG",value:"audio/ogg"},{label:"AAC",value:"audio/aac"},{label:"WAV",value:"audio/wav"},{label:"WMA",value:"audio/x-ms-wma"},{label:"WEBA",value:"audio/webm"},{label:"FLAC",value:"audio/flac"},{label:"ALAC",value:"audio/x-alac"},{label:"AMR",value:"audio/amr"},{label:"MIDI",value:"audio/midi"}]},{type:"switch",field:"autoplay"},{type:"switch",field:"loop"},{type:"switch",field:"muted"},{type:"switch",field:"controls"},{type:"select",field:"preload",options:it(t,[{label:"auto",value:"auto"},{label:"metadata",value:"metadata"},{label:"none",value:"none"}],"com.audioBox.preloadOpt")}])}},aC="\u89C6\u9891\u64AD\u653E\u5668",Qd="videoBox",lC={menu:"aide",icon:"icon-video",label:aC,name:
2025-05-20 11:03:25 +08:00
\u4F7F\u7528 # \u53F7\u521B\u5EFA\u6807\u9898
\`\`\`
# \u4E00\u7EA7\u6807\u9898
## \u4E8C\u7EA7\u6807\u9898
### \u4E09\u7EA7\u6807\u9898
\`\`\`
### \u7C97\u4F53
\u4F7F\u7528 ** \u5305\u56F4\u6587\u672C
\`\`\`
**\u7C97\u4F53\u6587\u672C**
\`\`\`
### \u659C\u4F53
\u4F7F\u7528 * \u5305\u56F4\u6587\u672C
\`\`\`
*\u659C\u4F53\u6587\u672C*
\`\`\`
### \u5220\u9664\u7EBF
\u4F7F\u7528 ~~ \u5305\u56F4\u6587\u672C
\`\`\`
~~\u5220\u9664\u7EBF\u6587\u672C~~
\`\`\`
### \u94FE\u63A5
\u4F7F\u7528 [\u6587\u672C](\u94FE\u63A5) \u683C\u5F0F
\`\`\`
[\u94FE\u63A5\u6587\u672C](https://example.com)
\`\`\`
### \u56FE\u7247
\u4F7F\u7528 ![\u63CF\u8FF0|\u5BBD\u5EA6x\u9AD8\u5EA6](\u56FE\u7247\u94FE\u63A5) \u683C\u5F0F
\`\`\`
![\u56FE\u7247\u56FA\u5B9A|400x300](https://example.com/image.jpg)
![\u56FE\u7247](https://example.com/image.jpg)
\`\`\`
### \u4EE3\u7801\u5757
\u4F7F\u7528 \`\`\` \u5305\u56F4\u4EE3\u7801
\`\`\`\`
\`\`\`js
function hello() {
console.log('Hello');
}
\`\`\`
\`\`\`\`
### \u884C\u5185\u4EE3\u7801
\u4F7F\u7528 \` \u5305\u56F4\u4EE3\u7801
\`\`\`
\`\u884C\u5185\u4EE3\u7801\`
\`\`\`
### \u5F15\u7528
\u4F7F\u7528 > \u5F00\u59CB\u5F15\u7528
\`\`\`
> \u8FD9\u662F\u4E00\u6BB5\u5F15\u7528\u6587\u672C
\`\`\`
### \u65E0\u5E8F\u5217\u8868
\u4F7F\u7528 - \u5F00\u59CB\u5217\u8868\u9879
\`\`\`
- \u9879\u76EE1
- \u9879\u76EE2
- \u9879\u76EE3
\`\`\`
### \u6709\u5E8F\u5217\u8868
\u4F7F\u7528 1. \u5F00\u59CB\u5217\u8868\u9879
\`\`\`
1. \u7B2C\u4E00\u9879
2. \u7B2C\u4E8C\u9879
3. \u7B2C\u4E09\u9879
\`\`\`
### \u8868\u683C
\u4F7F\u7528 | \u5206\u9694\u5217
\`\`\`
| \u5DE6\u5BF9\u9F50 | \u5C45\u4E2D\u5BF9\u9F50 | \u53F3\u5BF9\u9F50 |
|:-------|:-------:|-------:|
| \u6570\u636E1 | \u6570\u636E2 | \u6570\u636E3 |
\`\`\`
### \u6C34\u5E73\u5206\u5272\u7EBF
\u4F7F\u7528 --- \u521B\u5EFA\u5206\u5272\u7EBF
\`\`\`
---
\`\`\`
### \u5F3A\u5236\u6362\u884C
\u4F7F\u7528 <br/> \u6807\u7B7E\u5B9E\u73B0\u591A\u6B21\u6362\u884C
\`\`\`
\u7B2C\u4E00\u884C<br/><br/>\u7B2C\u4E09\u884C
\`\`\`
2025-05-27 15:27:24 +08:00
`}}},props(e,{t}){return[{type:"HtmlEditor",field:"content",title:t("props.content"),props:{text:!0}}]}},TC="\u7EDF\u8BA1\u680F",tl="elStatistic",Kp=[Yb,Jb,Zb,bC,CC,e1,Hb,Gb,n1,r1,f1,Dp,s1,a1,Op,c1,h1,E1,A1,k1,T1,Z1,kC,L1,Hw,AC,vC,Tw,{menu:"main",icon:"icon-data-select",label:"\u5B50\u8868\u5355\u9009\u62E9\u5668",name:"fcDataSelect",drag:!0,input:!0,mask:!1,subForm:"scope",slot:[{name:"search",type:"fcInlineForm"},{name:"table",type:"dataTable"}],event:["change","clear"],validate:["object","array"],parseRule(e){e.children.forEach(t=>{t.slot==="search"?(delete t.slot,e.props.searchRule=t):t.slot==="table"&&(delete t.slot,e.props.tableRule=t)}),delete e.children},loadRule(e){e.children=[e.props.searchRule,e.props.tableRule],e.children[0].slot="search",e.children[1].slot="table",delete e.props.searchRule,delete e.props.tableRule},rule({t:e}){return{type:"fcDataSelect",field:We(),title:e("com.fcDataSelect.name"),info:"",$required:!1,props:{title:e("com.select.title"),labelKey:"name",valueKey:"name"}}},props(e,{t}){return Be(t,"select.props",[{type:"input",field:"title"},{type:"input",field:"labelKey",value:"label"},{type:"input",field:"valueKey",value:"value"},{type:"switch",field:"autoLoad"},{type:"switch",field:"multiple"},{type:"switch",field:"disabled"},{type:"switch",field:"clearable"},{type:"inputNumber",field:"multipleLimit",props:{min:0}},{type:"input",field:"placeholder"}])}},z1,H1,aw,hw,vw,Sw,Aw,_w,Ew,bw,Yw,Jw,iC,V1,P1,ew,EC,B1,cw,{menu:"aide",icon:"icon-statistic",label:TC,name:tl,inline:!0,easySlots:["prefix","suffix"],rule({t:e}){return{type:tl,props:{value:99e3,title:e("com."+tl+".name")}}},props(e,{t}){return Be(t,tl+".props",[{type:"inputNumber",field:"value"},{type:"input",field:"title"},{type:"input",field:"prefix"},{type:"input",field:"suffix"}])}},C1,Vw,Bw,$w,eC,oC,lC,dC,uC,pC,mC,NC,{menu:"chart",icon:"icon-chart-line",label:"\u6298\u7EBF\u56FE",name:"lineChart",mask:!1,event:["beforeLoad","loaded","click"],rule(){return{type:"fcEcharts",props:{type:"line",config:{category:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],series:[{name:"Email",data:[120,132,101,134,90,230,210]},{name:"Union Ads",data:[220,182,191,234,290,330,310]},{name:"Video Ads",data:[150,232,201,154,190,330,410]},{name:"Direct",data:[320,332,301,334,390,330,320]},{name:"Search Engine",data:[820,932,901,934,1290,1330,1320]}]}}}},props(e,{t}){return Be(t,"lineChart.props",[Ln(t,"props.config",t("com.lineChart.data")),{type:"input",field:"title"},{type:"input",field:"subtitle"},{type:"input",field:"valueFormat",value:"{value}"},{type:"switch",field:"stack"},{type:"switch",field:"smooth"},{type:"switch",field:"showLegend",value:!0},{type:"switch",field:"showSeriesLabel"}])}},{menu:"chart",icon:"icon-chart-area",label:"\u4F53\u79EF\u56FE",name:"areaChart",mask:!1,event:["beforeLoad","loaded","click"],rule(){return{type:"fcEcharts",props:{type:"area",config:{category:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],series:[{name:"Email",data:[120,132,101,134,90,230,210]},{name:"Union Ads",data:[220,182,191,234,290,330,310]},{name:"Video Ads",data:[150,232,201,154,190,330,410]},{name:"Direct",data:[320,332,301,334,390,330,320]},{name:"Search Engine",data:[820,932,901,934,1290,1330,1320]}]}}}},props(e,{t}){return Be(t,"lineChart.props",[Ln(t,"props.config",t("com.lineChart.data")),{type:"input",field:"title"},{type:"input",field:"subtitle"},{type:"input",field:"valueFormat",value:"{value}"},{type:"switch",field:"stack"},{type:"switch",field:"smooth"},{type:"switch",field:"showLegend",value:!0},{type:"switch",field:"showSeriesLabel"}])}},{menu:"chart",icon:"icon-chart-bar",label:"\u67F1\u72B6\u56FE",name:"barChart",mask:!1,event:["beforeLoad","loaded","click"],rule(){return{type:"fcEcharts",props:{type:"bar",config:{category:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],series:[{name:"Direct",data:[320,332,301,334,390,330,320]}]}}}},props(e,{t}){return Be(t,"lineChart.props",[Ln(t,"props.config",t("com.lineChart.data")),{type:"input",field:"title"},{type:"input",field:"subtitle"},{type:"input",field:"valueFormat",value:"{value}"},{type:"ColorInput",field
2025-05-20 11:03:25 +08:00
const downloadJson = $inject.args[0]?.downloadJson;
const themeJson = $inject.args[0]?.themeJson;
const waterMarkText = 'ECHARTS';
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
canvas.width = canvas.height = 100;
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.globalAlpha = 0.08;
ctx.font = '20px';
ctx.translate(50, 50);
ctx.rotate(-Math.PI / 4);
ctx.fillText(waterMarkText, 0, 0);
return {
backgroundColor: {
type: 'pattern',
image: canvas,
repeat: 'repeat'
},
tooltip: {},
title: [
{
text: '\u5728\u7EBF\u6784\u5EFA',
subtext: '\u603B\u8BA1 ' + builderJson.all,
left: '25%',
textAlign: 'center'
},
{
text: '\u5404\u7248\u672C\u4E0B\u8F7D',
subtext:
'\u603B\u8BA1 ' +
Object.keys(downloadJson).reduce(function (all, key) {
return all + downloadJson[key];
}, 0),
left: '75%',
textAlign: 'center'
},
{
text: '\u4E3B\u9898\u4E0B\u8F7D',
subtext:
'\u603B\u8BA1 ' +
Object.keys(themeJson).reduce(function (all, key) {
return all + themeJson[key];
}, 0),
left: '75%',
top: '50%',
textAlign: 'center'
}
],
grid: [
{
top: 50,
width: '50%',
bottom: '45%',
left: 10,
containLabel: true
},
{
top: '55%',
width: '50%',
bottom: 0,
left: 10,
containLabel: true
}
],
xAxis: [
{
type: 'value',
max: builderJson.all,
splitLine: {
show: false
}
},
{
type: 'value',
max: builderJson.all,
gridIndex: 1,
splitLine: {
show: false
}
}
],
yAxis: [
{
type: 'category',
data: Object.keys(builderJson.charts),
axisLabel: {
interval: 0,
rotate: 30
},
splitLine: {
show: false
}
},
{
gridIndex: 1,
type: 'category',
data: Object.keys(builderJson.components),
axisLabel: {
interval: 0,
rotate: 30
},
splitLine: {
show: false
}
}
],
series: [
{
type: 'bar',
stack: 'chart',
z: 3,
label: {
position: 'right',
show: true
},
data: Object.keys(builderJson.charts).map(function (key) {
return builderJson.charts[key];
})
},
{
type: 'bar',
stack: 'chart',
silent: true,
itemStyle: {
color: '#eee'
},
data: Object.keys(builderJson.charts).map(function (key) {
return builderJson.all - builderJson.charts[key];
})
},
{
type: 'bar',
stack: 'component',
xAxisIndex: 1,
yAxisIndex: 1,
z: 3,
label: {
position: 'right',
show: true
},
data: Object.keys(builderJson.components).map(function (key) {
return builderJson.components[key];
})
},
{
type: 'bar',
stack: 'component',
silent: true,
xAxisIndex: 1,
yAxisIndex: 1,
itemStyle: {
color: '#eee'
},
data: Object.keys(builderJson.components).map(function (key) {
return builderJson.all - builderJson.components[key];
})
},
{
type: 'pie',
radius: [0, '30%'],
center: ['75%', '25%'],
data: Object.keys(downloadJson).map(function (key) {
return {
name: key.replace('.js', ''),
value: downloadJson[key]
};
})
},
{
type: 'pie',
radius: [0, '30%'],
center: ['75%', '75%'],
data: Object.keys(themeJson).map(function (key) {
return {
name: key.replace('.js', ''),
value: themeJson[key]
};
})
}
]
2025-05-27 15:27:24 +08:00
};`}}},props(e,{t}){return Be(t,"lineChart.props",[Ln(t,"props.config",t("com.lineChart.data")),{type:"FnInput",field:"loadOptions",props:{body:!0,button:!0,fnx:!0,args:[on(t)],name:"loadOptions"}}])}},g1,fw,Zw,tC,xw,kw,I1,R1,G1,Y1,rw,Ww,Gw,Pw,Mw,Lw,Iw,Fw,v1,b1,J1,nw,sw];function DC(e){return{icon:e.field?"icon-input":"icon-cell",label:e.field||e.type,name:"_",mask:!0,handleBtn:["delete"],rule(){return e},props(){return[]}}}/**!
2025-05-20 11:03:25 +08:00
* Sortable 1.14.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
2025-05-28 11:05:44 +08:00
*/function Yp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function ci(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yp(Object(r),!0).forEach(function(o){VC(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yp(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function nl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?nl=function(t){return typeof t}:nl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nl(e)}function VC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ei(){return Ei=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Ei.apply(this,arguments)}function OC(e,t){if(e==null)return{};var r={},o=Object.keys(e),i,l;for(l=0;l<o.length;l++)i=o[l],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function BC(e,t){if(e==null)return{};var r=OC(e,t),o,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)o=l[i],!(t.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,o)||(r[o]=e[o]))}return r}var RC="1.14.0";function Si(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Ai=Si(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Bo=Si(/Edge/i),Qp=Si(/firefox/i),Ro=Si(/safari/i)&&!Si(/chrome/i)&&!Si(/android/i),Jp=Si(/iP(ad|od|hone)/i),$C=Si(/chrome/i)&&Si(/android/i),Xp={capture:!1,passive:!1};function _t(e,t,r){e.addEventListener(t,r,!Ai&&Xp)}function vt(e,t,r){e.removeEventListener(t,r,!Ai&&Xp)}function il(e,t){if(!!t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function IC(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ui(e,t,r,o){if(e){r=r||document;do{if(t!=null&&(t[0]===">"?e.parentNode===r&&il(e,t):il(e,t))||o&&e===r)return e;if(e===r)break}while(e=IC(e))}return null}var Zp=/\s+/g;function On(e,t,r){if(e&&t)if(e.classList)e.classList[r?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(Zp," ").replace(" "+t+" "," ");e.className=(o+(r?" "+t:"")).replace(Zp," ")}}function lt(e,t,r){var o=e&&e.style;if(o){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(r=e.currentStyle),t===void 0?r:r[t];!(t in o)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),o[t]=r+(typeof r=="string"?"":"px")}}function $r(e,t){var r="";if(typeof e=="string")r=e;else do{var o=lt(e,"transform");o&&o!=="none"&&(r=o+" "+r)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(r)}function qp(e,t,r){if(e){var o=e.getElementsByTagName(t),i=0,l=o.length;if(r)for(;i<l;i++)r(o[i],i);return o}return[]}function fi(){var e=document.scrollingElement;return e||document.documentElement}function Qt(e,t,r,o,i){if(!(!e.getBoundingClientRect&&e!==window)){var l,d,c,u,h,m,y;if(e!==window&&e.parentNode&&e!==fi()?(l=e.getBoundingClientRect(),d=l.top,c=l.left,u=l.bottom,h=l.right,m=l.height,y=l.width):(d=0,c=0,u=window.innerHeight,h=window.innerWidth,m=window.innerHeight,y=window.innerWidth),(t||r)&&e!==window&&(i=i||e.parentNode,!Ai))do if(i&&i.getBoundingClientRect&&(lt(i,"transform")!=="none"||r&&lt(i,"position")!=="static")){var C=i.getBoundingClientRect();d-=C.top+parseInt(lt(i,"border-top-width")),c-=C.left+parseInt(lt(i,"border-left-width")),u=d+l.height,h=c+l.width;break}while(i=i.parentNode);if(o&&e!==window){var A=$r(i||e),w=A&&A.a,E=A&&A.d;A&&
2025-05-20 11:03:25 +08:00
* @form-create/component-elm-select v3.2.18
* (c) 2018-2025 xaboy
* Github https://github.com/xaboy/form-create with select
* Released under the MIT License.
2025-05-27 15:27:24 +08:00
*/function Oh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function B_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Oh(Object(r),!0).forEach(function(o){R_(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oh(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function bl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?bl=function(t){return typeof t}:bl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bl(e)}function R_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $_(e,t){return Object.keys(e).reduce(function(r,o){return(!t||t.indexOf(o)===-1)&&(r[o]=e[o]),r},{})}var wl={type:function(t,r){return Object.prototype.toString.call(t)==="[object "+r+"]"},Undef:function(t){return t==null},Element:function(t){return bl(t)==="object"&&t!==null&&t.nodeType===1&&!wl.Object(t)},trueArray:function(t){return Array.isArray(t)&&t.length>0},Function:function(t){var r=this.getType(t);return r==="Function"||r==="AsyncFunction"},getType:function(t){var r=Object.prototype.toString.call(t);return/^\[object (.*)\]$/.exec(r)[1]},empty:function(t){return t==null||Array.isArray(t)&&Array.isArray(t)&&!t.length?!0:typeof t=="string"&&!t}};["Date","Object","String","Boolean","Array","Number"].forEach(function(e){wl[e]=function(t){return wl.type(t,e)}});function I_(e,t){return{}.hasOwnProperty.call(e,t)}var F_="fcSelect",P_=n.defineComponent({name:F_,inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},type:String},emits:["update:modelValue","fc.el"],setup:function(t){var r=n.toRef(t.formCreateInject,"options",[]),o=n.toRef(t,"modelValue"),i=function(){return Array.isArray(r.value)?r.value:[]};return{options:i,value:o}},render:function(){var t=this,r,o,i=function(u,h){return n.createVNode(n.resolveComponent("ElOption"),n.mergeProps(u,{key:""+h+"-"+u.value}),null)},l=function(u,h){return n.createVNode(n.resolveComponent("ElOptionGroup"),{label:u.label,key:""+h+"-"+u.label},{default:function(){return[wl.trueArray(u.options)&&u.options.map(function(y,C){return i(y,C)})]}})},d=this.options();return n.createVNode(n.resolveComponent("ElSelect"),n.mergeProps(this.$attrs,{modelValue:this.value,"onUpdate:modelValue":function(u){return t.$emit("update:modelValue",u)},ref:"el"}),B_({default:function(){return[d.map(function(u,h){return I_(u||"","options")?l(u,h):i(u,h)}),(r=(o=t.$slots).default)===null||r===void 0?void 0:r.call(o)]}},$_(this.$slots,["default"])))},mounted:function(){this.$emit("fc.el",this.$refs.el)}});/*!
2025-05-20 11:03:25 +08:00
* @form-create/component-elm-tree v3.2.18
* (c) 2018-2025 xaboy
* Github https://github.com/xaboy/form-create with tree
* Released under the MIT License.
2025-05-27 15:27:24 +08:00
*/function M_(e){return Array.isArray(e)?e:[null,void 0,""].indexOf(e)>-1?[]:[e]}var L_="fcTree",j_=n.defineComponent({name:L_,inheritAttrs:!1,formCreateParser:{mergeProp:function(t){var r=t.prop.props;r.nodeKey||(r.nodeKey="id"),r.props||(r.props={label:"title"})}},props:{type:String,modelValue:{type:[Array,String,Number],default:function(){return[]}}},emits:["update:modelValue","fc.el"],watch:{modelValue:function(){this.setValue()}},methods:{updateValue:function(){if(!!this.$refs.tree){var t;this.type==="selected"?t=this.$refs.tree.getCurrentKey():t=this.$refs.tree.getCheckedKeys(),this.$emit("update:modelValue",t)}},setValue:function(){if(!!this.$refs.tree){var t=this.type;t==="selected"?this.$refs.tree.setCurrentKey(this.modelValue):this.$refs.tree.setCheckedKeys(M_(this.modelValue))}}},render:function(){return n.createVNode(n.resolveComponent("ElTree"),n.mergeProps(this.$attrs,{ref:"tree",onCheck:this.updateValue,onNodeClick:this.updateValue}),this.$slots)},mounted:function(){this.setValue(),this.$emit("fc.el",this.$refs.tree)}});/*!
2025-05-20 11:03:25 +08:00
* @form-create/component-elm-upload v3.2.18
* (c) 2018-2025 xaboy
* Github https://github.com/xaboy/form-create with upload
* Released under the MIT License.
2025-05-27 15:27:24 +08:00
*/function Bh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function Ac(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bh(Object(r),!0).forEach(function(o){z_(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bh(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function Cl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cl=function(t){return typeof t}:Cl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(e)}function z_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _l(e){return Array.isArray(e)?e:[null,void 0,""].indexOf(e)>-1?[]:[e]}function U_(e,t){return Object.keys(e).reduce(function(r,o){return(!t||t.indexOf(o)===-1)&&(r[o]=e[o]),r},{})}function H_(e,t){t===void 0&&(t={});var r=t.insertAt;if(!(!e||typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var W_="._fc-upload{width:100%}._fc-exceed .el-upload{display:none}.el-upload-list.is-disabled .el-upload{cursor:not-allowed!important}";H_(W_);var Rh={name:"IconUpload"},G_={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},K_=n.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 110 64H160a32 32 0 110-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"},null,-1),Y_=[K_];function Q_(e,t,r,o,i,l){return n.openBlock(),n.createElementBlock("svg",G_,Y_)}Rh.render=Q_;function $h(e,t){return Cl(e)==="object"?e:{url:e,is_string:!0,name:J_(e),uid:t}}function Ih(e){return Ac(Ac({},e),{},{file:e,value:e})}function J_(e){return(""+e).split("/").pop()}var X_="fcUpload",Z_=n.defineComponent({name:X_,inheritAttrs:!1,formCreateParser:{toFormValue:function(t){return _l(t)},toValue:function(t,r){return r.prop.props.limit===1?t[0]||"":t}},props:{previewMask:void 0,onPreview:Function,httpRequest:Function,modalTitle:String,listType:String,formCreateInject:Object,modelValue:[Array,String,Object]},emits:["update:modelValue","change","remove","fc.el"],data:function(){return{previewVisible:!1,previewImage:"",fileList:[]}},created:function(){this.fileList=_l(this.modelValue).map($h).map(Ih)},watch:{modelValue:function(t){this.fileList=_l(t).map($h).map(Ih)}},methods:{handlePreview:function(t){this.onPreview?this.onPreview.apply(this,arguments):this.listType==="text"?window.open(t.url):(this.previewImage=t.url,this.previewVisible=!0)},update:function(t){var r=t.map(function(o){return o.is_string?o.url:o.value||o.url}).filter(function(o){return o!==void 0});this.$emit("update:modelValue",r)},handleCancel:function(){this.previewVisible=!1},handleChange:function(t,r){this.$emit.apply(this,["change"].concat(Array.prototype.slice.call(arguments))),t.status==="success"&&this.update(r)},handleRemove:function(t,r){this.$emit.apply(this,["remove"].concat(Array.prototype.slice.call(arguments))),this.update(r)},doHttpRequest:function(t){if(this.httpRequest)return this.httpRequest(t);t.source="upload",this.formCreateInject.api.fetch(t)}},render:function(){var t,r,o=this,i=_l(this.modelValue).length;return n.createVNode("div",{class:"_fc-upload"},[n.createVNode(n.resolveComponent("ElUpload"),n.mergeProps({key:i},this.$attrs,{listType:this.listType||"picture-card",class:{"_fc-exceed":this.$attrs.limit?this.$attrs.limit<=i:!1},onPreview:this.handlePreview,onChange:this.handleChange,onRemove:this.handleRemove,httpRequest:this.doHttpRequest,fileList:this.fileList,ref:"upload"}),Ac({default:function(){return[((t=(r=o.$slot
2025-05-20 11:03:25 +08:00
* Signature Pad v5.0.7 | https://github.com/szimek/signature_pad
* (c) 2025 Szymon Nowak | Released under the MIT license
2025-05-27 15:27:24 +08:00
*/class Sl{constructor(t,r,o,i){if(isNaN(t)||isNaN(r))throw new Error(`Point is invalid: (${t}, ${r})`);this.x=+t,this.y=+r,this.pressure=o||0,this.time=i||Date.now()}distanceTo(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))}equals(t){return this.x===t.x&&this.y===t.y&&this.pressure===t.pressure&&this.time===t.time}velocityFrom(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):0}}class Nc{static fromPoints(t,r){const o=this.calculateControlPoints(t[0],t[1],t[2]).c2,i=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new Nc(t[1],o,i,t[2],r.start,r.end)}static calculateControlPoints(t,r,o){const i=t.x-r.x,l=t.y-r.y,d=r.x-o.x,c=r.y-o.y,u={x:(t.x+r.x)/2,y:(t.y+r.y)/2},h={x:(r.x+o.x)/2,y:(r.y+o.y)/2},m=Math.sqrt(i*i+l*l),y=Math.sqrt(d*d+c*c),C=u.x-h.x,A=u.y-h.y,w=m+y==0?0:y/(m+y),E={x:h.x+C*w,y:h.y+A*w},b=r.x-E.x,g=r.y-E.y;return{c1:new Sl(u.x+b,u.y+g),c2:new Sl(h.x+b,h.y+g)}}constructor(t,r,o,i,l,d){this.startPoint=t,this.control2=r,this.control1=o,this.endPoint=i,this.startWidth=l,this.endWidth=d}length(){let r=0,o,i;for(let l=0;l<=10;l+=1){const d=l/10,c=this.point(d,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),u=this.point(d,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(l>0){const h=c-o,m=u-i;r+=Math.sqrt(h*h+m*m)}o=c,i=u}return r}point(t,r,o,i,l){return r*(1-t)*(1-t)*(1-t)+3*o*(1-t)*(1-t)*t+3*i*(1-t)*t*t+l*t*t*t}}class IE{constructor(){try{this._et=new EventTarget}catch{this._et=document}}addEventListener(t,r,o){this._et.addEventListener(t,r,o)}dispatchEvent(t){return this._et.dispatchEvent(t)}removeEventListener(t,r,o){this._et.removeEventListener(t,r,o)}}function FE(e,t=250){let r=0,o=null,i,l,d;const c=()=>{r=Date.now(),o=null,i=e.apply(l,d),o||(l=null,d=[])};return function(...h){const m=Date.now(),y=t-(m-r);return l=this,d=h,y<=0||y>t?(o&&(clearTimeout(o),o=null),r=m,i=e.apply(l,d),o||(l=null,d=[])):o||(o=window.setTimeout(c,y)),i}}class Ho extends IE{constructor(t,r={}){var o,i,l;super(),this.canvas=t,this._drawingStroke=!1,this._isEmpty=!0,this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this._handleMouseDown=d=>{!this._isLeftButtonPressed(d,!0)||this._drawingStroke||this._strokeBegin(this._pointerEventToSignatureEvent(d))},this._handleMouseMove=d=>{if(!this._isLeftButtonPressed(d,!0)||!this._drawingStroke){this._strokeEnd(this._pointerEventToSignatureEvent(d),!1);return}this._strokeMoveUpdate(this._pointerEventToSignatureEvent(d))},this._handleMouseUp=d=>{this._isLeftButtonPressed(d)||this._strokeEnd(this._pointerEventToSignatureEvent(d))},this._handleTouchStart=d=>{d.targetTouches.length!==1||this._drawingStroke||(d.cancelable&&d.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(d)))},this._handleTouchMove=d=>{if(d.targetTouches.length===1){if(d.cancelable&&d.preventDefault(),!this._drawingStroke){this._strokeEnd(this._touchEventToSignatureEvent(d),!1);return}this._strokeMoveUpdate(this._touchEventToSignatureEvent(d))}},this._handleTouchEnd=d=>{d.targetTouches.length===0&&(d.cancelable&&d.preventDefault(),this.canvas.removeEventListener("touchmove",this._handleTouchMove),this._strokeEnd(this._touchEventToSignatureEvent(d)))},this._handlePointerDown=d=>{!d.isPrimary||!this._isLeftButtonPressed(d)||this._drawingStroke||(d.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(d)))},this._handlePointerMove=d=>{if(!!d.isPrimary){if(!this._isLeftButtonPressed(d,!0)||!this._drawingStroke){this._strokeEnd(this._pointerEventToSignatureEvent(d),!1);return}d.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(d))}},this._handlePointerUp=d=>{!d.isPrimary||this._isLeftButtonPressed(d)||(d.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(d)))},this.velocityFilterWeight=r.velocityFilterWeight||.7,this.minWidth=r.minWidth||.5,this.maxWidth=r.maxWidth||2.5,this.throttle=(o=r.throttle)!==null&&o!==void 0?o:16,this.minDistance=(i=r.minDistance)!==null&&i!==void 0?i:5,this.dotSize=r.dotSize||0,this.penColor=r.penColor||"black",this.backgroundColo
]`).replace("lheading",qh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},cS=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,uS=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,nm=/^( {2,}|\\)\n(?!\s*$)/,fS=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,xl=/[\p{P}\p{S}]/u,Ic=/[\s\p{P}\p{S}]/u,im=/[^\s\p{P}\p{S}]/u,pS=Et(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ic).getRegex(),rm=/(?!~)[\p{P}\p{S}]/u,hS=/(?!~)[\s\p{P}\p{S}]/u,mS=/(?:[^\s\p{P}\p{S}]|~)/u,gS=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,om=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,vS=Et(om,"u").replace(/punct/g,xl).getRegex(),yS=Et(om,"u").replace(/punct/g,rm).getRegex(),am="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",bS=Et(am,"gu").replace(/notPunctSpace/g,im).replace(/punctSpace/g,Ic).replace(/punct/g,xl).getRegex(),wS=Et(am,"gu").replace(/notPunctSpace/g,mS).replace(/punctSpace/g,hS).replace(/punct/g,rm).getRegex(),CS=Et("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,im).replace(/punctSpace/g,Ic).replace(/punct/g,xl).getRegex(),_S=Et(/\\(punct)/,"gu").replace(/punct/g,xl).getRegex(),ES=Et(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),SS=Et(Rc).replace("(?:-->|$)","-->").getRegex(),AS=Et("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",SS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),kl=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,xS=Et(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",kl).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),lm=Et(/^!?\[(label)\]\[(ref)\]/).replace("label",kl).replace("ref",Bc).getRegex(),sm=Et(/^!?\[(ref)\](?:\[\])?/).replace("ref",Bc).getRegex(),kS=Et("reflink|nolink(?!\\()","g").replace("reflink",lm).replace("nolink",sm).getRegex(),Fc={_backpedal:Wo,anyPunctuation:_S,autolink:ES,blockSkip:gS,br:nm,code:uS,del:Wo,emStrongLDelim:vS,emStrongRDelimAst:bS,emStrongRDelimUnd:CS,escape:cS,link:xS,nolink:sm,punctuation:pS,reflink:lm,reflinkSearch:kS,tag:AS,text:fS,url:Wo},NS={...Fc,link:Et(/^!?\[(label)\]\((.*?)\)/).replace("label",kl).getRegex(),reflink:Et(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",kl).getRegex()},Pc={...Fc,emStrongRDelimAst:wS,emStrongLDelim:yS,url:Et(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},TS={...Pc,br:Et(nm).replace("{2,}","*").getRegex(),text:Et(Pc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Nl={normal:$c,gfm:sS,pedantic:dS},Ko={normal:Fc,gfm:Pc,breaks:TS,pedantic:NS},DS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},dm=e=>DS[e];fun
2025-05-24 17:29:32 +08:00
`).map(l=>{const d=l.match(r.other.beginningSpace);if(d===null)return l;const[c]=d;return c.length>=i.length?l.slice(i.length):l}).join(`
`)}class Tl{constructor(t){Dt(this,"options");Dt(this,"rules");Dt(this,"lexer");this.options=t||dr}space(t){const r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){const r=this.rules.block.code.exec(t);if(r){const o=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?o:Yo(o,`
2025-05-27 15:27:24 +08:00
`)}}}fences(t){const r=this.rules.block.fences.exec(t);if(r){const o=r[0],i=OS(o,r[3]||"",this.rules);return{type:"code",raw:o,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(t){const r=this.rules.block.heading.exec(t);if(r){let o=r[2].trim();if(this.rules.other.endingHash.test(o)){const i=Yo(o,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(o=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(t){const r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Yo(r[0],`
2025-05-24 17:29:32 +08:00
`)}}blockquote(t){const r=this.rules.block.blockquote.exec(t);if(r){let o=Yo(r[0],`
2025-05-20 11:03:25 +08:00
`).split(`
2025-05-24 17:29:32 +08:00
`),i="",l="";const d=[];for(;o.length>0;){let c=!1;const u=[];let h;for(h=0;h<o.length;h++)if(this.rules.other.blockquoteStart.test(o[h]))u.push(o[h]),c=!0;else if(!c)u.push(o[h]);else break;o=o.slice(h);const m=u.join(`
`),y=m.replace(this.rules.other.blockquoteSetextReplace,`
2025-05-20 11:03:25 +08:00
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
${m}`:m,l=l?`${l}
2025-05-27 15:27:24 +08:00
${y}`:y;const C=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(y,d,!0),this.lexer.state.top=C,o.length===0)break;const A=d.at(-1);if((A==null?void 0:A.type)==="code")break;if((A==null?void 0:A.type)==="blockquote"){const w=A,E=w.raw+`
2025-05-24 17:29:32 +08:00
`+o.join(`
2025-05-27 15:27:24 +08:00
`),b=this.blockquote(E);d[d.length-1]=b,i=i.substring(0,i.length-w.raw.length)+b.raw,l=l.substring(0,l.length-w.text.length)+b.text;break}else if((A==null?void 0:A.type)==="list"){const w=A,E=w.raw+`
2025-05-24 17:29:32 +08:00
`+o.join(`
2025-05-27 15:27:24 +08:00
`),b=this.list(E);d[d.length-1]=b,i=i.substring(0,i.length-A.raw.length)+b.raw,l=l.substring(0,l.length-w.raw.length)+b.raw,o=E.substring(d.at(-1).raw.length).split(`
2025-05-24 17:29:32 +08:00
`);continue}}return{type:"blockquote",raw:i,tokens:d,text:l}}}list(t){let r=this.rules.block.list.exec(t);if(r){let o=r[1].trim();const i=o.length>1,l={type:"list",raw:"",ordered:i,start:i?+o.slice(0,-1):"",loose:!1,items:[]};o=i?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=i?o:"[*+-]");const d=this.rules.other.listItemRegex(o);let c=!1;for(;t;){let h=!1,m="",y="";if(!(r=d.exec(t))||this.rules.block.hr.test(t))break;m=r[0],t=t.substring(m.length);let C=r[2].split(`
2025-05-27 15:27:24 +08:00
`,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),A=t.split(`
`,1)[0],w=!C.trim(),E=0;if(this.options.pedantic?(E=2,y=C.trimStart()):w?E=r[1].length+1:(E=r[2].search(this.rules.other.nonSpaceChar),E=E>4?1:E,y=C.slice(E),E+=r[1].length),w&&this.rules.other.blankLine.test(A)&&(m+=A+`
`,t=t.substring(A.length+1),h=!0),!h){const _=this.rules.other.nextBulletRegex(E),x=this.rules.other.hrRegex(E),k=this.rules.other.fencesBeginRegex(E),T=this.rules.other.headingBeginRegex(E),O=this.rules.other.htmlBeginRegex(E);for(;t;){const F=t.split(`
`,1)[0];let I;if(A=F,this.options.pedantic?(A=A.replace(this.rules.other.listReplaceNesting," "),I=A):I=A.replace(this.rules.other.tabCharGlobal," "),k.test(A)||T.test(A)||O.test(A)||_.test(A)||x.test(A))break;if(I.search(this.rules.other.nonSpaceChar)>=E||!A.trim())y+=`
2025-05-26 10:41:15 +08:00
`+I.slice(E);else{if(w||C.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(C)||T.test(C)||x.test(C))break;y+=`
2025-05-27 15:27:24 +08:00
`+A}!w&&!A.trim()&&(w=!0),m+=F+`
`,t=t.substring(F.length+1),C=I.slice(E)}}l.loose||(c?l.loose=!0:this.rules.other.doubleBlankLine.test(m)&&(c=!0));let b=null,g;this.options.gfm&&(b=this.rules.other.listIsTask.exec(y),b&&(g=b[0]!=="[ ] ",y=y.replace(this.rules.other.listReplaceTask,""))),l.items.push({type:"list_item",raw:m,task:!!b,checked:g,loose:!1,text:y,tokens:[]}),l.raw+=m}const u=l.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let h=0;h<l.items.length;h++)if(this.lexer.state.top=!1,l.items[h].tokens=this.lexer.blockTokens(l.items[h].text,[]),!l.loose){const m=l.items[h].tokens.filter(C=>C.type==="space"),y=m.length>0&&m.some(C=>this.rules.other.anyLine.test(C.raw));l.loose=y}if(l.loose)for(let h=0;h<l.items.length;h++)l.items[h].loose=!0;return l}}html(t){const r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){const r=this.rules.block.def.exec(t);if(r){const o=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:o,raw:r[0],href:i,title:l}}}table(t){var c;const r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;const o=um(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(c=r[3])!=null&&c.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],d={type:"table",raw:r[0],header:[],align:[],rows:[]};if(o.length===i.length){for(const u of i)this.rules.other.tableAlignRight.test(u)?d.align.push("right"):this.rules.other.tableAlignCenter.test(u)?d.align.push("center"):this.rules.other.tableAlignLeft.test(u)?d.align.push("left"):d.align.push(null);for(let u=0;u<o.length;u++)d.header.push({text:o[u],tokens:this.lexer.inline(o[u]),header:!0,align:d.align[u]});for(const u of l)d.rows.push(um(u,d.header.length).map((h,m)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:d.align[m]})));return d}}lheading(t){const r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){const r=this.rules.block.paragraph.exec(t);if(r){const o=r[1].charAt(r[1].length-1)===`
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:o,tokens:this.lexer.inline(o)}}}text(t){const r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){const r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){const r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){const r=this.rules.inline.link.exec(t);if(r){const o=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;const d=Yo(o.slice(0,-1),"\\");if((o.length-d.length)%2===0)return}else{const d=VS(r[2],"()");if(d===-2)return;if(d>-1){const u=(r[0].indexOf("!")===0?5:4)+r[1].length+d;r[2]=r[2].substring(0,d),r[0]=r[0].substring(0,u).trim(),r[3]=""}}let i=r[2],l="";if(this.options.pedantic){const d=this.rules.other.pedanticHrefTitle.exec(i);d&&(i=d[1],l=d[3])}else l=r[3]?r[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?i=i.slice(1):i=i.slice(1,-1)),fm(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let o;if((o=this.rules.inline.reflink.exec(t))||(o=this.rules.inline.nolink.exec(t))){const i=(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=r[i.toLowerCase()];if(!l){const d=o[0].charAt(0);return{type:"text",raw:d,text:d}}return fm(o,l,o[0],this.lexer,this.rules)}}emStrong(t,r,o=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&o.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!o||this.rules.inline.punctuation.exec(o)){const d=[...i[0]].length-1;let c,u,h=d,m=0;const y=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(y.lastIndex=0,r=r.slice(-1*t.length+d);(i=y.exec(r))!=null;){if(c=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!c)continue;if(u=[...c].length,i[3]||i[4]){h+=u;continue}else if((i[5]||i[6])&&d%3&&!((d+u)%3)){m+=u;continue}if(h-=u,h>0)continue;u=Math.min(u,u+h+m);const C=[...i[0]][0].length,A=t.slice(0,d+i.index+C+u);if(Math.min(d,u)%2){const E=A.slice(1,-1);return{type:"em",raw:A,text:E,tokens:this.lexer.inlineTokens(E)}}const w=A.slice(2,-2);return{type:"strong",raw:A,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(t){const r=this.rules.inline.code.exec(t);if(r){let o=r[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(o),l=this.rules.other.startingSpaceChar.test(o)&&this.rules.other.endingSpaceChar.test(o);return i&&l&&(o=o.substring(1,o.length-1)),{type:"codespan",raw:r[0],text:o}}}br(t){const r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){const r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){const r=this.rules.inline.autolink.exec(t);if(r){let o,i;return r[2]==="@"?(o=r[1],i="mailto:"+o):(o=r[1],i=o),{type:"link",raw:r[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}url(t){var o,i;let r;if(r=this.rules.inline.url.exec(t)){let l,d;if(r[2]==="@")l=r[0],d="mailto:"+l;else{let c;do c=r[0],r[0]=(i=(o=this.rules.inline._backpedal.exec(r[0]))==null?void 0:o[0])!=null?i:"";while(c!==r[0]);l=r[0],r[1]==="www."?d="http://"+r[0]:d=r[0]}return{type:"link",raw:r[0],text:l,href:d,tokens:[{type:"text",raw:l,text:l}]}}}inlineText(t){const r=this.rules.inline.text.exec(t);if(r){const o=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],t
2025-05-24 17:29:32 +08:00
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const o=this.inlineQueue[r];this.inlineTokens(o.src,o.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],o=!1){var i,l,d;for(this.options.pedantic&&(t=t.replace(mn.tabCharGlobal," ").replace(mn.spaceLine,""));t;){let c;if((l=(i=this.options.extensions)==null?void 0:i.block)!=null&&l.some(h=>(c=h.call({lexer:this},t,r))?(t=t.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.space(t)){t=t.substring(c.raw.length);const h=r.at(-1);c.raw.length===1&&h!==void 0?h.raw+=`
`:r.push(c);continue}if(c=this.tokenizer.code(t)){t=t.substring(c.raw.length);const h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=`
2025-05-20 11:03:25 +08:00
`+c.raw,h.text+=`
2025-05-24 17:29:32 +08:00
`+c.text,this.inlineQueue.at(-1).src=h.text):r.push(c);continue}if(c=this.tokenizer.fences(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.heading(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.hr(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.blockquote(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.list(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.html(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.def(t)){t=t.substring(c.raw.length);const h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=`
2025-05-20 11:03:25 +08:00
`+c.raw,h.text+=`
2025-05-24 17:29:32 +08:00
`+c.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title});continue}if(c=this.tokenizer.table(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.lheading(t)){t=t.substring(c.raw.length),r.push(c);continue}let u=t;if((d=this.options.extensions)!=null&&d.startBlock){let h=1/0;const m=t.slice(1);let y;this.options.extensions.startBlock.forEach(C=>{y=C.call({lexer:this},m),typeof y=="number"&&y>=0&&(h=Math.min(h,y))}),h<1/0&&h>=0&&(u=t.substring(0,h+1))}if(this.state.top&&(c=this.tokenizer.paragraph(u))){const h=r.at(-1);o&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=`
2025-05-20 11:03:25 +08:00
`+c.raw,h.text+=`
2025-05-24 17:29:32 +08:00
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(c),o=u.length!==t.length,t=t.substring(c.raw.length);continue}if(c=this.tokenizer.text(t)){t=t.substring(c.raw.length);const h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=`
2025-05-20 11:03:25 +08:00
`+c.raw,h.text+=`
2025-05-27 15:27:24 +08:00
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(c);continue}if(t){const h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var c,u,h;let o=t,i=null;if(this.tokens.links){const m=Object.keys(this.tokens.links);if(m.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)m.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,i.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let l=!1,d="";for(;t;){l||(d=""),l=!1;let m;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(C=>(m=C.call({lexer:this},t,r))?(t=t.substring(m.raw.length),r.push(m),!0):!1))continue;if(m=this.tokenizer.escape(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.tag(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.link(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(m.raw.length);const C=r.at(-1);m.type==="text"&&(C==null?void 0:C.type)==="text"?(C.raw+=m.raw,C.text+=m.text):r.push(m);continue}if(m=this.tokenizer.emStrong(t,o,d)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.codespan(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.br(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.del(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.autolink(t)){t=t.substring(m.raw.length),r.push(m);continue}if(!this.state.inLink&&(m=this.tokenizer.url(t))){t=t.substring(m.raw.length),r.push(m);continue}let y=t;if((h=this.options.extensions)!=null&&h.startInline){let C=1/0;const A=t.slice(1);let w;this.options.extensions.startInline.forEach(E=>{w=E.call({lexer:this},A),typeof w=="number"&&w>=0&&(C=Math.min(C,w))}),C<1/0&&C>=0&&(y=t.substring(0,C+1))}if(m=this.tokenizer.inlineText(y)){t=t.substring(m.raw.length),m.raw.slice(-1)!=="_"&&(d=m.raw.slice(-1)),l=!0;const C=r.at(-1);(C==null?void 0:C.type)==="text"?(C.raw+=m.raw,C.text+=m.text):r.push(m);continue}if(t){const C="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw new Error(C)}}return r}}class Dl{constructor(t){Dt(this,"options");Dt(this,"parser");this.options=t||dr}space(t){return""}code({text:t,lang:r,escaped:o}){var d;const i=(d=(r||"").match(mn.notSpaceStart))==null?void 0:d[0],l=t.replace(mn.endingNewline,"")+`
2025-05-24 17:29:32 +08:00
`;return i?'<pre><code class="language-'+pi(i)+'">'+(o?l:pi(l,!0))+`</code></pre>
`:"<pre><code>"+(o?l:pi(l,!0))+`</code></pre>
2025-05-20 11:03:25 +08:00
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
2025-05-24 17:29:32 +08:00
`}html({text:t}){return t}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
2025-05-20 11:03:25 +08:00
`}hr(t){return`<hr>
2025-05-24 17:29:32 +08:00
`}list(t){const r=t.ordered,o=t.start;let i="";for(let c=0;c<t.items.length;c++){const u=t.items[c];i+=this.listitem(u)}const l=r?"ol":"ul",d=r&&o!==1?' start="'+o+'"':"";return"<"+l+d+`>
2025-05-20 11:03:25 +08:00
`+i+"</"+l+`>
2025-05-24 17:29:32 +08:00
`}listitem(t){var o;let r="";if(t.task){const i=this.checkbox({checked:!!t.checked});t.loose?((o=t.tokens[0])==null?void 0:o.type)==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+pi(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
2025-05-20 11:03:25 +08:00
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
2025-05-24 17:29:32 +08:00
`}table(t){let r="",o="";for(let l=0;l<t.header.length;l++)o+=this.tablecell(t.header[l]);r+=this.tablerow({text:o});let i="";for(let l=0;l<t.rows.length;l++){const d=t.rows[l];o="";for(let c=0;c<d.length;c++)o+=this.tablecell(d[c]);i+=this.tablerow({text:o})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
2025-05-20 11:03:25 +08:00
<thead>
2025-05-24 17:29:32 +08:00
`+r+`</thead>
2025-05-20 11:03:25 +08:00
`+i+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
2025-05-24 17:29:32 +08:00
`}tablecell(t){const r=this.parser.parseInline(t.tokens),o=t.header?"th":"td";return(t.align?`<${o} align="${t.align}">`:`<${o}>`)+r+`</${o}>
2025-05-27 15:27:24 +08:00
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${pi(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:o}){const i=this.parser.parseInline(o),l=cm(t);if(l===null)return i;t=l;let d='<a href="'+t+'"';return r&&(d+=' title="'+pi(r)+'"'),d+=">"+i+"</a>",d}image({href:t,title:r,text:o,tokens:i}){i&&(o=this.parser.parseInline(i,this.parser.textRenderer));const l=cm(t);if(l===null)return pi(o);t=l;let d=`<img src="${t}" alt="${o}"`;return r&&(d+=` title="${pi(r)}"`),d+=">",d}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:pi(t.text)}}class Mc{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}}class Un{constructor(t){Dt(this,"options");Dt(this,"renderer");Dt(this,"textRenderer");this.options=t||dr,this.options.renderer=this.options.renderer||new Dl,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Mc}static parse(t,r){return new Un(r).parse(t)}static parseInline(t,r){return new Un(r).parseInline(t)}parse(t,r=!0){var i,l;let o="";for(let d=0;d<t.length;d++){const c=t[d];if((l=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&l[c.type]){const h=c,m=this.options.extensions.renderers[h.type].call({parser:this},h);if(m!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type)){o+=m||"";continue}}const u=c;switch(u.type){case"space":{o+=this.renderer.space(u);continue}case"hr":{o+=this.renderer.hr(u);continue}case"heading":{o+=this.renderer.heading(u);continue}case"code":{o+=this.renderer.code(u);continue}case"table":{o+=this.renderer.table(u);continue}case"blockquote":{o+=this.renderer.blockquote(u);continue}case"list":{o+=this.renderer.list(u);continue}case"html":{o+=this.renderer.html(u);continue}case"paragraph":{o+=this.renderer.paragraph(u);continue}case"text":{let h=u,m=this.renderer.text(h);for(;d+1<t.length&&t[d+1].type==="text";)h=t[++d],m+=`
`+this.renderer.text(h);r?o+=this.renderer.paragraph({type:"paragraph",raw:m,text:m,tokens:[{type:"text",raw:m,text:m,escaped:!0}]}):o+=m;continue}default:{const h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return o}parseInline(t,r=this.renderer){var i,l;let o="";for(let d=0;d<t.length;d++){const c=t[d];if((l=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&l[c.type]){const h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){o+=h||"";continue}}const u=c;switch(u.type){case"escape":{o+=r.text(u);break}case"html":{o+=r.html(u);break}case"link":{o+=r.link(u);break}case"image":{o+=r.image(u);break}case"strong":{o+=r.strong(u);break}case"em":{o+=r.em(u);break}case"codespan":{o+=r.codespan(u);break}case"br":{o+=r.br(u);break}case"del":{o+=r.del(u);break}case"text":{o+=r.text(u);break}default:{const h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return o}}class Qo{constructor(t){Dt(this,"options");Dt(this,"block");this.options=t||dr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?zn.lex:zn.lexInline}provideParser(){return this.block?Un.parse:Un.parseInline}}Dt(Qo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class pm{constructor(...t){Dt(this,"defaults",Dc());Dt(this,"options",this.setOptions);Dt(this,"parse",this.parseMarkdown(!0));Dt(this,"parseInline",this.parseMarkdown(!1));Dt(this,"Parser",Un);Dt(this,"Renderer",Dl);Dt(this,"TextRenderer",Mc);Dt(this,"Lexer",zn);Dt(this,"Tokenizer",Tl);Dt(this,"Hooks",Qo);this.use(...t)}walkTokens(t,r){var i,l;let o=[];for(const d of t)switch(o=o.concat(r.call(this,d)),d.type){case"table":{const c=d;for(const u of c.header)o=o.concat(this.walkTokens(u.tokens,r));for(const u of c.rows)for(const h of u)o=o.concat(this.walkTokens(h.tokens,r));break}case"list":{const c=d;o=o.concat(this.walkTokens(c.items,r));break}default:{const c=d;(l=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&l[c.type]?this.defaults.extensions.childTokens[c.type].forEach(u=>{const h=c[u].flat(1/0);o=o.concat(this.walkTokens(h,r))}):c.tokens&&(o=o.concat(this.walkTokens(c.tokens,r)))}}return o}use(...t){const r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(o=>{const i={...o};if(i.async=this.defaults.async||i.async||!1,o.extensions&&(o.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){const d=r.renderers[l.name];d?r.renderers[l.name]=function(...c){let u=l.renderer.apply(this,c);return u===!1&&(u=d.apply(this,c)),u}:r.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const d=r[l.level];d?d.unshift(l.tokenizer):r[l.level]=[l.tokenizer],l.start&&(l.level==="block"?r.startBlock?r.startBlock.push(l.start):r.startBlock=[l.start]:l.level==="inline"&&(r.startInline?r.startInline.push(l.start):r.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(r.childTokens[l.name]=l.childTokens)}),i.extensions=r),o.renderer){const l=this.defaults.renderer||new Dl(this.defaults);for(const d in o.renderer){if(!(d in l))throw new Error(`renderer '${d}' does not exist`);if(["options","parser"].includes(d))continue;const c=d,u=o.renderer[c],h=l[c];l[c]=(...m)=>{let y=u.apply(l,m);return y===!1&&(y=h.apply(l,m)),y||""}}i.renderer=l}if(o.tokenizer){const l=this.defaults.tokenizer||new Tl(this.defaults);for(const d in o.tokenizer){if(!(d in l))throw new Error(`tokenizer '${d}' does not exist`);if(["options","rules","lexer"].includes(d))continue;const c=d,u=o.tokenizer[c],h=l[c];l[c]=(...m)=>{let y=u.apply(l,m);return y===!1&&(y=h.apply(l,m)),y}}i.tokenizer=l}if(o.hooks){const l=this.defaults.hooks||new Qo;for(const d in o.hooks){if(!(d in l))throw new Error(`hook '${d}' does not e
2025-05-28 11:05:44 +08:00
Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An error occurred:</p><pre>"+pi(o.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(o);throw o}}}const cr=new pm;function xt(e,t){return cr.parse(e,t)}xt.options=xt.setOptions=function(e){return cr.setOptions(e),xt.defaults=cr.defaults,Xh(xt.defaults),xt},xt.getDefaults=Dc,xt.defaults=dr,xt.use=function(...e){return cr.use(...e),xt.defaults=cr.defaults,Xh(xt.defaults),xt},xt.walkTokens=function(e,t){return cr.walkTokens(e,t)},xt.parseInline=cr.parseInline,xt.Parser=Un,xt.parser=Un.parse,xt.Renderer=Dl,xt.TextRenderer=Mc,xt.Lexer=zn,xt.lexer=zn.lex,xt.Tokenizer=Tl,xt.Hooks=Qo,xt.parse=xt,xt.options,xt.setOptions,xt.use,xt.walkTokens,xt.parseInline,Un.parse,zn.lex;const ij="",BS=n.defineComponent({name:"FcMarkdown",data(){return{marked:n.markRaw(new pm),html:""}},props:{content:String},watch:{content:{handler(){this.html=this.marked.parse(this.content||"")},immediate:!0}}}),RS=["innerHTML"];function $S(e,t,r,o,i,l){return n.openBlock(),n.createElementBlock("div",{class:"_fc-markdown",innerHTML:e.html},null,8,RS)}const hm=Te(BS,[["render",$S]]),rj="",IS=n.defineComponent({name:"FcDialog",emits:["confirm","submit","validateFail","update:modelValue"],props:{formData:Object,options:{type:Object,default:()=>n.reactive({submitBtn:!1,resetBtn:!1})},rule:Array,autoClose:{type:Boolean,default:!0},footer:{type:Boolean,default:!0},preview:Boolean,modelValue:Object,formCreateInject:Object},computed:{formOptions(){const e={...this.options};return this.preview&&(e.preview=this.preview),e}},data(){return{visible:!1,max:this.$attrs.fullscreen||!1,fapi:{},value:{},formRule:[],Form:n.markRaw(this.formCreateInject.form.$form())}},methods:{formChange(){this.$emit("update:modelValue",this.fapi.formData())},open(e){this.$nextTick(()=>{this.visible=!0,this.value=rt(e||this.modelValue||this.formData||{}),this.formRule=rt(this.rule||[])})},close(){this.visible=!1},handleConfirm(){this.$emit("confirm",this.fapi),this.fapi.submit().then(e=>{this.$emit("submit",e,this.fapi,this.close),this.autoClose&&this.close()}).catch(e=>{this.$emit("validateFail",e,this.fapi)})}},mounted(){this.formCreateInject.api.top.bus.$on("fc.closeDialog",this.close),n.onUnmounted(()=>{this.formCreateInject.api.top.bus.$off("fc.closeDialog",this.close)})}}),FS={key:0,class:"el-dialog__headerbtn",type:"button",style:{right:"36px"}};function PS(e,t,r,o,i,l){const d=n.resolveComponent("el-button"),c=n.resolveComponent("el-dialog");return n.openBlock(),n.createBlock(c,n.mergeProps({class:"_fc-dialog"},e.$attrs,{fullscreen:e.max,modelValue:e.visible,"onUpdate:modelValue":t[3]||(t[3]=u=>e.visible=u),destroyOnClose:""}),n.createSlots({default:n.withCtx(()=>[e.$attrs.fullscreen?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("button",FS,[e.max?(n.openBlock(),n.createElementBlock("i",{key:0,class:"fc-icon icon-page-min",onClick:t[0]||(t[0]=u=>e.max=!1)})):(n.openBlock(),n.createElementBlock("i",{key:1,class:"fc-icon icon-page-max",onClick:t[1]||(t[1]=u=>e.max=!0)}))])),(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.Form),{option:e.formOptions,rule:e.formRule,extendOption:!0,api:e.fapi,"onUpdate:api":t[2]||(t[2]=u=>e.fapi=u),"model-value":e.value,subForm:!1,onChange:e.formChange,onEmitEvent:e.$emit},null,40,["option","rule","api","model-value","onChange","onEmitEvent"]))]),_:2},[e.footer!==!1?{name:"footer",fn:n.withCtx(()=>[n.createVNode(d,{onClick:e.close},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.formCreateInject.t("close")||"\u5173\u95ED"),1)]),_:1},8,["onClick"]),n.createVNode(d,{type:"primary",onClick:e.handleConfirm},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.formCreateInject.t("ok")||"\u786E\u5B9A"),1)]),_:1},8,["onClick"])]),key:"0"}:void 0]),1040,["fullscreen","modelValue"])}const mm=Te(IS,[["render",PS]]),MS=e=>e!==null&&typeof e=="object",LS=e=>e!=null;function Lc(e){if(!LS(e))return e;if(Array.isArray(e))return e.map(t=>Lc(t));if(MS(e)){const t={};return Object.keys(e).forEach(r=>{t[r]=Lc(e[r])}),t}retur
`}return mt%2&&He>0?$e.substring(0,$e.length-mt-1)+Array(mt+1).join("\u2580"):$e.substring(0,$e.length-1)}(W);D-=1,W=W===void 0?2*D:W;var Y,q,ee,oe,he=ie.getModuleCount()*D+2*W,Ae=W,Me=he-W,Le=Array(D+1).join("\u2588\u2588"),fe=Array(D+1).join(" "),ke="",we="";for(Y=0;Y<he;Y+=1){for(ee=Math.floor((Y-Ae)/D),we="",q=0;q<he;q+=1)oe=1,Ae<=q&&q<Me&&Ae<=Y&&Y<Me&&ie.isDark(ee,Math.floor((q-Ae)/D))&&(oe=0),we+=oe?Le:fe;for(ee=0;ee<D;ee+=1)ke+=we+`
`}return ke.substring(0,ke.length-1)},ie.renderTo2dContext=function(D,W){W=W||2;for(var Y=ie.getModuleCount(),q=0;q<Y;q++)for(var ee=0;ee<Y;ee++)D.fillStyle=ie.isDark(q,ee)?"black":"white",D.fillRect(q*W,ee*W,W,W)},ie};y.stringToBytes=(y.stringToBytesFuncs={default:function(H){for(var R=[],z=0;z<H.length;z+=1){var $=H.charCodeAt(z);R.push(255&$)}return R}}).default,y.createStringToBytes=function(H,R){var z=function(){for(var S=L(H),J=function(){var be=S.read();if(be==-1)throw"eof";return be},Q=0,G={};;){var ie=S.read();if(ie==-1)break;var X=J(),le=J()<<8|J();G[String.fromCharCode(ie<<8|X)]=le,Q+=1}if(Q!=R)throw Q+" != "+R;return G}(),$="?".charCodeAt(0);return function(S){for(var J=[],Q=0;Q<S.length;Q+=1){var G=S.charCodeAt(Q);if(G<128)J.push(G);else{var ie=z[S.charAt(Q)];typeof ie=="number"?(255&ie)==ie?J.push(ie):(J.push(ie>>>8),J.push(255&ie)):J.push($)}}return J}};var C,A,w,E,b,g={L:1,M:0,Q:3,H:2},_=(C=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],A=1335,w=7973,b=function(H){for(var R=0;H!=0;)R+=1,H>>>=1;return R},(E={}).getBCHTypeInfo=function(H){for(var R=H<<10;b(R)-b(A)>=0;)R^=A<<b(R)-b(A);return 21522^(H<<10|R)},E.getBCHTypeNumber=function(H){for(var R=H<<12;b(R)-b(w)>=0;)R^=w<<b(R)-b(w);return H<<12|R},E.getPatternPosition=function(H){return C[H-1]},E.getMaskFunction=function(H){switch(H){case 0:return function(R,z){return(R+z)%2==0};case 1:return function(R,z){return R%2==0};case 2:return function(R,z){return z%3==0};case 3:return function(R,z){return(R+z)%3==0};case 4:return function(R,z){return(Math.floor(R/2)+Math.floor(z/3))%2==0};case 5:return function(R,z){return R*z%2+R*z%3==0};case 6:return function(R,z){return(R*z%2+R*z%3)%2==0};case 7:return function(R,z){return(R*z%3+(R+z)%2)%2==0};default:throw"bad maskPattern:"+H}},E.getErrorCorrectPolynomial=function(H){for(var R=k([1],0),z=0;z<H;z+=1)R=R.multiply(k([1,x.gexp(z)],0));return R},E.getLengthInBits=function(H,R){if(1<=R&&R<10)switch(H){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+H}else if(R<27)switch(H){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+H}else{if(!(R<41))throw"type:"+R;switch(H){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+H}}},E.getLostPoint=function(H){for(var R=H.getModuleCount(),z=0,$=0;$<R;$+=1)for(var S=0;S<R;S+=1){for(var J=0,Q=H.isDark($,S),G=-1;G<=1;G+=1)if(!($+G<0||R<=$+G))for(var ie=-1;ie<=1;ie+=1)S+ie<0||R<=S+ie||G==0&&ie==0||Q==H.isDark($+G,S+ie)&&(J+=1);J>5&&(z+=3+J-5)}for($=0;$<R-1;$+=1)for(S=0;S<R-1;S+=1){var X=0;H.isDark($,S)&&(X+=1),H.isDark($+1,S)&&(X+=1),H.isDark($,S+1)&&(X+=1),H.isDark($+1,S+1)&&(X+=1),X!=0&&X!=4||(z+=3)}for($=0;$<R;$+=1)for(S=0;S<R-6;S+=1)H.isDark($,S)&&!H.isDark($,S+1)&&H.isDark($,S+2)&&H.isDark($,S+3)&&H.isDark($,S+4)&&!H.isDark($,S+5)&&H.isDark($,S+6)&&(z+=40);for(S=0;S<R;S+=1)for($=0;$<R-6;$+=1)H.isDark($,S)&&!H.isDark($+1,S)&&H.isDark($+2,S)&&H.isDark($+3,S)&&H.isDark($+4,S)&&!H.isDark($+5,S)&&H.isDark($+6,S)&&(z+=40);var le=0;for(S=0;S<R;S+=1)for($=0;$<R;$+=1)H.isDark($,S)&&(le+=1);return z+Math.abs(100*le/R/R-50)/5*10},E),x=function(){for(var H=new Array(256),R=new Array(256),z=0;z<8;z+=1)H[z]=1<<z;for(z=8;z<256;z+=1)H[z]=H[z-4]^H[z-5]^H[z-6]^H[z-8];for(z=0;z<255;z+=1)R[H[z]]=z;return{glog:function($){if($<1)throw"glog("+$+")";return R[$]},gexp:function($){for(;$<0;)$+=255;for(;$>=256;)$-=255;return H[$]}}}();function k(H,R){if(H.length===void 0)throw H.length+"/"+R;var z=function(){for(var S=0;S<H.length&&H[S]==0;)S+=
2025-05-27 15:27:24 +08:00
${new this._window.XMLSerializer().serializeToString(S)}`;return typeof Blob>"u"||this._options.jsdom?Buffer.from(Q):new Blob([Q],{type:J})}return new Promise(Q=>{const G=S;if("toBuffer"in G)if(J==="image/png")Q(G.toBuffer(J));else if(J==="image/jpeg")Q(G.toBuffer(J));else{if(J!=="application/pdf")throw Error("Unsupported extension");Q(G.toBuffer(J))}else"toBlob"in G&&G.toBlob(Q,J,1)})}async download($){if(!this._qr)throw"QR code is empty";if(typeof Blob>"u")throw"Cannot download in Node.js, call getRawData instead.";let S="png",J="qr";typeof $=="string"?(S=$,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof $=="object"&&$!==null&&($.name&&(J=$.name),$.extension&&(S=$.extension));const Q=await this._getElement(S);if(Q)if(S.toLowerCase()==="svg"){let G=new XMLSerializer().serializeToString(Q);G=`<?xml version="1.0" standalone="no"?>\r
2025-05-28 11:05:44 +08:00
`+G,u(`data:${U(S)};charset=utf-8,${encodeURIComponent(G)}`,`${J}.svg`)}else u(Q.toDataURL(U(S)),`${J}.${S}`)}}const R=H})(),l.default})())})(ag);const FT=x_(ag.exports),PT=n.defineComponent({name:"QrCodeBox",data(){return{qrcode:null}},props:{data:String,image:String,width:Number,height:Number,circleType:String,circleColor:String},methods:{},computed:{},components:{},watch:{$props:{handler(){const e={dotsOptions:{}};Object.keys(this.$props).forEach(t=>{this.$props[t]!=null&&this.$props[t]!==""&&(e[t]=this.$props[t])}),delete e.formCreateInject,e.circleType&&(e.dotsOptions.type=e.circleType),e.circleColor&&(e.dotsOptions.color=e.circleColor),delete e.circleColor,delete e.circleType,this.$nextTick(()=>{this.qrcode?this.qrcode.update(e):(this.qrcode=n.markRaw(new FT(e)),this.qrcode.append(this.$refs.qr))})},deep:!0,immediate:!0}}}),MT={class:"_fc-qrcode",ref:"qr"};function LT(e,t,r,o,i,l){return n.openBlock(),n.createElementBlock("div",MT,null,512)}const lg=Te(PT,[["render",LT]]),sj="",dj="",sg={date:"YYYY-MM-DD",month:"YYYY-MM",datetime:"YYYY-MM-DD HH:mm:ss",timerange:"HH:mm:ss",daterange:"YYYY-MM-DD",monthrange:"YYYY-MM",datetimerange:"YYYY-MM-DD HH:mm:ss",year:"YYYY"};function jT(e){return e/20+"em"}function zT(e){var t;!((t=e.wrap)!=null&&t.class)||(e.wrap.class==="fc-wrap-top"?(e.wrap.labelAlign="top",delete e.wrap.class):e.wrap.class==="fc-wrap-left"?(e.wrap.labelAlign="left",delete e.wrap.class):e.wrap.class==="fc-wrap-right"&&(e.wrap.labelAlign="right",delete e.wrap.class))}const dg=function(e,t,r,o){const i=o||{};return t.forEach(l=>{e.indexOf(l[r||"id"])>-1&&e.splice(e.indexOf(l[r||"id"]),1,l[i.label||"label"]||l.text),dt.trueArray(l[i.children||"children"])&&dg(e,l[i.children||"children"],r,o)}),e},UT=function(e,t){return t.forEach(r=>{e.indexOf(r.value)>-1&&(e[e.indexOf(r.value)]=r.label||r.text)}),e};function ku(e){if(e){if(!Array.isArray(e))return[e]}else return[];return e}function cg(e){Object.keys(jt).forEach(t=>{e.setFormula(t,jt[t])}),Sc(e),e.register("behavior",Dh),e.register("easySlots",Uo),e.extendApi(t=>({message(r){kb.showNotify({type:"warning",...r||{}})}})),e.setDriver("elm",{defaultPreview(t,r){let o=t.rule.value;const i=t.$render.vNode.h,l=t.type,d=t.$handle.subForm[t.id],c=t.prop.readMode;if(c===!1||c==="custom"||!t.input||t.rule.subForm||(Array.isArray(d)?d.length:d)||["fcGroup","fcSubForm","tableForm","stepForm","nestedTableForm","infiniteTableForm","upload","fcDialog","fcDrawer","fcPopup"].indexOf(t.trueType)>-1)return t.parser.render(r,t);if(["radio","select","checkbox"].indexOf(l)>-1)o=UT([...ku(o)],t.prop.props.options||t.prop.props.formCreateInject.options||[]).join(", ");else if(["timePicker","datePicker","slider"].indexOf(l)>-1)o=Array.isArray(o)?o.join(" - "):o;else if(l==="cascader")o=[...ku(o)],Array.isArray(o[0])||(o=[o]),o=o.map(u=>dg(u,t.prop.props.options||t.prop.props.formCreateInject.options||[],"value").join("/")).join(", ");else{if(l==="fcEditor"||c==="html")return i("div",{innerHTML:o});if(l==="uploader"||c==="image")return o=ku(o),i("div",{class:"_fc-upload"},o.map(function(u){return i("div",{class:"_fc-upload-preview"},[i("van-image",{src:u,fit:"cover"})])}));if(l==="signaturePad"&&o)return i("van-image",{src:o,fit:"cover",style:{height:"90px"}});(typeof o=="boolean"||l==="switch")&&(o=o?"\u662F":"\u5426")}return i("span",{class:"_fc-read-view"},[""+(o==null?"":o)])},updateWrap(t){var o,i;let r=(i=(o=t.prop)==null?void 0:o.wrap)==null?void 0:i.style;t.prop.col&&t.prop.col.span&&(t.prop.col.span=24),r&&(r=Array.isArray(r)?r:[r],r.forEach(l=>{delete l.marginBottom})),zT(t.prop)},updateOptions(t){var r,o,i;((r=t.form)==null?void 0:r.labelWidth)&&t.form.labelWidth.indexOf("px")>-1&&(t.form.labelWidth=jT(parseInt(t.form.labelWidth))),(o=t.form)!=null&&o.labelPosition&&(t.form.labelAlign=t.form.labelPosition,delete t.form.labelPosition),(i=t.form)!=null&&i.hideRequiredAsterisk&&(t.form.colon=t.form.hideRequiredAsterisk,delete t.form.hideRequiredAsterisk)},parsers:{inputNumber:{mergeProp(t){t.prop.component="vanStepper";const r=t.prop.props;r.decimalLength=r.precision,r.integer=
2025-05-20 11:03:25 +08:00
2025-05-24 17:29:32 +08:00
b`.split(/\n/).length!=3?function(a){for(var s=0,p=[],f=a.length;s<=f;){var v=a.indexOf(`
2025-05-28 11:05:44 +08:00
`,s);v==-1&&(v=a.length);var V=a.slice(s,a.charAt(v-1)=="\r"?v-1:v),P=V.indexOf("\r");P!=-1?(p.push(V.slice(0,P)),s+=P+1):(p.push(V),s=v+1)}return p}:function(a){return a.split(/\r\n?|\n/)},Ki=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch{return!1}}:function(a){var s;try{s=a.ownerDocument.selection.createRange()}catch{}return!s||s.parentElement()!=a?!1:s.compareEndPoints("StartToEnd",s)!=0},gi=function(){var a=R("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),vi=null;function _s(a){if(vi!=null)return vi;var s=H(a,R("span","x")),p=s.getBoundingClientRect(),f=$(s,0,1).getBoundingClientRect();return vi=Math.abs(p.left-f.left)>1}var ti={},Yi={};function Es(a,s){arguments.length>2&&(s.dependencies=Array.prototype.slice.call(arguments,2)),ti[a]=s}function co(a,s){Yi[a]=s}function Tn(a){if(typeof a=="string"&&Yi.hasOwnProperty(a))a=Yi[a];else if(a&&typeof a.name=="string"&&Yi.hasOwnProperty(a.name)){var s=Yi[a.name];typeof s=="string"&&(s={name:s}),a=fe(s,a),a.name=s.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Tn("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Tn("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Ti(a,s){s=Tn(s);var p=ti[s.name];if(!p)return Ti(a,"text/plain");var f=p(a,s);if(Qi.hasOwnProperty(s.name)){var v=Qi[s.name];for(var V in v)!v.hasOwnProperty(V)||(f.hasOwnProperty(V)&&(f["_"+V]=f[V]),f[V]=v[V])}if(f.name=s.name,s.helperType&&(f.helperType=s.helperType),s.modeProps)for(var P in s.modeProps)f[P]=s.modeProps[P];return f}var Qi={};function Ss(a,s){var p=Qi.hasOwnProperty(a)?Qi[a]:Qi[a]={};ce(s,p)}function Di(a,s){if(s===!0)return s;if(a.copyState)return a.copyState(s);var p={};for(var f in s){var v=s[f];v instanceof Array&&(v=v.concat([])),p[f]=v}return p}function Ji(a,s){for(var p;a.innerMode&&(p=a.innerMode(s),!(!p||p.mode==a));)s=p.state,a=p.mode;return p||{mode:a,state:s}}function ma(a,s,p){return a.startState?a.startState(s,p):!0}var Ft=function(a,s,p){this.pos=this.start=0,this.string=a,this.tabSize=s||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=p};Ft.prototype.eol=function(){return this.pos>=this.string.length},Ft.prototype.sol=function(){return this.pos==this.lineStart},Ft.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ft.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ft.prototype.eat=function(a){var s=this.string.charAt(this.pos),p;if(typeof a=="string"?p=s==a:p=s&&(a.test?a.test(s):a(s)),p)return++this.pos,s},Ft.prototype.eatWhile=function(a){for(var s=this.pos;this.eat(a););return this.pos>s},Ft.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Ft.prototype.skipToEnd=function(){this.pos=this.string.length},Ft.prototype.skipTo=function(a){var s=this.string.indexOf(a,this.pos);if(s>-1)return this.pos=s,!0},Ft.prototype.backUp=function(a){this.pos-=a},Ft.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=de(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?de(this.string,this.lineStart,this.tabSize):0)},Ft.prototype.indentation=function(){return de(this.string,null,this.tabSize)-(this.lineStart?de(this.string,this.lineStart,this.tabSize):0)},Ft.prototype.match=function(a,s,p){if(typeof a=="string"){var f=function(P){return p?P.toLowerCase():P},v=this.string.substr(this.pos,a.length);if(f(v)==f(a))return s!==!1&&(this.pos+=a.length),!0}else{var V=this.string.slice(this.pos).match(a);return V&&V.index>0?null:(V&&s!==!1&&(this.pos+=V[0].length),V)}},Ft.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ft.prototype.hideFirstChars=function(a,s){this.lineStart+=a;try{return s()}finally{this.lineStart-=a}},Ft.prototype.lookAhead=function(a){var s=this.lineOracle;return s&&s.lookAhead(a)},Ft.
`?(Ne=ne.appendChild(R("span",ve[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ne.setAttribute("cm-text",ve[0]),a.col+=1):(Ne=a.cm.options.specialCharPlaceholder(ve[0]),Ne.setAttribute("cm-text",ve[0]),u&&h<9?ne.appendChild(R("span",[Ne])):ne.appendChild(Ne),a.col+=1);a.map.push(a.pos,a.pos+1,Ne),a.pos++}}if(a.trailingSpace=j.charCodeAt(s.length-1)==32,p||f||v||Z||V||P){var Ue=p||"";f&&(Ue+=f),v&&(Ue+=v);var Fe=R("span",[ne],Ue,V);if(P)for(var Ge in P)P.hasOwnProperty(Ge)&&Ge!="style"&&Ge!="class"&&Fe.setAttribute(Ge,P[Ge]);return a.content.appendChild(Fe)}a.content.appendChild(ne)}}function a4(a,s){if(a.length>1&&!/ /.test(a))return a;for(var p=s,f="",v=0;v<a.length;v++){var V=a.charAt(v);V==" "&&p&&(v==a.length-1||a.charCodeAt(v+1)==32)&&(V="\xA0"),f+=V,p=V==" "}return f}function l4(a,s){return function(p,f,v,V,P,j,K){v=v?v+" cm-force-border":"cm-force-border";for(var Z=p.pos,ne=Z+f.length;;){for(var re=void 0,ve=0;ve<s.length&&(re=s[ve],!(re.to>Z&&re.from<=Z));ve++);if(re.to>=ne)return a(p,f,v,V,P,j,K);a(p,f.slice(0,re.to-Z),v,V,null,j,K),V=null,f=f.slice(re.to-Z),Z=re.to}}}function Hy(a,s,p,f){var v=!f&&p.widgetNode;v&&a.map.push(a.pos,a.pos+s,v),!f&&a.cm.display.input.needsContentAttribute&&(v||(v=a.content.appendChild(document.createElement("span"))),v.setAttribute("cm-marker",p.id)),v&&(a.cm.display.input.setUneditable(v),a.content.appendChild(v)),a.pos+=s,a.trailingSpace=!1}function s4(a,s,p){var f=a.markedSpans,v=a.text,V=0;if(!f){for(var P=1;P<p.length;P+=2)s.addToken(s,v.slice(V,V=p[P]),zy(p[P+1],s.cm.options));return}for(var j=v.length,K=0,Z=1,ne="",re,ve,me=0,Se,Ne,Ve,Ie,Ue;;){if(me==K){Se=Ne=Ve=ve="",Ue=null,Ie=null,me=1/0;for(var Fe=[],Ge=void 0,nt=0;nt<f.length;++nt){var qe=f[nt],pt=qe.marker;if(pt.type=="bookmark"&&qe.from==K&&pt.widgetNode)Fe.push(pt);else if(qe.from<=K&&(qe.to==null||qe.to>K||pt.collapsed&&qe.to==K&&qe.from==K)){if(qe.to!=null&&qe.to!=K&&me>qe.to&&(me=qe.to,Ne=""),pt.className&&(Se+=" "+pt.className),pt.css&&(ve=(ve?ve+";":"")+pt.css),pt.startStyle&&qe.from==K&&(Ve+=" "+pt.startStyle),pt.endStyle&&qe.to==me&&(Ge||(Ge=[])).push(pt.endStyle,qe.to),pt.title&&((Ue||(Ue={})).title=pt.title),pt.attributes)for(var Nt in pt.attributes)(Ue||(Ue={}))[Nt]=pt.attributes[Nt];pt.collapsed&&(!Ie||xf(Ie.marker,pt)<0)&&(Ie=qe)}else qe.from>K&&me>qe.from&&(me=qe.from)}if(Ge)for(var en=0;en<Ge.length;en+=2)Ge[en+1]==me&&(Ne+=" "+Ge[en]);if(!Ie||Ie.from==K)for(var $t=0;$t<Fe.length;++$t)Hy(s,0,Fe[$t]);if(Ie&&(Ie.from||0)==K){if(Hy(s,(Ie.to==null?j+1:Ie.to)-K,Ie.marker,Ie.from==null),Ie.to==null)return;Ie.to==K&&(Ie=!1)}}if(K>=j)break;for(var Vn=Math.min(j,me);;){if(ne){var wn=K+ne.length;if(!Ie){var Ut=wn>Vn?ne.slice(0,Vn-K):ne;s.addToken(s,Ut,re?re+Se:Se,Ve,K+Ut.length==me?Ne:"",ve,Ue)}if(wn>=Vn){ne=ne.slice(Vn-K),K=Vn;break}K=wn,Ve=""}ne=v.slice(V,V=p[Z++]),re=zy(p[Z++],s.cm.options)}}}function Wy(a,s,p){this.line=s,this.rest=q8(s),this.size=this.rest?wt(he(this.rest))-p+1:1,this.node=this.text=null,this.hidden=Xi(a,s)}function Vs(a,s,p){for(var f=[],v,V=s;V<p;V=v){var P=new Wy(a.doc,Je(a.doc,V),V);v=V+P.size,f.push(P)}return f}var po=null;function d4(a){po?po.ops.push(a):a.ownsGroup=po={ops:[a],delayedCallbacks:[]}}function c4(a){var s=a.delayedCallbacks,p=0;do{for(;p<s.length;p++)s[p].call(null);for(var f=0;f<a.ops.length;f++){var v=a.ops[f];if(v.cursorActivityHandlers)for(;v.cursorActivityCalled<v.cursorActivityHandlers.length;)v.cursorActivityHandlers[v.cursorActivityCalled++].call(null,v.cm)}}while(p<s.length)}function u4(a,s){var p=a.ownsGroup;if(!!p)try{c4(p)}finally{po=null,s(p)}}var ya=null;function Xt(a,s){var p=Xe(a,s);if(!!p.length){var f=Array.prototype.slice.call(arguments,2),v;po?v=po.delayedCallbacks:ya?v=ya:(v=ya=[],setTimeout(f4,0));for(var V=function(j){v.push(function(){return p[j].apply(null,f)})},P=0;P<p.length;++P)V(P)}}function f4(){var a=ya;ya=null;for(var s=0;s<a.length;++s)a[s]()}function Gy(a,s,p,f){for(var v=0;v<s.changes.length;v++){var V=s.changes[v];V=="text"?h4(a,s):V=="gutter"?Yy(a,s,p,f):V=="class"?Df(a,s):V=="widget"&&m4(a,s,f)}s.changes=null}function ba(a){return a
2025-05-26 10:41:15 +08:00
top: `+Ge+"px; width: "+(nt==null?K-Fe:nt)+`px;
2025-05-28 11:05:44 +08:00
height: `+(qe-Ge)+"px"))}function re(Fe,Ge,nt){var qe=Je(v,Fe),pt=qe.text.length,Nt,en;function $t(Ut,Cn){return Rs(a,ue(Fe,Ut),"div",qe,Cn)}function Vn(Ut,Cn,rn){var Yt=d0(a,qe,null,Ut),Ht=Cn=="ltr"==(rn=="after")?"left":"right",Pt=rn=="after"?Yt.begin:Yt.end-(/\s/.test(qe.text.charAt(Yt.end-1))?2:1);return $t(Pt,Ht)[Ht]}var wn=tt(qe,v.direction);return mt(wn,Ge||0,nt==null?pt:nt,function(Ut,Cn,rn,Yt){var Ht=rn=="ltr",Pt=$t(Ut,Ht?"left":"right"),_n=$t(Cn-1,Ht?"right":"left"),To=Ge==null&&Ut==0,or=nt==null&&Cn==pt,sn=Yt==0,_i=!wn||Yt==wn.length-1;if(_n.top-Pt.top<=3){var tn=(Z?To:or)&&sn,pp=(Z?or:To)&&_i,Fi=tn?j:(Ht?Pt:_n).left,kr=pp?K:(Ht?_n:Pt).right;ne(Fi,Pt.top,kr-Fi,Pt.bottom)}else{var Nr,pn,Do,hp;Ht?(Nr=Z&&To&&sn?j:Pt.left,pn=Z?K:Vn(Ut,rn,"before"),Do=Z?j:Vn(Cn,rn,"after"),hp=Z&&or&&_i?K:_n.right):(Nr=Z?Vn(Ut,rn,"before"):j,pn=!Z&&To&&sn?K:Pt.right,Do=!Z&&or&&_i?j:_n.left,hp=Z?Vn(Cn,rn,"after"):K),ne(Nr,Pt.top,pn-Nr,Pt.bottom),Pt.bottom<_n.top&&ne(j,Pt.bottom,null,_n.top),ne(Do,_n.top,hp-Do,_n.bottom)}(!Nt||Is(Pt,Nt)<0)&&(Nt=Pt),Is(_n,Nt)<0&&(Nt=_n),(!en||Is(Pt,en)<0)&&(en=Pt),Is(_n,en)<0&&(en=_n)}),{start:Nt,end:en}}var ve=s.from(),me=s.to();if(ve.line==me.line)re(ve.line,ve.ch,me.ch);else{var Se=Je(v,ve.line),Ne=Je(v,me.line),Ve=ni(Se)==ni(Ne),Ie=re(ve.line,ve.ch,Ve?Se.text.length+1:null).end,Ue=re(me.line,Ve?0:null,me.ch).start;Ve&&(Ie.top<Ue.top-2?(ne(Ie.right,Ie.top,null,Ie.bottom),ne(j,Ue.top,Ue.left,Ue.bottom)):ne(Ie.right,Ie.top,Ue.left-Ie.right,Ie.bottom)),Ie.bottom<Ue.top&&ne(j,Ie.bottom,null,Ue.top)}p.appendChild(V)}function zf(a){if(!!a.state.focused){var s=a.display;clearInterval(s.blinker);var p=!0;s.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?s.blinker=setInterval(function(){a.hasFocus()||vo(a),s.cursorDiv.style.visibility=(p=!p)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(s.cursorDiv.style.visibility="hidden")}}function p0(a){a.hasFocus()||(a.display.input.focus(),a.state.focused||Hf(a))}function Uf(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,a.state.focused&&vo(a))},100)}function Hf(a,s){a.state.delayingBlurEvent&&!a.state.draggingText&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(Qe(a,"focus",a,s),a.state.focused=!0,Q(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),m&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),zf(a))}function vo(a,s){a.state.delayingBlurEvent||(a.state.focused&&(Qe(a,"blur",a,s),a.state.focused=!1,L(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function Fs(a){for(var s=a.display,p=s.lineDiv.offsetTop,f=Math.max(0,s.scroller.getBoundingClientRect().top),v=s.lineDiv.getBoundingClientRect().top,V=0,P=0;P<s.view.length;P++){var j=s.view[P],K=a.options.lineWrapping,Z=void 0,ne=0;if(!j.hidden){if(v+=j.line.height,u&&h<8){var re=j.node.offsetTop+j.node.offsetHeight;Z=re-p,p=re}else{var ve=j.node.getBoundingClientRect();Z=ve.bottom-ve.top,!K&&j.text.firstChild&&(ne=j.text.firstChild.getBoundingClientRect().right-ve.left-1)}var me=j.line.height-Z;if((me>.005||me<-.005)&&(v<f&&(V-=me),Yn(j.line,Z),h0(j.line),j.rest))for(var Se=0;Se<j.rest.length;Se++)h0(j.rest[Se]);if(ne>a.display.sizerWidth){var Ne=Math.ceil(ne/go(a.display));Ne>a.display.maxLineLength&&(a.display.maxLineLength=Ne,a.display.maxLine=j.line,a.display.maxLineChanged=!0)}}}Math.abs(V)>2&&(s.scroller.scrollTop+=V)}function h0(a){if(a.widgets)for(var s=0;s<a.widgets.length;++s){var p=a.widgets[s],f=p.node.parentNode;f&&(p.height=f.offsetHeight)}}function Ps(a,s,p){var f=p&&p.top!=null?Math.max(0,p.top):a.scroller.scrollTop;f=Math.floor(f-Os(a));var v=p&&p.bottom!=null?p.bottom:f+a.wrapper.clientHeight,V=yi(s,f),P=yi(s,v);if(p&&p.ensure){var j=p.ensure.from.line,K=p.ensure.to.line;j<V?(V=j,P=yi(s,Bi(Je(s,j))+a.wrapper.clientHeight)):Math.min(K,s.last
2025-05-20 11:03:25 +08:00
top: `+(s.top-p.viewOffset-Os(a.display))+`px;
height: `+(s.bottom-s.top+wi(a)+p.barHeight)+`px;
2025-05-28 11:05:44 +08:00
left: `+s.left+"px; width: "+Math.max(2,s.right-s.left)+"px;");a.display.lineSpace.appendChild(P),P.scrollIntoView(v),a.display.lineSpace.removeChild(P)}}}function T4(a,s,p,f){f==null&&(f=0);var v;!a.options.lineWrapping&&s==p&&(p=s.sticky=="before"?ue(s.line,s.ch+1,"before"):s,s=s.ch?ue(s.line,s.sticky=="before"?s.ch-1:s.ch,"after"):s);for(var V=0;V<5;V++){var P=!1,j=ii(a,s),K=!p||p==s?j:ii(a,p);v={left:Math.min(j.left,K.left),top:Math.min(j.top,K.top)-f,right:Math.max(j.left,K.left),bottom:Math.max(j.bottom,K.bottom)+f};var Z=Wf(a,v),ne=a.doc.scrollTop,re=a.doc.scrollLeft;if(Z.scrollTop!=null&&(Sa(a,Z.scrollTop),Math.abs(a.doc.scrollTop-ne)>1&&(P=!0)),Z.scrollLeft!=null&&(Er(a,Z.scrollLeft),Math.abs(a.doc.scrollLeft-re)>1&&(P=!0)),!P)break}return v}function D4(a,s){var p=Wf(a,s);p.scrollTop!=null&&Sa(a,p.scrollTop),p.scrollLeft!=null&&Er(a,p.scrollLeft)}function Wf(a,s){var p=a.display,f=mo(a.display);s.top<0&&(s.top=0);var v=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:p.scroller.scrollTop,V=Of(a),P={};s.bottom-s.top>V&&(s.bottom=s.top+V);var j=a.doc.height+Vf(p),K=s.top<f,Z=s.bottom>j-f;if(s.top<v)P.scrollTop=K?0:s.top;else if(s.bottom>v+V){var ne=Math.min(s.top,(Z?j:s.bottom)-V);ne!=v&&(P.scrollTop=ne)}var re=a.options.fixedGutter?0:p.gutters.offsetWidth,ve=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:p.scroller.scrollLeft-re,me=br(a)-p.gutters.offsetWidth,Se=s.right-s.left>me;return Se&&(s.right=s.left+me),s.left<10?P.scrollLeft=0:s.left<ve?P.scrollLeft=Math.max(0,s.left+re-(Se?0:10)):s.right>me+ve-3&&(P.scrollLeft=s.right+(Se?0:10)-me),P}function Gf(a,s){s!=null&&(Ms(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+s)}function yo(a){Ms(a);var s=a.getCursor();a.curOp.scrollToPos={from:s,to:s,margin:a.options.cursorScrollMargin}}function Ea(a,s,p){(s!=null||p!=null)&&Ms(a),s!=null&&(a.curOp.scrollLeft=s),p!=null&&(a.curOp.scrollTop=p)}function V4(a,s){Ms(a),a.curOp.scrollToPos=s}function Ms(a){var s=a.curOp.scrollToPos;if(s){a.curOp.scrollToPos=null;var p=l0(a,s.from),f=l0(a,s.to);m0(a,p,f,s.margin)}}function m0(a,s,p,f){var v=Wf(a,{left:Math.min(s.left,p.left),top:Math.min(s.top,p.top)-f,right:Math.max(s.right,p.right),bottom:Math.max(s.bottom,p.bottom)+f});Ea(a,v.scrollLeft,v.scrollTop)}function Sa(a,s){Math.abs(a.doc.scrollTop-s)<2||(i||Yf(a,{top:s}),g0(a,s,!0),i&&Yf(a),ka(a,100))}function g0(a,s,p){s=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,s)),!(a.display.scroller.scrollTop==s&&!p)&&(a.doc.scrollTop=s,a.display.scrollbars.setScrollTop(s),a.display.scroller.scrollTop!=s&&(a.display.scroller.scrollTop=s))}function Er(a,s,p,f){s=Math.max(0,Math.min(s,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((p?s==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-s)<2)&&!f)&&(a.doc.scrollLeft=s,C0(a),a.display.scroller.scrollLeft!=s&&(a.display.scroller.scrollLeft=s),a.display.scrollbars.setScrollLeft(s))}function Aa(a){var s=a.display,p=s.gutters.offsetWidth,f=Math.round(a.doc.height+Vf(a.display));return{clientHeight:s.scroller.clientHeight,viewHeight:s.wrapper.clientHeight,scrollWidth:s.scroller.scrollWidth,clientWidth:s.scroller.clientWidth,viewWidth:s.wrapper.clientWidth,barLeft:a.options.fixedGutter?p:0,docHeight:f,scrollHeight:f+wi(a)+s.barHeight,nativeBarWidth:s.nativeBarWidth,gutterWidth:p}}var Sr=function(a,s,p){this.cm=p;var f=this.vert=R("div",[R("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),v=this.horiz=R("div",[R("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");f.tabIndex=v.tabIndex=-1,a(f),a(v),Ce(f,"scroll",function(){f.clientHeight&&s(f.scrollTop,"vertical")}),Ce(v,"scroll",function(){v.clientWidth&&s(v.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,u&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Sr.prototype.update=function(a){var s=a.scrollWidth>a.clientWidth+1,p=a.scrollHeight>a.clientHeight+1,f=a.nativeBarWidth;if(p){this.vert.style.display="block",this.vert.style.bottom=s?f+"px":"0";var v=a.viewHeight-(s?f:0);this
`},setDirection:qt(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(s){return s.order=null}),this.cm&&K4(this.cm))})}),bn.prototype.eachLine=bn.prototype.iter;var Z0=0;function a5(a){var s=this;if(q0(s),!(ct(s,a)||Ri(s.display,a))){bt(a),u&&(Z0=+new Date);var p=Cr(s,a,!0),f=a.dataTransfer.files;if(!(!p||s.isReadOnly()))if(f&&f.length&&window.FileReader&&window.File)for(var v=f.length,V=Array(v),P=0,j=function(){++P==v&&Zt(s,function(){p=at(s.doc,p);var me={from:p,to:p,text:s.doc.splitLines(V.filter(function(Se){return Se!=null}).join(s.doc.lineSeparator())),origin:"paste"};_o(s.doc,me),F0(s.doc,er(at(s.doc,p),at(s.doc,tr(me))))})()},K=function(me,Se){if(s.options.allowDropFileTypes&&se(s.options.allowDropFileTypes,me.type)==-1){j();return}var Ne=new FileReader;Ne.onerror=function(){return j()},Ne.onload=function(){var Ve=Ne.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ve)){j();return}V[Se]=Ve,j()},Ne.readAsText(me)},Z=0;Z<f.length;Z++)K(f[Z],Z);else{if(s.state.draggingText&&s.doc.sel.contains(p)>-1){s.state.draggingText(a),setTimeout(function(){return s.display.input.focus()},20);return}try{var ne=a.dataTransfer.getData("Text");if(ne){var re;if(s.state.draggingText&&!s.state.draggingText.copy&&(re=s.listSelections()),Ws(s.doc,er(p,p)),re)for(var ve=0;ve<re.length;++ve)Eo(s.doc,"",re[ve].anchor,re[ve].head,"drag");s.replaceSelection(ne,"around","paste"),s.display.input.focus()}}catch{}}}}function l5(a,s){if(u&&(!a.state.draggingText||+new Date-Z0<100)){ei(s);return}if(!(ct(a,s)||Ri(a.display,s))&&(s.dataTransfer.setData("Text",a.getSelection()),s.dataTransfer.effectAllowed="copyMove",s.dataTransfer.setDragImage&&!E)){var p=R("img",null,null,"position: fixed; left: 0; top: 0;");p.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",w&&(p.width=p.height=1,a.display.wrapper.appendChild(p),p._top=p.offsetTop),s.dataTransfer.setDragImage(p,0,0),w&&p.parentNode.removeChild(p)}}function s5(a,s){var p=Cr(a,s);if(!!p){var f=document.createDocumentFragment();jf(a,p,f),a.display.dragCursor||(a.display.dragCursor=R("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),H(a.display.dragCursor,f)}}function q0(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function eb(a){if(!!document.getElementsByClassName){for(var s=document.getElementsByClassName("CodeMirror"),p=[],f=0;f<s.length;f++){var v=s[f].CodeMirror;v&&p.push(v)}p.length&&p[0].operation(function(){for(var V=0;V<p.length;V++)a(p[V])})}}var tb=!1;function d5(){tb||(c5(),tb=!0)}function c5(){var a;Ce(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,eb(u5)},100))}),Ce(window,"blur",function(){return eb(vo)})}function u5(a){var s=a.display;s.cachedCharWidth=s.cachedTextHeight=s.cachedPaddingH=null,s.scrollbarsClipped=!1,a.setSize()}for(var rr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ia=0;Ia<10;Ia++)rr[Ia+48]=rr[Ia+96]=String(Ia);for(var Ys=65;Ys<=90;Ys++)rr[Ys]=String.fromCharCode(Ys);for(var Fa=1;Fa<=12;Fa++)rr[Fa+111]=rr[Fa+63235]="F"+Fa;var Ii={};Ii.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ii.pcDefault={"Ctrl-A":"selectAl
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function ob(a,s){var p=Je(a.doc,s),f=ni(p);return f!=p&&(s=wt(f)),ap(!0,a,f,s,1)}function m5(a,s){var p=Je(a.doc,s),f=Z8(p);return f!=p&&(s=wt(f)),ap(!0,a,p,s,-1)}function ab(a,s){var p=ob(a,s.line),f=Je(a.doc,p.line),v=tt(f,a.doc.direction);if(!v||v[0].level==0){var V=Math.max(p.ch,f.text.search(/\S/)),P=s.line==p.line&&s.ch<=V&&s.ch;return ue(p.line,P?0:V,p.sticky)}return p}function Js(a,s,p){if(typeof s=="string"&&(s=Pa[s],!s))return!1;a.display.input.ensurePolled();var f=a.display.shift,v=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),p&&(a.display.shift=!1),v=s(a)!=ye}finally{a.display.shift=f,a.state.suppressEdits=!1}return v}function g5(a,s,p){for(var f=0;f<a.state.keyMaps.length;f++){var v=Ao(s,a.state.keyMaps[f],p,a);if(v)return v}return a.options.extraKeys&&Ao(s,a.options.extraKeys,p,a)||Ao(s,a.options.keyMap,p,a)}var v5=new pe;function Ma(a,s,p,f){var v=a.state.keySeq;if(v){if(nb(s))return"handled";if(/\'$/.test(s)?a.state.keySeq=null:v5.set(50,function(){a.state.keySeq==v&&(a.state.keySeq=null,a.display.input.reset())}),lb(a,v+" "+s,p,f))return!0}return lb(a,s,p,f)}function lb(a,s,p,f){var v=g5(a,s,f);return v=="multi"&&(a.state.keySeq=s),v=="handled"&&Xt(a,"keyHandled",a,s,p),(v=="handled"||v=="multi")&&(bt(p),zf(a)),!!v}function sb(a,s){var p=rb(s,!0);return p?s.shiftKey&&!a.state.keySeq?Ma(a,"Shift-"+p,s,function(f){return Js(a,f,!0)})||Ma(a,p,s,function(f){if(typeof f=="string"?/^go[A-Z]/.test(f):f.motion)return Js(a,f)}):Ma(a,p,s,function(f){return Js(a,f)}):!1}function y5(a,s,p){return Ma(a,"'"+p+"'",s,function(f){return Js(a,f,!0)})}var lp=null;function db(a){var s=this;if(!(a.target&&a.target!=s.display.input.getField())&&(s.curOp.focus=J(X(s)),!ct(s,a))){u&&h<11&&a.keyCode==27&&(a.returnValue=!1);var p=a.keyCode;s.display.shift=p==16||a.shiftKey;var f=sb(s,a);w&&(lp=f?p:null,!f&&p==88&&!gi&&(T?a.metaKey:a.ctrlKey)&&s.replaceSelection("",null,"cut")),i&&!T&&!f&&p==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),p==18&&!/\bCodeMirror-crosshair\b/.test(s.display.lineDiv.className)&&b5(s)}}function b5(a){var s=a.display.lineDiv;Q(s,"CodeMirror-crosshair");function p(f){(f.keyCode==18||!f.altKey)&&(L(s,"CodeMirror-crosshair"),Ye(document,"keyup",p),Ye(document,"mouseover",p))}Ce(document,"keyup",p),Ce(document,"mouseover",p)}function cb(a){a.keyCode==16&&(this.doc.sel.shift=!1),ct(this,a)}function ub(a){var s=this;if(!(a.target&&a.target!=s.display.input.getField())&&!(Ri(s.display,a)||ct(s,a)||a.ctrlKey&&!a.altKey||T&&a.metaKey)){var p=a.keyCode,f=a.charCode;if(w&&p==lp){lp=null,bt(a);return}if(!(w&&(!a.which||a.which<10)&&sb(s,a))){var v=String.fromCharCode(f==null?p:f);v!="\b"&&(y5(s,a,v)||s.display.input.onKeyPress(a))}}}var w5=400,sp=function(a,s,p){this.time=a,this.pos=s,this.button=p};sp.prototype.compare=function(a,s,p){return this.time+w5>a&&Ee(s,this.pos)==0&&p==this.button};var La,ja;function C5(a,s){var p=+new Date;return ja&&ja.compare(p,a,s)?(La=ja=null,"triple"):La&&La.compare(p,a,s)?(ja=new sp(p,a,s),La=null,"double"):(La=new sp(p,a,s),ja=null,"single")}function fb(a){var s=this,p=s.display;if(!(ct(s,a)||p.activeTouch&&p.input.supportsTouch())){if(p.input.ensurePolled(),p.shift=a.shiftKey,Ri(p,a)){m||(p.scroller.draggable=!1,setTimeout(function(){return p.scroller.draggable=!0},100));return}if(!dp(s,a)){var f=Cr(s,a),v=pa(a),V=f?C5(f,v):"single";le(s).focus(),v==1&&s.state.selectingText&&s.state.selectingText(a),!(f&&_5(s,v,f,V,a))&&(v==1?f?S5(s,f,V,a):vn(a)==p.scroller&&bt(a):v==2?(f&&Hs(s.doc,f),setTimeout(function(){return p.input.focus()},20)):v==3&&(N?s.display.input.onContextMenu(a):Uf(s)))}}}function _5(a,s,p,f,v){var V="Click";return f=="double"?V="Double"+V:f=="triple"&&(V="Triple"+V),V=(s==1?"Left":s==2?"Middle":"Right")+V,Ma(a,ib(V,v),v,function(P){if(typeof P=="string"&&(P=Pa[P]),!P)return!1;var j=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),j=P(a,p)!=ye}finally{a.state.suppressEdits=!1}return j})}function E5(a,s,p){var f=a.getOption("configureMouse"),v=f?f(a,s,p):{};if(v
`)==s){if(f.ranges.length%oi.text.length==0){Z=[];for(var ne=0;ne<oi.text.length;ne++)Z.push(V.splitLines(oi.text[ne]))}}else K.length==f.ranges.length&&a.options.pasteLinesPerSelection&&(Z=Ae(K,function(Ie){return[Ie]}));for(var re=a.curOp.updateInput,ve=f.ranges.length-1;ve>=0;ve--){var me=f.ranges[ve],Se=me.from(),Ne=me.to();me.empty()&&(p&&p>0?Se=ue(Se.line,Se.ch-p):a.state.overwrite&&!j?Ne=ue(Ne.line,Math.min(Je(V,Ne.line).text.length,Ne.ch+he(K).length)):j&&oi&&oi.lineWise&&oi.text.join(`
2025-05-20 11:03:25 +08:00
`)==K.join(`
2025-05-28 11:05:44 +08:00
`)&&(Se=Ne=ue(Se.line,0)));var Ve={from:Se,to:Ne,text:Z?Z[ve%Z.length]:K,origin:v||(j?"paste":a.state.cutIncoming>P?"cut":"+input")};_o(a.doc,Ve),Xt(a,"inputRead",a,Ve)}s&&!j&&bb(a,s),yo(a),a.curOp.updateInput<2&&(a.curOp.updateInput=re),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function yb(a,s){var p=a.clipboardData&&a.clipboardData.getData("Text");if(p)return a.preventDefault(),!s.isReadOnly()&&!s.options.disableInput&&s.hasFocus()&&Dn(s,function(){return up(s,p,0,null,"paste")}),!0}function bb(a,s){if(!(!a.options.electricChars||!a.options.smartIndent))for(var p=a.doc.sel,f=p.ranges.length-1;f>=0;f--){var v=p.ranges[f];if(!(v.head.ch>100||f&&p.ranges[f-1].head.line==v.head.line)){var V=a.getModeAt(v.head),P=!1;if(V.electricChars){for(var j=0;j<V.electricChars.length;j++)if(s.indexOf(V.electricChars.charAt(j))>-1){P=za(a,v.head.line,"smart");break}}else V.electricInput&&V.electricInput.test(Je(a.doc,v.head.line).text.slice(0,v.head.ch))&&(P=za(a,v.head.line,"smart"));P&&Xt(a,"electricInput",a,v.head.line)}}}function wb(a){for(var s=[],p=[],f=0;f<a.doc.sel.ranges.length;f++){var v=a.doc.sel.ranges[f].head.line,V={anchor:ue(v,0),head:ue(v+1,0)};p.push(V),s.push(a.getRange(V.anchor,V.head))}return{text:s,ranges:p}}function Cb(a,s,p,f){a.setAttribute("autocorrect",p?"":"off"),a.setAttribute("autocapitalize",f?"":"off"),a.setAttribute("spellcheck",!!s)}function _b(){var a=R("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),s=R("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return m?a.style.width="1000px":a.setAttribute("wrap","off"),_&&(a.style.border="1px solid black"),Cb(a),s}function B5(a){var s=a.optionHandlers,p=a.helpers={};a.prototype={constructor:a,focus:function(){le(this).focus(),this.display.input.focus()},setOption:function(f,v){var V=this.options,P=V[f];V[f]==v&&f!="mode"||(V[f]=v,s.hasOwnProperty(f)&&Zt(this,s[f])(this,v,P),Qe(this,"optionChange",this,f))},getOption:function(f){return this.options[f]},getDoc:function(){return this.doc},addKeyMap:function(f,v){this.state.keyMaps[v?"push":"unshift"](Qs(f))},removeKeyMap:function(f){for(var v=this.state.keyMaps,V=0;V<v.length;++V)if(v[V]==f||v[V].name==f)return v.splice(V,1),!0},addOverlay:fn(function(f,v){var V=f.token?f:a.getMode(this.options,f);if(V.startState)throw new Error("Overlays may not be stateful.");Me(this.state.overlays,{mode:V,modeSpec:f,opaque:v&&v.opaque,priority:v&&v.priority||0},function(P){return P.priority}),this.state.modeGen++,yn(this)}),removeOverlay:fn(function(f){for(var v=this.state.overlays,V=0;V<v.length;++V){var P=v[V].modeSpec;if(P==f||typeof f=="string"&&P.name==f){v.splice(V,1),this.state.modeGen++,yn(this);return}}}),indentLine:fn(function(f,v,V){typeof v!="string"&&typeof v!="number"&&(v==null?v=this.options.smartIndent?"smart":"prev":v=v?"add":"subtract"),te(this.doc,f)&&za(this,f,v,V)}),indentSelection:fn(function(f){for(var v=this.doc.sel.ranges,V=-1,P=0;P<v.length;P++){var j=v[P];if(j.empty())j.head.line>V&&(za(this,j.head.line,f,!0),V=j.head.line,P==this.doc.sel.primIndex&&yo(this));else{var K=j.from(),Z=j.to(),ne=Math.max(V,K.line);V=Math.min(this.lastLine(),Z.line-(Z.ch?0:1))+1;for(var re=ne;re<V;++re)za(this,re,f);var ve=this.doc.sel.ranges;K.ch==0&&v.length==ve.length&&ve[P].from().ch>0&&ip(this.doc,P,new Ct(K,ve[P].to()),D)}}}),getTokenAt:function(f,v){return Vy(this,f,v)},getLineTokens:function(f,v){return Vy(this,ue(f),v,!0)},getTokenTypeAt:function(f){f=at(this.doc,f);var v=Ny(this,Je(this.doc,f.line)),V=0,P=(v.length-1)/2,j=f.ch,K;if(j==0)K=v[2];else for(;;){var Z=V+P>>1;if((Z?v[Z*2-1]:0)>=j)P=Z;else if(v[Z*2+1]<j)V=Z+1;else{K=v[Z*2+2];break}}var ne=K?K.indexOf("overlay "):-1;return ne<0?K:ne==0?null:K.slice(0,ne-1)},getModeAt:function(f){var v=this.doc.mode;return v.innerMode?a.innerMode(v,this.getTokenAt(f).state).mode:v},getHelper:function(f,v){return this.getHelpers(f,v)[0]},getHelpers:function(f,v){var V=[];if(!p.hasOwnProperty(v))return V;var P=p[v],j=this.getModeAt(f);if(typeof
2025-05-26 10:41:15 +08:00
`,Ve=He(Ne,me)?"w":ve&&Ne==`
2025-05-28 11:05:44 +08:00
`?"n":!ve||/\s/.test(Ne)?null:"p";if(ve&&!Se&&!Ve&&(Ve="s"),re&&re!=Ve){p<0&&(p=1,ne(),s.sticky="after");break}if(Ve&&(re=Ve),p>0&&!ne(!Se))break}var Ie=Gs(a,s,V,P,!0);return ot(V,Ie)&&(Ie.hitSide=!0),Ie}function Eb(a,s,p,f){var v=a.doc,V=s.left,P;if(f=="page"){var j=Math.min(a.display.wrapper.clientHeight,le(a).innerHeight||v(a).documentElement.clientHeight),K=Math.max(j-.5*mo(a.display),3);P=(p>0?s.bottom:s.top)+p*K}else f=="line"&&(P=p>0?s.bottom+3:s.top-3);for(var Z;Z=If(a,V,P),!!Z.outside;){if(p<0?P<=0:P>=v.height){Z.hitSide=!0;break}P+=p*5}return Z}var St=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new pe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};St.prototype.init=function(a){var s=this,p=this,f=p.cm,v=p.div=a.lineDiv;v.contentEditable=!0,Cb(v,f.options.spellcheck,f.options.autocorrect,f.options.autocapitalize);function V(j){for(var K=j.target;K;K=K.parentNode){if(K==v)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(K.className))break}return!1}Ce(v,"paste",function(j){!V(j)||ct(f,j)||yb(j,f)||h<=11&&setTimeout(Zt(f,function(){return s.updateFromDOM()}),20)}),Ce(v,"compositionstart",function(j){s.composing={data:j.data,done:!1}}),Ce(v,"compositionupdate",function(j){s.composing||(s.composing={data:j.data,done:!1})}),Ce(v,"compositionend",function(j){s.composing&&(j.data!=s.composing.data&&s.readFromDOMSoon(),s.composing.done=!0)}),Ce(v,"touchstart",function(){return p.forceCompositionEnd()}),Ce(v,"input",function(){s.composing||s.readFromDOMSoon()});function P(j){if(!(!V(j)||ct(f,j))){if(f.somethingSelected())Zs({lineWise:!1,text:f.getSelections()}),j.type=="cut"&&f.replaceSelection("",null,"cut");else if(f.options.lineWiseCopyCut){var K=wb(f);Zs({lineWise:!0,text:K.text}),j.type=="cut"&&f.operation(function(){f.setSelections(K.ranges,0,D),f.replaceSelection("",null,"cut")})}else return;if(j.clipboardData){j.clipboardData.clearData();var Z=oi.text.join(`
2025-05-27 15:27:24 +08:00
`);if(j.clipboardData.setData("Text",Z),j.clipboardData.getData("Text")==Z){j.preventDefault();return}}var ne=_b(),re=ne.firstChild;f.display.lineSpace.insertBefore(ne,f.display.lineSpace.firstChild),re.value=oi.text.join(`
2025-05-28 11:05:44 +08:00
`);var ve=J(v.ownerDocument);ie(re),setTimeout(function(){f.display.lineSpace.removeChild(ne),ve.focus(),ve==v&&p.showPrimarySelection()},50)}}Ce(v,"copy",P),Ce(v,"cut",P)},St.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},St.prototype.prepareSelection=function(){var a=f0(this.cm,!1);return a.focus=J(this.div.ownerDocument)==this.div,a},St.prototype.showSelection=function(a,s){!a||!this.cm.display.view.length||((a.focus||s)&&this.showPrimarySelection(),this.showMultipleSelections(a))},St.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},St.prototype.showPrimarySelection=function(){var a=this.getSelection(),s=this.cm,p=s.doc.sel.primary(),f=p.from(),v=p.to();if(s.display.viewTo==s.display.viewFrom||f.line>=s.display.viewTo||v.line<s.display.viewFrom){a.removeAllRanges();return}var V=qs(s,a.anchorNode,a.anchorOffset),P=qs(s,a.focusNode,a.focusOffset);if(!(V&&!V.bad&&P&&!P.bad&&Ee(Kt(V,P),f)==0&&Ee(yt(V,P),v)==0)){var j=s.display.view,K=f.line>=s.display.viewFrom&&Sb(s,f)||{node:j[0].measure.map[2],offset:0},Z=v.line<s.display.viewTo&&Sb(s,v);if(!Z){var ne=j[j.length-1].measure,re=ne.maps?ne.maps[ne.maps.length-1]:ne.map;Z={node:re[re.length-1],offset:re[re.length-2]-re[re.length-3]}}if(!K||!Z){a.removeAllRanges();return}var ve=a.rangeCount&&a.getRangeAt(0),me;try{me=$(K.node,K.offset,Z.offset,Z.node)}catch{}me&&(!i&&s.state.focused?(a.collapse(K.node,K.offset),me.collapsed||(a.removeAllRanges(),a.addRange(me))):(a.removeAllRanges(),a.addRange(me)),ve&&a.anchorNode==null?a.addRange(ve):i&&this.startGracePeriod()),this.rememberSelection()}},St.prototype.startGracePeriod=function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){return a.cm.curOp.selectionChanged=!0})},20)},St.prototype.showMultipleSelections=function(a){H(this.cm.display.cursorDiv,a.cursors),H(this.cm.display.selectionDiv,a.selection)},St.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},St.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var s=a.getRangeAt(0).commonAncestorContainer;return S(this.div,s)},St.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||J(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},St.prototype.blur=function(){this.div.blur()},St.prototype.getField=function(){return this.div},St.prototype.supportsTouch=function(){return!0},St.prototype.receivedFocus=function(){var a=this,s=this;this.selectionInEditor()?setTimeout(function(){return a.pollSelection()},20):Dn(this.cm,function(){return s.cm.curOp.selectionChanged=!0});function p(){s.cm.state.focused&&(s.pollSelection(),s.polling.set(s.cm.options.pollInterval,p))}this.polling.set(this.cm.options.pollInterval,p)},St.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},St.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),s=this.cm;if(x&&C&&this.cm.display.gutterSpecs.length&&R5(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var p=qs(s,a.anchorNode,a.anchorOffset),f=qs(s,a.focusNode,a.focusOffset);p&&f&&Dn(s,function(){ln(s.doc,er(p,f),D),(p.bad||f.bad)&&(s.curOp.selectionChanged=!0)})}}},St.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,s=a.display,p=a.doc.sel.primary(),f=p.from(),v=p.to();if(f.ch==0&&f.line>a.firstLine()&&(f=ue(f.li
`),ie(v))}else return;P.type=="cut"&&(f.state.cutIncoming=+new Date)}}Ce(v,"cut",V),Ce(v,"copy",V),Ce(a.scroller,"paste",function(P){if(!(Ri(a,P)||ct(f,P))){if(!v.dispatchEvent){f.state.pasteIncoming=+new Date,p.focus();return}var j=new Event("paste");j.clipboardData=P.clipboardData,v.dispatchEvent(j)}}),Ce(a.lineSpace,"selectstart",function(P){Ri(a,P)||bt(P)}),Ce(v,"compositionstart",function(){var P=f.getCursor("from");p.composing&&p.composing.range.clear(),p.composing={start:P,range:f.markText(P,f.getCursor("to"),{className:"CodeMirror-composing"})}}),Ce(v,"compositionend",function(){p.composing&&(p.poll(),p.composing.range.clear(),p.composing=null)})},zt.prototype.createField=function(a){this.wrapper=_b(),this.textarea=this.wrapper.firstChild},zt.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},zt.prototype.prepareSelection=function(){var a=this.cm,s=a.display,p=a.doc,f=f0(a);if(a.options.moveInputWithCursor){var v=ii(a,p.sel.primary().head,"div"),V=s.wrapper.getBoundingClientRect(),P=s.lineDiv.getBoundingClientRect();f.teTop=Math.max(0,Math.min(s.wrapper.clientHeight-10,v.top+P.top-V.top)),f.teLeft=Math.max(0,Math.min(s.wrapper.clientWidth-10,v.left+P.left-V.left))}return f},zt.prototype.showSelection=function(a){var s=this.cm,p=s.display;H(p.cursorDiv,a.cursors),H(p.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},zt.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var s=this.cm;if(s.somethingSelected()){this.prevInput="";var p=s.getSelection();this.textarea.value=p,s.state.focused&&ie(this.textarea),u&&h>=9&&(this.hasSelection=p)}else a||(this.prevInput=this.textarea.value="",u&&h>=9&&(this.hasSelection=null))}},zt.prototype.getField=function(){return this.textarea},zt.prototype.supportsTouch=function(){return!1},zt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!k||J(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch{}},zt.prototype.blur=function(){this.textarea.blur()},zt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},zt.prototype.receivedFocus=function(){this.slowPoll()},zt.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},zt.prototype.fastPoll=function(){var a=!1,s=this;s.pollingFast=!0;function p(){var f=s.poll();!f&&!a?(a=!0,s.polling.set(60,p)):(s.pollingFast=!1,s.slowPoll())}s.polling.set(20,p)},zt.prototype.poll=function(){var a=this,s=this.cm,p=this.textarea,f=this.prevInput;if(this.contextMenuPending||!s.state.focused||Ki(p)&&!f&&!this.composing||s.isReadOnly()||s.options.disableInput||s.state.keySeq)return!1;var v=p.value;if(v==f&&!s.somethingSelected())return!1;if(u&&h>=9&&this.hasSelection===v||T&&/[\uf700-\uf7ff]/.test(v))return s.display.input.reset(),!1;if(s.doc.sel==s.display.selForContextMenu){var V=v.charCodeAt(0);if(V==8203&&!f&&(f="\u200B"),V==8666)return this.reset(),this.cm.execCommand("undo")}for(var P=0,j=Math.min(f.length,v.length);P<j&&f.charCodeAt(P)==v.charCodeAt(P);)++P;return Dn(s,function(){up(s,v.slice(P),f.length-P,null,a.composing?"*compose":null),v.length>1e3||v.indexOf(`
`)>-1?p.value=a.prevInput="":a.prevInput=v,a.composing&&(a.composing.range.clear(),a.composing.range=s.markText(a.composing.start,s.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},zt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},zt.prototype.onKeyPress=function(){u&&h>=9&&(this.hasSelection=null),this.fastPoll()},zt.prototype.onContextMenu=function(a){var s=this,p=s.cm,f=p.display,v=s.textarea;s.contextMenuPending&&s.contextMenuPending();var V=Cr(p,a),P=f.scroller.scrollTop;if(!V||w)return;var j=p.options.resetSelectionOnContextMenu;j&&p.doc.sel.contains(V)==-1&&Zt(p,ln)(p.doc,er(V),D);var K=v.style.cssText,Z=s.wrapper.style.cssText,ne=s.wrapper.offsetParent.getBoundingClientRect();s.wrapper.style.cssText="position: static",v.style.cssText=`position: absolute; width: 30px; height: 30px;
2025-05-26 10:41:15 +08:00
top: `+(a.clientY-ne.top-5)+"px; left: "+(a.clientX-ne.left-5)+`px;
2025-05-20 11:03:25 +08:00
z-index: 1000; background: `+(u?"rgba(255, 255, 255, .05)":"transparent")+`;
2025-05-28 11:05:44 +08:00
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var re;m&&(re=v.ownerDocument.defaultView.scrollY),f.input.focus(),m&&v.ownerDocument.defaultView.scrollTo(null,re),f.input.reset(),p.somethingSelected()||(v.value=s.prevInput=" "),s.contextMenuPending=me,f.selForContextMenu=p.doc.sel,clearTimeout(f.detectingSelectAll);function ve(){if(v.selectionStart!=null){var Ne=p.somethingSelected(),Ve="\u200B"+(Ne?v.value:"");v.value="\u21DA",v.value=Ve,s.prevInput=Ne?"":"\u200B",v.selectionStart=1,v.selectionEnd=Ve.length,f.selForContextMenu=p.doc.sel}}function me(){if(s.contextMenuPending==me&&(s.contextMenuPending=!1,s.wrapper.style.cssText=Z,v.style.cssText=K,u&&h<9&&f.scrollbars.setScrollTop(f.scroller.scrollTop=P),v.selectionStart!=null)){(!u||u&&h<9)&&ve();var Ne=0,Ve=function(){f.selForContextMenu==p.doc.sel&&v.selectionStart==0&&v.selectionEnd>0&&s.prevInput=="\u200B"?Zt(p,z0)(p):Ne++<10?f.detectingSelectAll=setTimeout(Ve,500):(f.selForContextMenu=null,f.input.reset())};f.detectingSelectAll=setTimeout(Ve,200)}}if(u&&h>=9&&ve(),N){ei(a);var Se=function(){Ye(window,"mouseup",Se),setTimeout(me,20)};Ce(window,"mouseup",Se)}else setTimeout(me,50)},zt.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},zt.prototype.setUneditable=function(){},zt.prototype.needsContentAttribute=!1;function F5(a,s){if(s=s?ce(s):{},s.value=a.value,!s.tabindex&&a.tabIndex&&(s.tabindex=a.tabIndex),!s.placeholder&&a.placeholder&&(s.placeholder=a.placeholder),s.autofocus==null){var p=J(a.ownerDocument);s.autofocus=p==a||a.getAttribute("autofocus")!=null&&p==document.body}function f(){a.value=j.getValue()}var v;if(a.form&&(Ce(a.form,"submit",f),!s.leaveSubmitMethodAlone)){var V=a.form;v=V.submit;try{var P=V.submit=function(){f(),V.submit=v,V.submit(),V.submit=P}}catch{}}s.finishInit=function(K){K.save=f,K.getTextArea=function(){return a},K.toTextArea=function(){K.toTextArea=isNaN,f(),a.parentNode.removeChild(K.getWrapperElement()),a.style.display="",a.form&&(Ye(a.form,"submit",f),!s.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=v))}},a.style.display="none";var j=Ot(function(K){return a.parentNode.insertBefore(K,a.nextSibling)},s);return j}function P5(a){a.off=Ye,a.on=Ce,a.wheelEventPixels=W4,a.Doc=bn,a.splitLines=ha,a.countColumn=de,a.findColumn=q,a.isWordChar=we,a.Pass=ye,a.signal=Qe,a.Line=fo,a.changeEnd=tr,a.scrollbarModel=y0,a.Pos=ue,a.cmpPos=Ee,a.modes=ti,a.mimeModes=Yi,a.resolveMode=Tn,a.getMode=Ti,a.modeExtensions=Qi,a.extendMode=Ss,a.copyState=Di,a.startState=ma,a.innerMode=Ji,a.commands=Pa,a.keyMap=Ii,a.keyName=rb,a.isModifierKey=nb,a.lookupKey=Ao,a.normalizeKeyMap=p5,a.StringStream=Ft,a.SharedTextMarker=$a,a.TextMarker=ir,a.LineWidget=Ra,a.e_preventDefault=bt,a.e_stopPropagation=Gn,a.e_stop=ei,a.addClass=Q,a.contains=S,a.rmClass=L,a.keyNames=rr}T5(Ot),B5(Ot);var M5="iter insert remove copy getEditor constructor".split(" ");for(var ed in bn.prototype)bn.prototype.hasOwnProperty(ed)&&se(M5,ed)<0&&(Ot.prototype[ed]=function(a){return function(){return a.apply(this.doc,arguments)}}(bn.prototype[ed]));return Tt(bn),Ot.inputStyles={textarea:zt,contenteditable:St},Ot.defineMode=function(a){!Ot.defaults.mode&&a!="null"&&(Ot.defaults.mode=a),Es.apply(this,arguments)},Ot.defineMIME=co,Ot.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Ot.defineMIME("text/plain","null"),Ot.defineExtension=function(a,s){Ot.prototype[a]=s},Ot.defineDocExtension=function(a,s){bn.prototype[a]=s},Ot.fromTextArea=F5,P5(Ot),Ot.version="6.65.7",Ot})}(Tu)),Tu.exports}var ki=Zr();(function(e,t){(function(r){r(Zr())})(function(r){r.defineMode("javascript",function(o,i){var l=o.indentUnit,d=i.statementIndent,c=i.jsonld,u=i.json||c,h=i.trackScope!==!1,m=i.typescript,y=i.wordCharacters||/[\w$\xa1-\uffff]/,C=function(){function te(Kt){return{type:Kt,style:"keyword"}}var ae=te("keyword a"),ue=te("keyword b"),Ee=te("keyword c"),ot=te("keyword d"),ht=te("operator"),yt={type:"atom",style:"atom"};return{if:t
2025-05-20 11:03:25 +08:00
`+e+`
2025-05-27 15:27:24 +08:00
}`)()}catch(r){return console.error(r),dn(this.t("struct.errorMsg")),!1}this.body?this.fn=(this.fnx?"$FNX:":"")+e:this.fn=nD+t+iD}return this.submit(),!0},submit(){this.$emit("update:modelValue",this.fn),this.$emit("change",this.fn),this.value=this.fn,this.visible=!1},trimString(e){const t=e.indexOf("{"),r=e.lastIndexOf("}");return t===-1||r===-1||t>=r?e:e.slice(t+1,r).replace(/^\n+|\n+$/g,"")},tidyValue(){let e=this.modelValue||"";return e.__json&&(e=e.__json),this.fnx&&typeof e=="string"&&e.indexOf("$FNX:")===0&&(e=e.slice(5)),typeof e=="function"?e=this.trimString(En(e)).trim():this.body||(e=this.trimString(e).trim()),this.value=e,e},load(){this.$nextTick(()=>{let e=this.tidyValue();this.editor=n.markRaw(ki(this.$refs.editor,{lineNumbers:!0,mode:{name:"javascript",globalVars:!0},extraKeys:{"Ctrl-Space":"autocomplete"},line:!0,tabSize:2,lineWrapping:!0,value:e})),this.editor.on("inputRead",(t,r)=>{r.keyCode===32&&r.ctrlKey&&ki.showHint(t,ki.hint.javascript)}),this.editor.on("change",()=>{this.visible=!0}),this.editor})}}}),oD={class:"_fd-fn"},aD={class:"_fd-fn-tip"},lD={class:"cm-keyword"},sD={key:0},dD={class:"_fd-fn-arg"},cD={ref:"editor",class:"_fd-fn-editor"};function uD(e,t,r,o,i,l){const d=n.resolveComponent("el-table-column"),c=n.resolveComponent("el-table"),u=n.resolveComponent("el-popover"),h=n.resolveComponent("el-button");return n.openBlock(),n.createElementBlock("div",oD,[n.createElementVNode("div",aD,[t[2]||(t[2]=n.createElementVNode("div",{class:"_fd-fn-ind"},null,-1)),n.createElementVNode("div",lD,[n.createElementVNode("span",null,[n.createTextVNode("function "+n.toDisplayString(e.name)+"(",1),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.argList,(m,y)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createTextVNode(n.toDisplayString(y>0?", ":""),1),m.type==="string"?(n.openBlock(),n.createElementBlock("span",sD,n.toDisplayString(m.name),1)):(n.openBlock(),n.createBlock(u,{key:1,placement:"top-start",width:400,"hide-after":0,trigger:"click",title:m.name,content:m.info||""},{reference:n.withCtx(()=>[n.createElementVNode("span",dD,[n.createTextVNode(n.toDisplayString(m.name),1),t[0]||(t[0]=n.createElementVNode("i",{class:"fc-icon icon-question"},null,-1))])]),default:n.withCtx(()=>[m.columns?(n.openBlock(),n.createBlock(c,{key:0,data:m.columns,border:""},{default:n.withCtx(()=>[n.createVNode(d,{width:"120",property:"label",label:e.t("props.field")},null,8,["label"]),n.createVNode(d,{property:"info",label:e.t("event.info")},null,8,["label"]),n.createVNode(d,{width:"80",property:"type",label:e.t("event.type")},null,8,["label"])]),_:2},1032,["data"])):n.createCommentVNode("",!0)]),_:2},1032,["title","content"]))],64))),256)),t[1]||(t[1]=n.createTextVNode(") {"))])])]),n.createElementVNode("div",cD,null,512),t[3]||(t[3]=n.createElementVNode("div",{class:"_fd-fn-tip"},[n.createElementVNode("div",{class:"_fd-fn-ind"}),n.createElementVNode("div",{class:"cm-keyword"},"}")],-1)),e.visible&&e.button?(n.openBlock(),n.createBlock(h,{key:0,type:"primary",size:"small",onClick:e.save},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.t("props.save")),1)]),_:1},8,["onClick"])):n.createCommentVNode("",!0)])}const Ni=Te(rD,[["render",uD]]),gj="",fD=n.defineComponent({name:"ConditionInput",inject:["designer"],emits:["update:modelValue","change"],props:{type:String,options:Array,props:Object,modelValue:[String,Number,Array,Object,Boolean]},watch:{modelValue(){this.value=this.modelValue||void 0}},data(){return{value:this.modelValue||void 0}},methods:{onInput(){this.$emit("update:modelValue",this.value),this.$emit("change",this.value)}},created(){}}),pD={class:"_fd-cdi-input"};function hD(e,t,r,o,i,l){const d=n.resolveComponent("el-cascader"),c=n.resolveComponent("el-input-number"),u=n.resolveComponent("el-option"),h=n.resolveComponent("el-select"),m=n.resolveComponent("el-switch"),y=n.resolveComponent("el-input");return n.openBlock(),n.createElementBlock("div",pD,[e.type==="cascader"?(n.openBlock(),n.createBlock(d,n.mergeProps({key:0,size:"default",props:{checkStrictly:!0,emitPath:!1}
2025-05-20 11:03:25 +08:00
Highlight.js v11.9.0 (git: b7ec4bfafc)
(c) 2006-2024 undefined and other contributors
License: BSD-3-Clause
2025-05-27 15:27:24 +08:00
*/function Cg(e){return e instanceof Map?e.clear=e.delete=e.set=()=>{throw Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=()=>{throw Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const r=e[t],o=typeof r;o!=="object"&&o!=="function"||Object.isFrozen(r)||Cg(r)}),e}class _g{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Eg(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Wi(e,...t){const r=Object.create(null);for(const o in e)r[o]=e[o];return t.forEach(o=>{for(const i in o)r[i]=o[i]}),r}const Sg=e=>!!e.scope;class IV{constructor(t,r){this.buffer="",this.classPrefix=r.classPrefix,t.walk(this)}addText(t){this.buffer+=Eg(t)}openNode(t){if(!Sg(t))return;const r=((o,{prefix:i})=>{if(o.startsWith("language:"))return o.replace("language:","language-");if(o.includes(".")){const l=o.split(".");return[`${i}${l.shift()}`,...l.map((d,c)=>`${d}${"_".repeat(c+1)}`)].join(" ")}return`${i}${o}`})(t.scope,{prefix:this.classPrefix});this.span(r)}closeNode(t){Sg(t)&&(this.buffer+="</span>")}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const Ag=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Ou{constructor(){this.rootNode=Ag(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const r=Ag({scope:t});this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,r){return typeof r=="string"?t.addText(r):r.children&&(t.openNode(r),r.children.forEach(o=>this._walk(t,o)),t.closeNode(r)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(r=>typeof r=="string")?t.children=[t.children.join("")]:t.children.forEach(r=>{Ou._collapse(r)}))}}class FV extends Ou{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,r){const o=t.root;r&&(o.scope="language:"+r),this.add(o)}toHTML(){return new IV(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function oa(e){return e?typeof e=="string"?e:e.source:null}function xg(e){return mr("(?=",e,")")}function PV(e){return mr("(?:",e,")*")}function MV(e){return mr("(?:",e,")?")}function mr(...e){return e.map(t=>oa(t)).join("")}function Bu(...e){return"("+((r=>{const o=r[r.length-1];return typeof o=="object"&&o.constructor===Object?(r.splice(r.length-1,1),o):{}})(e).capture?"":"?:")+e.map(r=>oa(r)).join("|")+")"}function kg(e){return RegExp(e.toString()+"|").exec("").length-1}const LV=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Ru(e,{joinWith:t}){let r=0;return e.map(o=>{r+=1;const i=r;let l=oa(o),d="";for(;l.length>0;){const c=LV.exec(l);if(!c){d+=l;break}d+=l.substring(0,c.index),l=l.substring(c.index+c[0].length),c[0][0]==="\\"&&c[1]?d+="\\"+(Number(c[1])+i):(d+=c[0],c[0]==="("&&r++)}return d}).map(o=>`(${o})`).join(t)}const Ng="[a-zA-Z]\\w*",$u="[a-zA-Z_]\\w*",Tg="\\b\\d+(\\.\\d+)?",Dg="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Vg="\\b(0b[01]+)",aa={begin:"\\\\[\\s\\S]",relevance:0},jV={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[aa]},zV={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[aa]},Ql=(e,t,r={})=>{const o=Wi({scope:"comment",begin:e,end:t,contains:[]},r);o.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=Bu("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return o.contains.push({begin:mr(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),o},UV=Ql("//","$"),HV=Ql("
2025-05-28 11:05:44 +08:00
https://github.com/highlightjs/highlight.js/issues/2277`),F=x,O=k),T===void 0&&(T=!0);const I={code:O,language:F};_("before:highlight",I);const M=I.result?I.result:m(I.language,I.code,T);return M.code=I.code,_("after:highlight",M),M}function m(x,k,T,O){const F=Object.create(null);function I(){if(!G.keywords)return X.addText(le);let se=0;G.keywordPatternRe.lastIndex=0;let ge=G.keywordPatternRe.exec(le),ye="";for(;ge;){ye+=le.substring(se,ge.index);const W=S.case_insensitive?ge[0].toLowerCase():ge[0],Y=(D=W,G.keywords[D]);if(Y){const[q,ee]=Y;if(X.addText(ye),ye="",F[W]=(F[W]||0)+1,F[W]<=7&&(be+=ee),q.startsWith("_"))ye+=ge[0];else{const oe=S.classNameAliases[q]||q;N(ge[0],oe)}}else ye+=ge[0];se=G.keywordPatternRe.lastIndex,ge=G.keywordPatternRe.exec(le)}var D;ye+=le.substring(se),X.addText(ye)}function M(){G.subLanguage!=null?(()=>{if(le==="")return;let se=null;if(typeof G.subLanguage=="string"){if(!t[G.subLanguage])return X.addText(le);se=m(G.subLanguage,le,!0,ie[G.subLanguage]),ie[G.subLanguage]=se._top}else se=y(le,G.subLanguage.length?G.subLanguage:null);G.relevance>0&&(be+=se.relevance),X.__addSublanguage(se._emitter,se.language)})():I(),le=""}function N(se,ge){se!==""&&(X.startScope(ge),X.addText(se),X.endScope())}function B(se,ge){let ye=1;const D=ge.length-1;for(;ye<=D;){if(!se._emit[ye]){ye++;continue}const W=S.classNameAliases[se[ye]]||se[ye],Y=ge[ye];W?N(Y,W):(le=Y,I(),le=""),ye++}}function L(se,ge){return se.scope&&typeof se.scope=="string"&&X.openNode(S.classNameAliases[se.scope]||se.scope),se.beginScope&&(se.beginScope._wrap?(N(le,S.classNameAliases[se.beginScope._wrap]||se.beginScope._wrap),le=""):se.beginScope._multi&&(B(se.beginScope,ge),le="")),G=Object.create(se,{parent:{value:G}}),G}function U(se,ge,ye){let D=((W,Y)=>{const q=W&&W.exec(Y);return q&&q.index===0})(se.endRe,ye);if(D){if(se["on:end"]){const W=new _g(se);se["on:end"](ge,W),W.isMatchIgnored&&(D=!1)}if(D){for(;se.endsParent&&se.parent;)se=se.parent;return se}}if(se.endsWithParent)return U(se.parent,ge,ye)}function H(se){return G.matcher.regexIndex===0?(le+=se[0],1):(pe=!0,0)}function R(se){const ge=se[0],ye=k.substring(se.index),D=U(G,se,ye);if(!D)return Pg;const W=G;G.endScope&&G.endScope._wrap?(M(),N(ge,G.endScope._wrap)):G.endScope&&G.endScope._multi?(M(),B(G.endScope,se)):W.skip?le+=ge:(W.returnEnd||W.excludeEnd||(le+=ge),M(),W.excludeEnd&&(le=ge));do G.scope&&X.closeNode(),G.skip||G.subLanguage||(be+=G.relevance),G=G.parent;while(G!==D.parent);return D.starts&&L(D.starts,se),W.returnEnd?0:ge.length}let z={};function $(se,ge){const ye=ge&&ge[0];if(le+=se,ye==null)return M(),0;if(z.type==="begin"&&ge.type==="end"&&z.index===ge.index&&ye===""){if(le+=k.slice(ge.index,ge.index+1),!i){const D=Error(`0 width match regex (${x})`);throw D.languageName=x,D.badRule=z.rule,D}return 1}if(z=ge,ge.type==="begin")return(D=>{const W=D[0],Y=D.rule,q=new _g(Y),ee=[Y.__beforeBegin,Y["on:begin"]];for(const oe of ee)if(oe&&(oe(D,q),q.isMatchIgnored))return H(W);return Y.skip?le+=W:(Y.excludeBegin&&(le+=W),M(),Y.returnBegin||Y.excludeBegin||(le=W)),L(Y,D),Y.returnBegin?0:W.length})(ge);if(ge.type==="illegal"&&!T){const D=Error('Illegal lexeme "'+ye+'" for mode "'+(G.scope||"<unnamed>")+'"');throw D.mode=G,D}if(ge.type==="end"){const D=R(ge);if(D!==Pg)return D}if(ge.type==="illegal"&&ye==="")return 1;if(de>1e5&&de>3*ge.index)throw Error("potential infinite loop, way more iterations than matches");return le+=ye,ye.length}const S=E(x);if(!S)throw gr(l.replace("{}",x)),Error('Unknown language: "'+x+'"');const J=iO(S);let Q="",G=O||J;const ie={},X=new c.__emitter(c);(()=>{const se=[];for(let ge=G;ge!==S;ge=ge.parent)ge.scope&&se.unshift(ge.scope);se.forEach(ge=>X.openNode(ge))})();let le="",be=0,ce=0,de=0,pe=!1;try{if(S.__emitTokens)S.__emitTokens(k,X);else{for(G.matcher.considerAll();;){de++,pe?pe=!1:G.matcher.considerAll(),G.matcher.lastIndex=ce;const se=G.matcher.exec(k);if(!se)break;const ge=$(k.substring(ce,se.index),se);ce=se.index+ge}$(k.substring(ce))}return X.finalize(),Q=X.toHTML(),{language:x,value:Q,relevance:be,illegal:!1,_emitter:X,_top:G}}catch(se){
2025-05-24 17:29:32 +08:00
`);i!==-1?this.__character_count=o.length-i:this.__character_count+=o.length},e.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function t(o,i){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),i=i||"",o.indent_level>0&&(i=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}t.prototype.get_indent_size=function(o,i){var l=this.__base_string_length;return i=i||0,o<0&&(l=0),l+=o*this.__indent_size,l+=i,l},t.prototype.get_indent_string=function(o,i){var l=this.__base_string;return i=i||0,o<0&&(o=0,l=""),i+=o*this.__indent_size,this.__ensure_cache(i),l+=this.__cache[i],l},t.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var o=this.__cache.length,i=0,l="";this.__indent_size&&o>=this.__indent_size&&(i=Math.floor(o/this.__indent_size),o-=i*this.__indent_size,l=new Array(i+1).join(this.__indent_string)),o&&(l+=new Array(o+1).join(" ")),this.__cache.push(l)};function r(o,i){this.__indent_cache=new t(o,i),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}return r.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},r.prototype.get_line_number=function(){return this.__lines.length},r.prototype.get_indent_string=function(o,i){return this.__indent_cache.get_indent_string(o,i)},r.prototype.get_indent_size=function(o,i){return this.__indent_cache.get_indent_size(o,i)},r.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},r.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},r.prototype.get_code=function(o){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===`
2025-05-20 11:03:25 +08:00
`&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var l=this.__lines.join(`
2025-05-24 17:29:32 +08:00
`);return o!==`
2025-05-27 15:27:24 +08:00
`&&(l=l.replace(/[\n]/g,o)),l},r.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},r.prototype.set_indent=function(o,i){return o=o||0,i=i||0,this.next_line.set_indent(o,i),this.__lines.length>1?(this.current_line.set_indent(o,i),!0):(this.current_line.set_indent(),!1)},r.prototype.add_raw_token=function(o){for(var i=0;i<o.newlines;i++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},r.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},r.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},r.prototype.remove_indent=function(o){for(var i=this.__lines.length;o<i;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},r.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},r.prototype.just_added_newline=function(){return this.current_line.is_empty()},r.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},r.prototype.ensure_empty_line_above=function(o,i){for(var l=this.__lines.length-2;l>=0;){var d=this.__lines[l];if(d.is_empty())break;if(d.item(0).indexOf(o)!==0&&d.item(-1)!==i){this.__lines.splice(l+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}l--}},Pu.Output=r,Pu}var Lu={},Hg;function Wg(){if(Hg)return Lu;Hg=1;function e(t,r,o,i){this.type=t,this.text=r,this.comments_before=null,this.newlines=o||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}return Lu.Token=e,Lu}var ju={},Gg;function Kg(){return Gg||(Gg=1,function(e){var t="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",o="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e4
|`+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")}(ju)),ju}var zu={},da={},Yg;function Uu(){if(Yg)return da;Yg=1;function e(o,i){this.raw_options=t(o,i),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}e.prototype._get_array=function(o,i){var l=this.raw_options[o],d=i||[];return typeof l=="object"?l!==null&&typeof l.concat=="function"&&(d=l.concat()):typeof l=="string"&&(d=l.split(/[^a-zA-Z0-9_\/\-]+/)),d},e.prototype._get_boolean=function(o,i){var l=this.raw_options[o],d=l===void 0?!!i:!!l;return d},e.prototype._get_characters=function(o,i){var l=this.raw_options[o],d=i||"";return typeof l=="string"&&(d=l.replace(/\\r/,"\r").replace(/\\n/,`
2025-05-24 17:29:32 +08:00
`).replace(/\\t/," ")),d},e.prototype._get_number=function(o,i){var l=this.raw_options[o];i=parseInt(i,10),isNaN(i)&&(i=0);var d=parseInt(l,10);return isNaN(d)&&(d=i),d},e.prototype._get_selection=function(o,i,l){var d=this._get_selection_list(o,i,l);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
2025-05-20 11:03:25 +08:00
`+i+`
2025-05-24 17:29:32 +08:00
You passed in: '`+this.raw_options[o]+"'");return d[0]},e.prototype._get_selection_list=function(o,i,l){if(!i||i.length===0)throw new Error("Selection list cannot be empty.");if(l=l||[i[0]],!this._is_valid_selection(l,i))throw new Error("Invalid Default Value!");var d=this._get_array(o,l);if(!this._is_valid_selection(d,i))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
2025-05-20 11:03:25 +08:00
`+i+`
2025-05-27 15:27:24 +08:00
You passed in: '`+this.raw_options[o]+"'");return d},e.prototype._is_valid_selection=function(o,i){return o.length&&i.length&&!o.some(function(l){return i.indexOf(l)===-1})};function t(o,i){var l={};o=r(o);var d;for(d in o)d!==i&&(l[d]=o[d]);if(i&&o[i])for(d in o[i])l[d]=o[i][d];return l}function r(o){var i={},l;for(l in o){var d=l.replace(/-/g,"_");i[d]=o[l]}return i}return da.Options=e,da.normalizeOpts=r,da.mergeOpts=t,da}var Qg;function Jg(){if(Qg)return zu;Qg=1;var e=Uu().Options,t=["before-newline","after-newline","preserve-newline"];function r(o){e.call(this,o,"js");var i=this.raw_options.brace_style||null;i==="expand-strict"?this.raw_options.brace_style="expand":i==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var l=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var d=0;d<l.length;d++)l[d]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=l[d];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",t),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}return r.prototype=new e,zu.Options=r,zu}var no={},Hu={},Xg;function Wu(){if(Xg)return Hu;Xg=1;var e=RegExp.prototype.hasOwnProperty("sticky");function t(r){this.__input=r||"",this.__input_length=this.__input.length,this.__position=0}return t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position<this.__input_length},t.prototype.next=function(){var r=null;return this.hasNext()&&(r=this.__input.charAt(this.__position),this.__position+=1),r},t.prototype.peek=function(r){var o=null;return r=r||0,r+=this.__position,r>=0&&r<this.__input_length&&(o=this.__input.charAt(r)),o},t.prototype.__match=function(r,o){r.lastIndex=o;var i=r.exec(this.__input);return i&&!(e&&r.sticky)&&i.index!==o&&(i=null),i},t.prototype.test=function(r,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(r,o):!1},t.prototype.testChar=function(r,o){var i=this.peek(o);return r.lastIndex=0,i!==null&&r.test(i)},t.prototype.match=function(r){var o=this.__match(r,this.__position);return o?this.__position+=o[0].length:o=null,o},t.prototype.read=function(r,o,i){var l="",d;return r&&(d=this.match(r),d&&(l+=d[0])),o&&(d||!r)&&(l+=this.readUntil(o,i)),l},t.prototype.readUntil=function(r,o){var i="",l=this.__position;r.lastIndex=this.__position;var d=r.exec(this.__input);return d?(l=d.index,o&&(l+=d[0].length)):l=this.__input_length,i=this.__input.substring(this.__position,l),this.__position=l,i},t.prototype.readUntilAfter=function(r){return this.readUntil(r,!0)},t.prototype.get_regexp=function(r,o){var i=null,l="g";return o&&e&&(l="y"),typeof r=="string"&&r!==""?i=new RegExp(r,l):r&&(i=new RegExp(r.source,l)),i},t.prototype.get_literal_regexp=function(r){return RegExp(r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},t.prototype.peekUntilAfter=function(r){var o=this.__position,i=this.readUntilAfter(r);return this.__position=o,i},t.prototype.lookBack=
2025-05-26 10:41:15 +08:00
`),!(O.type===u.DOT||O.type===u.RESERVED&&(O.text==="set"||O.text==="get"))&&_.test(F)?(F==="in"||F==="of")&&(O.type===u.WORD||O.type===u.STRING)?this._create_token(u.OPERATOR,F):this._create_token(u.RESERVED,F):this._create_token(u.WORD,F);if(F=this.__patterns.number.read(),F!=="")return this._create_token(u.WORD,F)},k.prototype._read_singles=function(O){var F=null;return O==="("||O==="["?F=this._create_token(u.START_EXPR,O):O===")"||O==="]"?F=this._create_token(u.END_EXPR,O):O==="{"?F=this._create_token(u.START_BLOCK,O):O==="}"?F=this._create_token(u.END_BLOCK,O):O===";"?F=this._create_token(u.SEMICOLON,O):O==="."&&C.test(this._input.peek(1))?F=this._create_token(u.DOT,O):O===","&&(F=this._create_token(u.COMMA,O)),F&&this._input.next(),F},k.prototype._read_pair=function(O,F){var I=null;return O==="#"&&F==="{"&&(I=this._create_token(u.START_BLOCK,O+F)),I&&(this._input.next(),this._input.next()),I},k.prototype._read_punctuation=function(){var O=this.__patterns.punct.read();if(O!=="")return O==="="?this._create_token(u.EQUALS,O):O==="?."?this._create_token(u.DOT,O):this._create_token(u.OPERATOR,O)},k.prototype._read_non_javascript=function(O){var F="";if(O==="#"){if(this._is_first_token()&&(F=this.__patterns.shebang.read(),F))return this._create_token(u.UNKNOWN,F.trim()+`
`);if(F=this.__patterns.include.read(),F)return this._create_token(u.UNKNOWN,F.trim()+`
`);O=this._input.next();var I="#";if(this._input.hasNext()&&this._input.testChar(y)){do O=this._input.next(),I+=O;while(this._input.hasNext()&&O!=="#"&&O!=="=");return O==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(I+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(I+="{}",this._input.next(),this._input.next())),this._create_token(u.WORD,I)}this._input.back()}else if(O==="<"&&this._is_first_token()){if(F=this.__patterns.html_comment_start.read(),F){for(;this._input.hasNext()&&!this._input.testChar(i.newline);)F+=this._input.next();return x=!0,this._create_token(u.COMMENT,F)}}else if(x&&O==="-"&&(F=this.__patterns.html_comment_end.read(),F))return x=!1,this._create_token(u.COMMENT,F);return null},k.prototype._read_comment=function(O){var F=null;if(O==="/"){var I="";if(this._input.peek(1)==="*"){I=this.__patterns.block_comment.read();var M=h.get_directives(I);M&&M.ignore==="start"&&(I+=h.readIgnored(this._input)),I=I.replace(i.allLineBreaks,`
`),F=this._create_token(u.BLOCK_COMMENT,I),F.directives=M}else this._input.peek(1)==="/"&&(I=this.__patterns.comment.read(),F=this._create_token(u.COMMENT,I))}return F},k.prototype._read_string=function(O){if(O==="`"||O==="'"||O==='"'){var F=this._input.next();return this.has_char_escapes=!1,O==="`"?F+=this._read_string_recursive("`",!0,"${"):F+=this._read_string_recursive(O),this.has_char_escapes&&this._options.unescape_strings&&(F=T(F)),this._input.peek()===O&&(F+=this._input.next()),F=F.replace(i.allLineBreaks,`
`),this._create_token(u.STRING,F)}return null},k.prototype._allow_regexp_or_xml=function(O){return O.type===u.RESERVED&&c(O.text,["return","case","throw","else","do","typeof","yield"])||O.type===u.END_EXPR&&O.text===")"&&O.opened.previous.type===u.RESERVED&&c(O.opened.previous.text,["if","while","for"])||c(O.type,[u.COMMENT,u.START_EXPR,u.START_BLOCK,u.START,u.END_BLOCK,u.OPERATOR,u.EQUALS,u.EOF,u.SEMICOLON,u.COMMA])},k.prototype._read_regexp=function(O,F){if(O==="/"&&this._allow_regexp_or_xml(F)){for(var I=this._input.next(),M=!1,N=!1;this._input.hasNext()&&(M||N||this._input.peek()!==O)&&!this._input.testChar(i.newline);)I+=this._input.peek(),M?M=!1:(M=this._input.peek()==="\\",this._input.peek()==="["?N=!0:this._input.peek()==="]"&&(N=!1)),this._input.next();return this._input.peek()===O&&(I+=this._input.next(),I+=this._input.read(i.identifier)),this._create_token(u.STRING,I)}return null},k.prototype._read_xml=function(O,F){if(this._options.e4x&&O==="<"&&this._allow_regexp_or_xml(F)){var I="",M=this.__patterns.xml.read_match();if(M){for(var N=M[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),B=N.indexOf("{")===0,L=0;M;){var U=!!M[1],H=M[2],R=!!M[M.length-1]||H.slice(0,8)==="![CDATA[";if(!R&&(H===N||B&&H.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(U?--L:++L),I+=M[0],L<=0)break;M=this.__patterns.xml.read_match()}return M||(I+=this._input.match(/[\s\S]*/g)[0]),I=I.replace(i.allLineBreaks,`
`),this._create_token(u.STRING,I)}}return null};function T(O){for(var F="",I=0,M=new e(O),N=null;M.hasNext();)if(N=M.match(/([\s]|[^\\]|\\\\)+/g),N&&(F+=N[0]),M.peek()==="\\"){if(M.next(),M.peek()==="x")N=M.match(/x([0-9A-Fa-f]{2})/g);else if(M.peek()==="u")N=M.match(/u([0-9A-Fa-f]{4})/g),N||(N=M.match(/u\{([0-9A-Fa-f]+)\}/g));else{F+="\\",M.hasNext()&&(F+=M.next());continue}if(!N||(I=parseInt(N[1],16),I>126&&I<=255&&N[0].indexOf("x")===0))return O;I>=0&&I<32||I>1114111?F+="\\"+N[0]:I===34||I===39||I===92?F+="\\"+String.fromCharCode(I):F+=String.fromCharCode(I)}return F}return k.prototype._read_string_recursive=function(O,F,I){var M,N;O==="'"?N=this.__patterns.single_quote:O==='"'?N=this.__patterns.double_quote:O==="`"?N=this.__patterns.template_text:O==="}"&&(N=this.__patterns.template_expression);for(var B=N.read(),L="";this._input.hasNext();){if(L=this._input.next(),L===O||!F&&i.newline.test(L)){this._input.back();break}else L==="\\"&&this._input.hasNext()?(M=this._input.peek(),M==="x"||M==="u"?this.has_char_escapes=!0:M==="\r"&&this._input.peek(1)===`
2025-05-27 15:27:24 +08:00
`&&this._input.next(),L+=this._input.next()):I&&(I==="${"&&L==="$"&&this._input.peek()==="{"&&(L+=this._input.next()),I===L&&(O==="`"?L+=this._read_string_recursive("}",F,"`"):L+=this._read_string_recursive("`",F,"${"),this._input.hasNext()&&(L+=this._input.next())));L+=N.read(),B+=L}return B},no.Tokenizer=k,no.TOKEN=u,no.positionable_operators=A.slice(),no.line_starters=b.slice(),no}var av;function kO(){if(av)return Fu;av=1;var e=Mu().Output,t=Wg().Token,r=Kg(),o=Jg().Options,i=ns().Tokenizer,l=ns().line_starters,d=ns().positionable_operators,c=ns().TOKEN;function u(N,B){return B.indexOf(N)!==-1}function h(N){return N.replace(/^\s+/g,"")}function m(N){for(var B={},L=0;L<N.length;L++)B[N[L].replace(/-/g,"_")]=N[L];return B}function y(N,B){return N&&N.type===c.RESERVED&&N.text===B}function C(N,B){return N&&N.type===c.RESERVED&&u(N.text,B)}var A=["case","return","do","if","throw","else","await","break","continue","async"],w=["before-newline","after-newline","preserve-newline"],E=m(w),b=[E.before_newline,E.preserve_newline],g={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function _(N,B){B.multiline_frame||B.mode===g.ForInitializer||B.mode===g.Conditional||N.remove_indent(B.start_line_index)}function x(N){N=N.replace(r.allLineBreaks,`
2025-05-24 17:29:32 +08:00
`);for(var B=[],L=N.indexOf(`
`);L!==-1;)B.push(N.substring(0,L)),N=N.substring(L+1),L=N.indexOf(`
2025-05-26 10:41:15 +08:00
`);return N.length&&B.push(N),B}function k(N){return N===g.ArrayLiteral}function T(N){return u(N,[g.Expression,g.ForInitializer,g.Conditional])}function O(N,B){for(var L=0;L<N.length;L++){var U=N[L].trim();if(U.charAt(0)!==B)return!1}return!0}function F(N,B){for(var L=0,U=N.length,H;L<U;L++)if(H=N[L],H&&H.indexOf(B)!==0)return!1;return!0}function I(N,B){B=B||{},this._source_text=N||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new o(B)}I.prototype.create_flags=function(N,B){var L=0;N&&(L=N.indentation_level,!this._output.just_added_newline()&&N.line_indent_level>L&&(L=N.line_indent_level));var U={mode:B,parent:N,last_token:N?N.last_token:new t(c.START_BLOCK,""),last_word:N?N.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:L,alignment:0,line_indent_level:N?N.line_indent_level:L,start_line_index:this._output.get_line_number(),ternary_depth:0};return U},I.prototype._reset=function(N){var B=N.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new e(this._options,B),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(g.BlockStatement);var L=new i(N,this._options);return this._tokens=L.tokenize(),N},I.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var N,B=this._reset(this._source_text),L=this._options.eol;this._options.eol==="auto"&&(L=`
2025-05-27 15:27:24 +08:00
`,B&&r.lineBreak.test(B||"")&&(L=B.match(r.lineBreak)[0]));for(var U=this._tokens.next();U;)this.handle_token(U),this._last_last_text=this._flags.last_token.text,this._flags.last_token=U,U=this._tokens.next();return N=this._output.get_code(L),N},I.prototype.handle_token=function(N,B){N.type===c.START_EXPR?this.handle_start_expr(N):N.type===c.END_EXPR?this.handle_end_expr(N):N.type===c.START_BLOCK?this.handle_start_block(N):N.type===c.END_BLOCK?this.handle_end_block(N):N.type===c.WORD?this.handle_word(N):N.type===c.RESERVED?this.handle_word(N):N.type===c.SEMICOLON?this.handle_semicolon(N):N.type===c.STRING?this.handle_string(N):N.type===c.EQUALS?this.handle_equals(N):N.type===c.OPERATOR?this.handle_operator(N):N.type===c.COMMA?this.handle_comma(N):N.type===c.BLOCK_COMMENT?this.handle_block_comment(N,B):N.type===c.COMMENT?this.handle_comment(N,B):N.type===c.DOT?this.handle_dot(N):N.type===c.EOF?this.handle_eof(N):N.type===c.UNKNOWN?this.handle_unknown(N,B):this.handle_unknown(N,B)},I.prototype.handle_whitespace_and_comments=function(N,B){var L=N.newlines,U=this._options.keep_array_indentation&&k(this._flags.mode);if(N.comments_before)for(var H=N.comments_before.next();H;)this.handle_whitespace_and_comments(H,B),this.handle_token(H,B),H=N.comments_before.next();if(U)for(var R=0;R<L;R+=1)this.print_newline(R>0,B);else if(this._options.max_preserve_newlines&&L>this._options.max_preserve_newlines&&(L=this._options.max_preserve_newlines),this._options.preserve_newlines&&L>1){this.print_newline(!1,B);for(var z=1;z<L;z+=1)this.print_newline(!0,B)}};var M=["async","break","continue","return","throw","yield"];return I.prototype.allow_wrap_or_preserved_newline=function(N,B){if(B=B===void 0?!1:B,!this._output.just_added_newline()){var L=this._options.preserve_newlines&&N.newlines||B,U=u(this._flags.last_token.text,d)||u(N.text,d);if(U){var H=u(this._flags.last_token.text,d)&&u(this._options.operator_position,b)||u(N.text,d);L=L&&H}if(L)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(C(this._flags.last_token,M))return;this._output.set_wrap_point()}}},I.prototype.print_newline=function(N,B){if(!B&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==c.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var L=this._tokens.peek();this._flags.mode===g.Statement&&!(this._flags.if_block&&y(L,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(N)&&(this._flags.multiline_frame=!0)},I.prototype.print_token_line_indentation=function(N){this._output.just_added_newline()&&(this._options.keep_array_indentation&&N.newlines&&(N.text==="["||k(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(N.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},I.prototype.print_token=function(N){if(this._output.raw){this._output.add_raw_token(N);return}if(this._options.comma_first&&N.previous&&N.previous.type===c.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var B=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(B),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(N),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(N),this._output.non_breaking_space=!0,this._output.add_token(N.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},I.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},I.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation
`&&this.print_newline(!1,B)},I.prototype.handle_eof=function(N){for(;this._flags.mode===g.Statement;)this.restore_mode();this.handle_whitespace_and_comments(N)},Fu.Beautifier=I,Fu}var lv;function NO(){if(lv)return Zl.exports;lv=1;var e=kO().Beautifier,t=Jg().Options;function r(o,i){var l=new e(o,i);return l.beautify()}return Zl.exports=r,Zl.exports.defaultOptions=function(){return new t},Zl.exports}var is={exports:{}},Zu={},qu={},sv;function dv(){if(sv)return qu;sv=1;var e=Uu().Options;function t(r){e.call(this,r,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var l=0;l<i.length;l++)i[l]!=="expand"?this.brace_style="collapse":this.brace_style=i[l]}return t.prototype=new e,qu.Options=t,qu}var cv;function TO(){if(cv)return Zu;cv=1;var e=dv().Options,t=Mu().Output,r=Wu().InputScanner,o=Ju().Directives,i=new o(/\/\*/,/\*\//),l=/\r\n|[\r\n]/,d=/\r\n|[\r\n]/g,c=/\s/,u=/(?:\s|\n)+/g,h=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,m=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function y(C,A){this._source_text=C||"",this._options=new e(A),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}return y.prototype.eatString=function(C){var A="";for(this._ch=this._input.next();this._ch;){if(A+=this._ch,this._ch==="\\")A+=this._input.next();else if(C.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return A},y.prototype.eatWhitespace=function(C){for(var A=c.test(this._input.peek()),w=0;c.test(this._input.peek());)this._ch=this._input.next(),C&&this._ch===`
`&&(w===0||w<this._options.max_preserve_newlines)&&(w++,this._output.add_new_line(!0));return A},y.prototype.foundNestedPseudoClass=function(){for(var C=0,A=1,w=this._input.peek(A);w;){if(w==="{")return!0;if(w==="(")C+=1;else if(w===")"){if(C===0)return!1;C-=1}else if(w===";"||w==="}")return!1;A++,w=this._input.peek(A)}return!1},y.prototype.print_string=function(C){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(C)},y.prototype.preserveSingleSpace=function(C){C&&(this._output.space_before_token=!0)},y.prototype.indent=function(){this._indentLevel++},y.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var C=this._source_text,A=this._options.eol;A==="auto"&&(A=`
`,C&&l.test(C||"")&&(A=C.match(l)[0])),C=C.replace(d,`
2025-05-26 10:41:15 +08:00
`);var w=C.match(/^[\t ]*/)[0];this._output=new t(this._options,w),this._input=new r(C),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var E=0,b=!1,g=!1,_=!1,x=!1,k=!1,T=this._ch,O=!1,F,I,M;F=this._input.read(u),I=F!=="",M=T,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),T=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var N=this._input.read(h),B=i.get_directives(N);B&&B.ignore==="start"&&(N+=i.readIgnored(this._input)),this.print_string(N),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(m)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(I),this.print_string(this._ch);var L=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);L.match(/[ :]$/)&&(L=this.eatString(": ").replace(/\s+$/,""),this.print_string(L),this._output.space_before_token=!0),E===0&&L.indexOf(":")!==-1&&(g=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(I),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var U=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);U.match(/[ :]$/)&&(U=this.eatString(": ").replace(/\s+$/,""),this.print_string(U),this._output.space_before_token=!0),E===0&&U.indexOf(":")!==-1?(g=!0,this.indent()):U in this.NESTED_AT_RULE?(this._nestedLevel+=1,U in this.CONDITIONAL_GROUP_RULE&&(_=!0)):E===0&&!g&&(x=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(I),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")g&&(g=!1,this.outdent()),x=!1,_?(_=!1,b=this._indentLevel>=this._nestedLevel):b=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&b&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(M==="("?this._output.space_before_token=!1:M!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),M==="{"&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),b=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var H=0;H<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;H++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[H])){O=!0;break}(b||_)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!x&&E===0?(this.print_string(":"),g||(g=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var R=M==='"'||M==="'";this.preserveSingleSpace(R||I),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")O=!1,E===0?(g&&(this.outdent(),g=!1),x=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),E++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),E&&(E--,this.outd
2025-05-27 15:27:24 +08:00
`&&O&&this._output.add_new_line()}var S=this._output.get_code(A);return S},Zu.Beautifier=y,Zu}var uv;function DO(){if(uv)return is.exports;uv=1;var e=TO().Beautifier,t=dv().Options;function r(o,i){var l=new e(o,i);return l.beautify()}return is.exports=r,is.exports.defaultOptions=function(){return new t},is.exports}var rs={exports:{}},ef={},tf={},fv;function pv(){if(fv)return tf;fv=1;var e=Uu().Options;function t(r){e.call(this,r,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return t.prototype=new e,tf.Options=t,tf}var os={},hv;function mv(){if(hv)return os;hv=1;var e=ts().Tokenizer,t=ts().TOKEN,r=Ju().Directives,o=rv().TemplatablePattern,i=es().Pattern,l={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:t.START,RAW:t.RAW,EOF:t.EOF},d=new r(/<\!--/,/-->/),c=function(u,h){e.call(this,u,h),this._current_tag_name="";var m=new o(this._input).read_options(this._options),y=new i(this._input);if(this.__patterns={word:m.until(/[\n\r\t <]/),word_control_flow_close_excluded:m.until(/[\n\r\t <}]/),single_quote:m.until_after(/'/),double_quote:m.until_after(/"/),attribute:m.until(/[\n\r\t =>]|\/>/),element_name:m.until(/[\n\r\t >\/]/),angular_control_flow_start:y.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:y.starting_with(/{{!--/).until_after(/--}}/),handlebars:y.starting_with(/{{/).until_after(/}}/),handlebars_open:y.until(/[\n\r\t }]/),handlebars_raw_close:y.until(/}}/),comment:y.starting_with(/<!--/).until_after(/-->/),cdata:y.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:y.starting_with(/<!\[/).until_after(/]>/),processing:y.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var C=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=y.matching(C).until_after(C)}}
2025-05-20 11:03:25 +08:00
`,b&&i.test(b)&&(g=b.match(i)[0])),b=b.replace(l,`
2025-05-27 15:27:24 +08:00
`);var _=b.match(/^[\t ]*/)[0],x={text:"",type:""},k=new A(this._options),T=new d(this._options,_),O=new r(b,this._options).tokenize();this._tag_stack=new y(T);for(var F=null,I=O.next();I.type!==o.EOF;)I.type===o.TAG_OPEN||I.type===o.COMMENT?(F=this._handle_tag_open(T,I,k,x,O),k=F):I.type===o.ATTRIBUTE||I.type===o.EQUALS||I.type===o.VALUE||I.type===o.TEXT&&!k.tag_complete?F=this._handle_inside_tag(T,I,k,x):I.type===o.TAG_CLOSE?F=this._handle_tag_close(T,I,k):I.type===o.TEXT?F=this._handle_text(T,I,k):I.type===o.CONTROL_FLOW_OPEN?F=this._handle_control_flow_open(T,I):I.type===o.CONTROL_FLOW_CLOSE?F=this._handle_control_flow_close(T,I):T.add_raw_token(I),x=F,I=O.next();var M=T._output.get_code(g);return M},C.prototype._handle_control_flow_open=function(b,g){var _={text:g.text,type:g.type};return b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),g.newlines?b.print_preserved_newlines(g):b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),b.print_token(g),b.indent(),_},C.prototype._handle_control_flow_close=function(b,g){var _={text:g.text,type:g.type};return b.deindent(),g.newlines?b.print_preserved_newlines(g):b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),b.print_token(g),_},C.prototype._handle_tag_close=function(b,g,_){var x={text:g.text,type:g.type};return b.alignment_size=0,_.tag_complete=!0,b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),_.is_unformatted?b.add_raw_token(g):(_.tag_start_char==="<"&&(b.set_space_before_token(g.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&_.has_wrapped_attrs&&b.print_newline(!1)),b.print_token(g)),_.indent_content&&!(_.is_unformatted||_.is_content_unformatted)&&(b.indent(),_.indent_content=!1),!_.is_inline_element&&!(_.is_unformatted||_.is_content_unformatted)&&b.set_wrap_point(),x},C.prototype._handle_inside_tag=function(b,g,_,x){var k=_.has_wrapped_attrs,T={text:g.text,type:g.type};return b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),_.is_unformatted?b.add_raw_token(g):_.tag_start_char==="{"&&g.type===o.TEXT?b.print_preserved_newlines(g)?(g.newlines=0,b.add_raw_token(g)):b.print_token(g):(g.type===o.ATTRIBUTE?b.set_space_before_token(!0):(g.type===o.EQUALS||g.type===o.VALUE&&g.previous.type===o.EQUALS)&&b.set_space_before_token(!1),g.type===o.ATTRIBUTE&&_.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(b.traverse_whitespace(g),k=k||g.newlines!==0),this._is_wrap_attributes_force&&_.attr_count>=this._options.wrap_attributes_min_attrs&&(x.type!==o.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(b.print_newline(!1),k=!0)),b.print_token(g),k=k||b.previous_token_wrapped(),_.has_wrapped_attrs=k),T},C.prototype._handle_text=function(b,g,_){var x={text:g.text,type:"TK_CONTENT"};return _.custom_beautifier_name?this._print_custom_beatifier_text(b,g,_):_.is_unformatted||_.is_content_unformatted?b.add_raw_token(g):(b.traverse_whitespace(g),b.print_token(g)),x},C.prototype._print_custom_beatifier_text=function(b,g,_){var x=this;if(g.text!==""){var k=g.text,T,O=1,F="",I="";_.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?T=this._js_beautify:_.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?T=this._css_beautify:_.custom_beautifier_name==="html"&&(T=function(H,R){var z=new C(H,R,x._js_beautify,x._css_beautify);return z.beautify()}),this._options.indent_scripts==="keep"?O=0:this._options.indent_scripts==="separate"&&(O=-b.indent_level);var M=b.get_full_indent(O);if(k=k.replace(/\n[ \t]*$/,""),_.custom_beautifier_name!=="html"&&k[0]==="<"&&k.match(/^(<!--|<!\[CDATA\[)/)){var N=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(k);if(!N){b.add_raw_token(g);return}F=M+N[1]+`
2025-05-26 10:41:15 +08:00
`,k=N[4],N[5]&&(I=M+N[5]),k=k.replace(/\n[ \t]*$/,""),(N[2]||N[3].indexOf(`
2025-05-24 17:29:32 +08:00
`)!==-1)&&(N=N[3].match(/[ \t]+$/),N&&(g.whitespace_before=N[0]))}if(k)if(T){var B=function(){this.eol=`
2025-05-26 10:41:15 +08:00
`};B.prototype=this._options.raw_options;var L=new B;k=T(M+k,L)}else{var U=g.whitespace_before;U&&(k=k.replace(new RegExp(`
(`+U+")?","g"),`
2025-05-20 11:03:25 +08:00
`)),k=M+k.replace(/\n/g,`
2025-05-26 10:41:15 +08:00
`+M)}F&&(k?k=F+k+`
2025-05-27 15:27:24 +08:00
`+I:k=F+I),b.print_newline(!1),k&&(g.text=k,g.whitespace_before="",g.newlines=0,b.add_raw_token(g),b.print_newline(!0))}},C.prototype._handle_tag_open=function(b,g,_,x,k){var T=this._get_tag_open_token(g);if((_.is_unformatted||_.is_content_unformatted)&&!_.is_empty_element&&g.type===o.TAG_OPEN&&!T.is_start_tag?(b.add_raw_token(g),T.start_tag_token=this._tag_stack.try_pop(T.tag_name)):(b.traverse_whitespace(g),this._set_tag_position(b,g,T,_,x),T.is_inline_element||b.set_wrap_point(),b.print_token(g)),T.is_start_tag&&this._is_wrap_attributes_force){var O=0,F;do F=k.peek(O),F.type===o.ATTRIBUTE&&(T.attr_count+=1),O+=1;while(F.type!==o.EOF&&F.type!==o.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(T.alignment_size=g.text.length+1),!T.tag_complete&&!T.is_unformatted&&(b.alignment_size=T.alignment_size),T};var A=function(b,g,_){if(this.parent=g||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!_)this.tag_complete=!0;else{var x;this.tag_start_char=_.text[0],this.text=_.text,this.tag_start_char==="<"?(x=_.text.match(/^<([^\s>]*)/),this.tag_check=x?x[1]:""):(x=_.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=x?x[1]:"",(_.text.startsWith("{{#>")||_.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&_.next!==null?this.tag_check=_.next.text.split(" ")[0]:this.tag_check=_.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),_.type===o.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||_.closed&&_.closed.text==="/>";var k=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(k=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!b.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(k)))}};C.prototype._get_tag_open_token=function(b){var g=new A(this._options,this._tag_stack.get_parser_token(),b);return g.alignment_size=this._options.wrap_attributes_indent_size,g.is_end_tag=g.is_end_tag||h(g.tag_check,this._options.void_elements),g.is_empty_element=g.tag_complete||g.is_start_tag&&g.is_end_tag,g.is_unformatted=!g.tag_complete&&h(g.tag_check,this._options.unformatted),g.is_content_unformatted=!g.is_empty_element&&h(g.tag_check,this._options.content_unformatted),g.is_inline_element=h(g.tag_name,this._options.inline)||this._options.inline_custom_elements&&g.tag_name.includes("-")||g.tag_start_char==="{",g},C.prototype._set_tag_position=function(b,g,_,x,k){if(_.is_empty_element||(_.is_end_tag?_.start_tag_token=this._tag_stack.try_pop(_.tag_name):(this._do_optional_end_element(_)&&(_.is_inline_element||b.print_newline(!1)),this._tag_stack.record_tag(_),(_.tag_name==="script"||_.tag_name==="style")&&!(_.is_unformatted||_.is_content_unformatted)&&(_.custom_beautifier_name=u(_.tag_check,g)))),h(_.tag_check,this._options.extra_liners)&&(b.print_newline(!1),b._output.just_added_blankline()||b.print_newline(!0)),_.is_empty_element){if(_.tag_start_char==="{"&&_.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),_.indent_content=!0;var T=b.current_line_has_match(/{{#if/);T||b.print_newline(!1)}_.tag_name==="!--"&&k.type===o.TAG_CLOSE&&x.is_end_tag&&_.text.indexOf(`
`)===-1||(_.is_inline_element||_.is_unformatted||b.print_newline(!1),this._calcluate_parent_multiline(b,_))}else if(_.is_end_tag){var O=!1;O=_.start_tag_token&&_.start_tag_token.multiline_content,O=O||!_.is_inline_element&&!(x.is_inline_element||x.is_unformatted)&&!(k.type===o.TAG_CLOSE&&_.start_tag_token===x)&&k.type!=="TK_CONTENT",(_.is_content_unformatted||_.is_unformatted)&&(O=!1),O&&b.print_newline(!1)}else _.indent_content=!_.custom_beautifier_name,_.tag_start_char==="<"&&(_.tag_name==="html"?_.indent_content=this._options.indent_inner_html:_.tag_name==="head"?_.indent_content=this._options.indent_head_inner_html:_.tag_name==="body"&&(_.indent_content=this._options.indent_body_inner_html)),!(_.is_inline_element||_.is_unformatted)&&(k.type!=="TK_CONTENT"||_.is_content_unformatted)&&b.print_newline(!1),this._calcluate_parent_multiline(b,_)},C.prototype._calcluate_parent_multiline=function(b,g){g.parent&&b._output.just_added_newline()&&!((g.is_inline_element||g.is_unformatted)&&g.parent.is_inline_element)&&(g.parent.multiline_content=!0)};var w=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],E=["a","audio","del","ins","map","noscript","video"];return C.prototype._do_optional_end_element=function(b){var g=null;if(!(b.is_empty_element||!b.is_start_tag||!b.parent)){if(b.tag_name==="body")g=g||this._tag_stack.try_pop("head");else if(b.tag_name==="li")g=g||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(b.tag_name==="dd"||b.tag_name==="dt")g=g||this._tag_stack.try_pop("dt",["dl"]),g=g||this._tag_stack.try_pop("dd",["dl"]);else if(b.parent.tag_name==="p"&&w.indexOf(b.tag_name)!==-1){var _=b.parent.parent;(!_||E.indexOf(_.tag_name)===-1)&&(g=g||this._tag_stack.try_pop("p"))}else b.tag_name==="rp"||b.tag_name==="rt"?(g=g||this._tag_stack.try_pop("rt",["ruby","rtc"]),g=g||this._tag_stack.try_pop("rp",["ruby","rtc"])):b.tag_name==="optgroup"?g=g||this._tag_stack.try_pop("optgroup",["select"]):b.tag_name==="option"?g=g||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):b.tag_name==="colgroup"?g=g||this._tag_stack.try_pop("caption",["table"]):b.tag_name==="thead"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"])):b.tag_name==="tbody"||b.tag_name==="tfoot"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("thead",["table"]),g=g||this._tag_stack.try_pop("tbody",["table"])):b.tag_name==="tr"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(b.tag_name==="th"||b.tag_name==="td")&&(g=g||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),g=g||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return b.parent=this._tag_stack.get_parser_token(),g}},ef.Beautifier=C,ef}var vv;function OO(){if(vv)return rs.exports;vv=1;var e=VO().Beautifier,t=pv().Options;function r(o,i,l,d){var c=new e(o,i,l,d);return c.beautify()}return rs.exports=r,rs.exports.defaultOptions=function(){return new t},rs.exports}var yv;function BO(){if(yv)return sa;yv=1;var e=NO(),t=DO(),r=OO();function o(i,l,d,c){return d=d||e,c=c||t,r(i,l,d,c)}return o.defaultOptions=r.defaultOptions,sa.js=e,sa.css=t,sa.html=o,sa}(function(e){function t(r,o,i){var l=function(d,c){return r.js_beautify(d,c)};return l.js=r.js_beautify,l.css=o.css_beautify,l.html=i.html_beautify,l.js_beautify=r.js_beautify,l.css_beautify=o.css_beautify,l.html_beautify=i.html_beautify,l}(function(r){var o=BO();o.js_beautify=o.js,o.css_beautify=o.css,o.html_beautify=o.html,r.exports=t(o,o,o)})(e)})(zg);const io=zg.exports;function RO(e){const t={};return Object.values(e.import).forEach(r=>{t[r.name]=r.path}),` import { defineComponent } from "vue";
2025-05-24 17:29:32 +08:00
${Object.keys(t).map(r=>`import ${r} from '${t[r]}';`).join(`
2025-05-20 11:03:25 +08:00
`)}
export default defineComponent({
name: "FcTemplate",
components: {
${Object.keys(t).join(",")}
},
props: {},
data() {
return ${En(e.data)}
},
methods: ${En(e.methods)}
});
2025-05-27 15:27:24 +08:00
`}function $O(e){const t={};return Object.values(e.import).forEach(r=>{t[r.name]=r.path}),` import { ref } from "vue";
2025-05-24 17:29:32 +08:00
${Object.keys(t).map(r=>`import ${r} from '${t[r]}';`).join(`
2025-05-20 11:03:25 +08:00
`)}
2025-05-24 17:29:32 +08:00
${Object.keys(e.data).map(r=>`const ${r} = ref(${En(e.data[r])})`).join(`
2025-05-20 11:03:25 +08:00
`)}
2025-05-24 17:29:32 +08:00
${Object.keys(e.methods).map(r=>En(e.methods[r])).join(`
2025-05-20 11:03:25 +08:00
`)}
2025-05-27 15:27:24 +08:00
`}function nf(e,t){const r=[];return e&&e.forEach(o=>{if(!(o&&o._menu&&o._menu.sfc===!1))if(typeof o=="string")r.push(o);else if(o._fc_drag_tag){const i={...o,children:nf(o.children),_sfc:{}};t&&(i.slot=t),i.children.length?typeof i.children[0]=="string"&&(i._sfc.content=i.children[0],delete i.children):delete i.children,r.push(i)}else r.push(...nf(o.children,["DragBox","DragTool"].indexOf(o.type)>-1?o.slot||t:""))}),r}function IO(e,t,r,o){const i=e[0]?e[0].__fc__.vNode.aliasMap:void 0,l={style:{},import:{},data:{formData:{}},methods:{submit(){this.$refs.form.validate().then(()=>{})},reset(){this.$refs.form.resetFields()}}},d=[];function c(){let b=d.join(".");return b&&(b+="."),b}function u(b,g){return g?`<${b.type}${h(b)}>${g}</${b.type}>`:`<${b.type}${h(b)}/>`}function h(b){const g=b.props||{},_=b._sfc||{};let x=[];if(b.class&&x.push(`class="${Array.isArray(b.class)?b.class.join(" "):b.class}"`),b.slot&&b.slot!=="default"&&x.push("#"+b.slot),Object.keys(g).forEach(T=>{const O=g[T];if(O&&typeof O=="object"){const F=b._fc_id?b._fc_id+"_"+T:T;l.data[F]=O,x.push(`:${T}="${F}"`)}else if(O!=null&&O!==""&&typeof O!="function"){let F=typeof O=="string"?"":":";F+=`${T}="${O}"`,x.push(F)}}),b.field){let T=b.value;const O={array:[],string:"",number:0};if(b.value==null){const F=r[b._fc_drag_tag];F&&Array.isArray(F.validate)&&li(O,F.validate[0])&&(T=O[F.validate[0]])}l.data.formData[b.field]=T,_.vModel!==!1&&x.push(`v-model${_.modelField?":"+_.modelField:""}="formData.${c()}${b.field}"`)}if(b.style){const T=FO(b.style||"");T&&x.push(`style="${T}"`)}_.attr&&Object.keys(_.attr).forEach(T=>{x.push(`${T}="${_.attr[T]}"`)}),_.prop&&Object.keys(_.prop).forEach(T=>{const O=b._fc_id+"_"+T;l.data[O]=_.prop[T],x.push(`:${T}="${O}"`)}),_.flag&&_.flag.forEach(T=>{x.push(T)});let k=x.join(" ");return k&&(k=" "+k.trim()),k}function m(b){return b?b.map(g=>{var F,I,M;let _="";const x=g._menu;let k=rt(g),T;if(x&&x.sfc){let N;if(typeof x.sfc=="object"?(N=x.sfc.handle,x.sfc.style&&(l.style[x.name]=x.sfc.style),x.sfc.import&&(l.import[x.name]=x.sfc.import)):N=x.sfc,N){const B=N(k,{transition:m,scope:l,getParentFieldStr:c})||k;typeof B=="string"?T=B:k=B}}const O=k.native!==!1&&(k.field||k.title);return T||(k._sfc&&k._sfc.parentField&&d.push(k.parentField),k._sfc&&k._sfc.content?_=`${k._sfc.content}`:k.children&&(_=`
2025-05-20 11:03:25 +08:00
`+m(k.children)+`
2025-05-26 10:41:15 +08:00
`),i&&i[k.type]&&(k.type=id(i[k.type])),T=u(k,_),k._sfc&&k._sfc.parentField&&d.pop()),O&&((F=k==null?void 0:k.wrap)==null?void 0:F.show)!==!1&&(T=u({type:"elFormItem",props:{labelWidth:k.title?void 0:"0px",...k.wrap||{},prop:c()+k.field,label:k.title,required:k.$required===!0?!0:void 0},style:(I=k==null?void 0:k.wrap)==null?void 0:I.style,class:(M=k==null?void 0:k.wrap)==null?void 0:M.class},`
2025-05-20 11:03:25 +08:00
`+T+`
`)),T}).join(`
2025-05-27 15:27:24 +08:00
`):""}e=nf(e);const y=[];t.submitBtn.show&&y.push({type:"elButton",props:{type:"primary"},_sfc:{attr:{"@click":"submit"},content:t.submitBtn.innerText||"\u63D0\u4EA4"}}),t.resetBtn.show&&y.push({type:"elButton",props:{type:"default"},_sfc:{attr:{"@click":"reset"},content:t.resetBtn.innerText||"\u91CD\u7F6E"}}),y.length&&e.push({type:"elFormItem",children:y});const C=m([{type:"template",children:[{type:"elForm",props:t.form||{},children:e,_sfc:{attr:{ref:"form",":model":"formData"},flag:["@submit.prevent"]}}]}]);t.formData&&yl(l.data.formData,t.formData);const A=io.html(C,{indent_size:2,indent_char:" ",indent_scripts:"separate",jslint_happy:!1}),w=io.js(o?RO(l):$O(l),{indent_size:2,indent_char:" ",indent_scripts:"separate"}),E=io.css(Object.values(l.style).join(`
`),{indent_size:2,indent_char:" ",indent_scripts:"separate"});return`${A}
2025-05-24 17:29:32 +08:00
<script${o?"":" setup"}>
2025-05-20 11:03:25 +08:00
${w}
<\/script>
<style>
${E}
</style>
2025-05-28 11:05:44 +08:00
`}function FO(e){return!e||typeof e=="string"?e||"":Object.keys(e).reduce((t,r)=>(e[r]!=null&&e[r]!==""&&t.push(la(r)+":"+e[r]+";"),t),[]).join("")}const kj="",PO=n.defineComponent({name:"SubList",components:{fcDraggable:jr,VNode:wg,ConfigItem:Fn},inject:["designer"],computed:{t(){return this.designer.setupState.t},activeRuleChildren(){return this.designer.setupState.activeRuleChildren},activeRule(){return this.designer.setupState.activeRule}},methods:{toolHandle(...e){this.designer.setupState.toolHandle(...e)},subRender(...e){return this.designer.setupState.subRender(...e)},end({oldIndex:e,newIndex:t}){if(e===t)return;const r=this.activeRule.children.splice(e,1);this.activeRule.children.splice(t,0,r[0]),this.activeRule.key=We()}}}),MO={class:"_fc-sublist"},LO={class:"_fc-r-title"},jO=["onClick"],zO=["onClick"];function UO(e,t,r,o,i,l){const d=n.resolveComponent("VNode"),c=n.resolveComponent("ConfigItem"),u=n.resolveComponent("fcDraggable");return n.openBlock(),n.createElementBlock("div",MO,[n.createElementVNode("p",LO,[n.createElementVNode("span",null,n.toDisplayString(e.t("designer.sublist")),1),n.createElementVNode("i",{class:"fc-icon icon-add-circle",onClick:t[0]||(t[0]=h=>e.toolHandle(e.activeRule,"addChild"))})]),n.createVNode(u,{group:{name:"sub",pull:"clone",put:!1},sort:!0,handle:".icon-drag",direction:"vertical",animation:0,itemKey:"_fc_id",onEnd:e.end,list:e.activeRuleChildren},{item:n.withCtx(({element:h,index:m})=>[n.createVNode(c,null,n.createSlots({label:n.withCtx(()=>[t[1]||(t[1]=n.createElementVNode("i",{class:"fc-icon icon-drag"},null,-1)),n.createElementVNode("span",null,n.toDisplayString((e.t("com."+h._menu.name+".name")||e.activeRule._menu.label)+" "+(m+1)),1)]),default:n.withCtx(()=>[n.createElementVNode("i",{class:"fc-icon icon-copy",onClick:y=>e.toolHandle(h,"copy")},null,8,jO),n.createElementVNode("i",{class:"fc-icon icon-delete",onClick:y=>e.toolHandle(h,"delete")},null,8,zO)]),_:2},[e.activeRule._menu.subRender?{name:"append",fn:n.withCtx(()=>[n.createVNode(d,{fn:()=>e.subRender(e.activeRule._menu.subRender,e.activeRule,h)},null,8,["fn"])]),key:"0"}:void 0]),1024)]),_:1},8,["onEnd","list"])])}const HO=Te(PO,[["render",UO]]),Nj="",WO=n.defineComponent({name:"ToolsBar",inject:["designer"],computed:{t(){return this.designer.setupState.t},tools(){const e=this.designer.setupState,t=[];return!e.activeRule&&!e.customForm.config||(e.baseForm.isShow&&t.push({label:this.t("designer.rule"),icon:"base"}),(e.propsForm.isShow||e.customForm.isShow&&e.customForm.propsShow)&&t.push({label:this.t("designer.props"),icon:"props"}),e.advancedForm.isShow&&t.push({label:this.t("designer.advanced"),icon:"advanced"}),e.styleForm.isShow&&t.push({label:this.t("designer.style"),icon:"style"}),e.eventShow&&t.push({label:this.t("designer.event"),icon:"event"}),e.validateForm.isShow&&t.push({label:this.t("designer.validate"),icon:"validate"})),t}},methods:{onClick(e){document.querySelector(`#_fd-config-${e}`).scrollIntoView({block:"start",inline:"nearest",behavior:"smooth"})},clearActiveRule(){this.designer.setupState.clearActiveRule()}}}),GO={key:0,class:"_fc-r-tools-bar"},KO={class:"_fc-r-tools"},YO=["onClick"];function QO(e,t,r,o,i,l){const d=n.resolveComponent("el-tooltip");return e.tools.length>2?(n.openBlock(),n.createElementBlock("div",GO,[n.createElementVNode("div",KO,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.tools,c=>(n.openBlock(),n.createBlock(d,{key:c.icon,effect:"dark",content:c.label,placement:"bottom",persistent:"","hide-after":0},{default:n.withCtx(()=>[n.createElementVNode("div",{class:"_fc-r-tool",onClick:u=>e.onClick(c.icon)},[n.createElementVNode("i",{class:n.normalizeClass(["fc-icon",`icon-config-${c.icon}`])},null,2)],8,YO)]),_:2},1032,["content"]))),128)),n.createElementVNode("div",{class:"_fc-r-tools-close _fc-r-tool",onClick:t[0]||(t[0]=(...c)=>e.clearActiveRule&&e.clearActiveRule(...c))},t[1]||(t[1]=[n.createElementVNode("i",{class:"fc-icon icon-add2"},null,-1)]))])])):n.createCommentVNode("",!0)}const JO=Te(WO,[["render",QO]]),Tj="",XO=n.defineComponent({name:"ConfigTit
2025-05-20 11:03:25 +08:00
display:flex;
}
._demo2{
display:flex;
2025-05-27 15:27:24 +08:00
}`,this.activeStyle=!0,this.activeIdx=""},active(e){this.activeStyle=!1,this.activeIdx!==e&&(this.handle=this.value[e].style||"",this.activeIdx=e)},addCus(){const e=this.cusValue&&this.cusValue.trim();if(e){const t="cls_"+We();this.value[t]={label:e,style:{}},this.active(t),this.closeCus()}},closeCus(){this.cus=!1,this.cusValue=""},cusEvent(){this.cus=!0},save(){this.activeStyle?(this.$refs.editor.save(),this.designer.setupState.formOptions.style=this.content,this.activeStyle=!1):(this.value[this.activeIdx].style=this.handle,this.activeIdx="")},rm(e){delete this.value[e],e===this.activeIdx&&(this.activeIdx="")},close(){this.activeIdx=""},submit(){(this.activeIdx||this.activeStyle)&&this.save(),this.$emit("update:modelValue",{...this.value}),this.visible=!1},updateGlobalStyle(){let e="";const t=this.modelValue||{};Object.keys(t).forEach(r=>{let o="";t[r].style&&Object.keys(t[r].style).forEach(i=>{o+=la(i)+":"+t[r].style[i]+";"}),t[r].content&&(o+=t[r].content+";"),o&&(e+=`.${r}{${o}}`)}),e&&(this.styleEl.innerHTML=e)}},created(){this.styleEl=n.markRaw(document.createElement("style")),this.styleEl.type="text/css",document.head.appendChild(this.styleEl),this.updateGlobalStyle()},unmounted(){document.head.removeChild(this.styleEl)}}),w$={class:"_fd-gcc"},C$={class:"_fd-gcc-method"},_$={class:"_fd-label"},E$=["onClick"],S$={class:"_fd-gcc-method"},A$={key:0,class:"_fd-label"},x$=["onClick"];function k$(e,t,r,o,i,l){const d=n.resolveComponent("el-button"),c=n.resolveComponent("el-badge"),u=n.resolveComponent("Warning"),h=n.resolveComponent("el-header"),m=n.resolveComponent("el-menu-item"),y=n.resolveComponent("el-input"),C=n.resolveComponent("el-menu"),A=n.resolveComponent("el-main"),w=n.resolveComponent("el-container"),E=n.resolveComponent("el-aside"),b=n.resolveComponent("StyleEditor"),g=n.resolveComponent("StyleConfig"),_=n.resolveComponent("el-form"),x=n.resolveComponent("el-dialog");return n.openBlock(),n.createElementBlock("div",w$,[n.createVNode(c,{value:e.eventNum,type:"warning",hidden:e.eventNum<1},{default:n.withCtx(()=>[n.createVNode(d,{class:"_fd-plain-button",plain:"",onClick:e.open,size:"small"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.t("class.title")),1)]),_:1},8,["onClick"])]),_:1},8,["value","hidden"]),n.createVNode(x,{class:"_fd-gcc-dialog _fd-config-dialog",modelValue:e.visible,"onUpdate:modelValue":t[8]||(t[8]=k=>e.visible=k),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"700px"},{header:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.t("form.globalClass"))+" ",1),n.createVNode(u,{tooltip:e.t("warning.globalClass")},null,8,["tooltip"])]),footer:n.withCtx(()=>[n.createElementVNode("div",null,[n.createVNode(d,{size:"default",onClick:t[7]||(t[7]=k=>e.visible=!1)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.t("props.cancel")),1)]),_:1}),n.createVNode(d,{type:"primary",size:"default",onClick:e.submit},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:n.withCtx(()=>[n.createVNode(w,{class:"_fd-gcc-con",style:{height:"600px"}},{default:n.withCtx(()=>[n.createVNode(E,{style:{width:"255px"}},{default:n.withCtx(()=>[n.createVNode(w,{class:"_fd-gcc-l"},{default:n.withCtx(()=>[n.createVNode(h,{class:"_fd-gcc-head",height:"40px"},{default:n.withCtx(()=>[n.createVNode(d,{link:"",type:"primary",size:"default",onClick:e.cusEvent},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.t("class.create")),1)]),_:1},8,["onClick"])]),_:1}),n.createVNode(A,null,{default:n.withCtx(()=>[n.createVNode(C,null,{default:n.withCtx(()=>[n.createVNode(m,{class:n.normalizeClass({"is-active":e.activeStyle,"_fd-gcc-default":!0})},{default:n.withCtx(()=>[n.createElementVNode("div",{class:"_fd-gcc-title",onClick:t[0]||(t[0]=n.withModifiers((...k)=>e.changeStyle&&e.changeStyle(...k),["stop"]))},[n.createElementVNode("div",C$,[n.createElementVNode("span",_$,n.toDisplayString(e.t("form.globalClass")),1)])])]),_:1},8,["class"]),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.value,(k
`).forEach(function(d){i=d.indexOf(":"),r=d.substring(0,i).trim().toLowerCase(),o=d.substring(i+1).trim(),!(!r||t[r]&&BF[r])&&(r==="set-cookie"?t[r]?t[r].push(o):t[r]=[o]:t[r]=t[r]?t[r]+", "+o:o)}),t},Xv=Symbol("internals");function fa(e){return e&&String(e).trim().toLowerCase()}function fs(e){return e===!1||e==null?e:xe.isArray(e)?e.map(fs):String(e)}function $F(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=r.exec(e);)t[o[1]]=o[2];return t}const IF=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pf(e,t,r,o,i){if(xe.isFunction(o))return o.call(this,t,r);if(i&&(t=r),!!xe.isString(t)){if(xe.isString(o))return t.indexOf(o)!==-1;if(xe.isRegExp(o))return o.test(t)}}function FF(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,o)=>r.toUpperCase()+o)}function PF(e,t){const r=xe.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+r,{value:function(i,l,d){return this[o].call(this,t,i,l,d)},configurable:!0})})}class ps{constructor(t){t&&this.set(t)}set(t,r,o){const i=this;function l(c,u,h){const m=fa(u);if(!m)throw new Error("header name must be a non-empty string");const y=xe.findKey(i,m);(!y||i[y]===void 0||h===!0||h===void 0&&i[y]!==!1)&&(i[y||u]=fs(c))}const d=(c,u)=>xe.forEach(c,(h,m)=>l(h,m,u));if(xe.isPlainObject(t)||t instanceof this.constructor)d(t,r);else if(xe.isString(t)&&(t=t.trim())&&!IF(t))d(RF(t),r);else if(xe.isObject(t)&&xe.isIterable(t)){let c={},u,h;for(const m of t){if(!xe.isArray(m))throw TypeError("Object iterator must return a key-value pair");c[h=m[0]]=(u=c[h])?xe.isArray(u)?[...u,m[1]]:[u,m[1]]:m[1]}d(c,r)}else t!=null&&l(r,t,o);return this}get(t,r){if(t=fa(t),t){const o=xe.findKey(this,t);if(o){const i=this[o];if(!r)return i;if(r===!0)return $F(i);if(xe.isFunction(r))return r.call(this,i,o);if(xe.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=fa(t),t){const o=xe.findKey(this,t);return!!(o&&this[o]!==void 0&&(!r||pf(this,this[o],o,r)))}return!1}delete(t,r){const o=this;let i=!1;function l(d){if(d=fa(d),d){const c=xe.findKey(o,d);c&&(!r||pf(o,o[c],c,r))&&(delete o[c],i=!0)}}return xe.isArray(t)?t.forEach(l):l(t),i}clear(t){const r=Object.keys(this);let o=r.length,i=!1;for(;o--;){const l=r[o];(!t||pf(this,this[l],l,t,!0))&&(delete this[l],i=!0)}return i}normalize(t){const r=this,o={};return xe.forEach(this,(i,l)=>{const d=xe.findKey(o,l);if(d){r[d]=fs(i),delete r[l];return}const c=t?FF(l):String(l).trim();c!==l&&delete r[l],r[c]=fs(i),o[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return xe.forEach(this,(o,i)=>{o!=null&&o!==!1&&(r[i]=t&&xe.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const o=new this(t);return r.forEach(i=>o.set(i)),o}static accessor(t){const o=(this[Xv]=this[Xv]={accessors:{}}).accessors,i=this.prototype;function l(d){const c=fa(d);o[c]||(PF(i,d),o[c]=!0)}return xe.isArray(t)?t.forEach(l):l(t),this}}ps.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),xe.reduceDescriptors(ps.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[r]=o}}}),xe.freezeMethods(ps);const qn=ps;function hf(e,t){const r=this||ff,o=t||r,i=qn.from(o.headers);let l=o.data;return xe.forEach(e,function(c){l=c.call(r,l,i.normalize(),t?t.status:void 0)}),i.normalize(),l}function Zv(e){return!!(e&&e.__CANCEL__)}function lo(e,t,r){ft.call(this,e==null?"canceled":e,ft.ERR_CANCELED,t,r),this.name="CanceledError"}xe.inherits(lo,ft,{__CANCEL__:!0});function qv(e,t,r){const o=r.config.validateStatus;!r.status||!o||o(r.status)?e(r):t(new ft("Request failed with status code "+r.status,[ft.ERR_BAD_REQUEST,ft.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function MF(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function LF(e,t){e=e||10;const r=new Array(e),o=new Array(e);let i=0,l=0,d;return t=t!==void 0?t:1e3,function(u){const h=Date.now(),m=o[l];d||(d=h),r[i]=u,o[i]=h;let y=l,C=0;for(;y!==i;)C+=r[y++],y=y%e;if(i=(i+1)%e,i===l&&(l=(l+1)%e),h-d<t)return;const A=m&&h-m;return A?Math.round(C*1e3/A):void 0}}function jF(e,t){let r=0,o=1e3/t,i,l;const d=(h,m=Date.now())=>{r=m,i=null,l&&(clearTimeout(l),l=null),e.apply(null,h)};return[(...h)=>{const m=Date.now(),y=m-r;y>=o?d(h,m):(i=h,l||(l=setTimeout(()=>{l=null,d(i)},o-y)))},()=>i&&d(i)]}const hs=(e,t,r=3)=>{let o=0;const i=LF(50,250);return jF(l=>{const d=l.loaded,c=l.lengthComputable?l.total:void 0,u=d-o,h=i(u),m=d<=c;o=d;const y={loaded:d,total:c,progress:c?d/c:void 0,bytes:u,rate:h||void 0,estimated:h&&c&&m?(c-d)/h:void 0,event:l,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(y)},r)},ey=(e,t)=>{const r=e!=null;return[o=>t[0]({lengthComputable:r,total:e,loaded:o}),t[1]]},ty=e=>(...t)=>xe.asap(()=>e(...t)),zF=un.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,un.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(un.origin),un.navigator&&/(msie|trident)/i.test(un.navigator.userAgent)):()=>!0,UF=un.hasStandardBrowserEnv?{write(e,t,r,o,i,l){const d=[e+"="+encodeURIComponent(t)];xe.isNumber(r)&&d.push("expires="+new Date(r).toGMTString()),xe.isString(o)&&d.push("path="+o),xe.isString(i)&&d.push("domain="+i),l===!0&&d.push("secure"),document.cookie=d.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function HF(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function WF(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ny(e,t,r){let o=!HF(t);return e&&(o||r==!1)?WF(e,t):t}const iy=e=>e instanceof qn?{...e}:e;function yr(e,t){t=t||{};const r={};function o(h,m,y,C){return xe.isPlainObject(h)&&xe.isPlainObject(m)?xe.merge.call({caseless:C},h,m):xe.isPlainObject(m)?xe.merge({},m):xe.isArray(m)?m.slice():m}function i(h,m,y,C){if(xe.isUndefined(m)){if(!xe.isUndefined(h))return o(void 0,h,y,C)}else return o(h,m,y,C)}function l(h,m){if(!xe.isUndefined(m))return o(void 0,m)}function d(h,m){if(xe.isUndefined(m)){if(!xe.isUndefined(h))return o(void 0,h)}else return o(void 0,m)}function c(h,m,y){if(y in t)return o(h,m);if(y in e)return o(void 0,h)}const u={url:l,method:l,data:l,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transpo
`+l.map(dy).join(`
`):" "+dy(l[0]):"as no adapter specified";throw new ft("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return o},adapters:gf};function vf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new lo(null,e)}function uy(e){return vf(e),e.headers=qn.from(e.headers),e.data=hf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),cy.getAdapter(e.adapter||ff.adapter)(e).then(function(o){return vf(e),o.data=hf.call(e,e.transformResponse,o),o.headers=qn.from(o.headers),o},function(o){return Zv(o)||(vf(e),o&&o.response&&(o.response.data=hf.call(e,e.transformResponse,o.response),o.response.headers=qn.from(o.response.headers))),Promise.reject(o)})}const fy="1.9.0",vs={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vs[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const py={};vs.transitional=function(t,r,o){function i(l,d){return"[Axios v"+fy+"] Transitional option '"+l+"'"+d+(o?". "+o:"")}return(l,d,c)=>{if(t===!1)throw new ft(i(d," has been removed"+(r?" in "+r:"")),ft.ERR_DEPRECATED);return r&&!py[d]&&(py[d]=!0,console.warn(i(d," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(l,d,c):!0}},vs.spelling=function(t){return(r,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function nP(e,t,r){if(typeof e!="object")throw new ft("options must be an object",ft.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let i=o.length;for(;i-- >0;){const l=o[i],d=t[l];if(d){const c=e[l],u=c===void 0||d(c,l,e);if(u!==!0)throw new ft("option "+l+" must be "+u,ft.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ft("Unknown option "+l,ft.ERR_BAD_OPTION)}}const ys={assertOptions:nP,validators:vs},mi=ys.validators;class bs{constructor(t){this.defaults=t||{},this.interceptors={request:new Yv,response:new Yv}}async request(t,r){try{return await this._request(t,r)}catch(o){if(o instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const l=i.stack?i.stack.replace(/^.+\n/,""):"";try{o.stack?l&&!String(o.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(o.stack+=`
2025-05-28 11:05:44 +08:00
`+l):o.stack=l}catch{}}throw o}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=yr(this.defaults,r);const{transitional:o,paramsSerializer:i,headers:l}=r;o!==void 0&&ys.assertOptions(o,{silentJSONParsing:mi.transitional(mi.boolean),forcedJSONParsing:mi.transitional(mi.boolean),clarifyTimeoutError:mi.transitional(mi.boolean)},!1),i!=null&&(xe.isFunction(i)?r.paramsSerializer={serialize:i}:ys.assertOptions(i,{encode:mi.function,serialize:mi.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ys.assertOptions(r,{baseUrl:mi.spelling("baseURL"),withXsrfToken:mi.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let d=l&&xe.merge(l.common,l[r.method]);l&&xe.forEach(["delete","get","head","post","put","patch","common"],w=>{delete l[w]}),r.headers=qn.concat(d,l);const c=[];let u=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(r)===!1||(u=u&&E.synchronous,c.unshift(E.fulfilled,E.rejected))});const h=[];this.interceptors.response.forEach(function(E){h.push(E.fulfilled,E.rejected)});let m,y=0,C;if(!u){const w=[uy.bind(this),void 0];for(w.unshift.apply(w,c),w.push.apply(w,h),C=w.length,m=Promise.resolve(r);y<C;)m=m.then(w[y++],w[y++]);return m}C=c.length;let A=r;for(y=0;y<C;){const w=c[y++],E=c[y++];try{A=w(A)}catch(b){E.call(this,b);break}}try{m=uy.call(this,A)}catch(w){return Promise.reject(w)}for(y=0,C=h.length;y<C;)m=m.then(h[y++],h[y++]);return m}getUri(t){t=yr(this.defaults,t);const r=ny(t.baseURL,t.url,t.allowAbsoluteUrls);return Kv(r,t.params,t.paramsSerializer)}}xe.forEach(["delete","get","head","options"],function(t){bs.prototype[t]=function(r,o){return this.request(yr(o||{},{method:t,url:r,data:(o||{}).data}))}}),xe.forEach(["post","put","patch"],function(t){function r(o){return function(l,d,c){return this.request(yr(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:l,data:d}))}}bs.prototype[t]=r(),bs.prototype[t+"Form"]=r(!0)});const ws=bs;class yf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(l){r=l});const o=this;this.promise.then(i=>{if(!o._listeners)return;let l=o._listeners.length;for(;l-- >0;)o._listeners[l](i);o._listeners=null}),this.promise.then=i=>{let l;const d=new Promise(c=>{o.subscribe(c),l=c}).then(i);return d.cancel=function(){o.unsubscribe(l)},d},t(function(l,d,c){o.reason||(o.reason=new lo(l,d,c),r(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=o=>{t.abort(o)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new yf(function(i){t=i}),cancel:t}}}const iP=yf;function rP(e){return function(r){return e.apply(null,r)}}function oP(e){return xe.isObject(e)&&e.isAxiosError===!0}const bf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,R
`+D.style),S.formOptions.language||(S.formOptions.language={}),D.language&&Object.keys(D.language).forEach(W=>{S.formOptions.language[W]={...S.formOptions.language[W]||{},...D.language[W]}}),D.languageKey){const W=X.getConfig("localeOptions",[{value:"zh-cn",label:"\u7B80\u4F53\u4E2D\u6587"},{value:"en",label:"English"}]);D.languageKey.forEach(Y=>{W.forEach(({value:q})=>{S.formOptions.language[q]||(S.formOptions.language[q]={}),S.formOptions.language[q][Y]||(S.formOptions.language[q][Y]="")})})}},updateOptionsValue(){const D={};S.oldOptionsKeys.forEach(Y=>{D[Y]=void 0});const W={...D,...S.formOptions.form};Object.keys(S.formOptions).forEach(Y=>{const q=S.formOptions[Y];W[">"+Y]=q,typeof q=="object"&&Object.keys(q).forEach(ee=>{W[Y+">"+ee]=q[ee]})}),S.form.value=W},setGlobalEvent(D){S.formOptions.globalEvent={...S.formOptions.globalEvent||{},...D},X.updateOptionsValue()},setGlobalData(D){S.formOptions.globalData={...S.formOptions.globalData||{},...D},X.updateOptionsValue()},setGlobalClass(D){S.formOptions.globalClass={...S.formOptions.globalClass||{},...D},X.updateOptionsValue()},setGlobalVariable(D){S.formOptions.globalVariable={...S.formOptions.globalVariable||{},...D},X.updateOptionsValue()},tidyRule(D){var Y;["control","computed","on","hidden","display"].forEach(q=>{D[q]!=null&&(D["_"+q]=D[q],delete D[q])}),(Y=D.effect)!=null&&Y.loadData&&(D._loadData=D.effect.loadData,delete D.effect.loadData),D.$loadData&&(D._loadData=D.$loadData,delete D.$loadData)},loadRule(D,W,Y){const q=[];return D.forEach(ee=>{if(dt.String(ee))return q.push(ee);if(ee._fc_drag_skip)return;let oe=S.dragRuleList[ee._fc_drag_tag]||S.dragRuleList[ee.type];if(oe||(oe=DC(ee),ee._fc_drag_tag="_"),Y&&(ee._fc_template=Y),oe&&oe.loadRule&&oe.loadRule(ee),ee.children=X.loadRule(ee.children||[],oe,Y),oe){const he=ee.slot;let Ae;W&&W.slot&&he&&he!=="default"&&(Ae=X.getSlotConfig(W,he,oe)),delete ee.slot,ee=X.makeRule(Ae||oe,ee),he&&(ee.slot=he)}else X.tidyRule(ee);q.push(ee)}),q},parseRule(D,W){return[...D].reduce((Y,q)=>{let ee=W;if(dt.String(q))return Y.push(q),Y;if(q.type==="DragBox")return Y.push(...X.parseRule(q.children,ee||q.slot)),Y;if(q.type==="DragTool"){if(ee=q.slot||W,q=q.children[0],dt.String(q))return Y.push(q),Y;if(q.type==="DragBox")return Y.push(...X.parseRule(q.children,ee||q.slot)),Y}return!q||q._fc_drag_skip||(q={...q},ee&&ee!=="default"&&(q.slot=ee),q.children&&q.children.length&&(q.children=X.parseRule(q.children)),delete q.key,delete q.component,delete q._fc_page_tag,q._menu&&(q._menu.parseRule&&q._menu.parseRule(q),delete q._menu),q._fc_drag_tag==="_"&&delete q._fc_drag_tag,["control","computed","on","hidden","display"].forEach(he=>{q["_"+he]!=null&&q["_"+he]!==""&&(q[he]=q["_"+he]),delete q["_"+he]}),q.slot||delete q.slot,q._loadData&&(q.$loadData=q._loadData,delete q._loadData),q.props&&Object.keys(q.props).forEach(he=>{const Ae=q.props[he];si(Ae)&&delete q.props[he]}),q.props&&q.props.key&&(q.key=q.props.key),[q.wrap,q.title,q.info,q].forEach(he=>{he&&Object.keys(he).filter(Ae=>Ae.indexOf("__")===0||he[Ae]===""||Array.isArray(he[Ae])&&he[Ae].length===0||dt.Object(he[Ae])&&Object.keys(he[Ae]).length===0).forEach(Ae=>{delete he[Ae]})}),Y.push(q)),Y},[])},fields(){return S.dragForm.api.all().map(D=>D.field).filter(D=>!!D)},getTitle(D){var W,Y,q;return(((q=(Y=(W=D==null?void 0:D.__fc__)==null?void 0:W.refRule)==null?void 0:Y.__$title)==null?void 0:q.value)||D.title||"").trim()||D.props&&D.props.label||z("com."+(D._menu&&D._menu.name)+".name")||D._menu&&D._menu.label||D.type},baseChange(D,W,Y,q){X.handleChange("",D,W,Y,q)},formOptChange(D,W){S.form.value[D]=W,D.indexOf(">")===-1&&(D="form>"+D);let Y=S.formOptions;const q=D.split(">"),ee=q.pop();q.forEach(oe=>{oe&&(Y[oe]||(Y[oe]={}),Y=Y[oe])}),Y[ee]=W},propRemoveField(D,W,Y){var q,ee,oe;if(S.activeRule&&Y[S.activeRule._fc_id]===S.activeRule){X.unWatchActiveRule();const he=D;S.dragForm.api.sync(S.activeRule),D.indexOf("__")!==0&&(D==="formCreateChild"?delete S.activeRule.children[0]:D.indexOf("formCreate")===0||D.indexOf(">")>0?(D.indexOf("formCreate")<0&&(D="props>"+D),G(D,({source:Ae,fi
2025-05-27 15:27:24 +08:00
`)[0])!=null?i:""},load(){this.oldVal=this.modelValue,this.$nextTick(()=>{this.editor=n.markRaw(ki(this.$refs.editor,{lineNumbers:!0,mode:"xml",lint:!0,line:!0,tabSize:2,lineWrapping:!0,value:this.modelValue||""}))})},onOk(){const e=this.editor.getValue();return!this.text&&this.validateXML(e)?(dn(this.t("struct.errorMsg")),!1):(this.visible=!1,e!==this.oldVal&&this.$emit("update:modelValue",e),!0)}}}),rM={class:"_fd-html-editor"},oM={key:0,ref:"editor"};function aM(e,t,r,o,i,l){const d=n.resolveComponent("el-button"),c=n.resolveComponent("el-dialog");return n.openBlock(),n.createElementBlock("div",rM,[n.createVNode(d,{class:"_fd-plain-button",plain:"",onClick:t[0]||(t[0]=u=>e.visible=!0)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.title||e.t("struct.title")),1)]),_:1}),n.createVNode(c,{class:"_fd-html-editor-con",title:e.title||e.t("struct.title"),modelValue:e.visible,"onUpdate:modelValue":t[2]||(t[2]=u=>e.visible=u),"close-on-click-modal":!1,"append-to-body":"",width:"800px"},{footer:n.withCtx(()=>[n.createElementVNode("div",null,[n.createVNode(d,{onClick:t[1]||(t[1]=u=>e.visible=!1),size:"default"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.t("props.cancel")),1)]),_:1}),n.createVNode(d,{type:"primary",onClick:e.onOk,size:"default"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:n.withCtx(()=>[e.visible?(n.openBlock(),n.createElementBlock("div",oM,null,512)):n.createCommentVNode("",!0)]),_:1},8,["title","modelValue"])])}const lM=Te(iM,[["render",aM]]),gz="",sM=n.defineComponent({name:"FieldInput",inject:["designer"],emits:["update:modelValue"],props:{modelValue:String,disabled:Boolean},computed:{fieldList(){if(this.key)return this.getFieldList()},subformFieldList(){const e=this.designer.setupState.fieldList||[],t=this.fieldLeafSelectable?e:this.removeLeafNodes(rt(e));return t.length?t:e},fieldReadonly(){return this.designer.setupState.fieldReadonly},isSubform(){return this.activeRule&&this.activeRule._menu.subForm},activeRule(){return this.designer.setupState.activeRule},relationField(){return this.designer.props.config.relationField},fieldLeafSelectable(){return this.designer.props.config.fieldLeafSelectable!==!1},t(){return this.designer.setupState.t}},data(){return{value:this.modelValue||"",oldValue:"",key:1,activeNode:null}},watch:{modelValue(e){this.value=e}},methods:{getFieldList(){let e=this.designer.setupState.fieldList||[];if(this.relationField===!1)return e;if(this.isSubform)e=this.subformFieldList;else{const t=this.activeRule;let r=t&&t.__fc__&&t.__fc__.parent;for(;r;)if(r.rule._menu&&["array","object"].indexOf(r.rule._menu.subForm)>-1){const o=this.findChildrenById(e,r.rule.field)||e;o.length&&(e=o);break}else r=r.parent}return e},removeLeafNodes(e){if(!Array.isArray(e)||e.length===0)return e;function t(r){return r.filter(o=>o.children&&o.children.length>0?(o.children=t(o.children),!0):!1)}return t(e)},findChildrenById(e,t){if(!Array.isArray(e))return null;for(const r of e){if(r.value===t)return r.children||[];if(r.children){const o=this.findChildrenById(r.children,t);if(o!==null)return o}}return null},copy(){di(this.modelValue)},getSubChildren(){let e=this.designer.setupState.getSubFormChildren(this.activeRule)||[];return e=dt.trueArray(e)?e:this.designer.setupState.children,e},getSubFieldChildren(){const e=this.getSubChildren(),t=[],r=o=>(o&&o.forEach(i=>{i&&i._fc_drag_tag&&i.field?t.push({...i,children:[]}):i&&i.children&&r(i.children)}),t);return r(e)},checkValue(){const e=this.oldValue;Ep(e);let t=(this.value||"").replace(/[\s\ ]/g,"");if(t)if(/^[a-zA-Z]/.test(t)){if(e!==t){const r=t.indexOf(".")>-1;if(r&&(t=t.replaceAll(".","_")),this.getSubFieldChildren().filter(o=>o.field===t).length>0)return dn(this.t("computed.fieldExist",{label:t})),e;if(r)return t}}else return dn(this.t("computed.fieldChar")),e;else return dn(this.t("computed.fieldEmpty")),e;return this.oldValue="",t},onFocus(){this.oldValue=this.value},makeField(){this.oldValue=this.value,this.value=We(),this.onInput()},updateRule(e){const
2025-05-20 11:03:25 +08:00
* @form-create/component-wangeditor v3.2.14
* (c) 2018-2024 xaboy
* Github https://github.com/xaboy/form-create with wangeditor
* Released under the MIT License.
2025-05-27 15:27:24 +08:00
*/function _y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function V8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_y(Object(r),!0).forEach(function(o){O8(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_y(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function Jt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Jt=function(t){return typeof t}:Jt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jt(e)}function O8(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ey={exports:{}};(function(e,t){(function(o,i){e.exports=i()})(window,function(){return function(r){var o={};function i(l){if(o[l])return o[l].exports;var d=o[l]={i:l,l:!1,exports:{}};return r[l].call(d.exports,d,d.exports,i),d.l=!0,d.exports}return i.m=r,i.c=o,i.d=function(l,d,c){i.o(l,d)||Object.defineProperty(l,d,{enumerable:!0,get:c})},i.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},i.t=function(l,d){if(d&1&&(l=i(l)),d&8||d&4&&Jt(l)==="object"&&l&&l.__esModule)return l;var c=Object.create(null);if(i.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:l}),d&2&&typeof l!="string")for(var u in l)i.d(c,u,function(h){return l[h]}.bind(null,u));return c},i.n=function(l){var d=l&&l.__esModule?function(){return l.default}:function(){return l};return i.d(d,"a",d),d},i.o=function(l,d){return Object.prototype.hasOwnProperty.call(l,d)},i.p="",i(i.s=141)}([function(r,o){function i(l){return l&&l.__esModule?l:{default:l}}r.exports=i},function(r,o,i){r.exports=i(142)},function(r,o,i){i.r(o),i.d(o,"__extends",function(){return d}),i.d(o,"__assign",function(){return c}),i.d(o,"__rest",function(){return u}),i.d(o,"__decorate",function(){return h}),i.d(o,"__param",function(){return m}),i.d(o,"__metadata",function(){return y}),i.d(o,"__awaiter",function(){return C}),i.d(o,"__generator",function(){return A}),i.d(o,"__createBinding",function(){return w}),i.d(o,"__exportStar",function(){return E}),i.d(o,"__values",function(){return b}),i.d(o,"__read",function(){return g}),i.d(o,"__spread",function(){return _}),i.d(o,"__spreadArrays",function(){return x}),i.d(o,"__spreadArray",function(){return k}),i.d(o,"__await",function(){return T}),i.d(o,"__asyncGenerator",function(){return O}),i.d(o,"__asyncDelegator",function(){return F}),i.d(o,"__asyncValues",function(){return I}),i.d(o,"__makeTemplateObject",function(){return M}),i.d(o,"__importStar",function(){return B}),i.d(o,"__importDefault",function(){return L}),i.d(o,"__classPrivateFieldGet",function(){return U}),i.d(o,"__classPrivateFieldSet",function(){return H});/*! *****************************************************************************
2025-05-20 11:03:25 +08:00
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
2025-05-27 15:27:24 +08:00
***************************************************************************** */var l=function(z,$){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,J){S.__proto__=J}||function(S,J){for(var Q in J)Object.prototype.hasOwnProperty.call(J,Q)&&(S[Q]=J[Q])},l(z,$)};function d(R,z){if(typeof z!="function"&&z!==null)throw new TypeError("Class extends value "+String(z)+" is not a constructor or null");l(R,z);function $(){this.constructor=R}R.prototype=z===null?Object.create(z):($.prototype=z.prototype,new $)}var c=function(){return c=Object.assign||function($){for(var S,J=1,Q=arguments.length;J<Q;J++){S=arguments[J];for(var G in S)Object.prototype.hasOwnProperty.call(S,G)&&($[G]=S[G])}return $},c.apply(this,arguments)};function u(R,z){var $={};for(var S in R)Object.prototype.hasOwnProperty.call(R,S)&&z.indexOf(S)<0&&($[S]=R[S]);if(R!=null&&typeof Object.getOwnPropertySymbols=="function")for(var J=0,S=Object.getOwnPropertySymbols(R);J<S.length;J++)z.indexOf(S[J])<0&&Object.prototype.propertyIsEnumerable.call(R,S[J])&&($[S[J]]=R[S[J]]);return $}function h(R,z,$,S){var J=arguments.length,Q=J<3?z:S===null?S=Object.getOwnPropertyDescriptor(z,$):S,G;if((typeof Reflect>"u"?"undefined":Jt(Reflect))==="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(R,z,$,S);else for(var ie=R.length-1;ie>=0;ie--)(G=R[ie])&&(Q=(J<3?G(Q):J>3?G(z,$,Q):G(z,$))||Q);return J>3&&Q&&Object.defineProperty(z,$,Q),Q}function m(R,z){return function($,S){z($,S,R)}}function y(R,z){if((typeof Reflect>"u"?"undefined":Jt(Reflect))==="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(R,z)}function C(R,z,$,S){function J(Q){return Q instanceof $?Q:new $(function(G){G(Q)})}return new($||($=Promise))(function(Q,G){function ie(be){try{le(S.next(be))}catch(ce){G(ce)}}function X(be){try{le(S.throw(be))}catch(ce){G(ce)}}function le(be){be.done?Q(be.value):J(be.value).then(ie,X)}le((S=S.apply(R,z||[])).next())})}function A(R,z){var $={label:0,sent:function(){if(Q[0]&1)throw Q[1];return Q[1]},trys:[],ops:[]},S,J,Q,G;return G={next:ie(0),throw:ie(1),return:ie(2)},typeof Symbol=="function"&&(G[Symbol.iterator]=function(){return this}),G;function ie(le){return function(be){return X([le,be])}}function X(le){if(S)throw new TypeError("Generator is already executing.");for(;$;)try{if(S=1,J&&(Q=le[0]&2?J.return:le[0]?J.throw||((Q=J.return)&&Q.call(J),0):J.next)&&!(Q=Q.call(J,le[1])).done)return Q;switch(J=0,Q&&(le=[le[0]&2,Q.value]),le[0]){case 0:case 1:Q=le;break;case 4:return $.label++,{value:le[1],done:!1};case 5:$.label++,J=le[1],le=[0];continue;case 7:le=$.ops.pop(),$.trys.pop();continue;default:if(Q=$.trys,!(Q=Q.length>0&&Q[Q.length-1])&&(le[0]===6||le[0]===2)){$=0;continue}if(le[0]===3&&(!Q||le[1]>Q[0]&&le[1]<Q[3])){$.label=le[1];break}if(le[0]===6&&$.label<Q[1]){$.label=Q[1],Q=le;break}if(Q&&$.label<Q[2]){$.label=Q[2],$.ops.push(le);break}Q[2]&&$.ops.pop(),$.trys.pop();continue}le=z.call(R,$)}catch(be){le=[6,be],J=0}finally{S=Q=0}if(le[0]&5)throw le[1];return{value:le[0]?le[1]:void 0,done:!0}}}var w=Object.create?function(R,z,$,S){S===void 0&&(S=$),Object.defineProperty(R,S,{enumerable:!0,get:function(){return z[$]}})}:function(R,z,$,S){S===void 0&&(S=$),R[S]=z[$]};function E(R,z){for(var $ in R)$!=="default"&&!Object.prototype.hasOwnProperty.call(z,$)&&w(z,R,$)}function b(R){var z=typeof Symbol=="function"&&Symbol.iterator,$=z&&R[z],S=0;if($)return $.call(R);if(R&&typeof R.length=="number")return{next:function(){return R&&S>=R.length&&(R=void 0),{value:R&&R[S++],done:!R}}};throw new TypeError(z?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(R,z){var $=typeof Symbol=="function"&&R[Symbol.iterator];if(!$)return R;var S=$.call(R),J,Q=[],G;try{for(;(z===void 0||z-- >0)&&!(J=S.next()).done;)Q.push(J.value)}catch(ie){G={error:ie}}finally{try{J&&!J.done&&($=S.return)&&$.call(S)}finally{if(G)throw G.error}}return Q}function _(){for(var R=[],z=0;z<arguments.length;z++)R=R.concat(g(arguments[z]));return R}function x(){for(var R=0,z=0,$=arguments.length;z<$;z++)R+=arguments[z].length;for(var S=Array(R)
/mg`,"")).call(H);(0,C.default)(R).call(R,"<")===0?L=k(R):L=O(R)}var z=L.length;if(!z)return this;for(var $=0;$<z;$++)this.elems.push(L[$]);this.length=z}}return(0,d.default)(N.prototype,"id",{get:function(){return this.elems[0].id},enumerable:!1,configurable:!0}),N.prototype.forEach=function(B){for(var L=0;L<this.length;L++){var U=this.elems[L],H=B.call(U,U,L);if(H===!1)break}return this},N.prototype.clone=function(B){var L;B===void 0&&(B=!1);var U=[];return(0,u.default)(L=this.elems).call(L,function(H){U.push(H.cloneNode(!!B))}),M(U)},N.prototype.get=function(B){B===void 0&&(B=0);var L=this.length;return B>=L&&(B=B%L),M(this.elems[B])},N.prototype.first=function(){return this.get(0)},N.prototype.last=function(){var B=this.length;return this.get(B-1)},N.prototype.on=function(B,L,U){var H;return B?(typeof L=="function"&&(U=L,L=""),(0,u.default)(H=this).call(H,function(R){if(!L){R.addEventListener(B,U);return}var z=function(S){var J=S.target;J.matches(L)&&U.call(J,S)};R.addEventListener(B,z),x.push({elem:R,selector:L,fn:U,agentFn:z})})):this},N.prototype.off=function(B,L,U){var H;return B?(typeof L=="function"&&(U=L,L=""),(0,u.default)(H=this).call(H,function(R){if(L){for(var z=-1,$=0;$<x.length;$++){var S=x[$];if(S.selector===L&&S.fn===U&&S.elem===R){z=$;break}}if(z!==-1){var J=(0,A.default)(x).call(x,z,1)[0].agentFn;R.removeEventListener(B,J)}}else R.removeEventListener(B,U)})):this},N.prototype.attr=function(B,L){var U;return L==null?this.elems[0].getAttribute(B)||"":(0,u.default)(U=this).call(U,function(H){H.setAttribute(B,L)})},N.prototype.removeAttr=function(B){var L;(0,u.default)(L=this).call(L,function(U){U.removeAttribute(B)})},N.prototype.addClass=function(B){var L;return B?(0,u.default)(L=this).call(L,function(U){if(U.className){var H=U.className.split(/\s/);H=(0,w.default)(H).call(H,function(R){return!!(0,m.default)(R).call(R)}),(0,C.default)(H).call(H,B)<0&&H.push(B),U.className=H.join(" ")}else U.className=B}):this},N.prototype.removeClass=function(B){var L;return B?(0,u.default)(L=this).call(L,function(U){if(!!U.className){var H=U.className.split(/\s/);H=(0,w.default)(H).call(H,function(R){return R=(0,m.default)(R).call(R),!(!R||R===B)}),U.className=H.join(" ")}}):this},N.prototype.hasClass=function(B){if(!B)return!1;var L=this.elems[0];if(!L.className)return!1;var U=L.className.split(/\s/);return(0,E.default)(U).call(U,B)},N.prototype.css=function(B,L){var U,H;return L==""?H="":H=B+":"+L+";",(0,u.default)(U=this).call(U,function(R){var z,$=(0,m.default)(z=R.getAttribute("style")||"").call(z);if($){var S=F($);S=(0,h.default)(S).call(S,function(J){return(0,C.default)(J).call(J,B)===0?H:J}),H!=""&&(0,C.default)(S).call(S,H)<0&&S.push(H),H==""&&(S=F(S)),R.setAttribute("style",S.join("; "))}else R.setAttribute("style",H)})},N.prototype.getBoundingClientRect=function(){var B=this.elems[0];return B.getBoundingClientRect()},N.prototype.show=function(){return this.css("display","block")},N.prototype.hide=function(){return this.css("display","none")},N.prototype.children=function(){var B=this.elems[0];return B?M(B.children):null},N.prototype.childNodes=function(){var B=this.elems[0];return B?M(B.childNodes):null},N.prototype.replaceChildAll=function(B){for(var L=this.getNode(),U=this.elems[0];U.hasChildNodes();)L.firstChild&&U.removeChild(L.firstChild);this.append(B)},N.prototype.append=function(B){var L;return(0,u.default)(L=this).call(L,function(U){(0,u.default)(B).call(B,function(H){U.appendChild(H)})})},N.prototype.remove=function(){var B;return(0,u.default)(B=this).call(B,function(L){if(L.remove)L.remove();else{var U=L.parentElement;U&&U.removeChild(L)}})},N.prototype.isContain=function(B){var L=this.elems[0],U=B.elems[0];return L.contains(U)},N.prototype.getNodeName=function(){var B=this.elems[0];return B.nodeName},N.prototype.getNode=function(B){B===void 0&&(B=0);var L;return L=this.elems[B],L},N.prototype.find=function(B){var L=this.elems[0];return M(L.querySelectorAll(B))},N.prototype.text=function(B){if(B){var U;return(0,u.default)(U=this).call(U,function(H){H.innerHTML=B})}else{var L=this.elems[0];return
`)}}();function A(_,x,k,T){var O=k?"":T.media?"@media ".concat(T.media," {").concat(T.css,"}"):T.css;if(_.styleSheet)_.styleSheet.cssText=C(x,O);else{var F=document.createTextNode(O),I=_.childNodes;I[x]&&_.removeChild(I[x]),I.length?_.insertBefore(F,I[x]):_.appendChild(F)}}function w(_,x,k){var T=k.css,O=k.media,F=k.sourceMap;if(O?_.setAttribute("media",O):_.removeAttribute("media"),F&&typeof btoa<"u"&&(T+=`
/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(F))))," */")),_.styleSheet)_.styleSheet.cssText=T;else{for(;_.firstChild;)_.removeChild(_.firstChild);_.appendChild(document.createTextNode(T))}}var E=null,b=0;function g(_,x){var k,T,O;if(x.singleton){var F=b++;k=E||(E=m(x)),T=A.bind(null,k,F,!1),O=A.bind(null,k,F,!0)}else k=m(x),T=w.bind(null,k,x),O=function(){y(k)};return T(_),function(M){if(M){if(M.css===_.css&&M.media===_.media&&M.sourceMap===_.sourceMap)return;T(_=M)}else O()}}r.exports=function(_,x){x=x||{},!x.singleton&&typeof x.singleton!="boolean"&&(x.singleton=l()),_=_||[];var k=h(_,x);return function(O){if(O=O||[],Object.prototype.toString.call(O)==="[object Array]"){for(var F=0;F<k.length;F++){var I=k[F],M=u(I);c[M].references--}for(var N=h(O,x),B=0;B<k.length;B++){var L=k[B],U=u(L);c[U].references===0&&(c[U].updater(),c.splice(U,1))}k=N}}}},function(r,o,i){r.exports=function(c){var u=[];return u.toString=function(){return this.map(function(m){var y=l(m,c);return m[2]?"@media ".concat(m[2]," {").concat(y,"}"):y}).join("")},u.i=function(h,m,y){typeof h=="string"&&(h=[[null,h,""]]);var C={};if(y)for(var A=0;A<this.length;A++){var w=this[A][0];w!=null&&(C[w]=!0)}for(var E=0;E<h.length;E++){var b=[].concat(h[E]);y&&C[b[0]]||(m&&(b[2]?b[2]="".concat(m," and ").concat(b[2]):b[2]=m),u.push(b))}},u};function l(c,u){var h=c[1]||"",m=c[3];if(!m)return h;if(u&&typeof btoa=="function"){var y=d(m),C=m.sources.map(function(A){return"/*# sourceURL=".concat(m.sourceRoot||"").concat(A," */")});return[h].concat(C).concat([y]).join(`
2025-05-20 11:03:25 +08:00
`)}return[h].join(`
2025-05-27 15:27:24 +08:00
`)}function d(c){var u=btoa(unescape(encodeURIComponent(JSON.stringify(c)))),h="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(u);return"/*# ".concat(h," */")}},function(r,o,i){var l=i(14),d=i(11),c=i(16),u=Object.defineProperty,h={},m=function(C){throw C};r.exports=function(y,C){if(c(h,y))return h[y];C||(C={});var A=[][y],w=c(C,"ACCESSORS")?C.ACCESSORS:!1,E=c(C,0)?C[0]:m,b=c(C,1)?C[1]:void 0;return h[y]=!!A&&!d(function(){if(w&&!l)return!0;var g={length:-1};w?u(g,1,{enumerable:!0,get:m}):g[1]=1,A.call(g,E,b)})}},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(95)),h=function(m){c.__extends(y,m);function y(C,A){return m.call(this,C,A)||this}return y}(u.default);o.default=h},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(4)),u=l(i(46));(0,d.default)(o,"__esModule",{value:!0});var h=i(2),m=h.__importDefault(i(3)),y=h.__importDefault(i(95)),C=h.__importDefault(i(134)),A=function(w){h.__extends(E,w);function E(b,g,_){var x=w.call(this,b,g)||this;_.title=g.i18next.t("menus.dropListMenu."+_.title);var k=g.config.lang==="zh-CN"?"":"w-e-drop-list-tl";if(k!==""&&_.type==="list"){var T;(0,c.default)(T=_.list).call(T,function(F){var I=F.$elem,M=m.default(I.children());if(M.length>0){var N=M==null?void 0:M.getNodeName();N&&N==="I"&&I.addClass(k)}})}var O=new C.default(x,_);return x.dropList=O,b.on("click",function(){var F;g.selection.getRange()!=null&&(b.css("z-index",g.zIndex.get("menu")),(0,c.default)(F=g.txt.eventHooks.dropListMenuHoverEvents).call(F,function(I){return I()}),O.show())}).on("mouseleave",function(){b.css("z-index","auto"),O.hideTimeoutId=(0,u.default)(function(){O.hide()})}),x}return E}(y.default);o.default=A},function(r,o,i){var l=i(13);r.exports=function(d){if(!l(d))throw TypeError(String(d)+" is not an object");return d}},function(r,o,i){r.exports=i(188)},function(r,o,i){r.exports=i(201)},function(r,o,i){r.exports=i(213)},function(r,o,i){r.exports=i(283)},function(r,o,i){var l=i(72),d=i(49);r.exports=function(c){return l(d(c))}},function(r,o,i){var l=i(49);r.exports=function(d){return Object(l(d))}},function(r,o,i){var l=i(40),d=i(72),c=i(31),u=i(35),h=i(88),m=[].push,y=function(A){var w=A==1,E=A==2,b=A==3,g=A==4,_=A==6,x=A==5||_;return function(k,T,O,F){for(var I=c(k),M=d(I),N=l(T,O,3),B=u(M.length),L=0,U=F||h,H=w?U(k,B):E?U(k,0):void 0,R,z;B>L;L++)if((x||L in M)&&(R=M[L],z=N(R,L,I),A)){if(w)H[L]=z;else if(z)switch(A){case 3:return!0;case 5:return R;case 6:return L;case 2:m.call(H,R)}else if(g)return!1}return _?-1:b||g?g:H}};r.exports={forEach:y(0),map:y(1),filter:y(2),some:y(3),every:y(4),find:y(5),findIndex:y(6)}},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(4)),u=l(i(29)),h=l(i(132));(0,d.default)(o,"__esModule",{value:!0});var m=i(2),y=m.__importDefault(i(3)),C=i(7),A=function(){function w(E,b){this.menu=E,this.conf=b,this.$container=y.default('<div class="w-e-panel-container"></div>');var g=E.editor;g.txt.eventHooks.clickEvents.push(w.hideCurAllPanels),g.txt.eventHooks.toolbarClickEvents.push(w.hideCurAllPanels),g.txt.eventHooks.dropListMenuHoverEvents.push(w.hideCurAllPanels)}return w.prototype.create=function(){var E=this,b=this.menu;if(!w.createdMenus.has(b)){var g=this.conf,_=this.$container,x=g.width||300,k=b.editor.$toolbarElem.getBoundingClientRect(),T=b.$elem.getBoundingClientRect(),O=k.height+k.top-T.top,F=(k.width-x)/2+k.left-T.left,I=300;Math.abs(F)>I&&(T.left<document.documentElement.clientWidth/2?F=-T.width/2:F=-x+T.width/2),_.css("width",x+"px").css("margin-top",O+"px").css("margin-left",F+"px").css("z-index",b.editor.zIndex.get("panel"));var M=y.default('<i class="w-e-icon-close w-e-panel-close"></i>');_.append(M),M.on("click",function(){E.remove()});var N=y.default('<ul class="w-e-panel-tab-title"></ul>'),B=y.default('<div class="w-e-panel-tab-content"></div>');_.append(N).append(B);var L=g.height;L&&B.css("height",L+"px").css("overflow-y","auto");var U=g.tabs||[],H=[],R=[];(0,c.default)(U).call(U,function($,S){if(!!$){var J=$.title||"",Q=$.tpl||"",G=y.default('<li class="w-e-item">'+J+"</li>");N.append(G);var i
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},function(r,o,i){var l=i(60),d=i(18),c=i(48);r.exports=function(u,h,m){var y=l(h);y in u?d.f(u,y,c(0,m)):u[y]=m}},function(r,o,i){r.exports=i(209)},function(r,o,i){var l=i(14),d=i(59),c=i(48),u=i(30),h=i(60),m=i(16),y=i(100),C=Object.getOwnPropertyDescriptor;o.f=l?C:function(w,E){if(w=u(w),E=h(E,!0),y)try{return C(w,E)}catch{}if(m(w,E))return c(!d.f.call(w,E),w[E])}},function(r,o,i){var l=i(11),d=i(34),c="".split;r.exports=l(function(){return!Object("z").propertyIsEnumerable(0)})?function(u){return d(u)=="String"?c.call(u,""):Object(u)}:Object},function(r,o,i){var l=i(8),d=i(13),c=l.document,u=d(c)&&d(c.createElement);r.exports=function(h){return u?c.createElement(h):{}}},function(r,o,i){var l=i(43),d=i(103);(r.exports=function(c,u){return d[c]||(d[c]=u!==void 0?u:{})})("versions",[]).push({version:"3.6.4",mode:l?"pure":"global",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"})},function(r,o,i){var l=i(5),d=i(167),c=i(105),u=i(171),h=i(37),m=i(19),y=i(53),C=i(10),A=i(43),w=i(44),E=i(104),b=E.IteratorPrototype,g=E.BUGGY_SAFARI_ITERATORS,_=C("iterator"),x="keys",k="values",T="entries",O=function(){return this};r.exports=function(F,I,M,N,B,L,U){d(M,I,N);var H=function(be){if(be===B&&J)return J;if(!g&&be in $)return $[be];switch(be){case x:return function(){return new M(this,be)};case k:return function(){return new M(this,be)};case T:return function(){return new M(this,be)}}return function(){return new M(this)}},R=I+" Iterator",z=!1,$=F.prototype,S=$[_]||$["@@iterator"]||B&&$[B],J=!g&&S||H(B),Q=I=="Array"&&$.entries||S,G,ie,X;if(Q&&(G=c(Q.call(new F)),b!==Object.prototype&&G.next&&(!A&&c(G)!==b&&(u?u(G,b):typeof G[_]!="function"&&m(G,_,O)),h(G,R,!0,!0),A&&(w[R]=O))),B==k&&S&&S.name!==k&&(z=!0,J=function(){return S.call(this)}),(!A||U)&&$[_]!==J&&m($,_,J),w[I]=J,B)if(ie={values:H(k),keys:L?J:H(x),entries:H(T)},U)for(X in ie)(g||z||!(X in $))&&y($,X,ie[X]);else l({target:I,proto:!0,forced:g||z},ie);return ie}},function(r,o,i){var l=i(11);r.exports=!!Object.getOwnPropertySymbols&&!l(function(){return!String(Symbol())})},function(r,o,i){var l=i(25),d=i(169),c=i(80),u=i(51),h=i(108),m=i(73),y=i(63),C=">",A="<",w="prototype",E="script",b=y("IE_PROTO"),g=function(){},_=function(I){return A+E+C+I+A+"/"+E+C},x=function(I){I.write(_("")),I.close();var M=I.parentWindow.Object;return I=null,M},k=function(){var I=m("iframe"),M="java"+E+":",N;return I.style.display="none",h.appendChild(I),I.src=String(M),N=I.contentWindow.document,N.open(),N.write(_("document.F=Object")),N.close(),N.F},T,O=function(){try{T=document.domain&&new ActiveXObject("htmlfile")}catch{}O=T?x(T):k();for(var I=c.length;I--;)delete O[w][c[I]];return O()};u[b]=!0,r.exports=Object.create||function(I,M){var N;return I!==null?(g[w]=l(I),N=new g,g[w]=null,N[b]=I):N=O(),M===void 0?N:d(N,M)}},function(r,o,i){var l=i(30),d=i(35),c=i(79),u=function(m){return function(y,C,A){var w=l(y),E=d(w.length),b=c(A,E),g;if(m&&C!=C){for(;E>b;)if(g=w[b++],g!=g)return!0}else for(;E>b;b++)if((m||b in w)&&w[b]===C)return m||b||0;return!m&&-1}};r.exports={includes:u(!0),indexOf:u(!1)}},function(r,o,i){var l=i(62),d=Math.max,c=Math.min;r.exports=function(u,h){var m=l(u);return m<0?d(m+h,0):c(m,h)}},function(r,o){r.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(r,o,i){var l=i(10),d=l("toStringTag"),c={};c[d]="z",r.exports=String(c)==="[object z]"},function(r,o){r.exports=function(){}},function(r,o){r.exports=function(i,l,d){if(!(i instanceof l))throw TypeError("Incorrect "+(d?d+" ":"")+"invocation");return i}},function(r,o,i){var l=i(36);r.exports=l("navigator","userAgent")||""},function(r,o,i){var l=i(41),d=function(u){var h,m;this.promise=new u(function(y,C){if(h!==void 0||m!==void 0)throw TypeError("Bad Promise constructor");h=y,m=C}),this.resolve=l(h),this.reject=l(m)};r.exports.f=function(c){return new d(c)}},function(r,o,i){var l=i(8),d=i(84),c=l.process,u=c&&c.versions,h=u&&u.v8,m,y;h?
2025-05-24 17:29:32 +08:00
`+Q.join(`
2025-05-27 15:27:24 +08:00
`),"warning");return}if(J.length===0){x.customAlert(T("\u4F20\u5165\u7684\u6587\u4EF6\u4E0D\u5408\u6CD5"),"warning");return}if(J.length>N){x.customAlert(T("\u4E00\u6B21\u6700\u591A\u4E0A\u4F20")+N+T("\u5F20\u56FE\u7247"),"warning");return}if(S&&typeof S=="function"){var G;S(J,(0,c.default)(G=this.insertImg).call(G,this));return}var ie=new FormData;if((0,u.default)(J).call(J,function(ce,de){var pe=B||ce.name;J.length>1&&(pe=pe+(de+1)),ie.append(pe,ce)}),O){var X=O.split("#");O=X[0];var le=X[1]||"";(0,u.default)(y).call(y,L,function(ce,de){U&&((0,h.default)(O).call(O,"?")>0?O+="&":O+="?",O=O+ce+"="+de),ie.append(ce,de)}),le&&(O+="#"+le);var be=C.default(O,{timeout:z,formData:ie,headers:H,withCredentials:!!$,beforeSend:function(de){if(R.before)return R.before(de,_,J)},onTimeout:function(de){x.customAlert(T("\u4E0A\u4F20\u56FE\u7247\u8D85\u65F6"),"error"),R.timeout&&R.timeout(de,_)},onProgress:function(de,pe){var se=new A.default(_);pe.lengthComputable&&(de=pe.loaded/pe.total,se.show(de))},onError:function(de){x.customAlert(T("\u4E0A\u4F20\u56FE\u7247\u9519\u8BEF"),"error",T("\u4E0A\u4F20\u56FE\u7247\u9519\u8BEF")+"\uFF0C"+T("\u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001")+": "+de.status),R.error&&R.error(de,_)},onFail:function(de,pe){x.customAlert(T("\u4E0A\u4F20\u56FE\u7247\u5931\u8D25"),"error",T("\u4E0A\u4F20\u56FE\u7247\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF")+("\uFF0C"+T("\u8FD4\u56DE\u7ED3\u679C")+": ")+pe),R.fail&&R.fail(de,_,pe)},onSuccess:function(de,pe){if(R.customInsert){var se;R.customInsert((0,c.default)(se=g.insertImg).call(se,g),pe,_);return}if(pe.errno!="0"){x.customAlert(T("\u4E0A\u4F20\u56FE\u7247\u5931\u8D25"),"error",T("\u4E0A\u4F20\u56FE\u7247\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF")+"\uFF0C"+T("\u8FD4\u56DE\u7ED3\u679C")+" errno="+pe.errno),R.fail&&R.fail(de,_,pe);return}var ge=pe.data;(0,u.default)(ge).call(ge,function(ye){typeof ye=="string"?g.insertImg(ye):g.insertImg(ye.url,ye.alt,ye.href)}),R.success&&R.success(de,_,pe)}});typeof be=="string"&&x.customAlert(be,"error");return}F&&y.arrForEach(b,function(ce){var de=g,pe=new FileReader;pe.readAsDataURL(ce),pe.onload=function(){if(!!this.result){var se=this.result.toString();de.insertImg(se,se)}}})}}},E}();o.default=w},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(410)),u=l(i(4)),h=l(i(45));(0,d.default)(o,"__esModule",{value:!0}),o.dealTextNode=o.isAllTodo=o.isTodo=o.getCursorNextNode=void 0;function m(E){return E.length?E.attr("class")==="w-e-todo":!1}o.isTodo=m;function y(E){var b=E.selection.getSelectionRangeTopNodes();if(b.length!==0)return(0,c.default)(b).call(b,function(g){return m(g)})}o.isAllTodo=y;function C(E,b,g){var _;if(!!E.hasChildNodes()){var x=E.cloneNode(),k=!1;b.nodeValue===""&&(k=!0);var T=[];return(0,u.default)(_=E.childNodes).call(_,function(O){if(!A(O,b)&&k&&(x.appendChild(O.cloneNode(!0)),O.nodeName!=="BR"&&T.push(O)),A(O,b)){if(O.nodeType===1){var F=C(O,b,g);F&&F.textContent!==""&&(x==null||x.appendChild(F))}if(O.nodeType===3&&b.isEqualNode(O)){var I=w(O,g);x.textContent=I}k=!0}}),(0,u.default)(T).call(T,function(O){var F=O;F.remove()}),x}}o.getCursorNextNode=C;function A(E,b){return E.nodeType===3?E.nodeValue===b.nodeValue:E.contains(b)}function w(E,b,g){g===void 0&&(g=!0);var _=E.nodeValue,x=_==null?void 0:(0,h.default)(_).call(_,0,b);if(_=_==null?void 0:(0,h.default)(_).call(_,b),!g){var k=_;_=x,x=k}return E.nodeValue=x,_}o.dealTextNode=w},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(430),u=function(){function h(m){this.maxSize=m,this.isRe=!1,this.data=new c.CeilStack(m),this.revokeData=new c.CeilStack(m)}return(0,d.default)(h.prototype,"size",{get:function(){return[this.data.size,this.revokeData.size]},enumerable:!1,configurable:!0}),h.prototype.resetMaxSize=function(m){this.data.resetMax(m),this.revokeData.resetMax(m)},h.prototype.save=function(m){return this.isRe&&(this.revokeData.clear(),this.isRe=!1),this.data.instack(m),this},h.prototype.revoke=function(m){!this.isRe&&(this.isRe=!0);var y=this.data.outstack();return y?(this.revokeData.instack(y),m(y),!0):!1},h.prototype.restore=function(m
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-list2"></i>
</div>`),x={width:130,title:"\u5E8F\u5217",type:"list",list:[{$elem:u.default(`
<p>
<i class="w-e-icon-list2 w-e-drop-list-item"></i>
`+b.i18next.t("menus.dropListMenu.list.\u65E0\u5E8F\u5217\u8868")+`
<p>`),value:C.UnorderedList},{$elem:u.default(`<p>
<i class="w-e-icon-list-numbered w-e-drop-list-item"></i>
`+b.i18next.t("menus.dropListMenu.list.\u6709\u5E8F\u5217\u8868")+`
2025-05-27 15:27:24 +08:00
<p>`),value:C.OrderedList}],clickHandler:function(T){g.command(T)}};return g=w.call(this,_,b,x)||this,g}return E.prototype.command=function(b){var g=this.editor,_=g.selection.getSelectionContainerElem();_!==void 0&&(this.handleSelectionRangeNodes(b),this.tryChangeActive())},E.prototype.validator=function(b,g,_){return!(!b.length||!g.length||_.equal(b)||_.equal(g))},E.prototype.handleSelectionRangeNodes=function(b){var g=this.editor,_=g.selection,x=b.toLowerCase(),k=_.getSelectionContainerElem(),T=_.getSelectionStartElem().getNodeTop(g),O=_.getSelectionEndElem().getNodeTop(g);if(!!this.validator(T,O,g.$textElem)){var F=_.getRange(),I=F==null?void 0:F.collapsed;g.$textElem.equal(k)||(k=k.getNodeTop(g));var M={editor:g,listType:b,listTarget:x,$selectionElem:k,$startElem:T,$endElem:O},N;this.isOrderElem(k)?N=y.ClassType.Wrap:this.isOrderElem(T)&&this.isOrderElem(O)?N=y.ClassType.Join:this.isOrderElem(T)?N=y.ClassType.StartJoin:this.isOrderElem(O)?N=y.ClassType.EndJoin:N=y.ClassType.Other;var B=new y.default(y.createListHandle(N,M,F));m.updateRange(g,B.getSelectionRangeElem(),!!I)}},E.prototype.isOrderElem=function(b){var g=b.getNodeName();return g===C.OrderedList||g===C.UnorderedList},E.prototype.tryChangeActive=function(){},E}(h.default);o.default=A},function(r,o,i){r.exports=i(395)},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});function c(u){var h=u.selection.getSelectionContainerElem();return h!=null&&h.length?!!(h.getNodeName()=="CODE"||h.getNodeName()=="PRE"||h.parent().getNodeName()=="CODE"||h.parent().getNodeName()=="PRE"||/hljs/.test(h.parent().attr("class"))):!1}o.default=c},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(29));(0,d.default)(o,"__esModule",{value:!0}),o.todo=void 0;var u=i(2),h=u.__importDefault(i(3)),m=function(){function C(A){var w;this.template='<ul class="w-e-todo"><li><span contenteditable="false"><input type="checkbox"></span></li></ul>',this.checked=!1,this.$todo=h.default(this.template),this.$child=(w=A==null?void 0:A.childNodes())===null||w===void 0?void 0:w.clone(!0)}return C.prototype.init=function(){var A=this.$child,w=this.getInputContainer();A&&A.insertAfter(w)},C.prototype.getInput=function(){var A=this.$todo,w=(0,c.default)(A).call(A,"input");return w},C.prototype.getInputContainer=function(){var A=this.getInput().parent();return A},C.prototype.getTodo=function(){return this.$todo},C}();o.todo=m;function y(C){var A=new m(C);return A.init(),A}o.default=y},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2);i(146),i(148),i(152),i(154),i(156),i(158),i(160);var u=c.__importDefault(i(87));c.__exportStar(i(442),o);try{}catch{throw new Error("\u8BF7\u5728\u6D4F\u89C8\u5668\u73AF\u5883\u4E0B\u8FD0\u884C")}o.default=u.default},function(r,o,i){var l=i(143);r.exports=l},function(r,o,i){i(144);var l=i(9),d=l.Object,c=r.exports=function(h,m,y){return d.defineProperty(h,m,y)};d.defineProperty.sham&&(c.sham=!0)},function(r,o,i){var l=i(5),d=i(14),c=i(18);l({target:"Object",stat:!0,forced:!d,sham:!d},{defineProperty:c.f})},function(r,o){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch{(typeof window>"u"?"undefined":Jt(window))==="object"&&(i=window)}r.exports=i},function(r,o,i){var l=i(20),d=i(147);d=d.__esModule?d.default:d,typeof d=="string"&&(d=[[r.i,d,""]]);var c={};c.insert="head",c.singleton=!1,l(d,c),r.exports=d.locals||{}},function(r,o,i){var l=i(21);o=l(!1),o.push([r.i,`.w-e-toolbar,
2025-05-20 11:03:25 +08:00
.w-e-text-container,
.w-e-menu-panel {
padding: 0;
margin: 0;
box-sizing: border-box;
background-color: #fff;
/*\u8868\u60C5\u83DC\u5355\u6837\u5F0F*/
/*\u5206\u5272\u7EBF\u6837\u5F0F*/
}
.w-e-toolbar h1,
.w-e-text-container h1,
.w-e-menu-panel h1 {
font-size: 32px !important;
}
.w-e-toolbar h2,
.w-e-text-container h2,
.w-e-menu-panel h2 {
font-size: 24px !important;
}
.w-e-toolbar h3,
.w-e-text-container h3,
.w-e-menu-panel h3 {
font-size: 18.72px !important;
}
.w-e-toolbar h4,
.w-e-text-container h4,
.w-e-menu-panel h4 {
font-size: 16px !important;
}
.w-e-toolbar h5,
.w-e-text-container h5,
.w-e-menu-panel h5 {
font-size: 13.28px !important;
}
.w-e-toolbar p,
.w-e-text-container p,
.w-e-menu-panel p {
font-size: 16px !important;
}
.w-e-toolbar .eleImg,
.w-e-text-container .eleImg,
.w-e-menu-panel .eleImg {
cursor: pointer;
display: inline-block;
font-size: 18px;
padding: 0 3px;
}
.w-e-toolbar *,
.w-e-text-container *,
.w-e-menu-panel * {
padding: 0;
margin: 0;
box-sizing: border-box;
}
.w-e-toolbar hr,
.w-e-text-container hr,
.w-e-menu-panel hr {
cursor: pointer;
display: block;
height: 0px;
border: 0;
border-top: 3px solid #ccc;
margin: 20px 0;
}
.w-e-clear-fix:after {
content: "";
display: table;
clear: both;
}
.w-e-drop-list-item {
position: relative;
top: 1px;
padding-right: 7px;
color: #333 !important;
}
.w-e-drop-list-tl {
padding-left: 10px;
text-align: left;
}
2025-05-24 17:29:32 +08:00
`,""]),r.exports=o},function(r,o,i){var l=i(20),d=i(149);d=d.__esModule?d.default:d,typeof d=="string"&&(d=[[r.i,d,""]]);var c={};c.insert="head",c.singleton=!1,l(d,c),r.exports=d.locals||{}},function(r,o,i){var l=i(21),d=i(150),c=i(151);o=l(!1);var u=d(c);o.push([r.i,`@font-face {
2025-05-20 11:03:25 +08:00
font-family: 'w-e-icon';
src: url(`+u+`) format('truetype');
font-weight: normal;
font-style: normal;
}
[class^="w-e-icon-"],
[class*=" w-e-icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'w-e-icon' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.w-e-icon-close:before {
content: "\\f00d";
}
.w-e-icon-upload2:before {
content: "\\e9c6";
}
.w-e-icon-trash-o:before {
content: "\\f014";
}
.w-e-icon-header:before {
content: "\\f1dc";
}
.w-e-icon-pencil2:before {
content: "\\e906";
}
.w-e-icon-paint-brush:before {
content: "\\f1fc";
}
.w-e-icon-image:before {
content: "\\e90d";
}
.w-e-icon-play:before {
content: "\\e912";
}
.w-e-icon-location:before {
content: "\\e947";
}
.w-e-icon-undo:before {
content: "\\e965";
}
.w-e-icon-redo:before {
content: "\\e966";
}
.w-e-icon-quotes-left:before {
content: "\\e977";
}
.w-e-icon-list-numbered:before {
content: "\\e9b9";
}
.w-e-icon-list2:before {
content: "\\e9bb";
}
.w-e-icon-link:before {
content: "\\e9cb";
}
.w-e-icon-happy:before {
content: "\\e9df";
}
.w-e-icon-bold:before {
content: "\\ea62";
}
.w-e-icon-underline:before {
content: "\\ea63";
}
.w-e-icon-italic:before {
content: "\\ea64";
}
.w-e-icon-strikethrough:before {
content: "\\ea65";
}
.w-e-icon-table2:before {
content: "\\ea71";
}
.w-e-icon-paragraph-left:before {
content: "\\ea77";
}
.w-e-icon-paragraph-center:before {
content: "\\ea78";
}
.w-e-icon-paragraph-right:before {
content: "\\ea79";
}
.w-e-icon-paragraph-justify:before {
content: "\\ea7a";
}
.w-e-icon-terminal:before {
content: "\\f120";
}
.w-e-icon-page-break:before {
content: "\\ea68";
}
.w-e-icon-cancel-circle:before {
content: "\\ea0d";
}
.w-e-icon-font:before {
content: "\\ea5c";
}
.w-e-icon-text-heigh:before {
content: "\\ea5f";
}
.w-e-icon-paint-format:before {
content: "\\e90c";
}
.w-e-icon-indent-increase:before {
content: "\\ea7b";
}
.w-e-icon-indent-decrease:before {
content: "\\ea7c";
}
.w-e-icon-row-height:before {
content: "\\e9be";
}
.w-e-icon-fullscreen_exit:before {
content: "\\e900";
}
.w-e-icon-fullscreen:before {
content: "\\e901";
}
.w-e-icon-split-line:before {
content: "\\ea0b";
}
.w-e-icon-checkbox-checked:before {
content: "\\ea52";
}
2025-05-24 17:29:32 +08:00
`,""]),r.exports=o},function(r,o,i){r.exports=function(l,d){return d||(d={}),l=l&&l.__esModule?l.default:l,typeof l!="string"?l:(/^['"].*['"]$/.test(l)&&(l=l.slice(1,-1)),d.hash&&(l+=d.hash),/["'() \t\n]/.test(l)||d.needQuotes?'"'.concat(l.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):l)}},function(r,o,i){i.r(o),o.default="data:font/woff;base64,d09GRgABAAAAABskAAsAAAAAGtgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIPFWNtYXAAAAFoAAABHAAAARz2mfAgZ2FzcAAAAoQAAAAIAAAACAAAABBnbHlmAAACjAAAFXwAABV8IH7+mGhlYWQAABgIAAAANgAAADYb6gumaGhlYQAAGEAAAAAkAAAAJAkjBWlobXR4AAAYZAAAAKQAAACkmYcEbmxvY2EAABkIAAAAVAAAAFReAmKYbWF4cAAAGVwAAAAgAAAAIAA0ALZuYW1lAAAZfAAAAYYAAAGGmUoJ+3Bvc3QAABsEAAAAIAAAACAAAwAAAAMD7wGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8fwDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAQAAAAA8ACAABAAcAAEAIOkB6QbpDekS6UfpZul36bnpu+m+6cbpy+nf6gvqDepS6lzqX+pl6nHqfPAN8BTxIPHc8fz//f//AAAAAAAg6QDpBukM6RLpR+ll6Xfpuem76b7pxunL6d/qC+oN6lLqXOpf6mLqcep38A3wFPEg8dzx/P/9//8AAf/jFwQXABb7FvcWwxamFpYWVRZUFlIWSxZHFjQWCRYIFcQVuxW5FbcVrBWnEBcQEQ8GDksOLAADAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAAEAEEAAQO/A38ABQALABEAFwAAATMVIREzAxEhFSMVATUzESE1ETUhESM1Av/A/sJ+fgE+wP4Cfv7CAT5+Ar9+AT78ggE+fsACvsD+wn7+An7+wsAAAAAABABBAAEDvwN/AAUACwARABcAAAEhESM1IxM1MxEhNQERIRUjFREVMxUhEQKBAT5+wMB+/sL9wAE+wMD+wgN//sLA/X7A/sJ+AcIBPn7A/v7AfgE+AAAAAAIAAP/ABAADwAAEABMAAAE3AScBAy4BJxM3ASMBAyUBNQEHAYCAAcBA/kCfFzsyY4ABgMD+gMACgAGA/oBOAUBAAcBA/kD+nTI7FwERTgGA/oD9gMABgMD+gIAAAgAA/8AEAAOAACkALQAAAREjNTQmIyEiBh0BFBYzITI2PQEzESEVIyIGFREUFjsBMjY1ETQmKwE1ASE1IQQAwCYa/UAaJiYaAsAaJoD9wCANExMNgA0TEw0gAUD9QALAAYABgEAaJiYawBomJhpA/wCAEw3+wA0TEw0BQA0TQAGAQAAABAAAAAAEAAOAABAAIQAtADQAAAE4ATEROAExITgBMRE4ATEhNSEiBhURFBYzITI2NRE0JiMHFAYjIiY1NDYzMhYTITUTATM3A8D8gAOA/IAaJiYaA4AaJiYagDgoKDg4KCg4QP0A4AEAQOADQP0AAwBAJhr9ABomJhoDABom4Cg4OCgoODj9uIABgP7AwAAAAgAAAEAEAANAADgAPAAAASYnLgEnJiMiBw4BBwYHBgcOAQcGFRQXHgEXFhcWFx4BFxYzMjc+ATc2NzY3PgE3NjU0Jy4BJyYnARENAQPVNjg5djw9Pz89PHY5ODYLBwgLAwMDAwsIBws2ODl2PD0/Pz08djk4NgsHCAsDAwMDCwgHC/2rAUD+wAMgCAYGCAICAgIIBgYIKSoqWS0uLy8uLVkqKikIBgYIAgICAggGBggpKipZLS4vLy4tWSoqKf3gAYDAwAAAAAACAMD/wANAA8AAGwAnAAABIgcOAQcGFRQXHgEXFjEwNz4BNzY1NCcuAScmAyImNTQ2MzIWFRQGAgBCOzpXGRkyMngyMjIyeDIyGRlXOjtCUHBwUFBwcAPAGRlXOjtCeH19zEFBQUHMfX14Qjs6VxkZ/gBwUFBwcFBQcAAAAQAAAAAEAAOAACsAAAEiBw4BBwYHJxEhJz4BMzIXHgEXFhUUBw4BBwYHFzY3PgE3NjU0Jy4BJyYjAgA1MjJcKSkjlgGAkDWLUFBFRmkeHgkJIhgYHlUoICAtDAwoKIteXWoDgAoLJxscI5b+gJA0PB4eaUZFUCsoKUkgIRpgIysrYjY2OWpdXosoKAABAAAAAAQAA4AAKgAAExQXHgEXFhc3JicuAScmNTQ3PgE3NjMyFhcHIREHJicuAScmIyIHDgEHBgAMDC0gIChVHhgYIgkJHh5pRkVQUIs1kAGAliMpKVwyMjVqXV6LKCgBgDk2NmIrKyNgGiEgSSkoK1BFRmkeHjw0kAGAliMcGycLCigoi15dAAAAAAIAAABABAEDAAAmAE0AABMyFx4BFxYVFAcOAQcGIyInLgEnJjUnNDc+ATc2MxUiBgcOAQc+ASEyFx4BFxYVFAcOAQcGIyInLgEnJjUnNDc+ATc2MxUiBgcOAQc+AeEuKSk9ERISET0pKS4uKSk9ERIBIyN6UlFdQHUtCRAHCBICSS4pKT0REhIRPSkpLi4pKT0REgEjI3pSUV1AdS0JEAcIEgIAEhE9KSkuLikpPRESEhE9KSkuIF1RUnojI4AwLggTCgIBEhE9KSkuLikpPRESEhE9KSkuIF1RUnojI4AwLggTCgIBAAAGAED/wAQAA8AAAwAHAAsAEQAdACkAACUhFSERIRUhESEVIScRIzUjNRMVMxUjNTc1IzUzFRURIzUzNSM1MzUjNQGAAoD9gAKA/YACgP2AwEBAQIDAgIDAwICAgICAgAIAgAIAgMD/AMBA/fIyQJI8MkCS7v7AQEBAQEAABgAA/8AEAAPAAAMABwALABcAIwAvAAABIRUhESEVIREhFSEBNDYzMhYVFAYjIiYRNDYzMhYVFAYjIiYRNDYzMhYVFAYjIiYBgAKA/YACgP2AAoD9gP6ASzU1S0s1NUtLNTVLSzU1S0s1NUtLNTVLA4CA/wCA/wCAA0A1S0s1NUtL/rU1S0s1NUtL/rU1S0s1NUtLAAUAAABABWADAAADAAcACwAOABEAABMhFSEVIRUhFSEVIQEXNzUnBwADgPyAA4D8gAOA/IAD4MDAwMADAMBAwEDAAUDAwEDAwAAAAAADAAAAAAQAA6AAAwANABQAADchFSElFSE1EyEVITUhJQkBIxEjEQAEAPwABAD8AIABAAEAAQD9YAEgASDggEBAwEBAAQCAgMABIP7g/wABAAAAAAACAB7/zAPiA7QAMwBkAAABIiYnJicmNDc2PwE+ATMyFhcWFxYUBwYPAQYiJyY0PwE2NCcuASMiBg8BBhQXFhQHDgEjAyImJyYnJjQ3Nj8BNjIXFhQPAQYUFx4BMzI2PwE2NCcmNDc2MhcWFxYUBwYPAQ4BIwG4ChMIIxISEhIjwCNZMTFZIyMSEhISI1gPLA8PD1gpKRQzHBwzFMApKQ8PCBMKuDFZIyMSEhISI1gPLA8PD1gpKRQzHBwzFMApKQ8PDysQIxISEhIjwCNZMQFECAckLS1eLS0kwCIlJSIkLS1eLS0kVxAQDysPWCl0KRQVFRTAKXQpDysQBwj+iCUiJC0tXi0tJFcQEA8rD1gpdCkUFRUUwCl0KQ8rEA8P
2025-05-20 11:03:25 +08:00
display: flex;
padding: 0 6px;
flex-wrap: wrap;
position: relative;
/* \u5355\u4E2A\u83DC\u5355 */
}
.w-e-toolbar .w-e-menu {
position: relative;
display: flex;
width: 40px;
height: 40px;
align-items: center;
justify-content: center;
text-align: center;
cursor: pointer;
}
.w-e-toolbar .w-e-menu i {
color: #999;
}
.w-e-toolbar .w-e-menu:hover {
background-color: #F6F6F6;
}
.w-e-toolbar .w-e-menu:hover i {
color: #333;
}
.w-e-toolbar .w-e-active i {
color: #1e88e5;
}
.w-e-toolbar .w-e-active:hover i {
color: #1e88e5;
}
.w-e-menu-tooltip {
position: absolute;
display: flex;
color: #f1f1f1;
background-color: rgba(0, 0, 0, 0.75);
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15);
border-radius: 4px;
padding: 4px 5px 6px;
justify-content: center;
align-items: center;
}
.w-e-menu-tooltip-up::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border: 5px solid rgba(0, 0, 0, 0);
border-top-color: rgba(0, 0, 0, 0.73);
}
.w-e-menu-tooltip-down::after {
content: "";
position: absolute;
bottom: 100%;
left: 50%;
margin-left: -5px;
border: 5px solid rgba(0, 0, 0, 0);
border-bottom-color: rgba(0, 0, 0, 0.73);
}
.w-e-menu-tooltip-item-wrapper {
font-size: 14px;
margin: 0 5px;
}
2025-05-24 17:29:32 +08:00
`,""]),r.exports=o},function(r,o,i){var l=i(20),d=i(155);d=d.__esModule?d.default:d,typeof d=="string"&&(d=[[r.i,d,""]]);var c={};c.insert="head",c.singleton=!1,l(d,c),r.exports=d.locals||{}},function(r,o,i){var l=i(21);o=l(!1),o.push([r.i,`.w-e-text-container {
2025-05-20 11:03:25 +08:00
position: relative;
height: 100%;
}
.w-e-text-container .w-e-progress {
position: absolute;
background-color: #1e88e5;
top: 0;
left: 0;
height: 1px;
}
.w-e-text-container .placeholder {
color: #D4D4D4;
position: absolute;
font-size: 11pt;
line-height: 22px;
left: 10px;
top: 10px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
z-index: -1;
}
.w-e-text {
padding: 0 10px;
overflow-y: auto;
}
.w-e-text p,
.w-e-text h1,
.w-e-text h2,
.w-e-text h3,
.w-e-text h4,
.w-e-text h5,
.w-e-text table,
.w-e-text pre {
margin: 10px 0;
line-height: 1.5;
}
.w-e-text ul,
.w-e-text ol {
margin: 10px 0 10px 20px;
}
.w-e-text blockquote {
display: block;
border-left: 8px solid #d0e5f2;
padding: 5px 10px;
margin: 10px 0;
line-height: 1.4;
font-size: 100%;
background-color: #f1f1f1;
}
.w-e-text code {
display: inline-block;
background-color: #f1f1f1;
border-radius: 3px;
padding: 3px 5px;
margin: 0 3px;
}
.w-e-text pre code {
display: block;
}
.w-e-text table {
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
}
.w-e-text table td,
.w-e-text table th {
border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc;
padding: 3px 5px;
min-height: 30px;
height: 30px;
}
.w-e-text table th {
border-bottom: 2px solid #ccc;
text-align: center;
background-color: #f1f1f1;
}
.w-e-text:focus {
outline: none;
}
.w-e-text img {
cursor: pointer;
}
.w-e-text img:hover {
box-shadow: 0 0 5px #333;
}
.w-e-text .w-e-todo {
margin: 0 0 0 20px;
}
.w-e-text .w-e-todo li {
list-style: none;
font-size: 1em;
}
.w-e-text .w-e-todo li span:nth-child(1) {
position: relative;
left: -18px;
}
.w-e-text .w-e-todo li span:nth-child(1) input {
position: absolute;
margin-right: 3px;
}
.w-e-text .w-e-todo li span:nth-child(1) input[type=checkbox] {
top: 50%;
margin-top: -6px;
}
.w-e-tooltip {
position: absolute;
display: flex;
color: #f1f1f1;
background-color: rgba(0, 0, 0, 0.75);
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15);
border-radius: 4px;
padding: 4px 5px 6px;
justify-content: center;
align-items: center;
}
.w-e-tooltip-up::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border: 5px solid rgba(0, 0, 0, 0);
border-top-color: rgba(0, 0, 0, 0.73);
}
.w-e-tooltip-down::after {
content: "";
position: absolute;
bottom: 100%;
left: 50%;
margin-left: -5px;
border: 5px solid rgba(0, 0, 0, 0);
border-bottom-color: rgba(0, 0, 0, 0.73);
}
.w-e-tooltip-item-wrapper {
cursor: pointer;
font-size: 14px;
margin: 0 5px;
}
.w-e-tooltip-item-wrapper:hover {
color: #ccc;
text-decoration: underline;
}
2025-05-24 17:29:32 +08:00
`,""]),r.exports=o},function(r,o,i){var l=i(20),d=i(157);d=d.__esModule?d.default:d,typeof d=="string"&&(d=[[r.i,d,""]]);var c={};c.insert="head",c.singleton=!1,l(d,c),r.exports=d.locals||{}},function(r,o,i){var l=i(21);o=l(!1),o.push([r.i,`.w-e-menu .w-e-panel-container {
2025-05-20 11:03:25 +08:00
position: absolute;
top: 0;
left: 50%;
border: 1px solid #ccc;
border-top: 0;
box-shadow: 1px 1px 2px #ccc;
color: #333;
background-color: #fff;
text-align: left;
/* \u4E3A emotion panel \u5B9A\u5236\u7684\u6837\u5F0F */
/* \u4E0A\u4F20\u56FE\u7247\u3001\u4E0A\u4F20\u89C6\u9891\u7684 panel \u5B9A\u5236\u6837\u5F0F */
}
.w-e-menu .w-e-panel-container .w-e-panel-close {
position: absolute;
right: 0;
top: 0;
padding: 5px;
margin: 2px 5px 0 0;
cursor: pointer;
color: #999;
}
.w-e-menu .w-e-panel-container .w-e-panel-close:hover {
color: #333;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-title {
list-style: none;
display: flex;
font-size: 14px;
margin: 2px 10px 0 10px;
border-bottom: 1px solid #f1f1f1;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-title .w-e-item {
padding: 3px 5px;
color: #999;
cursor: pointer;
margin: 0 3px;
position: relative;
top: 1px;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-title .w-e-active {
color: #333;
border-bottom: 1px solid #333;
cursor: default;
font-weight: 700;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content {
padding: 10px 15px 10px 15px;
font-size: 16px;
/* \u8F93\u5165\u6846\u7684\u6837\u5F0F */
/* \u6309\u94AE\u7684\u6837\u5F0F */
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content input:focus,
.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea:focus,
.w-e-menu .w-e-panel-container .w-e-panel-tab-content button:focus {
outline: none;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea {
width: 100%;
border: 1px solid #ccc;
padding: 5px;
margin-top: 10px;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea:focus {
border-color: #1e88e5;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text] {
border: none;
border-bottom: 1px solid #ccc;
font-size: 14px;
height: 20px;
color: #333;
text-align: left;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text].small {
width: 30px;
text-align: center;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text].block {
display: block;
width: 100%;
margin: 10px 0;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus {
border-bottom: 2px solid #1e88e5;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button {
font-size: 14px;
color: #1e88e5;
border: none;
padding: 5px 10px;
background-color: #fff;
cursor: pointer;
border-radius: 3px;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left {
float: left;
margin-right: 10px;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right {
float: right;
margin-left: 10px;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray {
color: #999;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red {
color: #c24f4a;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover {
background-color: #f1f1f1;
}
.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after {
content: "";
display: table;
clear: both;
}
.w-e-menu .w-e-panel-container .w-e-emoticon-container .w-e-item {
cursor: pointer;
font-size: 18px;
padding: 0 3px;
display: inline-block;
}
.w-e-menu .w-e-panel-container .w-e-up-img-container,
.w-e-menu .w-e-panel-container .w-e-up-video-container {
text-align: center;
}
.w-e-menu .w-e-panel-container .w-e-up-img-container .w-e-up-btn,
.w-e-menu .w-e-panel-container .w-e-up-video-container .w-e-up-btn {
display: inline-block;
color: #999;
cursor: pointer;
font-size: 60px;
line-height: 1;
}
.w-e-menu .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover,
.w-e-menu .w-e-panel-container .w-e-up-video-container .w-e-up-btn:hover {
color: #333;
}
2025-05-24 17:29:32 +08:00
`,""]),r.exports=o},function(r,o,i){var l=i(20),d=i(159);d=d.__esModule?d.default:d,typeof d=="string"&&(d=[[r.i,d,""]]);var c={};c.insert="head",c.singleton=!1,l(d,c),r.exports=d.locals||{}},function(r,o,i){var l=i(21);o=l(!1),o.push([r.i,`.w-e-toolbar .w-e-droplist {
2025-05-20 11:03:25 +08:00
position: absolute;
left: 0;
top: 0;
background-color: #fff;
border: 1px solid #f1f1f1;
border-right-color: #ccc;
border-bottom-color: #ccc;
}
.w-e-toolbar .w-e-droplist .w-e-dp-title {
text-align: center;
color: #999;
line-height: 2;
border-bottom: 1px solid #f1f1f1;
font-size: 13px;
}
.w-e-toolbar .w-e-droplist ul.w-e-list {
list-style: none;
line-height: 1;
}
.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item {
color: #333;
padding: 5px 0;
}
.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover {
background-color: #f1f1f1;
}
.w-e-toolbar .w-e-droplist ul.w-e-block {
list-style: none;
text-align: left;
padding: 5px;
}
.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item {
display: inline-block;
padding: 3px 5px;
}
.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover {
background-color: #f1f1f1;
}
2025-05-28 11:05:44 +08:00
`,""]),r.exports=o},function(r,o,i){var l=i(0),d=l(i(161));Element.prototype.matches||(Element.prototype.matches=function(c){var u=this.ownerDocument.querySelectorAll(c),h=u.length;for(h;h>=0&&u.item(h)!==this;h--);return h>-1}),d.default||(window.Promise=d.default)},function(r,o,i){r.exports=i(162)},function(r,o,i){var l=i(163);r.exports=l},function(r,o,i){i(61),i(50),i(54),i(175),i(178),i(179);var l=i(9);r.exports=l.Promise},function(r,o,i){var l=i(62),d=i(49),c=function(h){return function(m,y){var C=String(d(m)),A=l(y),w=C.length,E,b;return A<0||A>=w?h?"":void 0:(E=C.charCodeAt(A),E<55296||E>56319||A+1===w||(b=C.charCodeAt(A+1))<56320||b>57343?h?C.charAt(A):E:h?C.slice(A,A+2):(E-55296<<10)+(b-56320)+65536)}};r.exports={codeAt:c(!1),charAt:c(!0)}},function(r,o,i){var l=i(8),d=i(102),c=l.WeakMap;r.exports=typeof c=="function"&&/native code/.test(d(c))},function(r,o,i){var l=i(8),d=i(19);r.exports=function(c,u){try{d(l,c,u)}catch{l[c]=u}return u}},function(r,o,i){var l=i(104).IteratorPrototype,d=i(77),c=i(48),u=i(37),h=i(44),m=function(){return this};r.exports=function(y,C,A){var w=C+" Iterator";return y.prototype=d(l,{next:c(1,A)}),u(y,w,!1,!0),h[w]=m,y}},function(r,o,i){var l=i(11);r.exports=!l(function(){function d(){}return d.prototype.constructor=null,Object.getPrototypeOf(new d)!==d.prototype})},function(r,o,i){var l=i(14),d=i(18),c=i(25),u=i(52);r.exports=l?Object.defineProperties:function(m,y){c(m);for(var C=u(y),A=C.length,w=0,E;A>w;)d.f(m,E=C[w++],y[E]);return m}},function(r,o,i){var l=i(81),d=i(65);r.exports=l?{}.toString:function(){return"[object "+d(this)+"]"}},function(r,o,i){var l=i(25),d=i(172);r.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var c=!1,u={},h;try{h=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,h.call(u,[]),c=u instanceof Array}catch{}return function(y,C){return l(y),d(C),c?h.call(y,C):y.__proto__=C,y}}():void 0)},function(r,o,i){var l=i(13);r.exports=function(d){if(!l(d)&&d!==null)throw TypeError("Can't set "+String(d)+" as a prototype");return d}},function(r,o,i){var l=i(30),d=i(82),c=i(44),u=i(42),h=i(75),m="Array Iterator",y=u.set,C=u.getterFor(m);r.exports=h(Array,"Array",function(A,w){y(this,{type:m,target:l(A),index:0,kind:w})},function(){var A=C(this),w=A.target,E=A.kind,b=A.index++;return!w||b>=w.length?(A.target=void 0,{value:void 0,done:!0}):E=="keys"?{value:b,done:!1}:E=="values"?{value:w[b],done:!1}:{value:[b,w[b]],done:!1}},"values"),c.Arguments=c.Array,d("keys"),d("values"),d("entries")},function(r,o){r.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(r,o,i){var l=i(5),d=i(43),c=i(8),u=i(36),h=i(109),m=i(53),y=i(110),C=i(37),A=i(111),w=i(13),E=i(41),b=i(83),g=i(34),_=i(102),x=i(66),k=i(115),T=i(116),O=i(117).set,F=i(176),I=i(119),M=i(177),N=i(85),B=i(120),L=i(42),U=i(101),H=i(10),R=i(86),z=H("species"),$="Promise",S=L.get,J=L.set,Q=L.getterFor($),G=h,ie=c.TypeError,X=c.document,le=c.process,be=u("fetch"),ce=N.f,de=ce,pe=g(le)=="process",se=!!(X&&X.createEvent&&c.dispatchEvent),ge="unhandledrejection",ye="rejectionhandled",D=0,W=1,Y=2,q=1,ee=2,oe,he,Ae,Me,Le=U($,function(){var Ze=_(G)!==String(G);if(!Ze&&(R===66||!pe&&typeof PromiseRejectionEvent!="function")||d&&!G.prototype.finally)return!0;if(R>=51&&/native code/.test(G))return!1;var De=G.resolve(1),Pe=function(Ce){Ce(function(){},function(){})},tt=De.constructor={};return tt[z]=Pe,!(De.then(function(){})instanceof Pe)}),fe=Le||!k(function(Ze){G.all(Ze).catch(function(){})}),ke=function(De){var Pe;return w(De)&&typeof(Pe=De.then)=="function"?Pe:!1},we=function(De,Pe,tt){if(!Pe.notified){Pe.notified=!0;var $e=Pe.reactions;F(functi
2025-05-27 15:27:24 +08:00
`).replace(/<[^>]+>/gm,"");return _}function w(g){var _;if(g==="")return!1;var x=document.createElement("div");return x.innerHTML=g,((_=x.firstChild)===null||_===void 0?void 0:_.nodeName)==="P"}function E(g){if(!(g!=null&&g.length))return!1;var _=g.elems[0];return _.nodeName==="P"&&_.innerHTML==="<br>"}function b(g,_){function x(k){var T=g.config,O=T.pasteFilterStyle,F=T.pasteIgnoreImg,I=T.pasteTextHandle,M=h.getPasteHtml(k,O,F),N=h.getPasteText(k);N=N.replace(/\n/gm,"<br>");var B=g.selection.getSelectionContainerElem();if(!!B){var L=B==null?void 0:B.getNodeName(),U=B==null?void 0:B.getNodeTop(g),H="";if(U.elems[0]&&(H=U==null?void 0:U.getNodeName()),L==="CODE"||H==="PRE"){I&&m.isFunction(I)&&(N=""+(I(N)||"")),g.cmd.do("insertHTML",A(N));return}if(y.urlRegex.test(N)&&O){I&&m.isFunction(I)&&(N=""+(I(N)||""));var R=N.replace(y.urlRegex,function(X){return'<a href="'+X+'" target="_blank">'+X+"</a>"}),z=g.selection.getRange(),$=document.createElement("div"),S=document.createDocumentFragment();if($.innerHTML=R,z==null)return;for(;$.childNodes.length;)S.append($.childNodes[0]);var J=S.querySelectorAll("a");(0,u.default)(J).call(J,function(X){X.innerText=X.href}),z.insertNode&&(z.deleteContents(),z.insertNode(S)),g.selection.clearWindowSelectionRange();return}if(!!M)try{I&&m.isFunction(I)&&(M=""+(I(M)||""));var Q=/[\.\#\@]?\w+[ ]+\{[^}]*\}/.test(M);if(Q&&O)g.cmd.do("insertHTML",""+C(N));else{var G=C(M);if(w(G)){var ie=g.$textElem;if(g.cmd.do("insertHTML",G),ie.equal(B)){g.selection.createEmptyRange();return}E(U)&&U.remove()}else g.cmd.do("insertHTML",G)}}catch{I&&m.isFunction(I)&&(N=""+(I(N)||"")),g.cmd.do("insertHTML",""+C(N))}}}_.push(x)}o.default=b},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(17)),u=l(i(4)),h=l(i(28));(0,d.default)(o,"__esModule",{value:!0});var m=i(2),y=i(293),C=m.__importDefault(i(297));function A(_){var x=/<span>.*?<\/span>/gi,k=/<span>(.*?)<\/span>/;return _.replace(x,function(T){var O=T.match(k);return O==null?"":O[1]})}function w(_,x){var k;return _=(0,c.default)(k=_.toLowerCase()).call(k),!!(y.IGNORE_TAGS.has(_)||x&&_==="img")}function E(_,x){var k="";k="<"+_;var T=[];(0,u.default)(x).call(x,function(F){T.push(F.name+'="'+F.value+'"')}),T.length>0&&(k=k+" "+T.join(" "));var O=y.EMPTY_TAGS.has(_);return k=k+(O?"/":"")+">",k}function b(_){return"</"+_+">"}function g(_,x,k){x===void 0&&(x=!0),k===void 0&&(k=!1);var T=[],O="";function F(B){B=(0,c.default)(B).call(B),B&&(y.EMPTY_TAGS.has(B)||(O=B))}function I(){O=""}var M=new C.default;M.parse(_,{startElement:function(L,U){if(F(L),!w(L,k)){var H=y.NECESSARY_ATTRS.get(L)||[],R=[];(0,u.default)(U).call(U,function($){var S=$.name;if(S==="style"){x||R.push($);return}(0,h.default)(H).call(H,S)!==!1&&R.push($)});var z=E(L,R);T.push(z)}},characters:function(L){!L||w(O,k)||T.push(L)},endElement:function(L){if(!w(L,k)){var U=b(L);T.push(U),I()}},comment:function(L){F(L)}});var N=T.join("");return N=A(N),N}o.default=g},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(132)),u=l(i(121));(0,d.default)(o,"__esModule",{value:!0}),o.TOP_LEVEL_TAGS=o.EMPTY_TAGS=o.NECESSARY_ATTRS=o.IGNORE_TAGS=void 0,o.IGNORE_TAGS=new c.default(["doctype","!doctype","html","head","meta","body","script","style","link","frame","iframe","title","svg","center","o:p"]),o.NECESSARY_ATTRS=new u.default([["img",["src","alt"]],["a",["href","target"]],["td",["colspan","rowspan"]],["th",["colspan","rowspan"]]]),o.EMPTY_TAGS=new c.default(["area","base","basefont","br","col","hr","img","input","isindex","embed"]),o.TOP_LEVEL_TAGS=new c.default(["h1","h2","h3","h4","h5","p","ul","ol","table","blockquote","pre","hr","form"])},function(r,o,i){var l=i(295);r.exports=l},function(r,o,i){i(296),i(61),i(50),i(54);var l=i(9);r.exports=l.Set},function(r,o,i){var l=i(122),d=i(124);r.exports=l("Set",function(c){return function(){return c(this,arguments.length?arguments[0]:void 0)}},d)},function(r,o){function i(){}i.prototype={handler:null,startTagRe:/^<([^>\s\/]+)((\s+[^=>\s]+(\s*=\s*((\"[^"]*\")|(\'[^']*\')|[^>\s]+))?)*)\s*\/?\s*>/m,endTagRe:/^<\/([^>\s]+)[^>]*>/m,attrRe:/([^=\s]+)(\s*=\s*((\"([^"]*)\")|(\'([^']*)\')|[^
2025-05-20 11:03:25 +08:00
<div class="w-e-menu-tooltip-item-wrapper">
<div></div>
</div>
2025-05-27 15:27:24 +08:00
</div>`);N.css("visibility","hidden"),F.append(N),N.css("z-index",O.zIndex.get("tooltip"));var B=0;function L(){B&&clearTimeout(B)}function U(){L(),N.css("visibility","hidden")}F.on("mouseover",function(H){var R=H.target,z=x.default(R),$,S;if(z.isContain(F)){U();return}if(z.parentUntil(".w-e-droplist")!=null)U();else if(z.attr("data-title"))$=z.attr("data-title"),S=z;else{var J=z.parentUntil(".w-e-menu");J!=null&&($=J.attr("data-title"),S=J)}if($&&S){L();var Q=S.getOffsetData();N.text(O.i18next.t("menus.title."+$));var G=N.getOffsetData(),ie=Q.left+Q.width/2-G.width/2;N.css("left",ie+"px"),M==="up"?N.css("top",Q.top-G.height-8+"px"):M==="down"&&N.css("top",Q.top+Q.height+8+"px"),B=(0,w.default)(function(){N.css("visibility","visible")},200)}else U()}).on("mouseleave",function(){U()})},T.prototype._addToToolbar=function(){var O,F=this.editor,I=F.$toolbarElem;(0,y.default)(O=this.menuList).call(O,function(M){var N=M.$elem;N&&I.append(N)})},T.prototype.menuFind=function(O){for(var F=this.menuList,I=0,M=F.length;I<M;I++)if(F[I].key===O)return F[I];return F[0]},T.prototype.changeActive=function(){var O;(0,y.default)(O=this.menuList).call(O,function(F){var I;(0,w.default)((0,E.default)(I=F.tryChangeActive).call(I,F),100)})},T}();o.default=k},function(r,o,i){r.exports=i(303)},function(r,o,i){var l=i(304);r.exports=l},function(r,o,i){i(305);var l=i(9);r.exports=l.Object.keys},function(r,o,i){var l=i(5),d=i(31),c=i(52),u=i(11),h=u(function(){c(1)});l({target:"Object",stat:!0,forced:h},{keys:function(y){return c(d(y))}})},function(r,o,i){var l=i(307);r.exports=l},function(r,o,i){i(308);var l=i(9);r.exports=l.Object.entries},function(r,o,i){var l=i(5),d=i(309).entries;l({target:"Object",stat:!0},{entries:function(u){return d(u)}})},function(r,o,i){var l=i(14),d=i(52),c=i(30),u=i(59).f,h=function(y){return function(C){for(var A=c(C),w=d(A),E=w.length,b=0,g=[],_;E>b;)_=w[b++],(!l||u.call(A,_))&&g.push(y?[_,A[_]]:A[_]);return g}};r.exports={entries:h(!0),values:h(!1)}},function(r,o,i){var l=i(311);r.exports=l},function(r,o,i){var l=i(312),d=Array.prototype;r.exports=function(c){var u=c.some;return c===d||c instanceof Array&&u===d.some?l:u}},function(r,o,i){i(313);var l=i(15);r.exports=l("Array").some},function(r,o,i){var l=i(5),d=i(32).some,c=i(67),u=i(22),h=c("some"),m=u("some");l({target:"Array",proto:!0,forced:!h||!m},{some:function(C){return d(this,C,arguments.length>1?arguments[1]:void 0)}})},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(315)),h=c.__importDefault(i(316)),m=c.__importDefault(i(321)),y=c.__importDefault(i(326)),C=c.__importDefault(i(327)),A=c.__importDefault(i(328)),w=c.__importDefault(i(329)),E=c.__importDefault(i(331)),b=c.__importDefault(i(333)),g=c.__importDefault(i(334)),_=c.__importDefault(i(337)),x=c.__importDefault(i(338)),k=c.__importDefault(i(339)),T=c.__importDefault(i(350)),O=c.__importDefault(i(365)),F=c.__importDefault(i(369)),I=c.__importDefault(i(137)),M=c.__importDefault(i(378)),N=c.__importDefault(i(380)),B=c.__importDefault(i(381)),L=c.__importDefault(i(382)),U=c.__importDefault(i(401)),H=c.__importDefault(i(406)),R=c.__importDefault(i(409));o.default={bold:u.default,head:h.default,italic:y.default,link:m.default,underline:C.default,strikeThrough:A.default,fontName:w.default,fontSize:E.default,justify:b.default,quote:g.default,backColor:_.default,foreColor:x.default,video:k.default,image:T.default,indent:O.default,emoticon:F.default,list:I.default,lineHeight:M.default,undo:N.default,redo:B.default,table:L.default,code:U.default,splitLine:H.default,todo:R.default}},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(23)),h=c.__importDefault(i(3)),m=function(y){c.__extends(C,y);function C(A){var w=this,E=h.default(`<div class="w-e-menu" data-title="\u52A0\u7C97">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-bold"></i>
2025-05-27 15:27:24 +08:00
</div>`);return w=y.call(this,E,A)||this,w}return C.prototype.clickHandler=function(){var A=this.editor,w=A.selection.isSelectionEmpty();w&&A.selection.createEmptyRange(),A.cmd.do("bold"),w&&(A.selection.collapseRange(),A.selection.restoreSelection())},C.prototype.tryChangeActive=function(){var A=this.editor;A.cmd.queryCommandState("bold")?this.active():this.unActive()},C}(u.default);o.default=m},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(27)),u=l(i(29)),h=l(i(4)),m=l(i(317)),y=l(i(28));(0,d.default)(o,"__esModule",{value:!0});var C=i(2),A=C.__importDefault(i(24)),w=C.__importDefault(i(3)),E=i(6),b=i(7),g=function(_){C.__extends(x,_);function x(k){var T=this,O=w.default('<div class="w-e-menu" data-title="\u6807\u9898"><i class="w-e-icon-header"></i></div>'),F={width:100,title:"\u8BBE\u7F6E\u6807\u9898",type:"list",list:[{$elem:w.default("<h1>H1</h1>"),value:"<h1>"},{$elem:w.default("<h2>H2</h2>"),value:"<h2>"},{$elem:w.default("<h3>H3</h3>"),value:"<h3>"},{$elem:w.default("<h4>H4</h4>"),value:"<h4>"},{$elem:w.default("<h5>H5</h5>"),value:"<h5>"},{$elem:w.default("<p>"+k.i18next.t("menus.dropListMenu.head.\u6B63\u6587")+"</p>"),value:"<p>"}],clickHandler:function(N){T.command(N)}};T=_.call(this,O,k,F)||this;var I=k.config.onCatalogChange;return I&&(T.oldCatalogs=[],T.addListenerCatalog(),T.getCatalogs()),T}return x.prototype.command=function(k){var T=this.editor,O=T.selection.getSelectionContainerElem();if(O&&T.$textElem.equal(O))this.setMultilineHead(k);else{var F;if((0,c.default)(F=["OL","UL","LI","TABLE","TH","TR","CODE","HR"]).call(F,w.default(O).getNodeName())>-1)return;T.cmd.do("formatBlock",k)}k!=="<p>"&&this.addUidForSelectionElem()},x.prototype.addUidForSelectionElem=function(){var k=this.editor,T=k.selection.getSelectionContainerElem(),O=E.getRandomCode();w.default(T).attr("id",O)},x.prototype.addListenerCatalog=function(){var k=this,T=this.editor;T.txt.eventHooks.changeEvents.push(function(){k.getCatalogs()})},x.prototype.getCatalogs=function(){var k=this.editor,T=this.editor.$textElem,O=k.config.onCatalogChange,F=(0,u.default)(T).call(T,"h1,h2,h3,h4,h5"),I=[];(0,h.default)(F).call(F,function(M,N){var B=w.default(M),L=B.attr("id"),U=B.getNodeName(),H=B.text();L||(L=E.getRandomCode(),B.attr("id",L)),H&&I.push({tag:U,id:L,text:H})}),(0,m.default)(this.oldCatalogs)!==(0,m.default)(I)&&(this.oldCatalogs=I,O&&O(I))},x.prototype.setMultilineHead=function(k){var T=this,O,F,I=this.editor,M=I.selection,N=(O=M.getSelectionContainerElem())===null||O===void 0?void 0:O.elems[0],B=["IMG","VIDEO","TABLE","TH","TR","UL","OL","PRE","HR","BLOCKQUOTE"],L=w.default(M.getSelectionStartElem()),U=w.default(M.getSelectionEndElem());U.elems[0].outerHTML===w.default(b.EMPTY_P).elems[0].outerHTML&&!U.elems[0].nextSibling&&(U=U.prev());var H=[];H.push(L.getNodeTop(I));var R=[],z=(F=M.getRange())===null||F===void 0?void 0:F.commonAncestorContainer.childNodes;z==null||(0,h.default)(z).call(z,function(J,Q){J===H[0].getNode()&&R.push(Q),J===U.getNodeTop(I).getNode()&&R.push(Q)});for(var $=0;H[$].getNode()!==U.getNodeTop(I).getNode();){if(!H[$].elems[0])return;var S=w.default(H[$].next().getNode());H.push(S),$++}H==null||(0,h.default)(H).call(H,function(J,Q){if(!T.hasTag(J,B)){var G=w.default(k),ie=J.parent().getNode();G.html(""+J.html()),ie.insertBefore(G.getNode(),J.getNode()),J.remove()}}),M.createRangeByElems(N.children[R[0]],N.children[R[1]])},x.prototype.hasTag=function(k,T){var O=this,F;if(!k)return!1;if((0,y.default)(T).call(T,k==null?void 0:k.getNodeName()))return!0;var I=!1;return(F=k.children())===null||F===void 0||(0,h.default)(F).call(F,function(M){I=O.hasTag(w.default(M),T)}),I},x.prototype.tryChangeActive=function(){var k=this.editor,T=/^h/i,O=k.cmd.queryCommandValue("formatBlock");T.test(O)?this.active():this.unActive()},x}(A.default);o.default=g},function(r,o,i){r.exports=i(318)},function(r,o,i){var l=i(319);r.exports=l},function(r,o,i){i(320);var l=i(9);l.JSON||(l.JSON={stringify:JSON.stringify}),r.exports=function(c,u,h){return l.JSON.stringify.apply(null,arguments)}},function(r,o,i){var l=i(5),d=i(36),c=i(11),u
2025-05-20 11:03:25 +08:00
<input
id="`+k+`"
type="text"
class="block"
placeholder="`+b.i18next.t("menus.panelMenus.link.\u94FE\u63A5\u6587\u5B57")+`"/>
</td>
<input
id="`+x+`"
type="text"
class="block"
placeholder="`+b.i18next.t("\u5982")+` https://..."/>
</td>
<div class="w-e-button-container">
<button type="button" id="`+T+`" class="right">
`+b.i18next.t("\u63D2\u5165")+`
</button>
2025-05-26 10:41:15 +08:00
<button type="button" id="`+O+'" class="gray right" style="display:'+F+`">
2025-05-20 11:03:25 +08:00
`+b.i18next.t("menus.panelMenus.link.\u53D6\u6D88\u94FE\u63A5")+`
</button>
</div>
2025-05-28 11:05:44 +08:00
</div>`,events:[{selector:"#"+T,type:"click",fn:function(){var R,z,$,S,J,Q=b.selection.getSelectionContainerElem(),G=Q==null?void 0:Q.elems[0];b.selection.restoreSelection();var ie=b.selection.getSelectionRangeTopNodes()[0].getNode(),X=window.getSelection(),le=C.default("#"+x),be=C.default("#"+k),ce=(0,u.default)(R=le.val()).call(R),de=(0,u.default)(z=be.val()).call(z),pe="";X&&!(X!=null&&X.isCollapsed)&&(pe=(S=w.insertHtml(X,ie))===null||S===void 0?void 0:(0,u.default)(S).call(S));var se=pe==null?void 0:pe.replace(/<.*?>/g,""),ge=(J=se==null?void 0:se.length)!==null&&J!==void 0?J:0;if(ge<=de.length){var ye=de.substring(0,ge),D=de.substring(ge);se===ye&&(de=se+D)}if(!!ce&&(de||(de=ce),!!L(de,ce))){if((G==null?void 0:G.nodeName)==="A")return G.setAttribute("href",ce),G.innerText=de,!0;if((G==null?void 0:G.nodeName)!=="A"&&(0,c.default)($=A.EXTRA_TAG).call($,G.nodeName)){var W=A.getParentNodeA(Q);if(W)return W.setAttribute("href",ce),G.innerText=de,!0}return N(de,ce),!0}},bindEnter:!0},{selector:"#"+O,type:"click",fn:function(){return B(),!0}}]}],setLinkValue:function(R,z){var $="",S="",J;z==="text"&&($="#"+k,S=g),z==="link"&&($="#"+x,S=_),J=(0,h.default)(R).call(R,$).elems[0],J.value=S}};return U}o.default=E},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(4));(0,d.default)(o,"__esModule",{value:!0}),o.insertHtml=o.createPartHtml=o.makeHtmlString=o.getTopNode=void 0;function u(w,E){var b=w,g=w;do{if(b.textContent===E)break;g=b,b.parentNode&&(b=b==null?void 0:b.parentNode)}while((b==null?void 0:b.nodeName)!=="P");return g}o.getTopNode=u;function h(w,E){var b=w.nodeName,g="";if(w.nodeType===3||/^(h|H)[1-6]$/.test(b))return E;if(w.nodeType===1){var _=w.getAttribute("style"),x=w.getAttribute("face"),k=w.getAttribute("color");_&&(g=g+(' style="'+_+'"')),x&&(g=g+(' face="'+x+'"')),k&&(g=g+(' color="'+k+'"'))}return b=b.toLowerCase(),"<"+b+g+">"+E+"</"+b+">"}o.makeHtmlString=h;function m(w,E,b,g){var _,x=(_=E.textContent)===null||_===void 0?void 0:_.substring(b,g),k=E,T="";do T=h(k,x!=null?x:""),x=T,k=k==null?void 0:k.parentElement;while(k&&k.textContent!==w);return T}o.createPartHtml=m;function y(w,E){var b,g,_,x,k,T=w.anchorNode,O=w.focusNode,F=w.anchorOffset,I=w.focusOffset,M=(b=E.textContent)!==null&&b!==void 0?b:"",N=C(E),B="",L="",U="",H="",R=T,z=O,$=T;if(T!=null&&T.isEqualNode(O!=null?O:null)){var S=m(M,T,F,I);return S=A(N,S),S}for(T&&(L=m(M,T,F!=null?F:0)),O&&(H=m(M,O,0,I)),T&&(R=u(T,M)),O&&(z=u(O,M)),$=(g=R==null?void 0:R.nextSibling)!==null&&g!==void 0?g:T;!($!=null&&$.isEqualNode(z!=null?z:null));){var J=$==null?void 0:$.nodeName;if(J==="#text")U=U+($==null?void 0:$.textContent);else{var Q=(x=(_=$==null?void 0:$.firstChild)===null||_===void 0?void 0:_.parentElement)===null||x===void 0?void 0:x.innerHTML;$&&(U=U+h($,Q!=null?Q:""))}var G=(k=$==null?void 0:$.nextSibling)!==null&&k!==void 0?k:$;if(G===$)break;$=G}return B=""+L+U+H,B=A(N,B),B}o.insertHtml=y;function C(w){for(var E,b=(E=w.textContent)!==null&&E!==void 0?E:"",g=[];(w==null?void 0:w.textContent)===b;)w.nodeName!=="P"&&w.nodeName!=="TABLE"&&g.push(w),w=w.childNodes[0];return g}function A(w,E){return(0,c.default)(w).call(w,function(b){E=h(b,E)}),E}},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(325));function h(m){u.default(m)}o.default=h},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(28));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=u.__importDefault(i(3)),m=u.__importDefault(i(39)),y=i(96);function C(w){var E;function b(_){var x=[{$elem:h.default("<span>"+w.i18next.t("menus.panelMenus.link.\u67E5\u770B\u94FE\u63A5")+"</span>"),onClick:function(T,O){var F=O.attr("href");return window.open(F,"_target"),!0}},{$elem:h.default("<span>"+w.i18next.t("menus.panelMenus.link.\u53D6\u6D88\u94FE\u63A5")+"</span>"),onClick:function(T,O){var F,I;T.selection.createRangeByElem(O),T.selection.restoreSelection();var M=O.childNodes();if((M==null?void 0:M.getNodeName())==="IMG"){var N=(I=(F=T.selection.getSelectionContainerElem())===null||F===void 0?void 0:F.children())===null||I===void 0?void
2025-05-20 11:03:25 +08:00
src=`+(N==null?void 0:N.getAttribute("src"))+`
2025-05-27 15:27:24 +08:00
style=`+(N==null?void 0:N.getAttribute("style"))+">")}else{var B,L=O.elems[0],U=L.innerHTML,H=L.parentElement;H&&(0,c.default)(B=y.EXTRA_TAG).call(B,H.nodeName)?H.innerHTML=U:T.cmd.do("insertHTML","<span>"+U+"</span>")}return!0}}];E=new m.default(w,_,x),E.create()}function g(){E&&(E.remove(),E=null)}return{showLinkTooltip:b,hideLinkTooltip:g}}function A(w){var E=C(w),b=E.showLinkTooltip,g=E.hideLinkTooltip;w.txt.eventHooks.linkClickEvents.push(b),w.txt.eventHooks.clickEvents.push(g),w.txt.eventHooks.keyupEvents.push(g),w.txt.eventHooks.toolbarClickEvents.push(g),w.txt.eventHooks.menuClickEvents.push(g),w.txt.eventHooks.textScrollEvents.push(g)}o.default=A},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(23)),h=c.__importDefault(i(3)),m=function(y){c.__extends(C,y);function C(A){var w=this,E=h.default(`<div class="w-e-menu" data-title="\u659C\u4F53">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-italic"></i>
2025-05-27 15:27:24 +08:00
</div>`);return w=y.call(this,E,A)||this,w}return C.prototype.clickHandler=function(){var A=this.editor,w=A.selection.isSelectionEmpty();w&&A.selection.createEmptyRange(),A.cmd.do("italic"),w&&(A.selection.collapseRange(),A.selection.restoreSelection())},C.prototype.tryChangeActive=function(){var A=this.editor;A.cmd.queryCommandState("italic")?this.active():this.unActive()},C}(u.default);o.default=m},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(23)),h=c.__importDefault(i(3)),m=function(y){c.__extends(C,y);function C(A){var w=this,E=h.default(`<div class="w-e-menu" data-title="\u4E0B\u5212\u7EBF">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-underline"></i>
2025-05-27 15:27:24 +08:00
</div>`);return w=y.call(this,E,A)||this,w}return C.prototype.clickHandler=function(){var A=this.editor,w=A.selection.isSelectionEmpty();w&&A.selection.createEmptyRange(),A.cmd.do("underline"),w&&(A.selection.collapseRange(),A.selection.restoreSelection())},C.prototype.tryChangeActive=function(){var A=this.editor;A.cmd.queryCommandState("underline")?this.active():this.unActive()},C}(u.default);o.default=m},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(23)),h=c.__importDefault(i(3)),m=function(y){c.__extends(C,y);function C(A){var w=this,E=h.default(`<div class="w-e-menu" data-title="\u5220\u9664\u7EBF">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-strikethrough"></i>
2025-05-27 15:27:24 +08:00
</div>`);return w=y.call(this,E,A)||this,w}return C.prototype.clickHandler=function(){var A=this.editor,w=A.selection.isSelectionEmpty();w&&A.selection.createEmptyRange(),A.cmd.do("strikeThrough"),w&&(A.selection.collapseRange(),A.selection.restoreSelection())},C.prototype.tryChangeActive=function(){var A=this.editor;A.cmd.queryCommandState("strikeThrough")?this.active():this.unActive()},C}(u.default);o.default=m},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(24)),h=c.__importDefault(i(3)),m=c.__importDefault(i(330)),y=function(C){c.__extends(A,C);function A(w){var E=this,b=h.default(`<div class="w-e-menu" data-title="\u5B57\u4F53">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-font"></i>
2025-05-27 15:27:24 +08:00
</div>`),g=new m.default(w.config.fontNames),_={width:100,title:"\u8BBE\u7F6E\u5B57\u4F53",type:"list",list:g.getItemList(),clickHandler:function(k){E.command(k)}};return E=C.call(this,b,w,_)||this,E}return A.prototype.command=function(w){var E,b=this.editor,g=b.selection.isSelectionEmpty(),_=(E=b.selection.getSelectionContainerElem())===null||E===void 0?void 0:E.elems[0];if(_!=null){var x=(_==null?void 0:_.nodeName.toLowerCase())!=="p",k=(_==null?void 0:_.getAttribute("face"))===w;if(g){if(x&&!k){var T=b.selection.getSelectionRangeTopNodes();b.selection.createRangeByElem(T[0]),b.selection.moveCursor(T[0].elems[0])}b.selection.setRangeToElem(_),b.selection.createEmptyRange()}b.cmd.do("fontName",w),g&&(b.selection.collapseRange(),b.selection.restoreSelection())}},A.prototype.tryChangeActive=function(){},A}(u.default);o.default=y},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(4));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=u.__importDefault(i(3)),m=function(){function y(C){var A=this;this.itemList=[],(0,c.default)(C).call(C,function(w){var E=typeof w=="string"?w:w.value,b=typeof w=="string"?w:w.name;A.itemList.push({$elem:h.default(`<p style="font-family:'`+E+`'">`+b+"</p>"),value:b})})}return y.prototype.getItemList=function(){return this.itemList},y}();o.default=m},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(24)),h=c.__importDefault(i(3)),m=c.__importDefault(i(332)),y=function(C){c.__extends(A,C);function A(w){var E=this,b=h.default(`<div class="w-e-menu" data-title="\u5B57\u53F7">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-text-heigh"></i>
2025-05-27 15:27:24 +08:00
</div>`),g=new m.default(w.config.fontSizes),_={width:160,title:"\u8BBE\u7F6E\u5B57\u53F7",type:"list",list:g.getItemList(),clickHandler:function(k){E.command(k)}};return E=C.call(this,b,w,_)||this,E}return A.prototype.command=function(w){var E,b=this.editor,g=b.selection.isSelectionEmpty(),_=(E=b.selection.getSelectionContainerElem())===null||E===void 0?void 0:E.elems[0];_!=null&&(b.cmd.do("fontSize",w),g&&(b.selection.collapseRange(),b.selection.restoreSelection()))},A.prototype.tryChangeActive=function(){},A}(u.default);o.default=y},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(3)),h=function(){function m(y){this.itemList=[];for(var C in y){var A=y[C];this.itemList.push({$elem:u.default('<p style="font-size:'+C+'">'+A.name+"</p>"),value:A.value})}}return m.prototype.getItemList=function(){return this.itemList},m}();o.default=h},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(4)),u=l(i(27));(0,d.default)(o,"__esModule",{value:!0});var h=i(2),m=h.__importDefault(i(24)),y=h.__importDefault(i(3)),C=["LI"],A=["BLOCKQUOTE"],w=function(E){h.__extends(b,E);function b(g){var _=this,x=y.default('<div class="w-e-menu" data-title="\u5BF9\u9F50"><i class="w-e-icon-paragraph-left"></i></div>'),k={width:100,title:"\u5BF9\u9F50\u65B9\u5F0F",type:"list",list:[{$elem:y.default(`<p>
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-paragraph-left w-e-drop-list-item"></i>
`+g.i18next.t("menus.dropListMenu.justify.\u9760\u5DE6")+`
2025-05-24 17:29:32 +08:00
</p>`),value:"left"},{$elem:y.default(`<p>
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-paragraph-center w-e-drop-list-item"></i>
`+g.i18next.t("menus.dropListMenu.justify.\u5C45\u4E2D")+`
2025-05-24 17:29:32 +08:00
</p>`),value:"center"},{$elem:y.default(`<p>
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-paragraph-right w-e-drop-list-item"></i>
`+g.i18next.t("menus.dropListMenu.justify.\u9760\u53F3")+`
2025-05-24 17:29:32 +08:00
</p>`),value:"right"},{$elem:y.default(`<p>
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-paragraph-justify w-e-drop-list-item"></i>
`+g.i18next.t("menus.dropListMenu.justify.\u4E24\u7AEF")+`
2025-05-27 15:27:24 +08:00
</p>`),value:"justify"}],clickHandler:function(O){_.command(O)}};return _=E.call(this,x,g,k)||this,_}return b.prototype.command=function(g){var _=this.editor,x=_.selection,k=x.getSelectionContainerElem();x.saveRange();var T=_.selection.getSelectionRangeTopNodes();if(k!=null&&k.length)if(this.isSpecialNode(k,T[0])||this.isSpecialTopNode(T[0])){var O=this.getSpecialNodeUntilTop(k,T[0]);if(O==null)return;y.default(O).css("text-align",g)}else(0,c.default)(T).call(T,function(F){F.css("text-align",g)});x.restoreSelection()},b.prototype.getSpecialNodeUntilTop=function(g,_){for(var x=g.elems[0],k=_.elems[0];x!=null;){if((0,u.default)(C).call(C,x==null?void 0:x.nodeName)!==-1||x.parentNode===k)return x;x=x.parentNode}return x},b.prototype.isSpecialNode=function(g,_){var x=this.getSpecialNodeUntilTop(g,_);return x==null?!1:(0,u.default)(C).call(C,x.nodeName)!==-1},b.prototype.isSpecialTopNode=function(g){var _;return g==null?!1:(0,u.default)(A).call(A,(_=g.elems[0])===null||_===void 0?void 0:_.nodeName)!==-1},b.prototype.tryChangeActive=function(){},b}(m.default);o.default=w},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(4));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=u.__importDefault(i(3)),m=u.__importDefault(i(23)),y=u.__importDefault(i(335)),C=u.__importDefault(i(336)),A=i(7),w=function(E){u.__extends(b,E);function b(g){var _=this,x=h.default(`<div class="w-e-menu" data-title="\u5F15\u7528">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-quotes-left"></i>
2025-05-27 15:27:24 +08:00
</div>`);return _=E.call(this,x,g)||this,y.default(g),_}return b.prototype.clickHandler=function(){var g,_,x=this.editor,k=x.selection.isSelectionEmpty(),T=x.selection.getSelectionRangeTopNodes(),O=T[T.length-1],F=this.getTopNodeName();if(F==="BLOCKQUOTE"){var I=h.default(O.childNodes()),M=I.length,N=O;(0,c.default)(I).call(I,function(H){var R=h.default(H);R.insertAfter(N),N=R}),O.remove(),x.selection.moveCursor(I.elems[M-1]),this.tryChangeActive()}else{var B=C.default(T);if(x.$textElem.equal(O)){var L=(g=x.selection.getSelectionContainerElem())===null||g===void 0?void 0:g.elems[0];x.selection.createRangeByElems(L.children[0],L.children[0]),T=x.selection.getSelectionRangeTopNodes(),B=C.default(T),O.append(B)}else B.insertAfter(O);this.delSelectNode(T);var U=(_=B.childNodes())===null||_===void 0?void 0:_.last().getNode();if(U==null)return;U.textContent?x.selection.moveCursor(U):x.selection.moveCursor(U,0),this.tryChangeActive(),h.default(A.EMPTY_P).insertAfter(B);return}k&&(x.selection.collapseRange(),x.selection.restoreSelection())},b.prototype.tryChangeActive=function(){var g,_=this.editor,x=(g=_.selection.getSelectionRangeTopNodes()[0])===null||g===void 0?void 0:g.getNodeName();x==="BLOCKQUOTE"?this.active():this.unActive()},b.prototype.getTopNodeName=function(){var g=this.editor,_=g.selection.getSelectionRangeTopNodes()[0],x=_==null?void 0:_.getNodeName();return x},b.prototype.delSelectNode=function(g){(0,c.default)(g).call(g,function(_){_.remove()})},b}(m.default);o.default=w},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=i(7),h=c.__importDefault(i(3));function m(y){function C(A){var w,E=y.selection.getSelectionContainerElem(),b=y.selection.getSelectionRangeTopNodes()[0];if((b==null?void 0:b.getNodeName())==="BLOCKQUOTE"){if(E.getNodeName()==="BLOCKQUOTE"){var g=(w=E.childNodes())===null||w===void 0?void 0:w.getNode();y.selection.moveCursor(g)}if(E.text()===""){A.preventDefault(),E.remove();var _=h.default(u.EMPTY_P);_.insertAfter(b),y.selection.moveCursor(_.getNode(),0)}b.text()===""&&b.remove()}}y.txt.eventHooks.enterDownEvents.push(C)}o.default=m},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(4));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=u.__importDefault(i(3));function m(y){var C=h.default("<blockquote></blockquote>");return(0,c.default)(y).call(y,function(A){C.append(A.clone(!0))}),C}o.default=m},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(26));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=u.__importDefault(i(24)),m=u.__importDefault(i(3)),y=i(6),C=function(A){u.__extends(w,A);function w(E){var b,g=this,_=m.default(`<div class="w-e-menu" data-title="\u80CC\u666F\u8272">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-paint-brush"></i>
2025-05-27 15:27:24 +08:00
</div>`),x={width:120,title:"\u80CC\u666F\u989C\u8272",type:"inline-block",list:(0,c.default)(b=E.config.colors).call(b,function(k){return{$elem:m.default('<i style="color:'+k+';" class="w-e-icon-paint-brush"></i>'),value:k}}),clickHandler:function(T){g.command(T)}};return g=A.call(this,_,E,x)||this,g}return w.prototype.command=function(E){var b,g=this.editor,_=g.selection.isSelectionEmpty(),x=(b=g.selection.getSelectionContainerElem())===null||b===void 0?void 0:b.elems[0];if(x!=null){var k=(x==null?void 0:x.nodeName.toLowerCase())!=="p",T=x==null?void 0:x.style.backgroundColor,O=y.hexToRgb(E)===T;if(_){if(k&&!O){var F=g.selection.getSelectionRangeTopNodes();g.selection.createRangeByElem(F[0]),g.selection.moveCursor(F[0].elems[0])}g.selection.createEmptyRange()}g.cmd.do("backColor",E),_&&(g.selection.collapseRange(),g.selection.restoreSelection())}},w.prototype.tryChangeActive=function(){},w}(h.default);o.default=C},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(26));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=u.__importDefault(i(24)),m=u.__importDefault(i(3)),y=function(C){u.__extends(A,C);function A(w){var E,b=this,g=m.default(`<div class="w-e-menu" data-title="\u6587\u5B57\u989C\u8272">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-pencil2"></i>
2025-05-27 15:27:24 +08:00
</div>`),_={width:120,title:"\u6587\u5B57\u989C\u8272",type:"inline-block",list:(0,c.default)(E=w.config.colors).call(E,function(x){return{$elem:m.default('<i style="color:'+x+';" class="w-e-icon-pencil2"></i>'),value:x}}),clickHandler:function(k){b.command(k)}};return b=C.call(this,g,w,_)||this,b}return A.prototype.command=function(w){var E,b=this.editor,g=b.selection.isSelectionEmpty(),_=(E=b.selection.getSelectionContainerElem())===null||E===void 0?void 0:E.elems[0];if(_!=null){var x=b.selection.getSelectionText();if(_.nodeName==="A"&&_.textContent===x){var k=m.default("<span>&#8203;</span>").getNode();_.appendChild(k)}b.cmd.do("foreColor",w),g&&(b.selection.collapseRange(),b.selection.restoreSelection())}},A.prototype.tryChangeActive=function(){},A}(h.default);o.default=y},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(3)),h=c.__importDefault(i(33)),m=c.__importDefault(i(38)),y=c.__importDefault(i(340)),C=c.__importDefault(i(346)),A=function(w){c.__extends(E,w);function E(b){var g=this,_=u.default(`<div class="w-e-menu" data-title="\u89C6\u9891">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-play"></i>
2025-05-27 15:27:24 +08:00
</div>`);return g=w.call(this,_,b)||this,C.default(b),g}return E.prototype.clickHandler=function(){this.createPanel("")},E.prototype.createPanel=function(b){var g=y.default(this.editor,b),_=new h.default(this,g);_.create()},E.prototype.tryChangeActive=function(){},E}(m.default);o.default=A},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(17));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=i(6),m=u.__importDefault(i(3)),y=u.__importDefault(i(341)),C=i(7);function A(w,E){var b=w.config,g=new y.default(w),_=h.getRandom("input-iframe"),x=h.getRandom("btn-ok"),k=h.getRandom("input-upload"),T=h.getRandom("btn-local-ok");function O(N){w.cmd.do("insertHTML",N+C.EMPTY_P),w.config.onlineVideoCallback(N)}function F(N){var B=w.config.onlineVideoCheck(N);return B===!0?!0:(typeof B=="string"&&w.config.customAlert(B,"error"),!1)}var I=[{title:w.i18next.t("menus.panelMenus.video.\u4E0A\u4F20\u89C6\u9891"),tpl:`<div class="w-e-up-video-container">
2025-05-20 11:03:25 +08:00
<div id="`+T+`" class="w-e-up-btn">
<i class="w-e-icon-upload2"></i>
</div>
<div style="display:none;">
<input id="`+k+`" type="file" accept="video/*"/>
</div>
2025-05-26 10:41:15 +08:00
</div>`,events:[{selector:"#"+T,type:"click",fn:function(){var B=m.default("#"+k),L=B.elems[0];if(L)L.click();else return!0}},{selector:"#"+k,type:"change",fn:function(){var B=m.default("#"+k),L=B.elems[0];if(!L)return!0;var U=L.files;return U.length&&g.uploadVideo(U),!0}}]},{title:w.i18next.t("menus.panelMenus.video.\u63D2\u5165\u89C6\u9891"),tpl:`<div>
2025-05-20 11:03:25 +08:00
<input
id="`+_+`"
type="text"
class="block"
placeholder="`+w.i18next.t("\u5982")+`\uFF1A<iframe src=... ></iframe>"/>
</td>
<div class="w-e-button-container">
<button type="button" id="`+x+`" class="right">
`+w.i18next.t("\u63D2\u5165")+`
</button>
</div>
2025-05-27 15:27:24 +08:00
</div>`,events:[{selector:"#"+x,type:"click",fn:function(){var B,L=m.default("#"+_),U=(0,c.default)(B=L.val()).call(B);if(!!U&&!!F(U))return O(U),!0},bindEnter:!0}]}],M={width:300,height:0,tabs:[]};return window.FileReader&&(b.uploadVideoServer||b.customUploadVideo)&&M.tabs.push(I[0]),b.showLinkVideo&&M.tabs.push(I[1]),M}o.default=A},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(133)),u=l(i(57)),h=l(i(4)),m=l(i(27));(0,d.default)(o,"__esModule",{value:!0});var y=i(2),C=i(6),A=y.__importDefault(i(135)),w=y.__importDefault(i(136)),E=i(7),b=i(6),g=function(){function _(x){this.editor=x}return _.prototype.uploadVideo=function(x){var k=this;if(!!x.length){var T=this.editor,O=T.config,F="validate.",I=function(se){return T.i18next.t(F+se)},M=O.uploadVideoServer,N=O.uploadVideoMaxSize,B=N/1024,L=O.uploadVideoName,U=O.uploadVideoParams,H=O.uploadVideoParamsWithUrl,R=O.uploadVideoHeaders,z=O.uploadVideoHooks,$=O.uploadVideoTimeout,S=O.withVideoCredentials,J=O.customUploadVideo,Q=O.uploadVideoAccept,G=[],ie=[];if(C.arrForEach(x,function(pe){var se=pe.name,ge=pe.size/1024/1024;if(!(!se||!ge)){if(!(Q instanceof Array)){ie.push("\u3010"+Q+"\u3011"+I("uploadVideoAccept \u4E0D\u662FArray"));return}if(!(0,c.default)(Q).call(Q,function(ye){return ye===se.split(".")[se.split(".").length-1]})){ie.push("\u3010"+se+"\u3011"+I("\u4E0D\u662F\u89C6\u9891"));return}if(B<ge){ie.push("\u3010"+se+"\u3011"+I("\u5927\u4E8E")+" "+B+"M");return}G.push(pe)}}),ie.length){O.customAlert(I("\u89C6\u9891\u9A8C\u8BC1\u672A\u901A\u8FC7")+`:
2025-05-26 10:41:15 +08:00
`+ie.join(`
2025-05-28 11:05:44 +08:00
`),"warning");return}if(G.length===0){O.customAlert(I("\u4F20\u5165\u7684\u6587\u4EF6\u4E0D\u5408\u6CD5"),"warning");return}if(J&&typeof J=="function"){var X;J(G,(0,u.default)(X=this.insertVideo).call(X,this));return}var le=new FormData;if((0,h.default)(G).call(G,function(pe,se){var ge=L||pe.name;G.length>1&&(ge=ge+(se+1)),le.append(ge,pe)}),M){var be=M.split("#");M=be[0];var ce=be[1]||"";(0,h.default)(C).call(C,U,function(pe,se){H&&((0,m.default)(M).call(M,"?")>0?M+="&":M+="?",M=M+pe+"="+se),le.append(pe,se)}),ce&&(M+="#"+ce);var de=A.default(M,{timeout:$,formData:le,headers:R,withCredentials:!!S,beforeSend:function(se){if(z.before)return z.before(se,T,G)},onTimeout:function(se){O.customAlert(I("\u4E0A\u4F20\u89C6\u9891\u8D85\u65F6"),"error"),z.timeout&&z.timeout(se,T)},onProgress:function(se,ge){var ye=new w.default(T);ge.lengthComputable&&(se=ge.loaded/ge.total,ye.show(se))},onError:function(se){O.customAlert(I("\u4E0A\u4F20\u89C6\u9891\u9519\u8BEF"),"error",I("\u4E0A\u4F20\u89C6\u9891\u9519\u8BEF")+"\uFF0C"+I("\u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001")+": "+se.status),z.error&&z.error(se,T)},onFail:function(se,ge){O.customAlert(I("\u4E0A\u4F20\u89C6\u9891\u5931\u8D25"),"error",I("\u4E0A\u4F20\u89C6\u9891\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF")+("\uFF0C"+I("\u8FD4\u56DE\u7ED3\u679C")+": ")+ge),z.fail&&z.fail(se,T,ge)},onSuccess:function(se,ge){if(z.customInsert){var ye;z.customInsert((0,u.default)(ye=k.insertVideo).call(ye,k),ge,T);return}if(ge.errno!="0"){O.customAlert(I("\u4E0A\u4F20\u89C6\u9891\u5931\u8D25"),"error",I("\u4E0A\u4F20\u89C6\u9891\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF")+"\uFF0C"+I("\u8FD4\u56DE\u7ED3\u679C")+" errno="+ge.errno),z.fail&&z.fail(se,T,ge);return}var D=ge.data;k.insertVideo(D.url),z.success&&z.success(se,T,ge)}});typeof de=="string"&&O.customAlert(de,"error")}}},_.prototype.insertVideo=function(x){var k=this.editor,T=k.config,O="validate.",F=function(N,B){return B===void 0&&(B=O),k.i18next.t(B+N)};if(!T.customInsertVideo)b.UA.isFirefox?k.cmd.do("insertHTML",'<p data-we-video-p="true"><video src="'+x+'" controls="controls" style="max-width:100%"></video></p><p>&#8203</p>'):k.cmd.do("insertHTML",'<video src="'+x+'" controls="controls" style="max-width:100%"></video>'+E.EMPTY_P);else{T.customInsertVideo(x);return}var I=document.createElement("video");I.onload=function(){I=null},I.onerror=function(){T.customAlert(F("\u63D2\u5165\u89C6\u9891\u9519\u8BEF"),"error","wangEditor: "+F("\u63D2\u5165\u89C6\u9891\u9519\u8BEF")+"\uFF0C"+F("\u89C6\u9891\u94FE\u63A5")+' "'+x+'"\uFF0C'+F("\u4E0B\u8F7D\u94FE\u63A5\u5931\u8D25")),I=null},I.onabort=function(){return I=null},I.src=x},_}();o.default=g},function(r,o,i){r.exports=i(343)},function(r,o,i){var l=i(344);r.exports=l},function(r,o,i){i(345);var l=i(9);r.exports=l.Date.now},function(r,o,i){var l=i(5);l({target:"Date",stat:!0},{now:function(){return new Date().getTime()}})},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(347)),h=c.__importDefault(i(349));function m(y){u.default(y),h.default(y)}o.default=m},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0}),o.createShowHideFn=void 0;var c=i(2),u=c.__importDefault(i(3)),h=c.__importDefault(i(39)),m=c.__importDefault(i(348));function y(A){var w,E=function(x,k){return k===void 0&&(k=""),A.i18next.t(k+x)};function b(_){var x=[{$elem:u.default("<span class='w-e-icon-trash-o'></span>"),onClick:function(T,O){return O.remove(),!0}},{$elem:u.default("<span>100%</span>"),onClick:function(T,O){return O.attr("width","100%"),O.removeAttr("height"),!0}},{$elem:u.default("<span>50%</span>"),onClick:function(T,O){return O.attr("width","50%"),O.removeAttr("height"),!0}},{$elem:u.default("<span>30%</span>"),onClick:function(T,O){return O.attr("width","30%"),O.removeAttr("height"),!0}},{$elem:u.default("<span>"+E("\u91CD\u7F6E")+"</span>"),onClick:function(T,O){return O.removeAttr("width"),O.removeAttr("height"),!0}},{$elem:u.default("<span>"+E("menus.justify.\u9760\u5DE6")+"</span>"),onClick:function(T,O){return m.default(O,"left"),!0}}
2025-05-20 11:03:25 +08:00
<div class="w-e-img-drag-show-size"></div>
<div class="w-e-img-drag-rb"></div>
2025-05-27 15:27:24 +08:00
</div>`);return x.hide(),_.append(x),x}function w(g,_,x){var k=g.getBoundingClientRect(),T=x.getBoundingClientRect(),O=T.width.toFixed(2),F=T.height.toFixed(2);(0,c.default)(_).call(_,".w-e-img-drag-show-size").text(O+"px * "+F+"px"),C(_,(0,u.default)(O),(0,u.default)(F),T.left-k.left,T.top-k.top),_.show()}function E(g){var _=g.$textContainerElem,x,k=A(g,_);function T(I,M){I.on("click",function(N){N.stopPropagation()}),I.on("mousedown",".w-e-img-drag-rb",function(N){if(N.preventDefault(),!x)return;var B=N.clientX,L=N.clientY,U=M.getBoundingClientRect(),H=x.getBoundingClientRect(),R=H.width,z=H.height,$=H.left-U.left,S=H.top-U.top,J=R/z,Q=R,G=z,ie=m.default(document);function X(){ie.off("mousemove",le),ie.off("mouseup",be)}function le(ce){ce.stopPropagation(),ce.preventDefault(),Q=R+(ce.clientX-B),G=z+(ce.clientY-L),Q/G!=J&&(G=Q/J),Q=(0,u.default)(Q.toFixed(2)),G=(0,u.default)(G.toFixed(2)),(0,c.default)(I).call(I,".w-e-img-drag-show-size").text(Q.toFixed(2).replace(".00","")+"px * "+G.toFixed(2).replace(".00","")+"px"),C(I,Q,G,$,S)}ie.on("mousemove",le);function be(){x.attr("width",Q+""),x.attr("height",G+"");var ce=x.getBoundingClientRect();C(I,Q,G,ce.left-U.left,ce.top-U.top),X()}ie.on("mouseup",be),ie.on("mouseleave",X)})}function O(I){if(y.UA.isIE())return!1;I&&(x=I,w(_,k,x))}function F(){(0,c.default)(_).call(_,".w-e-img-drag-mask").hide()}return T(k,_),m.default(document).on("click",F),g.beforeDestroy(function(){m.default(document).off("click",F)}),{showDrag:O,hideDrag:F}}o.createShowHideFn=E;function b(g){var _=E(g),x=_.showDrag,k=_.hideDrag;g.txt.eventHooks.imgClickEvents.push(x),g.txt.eventHooks.textScrollEvents.push(k),g.txt.eventHooks.keyupEvents.push(k),g.txt.eventHooks.toolbarClickEvents.push(k),g.txt.eventHooks.menuClickEvents.push(k),g.txt.eventHooks.changeEvents.push(k)}o.default=b},function(r,o,i){r.exports=i(356)},function(r,o,i){var l=i(357);r.exports=l},function(r,o,i){i(358);var l=i(9);r.exports=l.parseFloat},function(r,o,i){var l=i(5),d=i(359);l({global:!0,forced:parseFloat!=d},{parseFloat:d})},function(r,o,i){var l=i(8),d=i(90).trim,c=i(68),u=l.parseFloat,h=1/u(c+"-0")!==-1/0;r.exports=h?function(y){var C=d(String(y)),A=u(C);return A===0&&C.charAt(0)=="-"?-0:A}:u},function(r,o,i){var l=i(20),d=i(361);d=d.__esModule?d.default:d,typeof d=="string"&&(d=[[r.i,d,""]]);var c={};c.insert="head",c.singleton=!1,l(d,c),r.exports=d.locals||{}},function(r,o,i){var l=i(21);o=l(!1),o.push([r.i,`.w-e-text-container {
2025-05-20 11:03:25 +08:00
overflow: hidden;
}
.w-e-img-drag-mask {
position: absolute;
z-index: 1;
border: 1px dashed #ccc;
box-sizing: border-box;
}
.w-e-img-drag-mask .w-e-img-drag-rb {
position: absolute;
right: -5px;
bottom: -5px;
width: 16px;
height: 16px;
border-radius: 50%;
background: #ccc;
cursor: se-resize;
}
.w-e-img-drag-mask .w-e-img-drag-show-size {
min-width: 110px;
height: 22px;
line-height: 22px;
font-size: 14px;
color: #999;
position: absolute;
left: 0;
top: 0;
background-color: #999;
color: #fff;
border-radius: 2px;
padding: 0 5px;
}
2025-05-27 15:27:24 +08:00
`,""]),r.exports=o},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0}),o.createShowHideFn=void 0;var c=i(2),u=c.__importDefault(i(3)),h=c.__importDefault(i(39));function m(C){var A,w=function(_,x){return x===void 0&&(x=""),C.i18next.t(x+_)};function E(g){var _=[{$elem:u.default("<span class='w-e-icon-trash-o'></span>"),onClick:function(k,T){return k.selection.createRangeByElem(T),k.selection.restoreSelection(),k.cmd.do("delete"),!0}},{$elem:u.default("<span>30%</span>"),onClick:function(k,T){return T.attr("width","30%"),T.removeAttr("height"),!0}},{$elem:u.default("<span>50%</span>"),onClick:function(k,T){return T.attr("width","50%"),T.removeAttr("height"),!0}},{$elem:u.default("<span>100%</span>"),onClick:function(k,T){return T.attr("width","100%"),T.removeAttr("height"),!0}}];_.push({$elem:u.default("<span>"+w("\u91CD\u7F6E")+"</span>"),onClick:function(k,T){return T.removeAttr("width"),T.removeAttr("height"),!0}}),g.attr("data-href")&&_.push({$elem:u.default("<span>"+w("\u67E5\u770B\u94FE\u63A5")+"</span>"),onClick:function(k,T){var O=T.attr("data-href");return O&&(O=decodeURIComponent(O),window.open(O,"_target")),!0}}),A=new h.default(C,g,_),A.create()}function b(){A&&(A.remove(),A=null)}return{showImgTooltip:E,hideImgTooltip:b}}o.createShowHideFn=m;function y(C){var A=m(C),w=A.showImgTooltip,E=A.hideImgTooltip;C.txt.eventHooks.imgClickEvents.push(w),C.txt.eventHooks.clickEvents.push(E),C.txt.eventHooks.keyupEvents.push(E),C.txt.eventHooks.toolbarClickEvents.push(E),C.txt.eventHooks.menuClickEvents.push(E),C.txt.eventHooks.textScrollEvents.push(E),C.txt.eventHooks.imgDragBarMouseDownEvents.push(E),C.txt.eventHooks.changeEvents.push(E)}o.default=y},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});function c(u){var h=u.txt,m=u.selection,y=h.eventHooks.keydownEvents;y.push(function(C){var A=m.getSelectionContainerElem(),w=m.getRange();if(!(!w||!A||C.keyCode!==8||!m.isSelectionEmpty())){var E=w.startContainer,b=w.startOffset,g=null;if(b===0)for(;E!==A.elems[0]&&A.elems[0].contains(E)&&E.parentNode&&!g;){if(E.previousSibling){g=E.previousSibling;break}E=E.parentNode}else E.nodeType!==3&&(g=E.childNodes[b-1]);if(!!g){for(var _=g;_.childNodes.length;)_=_.childNodes[_.childNodes.length-1];_ instanceof HTMLElement&&_.tagName==="IMG"&&(_.remove(),C.preventDefault())}}})}o.default=c},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(26)),u=l(i(17));(0,d.default)(o,"__esModule",{value:!0});var h=i(2),m=h.__importDefault(i(3)),y=i(6),C=h.__importDefault(i(97));function A(w){var E,b=w.config,g=new C.default(w),_=y.getRandom("up-trigger-id"),x=y.getRandom("up-file-id"),k=y.getRandom("input-link-url"),T=y.getRandom("input-link-url-alt"),O=y.getRandom("input-link-url-href"),F=y.getRandom("btn-link"),I="menus.panelMenus.image.",M=function(J,Q){return Q===void 0&&(Q=I),w.i18next.t(Q+J)};function N(S,J,Q){var G=b.linkImgCheck(S);return G===!0?!0:(typeof G=="string"&&b.customAlert(G,"error"),!1)}var B=b.uploadImgMaxLength===1?"":'multiple="multiple"',L=(0,c.default)(E=b.uploadImgAccept).call(E,function(S){return"image/"+S}).join(","),U=function(J,Q,G){return'<div class="'+J+'" data-title="'+G+`">
2025-05-20 11:03:25 +08:00
<div id="`+_+`" class="w-e-up-btn">
2025-05-24 17:29:32 +08:00
<i class="`+Q+`"></i>
2025-05-20 11:03:25 +08:00
</div>
<div style="display:none;">
2025-05-24 17:29:32 +08:00
<input id="`+x+'" type="file" '+B+' accept="'+L+`"/>
2025-05-20 11:03:25 +08:00
</div>
2025-05-26 10:41:15 +08:00
</div>`},H=[{selector:"#"+_,type:"click",fn:function(){var J=b.uploadImgFromMedia;if(J&&typeof J=="function")return J(),!0;var Q=m.default("#"+x),G=Q.elems[0];if(G)G.click();else return!0}},{selector:"#"+x,type:"change",fn:function(){var J=m.default("#"+x),Q=J.elems[0];if(!Q)return!0;var G=Q.files;return G!=null&&G.length&&g.uploadImg(G),Q&&(Q.value=""),!0}}],R=[`<input
2025-05-20 11:03:25 +08:00
id="`+k+`"
type="text"
class="block"
2025-05-26 10:41:15 +08:00
placeholder="`+M("\u56FE\u7247\u5730\u5740")+'"/>'];b.showLinkImgAlt&&R.push(`
2025-05-20 11:03:25 +08:00
<input
id="`+T+`"
type="text"
class="block"
2025-05-26 10:41:15 +08:00
placeholder="`+M("\u56FE\u7247\u6587\u5B57\u8BF4\u660E")+'"/>'),b.showLinkImgHref&&R.push(`
2025-05-20 11:03:25 +08:00
<input
2025-05-26 10:41:15 +08:00
id="`+O+`"
2025-05-20 11:03:25 +08:00
type="text"
class="block"
2025-05-26 10:41:15 +08:00
placeholder="`+M("\u8DF3\u8F6C\u94FE\u63A5")+'"/>');var z=[{title:M("\u4E0A\u4F20\u56FE\u7247"),tpl:U("w-e-up-img-container","w-e-icon-upload2",""),events:H},{title:M("\u7F51\u7EDC\u56FE\u7247"),tpl:`<div>
`+R.join("")+`
2025-05-20 11:03:25 +08:00
<div class="w-e-button-container">
2025-05-26 10:41:15 +08:00
<button type="button" id="`+F+'" class="right">'+M("\u63D2\u5165","")+`</button>
2025-05-20 11:03:25 +08:00
</div>
2025-05-27 15:27:24 +08:00
</div>`,events:[{selector:"#"+F,type:"click",fn:function(){var J,Q=m.default("#"+k),G=(0,u.default)(J=Q.val()).call(J);if(!!G){var ie;if(b.showLinkImgAlt){var X;ie=(0,u.default)(X=m.default("#"+T).val()).call(X)}var le;if(b.showLinkImgHref){var be;le=(0,u.default)(be=m.default("#"+O).val()).call(be)}if(!!N(G))return g.insertImg(G,ie,le),!0}},bindEnter:!0}]}],$={width:300,height:0,tabs:[],onlyUploadConf:{$elem:m.default(U("w-e-menu","w-e-icon-image","\u56FE\u7247")),events:H}};return window.FileReader&&(b.uploadImgShowBase64||b.uploadImgServer||b.customUploadImg||b.uploadImgFromMedia)&&$.tabs.push(z[0]),b.showLinkImg&&($.tabs.push(z[1]),$.onlyUploadConf=void 0),$}o.default=A},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(4));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=u.__importDefault(i(3)),m=u.__importDefault(i(24)),y=u.__importDefault(i(366)),C=function(A){u.__extends(w,A);function w(E){var b=this,g=h.default(`<div class="w-e-menu" data-title="\u7F29\u8FDB">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-indent-increase"></i>
</div>`),_={width:130,title:"\u8BBE\u7F6E\u7F29\u8FDB",type:"list",list:[{$elem:h.default(`<p>
<i class="w-e-icon-indent-increase w-e-drop-list-item"></i>
`+E.i18next.t("menus.dropListMenu.indent.\u589E\u52A0\u7F29\u8FDB")+`
<p>`),value:"increase"},{$elem:h.default(`<p>
<i class="w-e-icon-indent-decrease w-e-drop-list-item"></i>
`+E.i18next.t("menus.dropListMenu.indent.\u51CF\u5C11\u7F29\u8FDB")+`
2025-05-27 15:27:24 +08:00
<p>`),value:"decrease"}],clickHandler:function(k){b.command(k)}};return b=A.call(this,g,E,_)||this,b}return w.prototype.command=function(E){var b=this.editor,g=b.selection.getSelectionContainerElem();if(g&&b.$textElem.equal(g)){var _=b.selection.getSelectionRangeTopNodes();_.length>0&&(0,c.default)(_).call(_,function(x){y.default(h.default(x),E,b)})}else g&&g.length>0&&(0,c.default)(g).call(g,function(x){y.default(h.default(x),E,b)});b.selection.restoreSelection(),this.tryChangeActive()},w.prototype.tryChangeActive=function(){var E=this.editor,b=E.selection.getSelectionStartElem(),g=h.default(b).getNodeTop(E);g.length<=0||(g.elems[0].style.paddingLeft!=""?this.active():this.unActive())},w}(m.default);o.default=C},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(45)),u=l(i(17));(0,d.default)(o,"__esModule",{value:!0});var h=i(2),m=h.__importDefault(i(367)),y=h.__importDefault(i(368)),C=/^(\d+)(\w+)$/,A=/^(\d+)%$/;function w(b){var g=b.config.indentation;if(typeof g=="string"){if(C.test(g)){var _,x=(0,c.default)(_=(0,u.default)(g).call(g).match(C)).call(_,1,3),k=x[0],T=x[1];return{value:Number(k),unit:T}}else if(A.test(g))return{value:Number((0,u.default)(g).call(g).match(A)[1]),unit:"%"}}else if(g.value!==void 0&&g.unit)return g;return{value:2,unit:"em"}}function E(b,g,_){var x=b.getNodeTop(_),k=/^(P|H[0-9]*)$/;k.test(x.getNodeName())&&(g==="increase"?m.default(x,w(_)):g==="decrease"&&y.default(x,w(_)))}o.default=E},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(45));(0,d.default)(o,"__esModule",{value:!0});function u(h,m){var y=h.elems[0];if(y.style.paddingLeft==="")h.css("padding-left",m.value+m.unit);else{var C=y.style.paddingLeft,A=(0,c.default)(C).call(C,0,C.length-m.unit.length),w=Number(A)+m.value;h.css("padding-left",""+w+m.unit)}}o.default=u},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(45));(0,d.default)(o,"__esModule",{value:!0});function u(h,m){var y=h.elems[0];if(y.style.paddingLeft!==""){var C=y.style.paddingLeft,A=(0,c.default)(C).call(C,0,C.length-m.unit.length),w=Number(A)-m.value;w>0?h.css("padding-left",""+w+m.unit):h.css("padding-left","")}}o.default=u},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(3)),h=c.__importDefault(i(38)),m=c.__importDefault(i(33)),y=c.__importDefault(i(370)),C=function(A){c.__extends(w,A);function w(E){var b=this,g=u.default(`<div class="w-e-menu" data-title="\u8868\u60C5">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-happy"></i>
2025-05-27 15:27:24 +08:00
</div>`);return b=A.call(this,g,E)||this,b}return w.prototype.createPanel=function(){var E=y.default(this.editor),b=new m.default(this,E);b.create()},w.prototype.clickHandler=function(){this.createPanel()},w.prototype.tryChangeActive=function(){},w}(h.default);o.default=C},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(26)),u=l(i(70)),h=l(i(17));(0,d.default)(o,"__esModule",{value:!0});var m=i(2),y=m.__importDefault(i(3));function C(A){var w=A.config.emotions;function E(_){var x=[];if(_.type=="image"){var k;x=(0,c.default)(k=_.content).call(k,function(O){return typeof O=="string"?"":'<span title="'+O.alt+`">
2025-05-26 10:41:15 +08:00
<img class="eleImg" data-emoji="`+O.alt+'" style src="'+O.src+'" alt="['+O.alt+`]">
2025-05-27 15:27:24 +08:00
</span>`}),x=(0,u.default)(x).call(x,function(O){return O!==""})}else{var T;x=(0,c.default)(T=_.content).call(T,function(O){return'<span class="eleImg" title="'+O+'">'+O+"</span>"})}return x.join("").replace(/&nbsp;/g,"")}var b=(0,c.default)(w).call(w,function(_){return{title:A.i18next.t("menus.panelMenus.emoticon."+_.title),tpl:"<div>"+E(_)+"</div>",events:[{selector:".eleImg",type:"click",fn:function(k){var T=y.default(k.target),O=T.getNodeName(),F;if(O==="IMG"){var I;F=(0,h.default)(I=T.parent().html()).call(I)}else F="<span>"+T.html()+"</span>";return A.cmd.do("insertHTML",F),!0}}]}}),g={width:300,height:230,tabs:b};return g}o.default=C},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0}),o.createListHandle=o.ClassType=void 0;var c=i(2),u=c.__importDefault(i(3)),h=c.__importDefault(i(372)),m=c.__importDefault(i(374)),y=c.__importDefault(i(375)),C=c.__importDefault(i(376)),A=c.__importDefault(i(377)),w;(function(_){_.Wrap="WrapListHandle",_.Join="JoinListHandle",_.StartJoin="StartJoinListHandle",_.EndJoin="EndJoinListHandle",_.Other="OtherListHandle"})(w=o.ClassType||(o.ClassType={}));var E={WrapListHandle:h.default,JoinListHandle:m.default,StartJoinListHandle:y.default,EndJoinListHandle:C.default,OtherListHandle:A.default};function b(_,x,k){if(_===w.Other&&k===void 0)throw new Error("other \u7C7B\u9700\u8981\u4F20\u5165 range");return _!==w.Other?new E[_](x):new E[_](x,k)}o.createListHandle=b;var g=function(){function _(x){this.handle=x,this.handle.exec()}return _.prototype.getSelectionRangeElem=function(){return u.default(this.handle.selectionRangeElem.get())},_}();o.default=g},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(4));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=u.__importDefault(i(3)),m=i(58),y=i(47),C=function(A){u.__extends(w,A);function w(E){return A.call(this,E)||this}return w.prototype.exec=function(){var E=this.options,b=E.listType,g=E.listTarget,_=E.$selectionElem,x=E.$startElem,k=E.$endElem,T,O=[],F=_==null?void 0:_.getNodeName(),I=x.prior,M=k.prior;if(!x.prior&&!k.prior||!(I!=null&&I.prev().length)&&!(M!=null&&M.next().length)){var N;(0,c.default)(N=_==null?void 0:_.children()).call(N,function($){O.push(h.default($))}),F===b?T=y.createElementFragment(O,y.createDocumentFragment(),"p"):(T=y.createElement(g),(0,c.default)(O).call(O,function($){T.appendChild($.elems[0])})),this.selectionRangeElem.set(T),y.insertBefore(_,T,_.elems[0]),_.remove()}else{for(var B=I;B.length;)O.push(B),M!=null&&M.equal(B)?B=h.default(void 0):B=B.next();var L=I.prev(),U=M.next();if(F===b?T=y.createElementFragment(O,y.createDocumentFragment(),"p"):(T=y.createElement(g),(0,c.default)(O).call(O,function($){T.append($.elems[0])})),L.length&&U.length){for(var H=[];U.length;)H.push(U),U=U.next();var R=y.createElement(F);(0,c.default)(H).call(H,function($){R.append($.elems[0])}),h.default(R).insertAfter(_),this.selectionRangeElem.set(T);var z=_.next();z.length?y.insertBefore(_,T,z.elems[0]):_.parent().elems[0].append(T)}else if(!L.length)this.selectionRangeElem.set(T),y.insertBefore(_,T,_.elems[0]);else{this.selectionRangeElem.set(T);var z=_.next();z.length?y.insertBefore(_,T,z.elems[0]):_.parent().elems[0].append(T)}}},w}(m.ListHandle);o.default=C},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(4));(0,d.default)(o,"__esModule",{value:!0});var u=function(){function h(){this._element=null}return h.prototype.set=function(m){if(m instanceof DocumentFragment){var y,C=[];(0,c.default)(y=m.childNodes).call(y,function(A){C.push(A)}),m=C}this._element=m},h.prototype.get=function(){return this._element},h.prototype.clear=function(){this._element=null},h}();o.default=u},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(4));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=u.__importDefault(i(3)),m=i(58),y=i(47),C=function(A){u.__extends(w,A);function w(E){return A.call(this,E)||this}return w.prototype.exec=function(){var E,b,g,_,x,k,T,O=this.options,F=O.editor,I=O.listType,M=O.listTarget,N=O.$startElem,B=O.$endElem,L,U=F.selection.getSelectionRangeTopNodes(),H=N==null?void 0:N.getNodeName(),R=B==nul
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-row-height"></i>
2025-05-27 15:27:24 +08:00
</div>`),x=new C.default(b,b.config.lineHeights),k={width:100,title:"\u8BBE\u7F6E\u884C\u9AD8",type:"list",list:x.getItemList(),clickHandler:function(O){b.selection.saveRange(),g.command(O)}};return g=w.call(this,_,b,k)||this,g}return E.prototype.command=function(b){var g=this.editor;g.selection.restoreSelection();var _=y.default(g.selection.getSelectionContainerElem());if(!!_.elems.length){if(_&&g.$textElem.equal(_)){for(var x=!1,k=y.default(g.selection.getSelectionStartElem()).elems[0],T=y.default(g.selection.getSelectionEndElem()).elems[0],O=this.getDom(k),F=this.getDom(T),I=_.elems[0].children,M=0;M<I.length;M++){var N=I[M];if(y.default(N).getNodeName()==="P"&&(N===O&&(x=!0),x&&(y.default(N).css("line-height",b),N===F))){x=!1;return}}g.selection.createRangeByElems(k,T);return}var B=_.elems[0],L=this.getDom(B);y.default(L).getNodeName()==="P"&&(y.default(L).css("line-height",b),g.selection.createRangeByElems(L,L))}},E.prototype.getDom=function(b){var g=y.default(b).elems[0];if(!g.parentNode)return g;function _(x,k){var T=y.default(x.parentNode);return k.$textElem.equal(T)?x:_(T.elems[0],k)}return g=_(g,this.editor),g},E.prototype.styleProcessing=function(b){var g="";return(0,c.default)(b).call(b,function(_){_!==""&&(0,u.default)(_).call(_,"line-height")===-1&&(g=g+_+";")}),g},E.prototype.setRange=function(b,g){var _=this.editor,x=window.getSelection?window.getSelection():document.getSelection();x==null||x.removeAllRanges();var k=document.createRange(),T=b,O=g;k.setStart(T,0),k.setEnd(O,1),x==null||x.addRange(k),_.selection.saveRange(),x==null||x.removeAllRanges(),_.selection.restoreSelection()},E.prototype.tryChangeActive=function(){var b=this.editor,g=b.selection.getSelectionContainerElem();if(!(g&&b.$textElem.equal(g))){var _=y.default(b.selection.getSelectionStartElem());if(_.length!==0){_=this.getDom(_.elems[0]);var x=_.getAttribute("style")?_.getAttribute("style"):"";x&&(0,u.default)(x).call(x,"line-height")!==-1?this.active():this.unActive()}}},E}(m.default);o.default=A},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(4));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=u.__importDefault(i(3)),m=function(){function y(C,A){var w=this;this.itemList=[{$elem:h.default("<span>"+C.i18next.t("\u9ED8\u8BA4")+"</span>"),value:""}],(0,c.default)(A).call(A,function(E){w.itemList.push({$elem:h.default("<span>"+E+"</span>"),value:E})})}return y.prototype.getItemList=function(){return this.itemList},y}();o.default=m},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(3)),h=c.__importDefault(i(23)),m=function(y){c.__extends(C,y);function C(A){var w=this,E=u.default(`<div class="w-e-menu" data-title="\u64A4\u9500">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-undo"></i>
2025-05-27 15:27:24 +08:00
</div>`);return w=y.call(this,E,A)||this,w}return C.prototype.clickHandler=function(){var A=this.editor;A.history.revoke();var w=A.$textElem.children();if(!!(w!=null&&w.length)){var E=w.last();A.selection.createRangeByElem(E,!1,!0),A.selection.restoreSelection()}},C.prototype.tryChangeActive=function(){this.editor.isCompatibleMode||(this.editor.history.size[0]?this.active():this.unActive())},C}(h.default);o.default=m},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(3)),h=c.__importDefault(i(23)),m=function(y){c.__extends(C,y);function C(A){var w=this,E=u.default(`<div class="w-e-menu" data-title="\u6062\u590D">
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-redo"></i>
2025-05-27 15:27:24 +08:00
</div>`);return w=y.call(this,E,A)||this,w}return C.prototype.clickHandler=function(){var A=this.editor;A.history.restore();var w=A.$textElem.children();if(!!(w!=null&&w.length)){var E=w.last();A.selection.createRangeByElem(E,!1,!0),A.selection.restoreSelection()}},C.prototype.tryChangeActive=function(){this.editor.isCompatibleMode||(this.editor.history.size[1]?this.active():this.unActive())},C}(h.default);o.default=m},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(38)),h=c.__importDefault(i(3)),m=c.__importDefault(i(383)),y=c.__importDefault(i(33)),C=c.__importDefault(i(392)),A=function(w){c.__extends(E,w);function E(b){var g=this,_=h.default('<div class="w-e-menu" data-title="\u8868\u683C"><i class="w-e-icon-table2"></i></div>');return g=w.call(this,_,b)||this,C.default(b),g}return E.prototype.clickHandler=function(){this.createPanel()},E.prototype.createPanel=function(){var b=m.default(this.editor),g=new y.default(this,b);g.create()},E.prototype.tryChangeActive=function(){},E}(u.default);o.default=A},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(384));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=i(6),m=u.__importDefault(i(3));i(389);var y=u.__importDefault(i(391));function C(w){return w>0&&(0,c.default)(w)}function A(w){var E=new y.default(w),b=h.getRandom("w-col-id"),g=h.getRandom("w-row-id"),_=h.getRandom("btn-link"),x="menus.panelMenus.table.",k=function(I){return w.i18next.t(I)},T=[{title:k(x+"\u63D2\u5165\u8868\u683C"),tpl:`<div>
2025-05-20 11:03:25 +08:00
<div class="w-e-table">
<span>`+k("\u521B\u5EFA")+`</span>
<input id="`+g+`" type="text" class="w-e-table-input" value="5"/></td>
<span>`+k(x+"\u884C")+`</span>
<input id="`+b+`" type="text" class="w-e-table-input" value="5"/></td>
<span>`+(k(x+"\u5217")+k(x+"\u7684")+k(x+"\u8868\u683C"))+`</span>
</div>
<div class="w-e-button-container">
<button type="button" id="`+_+'" class="right">'+k("\u63D2\u5165")+`</button>
</div>
2025-05-27 15:27:24 +08:00
</div>`,events:[{selector:"#"+_,type:"click",fn:function(){var I=Number(m.default("#"+b).val()),M=Number(m.default("#"+g).val());return C(M)&&C(I)?(E.createAction(M,I),!0):(w.config.customAlert("\u8868\u683C\u884C\u5217\u8BF7\u8F93\u5165\u6B63\u6574\u6570","warning"),!1)},bindEnter:!0}]}],O={width:330,height:0,tabs:[]};return O.tabs.push(T[0]),O}o.default=A},function(r,o,i){r.exports=i(385)},function(r,o,i){var l=i(386);r.exports=l},function(r,o,i){i(387);var l=i(9);r.exports=l.Number.isInteger},function(r,o,i){var l=i(5),d=i(388);l({target:"Number",stat:!0},{isInteger:d})},function(r,o,i){var l=i(13),d=Math.floor;r.exports=function(u){return!l(u)&&isFinite(u)&&d(u)===u}},function(r,o,i){var l=i(20),d=i(390);d=d.__esModule?d.default:d,typeof d=="string"&&(d=[[r.i,d,""]]);var c={};c.insert="head",c.singleton=!1,l(d,c),r.exports=d.locals||{}},function(r,o,i){var l=i(21);o=l(!1),o.push([r.i,`.w-e-table {
2025-05-20 11:03:25 +08:00
display: flex;
}
.w-e-table .w-e-table-input {
width: 40px;
text-align: center!important;
margin: 0 5px;
}
2025-05-27 15:27:24 +08:00
`,""]),r.exports=o},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=i(7),h=c.__importDefault(i(3)),m=function(){function y(C){this.editor=C}return y.prototype.createAction=function(C,A){var w=this.editor,E=h.default(w.selection.getSelectionContainerElem()),b=h.default(E.elems[0]).parentUntilEditor("UL",w),g=h.default(E.elems[0]).parentUntilEditor("OL",w);if(!(b||g)){var _=this.createTableHtml(C,A);w.cmd.do("insertHTML",_)}},y.prototype.createTableHtml=function(C,A){for(var w="",E="",b=0;b<C;b++){E="";for(var g=0;g<A;g++)b===0?E=E+"<th></th>":E=E+"<td></td>";w=w+"<tr>"+E+"</tr>"}var _='<table border="0" width="100%" cellpadding="0" cellspacing="0"><tbody>'+w+("</tbody></table>"+u.EMPTY_P);return _},y}();o.default=m},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(393)),h=i(400);function m(y){u.default(y),h.bindEventKeyboardEvent(y),h.bindClickEvent(y)}o.default=m},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(3)),h=c.__importDefault(i(39)),m=c.__importDefault(i(394)),y=c.__importDefault(i(399)),C=i(7);function A(g){var _;function x(T){var O=new y.default(g),F="menus.panelMenus.table.",I=function(B,L){return L===void 0&&(L=F),g.i18next.t(L+B)},M=[{$elem:u.default("<span>"+I("\u5220\u9664\u8868\u683C")+"</span>"),onClick:function(B,L){return B.selection.createRangeByElem(L),B.selection.restoreSelection(),B.cmd.do("insertHTML",C.EMPTY_P),!0}},{$elem:u.default("<span>"+I("\u6DFB\u52A0\u884C")+"</span>"),onClick:function(B,L){var U=w(B);if(U)return!0;var H=u.default(B.selection.getSelectionStartElem()),R=O.getRowNode(H.elems[0]);if(!R)return!0;var z=Number(O.getCurrentRowIndex(L.elems[0],R)),$=O.getTableHtml(L.elems[0]),S=O.getTableHtml(m.default.ProcessingRow(u.default($),z).elems[0]);return S=b(L,S),B.selection.createRangeByElem(L),B.selection.restoreSelection(),B.cmd.do("insertHTML",S),!0}},{$elem:u.default("<span>"+I("\u5220\u9664\u884C")+"</span>"),onClick:function(B,L){var U=w(B);if(U)return!0;var H=u.default(B.selection.getSelectionStartElem()),R=O.getRowNode(H.elems[0]);if(!R)return!0;var z=Number(O.getCurrentRowIndex(L.elems[0],R)),$=O.getTableHtml(L.elems[0]),S=m.default.DeleteRow(u.default($),z).elems[0].children[0].children.length,J="";return B.selection.createRangeByElem(L),B.selection.restoreSelection(),S===0?J=C.EMPTY_P:J=O.getTableHtml(m.default.DeleteRow(u.default($),z).elems[0]),J=b(L,J),B.cmd.do("insertHTML",J),!0}},{$elem:u.default("<span>"+I("\u6DFB\u52A0\u5217")+"</span>"),onClick:function(B,L){var U=w(B);if(U)return!0;var H=u.default(B.selection.getSelectionStartElem()),R=O.getCurrentColIndex(H.elems[0]),z=O.getTableHtml(L.elems[0]),$=O.getTableHtml(m.default.ProcessingCol(u.default(z),R).elems[0]);return $=b(L,$),B.selection.createRangeByElem(L),B.selection.restoreSelection(),B.cmd.do("insertHTML",$),!0}},{$elem:u.default("<span>"+I("\u5220\u9664\u5217")+"</span>"),onClick:function(B,L){var U=w(B);if(U)return!0;var H=u.default(B.selection.getSelectionStartElem()),R=O.getCurrentColIndex(H.elems[0]),z=O.getTableHtml(L.elems[0]),$=m.default.DeleteCol(u.default(z),R),S=$.elems[0].children[0].children[0].children.length,J="";return B.selection.createRangeByElem(L),B.selection.restoreSelection(),S===0?J=C.EMPTY_P:J=O.getTableHtml($.elems[0]),J=b(L,J),B.cmd.do("insertHTML",J),!0}},{$elem:u.default("<span>"+I("\u8BBE\u7F6E\u8868\u5934")+"</span>"),onClick:function(B,L){var U=w(B);if(U)return!0;var H=u.default(B.selection.getSelectionStartElem()),R=O.getRowNode(H.elems[0]);if(!R)return!0;var z=Number(O.getCurrentRowIndex(L.elems[0],R));z!==0&&(z=0);var $=O.getTableHtml(L.elems[0]),S=O.getTableHtml(m.default.setTheHeader(u.default($),z,"th").elems[0]);return S=b(L,S),B.selection.createRangeByElem(L),B.selection.restoreSelection(),B.cmd.do("insertHTML",S),!0}},{$elem:u.default("<span>"+I("\u53D6\u6D88\u8868\u5934")+"</span>"),onClick:function(B,L){var U=u.default(B.selection.getSelectionStartElem()),H=O.getRowNode(U.elems[0]);if(!H)return!0;var
`).replace(/<br>/g,""))}),O}function T(O){var F,I=O.match(/<span\sclass="hljs[\s|\S]+?\/span>/gm);if(!I||!I.length)return O;for(var M=(0,c.default)(F=y.deepClone(I)).call(F,function(B){return B=B.replace(/<span\sclass="hljs[^>]+>/,""),B.replace(/<\/span>/,"")}),N=0;N<I.length;N++)O=O.replace(I[N],M[N]);return T(O)}}o.formatCodeHtml=b;var g=function(_){u.__extends(x,_);function x(k){var T=this,O=m.default('<div class="w-e-menu" data-title="\u4EE3\u7801"><i class="w-e-icon-terminal"></i></div>');return T=_.call(this,O,k)||this,E.default(k),T}return x.prototype.insertLineCode=function(k){var T=this.editor,O=m.default("<code>"+k+"</code>");T.cmd.do("insertElem",O),T.selection.createRangeByElem(O,!1),T.selection.restoreSelection()},x.prototype.clickHandler=function(){var k=this.editor,T=k.selection.getSelectionText();this.isActive||(k.selection.isSelectionEmpty()?this.createPanel("",""):this.insertLineCode(T))},x.prototype.createPanel=function(k,T){var O=C.default(this.editor,k,T),F=new w.default(this,O);F.create()},x.prototype.tryChangeActive=function(){var k=this.editor;A.default(k)?this.active():this.unActive()},x}(h.default);o.default=g},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(26));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=i(6),m=u.__importDefault(i(3)),y=u.__importDefault(i(139)),C=i(7);function A(w,E,b){var g,_=h.getRandom("input-iframe"),x=h.getRandom("select"),k=h.getRandom("btn-ok");function T(M,N){var B,L=y.default(w);L&&O();var U=(B=w.selection.getSelectionStartElem())===null||B===void 0?void 0:B.elems[0].innerHTML;U&&w.cmd.do("insertHTML",C.EMPTY_P);var H=N.replace(/</g,"&lt;").replace(/>/g,"&gt;");w.highlight&&(H=w.highlight.highlightAuto(H).value),w.cmd.do("insertHTML",'<pre><code class="'+M+'">'+H+"</code></pre>");var R=w.selection.getSelectionStartElem(),z=R==null?void 0:R.getNodeTop(w);(z==null?void 0:z.getNextSibling().elems.length)===0&&m.default(C.EMPTY_P).insertAfter(z)}function O(){if(!!y.default(w)){var M=w.selection.getSelectionStartElem(),N=M==null?void 0:M.getNodeTop(w);!N||(w.selection.createRangeByElem(N),w.selection.restoreSelection())}}var F=function(N){return w.i18next.t(N)},I={width:500,height:0,tabs:[{title:F("menus.panelMenus.code.\u63D2\u5165\u4EE3\u7801"),tpl:`<div>
2025-05-20 11:03:25 +08:00
<select name="" id="`+x+`">
`+(0,c.default)(g=w.config.languageType).call(g,function(M){return"<option "+(b==M?"selected":"")+' value ="'+M+'">'+M+"</option>"})+`
</select>
<textarea id="`+_+'" type="text" class="wang-code-textarea" placeholder="" style="height: 160px">'+E.replace(/&quot;/g,'"')+`</textarea>
<div class="w-e-button-container">
2025-05-26 10:41:15 +08:00
<button type="button" id="`+k+'" class="right">'+(y.default(w)?F("\u4FEE\u6539"):F("\u63D2\u5165"))+`</button>
2025-05-20 11:03:25 +08:00
</div>
2025-05-27 15:27:24 +08:00
</div>`,events:[{selector:"#"+k,type:"click",fn:function(){var N=document.getElementById(_),B=m.default("#"+x),L=B.val(),U=N.value;if(!!U)return y.default(w)?!1:(T(L,U),!0)}}]}]};return I}o.default=A},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(404)),h=c.__importDefault(i(405));function m(y){u.default(y),h.default(y)}o.default=m},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0}),o.createShowHideFn=void 0;var c=i(2),u=c.__importDefault(i(3)),h=c.__importDefault(i(39));function m(C){var A;function w(b){var g="menus.panelMenus.code.",_=function(T,O){return O===void 0&&(O=g),C.i18next.t(O+T)},x=[{$elem:u.default("<span>"+_("\u5220\u9664\u4EE3\u7801")+"</span>"),onClick:function(T,O){return O.remove(),!0}}];A=new h.default(C,b,x),A.create()}function E(){A&&(A.remove(),A=null)}return{showCodeTooltip:w,hideCodeTooltip:E}}o.createShowHideFn=m;function y(C){var A=m(C),w=A.showCodeTooltip,E=A.hideCodeTooltip;C.txt.eventHooks.codeClickEvents.push(w),C.txt.eventHooks.clickEvents.push(E),C.txt.eventHooks.toolbarClickEvents.push(E),C.txt.eventHooks.menuClickEvents.push(E),C.txt.eventHooks.textScrollEvents.push(E)}o.default=y},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=i(7),h=c.__importDefault(i(3));function m(y){var C=y.$textElem,A=y.selection,w=y.txt,E=w.eventHooks.keydownEvents;E.push(function(b){var g;if(b.keyCode===40){var _=A.getSelectionContainerElem(),x=(g=C.children())===null||g===void 0?void 0:g.last();if((_==null?void 0:_.elems[0].tagName)==="XMP"&&(x==null?void 0:x.elems[0].tagName)==="PRE"){var k=h.default(u.EMPTY_P);C.append(k)}}}),E.push(function(b){y.selection.saveRange();var g=A.getSelectionContainerElem();if(g){var _=g.getNodeTop(y),x=_==null?void 0:_.prev(),k=_==null?void 0:_.getNextSibling();if(x.length&&(x==null?void 0:x.getNodeName())==="PRE"&&k.length===0&&A.getCursorPos()===0&&b.keyCode===8){var T=h.default(u.EMPTY_P);C.append(T)}}})}o.default=m},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(23)),h=c.__importDefault(i(3)),m=c.__importDefault(i(407)),y=i(6),C=i(7),A=function(w){c.__extends(E,w);function E(b){var g=this,_=h.default('<div class="w-e-menu" data-title="\u5206\u5272\u7EBF"><i class="w-e-icon-split-line"></i></div>');return g=w.call(this,_,b)||this,m.default(b),g}return E.prototype.clickHandler=function(){var b=this.editor,g=b.selection.getRange(),_=b.selection.getSelectionContainerElem();if(!!(_!=null&&_.length)){var x=h.default(_.elems[0]),k=x.parentUntil("TABLE",_.elems[0]),T=x.children();x.getNodeName()!=="CODE"&&(k&&h.default(k.elems[0]).getNodeName()==="TABLE"||T&&T.length!==0&&h.default(T.elems[0]).getNodeName()==="IMG"&&!(g!=null&&g.collapsed)||this.createSplitLine())}},E.prototype.createSplitLine=function(){var b="<hr/>"+C.EMPTY_P;y.UA.isFirefox&&(b="<hr/><p></p>"),this.editor.cmd.do("insertHTML",b)},E.prototype.tryChangeActive=function(){},E}(u.default);o.default=A},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(408));function h(m){u.default(m)}o.default=h},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(3)),h=c.__importDefault(i(39));function m(C){var A;function w(b){var g=[{$elem:u.default("<span>"+C.i18next.t("menus.panelMenus.\u5220\u9664")+"</span>"),onClick:function(x,k){return x.selection.createRangeByElem(k),x.selection.restoreSelection(),x.cmd.do("delete"),!0}}];A=new h.default(C,b,g),A.create()}function E(){A&&(A.remove(),A=null)}return{showSplitLineTooltip:w,hideSplitLineTooltip:E}}function y(C){var A=m(C),w=A.showSplitLineTooltip,E=A.hideSplitLineTooltip;C.txt.eventHooks.splitLineEvents.push(w),C.txt.eventHooks.clickEvents.push(E),C.txt.eventHooks.keyupEvents.push(E),C.txt.eventHooks.toolbarClickEvents.push(E),C.txt.eventHooks.menuClickEvents.push(E),C.txt.eventHooks.textScrollEvents.push(E)}o.default=y},function(r,o,i){var l=i(0),
2025-05-20 11:03:25 +08:00
<i class="w-e-icon-checkbox-checked"></i>
2025-05-27 15:27:24 +08:00
</div>`);return _=E.call(this,x,g)||this,C.default(g),_}return b.prototype.clickHandler=function(){var g=this.editor;y.isAllTodo(g)?(this.cancelTodo(),this.tryChangeActive()):this.setTodo()},b.prototype.tryChangeActive=function(){y.isAllTodo(this.editor)?this.active():this.unActive()},b.prototype.setTodo=function(){var g=this.editor,_=g.selection.getSelectionRangeTopNodes();(0,c.default)(_).call(_,function(x){var k,T=x==null?void 0:x.getNodeName();if(T==="P"){var O=A.default(x),F=O.getTodo(),I=(k=F.children())===null||k===void 0?void 0:k.getNode();F.insertAfter(x),g.selection.moveCursor(I),x.remove()}}),this.tryChangeActive()},b.prototype.cancelTodo=function(){var g=this.editor,_=g.selection.getSelectionRangeTopNodes();(0,c.default)(_).call(_,function(x){var k,T,O,F=(T=(k=x.childNodes())===null||k===void 0?void 0:k.childNodes())===null||T===void 0?void 0:T.clone(!0),I=h.default("<p></p>");I.append(F),I.insertAfter(x),(O=I.childNodes())===null||O===void 0||O.get(0).remove(),g.selection.moveCursor(I.getNode()),x.remove()})},b}(m.default);o.default=w},function(r,o,i){r.exports=i(411)},function(r,o,i){var l=i(412);r.exports=l},function(r,o,i){var l=i(413),d=Array.prototype;r.exports=function(c){var u=c.every;return c===d||c instanceof Array&&u===d.every?l:u}},function(r,o,i){i(414);var l=i(15);r.exports=l("Array").every},function(r,o,i){var l=i(5),d=i(32).every,c=i(67),u=i(22),h=c("every"),m=u("every");l({target:"Array",proto:!0,forced:!h||!m},{every:function(C){return d(this,C,arguments.length>1?arguments[1]:void 0)}})},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(4));(0,d.default)(o,"__esModule",{value:!0});var u=i(2),h=u.__importDefault(i(3)),m=i(98),y=u.__importDefault(i(140)),C=i(98),A=i(7);function w(E){function b(k){var T,O;if(m.isAllTodo(E)){k.preventDefault();var F=E.selection,I=F.getSelectionRangeTopNodes()[0],M=(T=I.childNodes())===null||T===void 0?void 0:T.get(0),N=(O=window.getSelection())===null||O===void 0?void 0:O.anchorNode,B=F.getRange();if(!(B!=null&&B.collapsed)){var L=B==null?void 0:B.commonAncestorContainer.childNodes,U=B==null?void 0:B.startContainer,H=B==null?void 0:B.endContainer,R=B==null?void 0:B.startOffset,z=B==null?void 0:B.endOffset,$=0,S=0,J=[];L==null||(0,c.default)(L).call(L,function(se,ge){se.contains(U)&&($=ge),se.contains(H)&&(S=ge)}),S-$>1&&(L==null||(0,c.default)(L).call(L,function(se,ge){ge<=$||ge>=S||J.push(se)}),(0,c.default)(J).call(J,function(se){se.remove()})),C.dealTextNode(U,R),C.dealTextNode(H,z,!1),E.selection.moveCursor(H,0)}if(I.text()===""){var Q=h.default(A.EMPTY_P);Q.insertAfter(I),F.moveCursor(Q.getNode()),I.remove();return}var G=F.getCursorPos(),ie=m.getCursorNextNode(M==null?void 0:M.getNode(),N,G),X=y.default(h.default(ie)),le=X.getInputContainer(),be=le.parent().getNode(),ce=X.getTodo(),de=le.getNode().nextSibling;if((M==null?void 0:M.text())===""&&(M==null||M.append(h.default("<br>"))),ce.insertAfter(I),!de||(de==null?void 0:de.textContent)===""){if((de==null?void 0:de.nodeName)!=="BR"){var pe=h.default("<br>");pe.insertAfter(le)}F.moveCursor(be,1)}else F.moveCursor(be)}}function g(k){var T,O;if(m.isAllTodo(E)){var F=E.selection,I=F.getSelectionRangeTopNodes()[0],M=(T=I.childNodes())===null||T===void 0?void 0:T.getNode(),N=h.default("<p></p>"),B=N.getNode(),L=(O=window.getSelection())===null||O===void 0?void 0:O.anchorNode,U=F.getCursorPos(),H=L.previousSibling;if(I.text()===""){k.preventDefault();var R=h.default(A.EMPTY_P);R.insertAfter(I),I.remove(),F.moveCursor(R.getNode(),0);return}if((H==null?void 0:H.nodeName)==="SPAN"&&H.childNodes[0].nodeName==="INPUT"&&U===0){var z;k.preventDefault(),M==null||(0,c.default)(z=M.childNodes).call(z,function($,S){S!==0&&B.appendChild($.cloneNode(!0))}),N.insertAfter(I),I.remove()}}}function _(){var k=E.selection,T=k.getSelectionRangeTopNodes()[0];T&&C.isTodo(T)&&T.text()===""&&(h.default(A.EMPTY_P).insertAfter(T),T.remove())}function x(k){k&&k.target instanceof HTMLInputElement&&k.target.type==="checkbox"&&(k.target.checked?k.target.setAttribute("checked","true"):k.target.removeAttribute("checked"))}E.txt.eventHo
2025-05-20 11:03:25 +08:00
<i class="`+m+`"></i>
2025-05-27 15:27:24 +08:00
</div>`);g.on("click",function(_){var x,k=(0,c.default)(x=h.default(_.currentTarget)).call(x,"i");k.hasClass(m)?(g.attr("data-title","\u53D6\u6D88\u5168\u5C4F"),o.setFullScreen(E)):(g.attr("data-title","\u5168\u5C4F"),o.setUnFullScreen(E))}),b.append(g)}};o.default=A},function(r,o,i){var l=i(20),d=i(422);d=d.__esModule?d.default:d,typeof d=="string"&&(d=[[r.i,d,""]]);var c={};c.insert="head",c.singleton=!1,l(d,c),r.exports=d.locals||{}},function(r,o,i){var l=i(21);o=l(!1),o.push([r.i,`.w-e-full-screen-editor {
2025-05-20 11:03:25 +08:00
position: fixed;
width: 100%!important;
height: 100%!important;
left: 0;
top: 0;
}
2025-05-27 15:27:24 +08:00
`,""]),r.exports=o},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(29));(0,d.default)(o,"__esModule",{value:!0});var u=function(m,y){var C,A=m.isEnable?m.$textElem:(0,c.default)(C=m.$textContainerElem).call(C,".w-e-content-mantle"),w=(0,c.default)(A).call(A,"[id='"+y+"']"),E=w.getOffsetData().top;A.scrollTop(E)};o.default=u},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(129)),h={menu:2,panel:2,toolbar:1,tooltip:1,textContainer:1},m=function(){function y(){this.tier=h,this.baseZIndex=u.default.zIndex}return y.prototype.get=function(C){return C&&this.tier[C]?this.baseZIndex+this.tier[C]:this.baseZIndex},y.prototype.init=function(C){this.baseZIndex==u.default.zIndex&&(this.baseZIndex=C.config.zIndex)},y}();o.default=m},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(70)),u=l(i(4));(0,d.default)(o,"__esModule",{value:!0});var h=i(2),m=h.__importDefault(i(426)),y=i(6),C=i(7);function A(E,b){return(0,c.default)(E).call(E,function(g){var _=g.type,x=g.target,k=g.attributeName;return _!="attributes"||_=="attributes"&&(k=="contenteditable"||x!=b)})}var w=function(E){h.__extends(b,E);function b(g){var _=E.call(this,function(x,k){var T;if(x=A(x,k.target),(T=_.data).push.apply(T,x),g.isCompatibleMode)_.asyncSave();else if(!g.isComposing)return _.asyncSave()})||this;return _.editor=g,_.data=[],_.asyncSave=C.EMPTY_FN,_}return b.prototype.save=function(){this.data.length&&(this.editor.history.save(this.data),this.data.length=0,this.emit())},b.prototype.emit=function(){var g;(0,u.default)(g=this.editor.txt.eventHooks.changeEvents).call(g,function(_){return _()})},b.prototype.observe=function(){var g=this;E.prototype.observe.call(this,this.editor.$textElem.elems[0]);var _=this.editor.config.onchangeTimeout;this.asyncSave=y.debounce(function(){g.save()},_),this.editor.isCompatibleMode||this.editor.$textElem.on("compositionend",function(){g.asyncSave()})},b}(m.default);o.default=w},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=function(){function u(h,m){var y=this;this.options={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0},this.callback=function(C){h(C,y)},this.observer=new MutationObserver(this.callback),m&&(this.options=m)}return(0,d.default)(u.prototype,"target",{get:function(){return this.node},enumerable:!1,configurable:!0}),u.prototype.observe=function(h){this.node instanceof Node||(this.node=h,this.connect())},u.prototype.connect=function(){if(this.node)return this.observer.observe(this.node,this.options),this;throw new Error("\u8FD8\u672A\u521D\u59CB\u5316\u7ED1\u5B9A\uFF0C\u8BF7\u60A8\u5148\u7ED1\u5B9A\u6709\u6548\u7684 Node \u8282\u70B9")},u.prototype.disconnect=function(){var h=this.observer.takeRecords();h.length&&this.callback(h),this.observer.disconnect()},u}();o.default=c},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=i(2),u=c.__importDefault(i(428)),h=c.__importDefault(i(435)),m=c.__importDefault(i(436)),y=function(){function C(A){this.editor=A,this.content=new u.default(A),this.scroll=new h.default(A),this.range=new m.default(A)}return(0,d.default)(C.prototype,"size",{get:function(){return this.scroll.size},enumerable:!1,configurable:!0}),C.prototype.observe=function(){this.content.observe(),this.scroll.observe(),!this.editor.isCompatibleMode&&this.range.observe()},C.prototype.save=function(A){A.length&&(this.content.save(A),this.scroll.save(),!this.editor.isCompatibleMode&&this.range.save())},C.prototype.revoke=function(){this.editor.change.disconnect();var A=this.content.revoke();A&&(this.scroll.revoke(),this.editor.isCompatibleMode||(this.range.revoke(),this.editor.$textElem.focus())),this.editor.change.connect(),A&&this.editor.change.emit()},C.prototype.restore=function(){this.editor.change.disconnect();var A=this.content.restore();A&&(this.scroll.restore(),this.editor.isCompatibleMode||(this.range.restore(),this.editor.$textElem.focus())),this.editor.change.connect(),A&&this.editor.change.emit()},C}();o.default=y},function(r,o,i){var
2025-05-20 11:03:25 +08:00
<div class="w-e-content-preview w-e-text">`+_+`</div>
2025-05-27 15:27:24 +08:00
</div>`),y.$textContainerElem.append(A);var x=y.zIndex.get("menu");w=h.default('<div class="w-e-menue-mantle" style="z-index:'+x+'"></div>'),y.$toolbarElem.append(w),C=!0,y.isEnable=!1}}function b(){!C||(A.remove(),w.remove(),y.$textElem.show(),C=!1,y.isEnable=!0)}return{disable:E,enable:b}}o.default=m},function(r,o,i){var l=i(20),d=i(439);d=d.__esModule?d.default:d,typeof d=="string"&&(d=[[r.i,d,""]]);var c={};c.insert="head",c.singleton=!1,l(d,c),r.exports=d.locals||{}},function(r,o,i){var l=i(21);o=l(!1),o.push([r.i,`.w-e-content-mantle {
2025-05-20 11:03:25 +08:00
width: 100%;
height: 100%;
overflow-y: auto;
}
.w-e-content-mantle .w-e-content-preview {
width: 100%;
min-height: 100%;
padding: 0 10px;
line-height: 1.5;
}
.w-e-content-mantle .w-e-content-preview img {
cursor: default;
}
.w-e-content-mantle .w-e-content-preview img:hover {
box-shadow: none;
}
.w-e-menue-mantle {
position: absolute;
height: 100%;
width: 100%;
top: 0;
left: 0;
}
2025-05-27 15:27:24 +08:00
`,""]),r.exports=o},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0});var c=function(){function u(h){var m=this;this.editor=h;var y=function(){var A=document.activeElement;A===h.$textElem.elems[0]&&m.emit()};window.document.addEventListener("selectionchange",y),this.editor.beforeDestroy(function(){window.document.removeEventListener("selectionchange",y)})}return u.prototype.emit=function(){var h,m=this.editor.config.onSelectionChange;if(m){var y=this.editor.selection;y.saveRange(),y.isSelectionEmpty()||m({text:y.getSelectionText(),html:(h=y.getSelectionContainerElem())===null||h===void 0?void 0:h.elems[0].innerHTML,selection:y})}},u}();o.default=c},function(r,o,i){var l=i(0),d=l(i(1)),c=l(i(128)),u=l(i(94)),h=l(i(4));(0,d.default)(o,"__esModule",{value:!0}),o.registerPlugin=void 0;var m=i(2),y=m.__importDefault(i(87)),C=i(6);function A(E,b,g){if(!E)throw new TypeError("name is not define");if(!b)throw new TypeError("options is not define");if(!b.intention)throw new TypeError("options.intention is not define");if(b.intention&&typeof b.intention!="function")throw new TypeError("options.intention is not function");g[E]&&console.warn("plugin "+E+" \u5DF2\u5B58\u5728\uFF0C\u5DF2\u8986\u76D6\u3002"),g[E]=b}o.registerPlugin=A;function w(E){var b=(0,c.default)({},C.deepClone(y.default.globalPluginsFunctionList),C.deepClone(E.pluginsFunctionList)),g=(0,u.default)(b);(0,h.default)(g).call(g,function(_){var x=_[0],k=_[1];console.info("plugin "+x+" initializing");var T=k.intention,O=k.config;T(E,O),console.info("plugin "+x+" initialization complete")})}o.default=w},function(r,o,i){var l=i(0),d=l(i(1));(0,d.default)(o,"__esModule",{value:!0})}]).default})})(Ey);var R8=B8(Ey.exports),$8="fcEditor",I8=1,F8=Object.assign||function(e){for(var t,r=1;r<arguments.length;r++)for(var o in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},P8=n.defineComponent({name:$8,props:{modelValue:String,init:Function,disabled:Boolean,config:Object},inheritAttrs:!1,emits:["update:modelValue"],data:function(){return{editor:{},uni:I8++}},watch:{disabled:function(){this.enable()},modelValue:function(t){t!==this.editor.txt.html()&&this.editor.txt.html(t||"")}},methods:{enable:function(){this.disabled?this.editor.disable():this.editor.enable()},result:function(){this.$emit("update:modelValue",this.editor.txt.html())}},mounted:function(){var t=this;this.$nextTick(function(){t.editor=new R8("#editor".concat(t.uni)),t.editor.config.zIndex=2,t.editor.config.focus=!1,t.editor.config.autoFocus=!1,t.config&&F8(t.editor.config,t.config),t.init&&t.init(t.editor),t.editor.create(),t.enable(),t.editor.txt.html(t.modelValue)})},render:function(){var t=V8({},this.$attrs);return delete t.id,n.createVNode("div",n.mergeProps(t,{onInput:this.result,id:"editor".concat(this.uni),style:"line-height: normal;"}),null)},beforeDestroy:function(){this.editor&&this.editor.destroy(),this.editor=null}});(function(e,t){(function(r){r(Zr())})(function(r){r.defineSimpleMode=function(C,A){r.defineMode(C,function(w){return r.simpleMode(w,A)})},r.simpleMode=function(C,A){o(A,"start");var w={},E=A.meta||{},b=!1;for(var g in A)if(g!=E&&A.hasOwnProperty(g))for(var _=w[g]=[],x=A[g],k=0;k<x.length;k++){var T=x[k];_.push(new d(T,A)),(T.indent||T.dedent)&&(b=!0)}var O={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:b?[]:null}},copyState:function(I){var M={state:I.state,pending:I.pending,local:I.local,localState:null,indent:I.indent&&I.indent.slice(0)};I.localState&&(M.localState=r.copyState(I.local.mode,I.localState)),I.stack&&(M.stack=I.stack.slice(0));for(var N=I.persistentStates;N;N=N.next)M.persistentStates={mode:N.mode,spec:N.spec,state:N.state==I.localState?M.localState:r.copyState(N.mode,N.state),next:M.persistentStates};return M},token:c(w,C),innerMode:function(I){return I.local&&{mode:I.local.mode,state:I.localState}},indent:y(w,E)};if(E)for(var F in E)E.hasOwnProperty(F)&&(O[F]=E[F]);return O};function o(C,A){if(!C.hasOwnProperty(A))throw new Error("Undefined state "+A+" in simple mode")}